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

Updates on NN architecture, Filters, redshift and tests #17

Open
wants to merge 30 commits into
base: main
Choose a base branch
from

Conversation

haukekoehn
Copy link

Some commits that all together now incorporate a couple new features in a consistent way to the package.
New features are:
-cVAEs for for surrogate models
-old SVDModel (nmma style) for surrogate models
-Conversions for spectral flux densities, in particular Filter instances can now calculate the magnitude lightcurve from a 2D flux array.
-Unittest workflow that (as of now) tests some components of the code.
-Surrogate models now predict the apparent magnitude based on the redshift and luminosity distance passed on to them

haukekoehn and others added 30 commits December 20, 2024 13:36
training and use of conditional variational autoencoders.
lightcurve_model.py. Additionally, adapted settings for AfterglowData.py
for pbag.
DataManager class. Also added some of the principle for
utils.ImageScaler
preprocess_svd method to it for LightCurveTrainer. Also removed
now superfluous lines at the end of neuralnets.py.
it can deal both with LightcurveModels and FluxModels.
SVDLightcurveTrainer.
Preprocessing is done by DataManager.
FluxModels now use the proper filter get_mags method that is mapped over
the spectral flux array using jax.tree.map
github. Also small changes in pylint workflow.
flake8 from the unittest workflow, because flake8 does not recognize the
jaxtyping options Array[Float, "n"] and we have an extra workflow with
pylint anyways.
For the installation with pip install . Despite not necessary since
python 3.3 I found that it does not work without it in my setup. Also
changed the installation in the workflow files.
Remove benchmark result of the models as these are not necessary to have
on the repo. Updated.gitignore accordingly
Surrogates will now take redshift and luminosity distance
into account, i.e. the predict() method directly returns the apparent
magnitude in the specified filters.
This also means that for the flux models the times are rescaled, so we
will have to see how to deal with that.
magnitude function is now defined when initializing a utils.Filter
instance depending whether it is a monochromatic or not, so branching with jax.lax.cond is not necessary anymore.
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