OMEGA Pipeline Reference Manual
1.0.5
|
Functions | |
FILE * | oc_paf_print_header (char *filename, char *paf_id, char *paf_desc) |
Open a new PAF file, output a default header. | |
int | omega_biascor (cpl_image *image, const cpl_image *bias) |
Subtract bias from an image. | |
int | omega_compare_reference (const cpl_image *master, const cpl_frame *refframe, int ext, cpl_stats **diffstats) |
int | omega_compare_tags (const cpl_frame *frame1, const cpl_frame *frame2) |
char * | omega_create_name (const char *instrument, const char *name, const char *suffix) |
Create a string with a name. | |
void | omega_exten_range (int inexten, int *out1, int *out2) |
void | omega_extensions (const cpl_frame *frame, int inexten, int *out1, int *out2) |
cpl_frameset * | omega_frameset_subgroup (cpl_frameset *frameset, cpl_size *labels, cpl_size nlab, const char *tag) |
int | omega_get_chip_orientation (int ext) |
Get the readout orientation of a chip based on the FITS extension number. | |
const char * | omega_get_extension_chipid (int ext) |
Get the value of CHIP ID for a given extension. | |
const char * | omega_get_license (void) |
Get the pipeline copyright and license. | |
char * | omega_get_pathname (const char *filename) |
Find the directory name in the given string. | |
char * | omega_get_root_name (const char *filename) |
Find out the root part of a basename (name without extension). | |
cpl_error_code | omega_get_wcsshift (cpl_propertylist *wcslist1, cpl_propertylist *wcslist2, double *xshift, double *yshift) |
Compute the wcs shift in x and y direction. | |
cpl_frame * | omega_product_frame (const char *filename, const char *tag, cpl_frame_type type) |
Setup a frame to save a product. | |
int | omega_save_dummy (cpl_frameset *set, cpl_parameterlist *parlist, cpl_frame_type type, cpl_type_bpp bitpix, const char *outfile, const cpl_propertylist *plist, const char *recipe, cpl_frame *product_frame) |
Save a dummy image or table in an extension. | |
int | omega_save_fits (omega_fits *scifits, cpl_frameset *set, const cpl_parameterlist *pars, const cpl_propertylist *qclist, cpl_type_bpp bpp, const char *name, const char *recipe, cpl_frame *product_frame, const cpl_frame *inherit, const int isfirst) |
Save an image which is taken from a omega_fits strucutre. | |
int | omega_save_image (const cpl_image *img, cpl_frameset *set, const cpl_parameterlist *pars, cpl_propertylist *alist, const cpl_propertylist *qclist, cpl_type_bpp bpp, const char *name, const char *recipe, cpl_frame *frame, const cpl_frame *inherit, int isfirst) |
Save an image as a DFS compliant product. | |
int | omega_save_primary (cpl_frameset *set, const cpl_parameterlist *parlist, const char *outfile, const char *recipe, const cpl_propertylist *plist, cpl_frame *product_frame, const cpl_frame *inherit) |
Save the primary header of a product. | |
int | omega_save_table (const cpl_table *tbl, cpl_frameset *set, const cpl_parameterlist *pars, cpl_propertylist *alist, const cpl_propertylist *qclist, const char *name, const char *recipe, cpl_frame *frame, const cpl_frame *inherit, int isfirst) |
Save a table as a DFS compliant product. | |
cpl_image * | omega_smooth_image (cpl_image *in, int size) |
Smooth an image using a median filter. |
FILE* oc_paf_print_header | ( | char * | filename, |
char * | paf_id, | ||
char * | paf_desc | ||
) |
Open a new PAF file, output a default header.
filename | Name of the file to create. |
paf_id | PAF identificator. |
paf_desc | PAF description. |
This function creates a new PAF file with the requested file name. If another file already exists with the same name, it will be overwritten (if the file access rights allow it).
This function returns an opened file pointer, ready to receive more data through fprintf's. The caller is responsible for fclose()ing the file.
Definition at line 106 of file omega_utils.c.
int omega_biascor | ( | cpl_image * | image, |
const cpl_image * | bias | ||
) |
Subtract bias from an image.
image | Image to subtract bias brom |
bias | Bias image |
Definition at line 737 of file omega_utils.c.
Referenced by omega_fringes_flat_process(), omega_jitter_process(), omega_nsky_process(), and omega_std_process().
int omega_compare_reference | ( | const cpl_image * | master, |
const cpl_frame * | refframe, | ||
int | ext, | ||
cpl_stats ** | diffstats | ||
) |
master | Input master image |
refframe | Reference frame |
diffstats | statistics of the difference |
Definition at line 404 of file omega_utils.c.
int omega_compare_tags | ( | const cpl_frame * | frame1, |
const cpl_frame * | frame2 | ||
) |
frame1 | The first frame |
frame2 | The second frame |
0 | if frame1 != frame2 |
1 | if frame1 == frame2 |
-1 | if either frame is missing its tag |
Definition at line 206 of file omega_utils.c.
char* omega_create_name | ( | const char * | instrument, |
const char * | name, | ||
const char * | suffix | ||
) |
Create a string with a name.
instrument | string with instrument name |
name | middle part of the output name |
suffix | suffix name or NULL in which case fits is used |
It composes a string in the following way: instrument_name.suffix
Definition at line 711 of file omega_utils.c.
void omega_exten_range | ( | int | inexten, |
int * | out1, | ||
int * | out2 | ||
) |
inexten | Input image extension from the recipe invocation |
out1 | Lower part of extension range |
out2 | Upper part of extension range |
Definition at line 305 of file omega_utils.c.
void omega_extensions | ( | const cpl_frame * | frame, |
int | inexten, | ||
int * | out1, | ||
int * | out2 | ||
) |
frame | Frame |
inexten | Input image extension from the recipe invocation |
out1 | Lower part of extension range |
out2 | Upper part of extension range |
Definition at line 348 of file omega_utils.c.
cpl_frameset* omega_frameset_subgroup | ( | cpl_frameset * | frameset, |
cpl_size * | labels, | ||
cpl_size | nlab, | ||
const char * | tag | ||
) |
frameset | The input frameset |
labels | The labels for the input frameset |
nlab | The number of labels for the input frameset |
tag | The tag for the frames in the output frameset |
Definition at line 257 of file omega_utils.c.
int omega_get_chip_orientation | ( | int | ext | ) |
Get the readout orientation of a chip based on the FITS extension number.
ext | FITS extension |
Definition at line 882 of file omega_utils.c.
Referenced by get_trim_region(), and omega_get_trim_region().
const char* omega_get_extension_chipid | ( | int | ext | ) |
Get the value of CHIP ID for a given extension.
ext | FITS extension for the particular CHIP |
Definition at line 762 of file omega_utils.c.
const char* omega_get_license | ( | void | ) |
Get the pipeline copyright and license.
The function returns a pointer to the statically allocated license string. This string should not be modified using the returned pointer.
Definition at line 67 of file omega_utils.c.
Referenced by cpl_plugin_get_info().
char* omega_get_pathname | ( | const char * | filename | ) |
Find the directory name in the given string.
filename | Full path name to scan. |
Provide a full path name and you get in return a pointer to a statically allocated string containing the name of the directory only, without trailing slash. If the input string does not contain a slash (i.e. it is not a full path), the returned string is '.', corresponding to the current working directory. Since the returned string is statically allocated, do not try to free it or modify it.
This function does not check for the existence of the path or the file.
Examples:
omega_get_pathname("/cdrom/data/image.fits") returns "/cdrom/data" omega_get_pathname("filename.fits") returns "."
Definition at line 457 of file omega_utils.c.
Referenced by omega_get_usnoa_table().
char* omega_get_root_name | ( | const char * | filename | ) |
Find out the root part of a basename (name without extension).
filename | File name to scan. |
Find out the root part of a file name, i.e. the file name without extension. Since in Unix a file name can have several dots, only a number of extensions are supported. This includes:
This function does not check for the existence of the path or the file.
Examples:
omega_get_root_name("/cdrom/filename.fits") returns "/cdrom/filename" omega_get_root_name("filename.paf") returns "filename" omega_get_root_name("filename") returns "filename" omega_get_root_name("filename.ext") returns "filename.ext"
Since the returned string is statically allocated in this module, do not try to free it or modify its contents.
Note: hacked from qfits.
Definition at line 158 of file omega_utils.c.
Referenced by omega_darkcurrent_save().
cpl_error_code omega_get_wcsshift | ( | cpl_propertylist * | wcslist1, |
cpl_propertylist * | wcslist2, | ||
double * | xshift, | ||
double * | yshift | ||
) |
Compute the wcs shift in x and y direction.
wcslist1 | Propertylist containg the wcs informations. |
wcslist2 | Propertylist containg the wcs informations. |
xshift | Pointer where the shift in x direction is written |
yshift | Pointer where the shift in y direction is written. |
Definition at line 1157 of file omega_utils.c.
Referenced by omega_std_process().
cpl_frame* omega_product_frame | ( | const char * | filename, |
const char * | tag, | ||
cpl_frame_type | type | ||
) |
Setup a frame to save a product.
filename | Name of product tag PRO CATG tag of product type Type of product (image or table) |
Definition at line 499 of file omega_utils.c.
int omega_save_dummy | ( | cpl_frameset * | set, |
cpl_parameterlist * | parlist, | ||
cpl_frame_type | type, | ||
cpl_type_bpp | bitpix, | ||
const char * | outfile, | ||
const cpl_propertylist * | plist, | ||
const char * | recipe, | ||
cpl_frame * | product_frame | ||
) |
Save a dummy image or table in an extension.
set | frameset |
parlist | Parameter list |
type | Type of product |
bitpix | BITPIX |
outfile | name of output file |
plist | extension property list |
recipe | recipe name |
product_frame | product frame |
Definition at line 533 of file omega_utils.c.
int omega_save_fits | ( | omega_fits * | scifits, |
cpl_frameset * | set, | ||
const cpl_parameterlist * | pars, | ||
const cpl_propertylist * | qclist, | ||
cpl_type_bpp | bpp, | ||
const char * | name, | ||
const char * | recipe, | ||
cpl_frame * | product_frame, | ||
const cpl_frame * | inherit, | ||
const int | isfirst | ||
) |
Save an image which is taken from a omega_fits strucutre.
scifits | omega_fits structure containing the image to save |
set | original set of frames |
pars | original parameters list |
qclist | QC property list or NULL |
bpp | CPL_TYPE_BPP to save product |
name | output name of product |
recipe | recipe name |
product_frame | output frame of product |
inherit | optional frame to inherit header from |
isfirst | Tells whether to create primary header or not |
Definition at line 1056 of file omega_utils.c.
References omega_fits_get_ehu(), omega_fits_get_image(), omega_fits_get_phu(), and omega_save_primary().
int omega_save_image | ( | const cpl_image * | img, |
cpl_frameset * | set, | ||
const cpl_parameterlist * | pars, | ||
cpl_propertylist * | alist, | ||
const cpl_propertylist * | qclist, | ||
cpl_type_bpp | bpp, | ||
const char * | name, | ||
const char * | recipe, | ||
cpl_frame * | frame, | ||
const cpl_frame * | inherit, | ||
int | isfirst | ||
) |
Save an image as a DFS compliant product.
img | Image to save |
set | Frame set |
pars | Parameters list |
alist | Optional property list |
qclist | Optional QC list |
bpp | CPL_TYPE_BPP of product |
name | Name of product |
recipe | Name of recipe |
frame | Frame describing product |
inherit | Frame to inherit header from or NULL |
isfirst | Tell whether to create a primary header or not. |
Definition at line 916 of file omega_utils.c.
References omega_pfits_update_header(), and omega_save_primary().
int omega_save_primary | ( | cpl_frameset * | set, |
const cpl_parameterlist * | parlist, | ||
const char * | outfile, | ||
const char * | recipe, | ||
const cpl_propertylist * | plist, | ||
cpl_frame * | product_frame, | ||
const cpl_frame * | inherit | ||
) |
Save the primary header of a product.
set | frameset |
parlist | Parameter list |
outfile | name of output file |
recipe | recipe name |
plist | primary header or NULL |
product_frame | product frame |
inherit | Frame to inherit header from or NULL |
Definition at line 601 of file omega_utils.c.
Referenced by omega_save_fits(), omega_save_image(), and omega_save_table().
int omega_save_table | ( | const cpl_table * | tbl, |
cpl_frameset * | set, | ||
const cpl_parameterlist * | pars, | ||
cpl_propertylist * | alist, | ||
const cpl_propertylist * | qclist, | ||
const char * | name, | ||
const char * | recipe, | ||
cpl_frame * | frame, | ||
const cpl_frame * | inherit, | ||
int | isfirst | ||
) |
Save a table as a DFS compliant product.
tbl | Table to save |
set | Set of frames |
pars | Parameters list |
alist | Optional property list |
qclist | Optional QC list |
name | Name of product |
recipe | Name of recipe |
frame | Frame describing the product |
inherit | Frame to inherit header from or NULL |
isfirst | Tell whether to create a primary header or not. |
Definition at line 987 of file omega_utils.c.
References omega_pfits_update_header(), and omega_save_primary().
cpl_image* omega_smooth_image | ( | cpl_image * | in, |
int | size | ||
) |
Smooth an image using a median filter.
in | image to be smoothed |
size | size of kernel matrix to use in filtering |
Definition at line 648 of file omega_utils.c.
Referenced by omega_jitter_process(), and omega_std_process().