Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 14 additions & 1 deletion fink_utils/sso/spins.py
Original file line number Diff line number Diff line change
Expand Up @@ -674,6 +674,7 @@ def estimate_sso_params(
normalise_to_V=False,
p0=None,
bounds=None,
ssnamenr=None,
):
"""Fit for phase curve parameters

Expand Down Expand Up @@ -738,6 +739,9 @@ def estimate_sso_params(
- HG: (H, G)
Note that even if there is several bands `b`, we take the same
bounds for all H's and G's.
ssnamenr: str, optional
SSO name/number. Only required for sfHG1G2 model, when
querying Horizons.

Returns
-------
Expand Down Expand Up @@ -868,9 +872,18 @@ def estimate_sso_params(
outdic = fit_legacy_models(
ydata, sigmapsf, phase, filters, model, p0=p0, bounds=bounds
)
elif model == "sfHG1G2":
outdic = fit_sfhg1g2(
ssnamenr,
ydata,
sigmapsf,
jd,
phase,
filters,
)
else:
raise AssertionError(
"model {} is not understood. Please choose among: SSHG1G2, SHG1G2, HG1G2, HG12, HG".format(
"model {} is not understood. Please choose among: SSHG1G2, SHG1G2, sfHG1G2, HG1G2, HG12, HG".format(
model
)
)
Expand Down