Main Page | Modules | Data Structures | File List | Data Fields | Globals | Related Pages

extract/source/plot_optics.c

Go to the documentation of this file.
00001 /* === Doxygen Comment ======================================= */
00013 /* =========================================================== */
00014 
00015 #include <IFU_io.h>
00016 #include <IFU_math.h>
00017 #include <snifs.h>
00018 #include <extract.h>
00019 
00020 #ifdef HAVE_LIBDISLIN
00021 #include <dislin.h>
00022 #endif
00023 
00025 #define NCOORD 100
00026 
00028 #define HALFWIND 50
00029 
00031 /* 0=[], 3=+, 5=<>, 15=(), 16=[*], 19=<*>, 21=(*) */
00032 #define MAX_SYMB 3                           /* Maxima */
00033 #define ORD0_SYMB 3                          /* Oth-order */
00034 #define ORD1_SYMB 19                         /* 1st-order */
00035 #define ORD2_SYMB 0                          /* 2nd-order */
00036 #define ORD1_NOL_SYMB 0                      /* 1st-order withou local adjustment */
00037 
00038 /* === Doxygen Comment ======================================= */
00078 /* =========================================================== */
00079 
00080 int main(int argc, char **argv)
00081 {
00082   Channel channel;
00083 
00084   SnifsConfig config;
00085   SnifsOptics optics;
00086 
00087   TABLE mask,table;
00088   Maxima_Set maxset;
00089   IMAGE2D bkgndima;
00090 
00091   char **argval, **arglabel;
00092   char *maskname, *maxname, *arcname, *bkgndname, *tablename, *devname;
00093   char label[lg_label+1];
00094 
00095   int *nopup, *colid;
00096   int i,order,status;
00097   int ARC, DEFAULT, MAX, MASK, ALL, ASCII, BKGND, OUTPUT, LOCAL, OFFSET;
00098   int minorder,maxorder,singlelens,nlbda, dxnc;
00099   int colno,colxd,colyd;
00100   
00101   float *xppup,*yppup,*lbda;
00102   float step,lbdaref,lbdamin,lbdamax, pixsize;
00103   PlotLimits limits;
00104   Plot plot;
00105   
00106   double **dxcoeff;
00107   double offset[2];
00108   double xmla,ymla, xccd,yccd;
00109   double lbda_inf,lbda_sup,xc,yc;
00110 
00111 #ifdef HAVE_LIBDISLIN
00112   char title[4*lg_ident+1];
00113 #endif
00114 
00115   int nx,ny;
00116   float mincut,maxcut,**zmat;
00117 
00118   /* ##### INTRODUCTION ############################## */
00119 
00120   set_purpose("Plot the SNIFS exposures from max and/or mask");
00121   set_arglist("-mask none -max NULL -lines|arc NULL -step 200 -default "
00122               "-orders 0,2 -lens 0 -dev ASCII -limits 0,0:0,0 "
00123               "-bkgnd NULL -cuts 25,99 -table NULL -local -offset NULL");
00124 
00125   init_snifs("$Name:  $","$Revision: 1.33 $");
00126   init_session(argv,argc,&arglabel,&argval);
00127 
00128   if (DEBUG) {
00129     print_msg("$Id: plot_optics.c,v 1.33 2005/09/15 21:43:14 ycopin Exp $");
00130     print_msg("Compilation: %s, %s",__DATE__,__TIME__);
00131   }
00132 
00133   /* ===== Parameters ============================== */
00134 
00135   /* ----- Input ------------------------------ */
00136 
00137   maskname = argval[0];                               /* 0: Input mask      */
00138   if ((MAX = is_set(argval[1]))) maxname = argval[1]; /* 1: Input maximum   */
00139   if ((ARC = is_set(argval[2]))) arcname = argval[2]; /* 2: Input arc table */
00140   get_argval(3,"%f",&step);                           /* 3: Lambda sampling */
00141   DEFAULT = is_true(argval[4]);                       /* 4: Configuration   */
00142   if (sscanf(argval[5], "%d,%d",&minorder,&maxorder) != 2) { /* 5: Orders   */
00143     print_error("Invalid option -orders min_order,max_order (has '%s')",
00144                 argval[5]);
00145     exit_session(ERR_BAD_PARAM);
00146   }
00147   get_argval(6,"%d",&singlelens);                     /* 6: Single lens     */
00148 
00149   if (!strcasecmp((devname = argval[7]),"ASCII") )    /* 7: Output device or file */
00150     *devname = '\0';                         /* Empty string = ASCII */
00151   ASCII = !strlen(devname);
00152   strcpy(plot.devname,devname);
00153   if (sscanf(argval[8], "%f,%f:%f,%f",
00154              &(limits.xmin),&(limits.ymin),
00155              &(limits.xmax),&(limits.ymax)) != 4) { 
00156     print_error("Invalid option -limits xmin,ymin:xmax,ymax (has '%s')",
00157                 argval[8]);                           /* 8: Output limits   */
00158     exit_session(ERR_BAD_PARAM);
00159   }
00160   if (!(limits.xmin) && !(limits.ymin) && !(limits.xmax) && !(limits.ymax)) 
00161     ALL = 1;
00162   else 
00163     ALL = 0;
00164   if ((BKGND = is_set(argval[9]))) bkgndname = argval[9]; /* 9: Background  */
00165   if (sscanf(argval[10], "%f,%f",&mincut,&maxcut) != 2) { 
00166     print_error("Invalid option -cuts min,max (has '%s')",
00167                 argval[10]);                          /* 10: Cuts [%]       */
00168     exit_session(ERR_BAD_PARAM);
00169   }  
00170   if ((OUTPUT = is_set(argval[11]))) tablename = argval[11];  /* 11: Table  */
00171   LOCAL = is_true(argval[12]);                      /* 12: Local adjustment */
00172   if ((OFFSET = is_set(argval[13])) &&           /* 13: User-defined offset */
00173       sscanf(argval[13], "%lf,%lf",&offset[0],&offset[1]) != 2) { 
00174     print_error("Invalid option -offset dx,dy (has '%s')", argval[13]);
00175     exit_session(ERR_BAD_PARAM);
00176   }
00177 
00178   /* ----- Output ------------------------------ */
00179 
00180   print_msg("o Input mask: %s",maskname);
00181   if (MAX) print_msg("o Input max: %s",maxname);
00182   MASK = 1;
00183   if (ARC) print_msg("o Input arc table: %s",arcname);
00184   else {
00185     if (step==0) {
00186       print_msg("o No output from mask");
00187       MASK = 0;
00188     }
00189     else if (step<0)
00190       print_msg("o Simple wavelength plot at %.1f AA",ABS(step));
00191     else
00192       print_msg("o Output wavelength sampling: %.1f AA",step);
00193   }
00194   if (DEFAULT) print_msg("o Default configuration used");
00195   else         print_msg("o Reading configuration from mask");
00196   print_msg("o Orders: %d to %d",minorder,maxorder);
00197   if (singlelens) print_msg("o Testing single lens #%d",ABS(singlelens));
00198   if (ASCII) print_msg("o ASCII output");
00199   else {
00200 #ifdef HAVE_LIBDISLIN
00201     print_msg("o Output DISLIN device: %s",plot.devname);
00202     print_msg("o Symbols (see http://www.mps.mpg.de/dislin/exa_symb.html)");
00203     if (MAX) print_msg("   Max: %d",MAX_SYMB);
00204     for (order=minorder; order<=maxorder; order++) { /* loop over orders */
00205       switch (order) {
00206       case 0: print_msg("   0th-order: %d", ORD0_SYMB); break;
00207       case 1: print_msg("   1st-order: %d", ORD1_SYMB); break;
00208       case 2: print_msg("   2nd-order: %d", ORD2_SYMB); break;
00209       }
00210     }
00211     if (LOCAL && singlelens) print_msg("   No-local adjustment: %d",ORD1_NOL_SYMB);
00212 #else
00213     print_error("DISLIN output not supported in current executable");
00214     exit_session(ERR_BAD_PARAM);
00215 #endif
00216   }
00217   if (ALL) print_msg("o Ouput covering full CCD frame");
00218   else print_msg("o Output frame: [%.1f,%.1f:%.1f,%.1f]",
00219                  limits.xmin,limits.ymin,limits.xmax,limits.ymax);
00220   if (BKGND) {
00221     if (ASCII) {
00222       print_warning("No background frame in ASCII output");
00223       BKGND = 0;
00224     }
00225     else {
00226       print_msg("o Background frame: %s",bkgndname);
00227       print_msg("o Background cuts: %.1f%%-%.1f%%",mincut,maxcut);
00228     }
00229   }
00230   if (OUTPUT) print_msg("o Output table: %s",tablename);
00231   if (OFFSET) print_msg("o User-defined offset: %g x %g px", offset[0],offset[1]);
00232 
00233   /* ===== Mask ============================== */
00234 
00235   if ((status = open_mask(maskname,&mask,(DEFAULT)?"IO":"I"))) 
00236     exit_session(status);
00237   handle_select_flag(&mask,'W',NULL);
00238 
00239   /* ===== Configuration ============================== */
00240 
00241   /* ----- Channel ------------------------------ */
00242 
00243   lbdaref = read_lbdaref(&mask);
00244 
00245   /* ----- Configuration ------------------------------ */
00246 
00247   if (DEFAULT) {
00248     if (!(channel = read_channel(&mask))) exit_session(channel);
00249     read_default_snifs_config(channel,&config);
00250 
00251     if (write_snifs_config_to_mask(&mask,&config)) {
00252       print_warning("Cannot write configuration %s to mask %s",
00253                     config.name,maskname);
00254     }
00255   }
00256   else if (read_snifs_config_from_mask(&mask,&config))
00257     exit_session(ERR_NODESC);
00258 
00259   if (DEBUG) print_snifs_config(&config);
00260 
00261   optics = config.optics;
00262   
00263   /* ----- Variables ------------------------------ */
00264 
00265   lbda_inf = optics.filter.inf_util;         /* Wavelength coverage */
00266   lbda_sup = optics.filter.sup_util;
00267   xc       = optics.center.xc;               /* Center of distortion */
00268   yc       = optics.center.yc;
00269 
00270   pixsize  = config.ccd.pixsize*1e-3;        /* Pixel size [mm] */
00271 
00272   /* ===== Mpup coordinates ============================== */
00273 
00274   print_msg("Reading mpup coordinates (%.1f AA) from mask...",lbdaref);
00275 
00276   /* Real distorted positions */
00277   colno = get_col_ref(&mask,LAB_COL_NO);
00278   colxd = get_col_ref(&mask,LAB_COL_XLD);
00279   colyd = get_col_ref(&mask,LAB_COL_YLD);
00280   if (colno<0 || colxd<0 || colyd<0) {
00281     print_error("Cannot read specific mask columns in %s",maskname);
00282     exit_session(ERR_NOCOL);
00283   }
00284 
00285   nopup =   (int *)malloc(mask.row*sizeof(int));    /* Mpup number */
00286   xppup = (float *)malloc(mask.row*sizeof(float));  /* Mpup position [px] */
00287   yppup = (float *)malloc(mask.row*sizeof(float)); 
00288 
00289   /* [CCD/px] */
00290   RD_col(&mask,colno,nopup);
00291   RD_col(&mask,colxd,xppup);
00292   RD_col(&mask,colyd,yppup);
00293 
00294   print_msg("   %d (1st-order) mpups",mask.row);
00295 
00296   /* Output limits */
00297   if (ALL) {
00298     limits.xmin = 1; limits.xmax = config.ccd.nx+1; /* Coordinates */
00299     limits.ymin = 1; limits.ymax = config.ccd.ny+1;
00300 
00301     if (singlelens) {                        /* Restrict */
00302       for (i=0; i<mask.row; i++) {           /* loop over lenses */
00303         if (nopup[i]==ABS(singlelens)) {
00304           ALL = 0;
00305           limits.xmin = xppup[i] - HALFWIND;
00306           limits.xmax = xppup[i] + HALFWIND;
00307 
00308           if (minorder == maxorder) {
00309             /* Close-up on the spectrum */
00310 
00311             /* [CCD/px] -> [MLA/mm] */
00312             snifs_optics_CCD2MLA(&optics, xppup[i],yppup[i], &xmla,&ymla, 
00313                                  pixsize,lbdaref);
00314 
00315             /* [MLA/mm] -> [CCD/px] */
00316             snifs_optics_MLA2CCD(&optics, xmla,ymla, &xccd,&yccd, 
00317                                  pixsize,lbda_sup,minorder);
00318             limits.ymin = yccd - HALFWIND; /* Red is down */
00319 
00320             snifs_optics_MLA2CCD(&optics, xmla,ymla, &xccd,&yccd, 
00321                                  pixsize,lbda_inf,minorder);
00322             limits.ymax = yccd + HALFWIND; /* Blue is up */
00323           }
00324           
00325           print_msg("Restricting output to [%.1f,%.1f:%.1f,%.1f] "
00326                     "around lens #%d (%.1fx%.1f)",
00327                     limits.xmin,limits.ymin,limits.xmax,limits.ymax,
00328                     nopup[i],xppup[i],yppup[i]);
00329           break;
00330         }
00331       }
00332       if (ALL) {
00333         print_error("Cannot find lens #%d in mask", ABS(singlelens));
00334         exit_session(ERR_BAD_PARAM);
00335       }
00336     }
00337   }
00338   
00339   plot.Limits = limits; /* Store limits in Plot structure */
00340 
00341   /* ===== Local adjustment ============================== */
00342 
00343   if (LOCAL) {
00344 
00345     /* Reading dx(lambda) from max analysis in create_mask */
00346     if ((dxnc = read_local_model(&mask,1,&dxcoeff)) < 0)
00347       exit_session(ERR_NODESC);
00348     else if (dxnc == 0) {
00349       print_warning("Local correction DISABLED (no model available)");
00350       LOCAL = 0;
00351     }
00352 
00353   } /* LOCAL */
00354 
00355   close_table(&mask);
00356 
00357   /* ===== Maxima ============================== */
00358 
00359   if (MAX && (status = open_max(maxname, &maxset)))
00360     exit_session(status);
00361 
00362   /* ===== Wavelength sampling ============================== */
00363 
00364   if (ARC) {
00365 
00366     /* ----- Arc table ------------------------------ */
00367 
00368     print_msg("Opening arc table '%s'...", arcname);
00369     if ((nlbda = read_lbdaref_table(arcname,"LAMBDA","MASK",
00370                                     &lbda,lbda_inf,lbda_sup)) < 0) {
00371       print_error("No line read from %s",arcname);
00372       exit_session(ERR_NODATA);
00373     }
00374 
00375     /* Let's assume it's ordered, just informative anyway */
00376     lbdamin = lbda[0];
00377     lbdamax = lbda[nlbda-1];
00378 
00379   }
00380   else if (MASK) {
00381     if (step < 0) {
00382 
00383       /* ----- Single wavelength ------------------------------ */
00384       
00385       nlbda = 1;
00386       lbda = (float *)malloc(nlbda*sizeof(float));
00387       lbda[0] = (step)? ABS(step) : lbdaref;
00388 
00389       print_msg("Single wavelength test: %.1f AA",lbda[0]);
00390     }
00391     else {
00392 
00393       /* ----- Regular sampling ------------------------------ */
00394 
00395       print_msg("Building up wavelength ramp (%.1f-%.1f, %.1f AA)...", 
00396                 lbda_inf,lbda_sup,step);
00397 
00398       nlbda = 1 + (int)(lbda_sup - lbda_inf)/step;
00399       lbda = (float *)malloc(nlbda*sizeof(float));
00400 
00401       lbdamin = lbda_inf + (lbda_sup - lbda_inf - nlbda*step)/2.;
00402       for (i=0; i<nlbda; i++) lbda[i] = lbdamin + i*step;
00403       lbdamax = lbda[nlbda-1];
00404 
00405       print_msg("   Wavelength sampling: %d steps in [%.1f,%.1f]",
00406                 nlbda,lbdamin,lbdamax);
00407       if (DEBUG) 
00408         for (i=0; i<nlbda; i++) print_msg("   Line %2d: %.1f AA",i+1,lbda[i]);
00409     }
00410   }
00411 
00412   /* ===== Background ============================== */
00413 
00414   if (BKGND) {
00415 
00416     if ((status = open_image(&bkgndima,bkgndname,"I",0,"background")))
00417       exit_session(status);
00418 
00419     /* Check channel */
00420     if ((channel = read_channel(&bkgndima)) != optics.channel) {
00421       print_warning("mask channel (%s) and background frame channel (%s) are different",
00422                     channel_names[optics.channel],channel_names[channel]);
00423     }
00424 
00425     plot_set_bkgnd(&bkgndima, &plot, mincut,maxcut, &nx,&ny, &zmat);
00426 
00427     close_frame(&bkgndima);
00428   }
00429   else {
00430     plot.mincut = 0; /* Just to please graphical routines */
00431     plot.maxcut = 1;
00432 
00433   } /* BKGND */
00434 
00435   /* ===== Table ============================== */
00436 
00437   if (OUTPUT) {
00438 
00439     print_msg("Creating output table %s",tablename);
00440     if (DEBUG) 
00441       print_msg("   2x%d columns XLBDAn,YLBDAn and %d keywords LBDAn",
00442                 nlbda,nlbda);
00443 
00444     /* Creating table */
00445     if (create_table(&table,tablename,-1,-1,'Q',"CCD positions") < 0) {
00446       print_error("Cannot create table %s",tablename);
00447       exit_session(ERR_CREAT);
00448     }
00449     /* Storing wavelengthes in descriptors */
00450     for (i=0; i<nlbda; i++) {
00451       sprintf(label,"LBDA%d",i+1);
00452       WR_desc(&table,label,FLOAT,1,&(lbda[i]));
00453     }
00454     /* Creating columns */
00455     colid = (int *)malloc(2*nlbda*sizeof(int));
00456     for (i=0; i<nlbda; i++) {
00457       sprintf(label,"XLBDA%d",i+1);
00458       colid[2*i]   = create_col(&table,label,FLOAT,'R',"F7.2", "px"); /* X */
00459       sprintf(label,"YLBDA%d",i+1);
00460       colid[2*i+1] = create_col(&table,label,FLOAT,'R',"F7.2", "px"); /* Y */
00461     } 
00462 
00463   } /* OUTPUT */
00464 
00465   /* ##### PLOT OPTICS ############################## */
00466 
00467   /* ===== Initialization ============================== */
00468 
00469 #ifdef HAVE_LIBDISLIN
00470   if (!ASCII) {
00471 
00472     /* ----- Graphical output ------------------------------ */
00473 
00474     plot_start(&plot,0.7);
00475 
00476     if (BKGND) autres(nx,ny);                /* Automatic pixel computation */
00477     nobar();                                 /* no color bar */
00478     plot_axes(&plot,"x [px]","y [px]");
00479 
00480     if (BKGND) crvmat(zmat[0],nx,ny,1,1);
00481 
00482     sprintf(title,"SNIFS optics\nMask: %s\n",maskname);
00483     if (MAX) sprintf(title,"%sMax: %s\n",title,maxname);
00484     if (BKGND) sprintf(title,"%sBackground: %s [%7.1e,%7.1e]",
00485                        title,bkgndname,plot.mincut,plot.maxcut);
00486     plot_title(title);
00487   }
00488 #endif
00489   
00490   /* ===== Max ============================== */
00491 
00492   if (MAX) {
00493     plot.Symbol.shape = MAX_SYMB;            /* symb.3 = + */
00494     plot.Symbol.size  = 5;                   /* default = 35 */
00495     plot.Symbol.color = 255;                 /* Foreground */
00496     
00497     plot_max(&maxset,&plot, (OFFSET? offset:NULL));
00498   }
00499   
00500   /* ===== Mask ============================== */
00501 
00502   if (MASK) {
00503     plot.Symbol.size = 10;  /* default = 35 */
00504 
00505     for (i=0; i<mask.row; i++) { /* loop over lenses */
00506       if (singlelens) {
00507         if (nopup[i]!=ABS(singlelens))
00508           if (singlelens > 0)
00509             plot.Symbol.size = 10;    /* Plot other lenses w/ smaller marks */
00510           else
00511             continue;                       /* Do not plot the other lenses */
00512         else 
00513           plot.Symbol.size = 20; /* Bigger marks (Hard-coded: see proc_plot) */
00514       }
00515       
00516       plot.Symbol.color = (30*i)%255 + 1;
00517 
00518       /* Set x|ymla = MAXDOUBLE to compute proper values only once */
00519       xmla = MAXDOUBLE; ymla = MAXDOUBLE;
00520       
00521       for (order=minorder; order<=maxorder; order++) { /* loop over orders */
00522 
00523         switch (order) {
00524         case 0: plot.Symbol.shape = ORD0_SYMB; break;
00525         case 1: plot.Symbol.shape = ORD1_SYMB; break;
00526         case 2: plot.Symbol.shape = ORD2_SYMB; break;
00527         }
00528         
00529         if (LOCAL && order==1) {
00530           if (has_local_model(dxnc, dxcoeff[i]))
00531             plot_lens(&optics, nopup[i],xppup[i],yppup[i], nlbda,lbda, order,
00532                       &plot, lbdaref, pixsize, dxnc,dxcoeff[i], 
00533                       (OFFSET? offset:NULL), &xmla,&ymla);
00534           else 
00535             print_warning("Lens #%d has no local adjustment, skipping", nopup[i]);
00536         }
00537         else 
00538           plot_lens(&optics, nopup[i],xppup[i],yppup[i], nlbda,lbda, order,
00539                     &plot, lbdaref, pixsize, 0,NULL, 
00540                     (OFFSET? offset:NULL), &xmla,&ymla);
00541 
00542         if (nopup[i]==ABS(singlelens) && LOCAL && order==1) { /* Overplot without local adj. */
00543           plot.Symbol.shape = ORD1_NOL_SYMB;
00544           plot_lens(&optics, nopup[i],xppup[i],yppup[i], nlbda,lbda, order,
00545                     &plot, lbdaref, pixsize, 0,NULL, 
00546                     (OFFSET? offset:NULL), &xmla,&ymla);
00547         }
00548         
00549       } /* order */
00550 
00551       if (OUTPUT)
00552         plot_lens_tab(&optics, xppup[i],yppup[i], nlbda,lbda, 1,
00553                       &table, colid, i, lbdaref,pixsize,
00554                       dxnc,(dxnc? dxcoeff[i]:NULL), (OFFSET? offset:NULL),
00555                       &xmla,&ymla);
00556 
00557 //      /* DEBUG DEBUG DEBUG */
00558 //      if (singlelens && nopup[i]==ABS(singlelens)) {
00559 //        SnifsOptics refoptics;
00560 //
00561 //        xmla = MAXDOUBLE; ymla = MAXDOUBLE; /* Have to be computed again */
00562 //
00563 //        print_msg("DEBUG DEBUG DEBUG: lens #%d (%.2fx%.2f) for i = %d",
00564 //                  nopup[i],xppup[i],yppup[i],i);
00565 //
00566 //        /* Mask Parameters:
00567 //           collimator: f,E,lc[3]
00568 //           camera:     f,E,lc[3]
00569 //           grism:      A,tiltx,tilty,rotz
00570 //           center:     x,y
00571 //        */
00572 //        //print_msg("DEBUG DEBUG DEBUG: adding 20%% to Fcoll");
00573 //        //optics.collimator.focal *= 1.2;
00574 //        //print_msg("DEBUG DEBUG DEBUG: adding 5%% to Fcam");
00575 //        //optics.camera.focal *= 1.05;
00576 //        //print_msg("DEBUG: Ecoll * 10");
00577 //        //optics.collimator.distor *= 10.;
00578 //        //print_msg("DEBUG: Ecam * 5");
00579 //        //optics.camera.distor *= 5;
00580 //        //print_msg("DEBUG: adding 1 to A");
00581 //        //optics.grism.A += 1./180.*M_PI;
00582 //        //print_msg("DEBUG: adding 1 to rotz");
00583 //        //optics.grism.rotz += 1./180.*M_PI;
00584 //        //print_msg("DEBUG: adding 1 to rotx");
00585 //        //optics.grism.tiltx = 1./180.*M_PI;
00586 //        //print_msg("DEBUG: adding 1 to rotx");
00587 //        //optics.grism.tilty = 1./180.*M_PI;
00588 //        //print_msg("DEBUG DEBUG DEBUG: offseting dist. center by -10x-10 px");
00589 //        //optics.center.xc -= 10; optics.center.yc -= 10;
00590 //
00591 //        print_msg("DEBUG: setting optics to default values");
00592 //        read_default_snifs_config(optics.channel,&config);
00593 //
00594 //        plot.Symbol.color = (plot.Symbol.color+125)%255 + 1;
00595 //        
00596 //        for (order=minorder; order<=maxorder; order++) { /* loop over orders */
00597 //
00598 //          switch (order) {
00599 //          case 0: plot.Symbol.shape = ORD0_SYMB; break;
00600 //          case 1: plot.Symbol.shape = ORD1_SYMB; break;
00601 //          case 2: plot.Symbol.shape = ORD2_SYMB; break;
00602 //          }
00603 //        
00604 //          plot_lens(&refoptics, nopup[i],xppup[i],yppup[i], nlbda,lbda, order,
00605 //                    &plot, lbdaref, pixsize,
00606 //                    dxnc,(dxnc? dxcoeff[i]:NULL), (OFFSET? offset:NULL),
00607 //                    &xmla,&ymla);
00608 //
00609 //        } /* order */
00610 //      }
00611 //      /* DEBUG DEBUG DEBUG */
00612 
00613     } /* lens */
00614     
00615   }
00616   
00617   /* ===== Conclusion ============================== */
00618 
00619 #ifdef HAVE_LIBDISLIN
00620   if (!ASCII) {
00621 
00622     /* ----- Graphical output ------------------------------ */
00623 
00624     disfin();
00625   }
00626 #endif
00627 
00628   free(nopup); free(xppup); free(yppup); free(lbda);
00629 
00630   if (BKGND) free2d(&zmat,FLOAT);
00631   if (OUTPUT) close_table(&table);
00632 
00633   exit_session(OK);
00634   return(OK);
00635 }
00636 
00637 /* 
00638 ;;; Local Variables: ***
00639 ;;; eval: (add-to-list 'c-font-lock-extra-types "SnifsConfig") ***
00640 ;;; eval: (add-to-list 'c-font-lock-extra-types "SnifsOptics") ***
00641 ;;; eval: (add-to-list 'c-font-lock-extra-types "PlotLimits") ***
00642 ;;; eval: (add-to-list 'c-font-lock-extra-types "Plot") ***
00643 ;;; End: ***
00644 */

Generated on Wed Oct 26 23:59:39 2005 for Snifs by doxygen 1.3.5