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 fink_utils/photometry/test.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
@pytest.fixture
def requests_alerts():
r = requests.post(
"https://fink-portal.org/api/v1/latests",
"https://api.fink-portal.org/api/v1/latests",
json={"class": "Seyfert_2", "n": "500", "columns": "i:objectId"},
)

Expand All @@ -42,7 +42,7 @@ def requests_alerts():
)

r = requests.post(
"https://fink-portal.org/api/v1/objects",
"https://api.fink-portal.org/api/v1/objects",
json={
"objectId": request_object,
"output-format": "json",
Expand Down
4 changes: 2 additions & 2 deletions fink_utils/slack_bot/bot_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ def unzip_img(stamp: bytes, title_name: str) -> io.BytesIO:
def get_imgs():
def request(kind):
r = requests.post(
"https://fink-portal.org/api/v1/cutouts",
"https://api.fink-portal.org/api/v1/cutouts",
json={
"objectId": "ZTF23abjzkmx",
"kind": kind,
Expand Down Expand Up @@ -118,7 +118,7 @@ def request(kind):
TypeText.PLAIN_TXT,
"fink-science-portal",
"View on Fink :fink:",
"https://fink-portal.org/ZTF23abjzkmx",
"https://api.fink-portal.org/ZTF23abjzkmx",
True,
)
msg.add_elements(fink_section)
Expand Down
4 changes: 2 additions & 2 deletions fink_utils/sso/periods.py
Original file line number Diff line number Diff line change
Expand Up @@ -264,7 +264,7 @@ def estimate_synodic_period(

One can also directly specify the Pandas dataframe with Fink data:
# TODO: check alias between astropy and nifty-ls...
>>> r = requests.post("https://fink-portal.org/api/v1/sso", json={"n_or_d": ssnamenr, "withEphem": True, "output-format": "json"})
>>> r = requests.post("https://api.fink-portal.org/api/v1/sso", json={"n_or_d": ssnamenr, "withEphem": True, "output-format": "json"})
>>> pdf = pd.read_json(io.BytesIO(r.content))
>>> P_from_pdf, _ = estimate_synodic_period(pdf=pdf, flavor="SHG1G2")
>>> p1 = np.isclose(P, P_from_pdf, rtol=1e-1)
Expand All @@ -275,7 +275,7 @@ def estimate_synodic_period(
if ssnamenr is not None:
# TODO: use quaero
r = requests.post(
"https://fink-portal.org/api/v1/sso",
"https://api.fink-portal.org/api/v1/sso",
json={"n_or_d": ssnamenr, "withEphem": True, "output-format": "json"},
)
else:
Expand Down
2 changes: 1 addition & 1 deletion fink_utils/sso/profiling/run_exp.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
flavor = "SHG1G2"

r = requests.post(
"https://fink-portal.org/api/v1/sso",
"https://api.fink-portal.org/api/v1/sso",
json={"n_or_d": ssnamenr, "withEphem": True, "output-format": "json"},
)
pdf = pd.read_json(io.BytesIO(r.content))
Expand Down
4 changes: 2 additions & 2 deletions fink_utils/sso/spins.py
Original file line number Diff line number Diff line change
Expand Up @@ -337,7 +337,7 @@ def compute_color_correction(filters: np.array) -> np.array:
>>> import pandas as pd

>>> r = requests.post(
... 'https://fink-portal.org/api/v1/sso',
... 'https://api.fink-portal.org/api/v1/sso',
... json={
... 'n_or_d': '1465',
... 'output-format': 'json'
Expand Down Expand Up @@ -659,7 +659,7 @@ def estimate_sso_params(
>>> import pandas as pd

>>> r = requests.post(
... 'https://fink-portal.org/api/v1/sso',
... 'https://api.fink-portal.org/api/v1/sso',
... json={
... 'n_or_d': '223',
... 'withEphem': True,
Expand Down
2 changes: 1 addition & 1 deletion fink_utils/sso/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -421,7 +421,7 @@ def get_num_opposition(elong, width=4):
>>> import pandas as pd

>>> r = requests.post(
... 'https://fink-portal.org/api/v1/sso',
... 'https://api.fink-portal.org/api/v1/sso',
... json={
... 'n_or_d': '8467',
... 'withEphem': True,
Expand Down
4 changes: 2 additions & 2 deletions fink_utils/tg_bot/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,7 @@ def get_cutout(cutout=None, ztf_id=None, kind="Difference", origin="alert"):
if origin == "API":
assert ztf_id is not None
r = requests.post(
"https://fink-portal.org/api/v1/cutouts",
"https://api.fink-portal.org/api/v1/cutouts",
json={"objectId": ztf_id, "kind": kind, "output-format": "array"},
timeout=25,
)
Expand Down Expand Up @@ -297,7 +297,7 @@ def get_curve(
assert objectId is not None

r = requests.post(
"https://fink-portal.org/api/v1/objects",
"https://api.fink-portal.org/api/v1/objects",
json={
"objectId": objectId,
"columns": "i:jd,i:fid,i:magpsf,i:sigmapsf,d:tag",
Expand Down
Loading