Skip to content

Commit

Permalink
Add light travel correction for ssHG1G2 (#458)
Browse files Browse the repository at this point in the history
* Add light travel correction for SSHG1G2

* Use 0.29.7 release for fink-utils in the CI

* Clean CI job
  • Loading branch information
JulienPeloton authored Oct 29, 2024
1 parent 7f840de commit 1a9c77a
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion fink_science/ssoft/processor.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
from pyspark.sql.types import MapType, FloatType, StringType

from fink_utils.sso.utils import get_miriade_data
from fink_utils.sso.utils import compute_light_travel_correction
from fink_utils.sso.spins import estimate_sso_params
from fink_utils.sso.periods import estimate_synodic_period

Expand Down Expand Up @@ -369,6 +370,8 @@ def estimate_sso_params_spark(ssnamenr, magpsf, sigmapsf, jd, fid, ra, dec, meth

# Full inversion using pre-computed SHG1G2 & period
if (model.values[0] == "SSHG1G2") and ~np.isnan(outdic["period"]):
jd_lt = compute_light_travel_correction(pdf["i:jd"], pdf["Dobs"])

# TODO: understand if 2*period value (double-peaked lightcurve) is required
# TODO: extend `estimate_sso_parameters` to take p0 per filter for H & G
p0 = [
Expand All @@ -392,7 +395,7 @@ def estimate_sso_params_spark(ssnamenr, magpsf, sigmapsf, jd, fid, ra, dec, meth
pdf['i:fid'].values,
ra=np.deg2rad(pdf['i:ra'].values),
dec=np.deg2rad(pdf['i:dec'].values),
jd=pdf["i:jd"].to_numpy(),
jd=jd_lt.to_numpy(),
p0=p0,
bounds=MODELS['SSHG1G2']['bounds'],
model='SSHG1G2',
Expand Down

0 comments on commit 1a9c77a

Please sign in to comment.