00001 /* $Id: naco_wavelength.c,v 1.7 2006-11-14 09:58:41 llundin Exp $ 00002 * 00003 * This file is part of the NACO Pipeline 00004 * Copyright (C) 2002,2003 European Southern Observatory 00005 * 00006 * This program is free software; you can redistribute it and/or modify 00007 * it under the terms of the GNU General Public License as published by 00008 * the Free Software Foundation; either version 2 of the License, or 00009 * (at your option) any later version. 00010 * 00011 * This program is distributed in the hope that it will be useful, 00012 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00013 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00014 * GNU General Public License for more details. 00015 * 00016 * You should have received a copy of the GNU General Public License 00017 * along with this program; if not, write to the Free Software 00018 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02111-1307 USA 00019 */ 00020 00021 /* 00022 * $Author: llundin $ 00023 * $Date: 2006-11-14 09:58:41 $ 00024 * $Revision: 1.7 $ 00025 * $Name: not supported by cvs2svn $ 00026 */ 00027 00028 #ifdef HAVE_CONFIG_H 00029 #include <config.h> 00030 #endif 00031 00032 /*----------------------------------------------------------------------------- 00033 Includes 00034 -----------------------------------------------------------------------------*/ 00035 00036 #include <cpl.h> 00037 #include <math.h> 00038 #include <float.h> 00039 00040 #include "naco_utils.h" 00041 #include "naco_wavelength.h" 00042 00043 /*----------------------------------------------------------------------------*/ 00047 /*----------------------------------------------------------------------------*/ 00048 00049 /*----------------------------------------------------------------------------- 00050 Function codes 00051 -----------------------------------------------------------------------------*/ 00052 00055 /*----------------------------------------------------------------------------*/ 00121 /*----------------------------------------------------------------------------*/ 00122 computed_disprel * naco_spectro_compute_disprel( 00123 const cpl_image * in, 00124 int discard_lo, 00125 int discard_hi, 00126 int discard_le, 00127 int discard_ri, 00128 int remove_thermal, 00129 const char * table_name, 00130 double slit_width, 00131 int order, 00132 int output_ascii, 00133 double * phdisprel) 00134 { 00135 computed_disprel * solution = NULL; 00136 00137 00138 cpl_ensure(in != NULL, CPL_ERROR_NULL_INPUT, NULL); 00139 cpl_ensure(table_name != NULL, CPL_ERROR_NULL_INPUT, NULL); 00140 cpl_ensure(phdisprel != NULL, CPL_ERROR_NULL_INPUT, NULL); 00141 00142 cpl_ensure(discard_lo <= discard_hi, CPL_ERROR_ILLEGAL_INPUT, NULL); 00143 cpl_ensure(discard_le <= discard_ri, CPL_ERROR_ILLEGAL_INPUT, NULL); 00144 00145 cpl_ensure(remove_thermal >= 0, CPL_ERROR_ILLEGAL_INPUT, NULL); 00146 cpl_ensure(slit_width >= 0, CPL_ERROR_ILLEGAL_INPUT, NULL); 00147 cpl_ensure(order >= 1, CPL_ERROR_ILLEGAL_INPUT, NULL); 00148 cpl_ensure(output_ascii >= 0, CPL_ERROR_ILLEGAL_INPUT, NULL); 00149 00150 return solution; 00151 } 00152