Only update opacities when needed#12
Open
psheehan wants to merge 33 commits into
Open
Conversation
- Adding a new `IsotropicDust`, `HenyeyGreensteinDust`, and `GeneralDust` classes to handle different types of dust scattering. - Move functionality to update opactities for photons/the grid to the *Dust clases so they can each provide the relevant info. - Pass the camera orientation through the raytracing process to calculate the relevant scattering angles.
…ksca directly as the training data, rather than interpolating to create samples. Also gets more than two constituent species (i.e. greater than 1 abundances array) working.
…including none of them.
…data is treated and learned from.
… of input dust properties, add a helper function to suggest sampling, and add tests.
…d. Also tidy up a few items here and there.
…arious combinations of possible inputs.
…acities that are formatted in the new style of providing opacities.
… a better idea of how the model reproduces unseen values.
… tests), and also make test plots go to a non-gui backend for tests.
…t to prevent excessive run times. random_nu samples are prepared in batches to prevent overflowing memory. Get random_nu_ml working again. Update diana_wice dust to the new format, along with the accompanying notebook.
…sources module, causing tests to fail.
…ties because they are needed for sources. Also only add source intensity if sources are included. For mom0 test do not include sources, and also update test values now that NaNs are fixed.
… arctanh scaling.
…ause it is never used.
…om going to infinity
…ds another place where we need to make sure arctanh(ksi) does not go infinite.
…can be combined with samples tuple.
…perties change; also don't update opacities after frequency change AND after cell properties change - only do once.
|
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #12 +/- ##
==========================================
- Coverage 88.82% 88.34% -0.48%
==========================================
Files 11 11
Lines 2220 2635 +415
==========================================
+ Hits 1972 2328 +356
- Misses 248 307 +59 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Prior to this PR, opacities are updated on every step, but this is only actually needed if the dust properties change or the photon frequency changes. Additionally, the opacity update happens twice for photons that interact, which is also unneeded. This PR adds tracking of whether a photon needs to have its opacities updated, and only updates them if so.