|
GRAVI Pipeline Reference Manual
1.2.3
|
Functions | |
| cpl_error_code | gravi_acqcam_get_pup_ref (cpl_propertylist *header, cpl_size tel, cpl_vector *output) |
| Re-arrange the sub-aperture position into the output vector. More... | |
| cpl_error_code | gravi_acqcam_get_diode_ref (cpl_propertylist *header, cpl_size tel, cpl_vector *output) |
| Read the diode position from header into the vector output. More... | |
| cpl_error_code | gravi_acqcam_spot_imprint (cpl_image *img, cpl_vector *a) |
| Imprint a cross (pixel=0) in the image of the pupil spot. More... | |
| cpl_error_code | gravi_acqcam_fit_spot (cpl_image *img, cpl_size ntry, cpl_vector *a, int fitAll, int *nspot) |
| Fit a pupil spot pattern into an image. More... | |
| double | gravi_acqcam_z2meter (double PositionPixels, gravi_data *static_param_data) |
| Convert z_shift from [pixel] to [meters] Formula extracted from gvacqPupilTracker.c. | |
| cpl_error_code | gravi_acqcam_pupil (cpl_image *mean_img, cpl_imagelist *acqcam_imglist, cpl_propertylist *header, cpl_table *acqcam_table, cpl_propertylist *o_header, gravi_data *static_param_data) |
| Reduce the images of pupil from ACQ. More... | |
| cpl_error_code | gravi_acqcam_field (cpl_image *mean_img, cpl_imagelist *acqcam_imglist, cpl_propertylist *header, cpl_table *acqcam_table, cpl_propertylist *o_header, gravi_data *static_param_data) |
| Reduce the images of field from ACQ. More... | |
| cpl_error_code | gravi_acq_fit_gaussian (cpl_image *img, double *x, double *y, double *ex, double *ey, cpl_size size) |
| Fit a Gaussian into an image, and mark the position. More... | |
| cpl_error_code | gravi_preproc_acqcam (gravi_data *output_data, gravi_data *input_data, gravi_data *bad_map) |
| Preprocess the ACQ images: correct bad pixels, clean from pupil background via blinking, filter median bias. More... | |
| cpl_error_code | gravi_reduce_acqcam (gravi_data *output_data, gravi_data *input_data, gravi_data *static_param_data) |
| Reduce the ACQ camera images. More... | |
This module process the data of the acquisition camera. The main function called by the recipe gravity_vis is gravi_reduce_acqcam(). Two kind of acquisition camera images are reduced as described in section Algorithms/Processing ACQ :
gravi_acqcam_field() gravi_acqcam_pupil() | cpl_error_code gravi_acq_fit_gaussian | ( | cpl_image * | img, |
| double * | x, | ||
| double * | y, | ||
| double * | ex, | ||
| double * | ey, | ||
| cpl_size | size | ||
| ) |
Fit a Gaussian into an image, and mark the position.
| img | input image |
| x,y | input/output position (guess and best fit) |
| ex,ey | output uncertainties on x and y |
| size | size of box to consider |
| CPL_ERROR_NULL_INPUT | input data is missing |
The function use cpl_fit_image_gaussian to fit a Gaussian into the image The best-fit position is then fill with 0 in the image.
Definition at line 925 of file gravi_acqcam.c.
Referenced by gravi_acqcam_field().
| cpl_error_code gravi_acqcam_field | ( | cpl_image * | mean_img, |
| cpl_imagelist * | acqcam_imglist, | ||
| cpl_propertylist * | header, | ||
| cpl_table * | acqcam_table, | ||
| cpl_propertylist * | o_header, | ||
| gravi_data * | static_param_data | ||
| ) |
Reduce the images of field from ACQ.
| mean_img | input mean image |
| acqcam_imglist | input image list |
| header | input header |
| acqcam_table | output table |
| o_header | output header |
| CPL_ERROR_NULL_INPUT | input data is missing |
| CPL_ERROR_ILLEGAL_INPUT | Cannot find the data of the expected telescope |
The routine analyse the field from ACQ and create QC parameters in the header, as well as columns in the acqcam_table.
Definition at line 1234 of file gravi_acqcam.c.
References gravi_acq_fit_gaussian(), gravi_data_get_plist(), and gravi_data_get_table().
Referenced by gravi_reduce_acqcam().
| cpl_error_code gravi_acqcam_fit_spot | ( | cpl_image * | img, |
| cpl_size | ntry, | ||
| cpl_vector * | a, | ||
| int | fitAll, | ||
| int * | nspot | ||
| ) |
Fit a pupil spot pattern into an image.
| img | input image |
| ntry | number of random starting point |
| a | vector of parameter, modified in-place |
| fitAll | if set to 1, the high order of sub-aperture position (more than center and focus), the diode scaling, and the diode intensities are let free. |
| nspot | is filled with the number of detected spots. |
Fit a pupil spot pattern into an image. The global minimum is found first with a fit with a large capture range in the whole image (after a 5x5 binning to minimize the computation time). The number of random starting point is given by the ntry parameter. If ntry==1, the starting is kept unmodified. Then 10x10 pixels around each expected spot are extracted and fit with true Gaussian (free FWHM and amplitude).
Definition at line 631 of file gravi_acqcam.c.
References gravi_image_get_noise_window().
Referenced by gravi_acqcam_pupil().
| cpl_error_code gravi_acqcam_get_diode_ref | ( | cpl_propertylist * | header, |
| cpl_size | tel, | ||
| cpl_vector * | output | ||
| ) |
Read the diode position from header into the vector output.
| header | input header |
| tel | requested beam (0..3) |
| output | output vector, shall be already allocated |
| CPL_ERROR_NULL_INPUT | input data is missing |
| CPL_ERROR_ILLEGAL_INPUT | tel outside limits |
Read the diode position from header into the vector output. Assume the four diodes form a rectangle centered on the pupil center.
Definition at line 488 of file gravi_acqcam.c.
Referenced by gravi_acqcam_pupil().
| cpl_error_code gravi_acqcam_get_pup_ref | ( | cpl_propertylist * | header, |
| cpl_size | tel, | ||
| cpl_vector * | output | ||
| ) |
Re-arrange the sub-aperture position into the output vector.
| header | input header |
| tel | requested beam (0..3) |
| output | output vector, shall be already allocated |
| CPL_ERROR_NULL_INPUT | input data is missing |
| CPL_ERROR_ILLEGAL_INPUT | tel outside limits |
Read the sub-aperture position for the pupil sensor, and re-arrange them into the output vector
Definition at line 550 of file gravi_acqcam.c.
Referenced by gravi_acqcam_pupil().
| cpl_error_code gravi_acqcam_pupil | ( | cpl_image * | mean_img, |
| cpl_imagelist * | acqcam_imglist, | ||
| cpl_propertylist * | header, | ||
| cpl_table * | acqcam_table, | ||
| cpl_propertylist * | o_header, | ||
| gravi_data * | static_param_data | ||
| ) |
Reduce the images of pupil from ACQ.
| mean_img | input mean image |
| acqcam_imglist | input image list |
| header | input header |
| acqcam_table | output table |
| o_header | output header |
| CPL_ERROR_NULL_INPUT | input data is missing |
The routine analyse the pupil from ACQ and create QC parameters in the header, as well as columns in the acqcam_table.
Definition at line 1020 of file gravi_acqcam.c.
References gravi_acqcam_fit_spot(), gravi_acqcam_get_diode_ref(), gravi_acqcam_get_pup_ref(), gravi_acqcam_spot_imprint(), and gravi_acqcam_z2meter().
Referenced by gravi_reduce_acqcam().
| cpl_error_code gravi_acqcam_spot_imprint | ( | cpl_image * | img, |
| cpl_vector * | a | ||
| ) |
Imprint a cross (pixel=0) in the image of the pupil spot.
| img | input/output img |
| a | paramters for spot position |
Definition at line 433 of file gravi_acqcam.c.
Referenced by gravi_acqcam_pupil().
| cpl_error_code gravi_preproc_acqcam | ( | gravi_data * | output_data, |
| gravi_data * | input_data, | ||
| gravi_data * | bad_map | ||
| ) |
Preprocess the ACQ images: correct bad pixels, clean from pupil background via blinking, filter median bias.
| output_data | the output gravi_data where the cleaned imagelist will be saved as IMAGING_DATA_ACQ. |
| input_data | the input gravi_data with the raw imagelist |
| bad_map | the gravi_data containing the bad pixel map for ACQ (in extension IMAGING_DATA_ACQ). |
| CPL_ERROR_NULL_INPUT | input data is missing |
Definition at line 154 of file gravi_acqcam.c.
References gravi_data_add_cube(), gravi_data_get_cube(), and gravi_data_has_extension().
| cpl_error_code gravi_reduce_acqcam | ( | gravi_data * | output_data, |
| gravi_data * | input_data, | ||
| gravi_data * | static_param_data | ||
| ) |
Reduce the ACQ camera images.
| output_data | The output gravi_data where the OI_VIS_ACQ table will be created, with ndit * ntel rows. |
| input_data | The input gravi_data here the ACQ imagelist is read. |
| CPL_ERROR_NULL_INPUT | input data is missing |
The routine process the PUPIL sensor. It creates a table with the columns PUPIL_NSPOT (number of detected spots), PUPIL_R (rotation angle) of telescope diode, PUPIL_X, PUPIL_Y, PUPIL_Z (shifts in [m]) (gravi_acqcam_pupil). The routine process also the FIELD sensor. It creates a table with the position of the FT and SC target, the fiber shift DX, DY, SCALE and the STREHL (gravi_acqcam_field). The TIME in [us] is also stored.
Definition at line 1836 of file gravi_acqcam.c.
References gravi_acqcam_field(), gravi_acqcam_pupil(), gravi_data_add_img(), gravi_data_add_table(), gravi_data_get_cube(), gravi_data_has_extension(), and gravi_pfits_get_time_acqcam().
1.8.11