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 
00030 /* === Doxygen Comment ======================================= */
00072 /* =========================================================== */
00073 
00074 int main(int argc, char **argv)
00075 {
00076   Channel channel;
00077 
00078   SnifsConfig config;
00079   SnifsOptics optics;
00080 
00081   TABLE mask,arctable,table;
00082   Maxima_Set maxset;
00083   IMAGE2D bkgndima;
00084 
00085   char **argval, **arglabel;
00086   char *maskname, *maxname, *arcname, *bkgndname, *tablename;
00087   char label[lg_label+1];
00088 
00089   int *nopup, *colid;
00090   int i,order,status;
00091   int ARC, DEFAULT, MAX, MASK, ALL, ASCII, BKGND, OUTPUT, LOCAL, OFFSET;
00092   int minorder,maxorder,singlelens,nlbda, dxnc;
00093   int colarc,colno,colxd,colyd;
00094   
00095   float *xppup,*yppup,*tmplbda,*lbda;
00096   float step,lbdaref,lbdamin,lbdamax, pixsize;
00097   PlotLimits limits;
00098   Plot plot;
00099   
00100   double **dxcoeff;
00101   double offset[2];
00102   double xmla,ymla, xccd,yccd;
00103   double lbda_inf,lbda_sup,xc,yc;
00104 
00105 #ifdef HAVE_LIBDISLIN
00106   char title[4*lg_ident+1];
00107 #endif
00108 
00109   int nx,ny;
00110   float mincut,maxcut,**zmat;
00111 
00112   /* ##### INTRODUCTION ############################## */
00113 
00114   set_purpose("Plot the SNIFS exposures from max and/or mask");
00115   set_arglist("-mask none -max NULL -lines|arc NULL -step 200 -default "
00116               "-orders 0,2 -lens 0 -dev ASCII -limits 0,0:0,0 "
00117               "-bkgnd NULL -cuts 25,99 -table NULL -local -offset NULL");
00118 
00119   init_snifs("$Name:  $");
00120   init_session(argv,argc,&arglabel,&argval);
00121 
00122   if (DEBUG) {
00123     print_msg("$Id: plot_optics.c,v 1.24 2004/11/09 18:01:27 ycopin Exp $");
00124     print_msg("Compilation: %s, %s",__DATE__,__TIME__);
00125   }
00126 
00127   /* ===== Parameters ============================== */
00128 
00129   /* ----- Input ------------------------------ */
00130 
00131   maskname = argval[0];                               /* 0: Input mask      */
00132   if ((MAX = is_set(argval[1]))) maxname = argval[1]; /* 1: Input maximum   */
00133   if ((ARC = is_set(argval[2]))) arcname = argval[2]; /* 2: Input arc table */
00134   get_argval(3,"%f",&step);                           /* 3: Lambda sampling */
00135   DEFAULT = is_true(argval[4]);                       /* 4: Configuration   */
00136   if (sscanf(argval[5], "%d,%d",&minorder,&maxorder) != 2) { /* 5: Orders   */
00137     print_error("Invalid option -orders min_order,max_order (has '%s')",
00138                 argval[5]);
00139     exit_session(ERR_BAD_PARAM);
00140   }
00141   get_argval(6,"%d",&singlelens);                     /* 6: Single lens     */
00142   strncpy(plot.devname,argval[7],5);                  /* 7: Output device   */
00143   upper_strg(plot.devname);
00144   ASCII = !strcmp(plot.devname,"ASCII");
00145   plot.Graph = !ASCII;                      /* Store flag in Plot structure */
00146   if (sscanf(argval[8], "%f,%f:%f,%f",
00147              &(limits.xmin),&(limits.ymin),
00148              &(limits.xmax),&(limits.ymax)) != 4) { 
00149     print_error("Invalid option -limits xmin,ymin:xmax,ymax (has '%s')",
00150                 argval[8]);                           /* 8: Output limits   */
00151     exit_session(ERR_BAD_PARAM);
00152   }
00153   if (!(limits.xmin) && !(limits.ymin) && !(limits.xmax) && !(limits.ymax)) 
00154     ALL = 1;
00155   else 
00156     ALL = 0;
00157   if ((BKGND = is_set(argval[9]))) bkgndname = argval[9]; /* 9: Background  */
00158   if (sscanf(argval[10], "%f,%f",&mincut,&maxcut) != 2) { 
00159     print_error("Invalid option -cuts min,max (has '%s')",
00160                 argval[10]);                          /* 10: Cuts [%]       */
00161     exit_session(ERR_BAD_PARAM);
00162   }  
00163   if ((OUTPUT = is_set(argval[11]))) tablename = argval[11];  /* 11: Table  */
00164   LOCAL = is_true(argval[12]);                      /* 12: Local adjustment */
00165   if ((OFFSET = is_set(argval[13])) &&           /* 13: User-defined offset */
00166       sscanf(argval[13], "%lf,%lf",&offset[0],&offset[1]) != 2) { 
00167     print_error("Invalid option -offset dx,dy (has '%s')", argval[13]);
00168     exit_session(ERR_BAD_PARAM);
00169   }
00170 
00171   /* ----- Output ------------------------------ */
00172 
00173   print_msg("o Input mask: %s",maskname);
00174   if (MAX) print_msg("o Input max: %s",maxname);
00175   MASK = 1;
00176   if (ARC) print_msg("o Input arc table: %s",arcname);
00177   else {
00178     if (step==0) {
00179       print_msg("o No output from mask");
00180       MASK = 0;
00181     }
00182     else if (step<0)
00183       print_msg("o Simple wavelength plot at %.1f AA",ABS(step));
00184     else
00185       print_msg("o Output wavelength sampling: %.1f AA",step);
00186   }
00187   if (DEFAULT) print_msg("o Default configuration used");
00188   else         print_msg("o Reading configuration from mask");
00189   print_msg("o Orders: %d to %d",minorder,maxorder);
00190   if (singlelens) print_msg("o Testing single lens #%d",ABS(singlelens));
00191   if (ASCII) print_msg("o Traditional ASCII output");
00192   else {
00193 #ifdef HAVE_LIBDISLIN
00194     print_msg("o Output DISLIN device: %s",plot.devname);
00195 #else
00196     print_error("DISLIN output not supported in current executable");
00197     exit_session(ERR_BAD_PARAM);
00198 #endif
00199   }
00200   if (ALL) print_msg("o Ouput covering full CCD frame");
00201   else print_msg("o Output frame: [%.1f,%.1f:%.1f,%.1f]",
00202                  limits.xmin,limits.ymin,limits.xmax,limits.ymax);
00203   if (BKGND) {
00204     if (ASCII) {
00205       print_warning("No background frame in plain ASCII output");
00206       BKGND = 0;
00207     }
00208     else {
00209       print_msg("o Background frame: %s",bkgndname);
00210       print_msg("o Background cuts: %.1f%%-%.1f%%",mincut,maxcut);
00211     }
00212   }
00213   if (OUTPUT) print_msg("o Output table: %s",tablename);
00214   if (OFFSET) print_msg("o User-defined offset: %g x %g px", offset[0],offset[1]);
00215 
00216   /* ===== Mask ============================== */
00217 
00218   if ((status = open_mask(maskname,&mask,(DEFAULT)?"IO":"I"))) 
00219     exit_session(status);
00220   handle_select_flag(&mask,'W',NULL);
00221 
00222   /* ===== Configuration ============================== */
00223 
00224   /* ----- Channel ------------------------------ */
00225 
00226   lbdaref = read_lbdaref(&mask);
00227 
00228   /* ----- Configuration ------------------------------ */
00229 
00230   if (DEFAULT) {
00231     if (!(channel = read_channel(&mask))) exit_session(channel);
00232     read_default_snifs_config(channel,&config);
00233 
00234     if (write_snifs_config_to_mask(&mask,&config)) {
00235       print_warning("Cannot write configuration %s to mask %s",
00236                     config.name,maskname);
00237     }
00238   }
00239   else if (read_snifs_config_from_mask(&mask,&config))
00240     exit_session(ERR_NODESC);
00241 
00242   if (DEBUG) print_snifs_config(&config);
00243 
00244   optics = config.optics;
00245   
00246   /* ----- Variables ------------------------------ */
00247 
00248   lbda_inf = optics.filter.inf_util;         /* Wavelength coverage */
00249   lbda_sup = optics.filter.sup_util;
00250   xc       = optics.center.xc;               /* Center of distortion */
00251   yc       = optics.center.yc;
00252 
00253   pixsize  = config.ccd.pixsize*1e-3;        /* Pixel size [mm] */
00254 
00255   /* ===== Mpup coordinates ============================== */
00256 
00257   print_msg("Reading mpup coordinates (%.1f A) from mask...",lbdaref);
00258 
00259   /* Real distorted positions */
00260   colno = get_col_ref(&mask,LAB_COL_NO);
00261   colxd = get_col_ref(&mask,LAB_COL_XLD);
00262   colyd = get_col_ref(&mask,LAB_COL_YLD);
00263   if (colno<0 || colxd<0 || colyd<0) {
00264     print_error("Cannot read specific mask columns in %s",maskname);
00265     exit_session(ERR_NOCOL);
00266   }
00267 
00268   nopup =   (int *)malloc(mask.row*sizeof(int));    /* Mpup number */
00269   xppup = (float *)malloc(mask.row*sizeof(float));  /* Mpup position [px] */
00270   yppup = (float *)malloc(mask.row*sizeof(float)); 
00271 
00272   /* [CCD/px] */
00273   RD_col(&mask,colno,nopup);
00274   RD_col(&mask,colxd,xppup);
00275   RD_col(&mask,colyd,yppup);
00276 
00277   print_msg("   %d (1st-order) mpups",mask.row);
00278 
00279   /* Output limits */
00280   if (ALL) {
00281     limits.xmin = 1; limits.xmax = config.ccd.nx+1; /* Coordinates */
00282     limits.ymin = 1; limits.ymax = config.ccd.ny+1;
00283 
00284     if (singlelens) { /* Restrict */
00285       for (i=0; i<mask.row; i++) { /* loop over lenses */
00286         if (nopup[i]==ABS(singlelens)) {
00287           ALL = 0;
00288           limits.xmin = xppup[i] - HALFWIND;
00289           limits.xmax = xppup[i] + HALFWIND;
00290 
00291           if (minorder == maxorder) {
00292             /* Close-up on the spectrum */
00293 
00294             /* [CCD/px] -> [MLA/mm] */
00295             snifs_optics_CCD2MLA(&optics, xppup[i],yppup[i], &xmla,&ymla, 
00296                                  pixsize,lbdaref);
00297 
00298             /* [MLA/mm] -> [CCD/px] */
00299             snifs_optics_MLA2CCD(&optics, xmla,ymla, &xccd,&yccd, 
00300                                  pixsize,lbda_sup,minorder);
00301             limits.ymin = yccd - HALFWIND; /* Red is down */
00302 
00303             snifs_optics_MLA2CCD(&optics, xmla,ymla, &xccd,&yccd, 
00304                                  pixsize,lbda_inf,minorder);
00305             limits.ymax = yccd + HALFWIND; /* Blue is up */
00306           }
00307           
00308           print_msg("Restricting output to [%.1f,%.1f:%.1f,%.1f] "
00309                     "around lens #%d (%.1fx%.1f)",
00310                     limits.xmin,limits.ymin,limits.xmax,limits.ymax,
00311                     nopup[i],xppup[i],yppup[i]);
00312           break;
00313         }
00314       }
00315     }
00316   }
00317   
00318   plot.Limits = limits; /* Store limits in Plot structure */
00319 
00320   /* ===== Local adjustment ============================== */
00321 
00322   dxnc = 0;
00323   if (LOCAL) {
00324 
00325     /* Reading dx(lambda) from max analysis in create_mask */
00326     if ((dxnc = read_local_model(&mask,1,&dxcoeff)) <= 0)
00327       exit_session(ERR_NODESC);
00328 
00329   } /* LOCAL */
00330 
00331   close_table(&mask);
00332 
00333   /* ===== Maxima ============================== */
00334 
00335   if (MAX && (status = open_max(maxname, &maxset)))
00336     exit_session(status);
00337 
00338   /* ===== Wavelength sampling ============================== */
00339 
00340   if (ARC) {
00341 
00342     /* ----- Arc table ------------------------------ */
00343 
00344     print_msg("Opening arc table '%s'...", arcname);
00345     if (open_table(&arctable,arcname,"I") < 0) {
00346       print_error("Unable to open %s",arcname);
00347       exit_session(ERR_OPEN);
00348     }
00349     handle_select_flag(&arctable,'W',NULL);
00350     
00351     colarc = get_col_ref(&arctable,"LAMBDA");
00352     if (colarc<0) {
00353       print_error("Cannot read LAMBDA column in %s",arcname);
00354       exit_session(ERR_NOCOL);
00355     }
00356     /* Read *all* the lambda */ 
00357     tmplbda = (float *)malloc(arctable.row*sizeof(float));
00358     RD_col(&arctable,colarc,tmplbda);
00359 
00360     /* Select lambda in the proper range */
00361     lbda = (float *)malloc(arctable.row*sizeof(float));
00362     for (nlbda=0, i=0; i<arctable.row; i++) {
00363       if (tmplbda[i] >= lbda_inf && tmplbda[i] <= lbda_sup) {
00364         lbda[nlbda++] = tmplbda[i];
00365       }
00366       else if (DEBUG) {
00367         print_msg("Line %d (%.1f A) discarded from [%.1f,%.1f]",
00368                   i+1,tmplbda[i],lbda_inf,lbda_sup);
00369       }
00370     }
00371     lbdamin = lbda[0];
00372     lbdamax = lbda[nlbda-1];
00373 
00374     free(tmplbda);
00375 
00376     close_table(&arctable);
00377   }
00378   else if (MASK) {
00379     if (step < 0) {
00380 
00381       /* ----- Single wavelength ------------------------------ */
00382       
00383       nlbda = 1;
00384       lbda = (float *)malloc(nlbda*sizeof(float));
00385       lbda[0] = (step)? ABS(step) : lbdaref;
00386 
00387       print_msg("Single wavelength test: %.1f AA",lbda[0]);
00388     }
00389     else {
00390 
00391       /* ----- Regular sampling ------------------------------ */
00392 
00393       print_msg("Building up wavelength ramp (%.1f-%.1f, %.1f A)...", 
00394                 lbda_inf,lbda_sup,step);
00395 
00396       nlbda = 1 + (int)(lbda_sup - lbda_inf)/step;
00397       lbda = (float *)malloc(nlbda*sizeof(float));
00398 
00399       lbdamin = lbda_inf + (lbda_sup - lbda_inf - nlbda*step)/2.;
00400       for (i=0; i<nlbda; i++) lbda[i] = lbdamin + i*step;
00401       lbdamax = lbda[nlbda-1];
00402     }
00403   }
00404 
00405   if (ARC || step>0) {
00406     print_msg("Wavelength sampling: %d steps in [%.1f,%.1f]",
00407               nlbda,lbdamin,lbdamax);
00408     if (DEBUG) 
00409       for (i=0; i<nlbda; i++) print_msg("Line %d: %.1f A",i+1,lbda[i]);    
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("Unable to 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 = 3;   /* 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) { /* 0=[], 3=+, 5=<>, 15=(), 16=[*], 19=<*>, 21=(*) */
00524         case 0: plot.Symbol.shape = 3;  break;
00525         case 1: plot.Symbol.shape = 19; break;
00526         case 2: plot.Symbol.shape = 0;  break;
00527         }
00528         
00529         plot_lens(&optics, nopup[i],xppup[i],yppup[i], nlbda,lbda, order,
00530                   &plot, lbdaref, pixsize,
00531                   dxnc,(dxnc? dxcoeff[i]:NULL), (OFFSET? offset:NULL),
00532                   &xmla,&ymla);
00533 
00534 //        if (LOCAL && order==1) {             /* Overplot without local adj. */
00535 //          plot.Symbol.shape = 0;
00536 //          plot_lens(&optics, nopup[i],xppup[i],yppup[i], nlbda,lbda, order,
00537 //                    &plot, lbdaref, pixsize,0,NULL, (OFFSET? offset:NULL),
00538 //                    &xmla,&ymla);
00539 //        }
00540         
00541       } /* order */
00542 
00543       if (OUTPUT)
00544         plot_lens_tab(&optics, xppup[i],yppup[i], nlbda,lbda, 1,
00545                       &table, colid, i, lbdaref,pixsize,
00546                       dxnc,(dxnc? dxcoeff[i]:NULL), (OFFSET? offset:NULL),
00547                       &xmla,&ymla);
00548 
00549 //      /* DEBUG DEBUG DEBUG */
00550 //      if (singlelens && nopup[i]==ABS(singlelens)) {
00551 //        SnifsOptics refoptics;
00552 //
00553 //        xmla = MAXDOUBLE; ymla = MAXDOUBLE; /* Have to be computed again */
00554 //
00555 //        print_msg("DEBUG DEBUG DEBUG: lens #%d (%.2fx%.2f) for i = %d",
00556 //                  nopup[i],xppup[i],yppup[i],i);
00557 //
00558 //        /* Mask Parameters:
00559 //           collimator: f,E,lc[3]
00560 //           camera:     f,E,lc[3]
00561 //           grism:      A,tiltx,tilty,rotz
00562 //           center:     x,y
00563 //        */
00564 //        //print_msg("DEBUG DEBUG DEBUG: adding 20%% to Fcoll");
00565 //        //optics.collimator.focal *= 1.2;
00566 //        //print_msg("DEBUG DEBUG DEBUG: adding 5%% to Fcam");
00567 //        //optics.camera.focal *= 1.05;
00568 //        //print_msg("DEBUG: Ecoll * 10");
00569 //        //optics.collimator.distor *= 10.;
00570 //        //print_msg("DEBUG: Ecam * 5");
00571 //        //optics.camera.distor *= 5;
00572 //        //print_msg("DEBUG: adding 1 to A");
00573 //        //optics.grism.A += 1./180.*M_PI;
00574 //        //print_msg("DEBUG: adding 1 to rotz");
00575 //        //optics.grism.rotz += 1./180.*M_PI;
00576 //        //print_msg("DEBUG: adding 1 to rotx");
00577 //        //optics.grism.tiltx = 1./180.*M_PI;
00578 //        //print_msg("DEBUG: adding 1 to rotx");
00579 //        //optics.grism.tilty = 1./180.*M_PI;
00580 //        //print_msg("DEBUG DEBUG DEBUG: offseting dist. center by -10x-10 px");
00581 //        //optics.center.xc -= 10; optics.center.yc -= 10;
00582 //
00583 //        print_msg("DEBUG: setting optics to default values");
00584 //        read_default_snifs_config(optics.channel,&config);
00585 //
00586 //        plot.Symbol.color = (plot.Symbol.color+125)%255 + 1;
00587 //        
00588 //        for (order=minorder; order<=maxorder; order++) { /* loop over orders */
00589 //
00590 //          switch (order) { /* 0=[], 3=+, 5=<>, 15=(), 16=[*], 19=<*>, 21=(*) */
00591 //          case 0: plot.Symbol.shape = 3;  break;
00592 //          case 1: plot.Symbol.shape = 19; break;
00593 //          case 2: plot.Symbol.shape = 0;  break;
00594 //          }
00595 //        
00596 //          plot_lens(&refoptics, nopup[i],xppup[i],yppup[i], nlbda,lbda, order,
00597 //                    &plot, lbdaref, pixsize,
00598 //                    dxnc,(dxnc? dxcoeff[i]:NULL), (OFFSET? offset:NULL),
00599 //                    &xmla,&ymla);
00600 //
00601 //        } /* order */
00602 //      }
00603 //      /* DEBUG DEBUG DEBUG */
00604 
00605     } /* lens */
00606     
00607   }
00608   
00609   /* ===== Conclusion ============================== */
00610 
00611 #ifdef HAVE_LIBDISLIN
00612   if (!ASCII) {
00613 
00614     /* ----- Graphical output ------------------------------ */
00615 
00616     disfin();
00617   }
00618 #endif
00619 
00620   free(nopup); free(xppup); free(yppup); free(lbda);
00621 
00622   if (BKGND) free2d(&zmat,FLOAT);
00623   if (OUTPUT) close_table(&table);
00624 
00625   exit_session(OK);
00626   return(OK);
00627 }
00628 
00629 /* 
00630 ;;; Local Variables: ***
00631 ;;; eval: (add-to-list 'c-font-lock-extra-types "SnifsConfig") ***
00632 ;;; eval: (add-to-list 'c-font-lock-extra-types "SnifsOptics") ***
00633 ;;; eval: (add-to-list 'c-font-lock-extra-types "PlotLimits") ***
00634 ;;; eval: (add-to-list 'c-font-lock-extra-types "Plot") ***
00635 ;;; End: ***
00636 */

Generated on Tue Nov 23 18:04:20 2004 for Snifs by doxygen 1.3.3