OMEGA Pipeline Reference Manual  1.0.5
Functions
OMEGA Fits Structure

These are methods for manipulating the omega_fits object. More...

Functions

void omega_fits_delete (omega_fits *p)
void omega_fits_delete_list (omega_fits **p, int n)
omega_fits * omega_fits_duplicate (omega_fits *in)
cpl_propertylist * omega_fits_get_ehu (omega_fits *p)
char * omega_fits_get_extname (omega_fits *p)
int omega_fits_get_extnum (omega_fits *p)
char * omega_fits_get_filename (omega_fits *p)
cpl_frame * omega_fits_get_frame (omega_fits *p)
char * omega_fits_get_fullname (omega_fits *p)
cpl_image * omega_fits_get_image (omega_fits *p)
cpl_propertylist * omega_fits_get_phu (omega_fits *p)
int omega_fits_get_status (omega_fits *p)
omega_fits * omega_fits_load (const cpl_frame *inframe, cpl_type type, int extnum)
omega_fits ** omega_fits_load_list (const cpl_frameset *f, cpl_type type, int exten)
int omega_fits_set_error (omega_fits *p, int status)
void omega_fits_set_filename (omega_fits *p, char *fname)
omega_fits * omega_fits_wrap (cpl_image *im, omega_fits *model, cpl_propertylist *phu, cpl_propertylist *ehu)

Detailed Description

These are methods for manipulating the omega_fits object.

#include <stdio.h>
#include <math.h>
#include <string.h>
#include "omega_utils.h"
#include "omega_fits.h"

Function Documentation

void omega_fits_delete ( omega_fits *  p)
Name:
omega_fits_delete
Purpose:
Free all the workspace associated with a omega_fits object
Description:
Free all the workspace associated with a omega_fits object
Language:
C
Parameters:
pThe input omega_fits object
Author:
Sandra Castro - based on code written by Jim Lewis, CASU

Definition at line 275 of file omega_fits.c.

Referenced by omega_fits_delete_list().

void omega_fits_delete_list ( omega_fits **  p,
int  n 
)
Name:
omega_fits_delete_list
Purpose:
Free all the workspace associated with a list of omega_fits objects
Description:
Free all the workspace associated with a list of omega_fits objects
Language:
C
Parameters:
pThe input list of omega_fits objects
nThe number of omega_fits objects in the above array
Author:
Sandra Castro - based on code written by Jim Lewis, CASU

Definition at line 313 of file omega_fits.c.

References omega_fits_delete().

Referenced by omega_fits_load_list().

omega_fits* omega_fits_duplicate ( omega_fits *  in)
Name:
omega_fits_duplicate
Purpose:
Copy a omega_fits structure into another one.
Description:
An input omega_fits structure is duplicated and returned
Language:
C
Parameters:
inThe input omega_fits object
Returns:
The output omega_fits object.
Author:
Sandra Castro - based on code written by Jim Lewis, CASU

Definition at line 163 of file omega_fits.c.

cpl_propertylist* omega_fits_get_ehu ( omega_fits *  p)
Name:
omega_fits_get_ehu
Purpose:
Get the propertylist for the extension header for a given omega_fits image.
Description:
Get the propertylist for the extension header for a given omega_fits image. This is the extension that is relevant of the image. This should only need to be read once and then can be used to add things to the primary header.
Language:
C
Parameters:
pThe input omega_fits object
Returns:
The propertylist representing the extension header of the input image (NULL if there is an error).
Author:
Sandra Castro - based on code written by Jim Lewis, CASU

Definition at line 489 of file omega_fits.c.

Referenced by omega_fits_load(), omega_fits_wrap(), omega_fringes_flat_process(), omega_get_trim_region(), omega_jitter_process(), omega_nsky_process(), omega_readnoise_save(), omega_save_fits(), omega_scan_stats(), and omega_trim_oscan_correct().

