IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Aug 4, 2007, 10:15:51 AM (19 years ago)
Author:
eugene
Message:

extensive updates to the avextract / mextract / skyregion system

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Ohana/src/opihi/dvo/calmextract.c

    r14286 r14401  
    88  int i, j, k, m, N, N1, Nr, mode[2];
    99  int NSTAR, Nstar, Nsecfilt;
    10   char *RegionName, *RegionList;
    1110  double *M1, M2, dM2, color;
    1211
     
    1413  PhotCode *code[2];
    1514  SkyList *skylist;
     15  SkyRegionSelection *selection;
    1616  Vector **vec;
    1717
     
    2020  catalog.secfilt = NULL;
    2121  catalog.measure = NULL;
    22   RegionName = NULL;
    23   RegionList = NULL;
    2422  skylist = NULL;
     23  selection = NULL;
    2524  vec = NULL;
    2625
     
    3029
    3130  /* command line arguments */
    32   if (!SetRegionSelection (&argc, argv, &RegionName, &RegionList)) goto escape;
     31  if ((selection = SetRegionSelection (&argc, argv)) == NULL) goto escape;
    3332  if (!SetPhotSelections (&argc, argv, 2)) goto usage;
    3433
     
    6867
    6968  /* load region corresponding to selection above */
    70   if ((skylist = SelectRegions (RegionName, RegionList)) == NULL) goto escape;
    71   if (!SetImageSelection (TRUE, ((RegionName == NULL) && (RegionList == NULL)))) goto escape;
     69  if ((skylist = SelectRegions (selection)) == NULL) goto escape;
     70  if (!SetImageSelection (TRUE, selection)) goto escape;
    7271
    7372  for (Nr = 0; Nr < skylist[0].Nregions; Nr++) {
     
    8685    dvo_catalog_unlock (&catalog);
    8786
     87    # if (0)
    8888    /* extract values, assign to vectors */
    8989    for (i = 0; i < catalog.Naverage; i++) {
     
    119119      ConcatMeasures (vec[NT ], code[0], mode[0], &catalog.average[i], &catalog.secfilt[i*Nsecfilt], &catalog.measure[m], N1, MEAS_EXPTIME);
    120120      ConcatMeasures (vec[NP ], code[0], mode[0], &catalog.average[i], &catalog.secfilt[i*Nsecfilt], &catalog.measure[m], N1, MEAS_PHOTCODE);
    121       ConcatMeasures (vec[Nd1], code[0], mode[0], &catalog.average[i], &catalog.secfilt[i*Nsecfilt], &catalog.measure[m], N1, MEAS_dMAG);
     121      // ConcatMeasures (vec[Nd1], code[0], mode[0], &catalog.average[i], &catalog.secfilt[i*Nsecfilt], &catalog.measure[m], N1, MEAS_dMAG);
    122122      ConcatMeasures (vec[Nxc], code[0], mode[0], &catalog.average[i], &catalog.secfilt[i*Nsecfilt], &catalog.measure[m], N1, MEAS_XCCD);
    123123      ConcatMeasures (vec[Nyc], code[0], mode[0], &catalog.average[i], &catalog.secfilt[i*Nsecfilt], &catalog.measure[m], N1, MEAS_YCCD);
     
    139139      if (M1 != NULL) free (M1);
    140140    }
     141    # endif
    141142    dvo_catalog_free (&catalog);
    142143  }
    143144
    144   SkyListFree (skylist, ((RegionName != NULL) || (RegionList != NULL)));
    145145  for (i = 0; i < NVEC; i++) {
    146146    vec[i][0].Nelements = N;
    147147  }
     148  SkyListFree (skylist);
     149  FreeSkyRegionSelection (selection);
    148150  FreeImageSelection ();
    149151  return (TRUE);
     
    154156
    155157escape:
     158  SkyListFree (skylist);
     159  FreeSkyRegionSelection (selection);
    156160  FreeImageSelection ();
    157   SkyListFree (skylist, ((RegionName != NULL) || (RegionList != NULL)));
    158161  for (i = 0; i < NVEC; i++) {
    159162    DeleteVector (vec[i]);
Note: See TracChangeset for help on using the changeset viewer.