IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 34459


Ignore:
Timestamp:
Sep 21, 2012, 2:51:53 PM (14 years ago)
Author:
bills
Message:

-minmag was not actually being applied. Fix that. Also use the magnitude
limits to cut the stars going into the limits when -maxdensity is
used.

Location:
trunk/Ohana/src/getstar/src
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Ohana/src/getstar/src/args.c

    r20985 r34459  
    4040
    4141  MagLimitUse = FALSE;
     42  MagLimitValue = 100;
    4243  if ((N = get_argument (argc, argv, "-maglim"))) {
    4344    MagLimitUse = TRUE;
     
    6061
    6162  MinMagUse = FALSE;
     63  MinMagValue = -100;
    6264  if ((N = get_argument (argc, argv, "-minmag"))) {
    6365    MinMagUse = TRUE;
  • trunk/Ohana/src/getstar/src/select_by_region.c

    r34088 r34459  
    8282      }
    8383      if (isnan(mag)) continue;
     84      if (mag < MinMagValue) continue;
     85      if (mag > MagLimitValue) continue;
    8486
    8587      bin = (mag - MagMin) / dMag;
     
    118120    if (D > region[0].Dmax) continue;
    119121
    120     if (MagLimitUse) {
     122    // If either magnitude limit was specfied it a apply both.
     123    // If one of the limits is not used it is initialized to an unphysical value so test will succeed
     124    if (MagLimitUse || MinMagUse) {
    121125      mag = NAN;
    122126      if (needMeas) {
     
    132136      }
    133137      if (isnan(mag) || (mag > MagLimitValue)) continue;
     138      if (isnan(mag) || (mag < MinMagValue)) continue;
    134139    }
    135140
Note: See TracChangeset for help on using the changeset viewer.