ERIS Pipeline Reference Manual 1.8.15
eris_ifu_resample.h
1/* $Id: eris_ifu_resample.h,v 1.14 2013-07-22 13:38:01 jtaylor Exp $
2 *
3 * This file is part of the ERIS Pipeline
4 * Copyright (C) 2002,2003 European Southern Observatory
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
10 *
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with this program; if not, write to the Free Software
18 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
19 */
20
21#ifndef ERIS_IFU_RESAMPLE_H
22#define ERIS_IFU_RESAMPLE_H
23
24#ifdef HAVE_CONFIG_H
25#include <config.h>
26#endif
27
28/*-----------------------------------------------------------------------------
29 Includes
30 -----------------------------------------------------------------------------*/
31
32#include <cpl.h>
33#include <eris_ifu_jitter_static.h>
34
35/*-----------------------------------------------------------------------------
36 Define
37 -----------------------------------------------------------------------------*/
38/* resampling params default values */
39
40#define PRODCATG_WHITELIGHT "ANCILLARY.IMAGE.WHITELIGHT"
41#define PRODCATG_EXPOSUREMAP "ANCILLARY.EXPMAP"
42#define RENKA_CRITICAL_RADIUS 1.25 //As in MUSE (see user manual)
43#define LANCZOS_KERNEL_SIZE 2 //
44
45#define DRIZZLE_DOWN_SCALING_FACTOR_X 0.8
46#define DRIZZLE_DOWN_SCALING_FACTOR_Y 0.8
47#define DRIZZLE_DOWN_SCALING_FACTOR_Z 0.8
48
49
50/* Default field margin (in percent), if the user does not specify any. 5
51 * percent is also used in the software package swarp */
52#define FIELDMARGIN 5.
53#define EDGETRIM 2
54#define LOOP_DISTANCE 3
55#define OH_POLY_DEG 0
56#define EXTNAME_DATA "DATA"
57#define EXTNAME_BPM "BPM"
58#define EXTNAME_ERROR "ERROR"
59#define EXTNAME_DATA_COMMENT "This extension contains data values"
60#define EXTNAME_BPM_COMMENT "This extension contains bad pixel values"
61#define EXTNAME_ERROR_COMMENT "This extension contains data errors"
62
63/*-----------------------------------------------------------------------------
64 Functions prototypes
65 -----------------------------------------------------------------------------*/
66cpl_error_code
67eris_ifu_combine(cubeType obj_type,
68 /*struct stdParamStruct stdParams, struct paramStruct params, */
69 cpl_frameset* frameset,
70 const cpl_parameterlist * parlist, const char* recipe_name,
71 const char* pipefile_prefix);
72cpl_error_code
73eris_ifu_combine_pbp(cpl_frameset* frameset,
74 const cpl_parameterlist * parlist,
75 const char *proCatg,
76 const char *filenameSpec,
77 float *offsetx,
78 float *offsety,
79 const char* offunit,
80 const char* recipe_name,
81 const char* pipefile_prefix);
82cpl_error_code
83eris_ifu_resample_save_cube(hdrl_resample_result *aCube,
84 const char *procatg,
85 const char *recipe,
86 const char *filename,
87 const cpl_parameterlist *parlist,
88 cpl_frameset *frameset,
89 cpl_boolean gen_phase3);
90cpl_error_code
91eris_ifu_cube_collapse_mean_and_save(const char*, cpl_frameset*,
92 const cpl_parameterlist*, const char*, /*const char*,*/
93 cpl_boolean apply_flat, cpl_boolean is_pupil);
94
95cpl_error_code eris_ifu_resample_trim_edge(hdrl_image *himg, int edge_trim);
96#endif
cpl_error_code eris_ifu_combine(cubeType obj_type, cpl_frameset *frameset, const cpl_parameterlist *parlist, const char *recipe_name, const char *pipefile_prefix)
Resample and combine multiple IFU cubes into a single cube.
cpl_error_code eris_ifu_combine_pbp(cpl_frameset *frameset, const cpl_parameterlist *parlist, const char *proCatg, const char *filenameSpec, float *offsetx, float *offsety, const char *offunit, const char *recipe_name, const char *pipefile_prefix)
Resample and combine cubes plane-by-plane (2D spatial resampling per wavelength)
cpl_error_code eris_ifu_cube_collapse_mean_and_save(const char *, cpl_frameset *, const cpl_parameterlist *, const char *, cpl_boolean apply_flat, cpl_boolean is_pupil)
-------------------------------------------------------------------------—‍/
cpl_error_code eris_ifu_resample_save_cube(hdrl_resample_result *aCube, const char *procatg, const char *recipe, const char *filename, const cpl_parameterlist *parlist, cpl_frameset *frameset, cpl_boolean gen_phase3)
Save resampled cube to FITS file in DEQ (Data-Error-Quality) format.
cpl_error_code eris_ifu_resample_trim_edge(hdrl_image *himg, int edge_trim)
Trim edge pixels from hdrl_image by rejecting them.