uves_physmod_utils.h

00001 /*                                                                              *
00002  *   This file is part of the ESO UVES Pipeline                                 *
00003  *   Copyright (C) 2004,2005 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  * $Id: uves_physmod_utils.h,v 1.4 2007/06/06 08:17:33 amodigli Exp $
00021  * $Name: uves-3_4_5 $
00022  * $Revision: 1.4 $
00023  * $Log: uves_physmod_utils.h,v $
00024  * Revision 1.4  2007/06/06 08:17:33  amodigli
00025  * replace tab with 4 spaces
00026  *
00027  * Revision 1.3  2006/08/17 13:56:53  jmlarsen
00028  * Reduced max line length
00029  *
00030  * Revision 1.2  2006/04/10 12:38:43  jmlarsen
00031  * Minor layout change
00032  *
00033  * Revision 1.1  2006/02/03 07:46:30  jmlarsen
00034  * Moved recipe implementations to ./uves directory
00035  *
00036  * Revision 1.7  2005/12/05 16:11:47  amodigli
00037  * Fixed some warning
00038  *
00039  * Revision 1.6  2005/12/02 12:56:09  amodigli
00040  * Fixed compilation problems on mac
00041  *
00042  * Revision 1.5  2005/11/28 15:36:34  amodigli
00043  * Renamed global variables and global function with prefix uves_physmod
00044  *
00045  * Revision 1.4  2005/11/25 08:05:15  amodigli
00046  *  Added plotting facility in physmod. Commented out some strange things in utils.
00047  *
00048  * Revision 1.3  2005/08/29 10:05:08  jmlarsen
00049  * Conversion to/from electrons when calculating photonic noise
00050  *
00051  * Revision 1.2  2005/08/29 08:27:58  amodigli
00052  * Put into repository updates on physical model
00053  *
00054  * Revision 1.1  2005/06/17 11:34:34  amodigli
00055  * First release
00056  *
00057  * ===========================================================================
00058  */
00059 #ifndef UVES_PHYSMOD_UTILS_H
00060 #define UVES_PHYSMOD_UTILS_H
00061 
00062 
00063 #include <cpl.h>
00064 
00065 
00066 #define ARM_UNDEF 0
00067 #define ARM_BLUE  1
00068 #define ARM_RED   2
00069  
00070 
00071 
00072 /*
00073   double fc;
00074   double l;
00075   int m;
00076   char uves_arm;
00077 
00078 
00079   double uves_beta_ech;
00080   double uves_beta_cd ;
00081   char uves_ccd_id;
00082   double uves_physmod_rcd;
00083   double uves_physmod_rech ;
00084   double uves_physmod_x_off;
00085   double uves_physmod_y_off;
00086   double x;
00087   double y;
00088 
00089 */
00090 
00091 /*
00092   double lm, k, theta, *palpha, *pbeta;
00093   int disp;
00094   float binx, biny;
00095   double waveCent;
00096   double ccdrotred, ccdrotblue;
00097   double echred, echblue, xred, xblue;
00098   double p, t, w;
00099   double lambda;
00100   double alpha, beta;
00101   double *puves_beta_ech, *puves_beta_cd, *pfc;
00102   double *puves_physmod_rech, *puves_physmod_rcd, *pblz;
00103   double wave, order, blz;
00104   double *pbinsize,*ppixscale,*ppixscalCD,*plinewidpx,*plinelenpx,*plinewidth,*presol;
00105   double *px, *py;
00106   double *plambda;
00107   double *pdm;
00108   int *pm;
00109   double *lambdaC, *fsrStart, *fsrEnd;
00110   int *nx, *ny;
00111 */
00112 
00113 void uves_physmod_set_incidence(double echred, double echblue, double xred, double xblue);
00114 void uves_set_ccd_rot(double* uves_ccd_rot, double ccdrotred, double ccdrotblue);
00115 void uves_physmod_set_offset(double offset_x, double offset_y,
00116                  double uves_physmod_x_off, double uves_physmod_y_off);
00117 void uves_air_config(double p, double t, double w);
00118 double uves_air_index(double lambda);
00119 int  uves_config(char uves_arm, char uves_ccd_id, int disp, double waveCent, 
00120                 float binx, float biny);
00121 
00122 int  uves_config_cpl(int blue, int upper, int disp, double waveCent, 
00123              float binx, float biny);
00124 int  uves_config_cpl_new(int blue, int upper, int disp, double waveCent, 
00125              float binx, float biny);
00126 
00127 int uves_physmod_find_order(double lm);
00128 
00129 double uves_physmod_find_beta(int m, double k, double l, double alpha);
00130 
00131 void uves_physmod_lambda_order2beta(double lambda, int m, 
00132                     double* puves_beta_ech, double* puves_beta_cd, 
00133              double* pfc);
00134 void uves_beta2xy(double uves_beta_cd, double uves_beta_ech, double fc, double* px, double* py);
00135 void uves_physmod_photo_beta(double lambda, double uves_beta_ech, 
00136                  double uves_beta_cd, double* puves_physmod_rech, 
00137                double* puves_physmod_rcd, double* pblz);
00138 void uves_physmod_pixscl(double wave, int order, double uves_physmod_rech, 
00139              double uves_physmod_rcd, float binx, 
00140             float biny, double fc, double slitwidth, double slitlength,
00141             double* pbinsize, double* ppixscale, double* ppixscalCD, 
00142         double* plinewidpx, double* plinelenpx, double* plinewidth, 
00143             double* presol);
00144 void uves_physmod_xy_model(double lambda, int m, double* px, double* py);
00145 
00146 void uves_physmod_lambda_order_model(double* plambda, int* pm, double x, double y);
00147 void uves_physmod_find_FSR(int m, double* lambdaC, double* fsrStart, double* fsrEnd);
00148 void uves_ccd_size(int* nx, int* ny);
00149 void uves_physmod_xy_regres(double x,double y,double* px,double* py);
00150 
00151 
00152 
00153 /*
00154   Global Variables and Constants
00155 */
00156 
00157 extern float    uves_bin[2];
00158 extern double   uves_ccd_rot[2];
00159 
00160 extern int      uves_cfg_indx;
00161 extern int      uves_x_disp_id;
00162 extern double   uves_alpha0_cd, uves_beta0_cd;
00163 extern char     uves_arm_id;
00164 
00165  
00166 extern double   uves_physmod_offsetx[6];
00167 extern double   uves_physmod_offsety[6];
00168 
00169 #endif

Generated on Thu Nov 15 14:32:29 2007 for UVES Pipeline Reference Manual by  doxygen 1.5.1