Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

subarray bounding boxes are 1 pixel too small #5542

Closed
stscijgbot-jp opened this issue Dec 16, 2020 · 1 comment · Fixed by #5543
Closed

subarray bounding boxes are 1 pixel too small #5542

stscijgbot-jp opened this issue Dec 16, 2020 · 1 comment · Fixed by #5543

Comments

@stscijgbot-jp
Copy link
Collaborator

Issue JP-1818 was created on JIRA by James Davies:

Testing of

#5507

found a bug in jwst.assign_wcs where NIRCam time-series subarrays of 64x64 were getting bounding boxes of size

In [9]: result
Out[9]: <CubeModel(4, 64, 64) from jw00312006001_02102_00001-seg001_nrcb1_rateints.fits>

In [11]: result.meta.subarray.instance
Out[11]: 
{'fastaxis': 1,
 'name': 'SUB64P',
 'slowaxis': -2,
 'xsize': 64,
 'xstart': 1985,
 'ysize': 64,
 'ystart': 1985}

In [12]: result.meta.wcs.bounding_box
Out[12]: ((-0.5, 62.5), (-0.5, 62.5))

It looks like this is a general problem for all subarray bounding boxes.

@jdavies-st
Copy link
Collaborator

For non-subarrays, such as full-frame NIRCam images, we have the following bounding boxes:

In [56]: model = datamodels.open("jw42424001001_01101_00001_nrca5_cal.fits")

In [57]: model.meta.wcs.bounding_box
Out[57]: ((-0.5, 2047.5), (-0.5, 2047.5))

In [58]: model.data.shape
Out[58]: (2048, 2048)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants