VIRCAM Pipeline  1.3.3
Functions
vircam_fits
Groups of Support Routines

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

Functions

vir_fits * vircam_fits_load (cpl_frame *frame, cpl_type type, int nexten)
vir_fits * vircam_fits_duplicate (vir_fits *in)
vir_fits ** vircam_fits_load_list (cpl_frameset *f, cpl_type type, int exten)
void vircam_fits_delete (vir_fits *p)
void vircam_fits_delete_list (vir_fits **p, int n)
cpl_image * vircam_fits_get_image (vir_fits *p)
int vircam_fits_get_nexten (vir_fits *p)
cpl_propertylist * vircam_fits_get_phu (vir_fits *p)
cpl_propertylist * vircam_fits_get_ehu (vir_fits *p)
char * vircam_fits_get_extname (vir_fits *p)
char * vircam_fits_get_filename (vir_fits *p)
char * vircam_fits_get_fullname (vir_fits *p)
int vircam_fits_get_status (vir_fits *p)
int vircam_fits_set_error (vir_fits *p, int status)
void vircam_fits_set_filename (vir_fits *p, char *fname)
vir_fits * vircam_fits_wrap (cpl_image *im, vir_fits *model, cpl_propertylist *phu, cpl_propertylist *ehu)
void vircam_fits_unwrap (vir_fits *p)

Detailed Description

These are methods for manipulating the vircam_fits object.

Author:
Jim Lewis, CASU

Function Documentation

void vircam_fits_delete ( vir_fits *  p)
Name:
vircam_fits_delete
Purpose:
Free all the workspace associated with a vircam_fits object
Description:
Free all the workspace associated with a vircam_fits object
Language:
C
Parameters:
pThe input vir_fits object
Author:
Jim Lewis, CASU

Definition at line 277 of file vircam_fits.c.

Referenced by vircam_fits_delete_list(), vircam_imcore(), vircam_mask_load(), vircam_opm(), vircam_overexp(), and vircam_pawsky_mask().

void vircam_fits_delete_list ( vir_fits **  p,
int  n 
)
Name:
vircam_fits_delete_list
Purpose:
Free all the workspace associated with a list of vircam_fits objects
Description:
Free all the workspace associated with a list of vircam_fits objects
Language:
C
Parameters:
pThe input list of vir_fits objects
nThe number of vir_fits objects in the above array
Author:
Jim Lewis, CASU

Definition at line 314 of file vircam_fits.c.

References vircam_fits_delete().

Referenced by vircam_fits_load_list().

vir_fits* vircam_fits_duplicate ( vir_fits *  in)
Name:
vircam_fits_duplicate
Purpose:
Copy a vircam_fits structure into another one.
Description:
An input vircam_fits structure is duplcated and returned
Language:
C
Parameters:
inThe input vircam_fits object
Returns:
The output vircam_fits object.
Author:
Jim Lewis, CASU

Definition at line 159 of file vircam_fits.c.

References vircam_fits_get_ehu(), and vircam_fits_get_phu().

Referenced by vircam_imcore(), vircam_nebuliser(), and vircam_opm().

cpl_propertylist* vircam_fits_get_ehu ( vir_fits *  p)
Name:
vircam_fits_get_ehu
Purpose:
Get the propertylist for the extension header for a given vir_fits image.
Description:
Get the propertylist for the extension header for a given vir_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 vir_fits object
Returns:
The propertylist representing the extension header of the input image (NULL if there is an error).
Author:
Jim Lewis, CASU

Definition at line 457 of file vircam_fits.c.

Referenced by imcore_conf(), imcore_opm(), vircam_darkcor(), vircam_defringe(), vircam_destripe(), vircam_fits_duplicate(), vircam_fits_load(), vircam_fits_wrap(), vircam_flatcor(), vircam_gaincor(), vircam_illum(), vircam_imcore(), vircam_imdither(), vircam_imstack(), vircam_interleave(), vircam_jmp_dither_offsets(), vircam_jmp_illum(), vircam_jmp_interleave(), vircam_jmp_matched_stds(), vircam_jmp_save_catalogue(), vircam_jmp_save_illum(), vircam_jmp_save_offsky(), vircam_jmp_save_simple(), vircam_jmp_save_simple_offsets(), vircam_jmp_save_stack(), vircam_jmp_save_super(), vircam_jmp_skycor(), vircam_jmp_wcsfit(), vircam_lincor(), vircam_nditcor(), vircam_nebuliser(), vircam_pawsky_mask_pre(), and vircam_photcal().

char* vircam_fits_get_extname ( vir_fits *  p)
Name:
vircam_fits_get_extname
Purpose:
Get the extension name for a give vir_fits object
Description:
Get the extension name for a given vir_fits object.
Language:
C
Parameters:
pThe input vir_fits object
Returns:
The pointer to the extension name in the vir_fits structure – not a copy! (NULL if there is an error).
Author:
Jim Lewis, CASU

Definition at line 494 of file vircam_fits.c.

char* vircam_fits_get_filename ( vir_fits *  p)
Name:
vircam_fits_get_filename
Purpose:
Get the filename from which the current vir_fits object originated
Description:
Get the filename from which the current vir_fits object originated. If this is null, then the image didn't originate in an FITS file.
Language:
C
Parameters:
pThe input vir_fits object
Returns:
The name of the file from which this image originated
Author:
Jim Lewis, CASU

Definition at line 526 of file vircam_fits.c.

Referenced by vircam_imcombine(), vircam_imcore(), and vircam_jmp_ustep_seq().

char* vircam_fits_get_fullname ( vir_fits *  p)
Name:
vircam_fits_get_fullname
Purpose:
Get the fullname of the FITS extension from which the current vir_fits object originated
Description:
Get the fullname of the FITS extension from which the current vir_fits object originated. If this is null, then the image didn't originate in an FITS file.
Language:
C
Parameters:
pThe input vir_fits object
Returns:
The fullname name of the file from which this image originated
Author:
Jim Lewis, CASU

Definition at line 560 of file vircam_fits.c.

Referenced by vircam_darkcor(), vircam_defringe(), vircam_flatcor(), vircam_illum(), vircam_imcore(), vircam_imdither(), vircam_imstack(), vircam_jmp_interleave(), vircam_jmp_skycor(), vircam_lincor(), vircam_mkconf(), and vircam_prov().

cpl_image* vircam_fits_get_image ( vir_fits *  p)
Name:
vircam_fits_get_image
Purpose:
Get the CPL image from the vir_fits object
Description:
Return the CPL image from the input vir_fits object. This image is suitable for use in all cpl_image routines.
Language:
C
Parameters:
pThe input vir_fits object
Returns:
The cpl_image object. NULL if there was an error.
Author:
Jim Lewis, CASU

Definition at line 349 of file vircam_fits.c.

Referenced by imcore_conf(), imcore_opm(), vircam_backmap(), vircam_darkcor(), vircam_defringe(), vircam_destripe(), vircam_dummy_image(), vircam_flatcor(), vircam_gaincor(), vircam_genbpm(), vircam_grout(), vircam_illum(), vircam_imcombine(), vircam_imdither(), vircam_imstack(), vircam_inpaint(), vircam_interleave(), vircam_jmp_bpm2conf(), vircam_jmp_interleave(), vircam_jmp_save_offsky(), vircam_jmp_save_simple(), vircam_jmp_save_simple_offsets(), vircam_jmp_save_stack(), vircam_jmp_save_super(), vircam_jmp_skycor(), vircam_lincor(), vircam_mask_load(), vircam_nditcor(), vircam_nebuliser(), vircam_opm(), vircam_overexp(), vircam_pawsky_mask(), vircam_pawsky_mask_pre(), and vircam_tilesky().

int vircam_fits_get_nexten ( vir_fits *  p)
Name:
vircam_fits_get_nexten
Purpose:
Get the FITS extension number for the current image in a vir_fits object
Description:
Get the FITS extension number for the current image in a vir_fits object
Language:
C
Parameters:
pThe input vir_fits object
Returns:
The extension number (-1 in case of error)
Author:
Jim Lewis, CASU

Definition at line 382 of file vircam_fits.c.

Referenced by imcore_conf(), imcore_opm(), vircam_imcombine(), and vircam_jmp_interleave().

cpl_propertylist* vircam_fits_get_phu ( vir_fits *  p)
Name:
vircam_fits_get_phu
Purpose:
Get the propertylist for the primary header for a given vir_fits image.
Description:
Get the propertylist for the primary header for a given vir_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 vir_fits object
Returns:
The propertylist representing the primary header of the input image (NULL if there is an error).
Author:
Jim Lewis, CASU

Definition at line 416 of file vircam_fits.c.

