00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022 #ifndef MUSE_RESAMPLING_H
00023 #define MUSE_RESAMPLING_H
00024
00025
00026
00027
00028 #include <cpl.h>
00029
00030 #include "muse_cplwrappers.h"
00031 #include "muse_datacube.h"
00032 #include "muse_image.h"
00033 #include "muse_pixgrid.h"
00034 #include "muse_pixtable.h"
00035
00036
00037
00038
00039
00043
00047
00048 typedef enum {
00050 MUSE_RESAMPLE_NEAREST = 0,
00052 MUSE_RESAMPLE_WEIGHTED_RENKA = 1,
00054 MUSE_RESAMPLE_WEIGHTED_LINEAR,
00056 MUSE_RESAMPLE_WEIGHTED_QUADRATIC,
00058 MUSE_RESAMPLE_WEIGHTED_DRIZZLE,
00060 MUSE_RESAMPLE_WEIGHTED_LANCZOS,
00062 MUSE_RESAMPLE_NONE
00063 } muse_resampling_type;
00064
00065
00069
00070
00071 typedef enum {
00074 MUSE_RESAMPLING_CRSTATS_IRAF = 0,
00076 MUSE_RESAMPLING_CRSTATS_MEAN = 1,
00078 MUSE_RESAMPLING_CRSTATS_MEDIAN = 2
00079 } muse_resampling_crstats_type;
00080
00081 typedef enum {
00083 MUSE_RESAMPLING_DISP_AWAV = 0,
00085 MUSE_RESAMPLING_DISP_AWAV_LOG = 1,
00087 MUSE_RESAMPLING_DISP_WAVE,
00089 MUSE_RESAMPLING_DISP_WAVE_LOG
00090 } muse_resampling_dispersion_type;
00091
00092
00096
00097 typedef struct {
00099 muse_resampling_type method;
00101 muse_resampling_crstats_type crtype;
00103 double crsigma;
00104
00106 int ld;
00110 double pfx, pfy, pfl;
00112 double rc;
00113
00116 double dx, dy, dlambda;
00118 cpl_wcs *wcs;
00120 muse_resampling_dispersion_type tlambda;
00121 } muse_resampling_params;
00122
00125
00126
00127
00128 muse_resampling_params *muse_resampling_params_new(muse_resampling_type);
00129 cpl_error_code muse_resampling_params_set_wcs(muse_resampling_params *, const cpl_propertylist *);
00130 void muse_resampling_params_delete(muse_resampling_params *);
00131
00132 muse_euro3dcube *muse_resampling_euro3d(muse_pixtable *, muse_resampling_params *);
00133 muse_datacube *muse_resampling_cube(muse_pixtable *, muse_resampling_params *, muse_pixgrid **);
00134 muse_image *muse_resampling_collapse_pixgrid(muse_pixtable *, muse_pixgrid *, muse_datacube *, cpl_table *, muse_resampling_params *);
00135
00136 muse_image *muse_resampling_image(muse_pixtable *, muse_resampling_type, double, double);
00137 cpl_table *muse_resampling_spectrum(muse_pixtable *, double);
00138 cpl_table *muse_resampling_spectrum_iterate(muse_pixtable *, double, float, float, unsigned char);
00139
00140 #endif