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
10 changes: 8 additions & 2 deletions alerce/common_stamps.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@ def get_stamps(
oid,
candid=None,
measurement_id=None,
include_variance_and_mask=False, # NEW
format="HDUList",
survey=None,
):
Expand All @@ -90,13 +91,15 @@ def get_stamps(
Candid of the stamp to be downloaded. If None, uses the first detection.
measurement_id : int, optional
Alias for candid parameter (for multisurvey compatibility).

format : str
Output format. Options: 'HDUList' | 'numpy'
survey : str, optional
The survey to query. If None, defaults to 'ztf'. Note: relying on
the default (omitting the `survey` parameter) is deprecated and will be removed in
a future release; callers should explicitly pass the desired survey (e.g. `survey='ztf'`).

include_variance_and_mask : bool
If True, returns extra planes of the image cutouts.
Returns
-------
HDUList or list
Expand Down Expand Up @@ -124,7 +127,10 @@ def get_stamps(
)
elif survey in self.valid_surveys:
return self.multisurvey_stamps_client.multisurvey_get_stamps(
oid=oid, candid=candid, survey=survey
oid=oid,
candid=candid,
include_variance_and_mask=include_variance_and_mask,
survey=survey,
)
else:
raise ValueError(f"survey must be one of {self.valid_surveys}")
Expand Down
2 changes: 1 addition & 1 deletion alerce/ms_stamps.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ def _in_ipynb(self):
from IPython import get_ipython
import os

if "IPKernelApp" not in get_ipynb().config: # pragma: no cover
if "IPKernelApp" not in get_ipython().config: # pragma: no cover
raise ImportError("console")
return False
if "VSCODE_PID" in os.environ: # pragma: no cover
Expand Down
Loading