vircam_dark_current.c

00001 /* $Id: vircam_dark_current.c,v 1.52 2012/01/16 12:32:18 jim Exp $
00002  *
00003  * This file is part of the VIRCAM Pipeline
00004  * Copyright (C) 2005 Cambridge Astronomy Survey Unit
00005  *
00006  * This program is free software; you can redistribute it and/or modify
00007  * it under the terms of the GNU General Public License as published by
00008  * the Free Software Foundation; either version 2 of the License, or
00009  * (at your option) any later version.
00010  *
00011  * This program is distributed in the hope that it will be useful,
00012  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00013  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00014  * GNU General Public License for more details.
00015  *
00016  * You should have received a copy of the GNU General Public License
00017  * along with this program; if not, write to the Free Software
00018  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00019  */
00020 
00021 /*
00022  * $Author: jim $
00023  * $Date: 2012/01/16 12:32:18 $
00024  * $Revision: 1.52 $
00025  * $Name: vcam-1_3_0 $
00026  */
00027 
00028 /* Includes */
00029 
00030 #ifdef HAVE_CONFIG_H
00031 #include <config.h>
00032 #endif
00033 
00034 #include <cpl.h>
00035 #include <stdio.h>
00036 #include <math.h>
00037 
00038 #include "vircam_utils.h"
00039 #include "vircam_mask.h"
00040 #include "vircam_pfits.h"
00041 #include "vircam_dfs.h"
00042 #include "vircam_stats.h"
00043 #include "vircam_paf.h"
00044 
00045 /* Function prototypes */
00046 
00047 static int vircam_dark_current_create(cpl_plugin *) ;
00048 static int vircam_dark_current_exec(cpl_plugin *) ;
00049 static int vircam_dark_current_destroy(cpl_plugin *) ;
00050 static int vircam_dark_current(cpl_parameterlist *, cpl_frameset *) ;
00051 static int vircam_dark_current_save(cpl_frameset *filelist,
00052                                     cpl_parameterlist *parlist);
00053 static int vircam_dark_current_lastbit(int jext, cpl_frameset *framelist,
00054                                        cpl_parameterlist *parlist);
00055 static void vircam_dark_current_init(void);
00056 static void vircam_dark_current_tidy(void);
00057 
00058 /* Static global variables */
00059 
00060 static struct {
00061 
00062     /* Input */
00063 
00064     float       thresh;
00065     int         extenum;
00066 
00067     /* Output */
00068 
00069     float       mean_dark_current;
00070 } vircam_dark_current_config;
00071 
00072 static struct {
00073     cpl_size         *labels;
00074     cpl_frameset     *darklist;
00075     vir_mask         *master_mask;
00076     int              nframes;
00077     float            **data;
00078     vir_fits         **allfits;
00079     double           *subset;
00080     double           *exps;
00081     cpl_image        *outimage;
00082     vir_fits         **good;
00083     int              ngood;
00084     cpl_propertylist *phupaf;
00085 } ps;
00086 
00087 static cpl_frame *product_frame = NULL;
00088 static int isfirst;
00089 static int dummy;
00090 
00091 static char vircam_dark_current_description[] =
00092 "vircam_dark_current -- VIRCAM recipe for measuring dark current.\n"
00093 "A list of dark frames is given. A robust estimate of the dark current\n"
00094 "is calculated by fitting a median slope to the dark value vs exposure time\n"
00095 "for each pixel. The output is to a dark current map which shows the dark\n"
00096 "current in counts per second for each input pixel.\n\n"
00097 "The program requires the following files in the SOF:\n\n"
00098 "    Tag                   Description\n"
00099 "    -----------------------------------------------------------------------\n"
00100 "    %-21s A list of raw dark images with various exposure times\n"
00101 "    %-21s Optional master bad pixel map or\n"
00102 "    %-21s Optional master confidence map\n"
00103 "\n";
00104 
00167 /* Function code */
00168 
00169 /*---------------------------------------------------------------------------*/
00177 /*---------------------------------------------------------------------------*/
00178 
00179 int cpl_plugin_get_info(cpl_pluginlist *list) {
00180     cpl_recipe  *recipe = cpl_calloc(1,sizeof(*recipe));
00181     cpl_plugin  *plugin = &recipe->interface;
00182     char alldesc[SZ_ALLDESC];
00183     (void)snprintf(alldesc,SZ_ALLDESC,vircam_dark_current_description,
00184                    VIRCAM_DARKCUR_RAW,VIRCAM_CAL_BPM,VIRCAM_CAL_CONF);
00185 
00186     cpl_plugin_init(plugin,
00187                     CPL_PLUGIN_API,
00188                     VIRCAM_BINARY_VERSION,
00189                     CPL_PLUGIN_TYPE_RECIPE,
00190                     "vircam_dark_current",
00191                     "VIRCAM recipe to determine detector dark current",
00192                     alldesc,
00193                     "Jim Lewis",
00194                     "jrl@ast.cam.ac.uk",
00195                     vircam_get_license(),
00196                     vircam_dark_current_create,
00197                     vircam_dark_current_exec,
00198                     vircam_dark_current_destroy);
00199 
00200     cpl_pluginlist_append(list,plugin);
00201 
00202     return(0);
00203 }
00204 
00205 /*---------------------------------------------------------------------------*/
00214 /*---------------------------------------------------------------------------*/
00215 
00216 static int vircam_dark_current_create(cpl_plugin *plugin) {
00217     cpl_recipe      *recipe;
00218     cpl_parameter   *p;
00219 
00220     /* Get the recipe out of the plugin */
00221 
00222     if (cpl_plugin_get_type(plugin) == CPL_PLUGIN_TYPE_RECIPE)
00223         recipe = (cpl_recipe *)plugin;
00224     else
00225         return(-1);
00226 
00227     /* Create the parameters list in the cpl_recipe object */
00228 
00229     recipe->parameters = cpl_parameterlist_new();
00230 
00231     /* Fill in the rejection threshold parameter */
00232 
00233     p = cpl_parameter_new_value("vircam.vircam_dark_current.thresh",
00234                                 CPL_TYPE_DOUBLE,
00235                                 "Rejection threshold in sigma above background",                                "vircam.vircam_dark_current",5.0);
00236     cpl_parameter_set_alias(p,CPL_PARAMETER_MODE_CLI,"thresh");
00237     cpl_parameterlist_append(recipe->parameters,p);
00238 
00239     /* Extension number of input frames to use */
00240 
00241     p = cpl_parameter_new_range("vircam.vircam_dark_current.extenum",
00242                                 CPL_TYPE_INT,
00243                                 "Extension number to be done, 0 == all",
00244                                 "vircam.vircam_dark_current",
00245                                 1,0,16);
00246     cpl_parameter_set_alias(p,CPL_PARAMETER_MODE_CLI,"ext");
00247     cpl_parameterlist_append(recipe->parameters,p);
00248 
00249     /* Get out of here */
00250 
00251     return(0);
00252 }
00253 
00254 
00255 /*---------------------------------------------------------------------------*/
00261 /*---------------------------------------------------------------------------*/
00262 
00263 static int vircam_dark_current_destroy(cpl_plugin *plugin) {
00264     cpl_recipe *recipe ;
00265 
00266     /* Get the recipe out of the plugin */
00267 
00268     if (cpl_plugin_get_type(plugin) == CPL_PLUGIN_TYPE_RECIPE)
00269         recipe = (cpl_recipe *)plugin;
00270     else
00271         return(-1);
00272 
00273     cpl_parameterlist_delete(recipe->parameters);
00274     return(0);
00275 }
00276 
00277 
00278 /*---------------------------------------------------------------------------*/
00284 /*---------------------------------------------------------------------------*/
00285 
00286 static int vircam_dark_current_exec(cpl_plugin *plugin) {
00287     cpl_recipe  *recipe;
00288 
00289     /* Get the recipe out of the plugin */
00290 
00291     if (cpl_plugin_get_type(plugin) == CPL_PLUGIN_TYPE_RECIPE)
00292         recipe = (cpl_recipe *)plugin;
00293     else
00294         return(-1);
00295 
00296     return(vircam_dark_current(recipe->parameters,recipe->frames));
00297 }
00298 
00299 /*---------------------------------------------------------------------------*/
00306 /*---------------------------------------------------------------------------*/
00307 
00308 static int vircam_dark_current(cpl_parameterlist *parlist, 
00309                                cpl_frameset *framelist) {
00310     int jst,jfn,i,j,nx,ny,n,retval,live;
00311     cpl_size nlab;
00312     long npts;
00313     double intercept,slope,sig;
00314     const char *fctid = "vircam_dark_current";
00315     float *outdata,val;
00316     unsigned char *bpm;
00317     vir_fits *ff;
00318     cpl_frame *cur_frame;
00319     cpl_propertylist *plist;
00320     cpl_parameter *p;
00321     
00322     /* Check validity of input frameset */
00323 
00324     if (framelist == NULL || cpl_frameset_get_size(framelist) <= 0) {
00325         cpl_msg_error(fctid,"Input framelist NULL or has no input data");
00326         return(-1);
00327     }
00328 
00329     /* Check the files in the frameset */
00330 
00331     if (vircam_frameset_fexists(framelist) != VIR_OK) {
00332         cpl_msg_error(fctid,"Input frameset is missing files. Check SOF");
00333         return(-1);
00334     }
00335 
00336     /* Initialise some variables */
00337 
00338     vircam_dark_current_init();
00339 
00340     /* Get the parameters */
00341 
00342     p = cpl_parameterlist_find(parlist,"vircam.vircam_dark_current.thresh");
00343     vircam_dark_current_config.thresh = (float)cpl_parameter_get_double(p);
00344     p = cpl_parameterlist_find(parlist,"vircam.vircam_dark_current.extenum");
00345     vircam_dark_current_config.extenum = cpl_parameter_get_int(p);
00346 
00347     /* Sort out raw from calib frames */
00348 
00349     if (vircam_dfs_set_groups(framelist) != VIR_OK) {
00350         cpl_msg_error(fctid,"Cannot identify RAW and CALIB frames");
00351         return(-1);
00352     }
00353 
00354     /* Get dark frames. Make sure there are at least 2 of them */
00355 
00356     if ((ps.labels = cpl_frameset_labelise(framelist,vircam_compare_tags,
00357                                            &nlab)) == NULL) {
00358         cpl_msg_error(fctid,"Cannot labelise the input frameset");
00359         vircam_dark_current_tidy();
00360         return(-1);
00361     }
00362     if ((ps.darklist = vircam_frameset_subgroup(framelist,ps.labels,nlab,
00363                                                 VIRCAM_DARKCUR_RAW)) == NULL) {
00364         cpl_msg_error(fctid,"Cannot find dark frames in input frameset");
00365         vircam_dark_current_tidy();
00366         return(-1);
00367     }
00368     ps.nframes = cpl_frameset_get_size(ps.darklist);
00369     if (ps.nframes < 2) {
00370         cpl_msg_error(fctid,"Dark frameset doesn't have enough frames");
00371         vircam_dark_current_tidy();
00372         return(-1);
00373     }
00374 
00375     /* Check to see if there is a master bad pixel map. If there isn't one 
00376        then look for a confidence map */
00377 
00378     ps.master_mask = vircam_mask_define(framelist,ps.labels,nlab);
00379 
00380     /* Get some workspace for the data arrays */
00381 
00382     ps.data = cpl_malloc(ps.nframes*sizeof(float *));
00383     ps.subset = cpl_malloc(ps.nframes*sizeof(double));
00384     ps.exps = cpl_malloc(ps.nframes*sizeof(double));
00385 
00386     /* Fill in the exposure times */
00387 
00388     for (i = 0; i < ps.nframes; i++) {
00389         cur_frame = cpl_frameset_get_frame(ps.darklist,i);
00390         plist = cpl_propertylist_load(cpl_frame_get_filename(cur_frame),0);
00391         if (vircam_pfits_get_exptime(plist,&val) != VIR_OK) {
00392             cpl_msg_error(fctid,"Unable to get exposure time for %s",
00393                           cpl_frame_get_filename(cur_frame));
00394             return(-1);
00395         }
00396         ps.exps[i] = (double)val;
00397         cpl_propertylist_delete(plist);
00398     }
00399 
00400     /* Now, how many image extensions do we want to do? If the extension
00401        number is zero, then we loop for all possible extensions. If it
00402        isn't then we just do the extension specified */
00403 
00404     vircam_exten_range(vircam_dark_current_config.extenum,
00405                        (const cpl_frame *)cpl_frameset_get_frame(ps.darklist,0),
00406                        &jst,&jfn);
00407     if (jst == -1 || jfn == -1) {
00408         cpl_msg_error(fctid,"Unable to continue");
00409         vircam_dark_current_tidy();
00410         return(-1);
00411     }
00412 
00413     /* Get some space for the good frames */
00414 
00415     ps.good = cpl_malloc(ps.nframes*sizeof(vir_fits *));
00416 
00417     /* Now loop for all the extensions... */
00418 
00419     for (j = jst; j <= jfn; j++) {
00420         isfirst = (j == jst);
00421         dummy = 0;
00422         vircam_dark_current_config.mean_dark_current = 0.0;
00423 
00424         /* Load the image data from each frame. If there was an
00425            error loading, then just create a dummy output */
00426 
00427         ps.allfits = vircam_fits_load_list(ps.darklist,CPL_TYPE_FLOAT,j);
00428         if (ps.allfits == NULL) {
00429             cpl_msg_info(fctid,
00430                          "Extension %" CPL_SIZE_FORMAT " darks wouldn't load",
00431                          (cpl_size)j);
00432             dummy = 1;
00433             retval = vircam_dark_current_lastbit(j,framelist,parlist);
00434             if (retval != 0)
00435                 return(-1);
00436             continue;
00437         }
00438 
00439         /* Are any of these images good? */
00440 
00441         ps.ngood = 0;
00442         for (i = 0; i < ps.nframes; i++) {
00443             ff = ps.allfits[i];
00444             vircam_pfits_get_detlive(vircam_fits_get_ehu(ff),&live);
00445             if (! live) {
00446                 cpl_msg_info(fctid,"Detector flagged dead %s",
00447                              vircam_fits_get_fullname(ff));
00448                 vircam_fits_set_error(ff,VIR_FATAL);
00449             } else {
00450                 ps.good[ps.ngood] = ff;
00451                 ps.ngood += 1;
00452             }
00453         }       
00454 
00455         /* If there are too few good images, then signal that we need to 
00456            create some dummy products and move on */
00457 
00458         if (ps.ngood < 2) {
00459             cpl_msg_warning(fctid,
00460                             "Need at least 2 good images -- %" CPL_SIZE_FORMAT" found",
00461                             (cpl_size)(ps.ngood));
00462             dummy = 1;
00463             retval = vircam_dark_current_lastbit(j,framelist,parlist);
00464             freefitslist(ps.allfits,ps.nframes);
00465             freeimage(ps.outimage);
00466             if (retval != 0) 
00467                 return(-1);
00468             continue;
00469         }
00470 
00471         /* Get the data arrays */
00472 
00473         for (i = 0; i < ps.ngood; i++)
00474             ps.data[i] = cpl_image_get_data(vircam_fits_get_image(ps.allfits[i]));
00475 
00476         /* Load the BPM */
00477 
00478         nx = (int)cpl_image_get_size_x(vircam_fits_get_image(ps.good[0]));
00479         ny = (int)cpl_image_get_size_y(vircam_fits_get_image(ps.good[0]));
00480         retval = vircam_mask_load(ps.master_mask,j,nx,ny);      
00481         if (retval == VIR_FATAL) {
00482             cpl_msg_info(fctid,
00483                          "Unable to load mask image %s[%" CPL_SIZE_FORMAT "]",
00484                          vircam_mask_get_filename(ps.master_mask),(cpl_size)j);
00485             cpl_msg_info(fctid,"Forcing all pixels to be good from now on");
00486             vircam_mask_force(ps.master_mask,nx,ny);
00487         }
00488         bpm = vircam_mask_get_data(ps.master_mask);
00489 
00490         /* Get an output image */
00491 
00492         ps.outimage = cpl_image_new((cpl_size)nx,(cpl_size)ny,CPL_TYPE_FLOAT);
00493         outdata = cpl_image_get_data(ps.outimage);
00494 
00495         /* Now loop over all pixels and work out the slope */
00496 
00497         cpl_msg_info(fctid,
00498                      "Doing dark current fits for extension %" CPL_SIZE_FORMAT,
00499                      (cpl_size)j);
00500         npts = (long)(nx*ny);
00501         for (n = 0; n < npts; n++) {
00502             if (bpm[n] != 0) {
00503                 slope = 0.0;
00504             } else {
00505                 for (i = 0; i < ps.ngood; i++)
00506                     ps.subset[i] = (double)(ps.data[i][n]);
00507                 vircam_linfit(ps.ngood,ps.exps,ps.subset,&intercept,&slope,
00508                     &sig);
00509             }
00510 
00511             /* Store the slope away */
00512 
00513             outdata[n] = (float)slope;
00514         }
00515 
00516         /* Get the median value of the dark current */
00517 
00518         vircam_dark_current_config.mean_dark_current = 
00519             vircam_med(outdata,bpm,npts);
00520 
00521         /* Save the last part of the processing and saving */
00522 
00523         (void)vircam_dark_current_lastbit(j,framelist,parlist);
00524 
00525         /* Tidy up */
00526 
00527         freeimage(ps.outimage);
00528         vircam_mask_clear(ps.master_mask);
00529         freefitslist(ps.allfits,ps.nframes);
00530     }
00531 
00532     /* Tidy up */
00533 
00534     vircam_dark_current_tidy();
00535 
00536     return(0);
00537 }
00538 
00539 /*---------------------------------------------------------------------------*/
00546 /*---------------------------------------------------------------------------*/
00547 
00548 static int vircam_dark_current_save(cpl_frameset *framelist, 
00549                                     cpl_parameterlist *parlist) {
00550     cpl_propertylist *plist,*p;
00551     const char *fctid = "vircam_dark_current_save";
00552     const char *outfile = "darkcurrent.fits";
00553     const char *outpaf = "darkcurrent";
00554     const char *recipeid = "vircam_dark_current";
00555     float darkcur_med;
00556 
00557     /* If we need to make a PHU then do that now based on the first frame
00558        in the input frame list */
00559 
00560     darkcur_med = vircam_dark_current_config.mean_dark_current;
00561     if (isfirst) {
00562 
00563         /* Create a new product frame object and define some tags */
00564 
00565         product_frame = cpl_frame_new();
00566         cpl_frame_set_filename(product_frame,outfile);
00567         cpl_frame_set_tag(product_frame,VIRCAM_PRO_DARKCUR);
00568         cpl_frame_set_type(product_frame,CPL_FRAME_TYPE_IMAGE);
00569         cpl_frame_set_group(product_frame,CPL_FRAME_GROUP_PRODUCT);
00570         cpl_frame_set_level(product_frame,CPL_FRAME_LEVEL_FINAL);
00571 
00572         /* Set the PHU header */
00573 
00574         plist = vircam_fits_get_phu(ps.allfits[0]);
00575         ps.phupaf = vircam_paf_phu_items(plist);
00576         vircam_dfs_set_product_primary_header(plist,product_frame,framelist,
00577                                               parlist,(char *)recipeid,
00578                                               "PRO-1.15",NULL,0);
00579         vircam_paf_append(ps.phupaf,plist,"ESO PRO CATG");
00580 
00581         /* 'Save' the PHU image */
00582 
00583         if (cpl_image_save(NULL,outfile,CPL_TYPE_UCHAR,plist,
00584                            CPL_IO_DEFAULT) != CPL_ERROR_NONE) {
00585             cpl_msg_error(fctid,"Cannot save product PHU");
00586             cpl_propertylist_delete(plist);
00587             return(-1);
00588         }
00589         cpl_frameset_insert(framelist,product_frame);
00590     }
00591 
00592     /* Get the header for the extension */
00593 
00594     plist = vircam_fits_get_ehu(ps.allfits[0]);
00595     vircam_dfs_set_product_exten_header(plist,product_frame,framelist,
00596                                         parlist,(char *)recipeid,
00597                                         "PRO-1.15",NULL);
00598 
00599     /* Add the mean dark current to the header as a QC parameter */
00600 
00601     cpl_propertylist_update_float(plist,"ESO QC DARKCURRENT",darkcur_med);
00602     cpl_propertylist_set_comment(plist,"ESO QC DARKCURRENT",
00603                                  "[ADU/s] Median dark current");
00604     if (dummy)
00605         vircam_dummy_property(plist);
00606 
00607     /* Now save the image */
00608 
00609     if (cpl_image_save(ps.outimage,outfile,CPL_TYPE_FLOAT,plist,
00610                        CPL_IO_EXTEND) != CPL_ERROR_NONE) {
00611         cpl_msg_error(fctid,"Cannot save product image extension");
00612         cpl_propertylist_delete(plist);
00613         return(-1);
00614     }
00615 
00616     /* Write a PAF now */
00617 
00618     p = vircam_paf_req_items(plist);
00619     vircam_merge_propertylists(p,ps.phupaf);
00620     if (vircam_paf_print((char *)outpaf,"VIRCAM/vircam_dark_current","QC file",
00621                          p) != VIR_OK)
00622         cpl_msg_warning(fctid,"Unable to write PAF");
00623     cpl_propertylist_delete(p);
00624 
00625     /* Get out of here */
00626 
00627     return(0);
00628 }
00629 
00630 /*---------------------------------------------------------------------------*/
00638 /*---------------------------------------------------------------------------*/
00639 
00640 static int vircam_dark_current_lastbit(int jext, cpl_frameset *framelist,
00641                                        cpl_parameterlist *parlist) {
00642     int retval;
00643     const char *fctid="vircam_dark_current_lastbit";
00644 
00645     /* If this is a dummy result then create it now */
00646 
00647     if (dummy)
00648         ps.outimage = vircam_dummy_image(ps.allfits[0]);
00649                        
00650     /* Save the result */
00651 
00652     cpl_msg_info(fctid,"Saving products for extension %" CPL_SIZE_FORMAT,
00653                  (cpl_size)jext);
00654     retval = vircam_dark_current_save(framelist,parlist);
00655     if (retval != 0) {
00656         vircam_dark_current_tidy();
00657         return(-1);
00658     }
00659     return(0);
00660 }
00661 
00662 
00663 /*---------------------------------------------------------------------------*/
00667 /*---------------------------------------------------------------------------*/
00668 
00669 static void vircam_dark_current_init(void) {
00670     ps.labels = NULL;
00671     ps.darklist = NULL;
00672     ps.master_mask = NULL;
00673     ps.data = NULL;
00674     ps.allfits = NULL;
00675     ps.subset = NULL;
00676     ps.exps = NULL;
00677     ps.outimage = NULL;
00678     ps.nframes = 0;
00679     ps.good = NULL;
00680     ps.phupaf = NULL;
00681 }
00682 
00683 /*---------------------------------------------------------------------------*/
00687 /*---------------------------------------------------------------------------*/
00688 
00689 static void vircam_dark_current_tidy(void) {
00690 
00691     freespace(ps.labels);
00692     freeframeset(ps.darklist);
00693     freemask(ps.master_mask);
00694     freespace(ps.data);
00695     freespace(ps.subset);
00696     freespace(ps.exps);
00697     freeimage(ps.outimage);
00698     freefitslist(ps.allfits,ps.nframes);
00699     ps.nframes = 0;
00700     freespace(ps.good);
00701     freepropertylist(ps.phupaf);
00702 }
00703 
00706 /*
00707 
00708 $Log: vircam_dark_current.c,v $
00709 Revision 1.52  2012/01/16 12:32:18  jim
00710 A few more changes to fit in with cpl6
00711 
00712 Revision 1.51  2012/01/15 17:40:09  jim
00713 Minor modifications to take into accout the changes in cpl API for v6
00714 
00715 Revision 1.50  2010/06/30 12:42:00  jim
00716 A few fixes to stop compiler compaints
00717 
00718 Revision 1.49  2009/09/09 09:50:21  jim
00719 Modified to try and get headers right
00720 
00721 Revision 1.48  2008/10/01 04:59:13  jim
00722 Added call to vircam_frameset_fexists to check input frameset
00723 
00724 Revision 1.47  2008/09/30 11:33:23  jim
00725 Added PRO CATG to pafs
00726 
00727 Revision 1.46  2007/11/20 09:40:27  jim
00728 changed values for linear fit to doubles
00729 
00730 Revision 1.45  2007/11/14 14:47:53  jim
00731 vircam_linfit now works only with doubles
00732 
00733 Revision 1.44  2007/10/25 18:39:22  jim
00734 Altered to remove some lint messages
00735 
00736 Revision 1.43  2007/10/15 12:53:26  jim
00737 Modified for compatibiliity with cpl_4.0
00738 
00739 Revision 1.42  2007/09/06 21:37:53  jim
00740 fixed call to vircam_dfs_setup_product_ routines to use the full input
00741 frameset
00742 
00743 Revision 1.41  2007/08/23 09:01:34  jim
00744 Error when there aren't enough frames is now just a warning
00745 
00746 Revision 1.40  2007/07/18 15:35:41  jim
00747 Added better error handling for missing or corrupt mask extensions
00748 
00749 Revision 1.39  2007/07/09 13:21:55  jim
00750 Modified to use new version of vircam_exten_range
00751 
00752 Revision 1.38  2007/06/13 08:11:27  jim
00753 Modified docs to reflect changes in DFS tags
00754 
00755 Revision 1.37  2007/04/04 10:36:18  jim
00756 Modified to use new dfs tags
00757 
00758 Revision 1.36  2007/03/29 12:19:38  jim
00759 Little changes to improve documentation
00760 
00761 Revision 1.35  2007/03/01 12:41:48  jim
00762 Modified slightly after code checking
00763 
00764 Revision 1.34  2007/02/25 06:26:35  jim
00765 Plugged a few memory leaks
00766 
00767 Revision 1.33  2007/02/15 06:59:37  jim
00768 Added ability to write QC paf files
00769 
00770 Revision 1.32  2007/02/07 10:12:39  jim
00771 Removed calls to vircam_ndit_correct as this is now no longer necessary
00772 
00773 Revision 1.31  2007/02/06 13:11:11  jim
00774 Fixed entry for PRO dictionary in cpl_dfs_set_product_header
00775 
00776 Revision 1.30  2006/11/27 12:13:21  jim
00777 Swapped calls to cpl_propertylist_append to cpl_propertylist_update
00778 
00779 Revision 1.29  2006/11/10 09:19:47  jim
00780 fixed typo
00781 
00782 Revision 1.28  2006/09/29 11:19:30  jim
00783 changed aliases on parameter names
00784 
00785 Revision 1.27  2006/09/09 16:49:39  jim
00786 Header comment update
00787 
00788 Revision 1.26  2006/09/04 23:02:14  jim
00789 Modified to deal with det live issues. Also does a better job of dealing
00790 with duff input
00791 
00792 Revision 1.25  2006/06/20 19:07:00  jim
00793 Corrects for ndit != 1
00794 
00795 Revision 1.24  2006/06/15 09:58:57  jim
00796 Minor changes to docs
00797 
00798 Revision 1.23  2006/06/09 11:32:59  jim
00799 A few more minor fixes for lint
00800 
00801 Revision 1.22  2006/06/09 11:26:25  jim
00802 Small changes to keep lint happy
00803 
00804 Revision 1.21  2006/05/17 11:15:38  jim
00805 plugged memory leak
00806 
00807 Revision 1.20  2006/05/04 11:53:14  jim
00808 Fixed the way the _save routine works to be more consistent with the
00809 standard CPL way of doing things
00810 
00811 Revision 1.19  2006/04/27 09:46:01  jim
00812 Modified DFS frame types to conform to new dictionary
00813 
00814 Revision 1.18  2006/04/25 13:45:56  jim
00815 Fixed to adhere to new calling sequence for vircam_dfs routines
00816 
00817 Revision 1.17  2006/03/23 21:18:45  jim
00818 Minor changes mainly to comment headers
00819 
00820 Revision 1.16  2006/03/22 12:13:51  jim
00821 Modified to use new vircam_mask capability
00822 
00823 Revision 1.15  2006/03/15 10:43:40  jim
00824 Fixed a few things
00825 
00826 Revision 1.14  2006/03/03 14:29:06  jim
00827 Now calls routines with vir_fits.
00828 
00829 Revision 1.13  2006/02/18 11:50:43  jim
00830 Modified the way the dfs product keywords are written using the vircam
00831 routines, rather than the cpl routine that doesn't understand image
00832 extensions
00833 
00834 Revision 1.12  2006/01/23 10:35:55  jim
00835 Now allows either an BPM or CPM to be used as a mask
00836 
00837 Revision 1.11  2005/12/14 22:19:12  jim
00838 fixed docs
00839 
00840 Revision 1.10  2005/12/09 09:47:58  jim
00841 Many changes to add more documentation
00842 
00843 Revision 1.9  2005/12/02 10:45:37  jim
00844 The tags used in the sof are now written to the description string in the
00845 constructor. This is so that if they change in the vircam_dfs.h file, they
00846 aren't then hardcopied into each of the recipes...
00847 
00848 Revision 1.8  2005/12/01 16:25:06  jim
00849 Fixed default output file extension
00850 
00851 Revision 1.7  2005/11/25 09:37:10  jim
00852 Fitting now done by vircam_linfit
00853 
00854 Revision 1.6  2005/11/23 14:57:40  jim
00855 A bit of tidying in response to splint messages
00856 
00857 Revision 1.5  2005/11/08 12:47:44  jim
00858 Made garbage collection a little better
00859 
00860 Revision 1.4  2005/11/03 15:16:28  jim
00861 Lots of changes mainly to strengthen error reporting
00862 
00863 Revision 1.3  2005/08/09 11:09:39  jim
00864 Replaced dodgy call to cpl_framelist_delete with correct cpl_frameset_delete
00865 
00866 Revision 1.2  2005/08/09 10:24:38  jim
00867 Replaced dodgy calls to cpl_msg_err with correct cpl_msg_error
00868 
00869 Revision 1.1.1.1  2005/08/05 08:29:09  jim
00870 Initial import
00871 
00872 
00873 */

Generated on 15 Mar 2012 for VIRCAM Pipeline by  doxygen 1.6.1