IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 17197


Ignore:
Timestamp:
Mar 28, 2008, 3:29:15 PM (18 years ago)
Author:
eugene
Message:

sort stars, search only in valid ra range

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Ohana/src/addstar/src/load2mass_as_rawdata.c

    r16904 r17197  
    9595    if (VERBOSE) fprintf (stderr, "scan %d stars (%10.6f - %10.6f, %10.6f - %10.6f) .. ", Ntstars, Rmin, Rmax, Dmin, Dmax);
    9696
     97    // sort the tstars by RA
     98    get2mass_sortStars (tstars, Ntstars);
    9799
    98100    // scan through the stars, loading the containing catalogs
     
    101103      if (tstars[i].flag) continue;
    102104
     105      // scan forward until we read the UserPatch
     106      if (tstars[i].R < UserPatch.Rmin) continue;
     107      if (tstars[i].R > UserPatch.Rmax) break;
     108      if (tstars[i].D < UserPatch.Dmin) continue;
     109      if (tstars[i].D > UserPatch.Dmax) continue;
     110
    103111      // collect stars in a new output catalog
    104112      Nstars = 0;
    105113      NSTARS = 3000;
    106114      ALLOCATE (stars, Stars, NSTARS);
    107        
     115
    108116      // identify the relevant catalog
    109117      skylist = SkyRegionByPoint (skytable, -1, tstars[i].R, tstars[i].D);
     
    116124        // check if in skyregion
    117125        if (tstars[j].R < region[0].Rmin) continue;
    118         if (tstars[j].R > region[0].Rmax) continue;
     126        if (tstars[j].R > region[0].Rmax) break;
    119127        if (tstars[j].D < region[0].Dmin) continue;
    120128        if (tstars[j].D > region[0].Dmax) continue;
     
    122130        // check if in UserPatch
    123131        if (tstars[j].R < UserPatch.Rmin) continue;
    124         if (tstars[j].R > UserPatch.Rmax) continue;
     132        if (tstars[j].R > UserPatch.Rmax) break;
    125133        if (tstars[j].D < UserPatch.Dmin) continue;
    126134        if (tstars[j].D > UserPatch.Dmax) continue;
Note: See TracChangeset for help on using the changeset viewer.