Header Manipulation

Functions

int omega_compare_extname (cpl_propertylist *plist1, cpl_propertylist *plist2)
 Compare the EXTNAME value of two headers.
int omega_pfits_check_instrume (const cpl_frame *fr)
 Check if INSTRUME is WFI or OMEGA.
void omega_pfits_get_airmass (const cpl_propertylist *plist1, double *start, double *end)
 Reads the airmass keywords from the header.
const char * omega_pfits_get_arcfile (const cpl_propertylist *plist)
 Get the ARCFILE keyword value from the header.
double omega_pfits_get_cd11 (const cpl_propertylist *plist)
 Get the value of cd1_1.
double omega_pfits_get_cd12 (const cpl_propertylist *plist)
 Get the value of cd1_2.
double omega_pfits_get_cd21 (const cpl_propertylist *plist)
 Get the value of cd2_1.
double omega_pfits_get_cd22 (const cpl_propertylist *plist)
 Get the value of cd2_2.
double omega_pfits_get_cdelt2 (const cpl_propertylist *plist)
 Get the value of CDELT2.
void omega_pfits_get_chip_size (const cpl_propertylist *plist, int *xs, int *ys)
 Get the size of a CCD excluding the pre/overscan regions.
const char * omega_pfits_get_chipid (const cpl_propertylist *plist)
 Get CHIP ID from header.
void omega_pfits_get_conad (cpl_propertylist *plist, double *conad)
 Get the value of the keyword CONAD.
int omega_pfits_get_detlive (const cpl_propertylist *plist, int *detlive)
 Get the value of DET_LIVE.
double omega_pfits_get_dit (const cpl_propertylist *plist)
 Get the DIT keyword value from the header.
double omega_pfits_get_dither_offsetx (cpl_propertylist *plist)
 Read offset X keyword of DITHER header.
double omega_pfits_get_dither_offsety (cpl_propertylist *plist)
 Read offset Y keyword of DITHER header.
double omega_pfits_get_exptime (const cpl_propertylist *plist)
 Get the EXPTIME value.
const char * omega_pfits_get_extname (const cpl_propertylist *plist)
 Get the EXTNAME keyword of a header.
cpl_propertylist * omega_pfits_get_filter_info (const cpl_propertylist *main)
 Gets filter information from header.
void omega_pfits_get_gain (cpl_propertylist *plist, double *gain)
 Read the gain value from an image.
int omega_pfits_get_instrume (const cpl_propertylist *plist)
 Get the INSTRUME keyword value.
double omega_pfits_get_jitter_offset (cpl_propertylist *plist)
 Read offset keyword of JITTER header.
void omega_pfits_get_mean_airmass (const cpl_propertylist *plist, double *airm)
 Calculates the mean airmass from a FITS header.
double omega_pfits_get_mjdobs (const cpl_propertylist *plist)
 Get the MJD-OBS.
double omega_pfits_get_offset_alpha (cpl_propertylist *plist)
 Read offset ALPHA keyword of OFFSET header.
double omega_pfits_get_offset_delta (cpl_propertylist *plist)
 Read offset DELTA keyword of OFFSET header.
int omega_pfits_get_orientation (const char *chip)
 Get chip orientation based on chip name.
int omega_pfits_get_overscan (const cpl_frame *frame, int xn)
 Get the DRS keyword of the overscan method used to reduce the image.
cpl_vector * omega_pfits_get_preovscan (const cpl_propertylist *plist)
 This function gets the prescan and overscan keywords from the header.
void omega_pfits_get_readnoise (cpl_propertylist *plist, double *rn)
 Get the read noise value from a header.
const char * omega_pfits_get_templateid (const cpl_propertylist *plist)
 Get the template ID.
void omega_pfits_get_xysize (const char *chip, int *xs, int *ys)
 Get xy sizes of a chip.
int omega_pfits_update_header (cpl_propertylist *to, const cpl_propertylist *from)
 Copy all properties from one plist to another.

Detailed Description

Synopsis
These functions manipulate the FITS headers.
  #include omega_pfits.h
  #include omega_stats.h
  #include omega_utils.h

