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

    r13479 r14401  
    99  double x, y, ra, dec, t, trange;
    1010  time_t tzero, TimeReference;
     11  SkyRegionSelection *selection;
    1112
    1213  PhotCode *code;
    13   Graphdata graphsky;
    1414  Image *image;
    1515  Vector *vec;
    1616
    17   if (!GetGraphData (&graphsky, NULL, NULL)) return (FALSE);
    1817  if (!InitPhotcodes ()) return (FALSE);
     18
     19  // parse skyregion options
     20  if ((selection = SetRegionSelection (&argc, argv)) == NULL) {
     21    gprint (GP_ERR, "invalid sky region selection\n");
     22    return FALSE;
     23  }
    1924
    2025  /* check for time-based selection */
     
    3338    remove_argument (N, &argc, argv);
    3439    TimeSelect = TRUE;
    35   }
    36 
    37   /* check for region-based selection */
    38   RegionSelect = FALSE;
    39   if ((N = get_argument (argc, argv, "-region"))) {
    40     remove_argument (N, &argc, argv);
    41     RegionSelect = TRUE;
    4240  }
    4341
     
    104102
    105103  if ((image = LoadImages (&Nimage)) == NULL) return (FALSE);
    106   image_subset (image, Nimage, &subset, &Nsubset, &graphsky, RegionSelect, tzero, trange, TimeSelect);
     104  image_subset (image, Nimage, &subset, &Nsubset, selection, tzero, trange, TimeSelect);
    107105  if ((mode == RA) || (mode == DEC)) BuildChipMatch (image, Nimage);
    108106
Note: See TracChangeset for help on using the changeset viewer.