X-shooter Pipeline Reference Manual 3.8.15
xsh_data_pre_3d.h
Go to the documentation of this file.
1/* *
2 * This file is part of the ESO X-shooter Pipeline *
3 * Copyright (C) 2006 European Southern Observatory *
4 * *
5 * This library is free software; you can redistribute it and/or modify *
6 * it under the terms of the GNU General Public License as published by *
7 * the Free Software Foundation; either version 2 of the License, or *
8 * (at your option) any later version. *
9 * *
10 * This program is distributed in the hope that it will be useful, *
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of *
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
13 * GNU General Public License for more details. *
14 * *
15 * You should have received a copy of the GNU General Public License *
16 * along with this program; if not, write to the Free Software *
17 * Foundation, 51 Franklin St, Fifth Floor, Boston, MA 02111-1307 USA *
18 * */
19
20/*
21 * $Author: amodigli $
22 * $Date: 2009-09-27 10:37:36 $
23 * $Revision: 1.3 $
24 */
25
26#ifndef XSH_DATA_PRE_3D_H
27#define XSH_DATA_PRE_3D_H
28
29/*----------------------------------------------------------------------------
30 Includes
31 ----------------------------------------------------------------------------*/
32#include <xsh_data_instrument.h>
33
34#include <cpl.h>
35#include <xsh_error.h>
36#include <xsh_data_image_3d.h>
37
38/*----------------------------------------------------------------------------
39 Typedefs
40 ----------------------------------------------------------------------------*/
41
42#define XSH_PRE_DATA_TYPE CPL_TYPE_FLOAT
43#define XSH_PRE_DATA_BPP CPL_BPP_IEEE_FLOAT
44#define XSH_PRE_ERRS_TYPE CPL_TYPE_FLOAT
45#define XSH_PRE_ERRS_BPP CPL_BPP_IEEE_FLOAT
46#define XSH_PRE_QUAL_TYPE CPL_TYPE_INT
47#define XSH_PRE_QUAL_BPP CPL_BPP_32_SIGNED
48
49typedef struct {
51 cpl_propertylist *data_header;
52
54 cpl_propertylist *errs_header;
55
57 cpl_propertylist *qual_header;
58
59 cpl_frame_group group;
60 /* instrument related with PRE */
62 /* NAXIS1 and NAXIS2 keywords */
63 int naxis1, naxis2, naxis3 ;
64 /* BINX et BINY keywords */
65 int binx, biny;
66 /* image size (DATA,ERRS,QUAL) in pixels */
67 int nx, ny, nz;
69
70#include <xsh_badpixelmap.h>
71
72
73/*----------------------------------------------------------------------------
74 Methods
75 ----------------------------------------------------------------------------*/
76
77/* Create/destroy */
78void xsh_pre_3d_free(xsh_pre_3d ** pre);
79xsh_pre_3d * xsh_pre_3d_load(cpl_frame * frame);
80
81cpl_frame* xsh_pre_3d_save( const xsh_pre_3d *pre, const char *filename,
82 int temp);
83
84xsh_pre_3d * xsh_pre_3d_new(int size_x, int size_y, int size_z );
85
86/* get */
87int xsh_pre_3d_get_nx(const xsh_pre_3d *pre);
88int xsh_pre_3d_get_ny(const xsh_pre_3d *pre);
89int xsh_pre_3d_get_nz(const xsh_pre_3d *pre);
90
91cpl_frame_group xsh_pre_3d_get_group(const xsh_pre_3d * pre);
92cpl_mask * xsh_pre_3d_get_bpmap(const xsh_pre_3d * pre);
93
94/* Accessor functions
95 * (const/non-const variants of each)
96 */
100
101const
102cpl_propertylist *xsh_pre_3d_get_header_const(const xsh_pre_3d *pre);
103cpl_propertylist *xsh_pre_3d_get_header ( xsh_pre_3d *pre);
104
105#endif
int biny
xsh_image_3d * xsh_pre_3d_get_errs(xsh_pre_3d *pre_3d)
Get errs.
void xsh_pre_3d_free(xsh_pre_3d **pre)
int xsh_pre_3d_get_nx(const xsh_pre_3d *pre)
Get nx of pre_3d structure.
xsh_pre_3d * xsh_pre_3d_load(cpl_frame *frame)
Load a xsh_pre_3d structure from a frame.
int xsh_pre_3d_get_nz(const xsh_pre_3d *pre)
Get nz of pre_3d structure.
cpl_frame * xsh_pre_3d_save(const xsh_pre_3d *pre, const char *filename, int temp)
Save PRE_3D on disk.
xsh_pre_3d * xsh_pre_3d_new(int size_x, int size_y, int size_z)
Create new PRE image.
int xsh_pre_3d_get_ny(const xsh_pre_3d *pre)
Get ny of pre_3d structure.
xsh_image_3d * xsh_pre_3d_get_qual(xsh_pre_3d *pre_3d)
Get qual.
xsh_image_3d * xsh_pre_3d_get_data(xsh_pre_3d *pre_3d)
Get data.
xsh_instrument * instrument
cpl_propertylist * data_header
cpl_propertylist * errs_header
xsh_image_3d * data
xsh_image_3d * errs
cpl_propertylist * qual_header
xsh_image_3d * qual
cpl_frame_group group
const cpl_propertylist * xsh_pre_3d_get_header_const(const xsh_pre_3d *pre)
cpl_propertylist * xsh_pre_3d_get_header(xsh_pre_3d *pre)
cpl_mask * xsh_pre_3d_get_bpmap(const xsh_pre_3d *pre)
cpl_frame_group xsh_pre_3d_get_group(const xsh_pre_3d *pre)
int ny