Function Documentation

int omega_compare_extname ( cpl_propertylist *  plist1,
cpl_propertylist *  plist2 
)

Compare the EXTNAME value of two headers.

Parameters:
plist1 First header
plist2 Second header
Returns:
It returns 0 if the values of both keywords are the same or -1 if they are different.

Definition at line 1109 of file omega_pfits.c.

int omega_pfits_check_instrume ( const cpl_frame *  fr  ) 

Check if INSTRUME is WFI or OMEGA.

Parameters:
fr Frame
Returns:
0 if OMEGA, 1 if WFI or -1 in case of error.

Definition at line 785 of file omega_pfits.c.

Referenced by omega_readnoise_save(), and omega_shift_refpix().

void omega_pfits_get_airmass ( const cpl_propertylist *  plist1,
double *  start,
double *  end 
)

Reads the airmass keywords from the header.

Parameters:
plist1 A propertylist with the necessary information (ESO TEL AIRM START,END)
start A pointer to the keyword ESO TEL AIRM START
end A pointer to the keyword ESO TEL AIRM END
Returns:
Nothing

It updates the already allocated pointers to the double values of the start and end airmasses

Definition at line 745 of file omega_pfits.c.

const char* omega_pfits_get_arcfile ( const cpl_propertylist *  plist  ) 

Get the ARCFILE keyword value from the header.

Prototypes of functions to access FITS header information.

Parameters:
plist property list to read from
Returns:
pointer to statically allocated character string

Definition at line 142 of file omega_pfits.c.

double omega_pfits_get_cd11 ( const cpl_propertylist *  plist  ) 

Get the value of cd1_1.

Parameters:
plist property list to read from
cd11 requested value of cd1_1
Returns:
The CD1_1 value or 0 in case of error.

Definition at line 1743 of file omega_pfits.c.

double omega_pfits_get_cd12 ( const cpl_propertylist *  plist  ) 

Get the value of cd1_2.

Parameters:
plist property list to read from
cd12 requested value of cd1_2
Returns:
The CD1_2 value or 0 in case of error.

Definition at line 1761 of file omega_pfits.c.

double omega_pfits_get_cd21 ( const cpl_propertylist *  plist  ) 

Get the value of cd2_1.

Parameters:
plist property list to read from
cd21 requested value of cd2_1
Returns:
the CD2_1 value or 0 in case of error

Definition at line 1780 of file omega_pfits.c.

double omega_pfits_get_cd22 ( const cpl_propertylist *  plist  ) 

Get the value of cd2_2.

Parameters:
plist property list to read from
cd22 requested value of cd2_2
Returns:
The CD2_2 value or 0 in case of error.

Definition at line 1799 of file omega_pfits.c.

Referenced by omega_tel_offsets().

double omega_pfits_get_cdelt2 ( const cpl_propertylist *  plist  ) 

Get the value of CDELT2.

Parameters:
plist property list to read from
cd22 requested value of cd2_2
Returns:
The CDELT2 value or 0 in case of error

Definition at line 1818 of file omega_pfits.c.

Referenced by omega_tel_offsets().

void omega_pfits_get_chip_size ( const cpl_propertylist *  plist,
int *  xs,
int *  ys 
)

Get the size of a CCD excluding the pre/overscan regions.

Parameters:
plist Property list containing keywords
x Output X size
y Output Y size
Returns:
Nothing

Definition at line 1838 of file omega_pfits.c.

References omega_pfits_get_preovscan().

const char* omega_pfits_get_chipid ( const cpl_propertylist *  plist  ) 

Get CHIP ID from header.

@ header Header to read keyword from

Returns:
string Get the CHIP ID from the header
Parameters:
plist Property list
Returns:
ID of the chip as written in header

Definition at line 1044 of file omega_pfits.c.

Referenced by omega_get_scan_coord(), and omega_photom_tbl().

void omega_pfits_get_conad ( cpl_propertylist *  plist,
double *  conad 
)

Get the value of the keyword CONAD.

