High-Level Data Reduction Library 1.6.0
High-Level data reduction routines for ESO pipelines
Loading...
Searching...
No Matches
hdrl_resample.h File Reference
#include <cpl.h>
#include <hdrl_parameter.h>
Include dependency graph for hdrl_resample.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  hdrl_resample_result
 

Macros

#define HDRL_RESAMPLE_TABLE_RA   "ra" /* Right ascension column of the table*/
 
#define HDRL_RESAMPLE_TABLE_DEC   "dec" /* Declination column of the table*/
 
#define HDRL_RESAMPLE_TABLE_LAMBDA   "lambda" /* wavelength column of the table */
 
#define HDRL_RESAMPLE_TABLE_DATA   "data" /* data column of the table */
 
#define HDRL_RESAMPLE_TABLE_BPM   "bpm" /* bpm column of the table */
 
#define HDRL_RESAMPLE_TABLE_ERRORS   "errors" /* error column of the table */
 
#define HDRL_RESAMPLE_TABLE_RA_TYPE   CPL_TYPE_DOUBLE
 
#define HDRL_RESAMPLE_TABLE_DEC_TYPE   CPL_TYPE_DOUBLE
 
#define HDRL_RESAMPLE_TABLE_LAMBDA_TYPE   CPL_TYPE_DOUBLE
 
#define HDRL_RESAMPLE_TABLE_DATA_TYPE   CPL_TYPE_DOUBLE
 
#define HDRL_RESAMPLE_TABLE_BPM_TYPE   CPL_TYPE_INT
 
#define HDRL_RESAMPLE_TABLE_ERRORS_TYPE   CPL_TYPE_DOUBLE
 

Enumerations

enum  hdrl_resample_method {
  HDRL_RESAMPLE_METHOD_NEAREST = 0 , HDRL_RESAMPLE_METHOD_RENKA = 1 , HDRL_RESAMPLE_METHOD_LINEAR , HDRL_RESAMPLE_METHOD_QUADRATIC ,
  HDRL_RESAMPLE_METHOD_DRIZZLE , HDRL_RESAMPLE_METHOD_LANCZOS , HDRL_RESAMPLE_METHOD_NONE
}
 
enum  hdrl_resample_outgrid { HDRL_RESAMPLE_OUTGRID_2D , HDRL_RESAMPLE_OUTGRID_3D }
 

Functions

cpl_table * hdrl_resample_imagelist_to_table (const hdrl_imagelist *himlist, const cpl_wcs *wcs)
 Convert a hdrl imagelist into a cpl table that can be given as input to hdrl_resample_compute().
 
cpl_table * hdrl_resample_image_to_table (const hdrl_image *hima, const cpl_wcs *wcs)
 Convert a hdrl image into a cpl table that can be given as input to hdrl_resample_compute()
 
hdrl_resample_resulthdrl_resample_compute (const cpl_table *restable, hdrl_parameter *method, hdrl_parameter *outputgrid, const cpl_wcs *wcs)
 High level resampling function.
 
void hdrl_resample_result_delete (hdrl_resample_result *resdata)
 Deallocates the memory associated to a hdrl_resample_result object.
 
hdrl_parameterhdrl_resample_parameter_create_outgrid2D (const double delta_ra, const double delta_dec)
 Creates a resample_outgrid hdrl parameter object for a 2 dimensional interpolation, i.e HDRL_RESAMPLE_OUTGRID_2D. Only two values can be set by the caller. The remaining values (see hdrl_resample_parameter_create_outgrid2D_userdef() for all values) are derived from the data itself by the hdrl_resample_compute() function.
 
hdrl_parameterhdrl_resample_parameter_create_outgrid3D (const double delta_ra, const double delta_dec, const double delta_lambda)
 Creates a resample_outgrid hdrl parameter object for a 3 dimensional interpolation, i.e HDRL_RESAMPLE_OUTGRID_3D. Only three values can be set by the caller. The remaining values (see hdrl_resample_parameter_create_outgrid3D_userdef() for all values) are derived from the data itself by the hdrl_resample_compute() function.
 
hdrl_parameterhdrl_resample_parameter_create_outgrid2D_userdef (const double delta_ra, const double delta_dec, const double ra_min, const double ra_max, const double dec_min, const double dec_max, const double fieldmargin)
 Creates a resample_outgrid hdrl parameter object for a 2 dimensional interpolation, i.e HDRL_RESAMPLE_OUTGRID_2D. All values must be set by the caller (see also hdrl_resample_parameter_create_outgrid2D()) .
 
hdrl_parameterhdrl_resample_parameter_create_outgrid3D_userdef (const double delta_ra, const double delta_dec, const double delta_lambda, const double ra_min, const double ra_max, const double dec_min, const double dec_max, const double lambda_min, const double lambda_max, const double fieldmargin)
 Creates a resample_outgrid hdrl parameter object for a 3 dimensional interpolation, i.e HDRL_RESAMPLE_OUTGRID_3D. All values must be set by the caller (see also hdrl_resample_parameter_create_outgrid3D()).
 
