X-shooter Pipeline Reference Manual 3.8.15
Macros
xsh_detmon.c File Reference
#include <complex.h>
#include <math.h>
#include <string.h>
#include <assert.h>
#include <float.h>
#include <cpl.h>
#include "xsh_detmon.h"
#include "xsh_ksigma_clip.h"
#include "irplib_utils.h"

Go to the source code of this file.

Macros

#define pdist(x1, y1, x2, y2)   (((x1-x2)*(x1-x2))+((y1-y2)*(y1-y2)))
 
#define cpl_drand()   ((double)rand()/(double)RAND_MAX)
 
#define insert_par(PARNAME, PARDESC, PARVALUE, PARTYPE)
 
#define HIST_FACT   2.354820045
 
#define NIR   TRUE
 
#define OPT   FALSE
 
enum  pixeltypes { HOT = 0 , DEAD = 1 , NOISY = 2 }
 
enum  stackingtypes { MINMAX = 0 , MEAN = 1 , MEDIAN = 2 , KSIGMA = 3 }
 
enum  readouts { HORIZONTAL = 1 , VERTICAL = 2 }
 
struct {
   const char *   ron_method
 
   const char *   dsnu_method
 
   int   exts
 
   int   nb_extensions
 
   cpl_boolean   opt_nir
 
xsh_detmon_dark_config
 
cpl_error_code xsh_detmon_rm_bpixs (cpl_image **, const double, int, int)
 
cpl_error_code xsh_detmon_fill_parlist (cpl_parameterlist *parlist, const char *recipe_name, const char *pipeline_name, int npars,...)
 
int xsh_detmon_retrieve_par_int (const char *parn, const char *pipeline_name, const char *recipe_name, const cpl_parameterlist *parlist)
 
double xsh_detmon_retrieve_par_double (const char *parn, const char *pipeline_name, const char *recipe_name, const cpl_parameterlist *parlist)
 
double irplib_pfits_get_exptime (const cpl_propertylist *plist)
 
cpl_propertylist * xsh_detmon_fill_prolist (const char *procatg, const char *protype, const char *protech, cpl_boolean proscience)
 
void detmon_print_rec_status (void)
 

Macro Definition Documentation

◆ cpl_drand

#define cpl_drand ( )    ((double)rand()/(double)RAND_MAX)

Definition at line 55 of file xsh_detmon.c.

◆ HIST_FACT

#define HIST_FACT   2.354820045

Definition at line 70 of file xsh_detmon.c.

◆ insert_par

#define insert_par (   PARNAME,
  PARDESC,
  PARVALUE,
  PARTYPE 
)
Value:
do { \
char * par_name = cpl_sprintf("%s.%s", group_name, PARNAME); \
cpl_parameter * p; \
assert(par_name != NULL); \
p = cpl_parameter_new_value(par_name, PARTYPE, \
PARDESC, group_name, PARVALUE); \
cpl_parameter_set_alias(p, CPL_PARAMETER_MODE_CLI, PARNAME); \
cpl_parameter_disable(p, CPL_PARAMETER_MODE_ENV); \
cpl_parameterlist_append(parlist, p); \
cpl_free(par_name); \
} while(0);

◆ NIR

#define NIR   TRUE

Definition at line 103 of file xsh_detmon.c.

◆ OPT

#define OPT   FALSE

Definition at line 104 of file xsh_detmon.c.

◆ pdist

#define pdist (   x1,
  y1,
  x2,
  y2 
)    (((x1-x2)*(x1-x2))+((y1-y2)*(y1-y2)))

Definition at line 53 of file xsh_detmon.c.

Enumeration Type Documentation

◆ pixeltypes

enum pixeltypes
Enumerator
HOT 
DEAD 
NOISY 

Definition at line 72 of file xsh_detmon.c.

◆ readouts

enum readouts
Enumerator
HORIZONTAL 
VERTICAL 

Definition at line 87 of file xsh_detmon.c.

◆ stackingtypes

Enumerator
MINMAX 
MEAN 
MEDIAN 
KSIGMA 

Definition at line 79 of file xsh_detmon.c.

Function Documentation

◆ detmon_print_rec_status()

void detmon_print_rec_status ( void  )

Definition at line 384 of file xsh_detmon.c.

◆ irplib_pfits_get_exptime()

double irplib_pfits_get_exptime ( const cpl_propertylist *  plist)

Definition at line 271 of file xsh_detmon.c.

References exptime.

Referenced by xsh_detmon_lg_reduce_dit().

◆ xsh_detmon_fill_parlist()

cpl_error_code xsh_detmon_fill_parlist ( cpl_parameterlist *  parlist,
const char *  recipe_name,
const char *  pipeline_name,
int  npars,
  ... 
)

Definition at line 132 of file xsh_detmon.c.

References insert_par.

Referenced by xsh_detmon_lg_fill_parlist().

◆ xsh_detmon_fill_prolist()

cpl_propertylist * xsh_detmon_fill_prolist ( const char *  procatg,
const char *  protype,
const char *  protech,
cpl_boolean  proscience 
)

Definition at line 291 of file xsh_detmon.c.

Referenced by xsh_lingain().

◆ xsh_detmon_retrieve_par_double()

double xsh_detmon_retrieve_par_double ( const char *  parn,
const char *  pipeline_name,
const char *  recipe_name,
const cpl_parameterlist *  parlist 
)

Definition at line 241 of file xsh_detmon.c.

Referenced by xsh_detmon_lg_retrieve_parlist().

◆ xsh_detmon_retrieve_par_int()

int xsh_detmon_retrieve_par_int ( const char *  parn,
const char *  pipeline_name,
const char *  recipe_name,
const cpl_parameterlist *  parlist 
)

Definition at line 211 of file xsh_detmon.c.

Referenced by xsh_detmon_lg_retrieve_parlist().

◆ xsh_detmon_rm_bpixs()

cpl_error_code xsh_detmon_rm_bpixs ( cpl_image **  image,
const double  kappa,
int  nffts,
int  nsamples 
)

Definition at line 325 of file xsh_detmon.c.

References kappa.

Variable Documentation

◆ dsnu_method

const char* dsnu_method

Definition at line 97 of file xsh_detmon.c.

◆ exts

int exts

Definition at line 98 of file xsh_detmon.c.

◆ nb_extensions

int nb_extensions

Definition at line 99 of file xsh_detmon.c.

◆ opt_nir

cpl_boolean opt_nir

◆ ron_method

const char* ron_method

Definition at line 96 of file xsh_detmon.c.

◆ 

struct { ... } xsh_detmon_dark_config