Skip to content
Merged
Show file tree
Hide file tree
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
4 changes: 2 additions & 2 deletions apps/routes/v1/ztf/sso/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
from apps.utils.decoding import format_hbase_output

from fink_utils.sso.miriade import get_miriade_data
from fink_utils.sso.spins import func_hg1g2_with_spin, estimate_sso_params
from fink_utils.sso.spins import func_shg1g2, estimate_sso_params

from line_profiler import profile

Expand Down Expand Up @@ -248,7 +248,7 @@ def extract_sso_data(payload: dict) -> pd.DataFrame:
pdf["residuals_shg1g2"] = 0.0
for filt in np.unique(pdf["i:fid"]):
cond = pdf["i:fid"] == filt
model = func_hg1g2_with_spin(
model = func_shg1g2(
[phase[cond], ra[cond], dec[cond]],
outdic["H_{}".format(filt)],
outdic["G1_{}".format(filt)],
Expand Down
14 changes: 7 additions & 7 deletions apps/routes/v1/ztf/ssoft/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
COLUMNS_HG,
COLUMNS_HG1G2,
COLUMNS_SHG1G2,
COLUMNS_SSHG1G2,
COLUMNS_SOCCA,
)

from line_profiler import profile
Expand All @@ -53,14 +53,14 @@ def get_ssoft(payload: dict) -> pd.DataFrame:
if schema:
if "flavor" in payload:
flavor = payload["flavor"]
if flavor not in ["SSHG1G2", "SHG1G2", "HG1G2", "HG"]:
if flavor not in ["SOCCA", "SHG1G2", "HG1G2", "HG"]:
rep = {
"status": "error",
"text": "flavor needs to be in ['SSHG1G2', 'SHG1G2', 'HG1G2', 'HG']\n",
"text": "flavor needs to be in ['SOCCA', 'SHG1G2', 'HG1G2', 'HG']\n",
}
return Response(str(rep), 400)
elif flavor == "SSHG1G2":
ssoft_columns = {**COLUMNS, **COLUMNS_SSHG1G2}
elif flavor == "SOCCA":
ssoft_columns = {**COLUMNS, **COLUMNS_SOCCA}
elif flavor == "SHG1G2":
ssoft_columns = {**COLUMNS, **COLUMNS_SHG1G2}
elif flavor == "HG1G2":
Expand Down Expand Up @@ -99,10 +99,10 @@ def get_ssoft(payload: dict) -> pd.DataFrame:

if "flavor" in payload:
flavor = payload["flavor"]
if flavor not in ["SSHG1G2", "SHG1G2", "HG1G2", "HG"]:
if flavor not in ["SOCCA", "SHG1G2", "HG1G2", "HG"]:
rep = {
"status": "error",
"text": "flavor needs to be in ['SSHG1G2', 'SHG1G2', 'HG1G2', 'HG']\n",
"text": "flavor needs to be in ['SOCCA', 'SHG1G2', 'HG1G2', 'HG']\n",
}
return Response(str(rep), 400)
else:
Expand Down
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ flask-restx
pandas
numpy
fink-filters==7.7
fink-utils==0.45.0
fink-utils==0.48.0
line_profiler
requests
pyarrow
Expand Down