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
2 changes: 1 addition & 1 deletion CITATION.cff
Original file line number Diff line number Diff line change
Expand Up @@ -33,5 +33,5 @@ keywords:
- spectroscopy
- submillimeter
license: MIT
version: 2025.8.0
version: 2025.10.0
date-released: '2025-08-18'
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ DESHIMA code for data analysis
## Installation

```shell
pip install decode==2025.8.0
pip install decode==2025.10.0
```

## Quick look
Expand Down
2 changes: 1 addition & 1 deletion decode/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"stats",
"utils",
]
__version__ = "2025.8.0"
__version__ = "2025.10.0"


# submodules
Expand Down
13 changes: 10 additions & 3 deletions decode/make.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,8 @@ def cube(
skycoord_units: Units of the sky coordinate axes.

Returns:
Cube DataArray.
Cube DataArray. The weight coordinate is the inverse
variance of the input DEMS samples within each pixel.

"""
dems = convert.coord_units(dems, "lon", "deg")
Expand All @@ -56,14 +57,20 @@ def cube(

dems = dems.copy(data=dems.data)
dems.coords.update({"index": index})
gridded = dems.groupby("index").mean("time")
mean = dems.groupby("index").mean("time")
var = dems.groupby("index").var("time")

data = np.full([n_lat * n_lon, n_chan], np.nan)
data[gridded.index.values] = gridded.values
data[mean.index.values] = mean.values
data = data.reshape(n_lat, n_lon, n_chan).transpose(2, 0, 1)

weight = np.full([n_lat * n_lon, n_chan], np.nan)
weight[var.index.values] = 1 / var.values
weight = weight.reshape(n_lat, n_lon, n_chan).transpose(2, 0, 1)

cube = Cube.new(
data=data,
weight=weight,
lat=lat,
lon=lon,
chan=dems.chan,
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[project]
name = "decode"
version = "2025.8.0"
version = "2025.10.0"
description = "DESHIMA code for data analysis"
readme = "README.md"
keywords = [
Expand Down
2 changes: 1 addition & 1 deletion uv.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.