Add spatially varying dust grain sub-species abundances#9
Open
psheehan wants to merge 19 commits into
Open
Conversation
…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.
…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.
|
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #9 +/- ##
==========================================
+ Coverage 88.82% 89.84% +1.01%
==========================================
Files 11 11
Lines 2220 2333 +113
==========================================
+ Hits 1972 2096 +124
+ Misses 248 237 -11 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
… arctanh scaling.
…ause it is never used.
…om going to infinity
…can be combined with samples tuple.
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.
This PR enables using dust opacities that have varying abundances of its constituent sub-species. That includes running models with these abundances varying spatially, but also training dust models with spatially varying abundances.
As a part of this PR, I’ve now moved the code to a mode where the supplied opacities should be at a list of amax, p, and each of the abundances, each as 1D arrays with shape
(nsamples,)and opacities should be provided for each of those samples(amax[i], p[i],) + tuple([a[i] for a in abundances])at a uniform set of wavelengths such that each opacity array has shape(nsamples, nwavelengths). The training set is picked by dividing the nsamples into training, validation, and test sets, such that the validation and test sets are previously unseen visibilities. This also simplifies calculating the Planck mean opacity and random nu samples, as each can be integrated directly from the provided data.The diana_wice dust has been updated following this new setup, though does not include varying abundances.