Skip to content

Commit 3ac193a

Browse files
Add entry to estimate_sso_params with the new sfHG1G2 model (#178)
1 parent 2164244 commit 3ac193a

File tree

1 file changed

+14
-1
lines changed

1 file changed

+14
-1
lines changed

fink_utils/sso/spins.py

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -674,6 +674,7 @@ def estimate_sso_params(
674674
normalise_to_V=False,
675675
p0=None,
676676
bounds=None,
677+
ssnamenr=None,
677678
):
678679
"""Fit for phase curve parameters
679680
@@ -738,6 +739,9 @@ def estimate_sso_params(
738739
- HG: (H, G)
739740
Note that even if there is several bands `b`, we take the same
740741
bounds for all H's and G's.
742+
ssnamenr: str, optional
743+
SSO name/number. Only required for sfHG1G2 model, when
744+
querying Horizons.
741745
742746
Returns
743747
-------
@@ -868,9 +872,18 @@ def estimate_sso_params(
868872
outdic = fit_legacy_models(
869873
ydata, sigmapsf, phase, filters, model, p0=p0, bounds=bounds
870874
)
875+
elif model == "sfHG1G2":
876+
outdic = fit_sfhg1g2(
877+
ssnamenr,
878+
ydata,
879+
sigmapsf,
880+
jd,
881+
phase,
882+
filters,
883+
)
871884
else:
872885
raise AssertionError(
873-
"model {} is not understood. Please choose among: SSHG1G2, SHG1G2, HG1G2, HG12, HG".format(
886+
"model {} is not understood. Please choose among: SSHG1G2, SHG1G2, sfHG1G2, HG1G2, HG12, HG".format(
874887
model
875888
)
876889
)

0 commit comments

Comments
 (0)