irplib_detmon-test.c

00001 /*                                                                              *
00002  *   This file is part of the ESO IRPLIB package                                *
00003  *   Copyright (C) 2004,2005 European Southern Observatory                      *
00004  *                                                                              *
00005  *   This library is free software; you can redistribute it and/or modify       *
00006  *   it under the terms of the GNU General Public License as published by       *
00007  *   the Free Software Foundation; either version 2 of the License, or          *
00008  *   (at your option) any later version.                                        *
00009  *                                                                              *
00010  *   This program is distributed in the hope that it will be useful,            *
00011  *   but WITHOUT ANY WARRANTY; without even the implied warranty of             *
00012  *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the              *
00013  *   GNU General Public License for more details.                               *
00014  *                                                                              *
00015  *   You should have received a copy of the GNU General Public License          *
00016  *   along with this program; if not, write to the Free Software                *
00017  *   Foundation, 51 Franklin St, Fifth Floor, Boston, MA  02111-1307  USA       *
00018  *                                                                              */
00019  
00020 #ifdef HAVE_CONFIG_H
00021 #include <config.h>
00022 #endif
00023 
00024 /*----------------------------------------------------------------------------
00025                                 Includes
00026  ----------------------------------------------------------------------------*/
00027 
00028 
00029 #include <irplib_detmon.h>
00030 
00031 
00032 #include <math.h>
00033 /*---------------------------------------------------------------------------*/
00034 /*
00035  * @defgroup irplib_detmon_test   Testing of the IRPLIB utilities
00036  */
00037 /*---------------------------------------------------------------------------*/
00038 
00039 #define PI 3.141592653
00040 /*----------------------------------------------------------------------------
00041                                 Defines
00042  ----------------------------------------------------------------------------*/
00043 
00044 #ifndef IMAGESIZE
00045 #define IMAGESIZE       128
00046 #endif
00047 
00048 #define IMAGELISTSIZE   10
00049 
00050 #define NBADPIXS        10
00051 
00052 #undef REGEXP
00053 #define REGEXP                            "^(ARCFILE|MJD-OBS|ESO TPL ID|" \
00054                                           "DATE-OBS|ESO DET DIT|ESO DET NDIT|"\
00055                                           "ESO DET NCORRS|"\
00056                                           "ESO DET MODE NAME)$"
00057 
00058 /*----------------------------------------------------------------------------
00059                             Private Function prototypes
00060  ----------------------------------------------------------------------------*/
00061 
00062 static void irplib_detmon_tests(void);
00063 
00064 
00065 cpl_frameset * irplib_detmon_pernoise_tests_fill_frameset(cpl_boolean,
00066                                                           int);
00067 
00068 cpl_frameset * irplib_detmon_tests_fill_frameset(const char     * tag_on,
00069                                                  const char     * tag_off,
00070                                                  int              non,
00071                                                  cpl_boolean      opt_nir,
00072                                                  cpl_boolean      with_exts,
00073                                                  int              nexts);
00074 
00075 /*---------------------------------------------------------------------------*/
00076 /*
00077  * @brief   Unit tests of fit module
00078  */
00079 /*---------------------------------------------------------------------------*/
00080 
00081 int main(void)
00082 {
00083     /* Initialize CPL + IRPLIB */
00084     cpl_test_init(PACKAGE_BUGREPORT, CPL_MSG_WARNING);
00085 
00086     irplib_detmon_tests();
00087 
00088     return cpl_test_end(0);
00089 }
00090 
00091 static void irplib_detmon_tests(void)
00092 {
00093 
00094     cpl_parameterlist   * parlist;
00095     cpl_frameset        * frameset;
00096     cpl_frameset        * set;
00097 //    cpl_image * myimage;
00098 
00099     const char * tag = "RAW";
00100     cpl_error_code error;
00101 
00102     /* HIGH LEVEL FUNCTION FOR RON/BIAS RECIPE */
00103 
00104     frameset = irplib_detmon_tests_fill_frameset(tag, tag, 3, TRUE, FALSE, 0);
00105 
00106     set = cpl_frameset_duplicate(frameset);
00107     parlist = cpl_parameterlist_new();
00108     irplib_detmon_ronbias_fill_parlist_default(parlist, "detmon_ronbias", "detmon");
00109 
00110 
00111     irplib_detmon_ronbias(set, parlist, tag, "detmon_ronbias", "detmon",
00112               REGEXP, "PRO-1.15", NULL, NULL, "PRO-1.15",
00113               "PRO-1.15", "PRO-1.15", "PRO-1.15",
00114               "DETMON / 1.0", NULL);
00115 
00116 //Move the NULLs away when X and Y structure built
00117 
00118     cpl_test_error(CPL_ERROR_NONE);
00119     cpl_error_reset();
00120 
00121     cpl_parameterlist_delete(parlist);
00122     cpl_frameset_delete(set);
00123 
00124     /* 2. test with extensions */
00125     set = irplib_detmon_tests_fill_frameset(tag, tag, 3, TRUE, TRUE, 4);
00126     parlist = cpl_parameterlist_new();
00127     irplib_detmon_ronbias_fill_parlist(parlist, "detmon_ronbias", "detmon",
00128                        "ALL", /* --method */
00129                        "NORM",/* --pmethod */
00130                        1,     /* --preoverscan_degree */
00131                        -1,    /* --random_nsamples */
00132                        -1,    /* --random_sizex */
00133                        -1,    /* --random_sizey */
00134                        0,     /* --criteria     */
00135                        -1,    /* --ref_llx     */
00136                        -1,    /* --ref_lly */
00137                        -1,    /* --ref_urx */
00138                        -1,    /* --ref_ury */
00139                        "MEAN",/* --stacking_method */
00140                        3,     /* --stacking_ks_low */
00141                        10000, /* --stacking_ks_high */
00142                        25,    /* --stacking_ks_iter */ 
00143                        0,     /* --master_shift_x */
00144                        0,     /* --master_shift_y */
00145                        -1,    /* --ron_llx */
00146                        -1,    /* --ron_lly */
00147                        -1,    /* --ron_urx */
00148                        -1,    /* --ron_ury */
00149                        -1);    /* --exts */
00150 
00151     error =irplib_detmon_ronbias(set, parlist, tag, "detmon_ronbias", "detmon",
00152                  REGEXP, "PRO-1.15", NULL, NULL, "PRO-1.15",
00153                  "PRO-1.15", "PRO-1.15", "PRO-1.15",
00154                  "DETMON / 1.0", NULL);
00155 //Move the NULLs away when X and Y structure built
00156 
00157     cpl_test_eq(error, CPL_ERROR_NONE);
00158     cpl_test_error(CPL_ERROR_NONE);
00159 
00160     /* Check that there are really extensions */
00161 //    myimage = cpl_image_load("detmon_ronbias_masterbias.fits", CPL_TYPE_FLOAT, 1, 2);
00162 //    cpl_test(myimage != NULL && cpl_error_get_code() == CPL_ERROR_NONE);
00163     //  cpl_image_delete(myimage);
00164 
00165     cpl_parameterlist_delete(parlist);
00166     cpl_frameset_delete(set);
00167 
00168     cpl_frameset_delete(frameset);
00169 
00170 #ifdef HAVE_FFTW
00171     /* Tests for Periodic Noise Characterisation */
00172 
00173 //    cpl_msg_error(cpl_func, "Starting PNC test");
00174 
00175     frameset = irplib_detmon_pernoise_tests_fill_frameset(0,0);
00176 
00177     parlist = cpl_parameterlist_new();
00178     irplib_detmon_fill_pernoise_params_default(parlist,
00179                                                "detmon_pernoise", "detmon");
00180 
00181     irplib_detmon_pernoise(frameset, parlist, "RAW", "detmon_pernoise", "detmon", "PRO-1.15", "DETMON / 1.0", NULL);
00182 
00183     cpl_parameterlist_delete(parlist);
00184     cpl_frameset_delete(frameset);
00185 
00186 #endif
00187 
00188     /* Test for DARK recipe */
00189 
00190     frameset = irplib_detmon_tests_fill_frameset("DARK", "DARK", 20,FALSE, FALSE, 0);
00191     parlist = cpl_parameterlist_new();
00192     error = irplib_detmon_fill_dark_params_default(parlist,
00193                                                "detmon_dark", "detmon");
00194     cpl_test_zero(error);
00195 
00196     irplib_detmon_dark(frameset, parlist, "DARK", "detmon_dark", "detmon",
00197                        "MASTER", "DSNU", "DSNU_TABLE", "DETMON / 1.0", NULL);
00198 
00199     cpl_parameterlist_delete(parlist);
00200     cpl_frameset_delete(frameset);
00201 
00202     cpl_test_zero(system("rm *.paf *.fits"));
00203 }
00204 
00205 
00206 cpl_frameset * irplib_detmon_pernoise_tests_fill_frameset(cpl_boolean with_exts,
00207                                                           int nexts)
00208 {
00209 
00210     cpl_frameset                * frameset = cpl_frameset_new();
00211     cpl_frame                   * frame;
00212     cpl_propertylist            * plist;
00213 
00214     /* Create dummy image(s) */
00215 
00216     cpl_image * raw1 = cpl_image_new(512, 512, CPL_TYPE_FLOAT);
00217     cpl_image * raw2 = cpl_image_new(512, 512, CPL_TYPE_FLOAT);
00218     int i, j, k = 0;
00219 
00220     cpl_image_fill_noise_uniform(raw1, -2, 2);
00221 
00222     cpl_image_add_scalar(raw1, 100);
00223 
00224 
00225     for(i = 1; i <= 512; i++){
00226         for(j = 1; j <= 512; j++){
00227             int rejected;
00228             double value = cpl_image_get(raw1, j, i, &rejected);
00229             cpl_image_set(raw1, j, i, 4*sin((double)i/16*CPL_MATH_2PI) + value); 
00230             if(rejected < 0) {
00231                cpl_msg_error(cpl_func, "Error adding test noise");
00232                k++;
00233             } 
00234         }
00235     }
00236 
00237     cpl_image_fill_noise_uniform(raw2, -3, 3);
00238 
00239 //    cpl_image_add(raw2, raw1);
00240 
00241     frame = cpl_frame_new();
00242     cpl_frame_set_filename(frame, "pertest1.fits");
00243     cpl_frame_set_tag(frame, "RAW");
00244     cpl_frame_set_type(frame, CPL_FRAME_TYPE_IMAGE);
00245     cpl_frame_set_group(frame, CPL_FRAME_GROUP_RAW);
00246 
00247     cpl_frameset_insert(frameset, frame);
00248 
00249     plist = cpl_propertylist_new();
00250 
00251     cpl_propertylist_append_double(plist, "ESO DET DIT", (double)(3));
00252     cpl_propertylist_append_double(plist, "EXPTIME", (double)(3));
00253     cpl_propertylist_append_double(plist, "MJD-OBS", 0);
00254 
00255 
00256     if(with_exts == TRUE) {
00257         cpl_image_save(NULL, "pertest1.fits", CPL_BPP_IEEE_FLOAT, plist, CPL_IO_DEFAULT);
00258         for(j = 0; j < nexts; j++) {
00259             cpl_image_save(raw1, "pertest1.fits", CPL_BPP_IEEE_FLOAT, plist, CPL_IO_EXTEND);
00260         }
00261     } else {
00262         cpl_image_save(raw1, "pertest1.fits", CPL_BPP_IEEE_FLOAT, plist, CPL_IO_DEFAULT);
00263     }
00264 
00265 
00266     frame = cpl_frame_new();
00267     cpl_frame_set_filename(frame, "pertest2.fits");
00268     cpl_frame_set_tag(frame, "RAW");
00269     cpl_frame_set_type(frame, CPL_FRAME_TYPE_IMAGE);
00270     cpl_frame_set_group(frame, CPL_FRAME_GROUP_RAW);
00271 
00272     cpl_frameset_insert(frameset, frame);
00273 
00274     if(with_exts == TRUE) {
00275         cpl_image_save(NULL, "pertest2.fits", CPL_BPP_IEEE_FLOAT, plist, CPL_IO_DEFAULT);
00276         for(j = 0; j < nexts; j++) {
00277             cpl_image_save(raw2, "pertest2.fits", CPL_BPP_IEEE_FLOAT, plist, CPL_IO_EXTEND);
00278         }
00279     } else {
00280         cpl_image_save(raw2, "pertest2.fits", CPL_BPP_IEEE_FLOAT, plist, CPL_IO_DEFAULT);
00281     }
00282     cpl_propertylist_delete(plist);
00283     cpl_image_delete(raw2);
00284     cpl_image_delete(raw1);
00285             
00286     return frameset;
00287 }
00288 
00289 /*---------------------------------------------------------------------------*/
00290 /*
00291  * @brief  Detect bad pixels of a selected type
00292  * @param  in           Input image
00293  * @param  mean         Mean level of the image - used to compute threshold
00294  * @param  sigma        Stdev level of the image - used to compute threshold
00295  * @param  flag         Flag - represents selected type of bad pixels (see enum)
00296  * @return The detected bad pixels in a cpl_mask.
00297  */
00298 /*---------------------------------------------------------------------------*/
00299 
00300 cpl_frameset * irplib_detmon_tests_fill_frameset(const char     * tag_on,
00301                                                  const char     * tag_off,
00302                                                  int              non,
00303                                                  cpl_boolean      opt_nir,
00304                                                  cpl_boolean      with_exts,
00305                                                  int              nexts)
00306 {
00307     cpl_frameset                * frameset;
00308     cpl_frame                   * frame;
00309     int i;
00310     char                        frame_name[20];
00311     cpl_propertylist            * plist;
00312     cpl_image                   * image;
00313     frameset = cpl_frameset_new();
00314 
00315     for (i=0; i<non; i++) {
00316         frame = cpl_frame_new();
00317         sprintf(frame_name, "dummyon%d.fits",i);
00318         cpl_frame_set_filename(frame, frame_name);
00319         cpl_frame_set_tag(frame, tag_on);
00320         cpl_frame_set_type(frame, CPL_FRAME_TYPE_IMAGE);
00321         cpl_frame_set_group(frame, CPL_FRAME_GROUP_RAW);
00322 
00323         cpl_frameset_insert(frameset, frame);
00324 
00325         plist = cpl_propertylist_new();
00326         if(opt_nir == TRUE) {
00327             cpl_propertylist_append_double(plist, "ESO DET DIT", (double)(i/2+1));
00328             cpl_propertylist_append_double(plist, "EXPTIME", (double)(i/2+1));
00329             cpl_propertylist_append_double(plist, "MJD-OBS", 100);
00330 
00331         cpl_propertylist_append_int(plist, "NAXIS1", IMAGESIZE);
00332         cpl_propertylist_append_int(plist, "NAXIS2", IMAGESIZE);
00333         cpl_propertylist_append_int(plist, "ESO DET OUT1 NX", IMAGESIZE + 10 );
00334         cpl_propertylist_append_int(plist, "ESO DET OUT1 NY", IMAGESIZE);
00335         cpl_propertylist_append_int(plist, "ESO DET OUT1 PRSCX", 5);
00336         cpl_propertylist_append_int(plist, "ESO DET OUT1 OVSCX", 5);
00337         } else {
00338             cpl_propertylist_append_double(plist, "ESO DET DIT", (double)((i+1)/2));
00339             cpl_propertylist_append_double(plist, "EXPTIME", (double)((i+1)/2));
00340             cpl_propertylist_append_double(plist, "MJD-OBS",100);
00341 
00342         cpl_propertylist_append_int(plist, "NAXIS1", IMAGESIZE);
00343         cpl_propertylist_append_int(plist, "NAXIS2", IMAGESIZE);
00344         cpl_propertylist_append_int(plist, "ESO DET OUT1 NX", IMAGESIZE + 10 );
00345         cpl_propertylist_append_int(plist, "ESO DET OUT1 NY", IMAGESIZE);
00346         cpl_propertylist_append_int(plist, "ESO DET OUT1 PRSCX", 5);
00347         cpl_propertylist_append_int(plist, "ESO DET OUT1 OVSCX", 5);
00348 
00349         }
00350 
00351         if(with_exts == TRUE) {
00352           int j;
00353           cpl_image_save(NULL, frame_name, CPL_BPP_IEEE_FLOAT, plist, CPL_IO_DEFAULT);
00354           for(j = 0; j < nexts; j++) {
00355             image = cpl_image_new(IMAGESIZE, IMAGESIZE, CPL_TYPE_FLOAT);
00356             cpl_image_fill_noise_uniform(image, 25, 50);
00357             cpl_ensure(cpl_error_get_code()== CPL_ERROR_NONE, CPL_ERROR_NULL_INPUT, NULL);
00358         cpl_image_add_scalar(image, 300);
00359 
00360         cpl_image_set(image, 10, 10, 0.0); 
00361         cpl_image_set(image, 11, 11, 0.0); 
00362         cpl_image_set(image, 20, 20, 0.0); 
00363         cpl_image_set(image, 10, 40, 0.0); 
00364         cpl_image_set(image, 40, 10, 0.0); 
00365         cpl_image_set(image, 12, 32, 0.0); 
00366         cpl_image_set(image, 50, 50, 0.0); 
00367         cpl_image_set(image, 15, 1, 0.0); 
00368         cpl_image_set(image, 76, 32, 0.0); 
00369         cpl_image_set(image, 10, 19, 0.0); 
00370 
00371         cpl_image_set(image, 30, 10, 6000.0); 
00372         cpl_image_set(image, 31, 11, 6020.0); 
00373         cpl_image_set(image, 30, 20, 6030.0); 
00374         cpl_image_set(image, 30, 40, 6040.0); 
00375         cpl_image_set(image, 30, 10, 6070.0); 
00376         cpl_image_set(image, 52, 32, 6300.0); 
00377         cpl_image_set(image, 60, 50, 6500.0); 
00378         cpl_image_set(image, 85, 1, 6100.0); 
00379         cpl_image_set(image, 86, 32, 6040.0); 
00380         cpl_image_set(image, 90, 19, 6020.0); 
00381 
00382             cpl_image_save(image, frame_name, CPL_BPP_IEEE_FLOAT, plist, CPL_IO_EXTEND);
00383             cpl_image_delete(image);
00384           }
00385         } else {
00386             image = cpl_image_new(IMAGESIZE, IMAGESIZE, CPL_TYPE_FLOAT);
00387             cpl_image_fill_noise_uniform(image, 25, 50);
00388             cpl_ensure(cpl_error_get_code()== CPL_ERROR_NONE, CPL_ERROR_NULL_INPUT, NULL);
00389         cpl_image_add_scalar(image, 300);
00390         cpl_image_set(image, 10, 10, 0.0); 
00391         cpl_image_set(image, 11, 11, 0.0); 
00392         cpl_image_set(image, 20, 20, 0.0); 
00393         cpl_image_set(image, 10, 40, 0.0); 
00394         cpl_image_set(image, 40, 10, 0.0); 
00395         cpl_image_set(image, 12, 32, 0.0); 
00396         cpl_image_set(image, 50, 50, 0.0); 
00397         cpl_image_set(image, 15, 1, 0.0); 
00398         cpl_image_set(image, 76, 32, 0.0); 
00399         cpl_image_set(image, 10, 19, 0.0); 
00400 
00401         cpl_image_set(image, 30, 10, 6000.0); 
00402         cpl_image_set(image, 31, 11, 6020.0); 
00403         cpl_image_set(image, 30, 20, 6030.0); 
00404         cpl_image_set(image, 30, 40, 6040.0); 
00405         cpl_image_set(image, 30, 10, 6070.0); 
00406         cpl_image_set(image, 52, 32, 6300.0); 
00407         cpl_image_set(image, 60, 50, 6500.0); 
00408         cpl_image_set(image, 85, 1, 6100.0); 
00409         cpl_image_set(image, 86, 32, 6040.0); 
00410         cpl_image_set(image, 90, 19, 6020.0); 
00411 
00412             cpl_image_save(image, frame_name, CPL_BPP_IEEE_FLOAT, plist, CPL_IO_DEFAULT);
00413 
00414 
00415             cpl_image_delete(image);
00416         }
00417         cpl_propertylist_delete(plist);
00418 
00419 
00420         frame = cpl_frame_new();
00421         sprintf(frame_name, "dummyoff%d.fits",i);
00422         cpl_frame_set_filename(frame, frame_name);
00423         cpl_frame_set_tag(frame, tag_off);
00424         cpl_frame_set_type(frame, CPL_FRAME_TYPE_IMAGE);
00425         cpl_frame_set_group(frame, CPL_FRAME_GROUP_RAW);
00426 
00427         cpl_frameset_insert(frameset, frame);
00428 
00429         plist = cpl_propertylist_new();
00430         if(opt_nir == TRUE) {
00431             cpl_propertylist_append_double(plist, "ESO DET DIT", (double)(i/2+1));
00432             cpl_propertylist_append_double(plist, "EXPTIME", (double)(i/2+1));
00433             cpl_propertylist_append_double(plist, "MJD-OBS", 100);
00434 
00435         cpl_propertylist_append_int(plist, "NAXIS1", IMAGESIZE);
00436         cpl_propertylist_append_int(plist, "NAXIS2", IMAGESIZE);
00437         cpl_propertylist_append_int(plist, "ESO DET OUT1 NX", IMAGESIZE + 10 );
00438         cpl_propertylist_append_int(plist, "ESO DET OUT1 NY", IMAGESIZE);
00439         cpl_propertylist_append_int(plist, "ESO DET OUT1 PRSCX", 5);
00440         cpl_propertylist_append_int(plist, "ESO DET OUT1 OVSCX", 5);
00441         } else {
00442             cpl_propertylist_append_double(plist, "ESO DET DIT", (double)((i+1)/2));
00443             cpl_propertylist_append_double(plist, "EXPTIME", (double)((i+1)/2));
00444             cpl_propertylist_append_double(plist, "MJD-OBS", 100);
00445 
00446         cpl_propertylist_append_int(plist, "NAXIS1", IMAGESIZE);
00447         cpl_propertylist_append_int(plist, "NAXIS2", IMAGESIZE);
00448         cpl_propertylist_append_int(plist, "ESO DET OUT1 NX", IMAGESIZE + 10 );
00449         cpl_propertylist_append_int(plist, "ESO DET OUT1 NY", IMAGESIZE);
00450         cpl_propertylist_append_int(plist, "ESO DET OUT1 PRSCX", 5);
00451         cpl_propertylist_append_int(plist, "ESO DET OUT1 OVSCX", 5);
00452         }
00453 
00454         if(with_exts == TRUE) {
00455           int j;
00456           cpl_image_save(NULL, frame_name, CPL_BPP_IEEE_FLOAT, plist, CPL_IO_DEFAULT);
00457           for(j = 0; j < nexts; j++) {
00458             image = cpl_image_new(IMAGESIZE, IMAGESIZE, CPL_TYPE_FLOAT);
00459             cpl_image_fill_noise_uniform(image, 25, 50);
00460             cpl_ensure(cpl_error_get_code()== CPL_ERROR_NONE, CPL_ERROR_NULL_INPUT, NULL);
00461         cpl_image_add_scalar(image, 300);
00462         cpl_image_set(image, 10, 10, 0.0); 
00463         cpl_image_set(image, 11, 11, 0.0); 
00464         cpl_image_set(image, 20, 20, 0.0); 
00465         cpl_image_set(image, 10, 40, 0.0); 
00466         cpl_image_set(image, 40, 10, 0.0); 
00467         cpl_image_set(image, 12, 32, 0.0); 
00468         cpl_image_set(image, 50, 50, 0.0); 
00469         cpl_image_set(image, 15, 1, 0.0); 
00470         cpl_image_set(image, 76, 32, 0.0); 
00471         cpl_image_set(image, 10, 19, 0.0); 
00472 
00473         cpl_image_set(image, 30, 10, 6000.0); 
00474         cpl_image_set(image, 31, 11, 6020.0); 
00475         cpl_image_set(image, 30, 20, 6030.0); 
00476         cpl_image_set(image, 30, 40, 6040.0); 
00477         cpl_image_set(image, 30, 10, 6070.0); 
00478         cpl_image_set(image, 52, 32, 6300.0); 
00479         cpl_image_set(image, 60, 50, 6500.0); 
00480         cpl_image_set(image, 85, 1, 6100.0); 
00481         cpl_image_set(image, 86, 32, 6040.0); 
00482         cpl_image_set(image, 90, 19, 6020.0); 
00483 
00484             cpl_image_save(image, frame_name, CPL_BPP_IEEE_FLOAT, plist, CPL_IO_EXTEND);
00485             cpl_image_delete(image);
00486           }
00487         } else {
00488             image = cpl_image_new(IMAGESIZE, IMAGESIZE, CPL_TYPE_FLOAT);
00489             cpl_image_fill_noise_uniform(image, 25, 50);
00490             cpl_ensure(cpl_error_get_code()== CPL_ERROR_NONE, CPL_ERROR_NULL_INPUT, NULL);
00491         cpl_image_add_scalar(image, 300);
00492         cpl_image_set(image, 10, 10, 0.0); 
00493         cpl_image_set(image, 11, 11, 0.0); 
00494         cpl_image_set(image, 20, 20, 0.0); 
00495         cpl_image_set(image, 10, 40, 0.0); 
00496         cpl_image_set(image, 40, 10, 0.0); 
00497         cpl_image_set(image, 12, 32, 0.0); 
00498         cpl_image_set(image, 50, 50, 0.0); 
00499         cpl_image_set(image, 15, 1, 0.0); 
00500         cpl_image_set(image, 76, 32, 0.0); 
00501         cpl_image_set(image, 10, 19, 0.0); 
00502 
00503         cpl_image_set(image, 30, 10, 6000.0); 
00504         cpl_image_set(image, 31, 11, 6020.0); 
00505         cpl_image_set(image, 30, 20, 6030.0); 
00506         cpl_image_set(image, 30, 40, 6040.0); 
00507         cpl_image_set(image, 30, 10, 6070.0); 
00508         cpl_image_set(image, 52, 32, 6300.0); 
00509         cpl_image_set(image, 60, 50, 6500.0); 
00510         cpl_image_set(image, 85, 1, 6100.0); 
00511         cpl_image_set(image, 86, 32, 6040.0); 
00512         cpl_image_set(image, 90, 19, 6020.0); 
00513 
00514             cpl_image_save(image, frame_name, CPL_BPP_IEEE_FLOAT, plist, CPL_IO_DEFAULT);
00515 
00516 
00517             cpl_image_delete(image);
00518         }
00519         cpl_propertylist_delete(plist);
00520     }
00521 
00522     return frameset;
00523 }

Generated on Fri Apr 18 14:11:40 2008 for UVES Pipeline Reference Manual by  doxygen 1.5.1