The purpose of this little document is to describe the usage and architecture of the PIA modules available for these tasks. As these s/w tools are for expert use only and are in general not useful for the astronomical user, the contents of this chapter might differ in style and contents from the rest of the PIA User Manual.
The PIA software for the analysis and consistency check of the FPGC file comprises the following modules: fpgc_manager.pro, read_fpgc.pro and anal_fpgc.pro.
IDL> fpgc_manager
This brings up a menu called "FPGC Data Selection" allowing the user to select for which sub-instrument data shall be analysed. The File pull-down menu offers the options to Select FPGC file, Analyse FPGC file and Quit. The Help button enters the PIA Help menu (not yet implemented).
The Select FPGC file menu point open a standard file selection menu, filtered for the selected FPGC file type, in order to allow the user to select the file he/ she wants to analyse.
The Quit menu point ends the fpgc_manager programme and returns to the IDL prompt.
The Analyse FPGC file menu point starts the actual FPGC analysis process after the selection of a FPGC file, i.e. it calls the module anal_fpgc and displays the information it returns. This results in three window to appear on the screen, two PIA_XPLOT (cf. "The PIA_XPLOT Menu" on page 53) windows and one text output widget. The first plot window contains the raster data from the FPGC file overlaid with the ideal raster as would be expected from the FPGC header. The second plot window shows the euclidic distances between the ideal raster positions as derived from the FPGC header and the actual positions from the FPGC data records. The distances are plotted for every raster leg individually, allowing the user to judge the quality of the performed raster and the influence of the deviations form the ideal raster on the FPG data. This plot also allows to find out whether any systematic increase of deviations can be found in the data as the raster progresses. The text widget gives a print-out of all information extracted from the FPGC file relevant for the PHT data evaluation.
read_fpgc, infile, npts, nlin, dst_pts, dst_lin, rota, rline, rcolumn, ycoor, zcoor, ERROR=error
infile: name of FPGC file
ERROR: returns an error status: 0 = no error; 1 = error: output is not valid
TEXTOUT: String array containing the vital contents of the FGPC file, this keyword is used by the module anal_fpgc.pro/fpgc_manager to give a print-out in user readable form into a text widget.
npts: Number of raster points of the map/scan in the FPGC file (Header Record #2, offset 40) [Integer]
nlin: Number of raster lines of the map/scan in the FPGC file (Header Record #2, offset 43) [Integer]
dst_pts: Distance between raster points [arcsec] of the map/scan in the FPGC file (Header Record #2, offset 64) [Integer]
dst_lin: Distance between raster legs [arcsec] of the map/scan in the FPGC file (Header Record #2, offset 68) [Integer]
rota: Rotation of raster pattern around raster centre in degrees [0.0 .. 360.0] (Header Record #2, offset 74) [Float]
rline[npts*nlin]: Vector containing the raster point id for the line number (Data Records, offset 40) [Vector of Integer]
rcolumn[npts*nlin]: Vector containing the raster point id for the column number (Data Records, offset 43) [Vector of Integer]
ycoor[npts*nlin]: Vector of relative Y-coordinate [arcsec] w.r.t. nominal direction of the raster centre (Data Records, offset 46) [Vector of Float]
zcoor[npts*nlin]: Vector of relative Z-coordinate [arcsec] w.r.t. nominal direction of the raster centre (Data Records, offset 53) [Vector of Float]
Comment: The module read_fpgc.pro uses direct access to read a FPGC file. If the files give to the module via infile does not obey the FPGC file standard the software will crash or return incorrect data. No internal consistency check on the correctness of the FPGC format is performed.
anal_fpgc, infile, ERROR=error
infile: name of FPGC file
text: String array containing the vital contents of the FGPC file, as returned by read_fpgc and in addition information related to the analysis process. This keyword is used by the module fpgc_manager to give a print-out in user readable form into a text widget.
ERROR: Returns an error status: 0 = no error; 1 = error: output is not valid
read_fpgc
The method to achieve the necessary goal as described above is to make use of an adapted version of the IDL Astronomy Library find routine. A detailed descrip tion on how this routine works internally can be found in the documentation of the library. Thus, only a short introduction into the necessary input parameters and their influence on the processing will be given here.
The routine that will be used is the pia_find programme, which is embedded into the PHT Interactive Analysis, Astronomical Applications mapping routines.
pia_find, image, x, y, flux
image: m x n image data
x: vector with x-positions of stars
y: vector with y-positions of stars
flux: vector with estimated fluxes of stars
PIA_find_Event, event handling routine for pia_find
find, from astronomical library
The pia_find routine launches a user input window allowing the user to specify the input parameters needed for the find routine in order to work properly. These input parameters are:
Source Threshold: This threshold specifies how high a point source must be above the background to be detected. The value is given as absolute brightness in image units. The default is set to 1.5 times the median of the entire image.
Full Width Half Minimum of Point Source: The full width half minimum that shall be used for the search for a point source, given in raster coordinates. 1.0 is given as the (not very useful) default value.
Sharpness Statistics, lower and upper limit: Lower and upper limit of sharpness statistic. For details refer to the manual of the astronomical library. The default values are 0.2 and 1.0 respectively.
Roundness Statistic, lower and upper limit: Lower and upper limit of sharpness statistic. For details refer to the manual of the astronomical library. The default values are -1.0 and 1.0 respectively.
The button "Find Stars" starts the find process and launches a window with the results of the find procedure, i.e. x,y-coordinates (in the original raster parameters of the image), sharpness and roundness statistic values for all point sources found, fulfilling the criteria given by the user input parameters. The button "Get original parameters" resets the user input to the default parameters of the programme. "Exit" return the control to the PIA main programme.
Note: The original find routine was written for large CCD images and consequently does not work properly for small images (smaller 7x7). In order to overcome this problem the given image is extended by 3 row on each side. The additional data points are filled with the median of the entire image. As this procedure might lead to problems, the user is warned when using this routine with small images.
INTERPOL_FPGC
Interpolate Focal Plane Geometry Calibration File coordinates form x, y raster coordinates. A linear interpolation between the two FPGC coordinates above and below the given raster coordinates is performed, taking into account the closest set of FPGC coordinates.
interpol_fpgc, infile, x, y, scy, scz, ERROR=error
infile: name of FPGC file
x: raster x-coordinate as from PIA
y: raster y-coordinate as from PIA
scy: FPGC coordinate interpolated to correspond to raster x-coordinate
scz: FPGC coordinate interpolated to correspond to raster y-coordinate
ERROR: Returns an error status: 0 = no error, 1 = error: output is not valid
read_fpgc
fpg_cross, iscpfile, fpgcfile, centre, SCAN=scan, INTER=inter, PIXEL=pixel, ERROR=error
iscpfile: name of PIA ISCP product file, containing cross scan data
fpgcfile: name of Focal Plane Geometry Calibration File, related to cross scan
centre: coordinate of scan centre, in FPGC coordinates derive using the centre moment method; in case of P1: centre=fltarr(2) for the two scans; in case of PHT-S: centre(2,128) for the two scans and the 128 PHT-S IR pixels
SCAN: Defines whether to use Y or Z coordinate from FPGC file: ='Y': use Y coordinate; ='Z': use Z coordinate, if not specified the default is to use the Y coordinate
INTER: Decides, whether s/w shall run in: 'Y' = interactive mode; 'N' = automatic mode; default is 'N'
PIXEL: decide which PHT-S pixel shall be analysed in interactive mode; default is pixel No. 1
ERROR: Returns an error status: 0 = no error; 1 = error: output is not valid
read_fpgc
read_ispd
pia_xplot
pia_multi_fit
The routine fpg_cross can be used in two different modes "automatic" and "interactive" depending on whether the parameter INTER is set to "N" or "Y", the default is "N".
In case PHT-S data are analysed the returned centre array will contain the calculated centre coordinates for all 128 PHT-S pixels.
The parameter SCAN can be used in order to distinguish between scans along the spacecraft "Y"- and "Z"-coordinate axis.
The PIXEL keyword is ignored in "automatic" mode.
In case of PHT-S data analysis in interactive mode, it is required to specify in the keyword PIXEL the number of the PHT-S pixel for which the interactive fitting shall be performed.
After the s/w has performed the necessary consistency checks on the input files, the user will be offered the possibility to perform interactively a fit using the pia_multi_fit routine. This routine was initially written by the SWS IDT and is used within the PIA s/w with their kind permission. It was adapted to the PIA and additional fitting algorithms were added in order to make it applicable to the procedures out-lined here. A description of this fitting s/w can be found in "Mutiple Fitting" on page 63. The pia_multi_fit routine is called twice for the two scans per formed in opposite direction allowing the user to find the best possible fit for either of them individually. The fitting function "double fermi" was included into the fitting s/w because it is very well adapted to the problem of fitting the centre of the distribution as given by the FPGC cross scan profile. The s/w, however, also allows to fit a gauss profile. Both fits can be combined with a polynomial for adaptation to the background.