Skip to content

Commit f28b77a

Browse files
authored
#76 Merge pull request from deshima-dev/astropenguin/issue75
Add missing coordinates to Cube
2 parents ee71e1c + a4e8c21 commit f28b77a

6 files changed

Lines changed: 35 additions & 12 deletions

File tree

CITATION.cff

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,5 +28,5 @@ keywords:
2828
- spectroscopy
2929
- submillimeter
3030
license: MIT
31-
version: 2025.6.0
32-
date-released: '2025-06-16'
31+
version: 2025.6.1
32+
date-released: '2025-06-17'

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ DESHIMA measurement set by DataArray
1111
## Installation
1212

1313
```shell
14-
pip install dems==2025.6.0
14+
pip install dems==2025.6.1
1515
```
1616

1717
## Usage

dems/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
__all__ = ["d1", "d2"]
2-
__version__ = "2025.6.0"
2+
__version__ = "2025.6.1"
33

44

55
# submodules

dems/d2.py

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,18 @@ class Weight:
6969
long_name: Attr[str] = "Data weights"
7070

7171

72+
@dataclass
73+
class CubeMask:
74+
data: Data[Tuple[Ch, Lt, Ln], bool]
75+
long_name: Attr[str] = "Data masks"
76+
77+
78+
@dataclass
79+
class CubeWeight:
80+
data: Data[Tuple[Ch, Lt, Ln], float]
81+
long_name: Attr[str] = "Data weights"
82+
83+
7284
@dataclass
7385
class Observation:
7486
data: Data[Ti, Literal["U16"]]
@@ -450,15 +462,18 @@ class Cube(AsDataArray):
450462

451463
# data
452464
data: Data[Tuple[Ch, Lt, Ln], Any]
465+
mask: Coordof[CubeMask] = False
466+
weight: Coordof[CubeWeight] = 1.0
453467
long_name: Attr[str] = "Brightness"
454468
units: Attr[str] = "K"
455469
name: Name[str] = "Cube"
456470
# dimensions
457471
chan: Coordof[Chan_] = 0
458472
lon: Coordof[Lon_] = 0.0
459473
lat: Coordof[Lat_] = 0.0
460-
# data information
474+
# telescope pointing
461475
frame: Coordof[Frame] = "altaz"
476+
# data information
462477
bandwidth: Coordof[Bandwidth] = 0.0
463478
frequency: Coordof[Frequency] = 0.0
464479
beam_major: Coordof[BeamMajor] = 0.0
@@ -468,6 +483,9 @@ class Cube(AsDataArray):
468483
observer: Attr[str] = ""
469484
project: Attr[str] = ""
470485
object: Attr[str] = ""
486+
telescope_name: Attr[str] = ""
487+
telescope_diameter: Attr[float] = 0.0
488+
telescope_coordinates: Attr[Tuple[float, float, float]] = 0.0, 0.0, 0.0
471489
# ASTE specific
472490
aste_obs_group: Attr[str] = ""
473491
aste_obs_id: Attr[str] = ""

pyproject.toml

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[project]
22
name = "dems"
3-
version = "2025.6.0"
3+
version = "2025.6.1"
44
description = "DESHIMA Measurement Set"
55
readme = "README.md"
66
keywords = [
@@ -35,7 +35,12 @@ homepage = "https://github.com/deshima-dev/dems"
3535
repository = "https://github.com/deshima-dev/dems"
3636

3737
[dependency-groups]
38-
dev = ["black>=24.4", "ipython>=8.18", "pyright>=1.1", "pytest>=8.2"]
38+
dev = [
39+
"black>=25,<26",
40+
"ipython>=8,<10",
41+
"pyright>=1,<2",
42+
"pytest>=8,<9",
43+
]
3944

4045
[build-system]
4146
requires = ["hatchling"]

uv.lock

Lines changed: 5 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)