Eureka
Eureka copied to clipboard
Edits to NIRISS Files
Remaining edits to NIRISS files that are still needed since PR #286.
- In the NIRISS read function, can you put an if/else statement that'll work once we have real data instead of hardcoding intstart and intend
- Add documentation for all of the niriss_cython functions
- Relatedly, make sure that all your functions' inputs and outputs are documented. If you don't do it now, it'll be much harder to remember what to put later. There are many functions with missing or outdated Parameters and Returns docstrings.
- In niriss_extraction.py, only catch the type of exception you expect. Just using
except
will catch other things like memory overflow that you don't want to be catching. - In niriss_extraction.py, is the "CHANGE BACK TO 4" comment still relevant
- simultaneous_order_fitting.py, tracing_niriss.py, and niriss_class.py all seem too Stage 3 and NIRISS specific, and should be moved to the Stage 3 folder.
- In simultaneous_order_fitting.py, why do you do
nonlocal profile
instead of just passing in profile as an argument? - In tracing_niriss.py, explain using code comments the meaning of the lines
g[g > 4] = 10000
andedges[edges > 0] = 10
and the hardcoded cutoffs in the lines calling theclean_and_fit
function - Too much of niriss_class.py has now been written in other files and is now duplicated. Instead of duplicating the code, you should be calling the already written functions (e.g reading in images should only be done with
niriss.read()
).
Originally posted by @taylorbell57 in https://github.com/kevin218/Eureka/pull/286#pullrequestreview-1006724613
Additionally, we will need to try to integrate the Stage 3 code for NIRISS with that of the other instruments
The line
data['flux'] /= scalar * response
in bright2dn() in bright2flux.py breaks for NIRISS as response
has shape (3,2048) while data.flux
has shape (3,256,2048). Also (potentially relatedly), we have hardcoded above that phot['order'] == 1
which is likely not what we'll want to do
Closing this issue to tidy up the to-do list as there's been no progress in 2 years - happy to re-open the issue anytime though