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

Obsobj update to main/v2.0 #311

Merged
merged 33 commits into from
Jan 8, 2024
Merged

Obsobj update to main/v2.0 #311

merged 33 commits into from
Jan 8, 2024

Conversation

bd-j
Copy link
Owner

@bd-j bd-j commented Jan 3, 2024

This is a condensed and updated version of #246 that fixes conflicts with the main branch.

It implements a new Observation class, which takes over responsibility for noise models and likelihood calculations, as well as instrumental smoothing for spectra. The lnprob function can now take an arbitrary list of observation objects.

List of significant changes:

  • New Observation class with Spectrum, Photometry and Lines subclasses. These can be generated from or convert to old style dictionaries, as well as structured arrays for output to a number of formats.
  • New NoiseModel1D class
  • Observation objects now get their own NoiseModels for computing observation specific likelihoods.
  • New way of handling physical (LOSVD) and instrumental smoothing separately.
  • New fitting.lnprobfn that handles an arbitrary list of Observation objects.
  • Output now consists of structured arrays for chains, to handle vector parameters more smoothly.
  • Removes old SedModel and derived classes.
  • Removes the smoothing module; relies on sedpy for smoothing
  • Updates to documentation and demo scripts.

Remaining things to do:

  • Handle emission line marginalization when spectra overlap
  • CI testing for multi-spectra calibration, smoothing, and noise modeling
  • Update notebooks, verify demo scripts are correct

bd-j added 30 commits January 3, 2024 10:52
Also add logic for caching emission line variances from MLE.
  Offloads likelihood computations to NoiseModel objects that are
  attached to individual Observation instances.  Also updates lnprobfn
  to handle lists of observations, and adds some docstrings and
  rough tests.

fitting ubdates for observation lists; dosctring modernization.
Numerous tweaks to observation generation from old style dicts;
Changes to test_eline for new predict() api.
  Observation object methods to convert to structures, fits, h5, etc.
  Better docstrings.
  New Observation.Lines subclass.
  Fix import error in sedmodel.
  Includes option to try to pickle model params.
Moves the SSPBasis and FastStepBasis to galaxy_basis module.
Removes the ssp_basis, dust_basis, and boneyard modules.
Removes the get_spectrum method from SSPBasis and subclasses; this is handled by SpecModel
Remove various multicomponent hacks.
…e polynomial fitting; comment out broken bestfit model saving.
… class for uncorrelated kernels (like jitter).
Treat case of dummy observation that is not any of the recognized kinds;
Bump python version requirement.
@bd-j bd-j merged commit e233cd7 into v2.0 Jan 8, 2024
4 checks passed
@bd-j bd-j deleted the obsobj_merge branch January 8, 2024 18:36
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.

1 participant