Skip to content

Resample_spec with ivm weighting gives 0 error/variance #10537

@stscijirahub

Description

@stscijirahub

Issue JP-4352 was created on JIRA by Christian Hayes:

Helpdesk ticket INC0221485 raised an issue they found with processing NIRSpec MOS data with the resample_spec "ivm" weighting, where this option was leading to all 0 error arrays in their x1d (and s2d) products.

I'm able to recreate this issue in some MOS datasets but not others (see the examples below).  One common factor between the datasets that ivm leads to zeroed error arrays, is that both are processed as point sources, where the calibration of the cal files is in units of Jy and the values of the Sci/err are on the order of 1e-13 and the variance arrays are on the order of 1e-26.  The dataset with uniform sources and MJy/Sr calibration that gives values closer to order of unity, has non-zero s2d error/variance arrays.

Checking how far back this issue goes it looks like it first appeared in jwst 1.18.0, where there were a number of changes like migrating to numpy 2.0 and moving some of the resampling code over to stcal, and I'm wondering if the behavior handling the extremely small values for the variances (and therefore ivm weights) might have changed.

Example datasets:

  • PID 7390 obs 1 (e.g., source_id = 1 a point source):
    ** jw07390001001_01_msa.fits

** jw07390001001_04101_00001_nrs1_rate.fits

  • PID 1611 obs 7 (primarily point sources):
    ** jw01611007001_01_msa.fits

** jw01611007001_05101_00002_nrs1_rate.fits

  • PID 1810 obs 1 (extended sources):
    ** jw01810001001_01_msa.fits

** jw01810001001_03101_00001_nrs1_rate.fits

For testing purposes, this processing produces s2d files with zeroed errors/variances:

strun calwebb_spec2 jw07390001001_04101_00001_nrs1_rate.fits --steps.extract_2d.source_ids=1 --steps.resample_spec.weight_type=ivm ```

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions