00001 /* $Id: naco_physicalmodel.c,v 1.8 2006/11/15 08:25:03 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/15 08:25:03 $ 00024 * $Revision: 1.8 $ 00025 * $Name: HEAD $ 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_physicalmodel.h" 00042 #include "naco_pfits.h" 00043 00044 /*----------------------------------------------------------------------------*/ 00048 /*----------------------------------------------------------------------------*/ 00049 00050 /*----------------------------------------------------------------------------- 00051 Function codes 00052 -----------------------------------------------------------------------------*/ 00053 00056 /*----------------------------------------------------------------------------*/ 00069 /*----------------------------------------------------------------------------*/ 00070 double * naco_get_disprel_estimate( 00071 const char * filename, 00072 int poly_deg) 00073 { 00074 double * coefs; 00075 00076 00077 cpl_ensure(filename != NULL, CPL_ERROR_NULL_INPUT, NULL); 00078 cpl_ensure(poly_deg >= 1, CPL_ERROR_ILLEGAL_INPUT, NULL); 00079 00080 coefs = cpl_calloc((size_t)poly_deg+1, sizeof(double)); 00081 coefs[1] = 1.0; 00082 00083 return coefs; 00084 } 00085