IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 40809


Ignore:
Timestamp:
Jun 20, 2019, 4:14:36 PM (7 years ago)
Author:
eugene
Message:

do not let crazy model axis values trigger an assert -- set extreme aspect-ratio objects to NAN

Location:
trunk/psphot/src
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/psphot/src/psphotFullForceSummary.c

    r36731 r40809  
    301301        // there is now only a single chip (multiple readouts?). loop over it and process
    302302        while ((cell = pmFPAviewNextCell (view, input->fpa, 1)) != NULL) {
    303  //          psLogMsg ("psphotFullForceSummary", 5, "Cell %d: %x %x\n", view->cell, cell->file_exists, cell->process);
     303          // psLogMsg ("psphotFullForceSummary", 5, "Cell %d: %x %x\n", view->cell, cell->file_exists, cell->process);
    304304
    305305            // process each of the readouts
    306306            while ((readout = pmFPAviewNextReadout (view, input->fpa, 1)) != NULL) {
    307 //                psLogMsg ("psphotFullForceSummary", 6, "Cell %d: %x %x\n", view->cell, cell->file_exists, cell->process);
     307              // psLogMsg ("psphotFullForceSummary", 6, "Cell %d: %x %x\n", view->cell, cell->file_exists, cell->process);
    308308                if (! readout->data_exists) { continue; }
    309309
  • trunk/psphot/src/psphotFullForceSummaryReadout.c

    r40048 r40809  
    11#include "psphotInternal.h"
    2 
    32
    43typedef struct {
     
    637636                // now save the model parameters in the model structure
    638637
    639                 pmPSF_AxesToModel (model->params->data.F32, axes, model->class->useReff);
     638                // a crazy model can raise an assert in psEllise
     639                if ((fabs(axes.major) > 10000 * fabs(axes.minor)) || (fabs(axes.minor) > 10000 * fabs(axes.major))) {
     640                  model->params->data.F32[PM_PAR_SXX] = NAN;
     641                  model->params->data.F32[PM_PAR_SYY] = NAN;
     642                  model->params->data.F32[PM_PAR_SXY] = NAN;
     643                } else {
     644                  pmPSF_AxesToModel (model->params->data.F32, axes, model->class->useReff);
     645                }
    640646
    641647                model->mag = -2.5 * log10(flux0);
Note: See TracChangeset for help on using the changeset viewer.