char* omega_fits_get_extname ( omega_fits *  p)
Name:
omega_fits_get_extname
Purpose:
Get the extension name for a give omega_fits object
Description:
Get the extension name for a given omega_fits object.
Language:
C
Parameters:
pThe input omega_fits object
Returns:
The pointer to the extension name in the omega_fits structure – not a copy! (NULL if there is an error).
Author:
Sandra Castro - based on code written by Jim Lewis, CASU

Definition at line 529 of file omega_fits.c.

int omega_fits_get_extnum ( omega_fits *  p)
Name:
omega_fits_get_extnum
Purpose:
Get the FITS extension number for the current image in a omega_fits object
Description:
Get the FITS extension number for the current image in a omega_fits object
Language:
C
Parameters:
pThe input omega_fits object
Returns:
The extension number (-1 in case of error)
Author:
Sandra Castro - based on code written by Jim Lewis, CASU

Definition at line 414 of file omega_fits.c.

Referenced by omega_darkcurrent_save(), omega_get_trim_region(), and omega_readnoise_save().

char* omega_fits_get_filename ( omega_fits *  p)
Name:
omega_fits_get_filename
Purpose:
Get the filename from which the current omega_fits object originated
Description:
Get the filename from which the current omega_fits object originated. If this is null, then the image didn't originate in an FITS file.
Language:
C
Parameters:
pThe input omega_fits object
Returns:
The name of the file from which this image originated
Author:
Sandra Castro - based on code written by Jim Lewis, CASU

Definition at line 561 of file omega_fits.c.

cpl_frame* omega_fits_get_frame ( omega_fits *  p)
Name:
omega_fits_get_frame
Purpose:
Get the CPL frame from the omega_fits object
Description:
Return the CPL frame from the input omega_fits object. This frame is suitable for use in all cpl_frame routines.
Language:
C
Parameters:
pThe input omega_fits object
Returns:
The cpl_frame object. NULL if there was an error.
Author:
Sandra Castro

Definition at line 349 of file omega_fits.c.

Referenced by omega_fringes_flat_process(), omega_jitter_process(), and omega_nsky_process().

char* omega_fits_get_fullname ( omega_fits *  p)
Name:
omega_fits_get_fullname
Purpose:
Get the fullname of the FITS extension from which the current omega_fits object originated
Description:
Get the fullname of the FITS extension from which the current omega_fits object originated. If this is null, then the image didn't originate in an FITS file.
Language:
C
Parameters:
pThe input omega_fits object
Returns:
The fullname name of the file from which this image originated
Author:
Sandra Castro - based on code written by Jim Lewis, CASU

Definition at line 595 of file omega_fits.c.

cpl_image* omega_fits_get_image ( omega_fits *  p)
Name:
omega_fits_get_image
Purpose:
Get the CPL image from the omega_fits object
Description:
Return the CPL image from the input omega_fits object. This image is suitable for use in all cpl_image routines.
Language:
C
Parameters:
pThe input omega_fits object
Returns:
The cpl_image object. NULL if there was an error.
Author:
Sandra Castro - based on code written by Jim Lewis, CASU

Definition at line 381 of file omega_fits.c.

Referenced by omega_save_fits(), omega_scan_stats(), and omega_trim_oscan_correct().

cpl_propertylist* omega_fits_get_phu ( omega_fits *  p)
Name:
omega_fits_get_phu
Purpose:
Get the propertylist for the primary header for a given omega_fits image.
Description:
Get the propertylist for the primary header for a given omega_fits image. This should only need to be read once and then can be used to add things to the primary header.
Language:
C
Parameters:
pThe input omega_fits object
Returns:
The propertylist representing the primary header of the input image (NULL if there is an error).
Author:
Sandra Castro - based on code written by Jim Lewis, CASU

Definition at line 448 of file omega_fits.c.

Referenced by omega_fits_wrap(), omega_jitter_process(), and omega_save_fits().

