From 50aeb846e325393cb9412855d43b3e083a02f0fd Mon Sep 17 00:00:00 2001 From: Akio Taniguchi <13254278+astropenguin@users.noreply.github.com> Date: Mon, 18 Aug 2025 12:09:35 +0000 Subject: [PATCH 1/3] #244 Do not keep name in utils.phaseof by default --- decode/utils.py | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/decode/utils.py b/decode/utils.py index 606ddf7..00d1d9e 100644 --- a/decode/utils.py +++ b/decode/utils.py @@ -46,6 +46,7 @@ def phaseof( *, keep_attrs: bool = False, keep_coords: bool = False, + keep_name: bool = False, ) -> xr.DataArray: """Assign a phase to each value in a 1D DataArray. @@ -57,6 +58,7 @@ def phaseof( da: Input 1D DataArray. keep_attrs: Whether to keep attributes of the input. keep_coords: Whether to keep coordinates of the input. + keep_name: Whether to keep name of the input. Returns: 1D int64 DataArray of phases. @@ -69,4 +71,11 @@ def phaseof( is_transision.data[1:] = da.data[1:] != da.data[:-1] phase = is_transision.cumsum(keep_attrs=keep_attrs) - return phase if keep_coords else phase.reset_coords(drop=True) + + if not keep_coords: + phase = phase.reset_coords(drop=True) + + if not keep_name: + phase = phase.rename(None) + + return phase From ae65fa679a732b53c8816f56455c08751a40f2fc Mon Sep 17 00:00:00 2001 From: Akio Taniguchi <13254278+astropenguin@users.noreply.github.com> Date: Mon, 18 Aug 2025 12:10:54 +0000 Subject: [PATCH 2/3] =?UTF-8?q?#244=20Update=20package=20version=20(2025.6?= =?UTF-8?q?.1=20=E2=86=92=202025.8.0)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- CITATION.cff | 2 +- README.md | 2 +- decode/__init__.py | 2 +- pyproject.toml | 2 +- uv.lock | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/CITATION.cff b/CITATION.cff index 93ebb4a..7fe529f 100644 --- a/CITATION.cff +++ b/CITATION.cff @@ -33,5 +33,5 @@ keywords: - spectroscopy - submillimeter license: MIT -version: 2025.6.1 +version: 2025.8.0 date-released: '2025-06-23' diff --git a/README.md b/README.md index ee362ad..36bea73 100644 --- a/README.md +++ b/README.md @@ -11,7 +11,7 @@ DESHIMA code for data analysis ## Installation ```shell -pip install decode==2025.6.1 +pip install decode==2025.8.0 ``` ## Quick look diff --git a/decode/__init__.py b/decode/__init__.py index b4f556c..778e381 100644 --- a/decode/__init__.py +++ b/decode/__init__.py @@ -11,7 +11,7 @@ "stats", "utils", ] -__version__ = "2025.6.1" +__version__ = "2025.8.0" # submodules diff --git a/pyproject.toml b/pyproject.toml index 096d58a..e908458 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "decode" -version = "2025.6.1" +version = "2025.8.0" description = "DESHIMA code for data analysis" readme = "README.md" keywords = [ diff --git a/uv.lock b/uv.lock index 78d5b23..407cac0 100644 --- a/uv.lock +++ b/uv.lock @@ -535,7 +535,7 @@ wheels = [ [[package]] name = "decode" -version = "2025.6.1" +version = "2025.8.0" source = { editable = "." } dependencies = [ { name = "astropy", version = "6.0.1", source = { registry = "https://pypi.org/simple" }, marker = "python_full_version < '3.10'" }, From eea92fa8a49a5018a9c9f8fc565b6e2e8d031dff Mon Sep 17 00:00:00 2001 From: Akio Taniguchi <13254278+astropenguin@users.noreply.github.com> Date: Mon, 18 Aug 2025 12:11:20 +0000 Subject: [PATCH 3/3] #244 Update release date --- CITATION.cff | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CITATION.cff b/CITATION.cff index 7fe529f..8e43a96 100644 --- a/CITATION.cff +++ b/CITATION.cff @@ -34,4 +34,4 @@ keywords: - submillimeter license: MIT version: 2025.8.0 -date-released: '2025-06-23' +date-released: '2025-08-18'