Accept explicit distance grids in make_spectral_grid - #869
Open
christinawlindberg wants to merge 2 commits into
Open
Accept explicit distance grids in make_spectral_grid#869christinawlindberg wants to merge 2 commits into
make_spectral_grid#869christinawlindberg wants to merge 2 commits into
Conversation
Enables variable-resolution distance sampling (e.g. Gaussian-density grids concentrated at the target distance). 3-element lists remain min/max/step for backward compatibility. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Update the make_spectral_grid docstring and the beast_setup docs to describe the explicit >3-value distance list, and note that a three-element list is always read as [min, max, step].
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #869 +/- ##
==========================================
- Coverage 38.60% 38.59% -0.01%
==========================================
Files 110 110
Lines 10615 10617 +2
==========================================
Hits 4098 4098
- Misses 6517 6519 +2 ☔ View full report in Codecov by Harness. 🚀 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.
Closes #868
What this does
Allows
distanceto be given as an explicit list of more than three values,which is then used directly (sorted) as the distance grid. This enables
non-uniform, variable-resolution distance sampling — for example a grid whose
density follows the expected line-of-sight distribution of a galaxy.
Backward compatibility
Unchanged for every currently valid input:
60000(scalar)[min, max, step](3 values)np.arangegrid, as before>3 values2 valuesValueError, as before (message expanded)A three-element list is still always read as
[min, max, step], so an explicitgrid of exactly three distances cannot be expressed. That ambiguity is inherent
in the existing API; it is called out in the docstring and the docs rather than
resolved, to avoid changing what existing settings files mean.
Also included
make_spectral_griddocstring updated for the new formdocs/beast_setup.rstentry fordistancesupdated to matchContext
Came out of building a shared physics-model grid for two SMC fields, where a
Gaussian-density distance grid gave the same effective resolution in 47 planes
instead of 66.