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/ccd.c

    r12332 r14401  
    33int ccd (int argc, char **argv) {
    44 
    5   char *RegionName, *RegionList;
    65  double *M1, *M2;
    76  int i, m, k, Npts, NPTS, N;
     
    1211  PhotCode *code[4];
    1312  SkyList *skylist;
     13  SkyRegionSelection *selection;
    1414  Vector *xvec, *yvec;
    1515
     
    1818  catalog.secfilt = NULL;
    1919  catalog.measure = NULL;
    20   RegionName = NULL;
    21   RegionList = NULL;
    2220  skylist = NULL;
     21  selection = NULL;
    2322
    2423  /* load photcode information */
     
    2726
    2827  /* interpret command-line options */
    29   if (!SetRegionSelection (&argc, argv, &RegionName, &RegionList)) goto escape;
     28  if ((selection = SetRegionSelection (&argc, argv)) == NULL) goto escape;
    3029  if (!SetPhotSelections (&argc, argv, 4)) goto usage;
    3130
     
    4847
    4948  /* load region corresponding to selection above */
    50   if ((skylist = SelectRegions (RegionName, RegionList)) == NULL) goto escape;
     49  if ((skylist = SelectRegions (selection)) == NULL) goto escape;
    5150
    5251  /* init vectors to save data */
     
    109108    dvo_catalog_free (&catalog);
    110109  }
    111   SkyListFree (skylist, ((RegionName != NULL) || (RegionList != NULL)));
     110
    112111  xvec[0].Nelements = yvec[0].Nelements = Npts;
     112  SkyListFree (skylist);
     113  FreeSkyRegionSelection (selection);
    113114  return (TRUE);
    114115
     
    118119
    119120escape:
    120   SkyListFree (skylist, ((RegionName != NULL) || (RegionList != NULL)));
     121  SkyListFree (skylist);
     122  FreeSkyRegionSelection (selection);
    121123  dvo_catalog_free (&catalog);
    122   if (RegionName != NULL) free (RegionName);
    123   if (RegionList != NULL) free (RegionList);
    124124  return (FALSE);
    125125}
Note: See TracChangeset for help on using the changeset viewer.