-
Notifications
You must be signed in to change notification settings - Fork 2
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
Fixes and updates in features (SPM, TDE, ulens) #492
Conversation
Updates:
IMPORTANT: more changes are needed before running in pipeline |
@ale-munozarancibia Go to the lc_classifier directory and run |
Updates:
Features that should be ignored in training: TDE_mag0, fleet_t0, fleet_m0, ulens_t0, ulens_mag0. Features in version 1.0.0 that should be ignored when using the production db (maybe removed from the db at some point?):
Note about new feature mean_distnr: implementation considers only light curve epochs with distnr <= 5 arcsec, even when the public stream can include epochs with distnr > 5 arcsec. The cut is implemented because the training set comes from the ZTF forced photometry service, that sets distnr > 5 arcsec values to nan. IMPORTANT: more changes are needed before running in pipeline |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #492 +/- ##
===========================================
- Coverage 95.12% 81.83% -13.29%
===========================================
Files 4 84 +80
Lines 41 4597 +4556
===========================================
+ Hits 39 3762 +3723
- Misses 2 835 +833
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
Updates:
|
Summary of the changes
This PR:
Solves problems in the fits computed by ulens and TDE extractors using scipy.optimize.curve_fit, that arose from using float32 precision in jax.numpy instead of float64. This new precision is also used in SPM now, for consistency. IMPORTANT: need to check that the fix (i.e. setting jax_enable_x64 to True in these extractors) works in the pipeline and in the machine(s) used for the training set, as jax documentation states that "XLA doesn’t support 64-bit convolutions on all backends" (see https://jax.readthedocs.io/en/latest/notebooks/Common_Gotchas_in_JAX.html#double-64bit-precision).
Adds writing features from some parametric models that were missing, in order to plot such fits along with the data (by users or when debugging code). These features are: for TDETailExtractor,
TDE_mag_0
; for FleetExtractor,fleet_m_0
andfleet_t0
; for MicroLensExtractor,ulens_t0
andulens_mag_0
. IMPORTANT: a list of these features must be added to the classifiers that use features, in order to avoid their inclusion.Fixes the artificially low chi values in SPM, that arose from a factor that was too big compared to model uncertainties. Such factor was added to a denominator, preventing extremely big values.
Fixes the color_variation feature, so that it now uses difference fluxes instead of corrected ones. Since current models that use this feature are in beta mode, I do not think we need to change the name of the feature, as previous (i.e. wrong) features versions should be erased from the database once the models become stable.
Changes the time window size used for the color_variation feature, to meet the value used by Manuel Pavez' paper.
Fixes the equation for A in the ulens model (an incorrect value of 3 is now 4).
Expands the allowed intervals for the ulens model parameters.
About this PR: