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

implement data quality / bad pixels #4

Closed
zonca opened this issue Apr 3, 2019 · 10 comments
Closed

implement data quality / bad pixels #4

zonca opened this issue Apr 3, 2019 · 10 comments

Comments

@zonca
Copy link
Member

zonca commented Apr 3, 2019

stpipe has a dq_init step that initializes the masks/flags for bad pixels, see https://jwst-pipeline.readthedocs.io/en/latest/jwst/dq_init/description.html

the structure of the fits file is:

image

PIXELDQ is common to all readouts, GROUPDQ instead has the same shape as the science extension.

dq_init connects to the CRDS and gets a static mask based on file metadata and prepares the PIXELDQ extension based on it, then initializes a zero array for the GROUPDQ.

See the implementation at https://github.com/spacetelescope/jwst/tree/master/jwst/dq_init

The definition of all flags used by JWST is at https://jwst-pipeline.readthedocs.io/en/latest/jwst/references_general/references_general.html#data-quality-flags

@zonca
Copy link
Member Author

zonca commented Apr 3, 2019

@arunsurya77 can you prepare an example reference mask I can use for testing? do we have our own definition for flags or we can borrow the one from JWST?

@arunsurya77
Copy link
Contributor

arunsurya77 commented Apr 3, 2019 via email

@arunsurya77
Copy link
Contributor

arunsurya77 commented Apr 3, 2019 via email

@zonca
Copy link
Member Author

zonca commented Apr 4, 2019

thanks @arunsurya77 I need to create a RampModel to test the bad pixel map,
have you done that already for your work on the ROP? in any case it would be very useful if you can create a pull request even with a temporary version of your code, so I don't risk of duplicating your work.

@arunsurya77
Copy link
Contributor

arunsurya77 commented Apr 4, 2019 via email

@zonca
Copy link
Member Author

zonca commented Apr 4, 2019 via email

@arunsurya77
Copy link
Contributor

arunsurya77 commented Apr 4, 2019 via email

@zonca
Copy link
Member Author

zonca commented Apr 9, 2019

thanks @arunsurya77, I added a schema for
a TMT ramp: zonca/jwst@48ec2e4

@zonca
Copy link
Member Author

zonca commented Apr 9, 2019

see the attached file where I changed the metadata so that it opens up as a TMTRampModel:

ramp.zip

@zonca
Copy link
Member Author

zonca commented Apr 19, 2019

ok, I have ported the dq_init code to iris_pipeline, see example usage: https://gist.github.com/zonca/e15620ff5d26652bc201b180ec00cdce

documentation is available in https://iris-pipeline.readthedocs.io/en/latest/algorithms.html#remove-detector-artifacts

@zonca zonca closed this as completed Apr 19, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants