talensgj / jwst

Python library for science observations from the James Webb Space Telescope
https://jwst-pipeline.readthedocs.io/en/latest/
Other
1 stars 0 forks source link

Out-of-bounds position generated by the center-of-mass centroids. #6

Closed talensgj closed 2 years ago

talensgj commented 3 years ago

When running the full stage 2 pipeline, the SOSS extraction code crashed due to some of the y-positions found by the CoM centroids being out-of-bounds (>255 in this case). It needs to be investigated if this is a bug or not. If yes it needs fixing, if no the code needs to be made robust against out-of-bounds positions occuring.

radicamc commented 2 years ago

Doesn't seem like this is a bug per se. This only occurs for order 2, right at the edge where it starts to leave the top edge of the detector - I think we expect things to be a bit screwy here. So in addition to the existing centroid masking when they are too close to edges, I have also added a check to mask any centroids which fall outside of the detector limits.