|
MOONS Pipeline Reference Manual 0.13.1
|
Functions | |
| moo_single * | moo_single_new (moo_detector_type type, int ntas) |
| Create a new moo_single. | |
| moo_single * | moo_single_create (const char *filename, moo_detector_type type, int ntas) |
| Create a new moo_single from the given filename. | |
| cpl_error_code | moo_single_load (moo_single *self, unsigned int level) |
| Load data in a single structure. | |
| void | moo_single_delete (moo_single *self) |
| Delete a moo_single. | |
| cpl_image * | moo_single_get_data (moo_single *self) |
| Get the DATA part of single DET. | |
| cpl_image * | moo_single_get_err (moo_single *self) |
| Get the ERROR part of single DET. | |
| cpl_error_code | moo_single_apply_mask (moo_single *self, cpl_mask *mask, unsigned int level) |
| Apply the given mask on the QUAL part. | |
| cpl_image * | moo_single_get_qual (moo_single *self) |
| Get the QUAL part of single DET. | |
| hdrl_image * | moo_single_get_image (moo_single *self) |
| Get the IMAGE part (DATA,ERR) of single DET. | |
| cpl_error_code | moo_single_free (moo_single *self) |
| Free memory associate to this single DET. | |
| void | moo_single_save (moo_single *self, const char *filename, moo_detector_type type, int ntas) |
| Save a moo_single to a FITS file. | |
| cpl_error_code | moo_single_dump (const moo_single *self, FILE *stream) |
| Dump structural information of a Single DET. | |
| cpl_error_code | moo_single_sub (moo_single *a, moo_single *b) |
| Subtract two single DET. | |
| cpl_error_code | moo_single_divide (moo_single *a, moo_single *b) |
| Divide two single DET. | |
| cpl_error_code | moo_single_multiply_scalar (moo_single *a, double scalar) |
| Elementwise multiplication of a single with a scalar. | |
| cpl_error_code | moo_single_sum (moo_single *a, moo_single *b) |
| Add two single DET. | |
| cpl_error_code | moo_single_mean (moo_single *a, moo_single *b) |
| Mean of two single DET. | |
| cpl_error_code | moo_single_filter_snr (moo_single *self, double min_snr) |
| Flag low snr pixels from single DET structure. | |
This module provides functions to create, use, and destroy a moo_single
Functionality include:
| cpl_error_code moo_single_apply_mask | ( | moo_single * | self, |
| cpl_mask * | mask, | ||
| unsigned int | level | ||
| ) |
Apply the given mask on the QUAL part.
| self | moo_single to read from |
| mask | the given mask |
| level | the bad pixel level |
Possible cpl_error_code set in this function:
Definition at line 287 of file moo_single.c.
References moo_mask_to_badpix(), and moo_single_get_qual().
Referenced by moo_single_compute_noise_map().
| moo_single * moo_single_create | ( | const char * | filename, |
| moo_detector_type | type, | ||
| int | ntas | ||
| ) |
Create a new moo_single from the given filename.
| filename | name of DET file |
| type | the type of detector |
| ntas | number of spectrograph [1,2] |
If the filename doesnt have the extension name a NULL object is returned. The returned object must be deallocated using moo_single_delete().
Possible cpl_error_code set in this function:
Definition at line 105 of file moo_single.c.
References moo_detector_get_extname(), moo_pfits_get_naxis(), and moo_single_new().
Referenced by moo_det_create().
| void moo_single_delete | ( | moo_single * | self | ) |
Delete a moo_single.
| self | moo_single to delete |
If the moo_single self is NULL, nothing is done and no error is set.
Definition at line 211 of file moo_single.c.
Referenced by moo_det_delete().
| cpl_error_code moo_single_divide | ( | moo_single * | a, |
| moo_single * | b | ||
| ) |
Divide two single DET.
| a | single to divide |
| b | single which is divide |
Possible cpl_error_code set in this function:
Definition at line 532 of file moo_single.c.
References moo_single_get_image(), and moo_single_get_qual().
Referenced by moo_det_divide().
| cpl_error_code moo_single_dump | ( | const moo_single * | self, |
| FILE * | stream | ||
| ) |
Dump structural information of a Single DET.
| self | single to dump |
| stream | Output stream, accepts stdout or stderr |
Possible cpl_error_code set in this function:
Definition at line 460 of file moo_single.c.
Referenced by moo_det_dump().
| cpl_error_code moo_single_filter_snr | ( | moo_single * | self, |
| double | min_snr | ||
| ) |
Flag low snr pixels from single DET structure.
| self | single where to flag min_snr pixels |
| min_snr | second single to mean |
Possible cpl_error_code set in this function:
Definition at line 652 of file moo_single.c.
References MOO_BADPIX_LOW_QE, moo_mask_to_badpix(), moo_single_get_image(), and moo_single_get_qual().
Referenced by moo_det_filter_snr().
| cpl_error_code moo_single_free | ( | moo_single * | self | ) |
Free memory associate to this single DET.
| self | moo_single where want to free memory |
Possible cpl_error_code set in this function:
Definition at line 349 of file moo_single.c.
Referenced by moo_det_free_single().
| cpl_image * moo_single_get_data | ( | moo_single * | self | ) |
Get the DATA part of single DET.
| self | moo_single to read from |
Possible cpl_error_code set in this function:
Definition at line 239 of file moo_single.c.
Referenced by moo_detlist_get_single_data(), and moo_single_compute_noise_map().
| cpl_image * moo_single_get_err | ( | moo_single * | self | ) |
Get the ERROR part of single DET.
| self | moo_single to read from |
Possible cpl_error_code set in this function:
Definition at line 262 of file moo_single.c.
References moo_fits_load_extension_image().
| hdrl_image * moo_single_get_image | ( | moo_single * | self | ) |
Get the IMAGE part (DATA,ERR) of single DET.
| self | moo_single to read from |
Possible cpl_error_code set in this function:
Definition at line 330 of file moo_single.c.
Referenced by moo_correct_bias(), moo_correct_dark(), moo_detlist_get_image(), moo_single_divide(), moo_single_filter_snr(), moo_single_mean(), moo_single_multiply_scalar(), moo_single_sub(), and moo_single_sum().
| cpl_image * moo_single_get_qual | ( | moo_single * | self | ) |
Get the QUAL part of single DET.
| self | moo_single to read from |
Possible cpl_error_code set in this function:
Definition at line 312 of file moo_single.c.
Referenced by moo_correct_bias(), moo_detlist_get_single_qual(), moo_single_apply_mask(), moo_single_divide(), moo_single_filter_snr(), moo_single_mean(), moo_single_sub(), and moo_single_sum().
| cpl_error_code moo_single_load | ( | moo_single * | self, |
| unsigned int | level | ||
| ) |
Load data in a single structure.
| self | the SINGLE to load |
| level | the bad pixel level |
If the filename doesnt have the extension name a NULL object is returned. The returned object must be deallocated using moo_detlist_delete().
Possible cpl_error_code set in this function:
Definition at line 152 of file moo_single.c.
References moo_badpix_to_mask(), moo_detector_get_qual_extname(), and moo_fits_load_extension_image().
Referenced by moo_det_load_h(), moo_det_load_ri(), moo_det_load_single(), moo_det_load_yj(), moo_masterbias(), and moo_masterdark().
| cpl_error_code moo_single_mean | ( | moo_single * | a, |
| moo_single * | b | ||
| ) |
Mean of two single DET.
| a | first single to mean wich contanins the result of the operation |
| b | second single to mean |
Possible cpl_error_code set in this function:
Definition at line 618 of file moo_single.c.
References moo_single_get_image(), and moo_single_get_qual().
Referenced by moo_det_mean().
| cpl_error_code moo_single_multiply_scalar | ( | moo_single * | a, |
| double | scalar | ||
| ) |
Elementwise multiplication of a single with a scalar.
| a | single to be modified |
| scalar | Number to multiply with |
Possible cpl_error_code set in this function:
Definition at line 562 of file moo_single.c.
References moo_single_get_image().
Referenced by moo_det_rescale_using_exptime().
| moo_single * moo_single_new | ( | moo_detector_type | type, |
| int | ntas | ||
| ) |
Create a new moo_single.
| type | the type of detector |
| ntas | number of spectrograph [1,2] |
The returned object must be deallocated using moo_single_delete().
Error code:
Definition at line 73 of file moo_single.c.
References MOO_BADPIX_GOOD, and moo_detector_get_extname().
Referenced by moo_single_create().
| void moo_single_save | ( | moo_single * | self, |
| const char * | filename, | ||
| moo_detector_type | type, | ||
| int | ntas | ||
| ) |
Save a moo_single to a FITS file.
| self | moo_single to write to disk or NULL |
| filename | Name of the file to write |
| type | the detector type (RI, YJ, H) |
| ntas | the number id of spectrograph |
This function saves a moo_det to a FITS file, using cfitsio. Only not NULL extensions are written.
Definition at line 384 of file moo_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_det_save().
| cpl_error_code moo_single_sub | ( | moo_single * | a, |
| moo_single * | b | ||
| ) |
Subtract two single DET.
| a | single to subtract |
| b | single which is subtract |
Possible cpl_error_code set in this function:
Definition at line 502 of file moo_single.c.
References moo_single_get_image(), and moo_single_get_qual().
Referenced by moo_correct_dark(), and moo_det_subtract().
| cpl_error_code moo_single_sum | ( | moo_single * | a, |
| moo_single * | b | ||
| ) |
Add two single DET.
| a | single to add |
| b | single which is add |
Possible cpl_error_code set in this function:
Definition at line 588 of file moo_single.c.
References moo_single_get_image(), and moo_single_get_qual().
Referenced by moo_det_sum().