GRAVI Pipeline Reference Manual 1.9.3
Loading...
Searching...
No Matches
Macros | Functions | Variables
gravi_acqcam.c File Reference
#include <cpl.h>
#include <string.h>
#include <stdio.h>
#include <math.h>
#include <time.h>
#include <hdrl_strehl.h>
#include "gravi_dfs.h"
#include "gravi_data.h"
#include "gravi_pfits.h"
#include "gravi_cpl.h"
#include "gravi_utils.h"
#include "gravi_acqcam.h"

Go to the source code of this file.

Macros

#define GRAVI_SPOT_NTEL   4
 
#define GRAVI_SPOT_NLENS   4
 
#define GRAVI_SPOT_NSPOT   4
 
#define GRAVI_SPOT_NFOCUS   21
 
#define GRAVI_SPOT_NSEARCH   45
 
#define GRAVI_SPOT_SWINDOW   28
 
#define GRAVI_SPOT_NA   30
 
#define GRAVI_SPOT_SUB   0
 
#define GRAVI_SPOT_ANGLE   8
 
#define GRAVI_SPOT_SCALE   9
 
#define GRAVI_SPOT_DIODE   10
 
#define GRAVI_SPOT_FWHM   13
 
#define GRAVI_SPOT_FLUX   14
 
#define GRAVI_ACQ_PUP_FLUX   1e6
 
#define CHECK_BIT(var, pos)   ((var) & (1<<(pos)))
 

Functions

double exp1 (double x)
 
double sin1 (double x)
 
int gravi_acqcam_xy_diode (const double v[], double *xd, double *yd)
 
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)
 
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.
 
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.
 
cpl_error_code gravi_acq_measure_strehl (cpl_image *img, double x, double y, double pscale, double *SR, cpl_propertylist *header)
 measure Strehl Ratio of the source at the given location
 
cpl_error_code gravi_acq_measure_max (cpl_image *img, double x, double y, double size, double *img_max)
 
cpl_error_code gravi_image_fft_correlate (cpl_image *ia, cpl_image *ib, cpl_size *xd, cpl_size *yd)
 Correlate two images using FFT.
 
cpl_error_code gravi_acqcam_pupil_v2 (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 V2.0.
 
cpl_error_code gravi_acqcam_clean_pupil_v2 (cpl_imagelist *acqcam_imglist, cpl_imagelist *pupilImage_filtered, const cpl_size ury)
 Cleaning pupil images by cross-correlation with gaussian function.
 
cpl_error_code gravi_acqcam_select_good_frames_v2 (cpl_imagelist *pupilImage_filtered, cpl_imagelist *pupilImage_onFrames, cpl_array *good_frames)
 select pupil frames with pupil beacon on. Clean pupil frames by substraction of images with pupil beacon off.
 
cpl_error_code gravi_acqcam_get_pup_ref_v2 (cpl_propertylist *header, cpl_bivector *diode_pos_subwindow)
 Get the reference pixels for the pupil guiding on the acquisition camera.
 
cpl_error_code gravi_acqcam_get_diode_ref_v2 (cpl_propertylist *header, cpl_array *good_frames, cpl_vector *scale_vector, cpl_bivector **diode_pos_telescope, int nrow_on)
 Get the position of the telescope diodes in pixels.
 
cpl_error_code gravi_acqcam_get_diode_theoretical_v2 (cpl_bivector *diode_pos_subwindow, cpl_bivector **diode_pos_telescope, cpl_bivector **diode_pos_theoretical, cpl_size nrow_on, int ury)
 Get the position of the telescope diodes in pixels.
 
cpl_error_code gravi_acqcam_spot_imprint_v2 (cpl_image *mean_img, cpl_bivector **diode_pos_offset, cpl_bivector **diode_pos_theoretical, int ury)
 imprint zeros at the postion of the detected pupil spots
 
cpl_error_code gravi_acqcam_perform_shiftandadd_v2 (cpl_imagelist *pupilImage_onFrames, cpl_imagelist **pupilImage_shiftandadd, cpl_array *good_frames, cpl_vector *focus_value, cpl_bivector **diode_pos_theoretical, cpl_bivector **diode_pos_offset, cpl_size nrow_on)
 perform shift and add of the pupil image according to the theoretical positions
 
cpl_error_code gravi_acqcam_get_pupil_offset_v2 (cpl_imagelist **pupilImage_shiftandadd, cpl_array *bad_frames_short, cpl_bivector **diode_pos_offset, cpl_propertylist *o_header, cpl_size nrow_on)
 on the images shift and added, find maximum and perform gaussian fit
 
cpl_error_code gravi_acqcam_set_pupil_table_v2 (cpl_table *acqcam_table, cpl_propertylist *header, cpl_propertylist *o_header, cpl_array *good_frames, cpl_vector *scale_vector, cpl_array *bad_frames_short, cpl_bivector **diode_pos_offset, cpl_vector *focus_value, gravi_data *static_param_data)
 store the pupil offset in the table, and create QC parameters.
 
cpl_image * gravi_image_extract (cpl_image *image_in, cpl_size llx, cpl_size lly, cpl_size urx, cpl_size ury)
 extract sub window of image (similar to cpl_image_extract)
 
double gravi_acqcam_defocus_scaling (int focus)
 gives focus value as in a list of value
 
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.
 
cpl_error_code gravi_reduce_acqcam (gravi_data *output_data, gravi_data *input_data, gravi_data *sky_data, gravi_data *dark_data, gravi_data *static_param_data)
 Reduce the ACQ camera images.
 

Variables

const int * GRAVI_LVMQ_FREE = NULL