IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 38501


Ignore:
Timestamp:
Jun 19, 2015, 3:11:07 PM (11 years ago)
Author:
eugene
Message:

do a better job of freeing memory; fix airmass in tests

Location:
branches/eam_branches/ipp-20150616/Ohana/src/addstar
Files:
14 edited

Legend:

Unmodified
Added
Removed
  • branches/eam_branches/ipp-20150616/Ohana/src/addstar/include/addstar.h

    r38467 r38501  
    190190AddstarClientOptions args                 PROTO((int argc, char **argv, AddstarClientOptions options));
    191191AddstarClientOptions args_parallel_client PROTO((int argc, char **argv, AddstarClientOptions options));
     192void FreeConfig PROTO((void));
    192193
    193194void       AddToCalibration       PROTO((Average *average, SecFilt *secfilt, Measure *measure, Measure *new, off_t *next, off_t Nstar));
     
    230231Header   **LoadHeaders            PROTO((FILE *f, int *mode, int *Nheader));
    231232HeaderSet *MatchHeaders           PROTO((off_t **extsize, off_t *nimage, int mode, Header **headers, int Nheaders));
     233void       HeaderSetFree          PROTO((HeaderSet *headerSets, off_t NheaderSets));
    232234int        LoadData               PROTO((FILE *f, char *file, Image **images, off_t *nvalid, Stars **stars, unsigned int *Nstars, Header **headers, off_t *extsize, HeaderSet *headerSets, int NheaderSets, AddstarClientOptions *options));
    233235int        GetZeroPointExposure   PROTO((Header **headers, HeaderSet *headerSets, off_t Nimages));
  • branches/eam_branches/ipp-20150616/Ohana/src/addstar/include/loadgalphot.h

    r38489 r38501  
    1919  double c11;
    2020  double c02;
     21  int ClipNiter;
     22  float ClipNsigma;
    2123} Fit2D;
    2224
  • branches/eam_branches/ipp-20150616/Ohana/src/addstar/src/ConfigInit.c

    r38441 r38501  
    224224  }
    225225
     226  FreeConfigFile();
    226227  free (config);
    227228  free (file);
     
    240241  return;
    241242}
     243
     244void FreeConfig (void) {
     245  FREE (CATDIR);
     246}
  • branches/eam_branches/ipp-20150616/Ohana/src/addstar/src/ImageIndex.c

    r35579 r38501  
    11# include "addstar.h"
     2
     3void ImageIndexFree (ImageIndex *index) {
     4  if (!index) return;
     5  FREE (index->externID);
     6  FREE (index->imageID);
     7  FREE (index->found);
     8  FREE (index);
     9}
    210
    311ImageIndex *ImageIndexLoad (char *filename) {
     
    1624  if (!f) {
    1725    fprintf (stderr, "ERROR: cannot open image index file %s\n", filename);
     26    FREE (index);
    1827    return NULL;
    1928  }
     
    2332    if (VERBOSE) fprintf (stderr, "can't read image index header\n");
    2433    fclose (f);
     34    FREE (index);
    2535    return NULL;
    2636  }
     
    2838    if (VERBOSE) fprintf (stderr, "can't read image index matrix\n");
    2939    gfits_free_header (&header);
    30     fclose (f);
    31     return NULL;
    32   }
    33 
     40    FREE (index);
     41    fclose (f);
     42    return NULL;
     43  }
    3444  ftable.header = &theader;
    3545
     
    3747  if (!gfits_load_header (f, &theader)) {
    3848    fclose (f);
     49    gfits_free_header (&header);
     50    FREE (index);
    3951    return NULL;
    4052  }
     
    4355  if (!gfits_fread_ftable_data (f, &ftable, FALSE)) {
    4456    fclose (f);
     57    gfits_free_header (&header);
     58    gfits_free_header (&theader);
     59    FREE (index);
    4560    return (NULL);
    4661  }
     
    7691  }
    7792
     93  gfits_free_header (&header);
     94  gfits_free_matrix (&matrix);
     95  gfits_free_header (&theader);
     96  gfits_free_table (&ftable);
     97
    7898  return index;
    7999}
     
    192212  // do this as an 'extend' operation
    193213  ImageIndexSave (filename, index);
     214  ImageIndexFree (index);
    194215  return TRUE;
    195216}
     
    209230  // do this as an 'extend' operation
    210231  ImageIndexSave (filename, index);
     232  ImageIndexFree (index);
    211233  return TRUE;
    212234}
  • branches/eam_branches/ipp-20150616/Ohana/src/addstar/src/LoadData.c

    r37807 r38501  
    106106    inStars = FilterStars (inStars, &images[0][Nvalid], Nvalid, options);
    107107    *stars = MergeStars (*stars, Nstars, inStars, images[0][Nvalid].nstar);
     108    FREE (inStars);
     109
    108110    Nvalid++;
    109111    CHECK_REALLOCATE (images[0], Image, NVALID, Nvalid, 10);
  • branches/eam_branches/ipp-20150616/Ohana/src/addstar/src/LoadHeaders.c

    r38467 r38501  
    1717    status = gfits_fread_header (f, headers[i]);
    1818    if (!status) {
     19      gfits_free_header (headers[i]);
     20      FREE (headers[i]);
    1921      *Nheaders = i;
    2022      return (headers);
  • branches/eam_branches/ipp-20150616/Ohana/src/addstar/src/LoadStars.c

    r38467 r38501  
    33Stars *LoadStars (char *filename, unsigned int *Nstars, Image **images, off_t *Nimages, AddstarClientOptions *options) {
    44
    5   off_t *extsize, NheaderSets;
    6   int i, Nfile, NFILE, Nheaders, mode;
     5  off_t *extsize;
     6  int i, Nfile, NFILE, mode;
    77  char **file, line[1024];
    88  FILE *f;
    99  glob_t globList;
    10   Header **headers;
    1110  Stars *stars;
    12   HeaderSet *headerSets;
    1311
    1412  if (options[0].filelist) {
     
    7068    }
    7169
     70    int Nheaders = 0;
     71    Header **headers = NULL;
     72    off_t NheaderSets = 0;
     73    HeaderSet *headerSets = NULL;
     74
    7275    // otherwise, we have FITS-table files: parse their headers to determine the contents
    7376    headers = LoadHeaders (f, &mode, &Nheaders);
     
    7578    if (headerSets == NULL) {
    7679      fprintf (stderr, "ERROR: can't read headers for %s\n", file[i]);
    77       continue;
     80      goto next_file;
    7881    }
    7982    if (NheaderSets == 0) {
    8083      fprintf (stderr, "no object data in file %s, skipping\n", file[i]);
    81       continue;
     84      goto next_file;
    8285    }
    8386    if (VERBOSE) fprintf (stderr, "file %s has %d headers, including "OFF_T_FMT" images\n", file[i], Nheaders,  NheaderSets);
     
    97100    if (headerSets[0].exttype && !strcmp (headerSets[0].exttype, "SDSS_OBJ")) {
    98101      LoadDataSDSS (f, file[i], images, Nimages, &stars, Nstars, headers, extsize, headerSets, NheaderSets);
    99       continue;
     102      goto next_file;
    100103    }
    101104
     
    103106    if (headerSets[0].exttype && !strcmp (headerSets[0].exttype, "UKIRT_OBJ")) {
    104107      LoadDataUKIRT (f, file[i], images, Nimages, &stars, Nstars, headers, extsize, headerSets, NheaderSets);
    105       continue;
     108      goto next_file;
    106109    }
    107110
     
    119122    # endif
    120123
     124  next_file:
     125    HeaderSetFree (headerSets, NheaderSets);
     126    int j;
     127    for (j = 0; j < Nheaders; j++) {
     128      gfits_free_header (headers[j]);
     129      FREE (headers[j]);
     130    }
     131    FREE (headers);
     132    FREE (extsize);
    121133  }
    122134
     
    129141  }
    130142
     143  for (i = 0; i < Nfile; i++) {
     144    FREE (file[i]);
     145  }
     146  FREE (file);
     147
    131148  return stars;
    132149}
  • branches/eam_branches/ipp-20150616/Ohana/src/addstar/src/MatchHeaders.c

    r38467 r38501  
    22
    33// XXX largely psphot specific
     4
     5void HeaderSetFree (HeaderSet *headerSets, off_t NheaderSets) {
     6  int i;
     7
     8  if (!headerSets) return;
     9  for (i = 0; i < NheaderSets; i++) {
     10    FREE (headerSets[i].exthead);
     11    FREE (headerSets[i].exttype);
     12    FREE (headerSets[i].extdata);
     13    FREE (headerSets[i].extxrad);
     14  }
     15  FREE (headerSets);
     16}
    417
    518HeaderSet *MatchHeaders (off_t **extsize, off_t *nimage, int mode, Header **headers, int Nheaders) {
     
    2235    headerSets[Nimage].exthead     = strcreate ("PHU");
    2336    headerSets[Nimage].extdata     = strcreate ("NONE");
     37    headerSets[Nimage].exttype     = NULL;
     38    headerSets[Nimage].extxrad     = NULL;
    2439    headerSets[Nimage].extnum_data = -1;
    2540    headerSets[Nimage].extnum_head =  0;
     
    3449    headerSets[0].exttype     = strcreate ("SDSS_OBJ");
    3550    headerSets[0].exthead     = strcreate ("PHU");
     51    headerSets[0].extxrad     = NULL;
    3652    headerSets[0].extnum_head = 0;
    3753    headerSets[0].extnum_data = 1;
     
    112128
    113129  keep:
    114     headerSets[Nimage].exttype = strcreate (exttype);
    115 
    116130    gfits_scan (headers[i], ExtnameKeyword, "%s", 1, extname);
    117131    gfits_scan (headers[i], "EXTHEAD", "%s", 1, exthead);
    118132
     133    headerSets[Nimage].exttype     = strcreate (exttype);
    119134    headerSets[Nimage].extdata     = strcreate (extname);
    120135    headerSets[Nimage].exthead     = strcreate (exthead);
     
    171186      headerSets[Nimage].exttype     = strcreate ("SMPDATA");
    172187      headerSets[Nimage].exthead     = strcreate ("PHU");
     188      headerSets[Nimage].extxrad     = NULL;
    173189      headerSets[Nimage].extnum_head = 0;
    174190      headerSets[Nimage].extnum_data = 1;
  • branches/eam_branches/ipp-20150616/Ohana/src/addstar/src/ReadStarsFITS.c

    r38441 r38501  
    125125    return (NULL);
    126126  }
     127
     128  gfits_free_table (&table);
     129
    127130  // Nstars is not necessarily == *nstars (The former is the number of detections, the
    128131  // latter are the 'good' detections reported by the photometry system.
  • branches/eam_branches/ipp-20150616/Ohana/src/addstar/src/UpdateImageIDs.c

    r38467 r38501  
    8787
    8888  dvo_image_unlock (&db);
     89  gfits_db_free (&db);
    8990
    9091  return TRUE;
  • branches/eam_branches/ipp-20150616/Ohana/src/addstar/src/addstar.c

    r38471 r38501  
    1010  off_t i, Nimages;
    1111  off_t Naverage, Nmeasure, Nlensing;
    12   Stars *stars, **subset;
    13   Image *images;
    1412  Catalog catalog;
    1513  FITS_DB db;
     
    4846  MARKTIME ("init and config: %f sec\n", dtime); RESETTIME;
    4947
    50   stars = NULL;
     48  Stars *stars = NULL;
     49  Image *images = NULL;
    5150
    5251  /*** load in the new data (images, stars) ***/
     
    155154      case ADDSTAR_MODE_REFCAT:
    156155        stars = greference (argv[1], skylist[0].regions[i], options.photcode, &Nstars);
    157       case ADDSTAR_MODE_REFLIST:
    158         subset = find_subset (skylist[0].regions[i], stars, Nstars, &Nsubset);
     156      case ADDSTAR_MODE_REFLIST: {
     157        Stars **subset = find_subset (skylist[0].regions[i], stars, Nstars, &Nsubset);
    159158        if (options.closest) {
    160159          Nmatch += find_matches_closest_refstars (skylist[0].regions[i], subset, Nsubset, &catalog, options);
     
    164163        if (Nsubset) free (subset);
    165164        break;
     165      }
    166166    }
    167167    if (VERBOSE) MARKTIME ("match stars: %f sec\n", dtime); RESETTIME;
     
    189189    if (options.mode == ADDSTAR_MODE_REFCAT) free (stars);
    190190  }
     191  SkyListFree (skylist);
     192
     193  if (options.mode != ADDSTAR_MODE_REFCAT) {
     194    FREE (stars);
     195  }
    191196
    192197  // We only measure a single value for the entire mosaic (add all images to this function)
     
    218223    SetProtect (FALSE);
    219224  }
     225  FREE (images);
    220226  dvo_image_unlock (&db); /* unlock? */
     227  gfits_db_free (&db); /* unlock? */
    221228
    222229  gettimeofday (&stopAddstar, (void *) NULL);
     
    224231  fprintf (stderr, "SUCCESS: elapsed time %9.4f sec for %5d stars (%5d matches), "OFF_T_FMT" average, "OFF_T_FMT" measure, "OFF_T_FMT" lensing\n", dtime, Nstars, Nmatch,  Naverage,  Nmeasure, Nlensing);
    225232
     233  // XXX test
     234  FreeConfig ();
     235  FreePhotcodeTable ();
     236  SkyTableFree (sky);
     237  ohana_memcheck (1);
     238  ohana_memdump (1);
    226239  exit (0);
    227240}
  • branches/eam_branches/ipp-20150616/Ohana/src/addstar/src/loadgalphot_fit2d.c

    r38489 r38501  
    1515  fit->wterm = fit->nterm*(fit->nterm + 1)/2;
    1616  fit->mterm = 2*order + 1;
     17
     18  fit->ClipNiter = 1;
     19  fit->ClipNsigma = 0.0;
    1720
    1821  /* allocate the summation matrices */
     
    8790  float *x, *y, *z, *zf;
    8891
    89   float ClipNSigma = 0;
    90   int ClipNiter  = 1;
    91 
    92   for (N = 0; N < ClipNiter; N++) {
     92  for (N = 0; N < fit->ClipNiter; N++) {
    9393    fit2d_reset (fit);
    9494
     
    209209    mean  = dZ / Npt;
    210210    sigma = sqrt (fabs(dZ2/Npt - SQ(mean)));
    211     maxsigma = ClipNSigma * sigma;
     211    maxsigma = fit->ClipNsigma * sigma;
    212212
    213213    // if (VERBOSE) gprint (GP_ERR, "mean: %g, sigma: %g, maxsigma: %g\n", mean, sigma, maxsigma);
     
    219219    zf = zfit;
    220220    int Nmask = 0;
    221     for (i = 0; ClipNSigma && (i < Npts); i++, x++, y++, z++, zf++) {
     221    for (i = 0; fabs(fit->ClipNsigma) > 0.001 && (i < Npts); i++, x++, y++, z++, zf++) {
    222222      float dZi = (*z - *zf);
    223223      if (fabs(dZi) > maxsigma) {
  • branches/eam_branches/ipp-20150616/Ohana/src/addstar/src/loadgalphot_readstars.c

    r38488 r38501  
    3535    fclose (f);
    3636    return NULL;
     37  }
     38
     39  {
     40    Header header_xfit;
     41    FTable ftable_xfit;
     42
     43    if (!gfits_find_Xheader (f, &header_xfit, "SkyChip.xfit")) {
     44      if (VERBOSE) fprintf (stderr, "can't read galaxy photometry header\n");
     45      gfits_free_header (&header_xfit);
     46      gfits_free_header (&PHU);
     47      fclose (f);
     48      return NULL;
     49    }
     50
     51    ftable_xfit.header = &header_xfit;
     52
     53    if (!gfits_fread_ftable_data (f, &ftable_xfit, FALSE)) {
     54      if (VERBOSE) fprintf (stderr, "can't read galaxy photometry data\n");
     55      gfits_free_header (&header_xfit);
     56      gfits_free_header (&PHU);
     57      fclose (f);
     58      return (NULL);
     59    }
     60
     61    char type[16];
     62    int firstCol = TRUE;
     63
     64    GET_COLUMN (ID_fit,        "IPP_IDET",      int);
     65    GET_COLUMN (MODEL_TYPE_fit,"MODEL_TYPE",    char); NcharModel = Ncol;.
     66    GET_COLUMN (EXT_WIDTH_MAJ, "EXT_WIDTH_MAJ", float);
     67    GET_COLUMN (EXT_WIDTH_MIN, "EXT_WIDTH_MIN", float);
     68    GET_COLUMN (EXT_THETA,     "EXT_THETA",     float);
     69    GET_COLUMN (EXT_THETA_ERR, "EXT_THETA_ERR", float);
     70    GET_COLUMN (INDEX,         "EXT_PAR_07",    float);
     71
     72    // free the memory associated with the FITS files
     73    gfits_free_header (&header);
     74    gfits_free_table (&ftable);
    3775  }
    3876
     
    92130
    93131  Fit2D *fit = fit2d_init (2);
     132  fit->ClipNiter = 3;
     133  fit->ClipNsigma = 5.0;
    94134
    95135  int Nbad = 0;
     
    185225    Xpt[i] = MajorMin + MajorDel*iX;
    186226    Ypt[i] = MinorMin + MinorDel*iY;
     227    Nvalid ++;
    187228    if (chisq[i] < chisqMin) {
    188229      chisqMin = chisq[i];
    189230      iMin = i;
    190       Nvalid ++;
    191     }
    192   }
    193   if (!Nvalid) return FALSE; // we cannot do anything if there is no finite chisq
     231    }
     232  }
     233  if (!Nvalid) {
     234    fprintf (stderr, "no good points\n");
     235    return FALSE; // we cannot do anything if there is no finite chisq
     236  }
    194237 
    195238  if (Nvalid < 6) {
     
    198241    galphot->majorAxisErr = MajorDel;
    199242    galphot->minorAxisErr = MinorDel;
     243    fprintf (stderr, "too few good points: %d\n", Nvalid);
    200244    return FALSE;
    201245  }
    202246
    203   // find the list of distances from the min point
    204   for (i = 0; i < Npts; i++) {
    205     Rpt[i] = hypot(Xpt[i] - Xpt[iMin], Ypt[i] - Ypt[iMin]);
    206     // only include unmasked points
    207     if (mask[i]) {
    208       Rsr[i] = FLT_MAX;
    209     } else {
    210       Rsr[i] = Rpt[i];
    211     }
    212   }
    213 
    214   // sorts the distances in ascending order
    215   fsort (Rsr, Npts);
    216   int Nmin = MIN(Nvalid, 9);
    217 
    218   float Rmax = Rsr[Nmin-1];
    219   for (i = 0; i < Npts; i++) {
    220     if (Rpt[i] > Rmax) mask[i] = TRUE;
    221   }
    222 
    223   // fit the inner 9 points
    224   if (!fit2d (fit, Xpt, Ypt, chisq, chisqFit, mask, Npts)) {
    225     // raise a flag?
    226     galphot->majorAxis = Xpt[iMin];
    227     galphot->minorAxis = Ypt[iMin];
    228     galphot->majorAxisErr = MajorDel;
    229     galphot->minorAxisErr = MinorDel;
    230     return FALSE;
    231   }
    232 
    233   // exclude any extreme outliers
    234   float maxSigma = 5.0*fit->sigma;
    235 
    236   memset (mask, 0, Npts*sizeof(char));
    237   for (i = 0; i < Npts; i++) {
    238     if (!isfinite(chisq[i])) { mask[i] = TRUE; continue; }
    239     float dZ = chisq[i] - chisqFit[i];
    240     if (fabs(dZ) > maxSigma) { mask[i] = TRUE; continue; }
    241   }
    242  
    243247  // re-fit all except the most extreme set
    244248  if (!fit2d (fit, Xpt, Ypt, chisq, chisqFit, mask, Npts)) {
     
    248252    galphot->majorAxisErr = MajorDel;
    249253    galphot->minorAxisErr = MinorDel;
     254    fprintf (stderr, "failed fit\n");
    250255    return FALSE;
    251256  }
  • branches/eam_branches/ipp-20150616/Ohana/src/addstar/test/dvomerge.dvo

    r29938 r38501  
    22
    33input tap.dvo
     4
     5macro test.all
     6  $TAP_VERBOSE = 1
     7  test.dvomerge.update.new
     8end
    49
    510# create 2 populated catdirs, each with a couple of cmf files
     
    813  tapPLAN 51
    914
    10   exec rm -rf catdir.test1
    11   exec rm -rf catdir.test2
    12   exec rm -rf catdir.test3
     15  tapEXEC rm -rf catdir.test1
     16  tapEXEC rm -rf catdir.test2
     17  tapEXEC rm -rf catdir.test3
    1318
    1419  $RA = 10.0
     
    1621
    1722  mkinput
    18   exec mkcmf test.in.txt test.cmf -date 2008/1/1 -time 01:00:00 -radec 10.0 20.0
    19   exec addstar -D CATDIR catdir.test1 -D CAMERA simtest test.cmf
    20 
    21   exec mkcmf test.in.txt test.cmf -date 2008/1/1 -time 02:00:00 -radec 10.0 20.0
    22   exec addstar -D CATDIR catdir.test1 -D CAMERA simtest test.cmf
    23 
    24   exec mkcmf test.in.txt test.cmf -date 2008/1/1 -time 03:00:00 -radec 9.9 20.0
    25   exec addstar -D CATDIR catdir.test2 -D CAMERA simtest test.cmf
    26 
    27   exec mkcmf test.in.txt test.cmf -date 2008/1/1 -time 04:00:00 -radec 9.9 20.0
    28   exec addstar -D CATDIR catdir.test2 -D CAMERA simtest test.cmf
    29 
    30   exec mkcmf test.in.txt test.cmf -date 2008/1/1 -time 05:00:00 -radec 10.0 19.9
    31   exec addstar -D CATDIR catdir.test1 -D CAMERA simtest test.cmf
    32 
    33   exec mkcmf test.in.txt test.cmf -date 2008/1/1 -time 06:00:00 -radec 10.0 19.9
    34   exec addstar -D CATDIR catdir.test1 -D CAMERA simtest test.cmf
    35 
    36   exec mkcmf test.in.txt test.cmf -date 2008/1/1 -time 07:00:00 -radec 9.9 19.9
    37   exec addstar -D CATDIR catdir.test2 -D CAMERA simtest test.cmf
    38 
    39   exec mkcmf test.in.txt test.cmf -date 2008/1/1 -time 08:00:00 -radec 9.9 19.9
    40   exec addstar -D CATDIR catdir.test2 -D CAMERA simtest test.cmf
     23  tapEXEC mkcmf test.in.txt test.cmf -date 2008/1/1 -time 01:00:00 -radec 10.0 20.0
     24  tapEXEC addstar -D CATDIR catdir.test1 -D CAMERA simtest test.cmf -quick-airmass
     25
     26  tapEXEC mkcmf test.in.txt test.cmf -date 2008/1/1 -time 02:00:00 -radec 10.0 20.0
     27  tapEXEC addstar -D CATDIR catdir.test1 -D CAMERA simtest test.cmf -quick-airmass
     28
     29  tapEXEC mkcmf test.in.txt test.cmf -date 2008/1/1 -time 03:00:00 -radec 9.9 20.0
     30  tapEXEC addstar -D CATDIR catdir.test2 -D CAMERA simtest test.cmf -quick-airmass
     31
     32  tapEXEC mkcmf test.in.txt test.cmf -date 2008/1/1 -time 04:00:00 -radec 9.9 20.0
     33  tapEXEC addstar -D CATDIR catdir.test2 -D CAMERA simtest test.cmf -quick-airmass
     34
     35  tapEXEC mkcmf test.in.txt test.cmf -date 2008/1/1 -time 05:00:00 -radec 10.0 19.9
     36  tapEXEC addstar -D CATDIR catdir.test1 -D CAMERA simtest test.cmf -quick-airmass
     37
     38  tapEXEC mkcmf test.in.txt test.cmf -date 2008/1/1 -time 06:00:00 -radec 10.0 19.9
     39  tapEXEC addstar -D CATDIR catdir.test1 -D CAMERA simtest test.cmf -quick-airmass
     40
     41  tapEXEC mkcmf test.in.txt test.cmf -date 2008/1/1 -time 07:00:00 -radec 9.9 19.9
     42  tapEXEC addstar -D CATDIR catdir.test2 -D CAMERA simtest test.cmf -quick-airmass
     43
     44  tapEXEC mkcmf test.in.txt test.cmf -date 2008/1/1 -time 08:00:00 -radec 9.9 19.9
     45  tapEXEC addstar -D CATDIR catdir.test2 -D CAMERA simtest test.cmf -quick-airmass
    4146
    4247  break
    4348
    44   exec rsync -auc catdir.test2/ catdir.test3/
     49  tapEXEC rsync -auc catdir.test2/ catdir.test3/
    4550
    4651  date -var t1 -seconds -reftime 1276000000
    47   exec dvomerge catdir.test1 into catdir.test3
     52  tapEXEC dvomerge catdir.test1 into catdir.test3
    4853  date -var t2 -seconds -reftime 1276000000
    4954  echo "merge time: {$t2 - $t1}"
     
    114119  end
    115120
    116   # exec rm test.in.txt test.cmf
    117   # exec rm -rf catdir.test1
    118   # exec rm -rf catdir.test2
    119   # exec rm -rf catdir.test3
     121  # tapEXEC rm test.in.txt test.cmf
     122  # tapEXEC rm -rf catdir.test1
     123  # tapEXEC rm -rf catdir.test2
     124  # tapEXEC rm -rf catdir.test3
    120125
    121126  tapDONE
     
    127132  tapPLAN 51
    128133
    129   exec rm -rf catdir.test1
    130   exec rm -rf catdir.test2
    131   exec rm -rf catdir.test3
     134  tapEXEC rm -rf catdir.test1
     135  tapEXEC rm -rf catdir.test2
     136  tapEXEC rm -rf catdir.test3
    132137
    133138  $RA = 10.0
     
    135140
    136141  mkinput
    137   exec mkcmf test.in.txt test.cmf -date 2008/1/1 -time 01:00:00 -radec $RA $DEC
    138   exec addstar -D CATDIR catdir.test1 -D CAMERA simtest test.cmf
    139 
    140   exec mkcmf test.in.txt test.cmf -date 2008/1/1 -time 02:00:00 -radec $RA $DEC
    141   exec addstar -D CATDIR catdir.test1 -D CAMERA simtest test.cmf
    142 
    143   exec mkcmf test.in.txt test.cmf -date 2008/1/1 -time 03:00:00 -radec $RA $DEC
    144   exec addstar -D CATDIR catdir.test2 -D CAMERA simtest test.cmf
    145 
    146   exec mkcmf test.in.txt test.cmf -date 2008/1/1 -time 04:00:00 -radec $RA $DEC
    147   exec addstar -D CATDIR catdir.test2 -D CAMERA simtest test.cmf
    148 
    149   break
    150 
    151   exec rsync -auc catdir.test2/ catdir.test3/
     142  tapEXEC mkcmf test.in.txt test.cmf -date 2008/1/1 -time 01:00:00 -radec $RA $DEC
     143  tapEXEC addstar -D CATDIR catdir.test1 -D CAMERA simtest test.cmf -quick-airmass
     144
     145  tapEXEC mkcmf test.in.txt test.cmf -date 2008/1/1 -time 02:00:00 -radec $RA $DEC
     146  tapEXEC addstar -D CATDIR catdir.test1 -D CAMERA simtest test.cmf -quick-airmass
     147
     148  tapEXEC mkcmf test.in.txt test.cmf -date 2008/1/1 -time 03:00:00 -radec $RA $DEC
     149  tapEXEC addstar -D CATDIR catdir.test2 -D CAMERA simtest test.cmf -quick-airmass
     150
     151  tapEXEC mkcmf test.in.txt test.cmf -date 2008/1/1 -time 04:00:00 -radec $RA $DEC
     152  tapEXEC addstar -D CATDIR catdir.test2 -D CAMERA simtest test.cmf -quick-airmass
     153
     154  tapEXEC rsync -auc catdir.test2/ catdir.test3/
    152155
    153156  date -var t1 -seconds -reftime 1276000000
    154   exec dvomerge catdir.test1 into catdir.test3
     157  tapEXEC dvomerge catdir.test1 into catdir.test3
    155158  date -var t2 -seconds -reftime 1276000000
    156159  echo "merge time: {$t2 - $t1}"
     
    221224  end
    222225
    223   # exec rm test.in.txt test.cmf
    224   # exec rm -rf catdir.test1
    225   # exec rm -rf catdir.test2
    226   # exec rm -rf catdir.test3
     226  # tapEXEC rm test.in.txt test.cmf
     227  # tapEXEC rm -rf catdir.test1
     228  # tapEXEC rm -rf catdir.test2
     229  # tapEXEC rm -rf catdir.test3
    227230
    228231  tapDONE
     
    234237  tapPLAN 51
    235238
    236   exec rm -rf catdir.test1
    237   exec rm -rf catdir.test2
     239  tapEXEC rm -rf catdir.test1
     240  tapEXEC rm -rf catdir.test2
    238241
    239242  $RA = 10.0
     
    241244
    242245  mkinput
    243   exec mkcmf test.in.txt test.cmf -date 2008/1/1 -time 01:00:00 -radec $RA $DEC
    244   exec addstar -D CATDIR catdir.test1 -D CAMERA simtest test.cmf
    245 
    246   exec mkcmf test.in.txt test.cmf -date 2008/1/1 -time 02:00:00 -radec $RA $DEC
    247   exec addstar -D CATDIR catdir.test1 -D CAMERA simtest test.cmf
     246  tapEXEC mkcmf test.in.txt test.cmf -date 2008/1/1 -time 01:00:00 -radec $RA $DEC
     247  tapEXEC addstar -D CATDIR catdir.test1 -D CAMERA simtest test.cmf -quick-airmass
     248
     249  tapEXEC mkcmf test.in.txt test.cmf -date 2008/1/1 -time 02:00:00 -radec $RA $DEC
     250  tapEXEC addstar -D CATDIR catdir.test1 -D CAMERA simtest test.cmf -quick-airmass
    248251
    249252  date -var t1 -seconds -reftime 1276000000
    250   exec dvomerge catdir.test1 into catdir.test2
     253  tapEXEC dvomerge catdir.test1 into catdir.test2
    251254  date -var t2 -seconds -reftime 1276000000
    252255  echo "merge time: {$t2 - $t1}"
     
    297300  end
    298301
    299   # exec rm test.in.txt test.cmf
    300   # exec rm -rf catdir.test1
    301   # exec rm -rf catdir.test2
    302   # exec rm -rf catdir.test3
     302  # tapEXEC rm test.in.txt test.cmf
     303  # tapEXEC rm -rf catdir.test1
     304  # tapEXEC rm -rf catdir.test2
     305  # tapEXEC rm -rf catdir.test3
    303306
    304307  tapDONE
     
    310313  tapPLAN 51
    311314
    312   exec rm -rf catdir.test1
    313   exec rm -rf catdir.test2
    314   exec rm -rf catdir.test3
     315  tapEXEC rm -rf catdir.test1
     316  tapEXEC rm -rf catdir.test2
     317  tapEXEC rm -rf catdir.test3
    315318
    316319  $RA = 10.0
     
    318321
    319322  mkinput
    320   exec mkcmf test.in.txt test.cmf -date 2008/1/1 -time 01:00:00 -radec $RA $DEC
    321   exec addstar -D CATDIR catdir.test1 -D CAMERA simtest test.cmf
    322 
    323   exec mkcmf test.in.txt test.cmf -date 2008/1/1 -time 02:00:00 -radec $RA $DEC
    324   exec addstar -D CATDIR catdir.test1 -D CAMERA simtest test.cmf
     323  tapEXEC mkcmf test.in.txt test.cmf -date 2008/1/1 -time 01:00:00 -radec $RA $DEC
     324  tapEXEC addstar -D CATDIR catdir.test1 -D CAMERA simtest test.cmf -quick-airmass
     325
     326  tapEXEC mkcmf test.in.txt test.cmf -date 2008/1/1 -time 02:00:00 -radec $RA $DEC
     327  tapEXEC addstar -D CATDIR catdir.test1 -D CAMERA simtest test.cmf -quick-airmass
    325328
    326329  # generate a few extra unmatched sources
    327330  mkinput.extras
    328   exec mkcmf test.in.txt test.cmf -date 2008/1/1 -time 03:00:00 -radec $RA $DEC
    329   exec addstar -D CATDIR catdir.test2 -D CAMERA simtest test.cmf
    330 
    331   exec mkcmf test.in.txt test.cmf -date 2008/1/1 -time 04:00:00 -radec $RA $DEC
    332   exec addstar -D CATDIR catdir.test2 -D CAMERA simtest test.cmf
    333 
    334   exec rsync -auc catdir.test2/ catdir.test3/
    335 
    336   exec dvomerge catdir.test1 into catdir.test3
     331  tapEXEC mkcmf test.in.txt test.cmf -date 2008/1/1 -time 03:00:00 -radec $RA $DEC
     332  tapEXEC addstar -D CATDIR catdir.test2 -D CAMERA simtest test.cmf -quick-airmass
     333
     334  tapEXEC mkcmf test.in.txt test.cmf -date 2008/1/1 -time 04:00:00 -radec $RA $DEC
     335  tapEXEC addstar -D CATDIR catdir.test2 -D CAMERA simtest test.cmf -quick-airmass
     336
     337  tapEXEC rsync -auc catdir.test2/ catdir.test3/
     338
     339  tapEXEC dvomerge catdir.test1 into catdir.test3
    337340
    338341  catdir catdir.test3
     
    401404  end
    402405
    403   # exec rm test.in.txt test.cmf
    404   # exec rm -rf catdir.test1
    405   # exec rm -rf catdir.test2
    406   # exec rm -rf catdir.test3
     406  # tapEXEC rm test.in.txt test.cmf
     407  # tapEXEC rm -rf catdir.test1
     408  # tapEXEC rm -rf catdir.test2
     409  # tapEXEC rm -rf catdir.test3
    407410
    408411  tapDONE
     
    414417  tapPLAN 21
    415418
    416   exec rm -rf catdir.test1
    417   exec rm -rf catdir.test2
    418   exec rm -rf catdir.test3
     419  tapEXEC rm -rf catdir.test1
     420  tapEXEC rm -rf catdir.test2
     421  tapEXEC rm -rf catdir.test3
    419422
    420423  $RA = 10.0
     
    422425
    423426  mkinput
    424   exec mkcmf test.in.txt test.cmf -date 2008/1/1 -time 01:00:00 -radec $RA $DEC
    425   exec addstar -D CATDIR catdir.test1 -D CAMERA simtest test.cmf
    426 
    427   exec mkcmf test.in.txt test.cmf -date 2008/1/1 -time 02:00:00 -radec $RA $DEC
    428   exec addstar -D CATDIR catdir.test1 -D CAMERA simtest test.cmf
    429 
    430   exec mkcmf test.in.txt test.cmf -date 2008/1/1 -time 03:00:00 -radec $RA $DEC
    431   exec addstar -D CATDIR catdir.test2 -D CAMERA simtest test.cmf
    432 
    433   exec mkcmf test.in.txt test.cmf -date 2008/1/1 -time 04:00:00 -radec $RA $DEC
    434   exec addstar -D CATDIR catdir.test2 -D CAMERA simtest test.cmf
    435 
    436   exec dvomerge catdir.test1 and catdir.test2 to catdir.test3
     427  tapEXEC mkcmf test.in.txt test.cmf -date 2008/1/1 -time 01:00:00 -radec $RA $DEC
     428  tapEXEC addstar -D CATDIR catdir.test1 -D CAMERA simtest test.cmf -quick-airmass
     429
     430  tapEXEC mkcmf test.in.txt test.cmf -date 2008/1/1 -time 02:00:00 -radec $RA $DEC
     431  tapEXEC addstar -D CATDIR catdir.test1 -D CAMERA simtest test.cmf -quick-airmass
     432
     433  tapEXEC mkcmf test.in.txt test.cmf -date 2008/1/1 -time 03:00:00 -radec $RA $DEC
     434  tapEXEC addstar -D CATDIR catdir.test2 -D CAMERA simtest test.cmf -quick-airmass
     435
     436  tapEXEC mkcmf test.in.txt test.cmf -date 2008/1/1 -time 04:00:00 -radec $RA $DEC
     437  tapEXEC addstar -D CATDIR catdir.test2 -D CAMERA simtest test.cmf -quick-airmass
     438
     439  tapEXEC dvomerge catdir.test1 and catdir.test2 to catdir.test3
    437440
    438441  catdir catdir.test3
     
    501504  end
    502505
    503   # exec rm test.in.txt test.cmf
    504   # exec rm -rf catdir.test1
    505   # exec rm -rf catdir.test2
    506   # exec rm -rf catdir.test3
     506  # tapEXEC rm test.in.txt test.cmf
     507  # tapEXEC rm -rf catdir.test1
     508  # tapEXEC rm -rf catdir.test2
     509  # tapEXEC rm -rf catdir.test3
    507510
    508511  tapDONE
     
    511514# make a simple input file for mkcmf
    512515macro mkinput.alt
    513   exec rm -f test.in.txt
     516  tapEXEC rm -f test.in.txt
    514517
    515518  output test.in.txt
     
    524527# make a simple input file for mkcmf
    525528macro mkinput
    526   exec rm -f test.in.txt
     529  tapEXEC rm -f test.in.txt
    527530
    528531  output test.in.txt
     
    537540# make a simple input file for mkcmf
    538541macro mkinput.extras
    539   exec rm -f test.in.txt
     542  tapEXEC rm -f test.in.txt
    540543
    541544  output test.in.txt
Note: See TracChangeset for help on using the changeset viewer.