38 #include "sinfo_tpl_utils.h"
39 #include "sinfo_globals.h"
58 const char * sinfo_get_license(
void)
60 const char * sinfoni_license =
61 "This file is part of the SINFONI Instrument Pipeline\n"
62 "Copyright (C) 2002,2003 European Southern Observatory\n"
64 "This program is free software; you can redistribute it and/or modify\n"
65 "it under the terms of the GNU General Public License as published by\n"
66 "the Free Software Foundation; either version 2 of the License, or\n"
67 "(at your option) any later version.\n"
69 "This program is distributed in the hope that it will be useful,\n"
70 "but WITHOUT ANY WARRANTY; without even the implied warranty of\n"
71 "MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n"
72 "GNU General Public License for more details.\n"
74 "You should have received a copy of the GNU General Public License\n"
75 "along with this program; if not, write to the Free Software\n"
76 "Foundation, Inc., 59 Temple Place, Suite 330, Boston, \n"
79 return sinfoni_license ;
93 cpl_frameset * sinfo_extract_frameset(
94 const cpl_frameset * in,
98 const cpl_frame * cur_frame ;
99 cpl_frame * loc_frame ;
100 int nbframes, nbext ;
104 if (in == NULL)
return NULL ;
105 if (tag == NULL)
return NULL ;
108 nbframes = cpl_frameset_get_size(in) ;
111 if ((nbext = cpl_frameset_count_tags(in, tag)) == 0)
return NULL ;
114 out = cpl_frameset_new() ;
118 for (i=0 ; i<nbframes ; i++) {
119 cur_frame = cpl_frameset_get_frame_const(in, i) ;
120 if (!strcmp(cpl_frame_get_tag(cur_frame), tag)) {
121 loc_frame = cpl_frame_duplicate(cur_frame) ;
122 cpl_frameset_insert(out, loc_frame) ;
136 const char * sinfo_extract_filename(
137 const cpl_frameset * in,
140 const cpl_frame * cur_frame ;
143 if ((cur_frame = cpl_frameset_find_const(in, tag)) == NULL)
return NULL ;
144 return cpl_frame_get_filename(cur_frame) ;
154 const char * sinfo_std_band_name(sinfo_band band)
157 case SINFO_BAND_J:
return "J" ;
158 case SINFO_BAND_JS:
return "Js" ;
159 case SINFO_BAND_JBLOCK:
return "J+Block" ;
160 case SINFO_BAND_H:
return "H" ;
161 case SINFO_BAND_K:
return "K" ;
162 case SINFO_BAND_KS:
return "Ks" ;
163 case SINFO_BAND_L:
return "L" ;
164 case SINFO_BAND_M:
return "M" ;
165 case SINFO_BAND_LP:
return "Lp" ;
166 case SINFO_BAND_MP:
return "Mp" ;
167 case SINFO_BAND_Z:
return "Z" ;
168 case SINFO_BAND_SZ:
return "SZ" ;
169 case SINFO_BAND_SH:
return "SH" ;
170 case SINFO_BAND_SK:
return "SK" ;
171 case SINFO_BAND_SL:
return "SL" ;
172 default:
return "Unknown" ;