This module contains a number of global constants required during reduction, as well as functions that are widely used throughout the other modules. Some general definitions useful in a number of podi scripts
Break down a IRAF-like string (e.g. [0:100,0:200]) into its four components and return them separately.
Get the location of a given cell in the monolithic OTA array, accounting for binning (only 1x1 and 2x2 supported).
Return the center coordinates of a given HDU, based on the WCS information (does not include distortion).
Delete a file if it already exists, otherwise do nothing.
Check if the given argument was given on the command line
Return the value of a command line argument. If no argument was passed (for example -flag= ), assign the specified default value instead.
Return the filename for a given diagnostic plot, accounting for user-specified preferences.
Return the filename for a given OTA-level diagnostic plot, accounting for user-specified preferences.
Convert a float coordinate into the more user-friednly sexa-decimal format
For each OTA (extension) in the pased list, derive the sky-position of all 4 corners.
Return the overscan region of a given cell, accounting for binning
Return the science region of a given cell, accounting for binning
Extract a region based on the a IRAF-like region definition.
See also
break_region_string
Get the binning factor of a given frame/cell based on its header.
Check if the specified cell, identified by OTA and CELL-ID, is either broken or marked as a guide/video cell.
Return all values entered on the command line with all command-line flags removed.
Example
The user called a program ./podi_something param1 -flag1 -flag2 param2
This function would then return a list containing [‘./podi_something’, ‘param1’, ‘param2’]
Return the dimension of the monolithic OTA frame, accounting for binning
Return the level of the installed filter, based on the information in the FLTARM header keywords. If more than one filter is active, this function returns the level of the lowest populated filter arm.
Return current SVN version as given by the svnversion command.
Convert the header FILTERID entry into a valid filtername. This is necessary as some of the filter names change over time, but the filter-id should remain unchanged.
Copy all headers from the primary header into the current header
Copy data from one array into another array, with source and target coordinates specified in the IRAF-style format.
Mask out broken regions in a data array. Regions are defined via a ds9 region file to allow for ay creation by the user.
Match the area coverage of two catalogs, allowing for some extra coverage around the edges.
Apply a binning factor to a data array.
Parameters : |
|
---|
Rotate a given data array. Rotation center is the center of the data frame.
Convert a sexa-decimal coordinate string (e.g. 12:30:00.0”) into a float (12.5 in the example).
Helper function needed to allocate shared memory numpy-arrays.