IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Jan 28, 2011, 3:13:28 PM (15 years ago)
Author:
watersc1
Message:

finished with logflux code, but haven't run any tests to confirm that the new stacking recipes work as designed.

Location:
branches/czw_branch/20101203/psLib/src/fits
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • branches/czw_branch/20101203/psLib/src/fits/psFits.h

    r30119 r30419  
    5050    PS_FITS_SCALE_STDEV_NEGATIVE,       ///< Auto-scale to sample stdev, place mean at upper limit
    5151    PS_FITS_SCALE_STDEV_BOTH,           ///< Auto-scale to sample stdev, place mean at middle
     52    PS_FITS_SCALE_MANUAL,                ///< Manual scaling (use specified BSCALE and BZERO)
    5253    PS_FITS_SCALE_LOG_RANGE,            ///< Take logarithm, Auto-scale to preserve dynamic range
    5354    PS_FITS_SCALE_LOG_STDEV_POSITIVE,   ///< Take logarithm, Auto-scale to sample stdev, place mean at lower limit
    5455    PS_FITS_SCALE_LOG_STDEV_NEGATIVE,   ///< Take logarithm, Auto-scale to sample stdev, place mean at upper limit
    5556    PS_FITS_SCALE_LOG_STDEV_BOTH,       ///< Take logarithm, Auto-scale to sample stdev, place mean at middle
    56 
    57     PS_FITS_SCALE_MANUAL                ///< Manual scaling (use specified BSCALE and BZERO)
     57    PS_FITS_SCALE_LOG_MANUAL            ///< Manual scaling (use specified BSCALE, BZERO, and BOFFSET)
    5858} psFitsScaling;
    5959
     
    7171    bool fuzz;                          ///< Fuzz the values when quantising floating-point values?
    7272    double bscale, bzero;               ///< Manually specified BSCALE and BZERO (for SCALE_MANUAL)
     73    double boffset;                     ///< Manually specified BOFFSET (for SCALE_MANUAL)
    7374    double mean, stdev;                 ///< Mean and standard deviation of image
    7475    int stdevBits;                      ///< Number of bits to sample a standard deviation (for SCALE_STDEV_*)
  • branches/czw_branch/20101203/psLib/src/fits/psFitsImage.c

    r30331 r30419  
    692692    // Remove any BOFFSET values that exist in the header if we are not using that scaling anymore
    693693    if (options&&(!((options->scaling == PS_FITS_SCALE_LOG_RANGE)||
     694                    (options->scaling == PS_FITS_SCALE_LOG_MANUAL)||
    694695                   (options->scaling == PS_FITS_SCALE_LOG_STDEV_POSITIVE)||
    695696                   (options->scaling == PS_FITS_SCALE_LOG_STDEV_NEGATIVE)||
     
    718719                           "Scaling: TRUE = BZERO + BSCALE * DISK", &status);
    719720        if (options&&(((options->scaling == PS_FITS_SCALE_LOG_RANGE)||
     721                       (options->scaling == PS_FITS_SCALE_LOG_MANUAL)||
    720722                       (options->scaling == PS_FITS_SCALE_LOG_STDEV_POSITIVE)||
    721723                       (options->scaling == PS_FITS_SCALE_LOG_STDEV_NEGATIVE)||
  • branches/czw_branch/20101203/psLib/src/fits/psFitsScale.c

    r30331 r30419  
    539539        *bzero = options->bzero;
    540540        break;
     541      case PS_FITS_SCALE_LOG_MANUAL:
     542        *bscale = options->bscale;
     543        *bzero = options->bzero;
     544        *boffset = options->boffset;
     545        break;
    541546      default:
    542547        psError(PS_ERR_BAD_PARAMETER_VALUE, true, "Unrecognised FITS scaling method: %x",
     
    616621              ps##INTYPE value; \
    617622              if ((options->scaling == PS_FITS_SCALE_LOG_RANGE)||       \
     623                (options->scaling == PS_FITS_SCALE_LOG_MANUAL)||        \
    618624                  (options->scaling == PS_FITS_SCALE_LOG_STDEV_POSITIVE)|| \
    619625                  (options->scaling == PS_FITS_SCALE_LOG_STDEV_NEGATIVE)|| \
     
    756762    if (strcasecmp(string, "STDEV_BOTH") == 0)     return PS_FITS_SCALE_STDEV_BOTH;
    757763    if (strcasecmp(string, "LOG_RANGE") == 0)      return PS_FITS_SCALE_LOG_RANGE;
     764    if (strcasecmp(string, "LOG_MANUAL") == 0)      return PS_FITS_SCALE_LOG_MANUAL;
    758765    if (strcasecmp(string, "LOG_STDEV_POSITIVE") == 0) return PS_FITS_SCALE_LOG_STDEV_POSITIVE;
    759766    if (strcasecmp(string, "LOG_STDEV_NEGATIVE") == 0) return PS_FITS_SCALE_LOG_STDEV_NEGATIVE;
Note: See TracChangeset for help on using the changeset viewer.