00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038
00039
00040
00041
00042
00043
00044
00045
00046
00047
00048
00049
00050
00051
00052
00053
00054
00055
00056
00057
00058
00059
00060
00061
00062
00063
00064
00068
00070 #ifdef HAVE_CONFIG_H
00071 # include <config.h>
00072 #endif
00073
00074
00075
00076
00077
00078 #include <uves_physmod_plotmod.h>
00079
00080 #include <uves_plot.h>
00081 #include <uves_msg.h>
00082 #include <uves_error.h>
00083
00084
00085
00086
00087
00088
00089
00090
00091
00092
00093
00094
00095
00096
00097
00098
00110
00111
00112 int
00113 uves_physmod_plotmod(const cpl_table* tbl,
00114 const uves_propertylist* head,
00115 const char* rec_id,
00116 const cpl_parameterlist* params,
00117 enum uves_chip chip)
00118 {
00119
00120 char title[300];
00121 double ech_ang_off=0;
00122 double cd_ang_off=0;
00123 double ccd_ang_off=0;
00124 double wcent=0;
00125 double temp_cam=0;
00126 double slit_width=0;
00127 double slit_length=0;
00128 const char* origfile=NULL;
00129 const char* tpl_start=NULL;
00130 char chip_id[5];
00131
00132 if(chip == UVES_CHIP_BLUE) {
00133 strcpy(chip_id,"EEV");
00134 } else {
00135 strcpy(chip_id,"MIT");
00136 }
00137
00138 check( uves_get_parameter(params, NULL,rec_id,"ech_angle_off",
00139 CPL_TYPE_DOUBLE, &ech_ang_off ) , "Could not read parameter");
00140
00141 check( uves_get_parameter(params, NULL, rec_id, "cd_angle_off",
00142 CPL_TYPE_DOUBLE, &cd_ang_off ) , "Could not read parameter");
00143
00144 check( uves_get_parameter(params, NULL, rec_id, "ccd_rot_angle_off",
00145 CPL_TYPE_DOUBLE, &ccd_ang_off ) , "Could not read parameter");
00146
00147 check (wcent = uves_pfits_get_gratwlen(head, chip),
00148 "Could not read central wavelength setting from input header");
00149
00150 check (temp_cam = uves_pfits_get_tempcam(head,chip),
00151 "Could not read camera's temperature from input header");
00152
00153 check (slit_width = uves_pfits_get_slitwidth(head, chip),
00154 "Could not read slit width input header");
00155
00156 check (slit_length = uves_pfits_get_slitlength(head, chip),
00157 "Could not read slit length input header");
00158
00159 check(tpl_start=uves_pfits_get_tpl_start(head),"Error getting TPL START");
00160
00161 check(origfile=uves_pfits_get_origfile(head),"Error getting ORIGFILE");
00162
00163 sprintf(title,"%s %4.1f %s %2.1f %s %s %3.1f %s ",
00164 "Central wavelength: ",wcent,
00165 " nm, slit: ",slit_length,
00166 " arcsec, CCD:",chip_id,temp_cam," C");
00167
00168
00169
00170 check(uves_plot_table(tbl, "XMOD", "XDIF", title),
00171 "Plotting failed");
00172
00173
00174 check(uves_plot_table(tbl, "XMOD", "YDIF", title),
00175 "Plotting failed");
00176
00177
00178
00179 check(uves_plot_table(tbl, "YMOD", "XDIF", title),
00180 "Plotting failed");
00181
00182
00183
00184 check(uves_plot_table(tbl, "YMOD", "YDIF", title),
00185 "Plotting failed");
00186
00187
00188
00189 check(uves_plot_table(tbl, "XDIF", "YDIF", title),
00190 "Plotting failed");
00191
00192
00193
00194 check(uves_plot_table(tbl, "XMOD", "YMOD", title),
00195 "Plotting failed");
00196
00197 cleanup:
00198 return 0;
00199 }