MOONS Pipeline Reference Manual 0.13.1
moo_resp.h
1/*
2 * This file is part of the MOONS Pipeline
3 * Copyright (C) 2002-2016 European Southern Observatory
4 *
5 * This program 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, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
18 */
19
20#ifndef MOO_RESP_H
21#define MOO_RESP_H
22
23/*-----------------------------------------------------------------------------
24 Includes
25 -----------------------------------------------------------------------------*/
26#include <cpl.h>
27#include <hdrl.h>
28#include "moo_scilist.h"
35#define MOO_RESP_EXT_RI "RI"
36#define MOO_RESP_EXT_YJ "YJ"
37#define MOO_RESP_EXT_H "H"
38#define MOO_RESP_EXT_RESPONSE_TABLE "STANDARD_TABLE"
39#define MOO_RESP_TABLE_INDEXRBN "INDEXRBN"
40#define MOO_RESP_TABLE_SPECTRO "SPECTRO"
41#define MOO_RESP_TABLE_RESPONSE "RESPONSE"
42#define MOO_RESP_WAVE "WAVE"
43#define MOO_RESP_RESPONSE "RESPONSE"
44#define MOO_RESP_SPECFLUX "SPECFLUX"
45#define MOO_RESP_SPECFLUXFILTER "SPECFLUXFILTER"
46#define MOO_RESP_ATM "ATM"
47#define MOO_RESP_FLX "FLX"
48
49#define MOO_DEBUG_RESP 0
50
51typedef struct
52{
53 cpl_propertylist *primary_header;
54 cpl_table *ri;
55 cpl_table *yj;
56 cpl_table *h;
57 cpl_table *response_table;
58} moo_resp;
59
60/*-----------------------------------------------------------------------------
61 Functions prototypes
62 -----------------------------------------------------------------------------*/
63moo_resp *moo_resp_new(void);
64moo_resp *moo_resp_create(moo_scilist *scilist, int badpix_level);
65void moo_resp_delete(moo_resp *resp);
66cpl_error_code
67moo_resp_set_table(moo_resp *self, moo_detector_type type, cpl_table *t);
68cpl_table *moo_resp_get_table(moo_resp *self, moo_detector_type type);
69const char *moo_resp_get_colname(moo_resp *self, int idrbn, int spectro);
70void moo_resp_save(moo_resp *self, const char *filename);
71moo_resp *moo_resp_load(const cpl_frame *frame);
72#endif
enum _moo_detector_type_ moo_detector_type
The type code type.
Definition: moo_detector.h:64
void moo_resp_delete(moo_resp *resp)
Delete a moo_resp.
Definition: moo_resp.c:320
cpl_error_code moo_resp_set_table(moo_resp *self, moo_detector_type type, cpl_table *t)
assign table in moo_resp
Definition: moo_resp.c:85
void moo_resp_save(moo_resp *self, const char *filename)
Save a moo_resp to a FITS file.
Definition: moo_resp.c:354
cpl_table * moo_resp_get_table(moo_resp *self, moo_detector_type type)
Get a reponse table from RESP.
Definition: moo_resp.c:124
moo_resp * moo_resp_new(void)
Create a new moo_resp.
Definition: moo_resp.c:66
moo_resp * moo_resp_create(moo_scilist *scilist, int badpix_level)
Prepare RESP for SCI frame.
Definition: moo_resp.c:158
moo_resp * moo_resp_load(const cpl_frame *frame)
Load a RESP frame and create a moo_resp.
Definition: moo_resp.c:401
const char * moo_resp_get_colname(moo_resp *self, int idrbn, int spectro)
Get the name of the response colname for a given indexrbn.
Definition: moo_resp.c:454