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

    r12332 r14401  
    33int cmd (int argc, char **argv) { /* really need to think about upper limits & how to represent them */
    44 
    5   char *RegionName, *RegionList;
    65  double *M1, *M3;
    76  int i, j, m, i1, i3, N1, N3, N;
     
    1211  Catalog catalog;
    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, 3)) goto usage;
    3130
     
    4645
    4746  /* load region corresponding to selection above */
    48   if ((skylist = SelectRegions (RegionName, RegionList)) == NULL) goto escape;
     47  if ((skylist = SelectRegions (selection)) == NULL) goto escape;
    4948
    5049  /* init vectors to save data */
     
    107106    dvo_catalog_free (&catalog);
    108107  }
    109   SkyListFree (skylist, ((RegionName != NULL) || (RegionList != NULL)));
     108
    110109  xvec[0].Nelements = yvec[0].Nelements = Npts;
     110  SkyListFree (skylist);
     111  FreeSkyRegionSelection (selection);
    111112  return (TRUE);
    112113
     
    116117
    117118escape:
    118   SkyListFree (skylist, ((RegionName != NULL) || (RegionList != NULL)));
    119119  dvo_catalog_free (&catalog);
    120   if (RegionName != NULL) free (RegionName);
    121   if (RegionList != NULL) free (RegionList);
     120  SkyListFree (skylist);
     121  FreeSkyRegionSelection (selection);
    122122  return (FALSE);
    123123}
Note: See TracChangeset for help on using the changeset viewer.