Functions | |
| static int | uves_correct_badpix (cpl_image *master_bias, uves_propertylist *header, int **badmap, bool mark_bad) |
| Correct bad pixels. | |
| int | uves_correct_badpix_all (cpl_image *master_bias, uves_propertylist *mbias_header, enum uves_chip chip, int binx, int biny, int mark_bad, bool red_ccd_new) |
| Correct all bad pixels on a chip. | |
| void | uves_badmap_free (int ***badmap) |
| Deallocate bpm position. | |
| static int ** | dup_map (int badmap[][4]) |
| Copy bpm to heap. | |
| int ** | uves_get_badpix (enum uves_chip chip, int binx, int biny, int mark_bad, bool red_ccd_new) |
| Get hard-coded bpm map. | |
Correct the bad pixels in an image
| static int uves_correct_badpix | ( | cpl_image * | master_bias, | |
| uves_propertylist * | header, | |||
| int ** | badmap, | |||
| bool | mark_bad | |||
| ) | [static] |
Correct bad pixels.
| master_bias | The image to correct | |
| header | Image FITS header, | |
| badmap | Matrix of bad pixel traps. Each row is in the format (xstart, ystart, xend, yend), except the last row which must be (-1, -1, -1, -1). | |
| mark_bad | If true, the relevant pixels are not interpolated but simply marked as bad. |
The bad pixels are replaced by the average of nearest good pixels in the same column.
Definition at line 588 of file uves_corrbadpix.c.
References check, uves_msg, uves_pfits_set_badpixcorr(), and uves_tostring_cpl_type().
Referenced by uves_correct_badpix_all().
| int uves_correct_badpix_all | ( | cpl_image * | master_bias, | |
| uves_propertylist * | mbias_header, | |||
| enum uves_chip | chip, | |||
| int | binx, | |||
| int | biny, | |||
| int | mark_bad, | |||
| bool | red_ccd_new | |||
| ) |
Correct all bad pixels on a chip.
| master_bias | The image to correct | |
| mbias_header | Image FITS header, | |
| chip | CCD chip | |
| binx | x-binning | |
| biny | y-binning | |
| mark_bad | If true, the relevant pixels are not interpolated but simply marked as bad. |
The bad pixels are replaced by the average of nearest good pixels in the same column, or simply marked as bad.
The positions of bad pixels are hard-coded (as function of UVES chip).
Definition at line 159 of file uves_corrbadpix.c.
References check, uves_badmap_free(), uves_correct_badpix(), and uves_get_badpix().
Referenced by test_bad_corr(), and uves_reduce_scired().
| void uves_badmap_free | ( | int *** | badmap | ) |
Deallocate bpm position.
| badmap | to deallocate (pointer to 2d array) |
Definition at line 187 of file uves_corrbadpix.c.
Referenced by test_bad_corr(), and uves_correct_badpix_all().
| static int** dup_map | ( | int | badmap[][4] | ) | [static] |
Copy bpm to heap.
| badmap | to copy |
Definition at line 216 of file uves_corrbadpix.c.
Referenced by uves_get_badpix().
| int** uves_get_badpix | ( | enum uves_chip | chip, | |
| int | binx, | |||
| int | biny, | |||
| int | mark_bad, | |||
| bool | red_ccd_new | |||
| ) |
Get hard-coded bpm map.
| chip | UVES CCD chip | |
| binx | x binning | |
| biny | y binning | |
| mark_bad | a strange parameter, if true, a few more regions are marked as bad (for compatibility with MIDAS) |
The array is terminated with a row of -1
Definition at line 259 of file uves_corrbadpix.c.
References dup_map().
Referenced by test_bad_corr(), and uves_correct_badpix_all().
1.6.1