00001 /* $Id: visir_spc_optmod.h,v 1.19 2013-03-18 15:10:52 jtaylor Exp $ 00002 * 00003 * This file is part of the VISIR 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: jtaylor $ 00023 * $Date: 2013-03-18 15:10:52 $ 00024 * $Revision: 1.19 $ 00025 * $Name: not supported by cvs2svn $ 00026 */ 00027 00028 #ifndef VISIR_SPC_OPTMOD_H 00029 #define VISIR_SPC_OPTMOD_H 00030 00031 /*----------------------------------------------------------------------------- 00032 Defines 00033 -----------------------------------------------------------------------------*/ 00034 00035 /* The size of the VISIR Optical Model object */ 00036 #define VISIR_SPC_OPTMOD_SIZEOF (4*sizeof(int) + 14 * sizeof(double)) 00037 00038 /* The Central Wavelength [micron] for the LR Prism mode */ 00039 /* Computed by visir_spc_phys_lrp() */ 00040 #define VISIR_SPC_LRP_CWLEN 10.91 00041 00042 /* According to HUKaufl the resolution is approximately 300 */ 00043 #define VISIR_SPC_LRP_RESOL 300. 00044 00045 /* Dispersion at center [pixel/m] (Computed by visir_spc_phys_lrp()) */ 00046 #define VISIR_SPC_LRP_RESOL_DISP 121412177. 00047 00048 /* Wavelength on the 1'st pixel [m] (Computed by visir_spc_phys_lrp()) */ 00049 #define VISIR_SPC_LRP_WLEN0 6.70e-6 00050 00051 /* Wavelength on the last pixel [m] (Computed by visir_spc_phys_lrp()) */ 00052 #define VISIR_SPC_LRP_WLEN1 14.21e-6 00053 00054 #define VISIR_SPC_LRP_NAME "LRP" 00055 00056 /*----------------------------------------------------------------------------- 00057 New types 00058 -----------------------------------------------------------------------------*/ 00059 00060 enum visir_spc_resol_ { 00061 VISIR_SPC_R_ERR = 0, 00062 VISIR_SPC_R_LRP, 00063 VISIR_SPC_R_LR, 00064 VISIR_SPC_R_MR, 00065 VISIR_SPC_R_HR, 00066 VISIR_SPC_R_GHR 00067 }; 00068 00069 typedef enum visir_spc_resol_ visir_spc_resol; 00070 00071 struct visir_optmod_ { 00072 /* For this struct only the size is public */ 00073 /* The first member ensures proper alignment of this and its 00074 corresponding private struct, the second member ensures that 00075 the two structs have identical sizes */ 00076 00077 /* Any access to the below two members leads to undefined behaviour! */ 00078 00079 double ensure_alignment; 00080 char contents[VISIR_SPC_OPTMOD_SIZEOF - sizeof(double)]; 00081 }; 00082 00083 typedef struct visir_optmod_ visir_optmod; 00084 00085 #undef VISIR_SPC_OPTMOD_SIZEOF 00086 00087 /*----------------------------------------------------------------------------- 00088 Function prototypes 00089 -----------------------------------------------------------------------------*/ 00090 00091 int visir_spc_optmod_init(visir_spc_resol, double, visir_optmod *, int); 00092 double visir_spc_optmod_wlen(const visir_optmod *, double *, double *); 00093 double visir_spc_optmod_cross_dispersion(const visir_optmod *, double); 00094 double visir_spc_optmod_echelle(const visir_optmod *, double, int); 00095 double visir_spc_optmod_resolution(const visir_optmod *); 00096 double visir_spc_optmod_dispersion(const visir_optmod *); 00097 int visir_spc_optmod_side_is_A(const visir_optmod *); 00098 int visir_spc_optmod_get_echelle_order(const visir_optmod *); 00099 00100 #endif
1.6.1