IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Mar 30, 2012, 2:32:30 PM (14 years ago)
Author:
eugene
Message:

use robust stats for the mean & stdev; apply w-r vs r-i color correction from JT

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/eam_branches/ipp-20111122/psastro/src/psastroLoadRefstars.c

    r33604 r33633  
    185185        // apply a color correction
    186186        // XXX this is very GPC1 specific and hard-wired -- be very afraid!
    187         if (!strcmp(photcode, "w")) {
     187        // select the filter; default to fixed photcode and mag limit otherwise
     188        pmFPAfile *input = psMetadataLookupPtr (NULL, config->files, source); // we've already done this before
     189        char *filter = psMetadataLookupStr (&status, input->fpa->concepts, "FPA.FILTERID");
     190        if (!strcmp(filter, "w")) {
    188191            for (int i = 0; i < refstars->n; i++) {
    189192                pmAstromObj *ref = refstars->data[i];
     
    191194                float ri = ref->Color;
    192195                // saturate at some valid range limits
    193                 ri = PS_MAX (PS_MIN(r, 2.0), -0.2);
     196                ri = PS_MAX (PS_MIN(ri, 2.0), -0.2);
    194197                float w = NAN;
    195198                if (ri < 0.5) {
Note: See TracChangeset for help on using the changeset viewer.