Closed JarronL closed 2 years ago
Thank you for the report. This is definitely not desirable behavior and will be looked into.
For completeness, what platform is this on and version of the JWST package is in use? The version can be retrieved using the following command:
python -c "import jwst; print(jwst.__version__)"
Yeah, there's no copy made at any point of the input data before the input data is modified in stcal.jump.jump.detect_jumps
. Just lots of shallow pointers. Hi @stscieisenhamer ! 👋
@jdavies-st 👋 will be expecting PR shortly. 😄
@JarronL In the meantime, the workaround is to make a copy of the datamodel before passing in to the step. Datamodels have a copy
method so you can do:
jump = jump_step.run(dark.copy())
Thanks. I am currently on 1.6.3.dev5+g565f37e4
When running the jump detection step, the data in the input object is multiplied by the gain at some point during the algorithm. However, the input data is never returned to its original value. This is problematic, because a user may want to test multiple jump detection parameters (e.g., rejection thresholds) using the same input.
For instance:
For a particular use case of a 320x320 subarray, I was only flagging about 300 pixels.
However, the array
dark.data
has now been multiplied by the detector gain. So, if I try to run again with a high rejection threshold:the algorithm flags almost 10 times as many jumps.
Please ensure that original input data does not get modified.