### PISAGEN

Generates a frame of model objects

#### Description:

PISAGEN generates objects using the PISA profile model function. Input data are a list which should have been generated by PISAFIND in the profiling mode, or be of the same general form, for at least the first four columns (i.e. index, X position, Y position and integrated intensity). An optional input frame can be given, this is used to determine the size of the output frame. If this is not given then the input list is scanned to generate a suitable default size for the output frame. The output objects from PISAGEN can have the flux within each pixel integrated to give a improved estimate of the actual flux.

The PISA profiling function model parameters can be read from GLOBAL parameters as set up by the program PISAFIT. Additional parameters allow the output stars to be elliptical. The model may be generated on a background value and can be saturated. Noise can be added to the data to simulate real data for test purposes.

#### Usage:

PISAGEN INPUT POSITIONS OUTPUT GSIGM CROSS COMIX NOISE
$\left\{\right\$

method

#### Parameters:

The scaling factor to convert the data output values into counts for which Poisson statistics are required. This is the analogue to data units conversion factor for unmodified CCD frames. [1.0]
##### ANGLE = _REAL (Read)
The positional angle of the major axis of the stellar ellipses measured in degrees anti-clockwise from the y-axis (ie. as per PISAFIND). [0.0]
##### BACKGROUND = _REAL (Read)
The background value for the output frame. [0.0]
##### COMIX = _REAL (Read)
The mixture coefficient, as a fraction, which defines how the Lorentzian function, at each point in the analytical profile is added to the Gaussian or Exponential. [Global]
##### CROSS = _REAL (Read)
The crossover point, as a percentage of the Gaussian peak, where an exponential fall-off in the analytical stellar profile takes over from the Gaussian core. The exponential function is joined on smoothly to the Gaussian. [Global]
##### ELLIP = _REAL (Read)
The ellipticity of the output objects. [0.0]
##### GSIGM = _REAL (Read)
The standard deviation, in pixels, of the Gaussian core of the analytical stellar profile. [Global]
##### INPUT = NDF (Read)
An NDF containing a data array which is the same size as the required output data array.
##### NOISE = LITERAL (Read)
The noise contribution to be added to output data. Can be Poisson, Gaussian or None. [NONE]
##### NSIGMA = _REAL (Read)
The number of gaussian sigma to generate the output objects to. [10.0]
##### OUTPUT = NDF (Write)
The output NDF to contain the model objects.
##### POSITIONS = FILENAME (Read)
Input list of star positions and intensities (see description). [PISAFIND.DAT]
##### SAT = _REAL (Read)
The saturation value for output stars. [32767]
##### SCALE = _INTEGER (Read)
if scale is greater than one then each output object pixel value is determined by the integration of the function values at scale$\ast$scale equidistant parts within the pixel. This simulates an integration of the flux within each pixel. Using this option increases the accuracy of the output pixel intensities, this may be important in areas with large intensity gradients. [Dynamic]
##### SIGMA = REAL (Read)
The standard deviation of the Gaussian noise contribution. [1.0]
##### TITLE = LITERAL (Read)
Title for the output frame. [Output from PISAGEN]
##### XHIGH = _INTEGER (Read)
If an input frame is not given then this value defines the upper limit of the output data array X-axis. [Dynamic]
##### XLOW = _INTEGER (Read)
If an input frame is not given then this value defines the origin of the output data array X-axis. [Dynamic]
##### YHIGH = _INTEGER (Read)
If an input frame is not given then this value defines the upper limit of the output data array Y-axis. [Dynamic]
##### YLOW = _INTEGER (Read)
If an input frame is not given then this value defines the origin of the output data array Y-axis. [Dynamic]

#### Examples:

PISAGEN INPUT=FRAME POSITIONS=FRAME.STARS_ACC OUTPUT=STARS BACKGROUND=100.0 SAT=32767 NOISE=NONE
Generates an output NDF STARS of the same size as FRAME. The objects are placed at the positions defined in FRAME.STARS_ACC. The model parameterisations are accessed as the global parameters PISA_GSIGM, PISA_CROSS and PISA_COMIX, these values were probably generated by PISAFIT.

#### Implementation Status:

This program will not handle bad pixels.