Eureka icon indicating copy to clipboard operation
Eureka copied to clipboard

Edits to NIRISS Files

Open taylorbell57 opened this issue 2 years ago • 2 comments

Remaining edits to NIRISS files that are still needed since PR #286.

  1. 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
  2. Add documentation for all of the niriss_cython functions
  3. 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.
  4. 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.
  5. In niriss_extraction.py, is the "CHANGE BACK TO 4" comment still relevant
  6. 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.
  7. In simultaneous_order_fitting.py, why do you do nonlocal profile instead of just passing in profile as an argument?
  8. In tracing_niriss.py, explain using code comments the meaning of the lines g[g > 4] = 10000 and edges[edges > 0] = 10 and the hardcoded cutoffs in the lines calling the clean_and_fit function
  9. 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

taylorbell57 avatar Jun 15 '22 22:06 taylorbell57

Additionally, we will need to try to integrate the Stage 3 code for NIRISS with that of the other instruments

taylorbell57 avatar Jun 15 '22 22:06 taylorbell57

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

taylorbell57 avatar Jun 20 '22 18:06 taylorbell57

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

taylorbell57 avatar Jun 20 '24 23:06 taylorbell57