int omega_fits_get_status ( omega_fits *  p)
Name:
omega_fits_get_status
Purpose:
Get the error status of the current object.
Description:
Get the error status of the current object.
Language:
C
Parameters:
pThe input omega_fits object
Returns:
The error status
Author:
Sandra Castro - based on code written by Jim Lewis, CASU

Definition at line 626 of file omega_fits.c.

omega_fits* omega_fits_load ( const cpl_frame *  inframe,
cpl_type  type,
int  extnum 
)
Name:
omega_fits_load
Purpose:
Load an input image into a omega_fits object
Description:
An image from an input cpl_frame is loaded into a omega_fits object. Only the image for a given extension number is loaded. The rest of the object properties are initialised
Language:
C
Parameters:
inframeThe input cpl_frame object
typeThe data type for the loaded image
extnumThe image extension that you want to load.
Returns:
The output omega_fits object.
Author:
Sandra Castro - based on code written by Jim Lewis, CASU

Definition at line 84 of file omega_fits.c.

References omega_fits_get_ehu().

Referenced by omega_fits_load_list().

omega_fits** omega_fits_load_list ( const cpl_frameset *  f,
cpl_type  type,
int  exten 
)
Name:
omega_fits_load_list
Purpose:
Load an input images into a omega_fits object array
Description:
Images from an input cpl_frameset are loaded into a list of omega_fits objects. Only the images for a given extension number are loaded. The rest of the object properties are initialised
Language:
C
Parameters:
fThe input cpl_frameset object
typeThe data type for the loaded images
extenThe image extension that you want to load.
Returns:
The output omega_fits object list.
Author:
Sandra Castro - based on code written by Jim Lewis, CASU

Definition at line 229 of file omega_fits.c.

References omega_fits_delete_list(), and omega_fits_load().

Referenced by omega_std_process().

int omega_fits_set_error ( omega_fits *  p,
int  status 
)
Name:
omega_fits_set_error
Purpose:
Set the error status and message for an object
Description:
The input status is checked to see if there has been a problem with the current object. If there has been, then the status is stored away and any error message from the cpl_error system is copied down.
Language:
C
Parameters:
pThe input omega_fits object
statusThe input error status
Returns:
A flag to say whether the input status was fatal.
Author:
Sandra Castro - based on code written by Jim Lewis, CASU

Definition at line 663 of file omega_fits.c.

void omega_fits_set_filename ( omega_fits *  p,
char *  fname 
)
Name:
omega_fits_set_filename
Purpose:
Set the file name associated with a omega_fits structure
Description:
Set the file name associated with a omega_fits structure. This is useful if you have wrapped a cpl_image in a structure and you don't have a physical file to refer to. The name can be used to define an output file name if you ultimately decide to write this out. If a name already exists, it will be overwritten
Language:
C
Parameters:
pThe input omega_fits object
fnameThe input file name.
Returns:
Nothing
Author:
Sandra Castro - based on code written by Jim Lewis, CASU

Definition at line 719 of file omega_fits.c.

omega_fits* omega_fits_wrap ( cpl_image *  im,
omega_fits *  model,
cpl_propertylist *  phu,
cpl_propertylist *  ehu 
)
Name:
omega_fits_wrap
Purpose:
Wrap an image in a omega_fits wrapper
Description:
The input image is inserted into a omega_fits wrapper. A model omega_fits object may be provided to give the new object headers. If the phu and ehu parameters are not null then they will be used as the propertylists for the new object. If not, then an attempt will be made to copy the propertylists from the model.
Language:
C
Parameters:
imThe input cpl_image
modelThe input omega_fits model object
phuThe input propertylist for the primary header for the new object.
ehuThe input propertylist for the extension header for the new object.
Returns:
The new omega_fits structure.
Author:
Sandra Castro - based on code written by Jim Lewis, CASU

Definition at line 761 of file omega_fits.c.

References omega_fits_get_ehu(), and omega_fits_get_phu().

Referenced by omega_jitter_process(), and omega_std_process().