IIINSTRUMENT Pipeline Reference Manual 4.4.12
naco_wavelength.c
1/* $Id: naco_wavelength.c,v 1.7 2006-11-14 09:58:41 llundin Exp $
2 *
3 * This file is part of the NACO 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 02111-1307 USA
19 */
20
21/*
22 * $Author: llundin $
23 * $Date: 2006-11-14 09:58:41 $
24 * $Revision: 1.7 $
25 * $Name: not supported by cvs2svn $
26 */
27
28#ifdef HAVE_CONFIG_H
29#include <config.h>
30#endif
31
32/*-----------------------------------------------------------------------------
33 Includes
34 -----------------------------------------------------------------------------*/
35
36#include <cpl.h>
37#include <math.h>
38#include <float.h>
39
40#include "naco_utils.h"
41#include "naco_wavelength.h"
42
43/*----------------------------------------------------------------------------*/
47/*----------------------------------------------------------------------------*/
48
49/*-----------------------------------------------------------------------------
50 Function codes
51 -----------------------------------------------------------------------------*/
52
55/*----------------------------------------------------------------------------*/
121/*----------------------------------------------------------------------------*/
123 const cpl_image * in,
124 int discard_lo,
125 int discard_hi,
126 int discard_le,
127 int discard_ri,
128 int remove_thermal,
129 const char * table_name,
130 double slit_width,
131 int order,
132 int output_ascii,
133 double * phdisprel)
134{
135 computed_disprel * solution = NULL;
136
137
138 cpl_ensure(in != NULL, CPL_ERROR_NULL_INPUT, NULL);
139 cpl_ensure(table_name != NULL, CPL_ERROR_NULL_INPUT, NULL);
140 cpl_ensure(phdisprel != NULL, CPL_ERROR_NULL_INPUT, NULL);
141
142 cpl_ensure(discard_lo <= discard_hi, CPL_ERROR_ILLEGAL_INPUT, NULL);
143 cpl_ensure(discard_le <= discard_ri, CPL_ERROR_ILLEGAL_INPUT, NULL);
144
145 cpl_ensure(remove_thermal >= 0, CPL_ERROR_ILLEGAL_INPUT, NULL);
146 cpl_ensure(slit_width >= 0, CPL_ERROR_ILLEGAL_INPUT, NULL);
147 cpl_ensure(order >= 1, CPL_ERROR_ILLEGAL_INPUT, NULL);
148 cpl_ensure(output_ascii >= 0, CPL_ERROR_ILLEGAL_INPUT, NULL);
149
150 return solution;
151}
152
computed_disprel * naco_spectro_compute_disprel(const cpl_image *in, int discard_lo, int discard_hi, int discard_le, int discard_ri, int remove_thermal, const char *table_name, double slit_width, int order, int output_ascii, double *phdisprel)
Compute a 3rd degree dispersion relation.