Parameters:
plist Property list containing the keyword
conad Output with the CONAD value return nothing

Definition at line 995 of file omega_pfits.c.

Referenced by omega_jitter_process(), omega_match_points(), omega_mdome_combine(), and omega_mflat_combine().

int omega_pfits_get_detlive ( const cpl_propertylist *  plist,
int *  detlive 
)

Get the value of DET_LIVE.

Parameters:
plist property list to read from
detlive requested value of DET_LIVE
Return values:
0 if everything went right or -1 if there was an error

Definition at line 214 of file omega_pfits.c.

Referenced by omega_darkcurrent_combine(), omega_mbias_combine(), omega_mdome_combine(), and omega_mflat_combine().

double omega_pfits_get_dit ( const cpl_propertylist *  plist  ) 

Get the DIT keyword value from the header.

Parameters:
plist property list to read from
Returns:
The DIT value

Definition at line 154 of file omega_pfits.c.

double omega_pfits_get_dither_offsetx ( cpl_propertylist *  plist  ) 

Read offset X keyword of DITHER header.

Parameters:
plist Property list
Returns:
Value stored in keyword TEL.TARG.OFFSETSIZEX or 0 in case of error.

Definition at line 1658 of file omega_pfits.c.

Referenced by omega_tel_offsets().

double omega_pfits_get_dither_offsety ( cpl_propertylist *  plist  ) 

Read offset Y keyword of DITHER header.

Parameters:
plist Property list
Returns:
Value stored in keyword TEL.TARG.OFFSETSIZEY or 0 in case of error.

Definition at line 1679 of file omega_pfits.c.

Referenced by omega_tel_offsets().

double omega_pfits_get_exptime ( const cpl_propertylist *  plist  ) 

Get the EXPTIME value.

Parameters:
plist property list to read from
Returns:
the requested value or 0.0 otherwise

Definition at line 193 of file omega_pfits.c.

Referenced by omega_darkcurrent_combine(), omega_jitter_process(), and omega_photom_tbl().

const char* omega_pfits_get_extname ( const cpl_propertylist *  plist  ) 

Get the EXTNAME keyword of a header.

Parameters:
plist Property list to read keyword from
Returns:
EXTNAME value

Definition at line 1087 of file omega_pfits.c.

cpl_propertylist* omega_pfits_get_filter_info ( const cpl_propertylist *  main  ) 

Gets filter information from header.

Parameters:
main Main propertylist
Returns:
1 newly allocated propertylist or NULL in error case

This function gets the following information from the main aheader HIERARCH ESO INS FILT1 ID HIERARCH ESO INS FILT1 NAME

and associate these values to other information, to return a new propertylist with the following format:

const char *FILT_ID const char *FILT_NAME const char *REF_FILT_NAME float CWL int HAS_FRINGES

Definition at line 1154 of file omega_pfits.c.

Referenced by omega_match_points(), and omega_photom_tbl().

void omega_pfits_get_gain ( cpl_propertylist *  plist,
double *  gain 
)

Read the gain value from an image.

Parameters:
plist Header to read gain value from
gain Output value of the gain
Returns:
nothing

Definition at line 952 of file omega_pfits.c.

Referenced by omega_mdome_combine(), and omega_mflat_combine().

int omega_pfits_get_instrume ( const cpl_propertylist *  plist  ) 

Get the INSTRUME keyword value.

Parameters:
plist primary header
Returns:
0 if OMEGA, 1 if WFI or -1 in case of error
Note:
plist must be primary header unit

Definition at line 834 of file omega_pfits.c.

double omega_pfits_get_jitter_offset ( cpl_propertylist *  plist  ) 

Read offset keyword of JITTER header.

----------------------------------------------------------------*

Parameters:
plist Property list
Returns:
Value stored in keyword TEL.TARG.OFFSETSIZE or 0 in case of error.

Definition at line 1637 of file omega_pfits.c.

Referenced by omega_tel_offsets().

void omega_pfits_get_mean_airmass ( const cpl_propertylist *  plist,
double *  airm 
)

