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

Exozodi fix #402

Open
wants to merge 27 commits into
base: master
Choose a base branch
from
Open

Exozodi fix #402

wants to merge 27 commits into from

Conversation

CoreySpohn
Copy link
Collaborator

@CoreySpohn CoreySpohn commented Oct 25, 2024

Describe your changes

Overhaul of the exozodiacal light modeling to correctly calculate the color factor, update for observations, and use proper equations.

  • SU.fEZ attribute removed. Because the EZ calculations are mode specific this is now in TargetList.
  • Created TL.JEZ0 dictionary attribute. Structured similar to star_fluxes, it is keyed by the mode hex values and contains the exozodi intensity values for each star in the observing mode, with $r=1AU$ and $n_\text{zodi}=1$.
  • Created SU.scale_JEZ(sInd, mode) method. This should be invoked after SU.propag_system is called. It gets the JEZ0 value for the mode/star and scales by SU.nEZ/SU.d**2 to turn the star's JEZ0 value into a per-planet value at the current epoch.
  • The JEZ0 calculations use the TL.systemInclination values when scaling by inclination instead of the planet values
    • Note, this could be handled the same as the nEZ and 1/r^2 terms, not sure why this was per-planet instead of a per-disk value though
  • Followed TODO of moving the ZL attribute "commonSystemfEZ" into SimulatedUniverse (since it has to be set there).
    • Set commonSystemnEZ as an input for SU (defaults to True)
    • Created an SU.nEZ array attribute which holds the number of exozodi for each planet in the simulation
    • Defined nEZ as a planet attribute (instead of fEZ) for loading/dumping
    • SU.nEZ is defined in SU.gen_physical_properties() using the existing ZL.gen_systemnEZ(nStars) method
  • Removed fEZ as an output from dump_system_params as the current treatment of it is mode-dependent.
  • Updated OpticalSystem methods, notably Cp_Cb_Csp_helper to use JEZ values for the exozodi count rate
  • Updated the exozodi calculation documentation in the Fundamental Concepts page
  • In SS.observation_detection the self.calc_signal_noise is given the JEZ values for each epoch
  • SS.observation_detection and observation_characterization now return JEZ, previously the fEZ was included in the systemParamss dict created by SU.dump_system_param.
    • Note: JEZ being mode dependent means that it shouldn't be treated as a "system parameter" in the same way that dMag, WA, distance, etc are.
  • Modified the SS.last_detected array calls in the prototype to correctly include JEZ.
  • Adjusted the DRM to save det_JEZ instead of det_fEZ.
  • Added directory .venv to gitignore
  • Updated all SurveySim modules fEZ to use JEZ
  • Updated test modules to use JEZ
  • Updated Completeness calculations to use JEZ
  • Probably some minor formatting changes due to ruff

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

All of the above

Reference any relevant issues (don't forget the #)

#374 and might also address #183 although it isn't directly an input

Checklist before requesting a review

  • I have verified that all unit tests pass in a clean virtual environment and added new unit tests, as needed
  • I have run e2eTests and added new test scripts, as needed
  • I have verified that all docstrings are properly formatted and added new documentation, as needed

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

Successfully merging this pull request may close these issues.

2 participants