Update from develop#46
Closed
PabloCorcho wants to merge 106 commits into
Closed
Conversation
…plement alternative LOSVD models
Contributor
There was a problem hiding this comment.
Pull request overview
This PR appears to be a broad “sync from develop” update that modernizes BESTA’s fitting/sampling infrastructure (new sampler support, likelihood backends, LOSVD refactor), expands pipeline execution capabilities (batch/parallel runs), and updates tests/docs accordingly.
Changes:
- Adds a modern PyMC sampler integration and associated tests.
- Refactors spectral/photometric likelihood evaluation (new
pipeline_modules/likelihoods.py) and updates multiple pipeline modules to use inverse-variance workflows and reusable LOSVD kernels. - Enhances pipeline orchestration and post-processing utilities (BatchPipeline, results I/O helpers, autocorrelation tools), with documentation + CI test coverage updates.
Reviewed changes
Copilot reviewed 36 out of 37 changed files in this pull request and generated 6 comments.
Show a summary per file
| File | Description |
|---|---|
| tutorials/fit_redshift/fit_jwst_redshift.ipynb | Adds pickle security warning and minor tutorial guidance updates. |
| tests/test_run.py | Updates config section naming for dust attenuation. |
| tests/test_pymc_sampler.py | Adds smoke/integration tests for the new PyMC sampler. |
| tests/test_postprocessing.py | Switches results reading to besta.io.read_results_file. |
| tests/test_pipeline.py | Adds BatchPipeline tests and updates pipeline imports. |
| tests/test_pipeline_module.py | Updates dust section naming used in DataBlock. |
| tests/test_likelihoods.py | Adds tests validating likelihood backend selection and correctness. |
| tests/test_kinematics.py | Adds unit tests for new pixel-kernel LOSVD and convolution helpers. |
| tests/test_grid.py | Removes MagTransform/CensoredSizeLikelihood references and updates tests accordingly. |
| tests/test_fitting_modules.py | Updates dust section naming and adds a __main__ runner. |
| src/besta/spectrum.py | Adds wavelength/velocity helpers, enriches emission-line outputs, and improves docstrings/comments. |
| src/besta/sfh.py | Adds transform-aware parameter bounds/monotonicity enforcement and fixes alpha parameter naming. |
| src/besta/samplers/pymc_sampler.py | Introduces a PyMC-based CosmoSIS sampler implementation. |
| src/besta/samplers/init.py | Exports the new PyMC sampler. |
| src/besta/postprocess.py | Adds autocorrelation tooling, burn-in support, and moves results I/O to besta.io. |
| src/besta/pipeline.py | Improves error handling, fixes config update logic, and adds BatchPipeline parallel runner support. |
| src/besta/pipeline_modules/spectra_redshift_fit.py | Speeds up redshift scan with numba + adds table-based persistence for z profiles. |
| src/besta/pipeline_modules/sfh_photometry_grid.py | Passes likelihood kind explicitly for photometry. |
| src/besta/pipeline_modules/sfh_photometry_emu.py | Passes likelihood kind explicitly for photometry. |
| src/besta/pipeline_modules/likelihoods.py | New backend-selectable likelihood implementations (NumPy/Numba). |
| src/besta/pipeline_modules/galaxy_spectra.py | Refactors to reusable LOSVD kernels and new likelihood plumbing. |
| src/besta/pipeline_modules/galaxy_photometry.py | Passes likelihood kind explicitly for photometry. |
| src/besta/pipeline_modules/full_spectral_fit.py | Refactors to reusable LOSVD kernels, new dust section naming, and new likelihood plumbing. |
| src/besta/pipeline_modules/base_module.py | Introduces likelihood_kind/method, ivar plumbing, non-finite handling, and LOSVD kernel preparation. |
| src/besta/kinematics.py | Major refactor to pixel-kernel classes with caching + updated convolution helpers. |
| src/besta/io.py | Enhances results-file parsing, adds burn-in helpers, and table format utilities. |
| src/besta/grid/transforms.py | Removes MagTransform; improves LinearStandardiser naming/docs. |
| src/besta/grid/prob.py | Refactors numba imports, prior normalization, and removes CensoredSizeLikelihood. |
| src/besta/grid/grid.py | Refactors imports and internal boundary helper naming. |
| src/besta/grid/binning.py | Fixes JSON key stability for tuple keys with robust parsing/serialization. |
| requirements.txt | Unpins numpy and explicitly includes numba. |
| README.md | Expands installation and contribution documentation. |
| docs/source/manager.rst | Documents BatchPipeline usage patterns. |
| docs/source/grid.rst | Expands/clarifies grid-based inference docs. |
| docs/source/configuration.rst | Adds maxlike/emcee config examples. |
| docs/requirements.txt | Unpins numpy for docs builds. |
| .github/workflows/test.yml | Broadens pytest invocation to tests/test_*. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Update dev
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.
No description provided.