HAWKI Pipeline Reference Manual 1.8.6
Functions
Compute several statistics on images

Functions

int hawki_bkg_fill_assoc (cpl_frameset *objframes, cpl_propertylist *proplist)
 Fill a propertylist with the association between objects and bkg.
int hawki_bkg_from_objects_median (const cpl_frameset *objframes, cpl_imagelist *bkg)
 Computes the median of the object frames.
int hawki_bkg_from_running_mean_detector (cpl_imagelist *objimages, const cpl_vector *medians, int i_target, int half_width, int rejlow, int rejhigh, cpl_image *bkg)
 Computes the running mean for a set of object images using their masks.
int hawki_bkg_from_sky_median (const cpl_frameset *skyframes, cpl_imagelist *bkg)
 Computes the median of the sky frames.
double hawki_image_float_get_sigma_from_quartile (cpl_image *image)
 Get a robust estimation of the sigma based on the quartiles.
int hawki_image_stats_fill_from_frame (cpl_table **image_stats, const cpl_frame *frame, int irow)
 Fills a table with the statistics of the four detectors of a frame.
int hawki_image_stats_fill_from_image (cpl_table **image_stats, const cpl_image *image, int llx, int lly, int urx, int ury, int idet, int irow)
 Fills a table with the statistics of an image.
int hawki_image_stats_initialize (cpl_table **raw_stats)
 Initialize the table with all the statistics columns.
int hawki_image_stats_stats (cpl_table **image_stats, cpl_propertylist **stats_stats)
 Make the statistics (over image serie) of the each image statistics.

Function Documentation

int hawki_bkg_fill_assoc ( cpl_frameset *  objframes,
cpl_propertylist *  proplist 
)

Fill a propertylist with the association between objects and bkg.

Parameters:
objframesThe objframes associated to the background
proplistThe list of keywords to store the association information to
Returns:
0 if everything is ok, -1 otherwise

This function takes as an input a set of object frames. For EACH input object frames it creates in the given propertylist a keyword "pointing" to the ARCFILE of that frame. This propertylist can later be stored in the background image to establish the association between this background and the object frames.

Definition at line 68 of file hawki_bkg.c.

References hawki_pfits_get_arcfile().

int hawki_bkg_from_objects_median ( const cpl_frameset *  objframes,
cpl_imagelist *  bkg 
)

Computes the median of the object frames.

Parameters:
objframesThe objframes to get the background from
bkgThe background image
proplistThe list of keywords to store the association information to
Returns:
0 if everything is ok, -1 otherwise

This function takes as an input a set of object frames and computes the background using a median of these frames.

Definition at line 109 of file hawki_bkg.c.

References hawki_load_detector().

int hawki_bkg_from_running_mean_detector ( cpl_imagelist *  objimages,
const cpl_vector *  medians,
int  i_target,
int  half_width,
int  rejlow,
int  rejhigh,
cpl_image *  bkg 
)

Computes the running mean for a set of object images using their masks.

Parameters:
objimagesThe serie of object images
mediansA vector with the medians of each image
bkgThe background image (OUT)
proplistThe list of keywords to store the association information to
Returns:
0 if everything is ok, -1 otherwise

This function takes as an input a set of sky frames and computes the background using a median of these frames. The bad pixels from the bpm masks are taking into account. It also sets the association between the object images and the final background produced (calling hawki_bkg_fill_assoc).

Definition at line 231 of file hawki_bkg.c.

int hawki_bkg_from_sky_median ( const cpl_frameset *  skyframes,
cpl_imagelist *  bkg 
)

Computes the median of the sky frames.

Parameters:
skyframesThe skyframes to get the background from
objframesThe objframes to which the association is made
bkgThe background image
proplistThe list of keywords to store the association information to
Returns:
0 if everything is ok, -1 otherwise

This function takes as an input a set of sky frames and computes the background using a median of these frames.

Definition at line 170 of file hawki_bkg.c.

References hawki_load_detector().

double hawki_image_float_get_sigma_from_quartile ( cpl_image *  image)

Get a robust estimation of the sigma based on the quartiles.

Parameters:
imageThe image where to compute the statistic
Returns:
The sigma

Definition at line 582 of file hawki_image_stats.c.

int hawki_image_stats_fill_from_frame ( cpl_table **  image_stats,
const cpl_frame *  frame,
int  irow 
)

Fills a table with the statistics of the four detectors of a frame.

Parameters:
image_statsTable to fill with the statistics
frameThe target frame
llxLower left x position (FITS convention)
llyLower left y position (FITS convention)
urxUpper right x position (FITS convention)
uryUpper right y position (FITS convention)
irowThe row in the table to store the stats (begin in 0)
Returns:
0 if everything is ok, -1 otherwise

This function takes the rectangle of the image given by llx, lly, urx, ury and computes the image statistics. This statistics are stored in the four tables image_stats, one for each detector, using the columns MINIMUM, MAXIMUM, MEDIAN, MEAN, RMS, USED. The USED column is set to 1. The table must have already these columns (call hawki_image_stats_initialize before) The statistics are stored in the row irow.

Definition at line 430 of file hawki_image_stats.c.

References hawki_image_stats_fill_from_image(), and hawki_load_frame().

int hawki_image_stats_fill_from_image ( cpl_table **  image_stats,
const cpl_image *  image,
int  llx,
int  lly,
int  urx,
int  ury,
int  idet,
int  irow 
)

Fills a table with the statistics of an image.

Parameters:
image_statsTable to fill with the statistics
imageThe target image
llxLower left x position (FITS convention)
llyLower left y position (FITS convention)
urxUpper right x position (FITS convention)
uryUpper right y position (FITS convention)
idetThe id of the table to store the data in (0 to HAWKI_NB_DETECTORS)
irowThe row in the table to store the stats (begins in 0)
Returns:
0 if everything is ok, -1 otherwise

This function takes the rectangle of the image given by llx, lly, urx, ury and computes the image statistics. This statistics are stored in the table image_stats, using the columns MINIMUM, MAXIMUM, MEDIAN, MEAN, RMS, USED. The USED column is set to 1. The table must have already these columns (call hawki_image_stats_initialize before) The table used to store the data is image_stats[idet], in the row irow.

Definition at line 137 of file hawki_image_stats.c.

Referenced by hawki_image_stats_fill_from_frame().

int hawki_image_stats_initialize ( cpl_table **  raw_stats)

Initialize the table with all the statistics columns.

Parameters:
image_statsTable to fill with the statistics
Returns:
0 if everything is ok, -1 otherwise

This function creates the following columns in the given table: MINIMUM, MAXIMUM, MEDIAN, MEAN, RMS, USED

Definition at line 70 of file hawki_image_stats.c.

int hawki_image_stats_stats ( cpl_table **  image_stats,
cpl_propertylist **  stats_stats 
)

Make the statistics (over image serie) of the each image statistics.

Parameters:
stats_statsProperty list where to store the statistics
Returns:
0 if everything is ok, -1 otherwise

This function computes the mean, median, minimum, maximum and stdev of each of the columns found in the image_stats table.

Definition at line 512 of file hawki_image_stats.c.