Skip to main content

de:merge

Release Python Downloads DOI Tests

DESHIMA merge code for observed datasets

Installation

pip install demerge==2025.8.4

Command line interface

de:merge ships with three commands, demerge, reduce, and merge. demerge is the main command that (1) reduces raw data of KID measurements into a single "reduced" FITS and (2) merge datasets of a DESHIMA observation (including the reduced FITS) into a single DEMS file. reduce and merge are the subcommands that perform (1) and (2), respectively, and they should be used only for debugging.

Here is (part of) the demerge command help:

SYNOPSIS
    demerge OBSID <flags>

DESCRIPTION
    Run reduce and merge commands to create a single DEMS.

POSITIONAL ARGUMENTS
    OBSID
        Type: str
        Observation ID (YYYYMMDDHHMMSS).

FLAGS
    --data_dir=DATA_DIR
        Type: Path
        Default: PosixPath('.')
        Path of directory where data packages are placed,
        i.e. expecting ``${data_dir}/cosmos_YYYYMMDDHHMMSS``.
    --dems_dir=DEMS_DIR
        Type: Path
        Default: PosixPath('.')
        Path of directory where merged DEMS will be placed,
        i.e. expecting ``${dems_dir}/dems_YYYYMMDDHHMMSS.zarr.zip``.
    --reduced_dir=REDUCED_DIR
        Type: Path
        Default: PosixPath('.')
        Path of directory where reduced packages are placed,
        i.e. expecting ``${reduced_dir}/reduced_YYYYMMDDHHMMSS``.
        If not specified, a temporary directory will be used.
    --cdb=CDB
        Type: Path
        Default: PosixPath('/path/to/demerge/data/cdb_20250528.zarr.zip')
        Path of CDB (KID correspondence database) file.
    --ddb=DDB
        Type: Path
        Default: PosixPath('/path/to/demerge/data/ddb_20250819.fits.gz')
        Path of DDB (DESHIMA database) file.
    --overwrite=OVERWRITE
        Type: bool
        Default: False
        If True, the reduced package and the merged DEMS file
        will be overwritten even if they exist.
    --debug=DEBUG
        Type: bool
        Default: False
        If True, detailed logs for debugging will be printed.

A typical command run is as follows:

demerge YYYYMMDDHHMMSS --data_dir /path/to/data --reduced_dir .cache

where the raw data directory, /path/to/data/cosmos_YYYYMMDDHHMMSS, will be selected, then an intermediate reduced data directory will be created as ./.cache/reduced_YYYYMMDDHHMMSS, and finally the merged DEMS file will be placed as ./dems_YYYYMMDDHHMMSS.zarr.zip.

Raw data directory

The name and the file structure of a raw data directory must be as follows:

cosmos_YYYYMMDDHHMMSS/
├── YYYYMMDDHHMMSS.ant
├── YYYYMMDDHHMMSS.cabin
├── YYYYMMDDHHMMSS.fits
├── YYYYMMDDHHMMSS.misti
├── YYYYMMDDHHMMSS.obs
├── YYYYMMDDHHMMSS.skychopper.dat.xz
├── YYYYMMDDHHMMSS.wea
├── YYYYMMDDHHMMSS_info.txt
├── kid_corresp.json
├── kids.list
├── localsweep.sweep
├── localsweep_info.txt
└── pretune
    ├── kids.list
    ├── localsweep.sweep
    └── localsweep_info.txt

If multiple files with the same extension exist, then the last one sorted by name will be selected.

Use as a Python package

All (sub)commands are also available as Python functions of the same names in the demerge package. For example, the following two runs are equivalent:

# run by a shell script
demerge YYYYMMDDHHMMSS --data_dir /path/to/data --reduced_dir .cache
# run by a Python script
from demerge import demerge
demerge("YYYYMMDDHHMMSS", data_dir="/path/to/data", reduced_dir=".cache")

Metadata

Release files for demerge 2025.8.4

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for demerge 2025.8.4
File Size Uploaded Provenance Actions
demerge-2025.8.4.tar.gz 20.5 MB Without provenance Details for demerge-2025.8.4.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for demerge 2025.8.4
File Interpreter ABI Platform Actions
demerge-2025.8.4-py3-none-any.whl Python 3 none any Details for demerge-2025.8.4-py3-none-any.whl

Total release size: 40.9 MB

Release files / demerge-2025.8.4.tar.gz

Download URL demerge-2025.8.4.tar.gz
Size 20.5 MB
Tags Source
SHA-256 checksum
How to use checksums
ee9cce739d62a7867103ef9ecfd846e4642b4ad84a621526a302f758218ebc34
BLAKE2b-256 checksum
How to use checksums
a3d2022ba526965906f2eebc9cdee8a04222c4ccd56307d68b102deb7635f11e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.8.12

Release files / demerge-2025.8.4-py3-none-any.whl

Download URL demerge-2025.8.4-py3-none-any.whl
Size 20.4 MB
Tags Python 3
SHA-256 checksum
How to use checksums
85b3d3640a46aa5226d681baa9abcfbc003b6824de20cd04f8e0a5fb2592a4bb
BLAKE2b-256 checksum
How to use checksums
07a2ae422b5451f9edef037d0a619324b8a7fded06c92e63e54b895b679035aa
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.8.12

Security for demerge 2025.8.4

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

2025.8.4 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page