next up previous contents
Next: Namelist Description Up: No Title Previous: Outputs

Error Handling

The TRANSMAP program checks for errors from the user input and throughout execution. Errors detected are reported on the report file and sometimes on the screen. The program normally aborts after an error is detected while a warning message does not stop execution

The program first checks for errors that occur during the input phase and do not require access to the data. Typical errors are: invalid values for the real numbers, unable to open the input or output files, and the input file not being in galactic, celestial coordinates or not being rectangular maps. The EGRET_DIR and FITS_DIR environment variables must be properly set before the program runs or a fatal error will occur. The FITS_DIR directory must also be writable. Errors are also generated if the program cannot write to the current directory to create the namelist file. During execution, the program checks for a valid input counts map. The map must have 2 or 4 byte integers, 3 axis, a data type (BUNIT) of 'COUNTS' and be in the simple FITS format. The number of bins on the X and Y axis must be at least 3 and greater than zero for the third axis (number of energy levels). In addition, the total number of bins in the map must be less than a set limit of 648000. A warning message is written if the file has FITS extensions. The user is notified if the exposure or intensity files do not exist and only the transformed counts map will be generated if only 1 file exists. The exposure and intensity files are assumed to have the same characteristics as the counts map of the same name. Only the data type of the files are checked to be 'EXPOSURE' and 'INTENSITY' and the number of axis must be 3. Serious problems will result if these 2 maps do not match the counts map.

If the output files already exist, they are automatically deleted and replaced by the new files. The output maps must also be within the 648000 limit and have at least 3 bins per axis. The number of bins on the X and Y axis of the output map are forced to be even by subtracting the last bin if need be. A warning message is written in that case.

The program expects the transformation reference point to lie inside the input map boundaries. If not, a warning message is written and the program proceeds. However, incorrect results may be obtained in that case and no further checking on this will be performed. Problems will also likely occur if the output map crosses the 0-360 boundary. However both of these cases would not occur when performing regular transformation of high latitudes maps which the program is designed to do.

The program will abort if all the output bins are null. All FITSIO calls return a status code which the program checks. A non-zero return code indicates a serious error and causes termination after writing the standard FITSIO meaning for that error code.

The user should be aware that because of the nature of the transformation, the bin data in the map is potentially greatly modified and although, the total counts is preserved in the process, part of it is lost when writing the counts map which is integers data. Since rounding off occurs with the FITSIO data conversion, the error should be minimal. However, because input bins may convert to many output bins, the chance for lost in the total bin counts increases. The user should be aware that the total output map counts is not really the total written in to the file. The opposite effect also occurs in some areas of the maps when many input bins contribute to a single output bin which is seen when for instance the output map maximum is greater than the input map.


next up previous contents
Next: Namelist Description Up: No Title Previous: Outputs
CGRO SSC
1998-06-29