Referenced by imcore_conf(), vircam_fits_duplicate(), vircam_fits_wrap(), vircam_illum(), vircam_imcombine(), vircam_imcore(), vircam_imdither(), vircam_imstack(), vircam_interleave(), vircam_jmp_dither_images(), vircam_jmp_dither_offsets(), vircam_jmp_illum(), vircam_jmp_photcal(), vircam_jmp_save_catalogue(), vircam_jmp_save_illum(), vircam_jmp_save_offsky(), vircam_jmp_save_simple(), vircam_jmp_save_simple_offsets(), vircam_jmp_save_stack(), vircam_jmp_save_super(), vircam_jmp_ustep_seq(), vircam_nditcor(), vircam_photcal(), and vircam_tilesky().

int vircam_fits_get_status ( vir_fits *  p)
Name:
vircam_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 vir_fits object
Returns:
The error status
Author:
Jim Lewis, CASU

Definition at line 591 of file vircam_fits.c.

Referenced by vircam_jmp_catalogue(), vircam_jmp_dither_images(), vircam_jmp_dither_offsets(), vircam_jmp_illum(), vircam_jmp_interleave(), vircam_jmp_save_offsky(), vircam_jmp_save_simple(), vircam_jmp_save_simple_offsets(), vircam_jmp_save_stack(), vircam_jmp_save_super(), vircam_jmp_skycor(), and vircam_jmp_ustep_seq().

vir_fits* vircam_fits_load ( cpl_frame *  frame,
cpl_type  type,
int  nexten 
)
Name:
vircam_fits_load
Purpose:
Load an input image into a vircam_fits object
Description:
An image from an input cpl_frame is loaded into a vircam_fits object. Only the image for a given extension number is loaded. The rest of the object properties are initialised
Language:
C
Parameters:
frameThe input cpl_frame object
typeThe data type for the loaded image
nextenThe image extension that you want to load.
Returns:
The output vircam_fits object.
Author:
Jim Lewis, CASU

Definition at line 80 of file vircam_fits.c.

References vircam_fits_get_ehu().

Referenced by vircam_fits_load_list(), vircam_grout(), and vircam_mask_load().

vir_fits** vircam_fits_load_list ( cpl_frameset *  f,
cpl_type  type,
int  exten 
)
Name:
vircam_fits_load_list
Purpose:
Load an input images into a vircam_fits object array
Description:
Images from an input cpl_frameset are loaded into a list of vircam_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 vircam_fits object list.
Author:
Jim Lewis, CASU

Definition at line 231 of file vircam_fits.c.

References vircam_fits_delete_list(), and vircam_fits_load().

int vircam_fits_set_error ( vir_fits *  p,
int  status 
)
Name:
vircam_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 vir_fits object
statusThe input error status
Returns:
A flag to say whether the input status was fatal.
Author:
Jim Lewis, CASU

Definition at line 627 of file vircam_fits.c.

Referenced by vircam_jmp_catalogue(), vircam_jmp_dither_images(), vircam_jmp_dither_offsets(), vircam_jmp_interleave(), and vircam_jmp_ustep_seq().

void vircam_fits_set_filename ( vir_fits *  p,
char *  fname 
)
Name:
vircam_fits_set_filename
Purpose:
Set the file name associated with a vir_fits structure
Description:
Set the file name associated with a vir_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 vir_fits object
fnameThe input file name.
Returns:
Nothing
Author:
Jim Lewis, CASU

Definition at line 683 of file vircam_fits.c.

void vircam_fits_unwrap ( vir_fits *  p)
Name:
vircam_fits_unwrap
Purpose:
Get rid of the vir_fits structure but leave the image
Description:
The input vir_fits structure is deallocated leaving the image behind
Language:
C
Parameters:
pThe input vir_fits
Author:
Jim Lewis, CASU

Definition at line 781 of file vircam_fits.c.

vir_fits* vircam_fits_wrap ( cpl_image *  im,
vir_fits *  model,
cpl_propertylist *  phu,
cpl_propertylist *  ehu 
)
Name:
vircam_fits_wrap
Purpose:
Wrap an image in a vir_fits wrapper
Description:
The input image is inserted into a vir_fits wrapper. A model vir_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 vir_fits model object
phuThe input propertylist for the extension header for the new object.
ehuThe input propertylist for the extension header for the new object.
Returns:
The new vir_fits structure.
Author:
Jim Lewis, CASU

Definition at line 725 of file vircam_fits.c.

References vircam_fits_get_ehu(), and vircam_fits_get_phu().

Referenced by vircam_jmp_dither_images(), vircam_jmp_interleave(), vircam_jmp_skycor(), vircam_mask_wrap_bpm(), vircam_pawsky_mask(), vircam_pawsky_mask_pre(), and vircam_tilesky().