Calculates the mean airmass from a FITS header.

Parameters:
plist A propertylist with the necessary information (ESO TEL AIRM START,END)
airm Output pointer to the value of the mean airmass
Returns:
Nothing

It updates the pointer with the double value of the mean airmass which is calculated here.

Definition at line 697 of file omega_pfits.c.

Referenced by omega_jitter_process(), and omega_photom_tbl().

double omega_pfits_get_mjdobs ( const cpl_propertylist *  plist  ) 

Get the MJD-OBS.

Parameters:
plist property list to read from
Returns:
the requested value

Definition at line 181 of file omega_pfits.c.

double omega_pfits_get_offset_alpha ( cpl_propertylist *  plist  ) 

Read offset ALPHA keyword of OFFSET header.

Parameters:
plist Property list
Returns:
Value stored in keyword TEL.TARG.OFFSETALPHA or 0 in case of error.

Definition at line 1700 of file omega_pfits.c.

Referenced by omega_tel_offsets().

double omega_pfits_get_offset_delta ( cpl_propertylist *  plist  ) 

Read offset DELTA keyword of OFFSET header.

Parameters:
plist Property list
Returns:
Value stored in keyword TEL.TARG.OFFSETDELTA or 0 in case of error.

Definition at line 1721 of file omega_pfits.c.

Referenced by omega_tel_offsets().

int omega_pfits_get_orientation ( const char *  chip  ) 

Get chip orientation based on chip name.

Parameters:
chip Chip name
Returns:
The chip orientation

Takes the string with the chip name and returns its orientation.

Definition at line 245 of file omega_pfits.c.

Referenced by omega_get_scan_coord(), and omega_pfits_get_xysize().

int omega_pfits_get_overscan ( const cpl_frame *  frame,
int  xn 
)

Get the DRS keyword of the overscan method used to reduce the image.

Parameters:
frame Frame to get keyword from
xn FITS extension to load
Returns:
The overscan method used

Definition at line 912 of file omega_pfits.c.

Referenced by omega_fringes_flat_process(), and omega_nsky_process().

cpl_vector* omega_pfits_get_preovscan ( const cpl_propertylist *  plist  ) 

This function gets the prescan and overscan keywords from the header.

Parameters:
plist Property list containing the keywords
Returns:
cpl_vector with the keywords in the following order PRSCX, PRSCY, OVSCX, OVSCY

Definition at line 1564 of file omega_pfits.c.

Referenced by get_trim_region(), omega_get_scan_coord(), omega_get_trim_region(), and omega_pfits_get_chip_size().

void omega_pfits_get_readnoise ( cpl_propertylist *  plist,
double *  rn 
)

Get the read noise value from a header.

Parameters:
plist Header with read noise keyword
rn Output with the value of the readnoise
Returns:
nothing

Definition at line 870 of file omega_pfits.c.

Referenced by omega_mbias_combine().

const char* omega_pfits_get_templateid ( const cpl_propertylist *  plist  ) 

Get the template ID.

Parameters:
plist property list to read from
Returns:
pointer to statically allocated character string

Definition at line 169 of file omega_pfits.c.

void omega_pfits_get_xysize ( const char *  chip,
int *  xs,
int *  ys 
)

Get xy sizes of a chip.

Parameters:
chip Chip name
xs Size of x-axis
ys Size of y-axis
Returns:
Nothing

Based on the chip name, it reads the X and Y sizes of the image.

Definition at line 319 of file omega_pfits.c.

References omega_pfits_get_orientation().

int omega_pfits_update_header ( cpl_propertylist *  to,
const cpl_propertylist *  from 
)

Copy all properties from one plist to another.

Parameters:
to Property list to copy to
from Property list to copy from
Returns:
It returns 0 on success or -1 in case of error.

Definition at line 1522 of file omega_pfits.c.

Referenced by omega_jitter_process(), omega_save_image(), omega_save_table(), and omega_std_process().


Generated on 11 Mar 2013 for OMEGA Pipeline Reference Manual by  doxygen 1.6.1