#1220 closed defect (fixed)
Assert violated in psphot
| Reported by: | welling | Owned by: | eugene |
|---|---|---|---|
| Priority: | normal | Milestone: | |
| Component: | psphot | Version: | current |
| Severity: | normal | Keywords: | |
| Cc: | welling@…, Paul Price |
Description
This is for psphot for the SVN revision of Friday April 10 2009. An assertion is violated in psMinimizeLMM.c:.c:293: psMinLM_SetABX for some input files when processing chip images. The input command was:
psphot -threads 4 -file /n/data1/panstarrs/GPC1/MD01_20081002_1/36475/chip/o4741g0234o.36475.ch.11948.XY61.ch.fits -mask /n/data1/panstarrs/GPC1/MD01_20081002_1/36475/chip/o4741g0234o.36475.ch.11948.XY61.ch.mk.fits -variance /n/data1/panstarrs/GPC1/MD01_20081002_1/36475/chip/o4741g0234o.36475.ch.11948.XY61.ch.wt.fits /n/data1/panstarrs/GPC1/MD01_20081002_1/workspace/jsw_pswarp/MD01_20081002_1/36475/chip/o4741g0234o.36475.ch.11948.XY61
...standard logging output follows...
psphot: psMinimizeLMM.c:293: psMinLM_SetABX: Assertion `!(sizeof (dy->data.F32[i]) == sizeof (float) ? isnanf (dy->data.F32[i]) : sizeof (dy->data.F32[i]) == sizeof (double) ? isnan (dy->data.F32[i]) : isnanl (dy->data.F32[i]))' failed.
Abort
I'll provide a tar file with the inputs momentarily.
Change History (5)
comment:1 by , 17 years ago
comment:2 by , 17 years ago
| Status: | new → accepted |
|---|
this condition is supposed to be avoided by the mask: masked pixels are not supposed to be passed to the fitting routine, and NaN pixels are supposed to be masked.
hitting this assert implies that NaN pixels are leaking through.
can you check for NaN values in the image that are not masked?
comment:3 by , 17 years ago
| Cc: | added |
|---|
comment:4 by , 17 years ago
| Resolution: | → fixed |
|---|---|
| Status: | accepted → closed |
Sometimes pixels can be NAN and unmasked because of quantisation when writing: if the pixel is out of range of the choice of BSCALE and BZERO, then it is written as a NAN; this is not reflected in the mask (because the image and mask are written independently, and possibly in an order that does not allow the mask to be updated).
Added a call to pmReadoutMaskNonfinite() in psphotImageLoop() to mask NAN pixels.

The input files that demonstrate this bug are in alala2:~welling/ticket_1220.tar.gz .