00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022 #ifndef MUSE_POSTPROC_H
00023 #define MUSE_POSTPROC_H
00024
00025
00026
00027
00028 #include <cpl.h>
00029
00030 #include "muse_flux.h"
00031 #include "muse_lsf.h"
00032 #include "muse_pixtable.h"
00033 #include "muse_processing.h"
00034 #include "muse_resampling.h"
00035 #include "muse_rvcorrect.h"
00036 #include "muse_sky.h"
00037 #include "muse_wcs.h"
00038 #include "muse_xcombine.h"
00039
00040 #include "muse_lsf_params.h"
00041
00042
00043
00044
00045
00046
00047
00048
00049
00053
00057
00058 typedef enum {
00059 MUSE_POSTPROC_SCIPOST = 0,
00060 MUSE_POSTPROC_STANDARD,
00061 MUSE_POSTPROC_ASTROMETRY
00062 } muse_postproc_type;
00063
00064
00068
00069 typedef enum {
00070 MUSE_POSTPROC_SKYMETHOD_NONE = 0,
00071 MUSE_POSTPROC_SKYMETHOD_MODEL,
00072 MUSE_POSTPROC_SKYMETHOD_SIMPLE
00073 } muse_postproc_skymethod;
00074
00075
00079
00080 typedef enum {
00081 MUSE_POSTPROC_DARCHECK_NONE = 0,
00082 MUSE_POSTPROC_DARCHECK_CHECK,
00083 MUSE_POSTPROC_DARCHECK_CORRECT
00084 } muse_postproc_darcheck;
00085
00086
00090
00091 typedef struct {
00092 muse_postproc_type type;
00093 cpl_table *exposures;
00094 double lambdamin;
00095 double lambdamax;
00096 double lambdaref;
00097 muse_postproc_darcheck darcheck;
00098 muse_rvcorrect_type rvtype;
00099 cpl_table *response;
00100 cpl_table *extinction;
00101 cpl_table *telluric;
00102 cpl_propertylist *wcs;
00103 muse_postproc_skymethod skymethod;
00104 cpl_table *sky_lines;
00105 cpl_table *sky_continuum;
00106 muse_lsf_cube **lsf_cube;
00107 #ifdef USE_LSF_PARAMS
00108 muse_lsf_params **lsf_params;
00109 #endif
00110 muse_mask *sky_mask;
00111 muse_sky_params skymodel_params;
00112 cpl_frame *refframe;
00114 cpl_table *tellregions;
00115 muse_flux_profile_type profile;
00116 muse_flux_selection_type select;
00117 muse_flux_smooth_type smooth;
00118 double detsigma;
00119 double radius;
00121 double faccuracy;
00123 double rejsigma;
00124 int niter;
00125 muse_wcs_centroid_type centroid;
00127 double crpix1, crpix2;
00128 } muse_postproc_properties;
00129
00130
00134
00135 typedef struct {
00136 muse_mask *mask;
00137 cpl_table *spectrum;
00138 cpl_table *lines;
00139 cpl_table *continuum;
00140 } muse_postproc_sky_outputs;
00141
00144
00145
00146
00147 muse_postproc_properties *muse_postproc_properties_new(muse_postproc_type);
00148 void muse_postproc_properties_delete(muse_postproc_properties *);
00149
00150 cpl_boolean muse_postproc_check_save_param(const char *, const char *);
00151 muse_resampling_type muse_postproc_get_resampling_type(const char *);
00152 muse_resampling_crstats_type muse_postproc_get_cr_type(const char *);
00153 muse_cube_type muse_postproc_get_cube_format(const char *);
00154 muse_xcombine_types muse_postproc_get_weight_type(const char *);
00155
00156 cpl_table *muse_postproc_load_nearest(const cpl_propertylist *, const cpl_frame *, float, float, double *, double *);
00157 void *muse_postproc_process_exposure(muse_postproc_properties *, unsigned int, muse_postproc_sky_outputs *);
00158
00159 cpl_propertylist *muse_postproc_cube_load_output_wcs(muse_processing *);
00160 cpl_error_code muse_postproc_cube_resample_and_collapse(muse_processing *, muse_pixtable *, muse_cube_type, muse_resampling_params *, const char *);
00161 cpl_error_code muse_postproc_qc_fwhm(muse_processing *, muse_datacube *);
00162
00163 #endif