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

Generated on 9 Mar 2012 for UVES Pipeline Reference Manual by  doxygen 1.6.1