1
/*===========================================================================
2
Copyright (C) 1995-2009 European Southern Observatory (ESO)
4
This program is free software; you can redistribute it and/or
5
modify it under the terms of the GNU General Public License as
6
published by the Free Software Foundation; either version 2 of
7
the License, or (at your option) any later version.
9
This program is distributed in the hope that it will be useful,
10
but WITHOUT ANY WARRANTY; without even the implied warranty of
11
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12
GNU General Public License for more details.
14
You should have received a copy of the GNU General Public
15
License along with this program; if not, write to the Free
16
Software Foundation, Inc., 675 Massachusetts Ave, Cambridge,
19
Correspondence concerning ESO-MIDAS should be addressed as follows:
20
Internet e-mail: midas@eso.org
21
Postal address: European Southern Observatory
22
Data Management Division
23
Karl-Schwarzschild-Strasse 2
24
D 85748 Garching bei Muenchen
30
===========================================================================*/
35
#include <globaldef.h>
39
extern void c_minmax(), plot_xy(), end_graphic1();
40
extern void set_range();
46
extern struct s_trans T;
47
extern struct s_mod M;
48
extern float XWmin,XWmax;
50
extern float Xatmos[],Yatmos[];
52
extern float Xgrism[],Ygrism[];
54
extern float Xmir[],Ymir[];
56
extern float Xoptics[],Yoptics[];
58
extern float Xfilt[],Yfilt[];
60
extern float Xccd[],Yccd[];
61
extern float Oxmi,Oxma,Oymi,Oyma;
64
float xr[6000],yr[6000];
65
char str[150], str1[40];
66
float interpol(),poisson();
67
float xmi,xma,ymi,yma;
74
M.nmax=(int)((XWmax-XWmin)/T.resolution);
81
fprintf(stderr,"WARNING: array too small, resolution reduced\r\n");
85
xr[i]=XWmin+((float)i)/((float) (M.nmax-1))*(XWmax-XWmin);
92
yr[i]*=interpol(xr[i],Xatmos,Yatmos,Natmos);
98
yr[i]*=yr[i]*=interpol(xr[i],Xmir,Ymir,Nmir);
103
for(i=0;i<M.nmax;i++)
104
yr[i]*=interpol(xr[i],Xgrism,Ygrism,Ngrism);
109
for(i=0;i<M.nmax;i++)
110
yr[i]*=interpol(xr[i],Xfilt,Yfilt,Nfilter);
115
for(i=0;i<M.nmax;i++)
116
yr[i]*=interpol(xr[i],Xoptics,Yoptics,Noptics);
121
for(i=0;i<M.nmax;i++)
122
yr[i]*=interpol(xr[i],Xccd,Yccd,Nccd);
125
c_minmax(xr,yr,M.nmax,&xmi,&xma,&ymi,&yma);
127
sprintf(str1,"\1 Total Transmission");
129
"TITLE=%20s;DTITL=%4.1f;LABX=%12s;LABY=%12s;DLABL=%4.1f;NGEOM;USER;BOLD;GRID;TIME;XSPACE=%1d;",
130
str1, 2.0, "\1Wave [nm]", "\1 Transmission",1.0,0);
135
plot_xy(str,0,xr,yr,M.nmax,XWmin,XWmax,0.,yma);