IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 39273 for trunk


Ignore:
Timestamp:
Dec 15, 2015, 10:36:22 AM (11 years ago)
Author:
eugene
Message:

for smf files, the region used by LoadData and LoadStars needs to cover all stars loaded from the smf, not just one chip

Location:
trunk/Ohana/src/addstar/src
Files:
4 edited

Legend:

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

    r39161 r39273  
    1919  MTIME = (image[0].exptime > 0) ? 2.500*log10(image[0].exptime) : 0.0;
    2020
    21   RMIN = 360.0;
    22   RMAX =   0.0;
    23   DMIN = +90.0;
    24   DMAX = -90.0;
     21  RMIN = region->Rmin;
     22  RMAX = region->Rmax;
     23  DMIN = region->Dmin;
     24  DMAX = region->Dmax;
    2525
    2626  /* modify resulting star list */
     
    182182  if (VERBOSE) fprintf (stderr, "stars cover region %f,%f - %f,%f\n", RMIN, DMIN, RMAX, DMAX);
    183183
    184   float dR = RMAX - RMIN;
    185   float dD = DMAX - DMIN;
    186 
    187184  // define containing region a bit generously
    188   region->Rmin = RMIN - 0.1*dR;
    189   region->Rmax = RMAX + 0.1*dR;
    190   region->Dmin = DMIN - 0.1*dD;
    191   region->Dmax = DMAX + 0.1*dD;
     185  region->Rmin = RMIN;
     186  region->Rmax = RMAX;
     187  region->Dmin = DMIN;
     188  region->Dmax = DMAX;
    192189
    193190  return (outcat);
  • trunk/Ohana/src/addstar/src/LoadData.c

    r39161 r39273  
    110110    matchOptions.photcode = 0; // use an invalid photcode to avoid touching secfilt
    111111
    112     find_matches_closest (region, newcat, catalog, matchOptions);
     112    SkyRegion matchRegion;
     113    float dR = region->Rmax - region->Rmin;
     114    float dD = region->Dmax - region->Dmin;
     115
     116    // define matchRegion a bit generously
     117    matchRegion.Rmin = region->Rmin - 0.1*dR;
     118    matchRegion.Rmax = region->Rmax + 0.1*dR;
     119    matchRegion.Dmin = region->Dmin - 0.1*dD;
     120    matchRegion.Dmax = region->Dmax + 0.1*dD;
     121
     122    find_matches_closest (&matchRegion, newcat, catalog, matchOptions);
    113123    dvo_catalog_free (newcat);
    114124    free (newcat);
  • trunk/Ohana/src/addstar/src/LoadStars.c

    r39161 r39273  
    1717  ALLOCATE (catalog->measure, Measure, 1);
    1818  ALLOCATE (catalog->lensing, Lensing, 1);
     19
     20  SkyRegion region;
     21  region.Rmin =  720.0;
     22  region.Rmax = -720.0;
     23  region.Dmin =  180.0;
     24  region.Dmax = -180.0;
    1925
    2026  for (i = 0; i < Nfile; i++) {
     
    7581    }
    7682
    77     SkyRegion region;
    7883    newcat = LoadData (f, &file[i], images, Nimages, headers, extsize, headerSets, NheaderSets, &region, options);
    7984
     
    8994      matchOptions.photcode = 0; // use an invalid photcode to avoid touching secfilt
    9095     
    91       find_matches_closest (&region, newcat, catalog, matchOptions);
     96      SkyRegion matchRegion;
     97      float dR = region.Rmax - region.Rmin;
     98      float dD = region.Dmax - region.Dmin;
     99
     100      // define matchRegion a bit generously
     101      matchRegion.Rmin = region.Rmin - 0.1*dR;
     102      matchRegion.Rmax = region.Rmax + 0.1*dR;
     103      matchRegion.Dmin = region.Dmin - 0.1*dD;
     104      matchRegion.Dmax = region.Dmax + 0.1*dD;
     105
     106      find_matches_closest (&matchRegion, newcat, catalog, matchOptions);
    92107    }
    93108
  • trunk/Ohana/src/addstar/src/addstar.c

    r38986 r39273  
    234234  FreePhotcodeTable ();
    235235  SkyTableFree (sky);
    236   ohana_memcheck (1);
    237   ohana_memdump (1);
    238236  exit (0);
    239237}
Note: See TracChangeset for help on using the changeset viewer.