IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Jun 24, 2015, 9:21:59 AM (11 years ago)
Author:
eugene
Message:

converting to find_matches

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/eam_branches/ipp-20150616/Ohana/src/addstar/src/LoadData.c

    r38525 r38533  
    1010
    1111  Catalog *catalog = NULL;
    12   // ALLOCATE (catalog, Catalog, 1);
    13   // dvo_catalog_init (catalog, TRUE);
     12  ALLOCATE (catalog, Catalog, 1);
     13  dvo_catalog_init (catalog, TRUE);
     14  ALLOCATE (catalog->average, Average, 1);
     15  ALLOCATE (catalog->secfilt, SecFilt, 1);
     16  ALLOCATE (catalog->measure, Measure, 1);
     17  ALLOCATE (catalog->lensing, Lensing, 1);
    1418
    1519  if (images[0] == NULL) {
     
    103107    // replace full input catalog newcat with subset version
    104108    newcat = FilterStars (newcat, &images[0][Nvalid], Nvalid, options);
    105     catalog = newcat;
    106109
    107     // XXX I need to use find_matches_closest here, but for testing:
    108     // find_matches_closest (region, catalog, newcat, options);
    109     // dvo_catalog_free (newcat);
    110     // free (newcat);
     110    double Rref, Dref;
     111    XY_to_RD (&Rref, &Dref, 0.0, 0.0, &images[0][Nvalid].coords);
     112    SkyRegion region;
     113    region.Rmin = Rref - 180.0;
     114    region.Rmax = Rref + 180.0;
     115    region.Dmin = Dref -  90.0;
     116    region.Dmax = Dref +  90.0;
     117   
     118    AddstarClientOptions matchOptions = *options;
     119    matchOptions.radius = 0.1; // tight radius at this stage
     120    matchOptions.calibrate = FALSE;
     121    matchOptions.only_match = FALSE;
     122    matchOptions.nosort = FALSE;
     123
     124    find_matches_closest (&region, newcat, catalog, matchOptions);
     125    dvo_catalog_free (newcat);
     126    free (newcat);
    111127
    112128    Nvalid++;
Note: See TracChangeset for help on using the changeset viewer.