IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Jul 5, 2024, 12:30:50 PM (2 years ago)
Author:
eugene
Message:

add option in psphot to fit the PSF star positions as well as shapes (default is false); add option to use robustMedian vs clippedMean for moments-based source sizes and PSF star selection; saturate variance to max value if signal is non NAN

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/eam_branches/ipp-20230313/psphot/src/psphotMaskReadout.c

    r34293 r42711  
    5858            return false;
    5959        }
     60    }
     61
     62    // XXX test to repair variance
     63    if (true) {
     64      psImage *im = readout->image;
     65      psImage *wt = readout->variance;
     66      float maxVar = 0;
     67      // find the max value
     68      for (int j = 0; j < im->numRows; j++) {
     69        for (int i = 0; i < im->numCols; i++) {
     70            if (!isfinite(wt->data.F32[j][i])) continue;
     71            maxVar = PS_MAX (wt->data.F32[j][i], maxVar);
     72        }
     73      }
     74      // set pixels with nan variance and non-nan image to maxVar
     75      for (int j = 0; j < im->numRows; j++) {
     76        for (int i = 0; i < im->numCols; i++) {
     77            if (!isfinite(im->data.F32[j][i])) continue;
     78            if (isfinite(wt->data.F32[j][i])) continue;
     79            wt->data.F32[j][i] = maxVar;
     80        }
     81      }
    6082    }
    6183
Note: See TracChangeset for help on using the changeset viewer.