hdrl_parameterhdrl_resample_parameter_create_renka (const int loop_distance, cpl_boolean use_errorweights, const double critical_radius)
 Creates a resample renka hdrl parameter object. The algorithm uses a modified Shepard-like distance weighting function following Renka for the interpolation.
 
hdrl_parameterhdrl_resample_parameter_create_drizzle (const int loop_distance, cpl_boolean use_errorweights, const double pix_frac_x, const double pix_frac_y, const double pix_frac_lambda)
 Creates a resample drizzle hdrl parameter object. The algorithm uses a drizzle-like distance weighting function for the interpolation.
 
hdrl_parameterhdrl_resample_parameter_create_nearest (void)
 Creates a resample nearest neighbor hdrl parameter object. The algorithm does not use any weighting functions but the nearest neighbor inside a voxel for the "interpolation". If there is no nearest neighbor inside the voxel but only outside, the voxel is marked as bad.
 
hdrl_parameterhdrl_resample_parameter_create_linear (const int loop_distance, cpl_boolean use_errorweights)
 Creates a resample linear hdrl parameter object. The algorithm uses a linear inverse distance weighting function for the interpolation.
 
hdrl_parameterhdrl_resample_parameter_create_quadratic (const int loop_distance, cpl_boolean use_errorweights)
 Creates a resample quadratic hdrl parameter object. The algorithm uses a quadratic inverse distance weighting function for the interpolation.
 
hdrl_parameterhdrl_resample_parameter_create_lanczos (const int loop_distance, cpl_boolean use_errorweights, const int kernel_size)
 Creates a resample Lanczos hdrl parameter object. The algorithm uses a restricted SINC distance weighting function for the interpolation.
 
cpl_error_code hdrl_resample_parameter_outgrid_verify (const hdrl_parameter *hp)
 verify parameters have proper values
 
cpl_error_code hdrl_resample_parameter_method_verify (const hdrl_parameter *hp)
 verify parameters have proper values
 
int hdrl_resample_parameter_outgrid_check (const hdrl_parameter *self)
 check method is of proper type
 
int hdrl_resample_parameter_method_check (const hdrl_parameter *hp)
 check method is of proper type
 

Macro Definition Documentation

◆ HDRL_RESAMPLE_TABLE_BPM

#define HDRL_RESAMPLE_TABLE_BPM   "bpm" /* bpm column of the table */

◆ HDRL_RESAMPLE_TABLE_BPM_TYPE

#define HDRL_RESAMPLE_TABLE_BPM_TYPE   CPL_TYPE_INT

◆ HDRL_RESAMPLE_TABLE_DATA

#define HDRL_RESAMPLE_TABLE_DATA   "data" /* data column of the table */

◆ HDRL_RESAMPLE_TABLE_DATA_TYPE

#define HDRL_RESAMPLE_TABLE_DATA_TYPE   CPL_TYPE_DOUBLE

◆ HDRL_RESAMPLE_TABLE_DEC

#define HDRL_RESAMPLE_TABLE_DEC   "dec" /* Declination column of the table*/

◆ HDRL_RESAMPLE_TABLE_DEC_TYPE

#define HDRL_RESAMPLE_TABLE_DEC_TYPE   CPL_TYPE_DOUBLE

◆ HDRL_RESAMPLE_TABLE_ERRORS

#define HDRL_RESAMPLE_TABLE_ERRORS   "errors" /* error column of the table */

◆ HDRL_RESAMPLE_TABLE_ERRORS_TYPE

#define HDRL_RESAMPLE_TABLE_ERRORS_TYPE   CPL_TYPE_DOUBLE

◆ HDRL_RESAMPLE_TABLE_LAMBDA

#define HDRL_RESAMPLE_TABLE_LAMBDA   "lambda" /* wavelength column of the table */

◆ HDRL_RESAMPLE_TABLE_LAMBDA_TYPE

#define HDRL_RESAMPLE_TABLE_LAMBDA_TYPE   CPL_TYPE_DOUBLE

◆ HDRL_RESAMPLE_TABLE_RA

#define HDRL_RESAMPLE_TABLE_RA   "ra" /* Right ascension column of the table*/

◆ HDRL_RESAMPLE_TABLE_RA_TYPE

#define HDRL_RESAMPLE_TABLE_RA_TYPE   CPL_TYPE_DOUBLE

Enumeration Type Documentation

◆ hdrl_resample_method

Enumerator
HDRL_RESAMPLE_METHOD_NEAREST 
HDRL_RESAMPLE_METHOD_RENKA 
HDRL_RESAMPLE_METHOD_LINEAR 
HDRL_RESAMPLE_METHOD_QUADRATIC 
HDRL_RESAMPLE_METHOD_DRIZZLE 
HDRL_RESAMPLE_METHOD_LANCZOS 
HDRL_RESAMPLE_METHOD_NONE 

◆ hdrl_resample_outgrid

Enumerator
HDRL_RESAMPLE_OUTGRID_2D 
HDRL_RESAMPLE_OUTGRID_3D