ERIS Pipeline Reference Manual 1.9.2
sc_conv.h
Go to the documentation of this file.
1/*
2 * This file is part of the SKYCORR software package.
3 * Copyright (C) 2009-2013 European Southern Observatory
4 *
5 * This programme 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 programme 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 programme. If not, see <http://www.gnu.org/licenses/>.
17 */
18
35#ifdef __cplusplus
36extern "C" {
37#endif
38
39/*****************************************************************************
40 * INCLUDES *
41 ****************************************************************************/
42
43/* Config header */
44
45#ifdef HAVE_CONFIG_H
46#include <config.h>
47#endif
48
49/* Sky correction headers */
50
51#include <sc_basic.h>
52#include <sc_par.h>
53
54/*****************************************************************************
55 * DEFINES *
56 ****************************************************************************/
57
58#ifndef SC_CONV_H
59#define SC_CONV_H
60
61/* Definition of constants */
62
64#define SC_EDGEFRAC 0.025
67#define SC_MAXFLUXFAC 10.
68
69/*****************************************************************************
70 * TYPEDEF *
71 ****************************************************************************/
72
81typedef struct _sctarr_ {
82 int next;
83 cpl_propertylist **head;
84 cpl_table **tab;
86
95typedef struct _scvarr_ {
96 int next;
97 cpl_propertylist **head;
98 cpl_vector **vec;
100
109typedef struct _sciarr_ {
110 int next;
111 cpl_propertylist **head;
112 cpl_image **ima;
114
115/*****************************************************************************
116 * PROTOTYPES *
117 ****************************************************************************/
118
119/* Declaration of functions */
120
121cpl_error_code sc_conv_checkfitsformat(int *fitsformat, const char *filename);
122cpl_error_code sc_conv_setcolnames(cpl_array *colnames,
123 const cpl_parameterlist *parlist);
124cpl_error_code sc_conv_setextnames_varr(cpl_table *extnames,
125 const scvarr *vecdat,
126 const cpl_parameterlist *parlist);
127cpl_error_code sc_conv_setextnames_iarr(cpl_table *extnames,
128 const sciarr *imadat,
129 const cpl_parameterlist *parlist);
130cpl_error_code sc_conv_varr2tarr(sctarr *tabdat, const scvarr *vecdat,
131 const cpl_table *extnames);
132double sc_conv_getwcskey(const cpl_propertylist *plist, const char *key);
133cpl_error_code sc_conv_modtable(sctarr *tabdat,
134 const cpl_parameterlist *parlist);
135
136cpl_error_code sc_conv_readprepfits(sctarr *tabdat,
137 const cpl_parameterlist *parlist);
138cpl_error_code sc_conv_results2tarr(sctarr *tabdat, cpl_table *results);
139cpl_error_code sc_conv_erasemaskcol(sctarr *tabdat,
140 const cpl_parameterlist *parlist);
141cpl_error_code sc_conv_resultstarr2varr(scvarr *vecdat,
142 const cpl_table *extnames,
143 const sctarr *tabdat);
144cpl_error_code sc_conv_getmaskval(double maskval[2], const sctarr *tabdat,
145 const cpl_table *extnames);
146
147cpl_error_code sc_conv_iarr2varr_sci(scvarr *vecdat, cpl_vector *selpix,
148 const sciarr *imadat,
149 const cpl_table *extnames,
150 const double minrelprofflux);
151cpl_error_code sc_conv_iarr2varr_sky(scvarr *vecdat, const sciarr *imadat,
152 const cpl_table *extnames,
153 const double lowpixfrac,
154 const cpl_vector *selpix);
155cpl_error_code sc_conv_ascii_read(sctarr *tabdat, const char *filename,
156 const cpl_array *colnames);
157cpl_error_code sc_conv_ascii_write(const char *filename,
158 const sctarr *tabdat);
159cpl_error_code sc_conv_tarr_init(sctarr *tabdat, const int next);
160cpl_error_code sc_conv_tarr_read(sctarr *tabdat, const char *filename);
161cpl_error_code sc_conv_tarr_write(const char *filename, const sctarr *tabdat);
162cpl_error_code sc_conv_tarr_delete(sctarr *tabdat);
163cpl_error_code sc_conv_varr_init(scvarr *vecdat, const int next);
164cpl_error_code sc_conv_varr_read(scvarr *vecdat, const char *filename);
165cpl_error_code sc_conv_varr_write(const char *filename, const scvarr *vecdat);
166cpl_error_code sc_conv_varr_delete(scvarr *vecdat);
167cpl_error_code sc_conv_iarr_init(sciarr *imadat, const int next);
168cpl_error_code sc_conv_iarr_read(sciarr *imadat, const char *filename);
169cpl_error_code sc_conv_iarr_write(const char *filename, const sciarr *imadat);
170cpl_error_code sc_conv_iarr_delete(sciarr *imadat);
171
172#endif /* SC_CONV_H */
173
174#ifdef __cplusplus
175}
176#endif
177
cpl_error_code sc_conv_tarr_read(sctarr *tabdat, const char *filename)
Definition: sc_conv.c:2385
cpl_error_code sc_conv_varr2tarr(sctarr *tabdat, const scvarr *vecdat, const cpl_table *extnames)
Definition: sc_conv.c:516
cpl_error_code sc_conv_ascii_read(sctarr *tabdat, const char *filename, const cpl_array *colnames)
Definition: sc_conv.c:2114
cpl_error_code sc_conv_setextnames_iarr(cpl_table *extnames, const sciarr *imadat, const cpl_parameterlist *parlist)
Definition: sc_conv.c:372
cpl_error_code sc_conv_varr_delete(scvarr *vecdat)
Definition: sc_conv.c:2617
cpl_error_code sc_conv_getmaskval(double maskval[2], const sctarr *tabdat, const cpl_table *extnames)
Definition: sc_conv.c:1412
cpl_error_code sc_conv_varr_read(scvarr *vecdat, const char *filename)
Definition: sc_conv.c:2533
cpl_error_code sc_conv_results2tarr(sctarr *tabdat, cpl_table *results)
Definition: sc_conv.c:1122
cpl_error_code sc_conv_tarr_write(const char *filename, const sctarr *tabdat)
Definition: sc_conv.c:2442
cpl_error_code sc_conv_tarr_delete(sctarr *tabdat)
Definition: sc_conv.c:2476
cpl_error_code sc_conv_checkfitsformat(int *fitsformat, const char *filename)
Definition: sc_conv.c:47
struct _sctarr_ sctarr
cpl_error_code sc_conv_iarr2varr_sci(scvarr *vecdat, cpl_vector *selpix, const sciarr *imadat, const cpl_table *extnames, const double minrelprofflux)
Definition: sc_conv.c:1515
cpl_error_code sc_conv_iarr_write(const char *filename, const sciarr *imadat)
Definition: sc_conv.c:2724
cpl_error_code sc_conv_readprepfits(sctarr *tabdat, const cpl_parameterlist *parlist)
Definition: sc_conv.c:1067
cpl_error_code sc_conv_iarr_init(sciarr *imadat, const int next)
Definition: sc_conv.c:2650
cpl_error_code sc_conv_varr_write(const char *filename, const scvarr *vecdat)
Definition: sc_conv.c:2583
cpl_error_code sc_conv_iarr_delete(sciarr *imadat)
Definition: sc_conv.c:2758
cpl_error_code sc_conv_tarr_init(sctarr *tabdat, const int next)
Definition: sc_conv.c:2361
cpl_error_code sc_conv_setextnames_varr(cpl_table *extnames, const scvarr *vecdat, const cpl_parameterlist *parlist)
Definition: sc_conv.c:228
cpl_error_code sc_conv_iarr2varr_sky(scvarr *vecdat, const sciarr *imadat, const cpl_table *extnames, const double lowpixfrac, const cpl_vector *selpix)
Definition: sc_conv.c:1843
struct _scvarr_ scvarr
cpl_error_code sc_conv_modtable(sctarr *tabdat, const cpl_parameterlist *parlist)
Definition: sc_conv.c:787
cpl_error_code sc_conv_erasemaskcol(sctarr *tabdat, const cpl_parameterlist *parlist)
Definition: sc_conv.c:1206
struct _sciarr_ sciarr
cpl_error_code sc_conv_resultstarr2varr(scvarr *vecdat, const cpl_table *extnames, const sctarr *tabdat)
Definition: sc_conv.c:1268
cpl_error_code sc_conv_ascii_write(const char *filename, const sctarr *tabdat)
Definition: sc_conv.c:2238
cpl_error_code sc_conv_setcolnames(cpl_array *colnames, const cpl_parameterlist *parlist)
Definition: sc_conv.c:164
cpl_error_code sc_conv_varr_init(scvarr *vecdat, const int next)
Definition: sc_conv.c:2509
double sc_conv_getwcskey(const cpl_propertylist *plist, const char *key)
Definition: sc_conv.c:669
cpl_error_code sc_conv_iarr_read(sciarr *imadat, const char *filename)
Definition: sc_conv.c:2674
Header for routines for handling parameter files.