Main Page   Modules   Data Structures   File List   Data Fields   Globals  

incl/tiger_defs.h

Go to the documentation of this file.
00001 /* === Doxygen File Comment ============================== */
00012 /* ======================================================= */
00013 
00014 #define LAB_COL_NO "NO"
00015 #define LAB_COL_XLD "XD"
00016 #define LAB_COL_YLD "YD"
00017 #define LAB_COL_XLND "XND"
00018 #define LAB_COL_YLND "YND"
00019 #define LAB_COL_XTH_LD "XTHD"
00020 #define LAB_COL_YTH_LD "YTHD"
00021 #define LAB_COL_XTH_LND "XTHND"
00022 #define LAB_COL_YTH_LND "YTHND"        
00023 #define E3D_TIGER_EXT "TIGERTBL"
00024 
00025 /*____________________ MAXIMA of cross-dispersion profiles __________________*/
00026 
00027 typedef struct
00028 {
00029     float xcoord;                 /* x coordinate of the maximum     */
00030     float intens;                 /* intensity found for the PSF     */
00031     float sigma[2];               /* width found for the PSF         */
00032     float alpha;                  /* alpha coef of the PSF           */
00033 
00034 } max_param;
00035 
00036 typedef struct
00037 {
00038     float     ycoord;             /* y coordinate of this set        */
00039     int       nb_max;             /* number of maxima found          */
00040     max_param *maxima;            /* detailed list of maxima         */
00041 
00042 } max_lines;
00043 
00044 typedef struct            
00045 {
00046 
00047   char config_name[lg_ident+1];
00048 
00049     struct                      /* enlarger :                     */
00050     {
00051       double gamma;             /* enlarging factor               */
00052     } enlarger;
00053 
00054     struct                      /* wedge (angles are in radian)   */
00055     {
00056       double theta_w;           /* rotation between the 2 prisms  */
00057     } wedges; 
00058 
00059     struct                      /* grating prism :                */
00060     {
00061       int index_coef;           /* - index of coefficient         */
00062       double A;                 /* - angle of the prism           */
00063       int    g_per_mm;          /* - number of grooves per mm     */
00064     } grism; 
00065 
00066     struct
00067     {
00068       double inf_util, sup_util;
00069     } filter;
00070 
00071     struct
00072     {
00073       float fratio;
00074     } telescope;
00075 
00076     struct
00077     {
00078       int nx, ny; 
00079           float pixsize;
00080     } ccd;
00081 
00082     int nb_ycoords;         /* number of coordinates on Y axis */
00083     max_lines *line;        /* details of maxima line by line  */
00084 
00085 } Maxima_Set;
00086 
00087 /*________________________________ OPTICAL parameters ________________________*/
00088 
00089 typedef struct
00090 {
00091     struct                        /* enlarger :                     */
00092     {
00093       double gamma;               /* - enlarging factor             */
00094 
00095     } enlarger;
00096 
00097     struct                        /* collimator :                    */
00098     {
00099       double focal_length;        /* - focal length                  */
00100       double distor_coef[2];      /* - coefficient of  distortion    */
00101     } collimator; 
00102 
00103     struct                        /* wedge (angles are in radian)    */
00104     {
00105       int set;                    /* - 1 if wedge is present, else 0 */
00106       double A[2];                /* - angle of each prism  */
00107       double theta_w;             /* - angle of rotation between the 2 prisms */
00108       double theta_d;             /* - angle of rotation of the whole */
00109     } wedges; 
00110 
00111     struct                        /* grating prism :                 */
00112     {
00113       int  set;                   /* - 1 if grism is present, else 0 */
00114       char material[lg_label+1];  /* - name of material              */
00115       int index_coef;             /* - index of coefficient          */
00116       double *indices_coef;       /* - material coef. to compute n   */
00117       double A;                   /* - angle of the prism            */
00118       int    g_per_mm;            /* - number of grooves per mm      */
00119       double w_disp;              /* - wavelength dispersion         */
00120       double tilt1;               /* - first tilt angle (around x)   */
00121       double tilt2;               /* - second tilt angle (around y)  */
00122       double rot;                 /* - rotation angle (around z)     */  
00123     } grism; 
00124 
00125     struct                        /* camera :                        */
00126     {
00127       double focal_length;        /* - focal length                  */
00128       double distor_coef[2];      /* - coefficient of distortion     */
00129     } camera; 
00130 
00131     struct                        /* lens array :                    */
00132     {
00133       double dL;                  /* lens diameter (in mm)         */
00134       double lens_size_pix;       /* size of lens in CCD pixel      */
00135       double angle;               /* rotation angle Lens Array / CCD columns */
00136     } lens_array; 
00137 
00138     struct
00139     {
00140       double inf_util, sup_util;
00141       double central_util, width_util;
00142       double inf_total, sup_total;
00143       double central_total, width_total;
00144      } filter;
00145 
00146     struct
00147     {
00148       double xc, yc; /* distortion center */
00149     } center;
00150 
00151 } Tiger_optics; 
00152 
00153 typedef struct
00154 {
00155   char focal_plane[lg_ident+1];
00156   char enlarger[lg_ident+1];
00157   char filter[lg_ident+1];
00158   char imaging[lg_ident+1];
00159   char sampler[lg_ident+1];
00160   char grism[lg_ident+1];
00161   char wedge[lg_ident+1];
00162   char camera_focus[lg_ident+1];
00163 } Instrument;
00164 
00165 typedef struct
00166 {
00167   char name[lg_ident+1];
00168   double gain;
00169   int nx, ny;
00170   float pixsize; /* size in microns */
00171 } Detector;
00172 
00173 typedef struct
00174 {
00175   double aperture;
00176   double central_obscuration;
00177   float fratio;
00178   double scale; /* arcsec by mm */
00179 } Telescope;
00180 
00181 typedef struct
00182 {
00183   char name[lg_ident+1];
00184   char type;
00185 } Calibration;
00186 
00187 
00188 /*    functions contained in compat.c   */
00189 
00190 int get_lenses_no_from_table(E3D_file *, int *);
00191 
00192 int alloc_3D_max(Maxima_Set *, int, int);
00193 int load_3D_max(Maxima_Set *, char *);
00194 int save_3D_max(Maxima_Set *, char *);
00195 int interpolate_noise(SPECTRUM *);
00196 
00197 /*    functions contained in max_utils.c   */
00198 
00199 double estimated_angle_with_ccd_columns(Maxima_Set *);
00200 float distance_with_nearest_max(Maxima_Set *, float, float);
00201 
00202 /*    functions contained in 3D_utils.c   */
00203 void read_config_from_image(IMAGE2D *, char *, Tiger_optics *, Telescope *, Instrument *, Detector *);
00204 void write_config_to_mask(void *, char *, Tiger_optics *,
00205                           Telescope *, Instrument *, Detector *);
00206 void read_DOPT_from_mask(void *, Tiger_optics *);
00207 void read_config_from_mask(void *, char *, Tiger_optics *,
00208                           Telescope *, Instrument *, Detector *);
00209 void write_config_to_max(Maxima_Set *, char *, Tiger_optics *,
00210                          Telescope *, Detector *);
00211 void compare_config_from_max(Maxima_Set *, char *, Tiger_optics *,
00212                           Telescope *, Detector *);
00213 void compare_configs(Tiger_optics *, Tiger_optics *, Telescope *, Telescope *, 
00214                    Instrument *, Instrument *, Detector *, Detector *); 
00215 void print_optics(Tiger_optics *);
00216 void print_instrument(Instrument *);
00217 void print_CCD(Detector *);
00218 void print_telescope(Telescope *);
00219 
00220 /* functions contained in optics_signature */
00221 int set_optics_default_parameters(Tiger_optics *, char *);
00222 int init_grism(Tiger_optics *, int, char *, double);
00223 int set_grism(Tiger_optics *, double, double, double);
00224 int set_collimator(Tiger_optics *, double, double);
00225 int set_camera(Tiger_optics *, double, double);
00226 int set_wedges(Tiger_optics *, double, double);
00227 int tiger_optics_signature(Tiger_optics *,float, float,float *,float *,float, int);
00228 int tiger_optics_nogrism(Tiger_optics *,float, float,float *,float *,float);
00229 int inv_foc_red(Tiger_optics *,float, float,float *,float *);
00230 int foc_red(Tiger_optics *,float, float,float *,float *);
00231 
00232 /* functions contained in calib_shift */
00233 
00234 int ParanoidCheck(IMAGE2D *, IMAGE2D *);
00235 int ComputeShift(IMAGE2D *, IMAGE2D *, long *, long *, long *, long *, double *);           

Generated on Tue Jul 1 17:35:46 2003 for IFU_C_iolibs by doxygen1.3