kevin218 / Eureka

Eureka! is a data reduction and analysis pipeline intended for time-series observations with JWST.
https://eurekadocs.readthedocs.io/
MIT License
56 stars 44 forks source link

[Enhancement]: Add default parameters in Meta class rather than throughout the code #594

Open taylorbell57 opened 7 months ago

taylorbell57 commented 7 months ago

Instrument

Other (any stage)

What is your suggestion?

At present, all original ECF parameters need to be specified in the files, and any recently added parameters have hardcoded defaults scattered throughout the code to maintain backwards compatibility. This is becoming increasingly painful to maintain since the defaults aren't anywhere in particular, but rather just before the parameters are first used. The clean way of doing this is having a Meta class that's unique to each stage and has all of the default ECF parameters specified; this makes it easy for folks to understand what the defaults are if they don't set a parameter, and makes maintenance much easier. This will also allow us to set defaults for many/all parameters so that users can have more sparse ECF files by removing the parameters they never intend to change from their defaults (there's definitely some of these). This will require some instrument-specific switching since the defaults for some parameters do change with instrument.

Related to this though, I think it'd be best to output all of the utilized defaults to the ECF file that gets copied to the output directory. That way the end user has all of the exact settings they used which will make it easier for folks to ensure reproducibility if they switch between different versions of Eureka! that might have different defaults.

Error traceback output

No response

What operating system are you using?

No response

What version of Python are you running?

No response

What Python packages do you have installed?

No response

Code of Conduct