00001 /* * 00002 * This file is part of the ESO X-shooter Pipeline * 00003 * Copyright (C) 2006 European Southern Observatory * 00004 * * 00005 * This library is free software; you can redistribute it and/or modify * 00006 * it under the terms of the GNU General Public License as published by * 00007 * the Free Software Foundation; either version 2 of the License, or * 00008 * (at your option) any later version. * 00009 * * 00010 * This program is distributed in the hope that it will be useful, * 00011 * but WITHOUT ANY WARRANTY; without even the implied warranty of * 00012 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * 00013 * GNU General Public License for more details. * 00014 * * 00015 * You should have received a copy of the GNU General Public License * 00016 * along with this program; if not, write to the Free Software * 00017 * Foundation, 51 Franklin St, Fifth Floor, Boston, MA 02111-1307 USA * 00018 * */ 00019 00020 /* 00021 * $Author: amodigli $ 00022 * $Date: 2011/12/09 10:04:57 $ 00023 * $Revision: 1.8 $ 00024 */ 00025 #ifndef XSH_DATA_LOCALIZATION_H 00026 #define XSH_DATA_LOCALIZATION_H 00027 #include <xsh_cpl_size.h> 00028 #include <cpl.h> 00029 #include <xsh_data_instrument.h> 00030 00031 00032 #define XSH_LOCALIZATION_TABLE_COLNAME_SLICE "SLICE" 00033 #define XSH_LOCALIZATION_TABLE_COLNAME_CENTER "CENCOEF" 00034 #define XSH_LOCALIZATION_TABLE_COLNAME_EDGUP "EDGUPCOEF" 00035 #define XSH_LOCALIZATION_TABLE_COLNAME_EDGLO "EDGLOCOEF" 00036 #define XSH_LOCALIZATION_TABLE_DEGPOL "DEGPOL" 00037 00038 typedef struct{ 00039 /* Slice Identification */ 00040 float slice ; 00041 /* polynomial fitting the center points of the order */ 00042 cpl_polynomial * cenpoly; 00043 /* polynomial fitting the upper edge of the order */ 00044 cpl_polynomial * edguppoly; 00045 /* polynomial fitting the lower edge of the order */ 00046 cpl_polynomial * edglopoly; 00047 /* Polynomial degree (same for the 3 polynomes) */ 00048 int pol_degree ; 00049 cpl_propertylist *header; 00050 } xsh_localization ; 00051 00052 00053 xsh_localization* xsh_localization_create(void); 00054 00055 xsh_localization* xsh_localization_load( cpl_frame* frame); 00056 00057 cpl_propertylist* xsh_localization_list_get_header( xsh_localization *list); 00058 00059 cpl_propertylist * xsh_localization_get_header(xsh_localization *list); 00060 00061 00062 void xsh_localization_free( xsh_localization **list); 00063 00064 cpl_frame* xsh_localization_save( xsh_localization *list, 00065 const char* filename, xsh_instrument *instrument); 00066 00067 #endif /* XSH_ORDER_H */