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

    r13479 r14401  
    2727  int Nsecfilt, status;
    2828  void *oldsignal;
    29   char *RegionName, *RegionList;
    3029  char name[64], line[1024], key[20];
    3130  float *fitmags, *fiterrs, *wavecode, *vegaToAB;
     
    4342  Catalog catalog, outcat;
    4443  SkyList *skylist;
     44  SkyRegionSelection *selection;
     45
    4546  SEDtableRow *SEDtableRaw, **SEDtable;
    4647  SEDtableRow sourceValue, sourceError;
     
    4950  /* defaults */
    5051  skylist  = NULL;
     52  selection = NULL;
     53
    5154  catalog.average = NULL;
    5255  catalog.measure = NULL;
     
    6366  wavecode = NULL;
    6467  hashcode = NULL;
    65   RegionName = NULL;
    66   RegionList = NULL;
    6768  magSection.name = NULL;
    6869  resSection.name = NULL;
     
    8182
    8283  /* interpret command-line options */
    83   if (!SetRegionSelection (&argc, argv, &RegionName, &RegionList)) goto escape;
     84  if ((selection = SetRegionSelection (&argc, argv)) == NULL) goto escape;
    8485  if (!SetPhotSelections (&argc, argv, 4)) goto usage;
    8586
     
    179180
    180181  /* load region corresponding to selection above */
    181   if ((skylist = SelectRegions (RegionName, RegionList)) == NULL) goto escape;
     182  if ((skylist = SelectRegions (selection)) == NULL) goto escape;
    182183
    183184  /* loop over regions, extract data for each region */
     
    361362
    362363finish:
    363   if (skylist != NULL) SkyListFree (skylist, ((RegionName != NULL) || (RegionList != NULL)));
    364   if (RegionName != NULL) free (RegionName);
    365   if (RegionList != NULL) free (RegionList);
     364  SkyListFree (skylist);
     365  FreeSkyRegionSelection (selection);
    366366  if (wavecode != NULL) free (wavecode);
    367367  if (hashcode != NULL) free (hashcode);
Note: See TracChangeset for help on using the changeset viewer.