These functions provide the basic support for initializing, creating and updating the WCS table extension which serves as the archive of updates made to the WCS information in the image headers.
Update WCSCORR table with rows for each SCI extension to record the newly updated WCS keyword values.
Return the basic definitions for a WCSCORR table. The dtype definitions for the string columns are set to the maximum allowed so that all new elements will have the same max size which will be automatically truncated to this limit upon updating (if needed).
The table is initialized with rows corresponding to the OPUS solution for all the ‘SCI’ extensions.
Sets all values in a specified row or set of rows to default values
This function will essentially erase the specified row from the table without actually removing the row from the table. This avoids the problems with trying to resize the number of rows in the table while preserving the ability to update the table with new rows again without resizing the table.
Parameters : | |
---|---|
wcstab: object :
selections: dict :
rows: int, list :
|
Return an array of indices from the table (NOT HDU) ‘wcstab’ that matches the selections specified by the user.
The row selection criteria must be specified as a dictionary with column name as key and value(s) representing the valid desired row values. For example, {‘wcs_id’:’OPUS’,’extver’:2}.
This function will initialize the WCSCORR table if it is not already present, and look for WCS keywords with a prefix of ‘O’ as the original OPUS generated WCS as the initial row for the table or use the current WCS keywords as initial row if no ‘O’ prefix keywords are found.
This function will NOT overwrite any rows already present.
This function works on all SCI extensions at one time.
Copies the values of the WCS from the WCSCORR based on ID specified by user. The default will be to restore the original OPUS-derived values to the Primary WCS. If wcskey is specified, the WCS with that key will be updated instead.
Update WCSCORR table with a new row or rows for this extension header. It copies the current set of WCS keywords as a new row of the table based on keyed WCSs as per Paper I Multiple WCS standard).
Parameters : | |
---|---|
dest : HDUList
source : HDUList, optional
extname : str, optional
wcs_id : str, optional
active: bool, optional :
|
Update the values in ‘column’ with ‘values’ for selected rows
Parameters : | |
---|---|
wcstab: object :
column: string :
values: string, int, or list :
selections: dict :
rows: int, list :
|
The previously released versions of makewcs provided with MultiDrizzle archives the original OPUS generated WCS keywords using header keywords which have a prefix of “O”, such as “OCRPIX1”. In order to avoid overwriting or ignoring these original values, these functions can be used to convert the prefixed OPUS WCS keywords into WCS table entries compatible with the new code.
Strictly to provide complete support for these OPUS keywords, the code will also create, if the user desires, prefix “O” WCS keywords from the alternate WCS FITS conventions OPUS keywords. This would allow images processed using the new code only can then be used with older versions of MultiDrizzle, if the user needs such compatibility.
Identifies WCS keywords which were generated by OPUS and archived using a prefix of ‘O’ for all ‘SCI’ extensions in the file
Parameters : | |
---|---|
fobj: string or pyfits.HDUList :
|
Creates alternate WCS with a prefix of ‘O’ for OPUS generated WCS values to work with old MultiDrizzle.
Parameters : | |
---|---|
fobj: string or pyfits.HDUList :
|
|
Raises : | |
IOError: :
|