|
MOONS Pipeline Reference Manual 0.13.2
|
Functions | |
| moo_ext_single * | moo_ext_single_new (moo_detector_type type, int ntas) |
| Create a new moo_ext_single. | |
| moo_ext_single * | moo_ext_single_create (const char *filename, moo_detector_type type, int ntas) |
| Create a new moo_ext_single from the given EXT filename. | |
| cpl_error_code | moo_ext_single_load (moo_ext_single *self, unsigned int level) |
| load a moo_ext_single using the level for badpixel | |
| void | moo_ext_single_delete (moo_ext_single *self) |
| Delete a moo_ext_single. | |
| void | moo_ext_single_save (const moo_ext_single *self, const char *filename, moo_detector_type type, int ntas) |
| Save a moo_ext_single to a FITS file. | |
| cpl_error_code | moo_ext_single_dump (const moo_ext_single *self, FILE *stream) |
| Dump structural information of EXT_SINGLE. | |
| hdrl_image * | moo_ext_single_get_image (moo_ext_single *self) |
| Get image of EXT_SINGLE. | |
| cpl_image * | moo_ext_single_get_data (moo_ext_single *self) |
| Get image of data. | |
| cpl_image * | moo_ext_single_get_errs (moo_ext_single *self) |
| Get image of errs. | |
| cpl_image * | moo_ext_single_get_qual (moo_ext_single *self) |
| Get image of qual. | |
| cpl_propertylist * | moo_ext_single_get_header (moo_ext_single *self) |
| Get header of ext single. | |
| cpl_error_code | moo_ext_single_set_wcs1 (moo_ext_single *self, double crpix1, double crval1, double cd1_1, const char *ctype1, const char *cunit1) |
| Set the WCS1 of the extension. | |
| cpl_error_code | moo_ext_single_free (moo_ext_single *self) |
| Free memory associate to this single EXT. | |
| cpl_error_code | moo_ext_single_sum (moo_ext_single *a, moo_ext_single *b) |
| Add two single EXT. | |
| double | moo_ext_single_compute_snr (moo_ext_single *self, int ext_idx, cpl_image *wmap, moo_spectral_format_info *sinfo, moo_sky_lines_list *skylines, double *dersnr) |
| Compute SNR for a given target. | |
This module provides functions to create, use, and destroy a moo_ext_single
Functionality include:
| double moo_ext_single_compute_snr | ( | moo_ext_single * | self, |
| int | ext_idx, | ||
| cpl_image * | wmap, | ||
| moo_spectral_format_info * | sinfo, | ||
| moo_sky_lines_list * | skylines, | ||
| double * | dersnr | ||
| ) |
Compute SNR for a given target.
| self | [EXT_SINGLE] ext_single structure |
| ext_idx | index in EXT |
| wmap | the WAVELENGTH map corresponding to detector |
| sinfo | the spectral information corresponding to detector |
| skylines | the sky lines corresponding to detector |
| dersnr | snr compute per der_snr |
Definition at line 629 of file moo_ext_single.c.
References moo_ext_single_get_image(), moo_sky_lines_list_get_free_zones(), and moo_vector_get_dersnr().
Referenced by moo_ext_compute_snr().
| moo_ext_single * moo_ext_single_create | ( | const char * | filename, |
| moo_detector_type | type, | ||
| int | ntas | ||
| ) |
Create a new moo_ext_single from the given EXT filename.
| filename | the EXT filename |
| type | the type of detector |
| ntas | the number id of spectropgraph |
The returned object must be deallocated using moo_ext_single_delete(). Possible cpl_error_code set in this function:
Definition at line 97 of file moo_ext_single.c.
References moo_detector_get_extname(), moo_ext_single_new(), and moo_pfits_get_naxis().
Referenced by moo_ext_create().
| void moo_ext_single_delete | ( | moo_ext_single * | self | ) |
Delete a moo_ext_single.
| self | moo_ext_single to delete |
If the moo_ext_single self is NULL, nothing is done and no error is set.
Definition at line 189 of file moo_ext_single.c.
Referenced by moo_ext_delete().
| cpl_error_code moo_ext_single_dump | ( | const moo_ext_single * | self, |
| FILE * | stream | ||
| ) |
Dump structural information of EXT_SINGLE.
| self | EXT_SINGLE to dump |
| stream | Output stream, accepts stdout or stderr |
Possible cpl_error_code set in this function:
Definition at line 278 of file moo_ext_single.c.
Referenced by moo_ext_dump().
| cpl_error_code moo_ext_single_free | ( | moo_ext_single * | self | ) |
Free memory associate to this single EXT.
| self | moo_single where want to free memory |
Possible cpl_error_code set in this function:
Definition at line 564 of file moo_ext_single.c.
Referenced by moo_ext_free_single().
| cpl_image * moo_ext_single_get_data | ( | moo_ext_single * | self | ) |
Get image of data.
| self | EXT_SINGLE |
Possible cpl_error_code set in this function:
Definition at line 319 of file moo_ext_single.c.
Referenced by moo_extlist_get_single_data().
| cpl_image * moo_ext_single_get_errs | ( | moo_ext_single * | self | ) |
Get image of errs.
| self | EXT_SINGLE |
Possible cpl_error_code set in this function:
Definition at line 344 of file moo_ext_single.c.
| cpl_propertylist * moo_ext_single_get_header | ( | moo_ext_single * | self | ) |
Get header of ext single.
| self | EXT_SINGLE |
Possible cpl_error_code set in this function:
Definition at line 396 of file moo_ext_single.c.
| hdrl_image * moo_ext_single_get_image | ( | moo_ext_single * | self | ) |
Get image of EXT_SINGLE.
| self | EXT_SINGLE |
Possible cpl_error_code set in this function:
Definition at line 301 of file moo_ext_single.c.
Referenced by moo_ext_single_compute_snr(), moo_ext_single_sum(), and moo_extlist_get_image().
| cpl_image * moo_ext_single_get_qual | ( | moo_ext_single * | self | ) |
Get image of qual.
| self | EXT_SINGLE |
Possible cpl_error_code set in this function:
Definition at line 368 of file moo_ext_single.c.
References moo_fits_load_extension_image().
Referenced by moo_ext_single_sum(), and moo_extlist_get_single_qual().
| cpl_error_code moo_ext_single_load | ( | moo_ext_single * | self, |
| unsigned int | level | ||
| ) |
load a moo_ext_single using the level for badpixel
| self | the EXT_SINGLE |
| level | the reference badpixel to build the image mask |
The returned object must be deallocated using moo_ext_single_delete(). Possible cpl_error_code set in this function:
Definition at line 132 of file moo_ext_single.c.
References moo_badpix_to_mask(), and moo_fits_load_extension_image().
Referenced by moo_ext_load(), and moo_ext_load_single().
| moo_ext_single * moo_ext_single_new | ( | moo_detector_type | type, |
| int | ntas | ||
| ) |
Create a new moo_ext_single.
The returned object must be deallocated using moo_ext_single_delete().
Definition at line 71 of file moo_ext_single.c.
References MOO_BADPIX_GOOD, and moo_detector_get_extname().
Referenced by moo_ext_single_create().
| void moo_ext_single_save | ( | const moo_ext_single * | self, |
| const char * | filename, | ||
| moo_detector_type | type, | ||
| int | ntas | ||
| ) |
Save a moo_ext_single to a FITS file.
| self | moo_ext_single to write to disk or NULL |
| filename | Name of the file to write |
| type | the type of detector |
| ntas | the number id of spectropgraph |
This function saves a moo_loc_single to a FITS file, using cfitsio. Only not NULL extensions are written.
Definition at line 219 of file moo_ext_single.c.
References moo_detector_get_extname(), moo_fits_write_extension_image(), moo_pfits_append_hduclass_error(), and moo_pfits_append_hduclass_quality().
Referenced by moo_ext_add_single(), and moo_ext_save().
| cpl_error_code moo_ext_single_set_wcs1 | ( | moo_ext_single * | self, |
| double | crpix1, | ||
| double | crval1, | ||
| double | cd1_1, | ||
| const char * | ctype1, | ||
| const char * | cunit1 | ||
| ) |
Set the WCS1 of the extension.
| self | single the extension |
| crpix1 | the crpix1 keyword |
| crval1 | the crval1 keyword |
| cd1_1 | the cd1_1 keyword |
| ctype1 | the ctype1 keyword |
| cunit1 | the cunit1 keyword |
the header of the extension must be preallocated before calling this function Possible cpl_error_code set in this function:
Definition at line 524 of file moo_ext_single.c.
| cpl_error_code moo_ext_single_sum | ( | moo_ext_single * | a, |
| moo_ext_single * | b | ||
| ) |
Add two single EXT.
| a | single to add |
| b | single which is add |
Possible cpl_error_code set in this function:
Definition at line 597 of file moo_ext_single.c.
References moo_ext_single_get_image(), and moo_ext_single_get_qual().
Referenced by moo_ext_sum().