demerge


Namedemerge JSON
Version 2024.8.0 PyPI version JSON
download
home_pagehttps://github.com/deshima-dev/demerge/
SummaryDESHIMA merge code for observed datasets
upload_time2024-08-06 12:47:18
maintainerNone
docs_urlNone
authorTatsuya Takekoshi
requires_python<3.13,>=3.9
licenseMIT
keywords astronomy radio-astronomy submillimeter spectroscopy deshima
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # de:merge

[![Release](https://img.shields.io/pypi/v/demerge?label=Release&color=cornflowerblue&style=flat-square)](https://pypi.org/project/demerge/)
[![Python](https://img.shields.io/pypi/pyversions/demerge?label=Python&color=cornflowerblue&style=flat-square)](https://pypi.org/project/demerge/)
[![Downloads](https://img.shields.io/pypi/dm/demerge?label=Downloads&color=cornflowerblue&style=flat-square)](https://pepy.tech/project/demerge)
[![DOI](https://img.shields.io/badge/DOI-10.5281/zenodo.10015892-cornflowerblue?style=flat-square)](https://doi.org/10.5281/zenodo.10015892)
[![Tests](https://img.shields.io/github/actions/workflow/status/deshima-dev/demerge/tests.yaml?label=Tests&style=flat-square)](https://github.com/deshima-dev/demerge/actions)

DESHIMA merge code for observed datasets

## Installation

```shell
pip install demerge==2024.8.0
```

## Command line interface

de:merge ships with three commands, `demerge`, `reduce`, and `merge`.
`demerge` is a 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 subcommands that perform (1) and (2), respectively, and they should be used only for debugging.

Here is (part of) the `demerge` command help:
```plaintext
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.
    --ddb=DDB
        Type: Path
        Default: PosixPath('/path/to/demerge/data/ddb_20240713.fits')
        Path of DDB (DESHIMA database) file.
    --measure=MEASURE
        Type: Literal
        Default: 'df/f'
        Measure of the DEMS (either df/f or brightness).
    --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:
```shell
demerge YYYYmmddHHMMSS --data_dir /path/to/data --reduced_dir .cache
```
where a raw data directory, `/path/to/data/cosmos_YYYYmmddHHMMSS`, will be specified, then an intermediate reduced data directory will be created as `./.cache/reduced_YYYYmmddHHMMSS`, and finally a 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:

```plaintext
cosmos_YYYYmmddHHMMSS/
├── YYYYmmddHHMMSS.ant
├── YYYYmmddHHMMSS.cabin (optional)
├── YYYYmmddHHMMSS.fits
├── YYYYmmddHHMMSS.misti (optional)
├── 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
```

## 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:

```shell
# run by a shell script
demerge YYYYmmddHHMMSS --data_dir /path/to/data --reduced_dir .cache
```

```python
# run by a Python script
from demerge import demerge
demerge("YYYYmmddHHMMSS", data_dir="/path/to/data", reduced_dir=".cache")
```

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/deshima-dev/demerge/",
    "name": "demerge",
    "maintainer": null,
    "docs_url": null,
    "requires_python": "<3.13,>=3.9",
    "maintainer_email": null,
    "keywords": "astronomy, radio-astronomy, submillimeter, spectroscopy, deshima",
    "author": "Tatsuya Takekoshi",
    "author_email": "tatsuya.takekoshi@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/6c/20/c995c6b80e5b5155bc8b75e1b58bae2f7af91c97e8c2c809c50eb57ebec2/demerge-2024.8.0.tar.gz",
    "platform": null,
    "description": "# de:merge\n\n[![Release](https://img.shields.io/pypi/v/demerge?label=Release&color=cornflowerblue&style=flat-square)](https://pypi.org/project/demerge/)\n[![Python](https://img.shields.io/pypi/pyversions/demerge?label=Python&color=cornflowerblue&style=flat-square)](https://pypi.org/project/demerge/)\n[![Downloads](https://img.shields.io/pypi/dm/demerge?label=Downloads&color=cornflowerblue&style=flat-square)](https://pepy.tech/project/demerge)\n[![DOI](https://img.shields.io/badge/DOI-10.5281/zenodo.10015892-cornflowerblue?style=flat-square)](https://doi.org/10.5281/zenodo.10015892)\n[![Tests](https://img.shields.io/github/actions/workflow/status/deshima-dev/demerge/tests.yaml?label=Tests&style=flat-square)](https://github.com/deshima-dev/demerge/actions)\n\nDESHIMA merge code for observed datasets\n\n## Installation\n\n```shell\npip install demerge==2024.8.0\n```\n\n## Command line interface\n\nde:merge ships with three commands, `demerge`, `reduce`, and `merge`.\n`demerge` is a 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.\n`reduce` and `merge` are subcommands that perform (1) and (2), respectively, and they should be used only for debugging.\n\nHere is (part of) the `demerge` command help:\n```plaintext\nSYNOPSIS\n    demerge OBSID <flags>\n\nDESCRIPTION\n    Run reduce and merge commands to create a single DEMS.\n\nPOSITIONAL ARGUMENTS\n    OBSID\n        Type: str\n        Observation ID (YYYYmmddHHMMSS).\n\nFLAGS\n    --data_dir=DATA_DIR\n        Type: Path\n        Default: PosixPath('.')\n        Path of directory where data packages are placed,\n        i.e. expecting ``${data_dir}/cosmos_YYYYmmddHHMMSS``.\n    --dems_dir=DEMS_DIR\n        Type: Path\n        Default: PosixPath('.')\n        Path of directory where merged DEMS will be placed,\n        i.e. expecting ``${dems_dir}/dems_YYYYmmddHHMMSS.zarr.zip``.\n    --reduced_dir=REDUCED_DIR\n        Type: Path\n        Default: PosixPath('.')\n        Path of directory where reduced packages are placed,\n        i.e. expecting ``${reduced_dir}/reduced_YYYYmmddHHMMSS``.\n        If not specified, a temporary directory will be used.\n    --ddb=DDB\n        Type: Path\n        Default: PosixPath('/path/to/demerge/data/ddb_20240713.fits')\n        Path of DDB (DESHIMA database) file.\n    --measure=MEASURE\n        Type: Literal\n        Default: 'df/f'\n        Measure of the DEMS (either df/f or brightness).\n    --overwrite=OVERWRITE\n        Type: bool\n        Default: False\n        If True, the reduced package and the merged DEMS file\n        will be overwritten even if they exist.\n    --debug=DEBUG\n        Type: bool\n        Default: False\n        If True, detailed logs for debugging will be printed.\n```\n\nA typical command run is as follows:\n```shell\ndemerge YYYYmmddHHMMSS --data_dir /path/to/data --reduced_dir .cache\n```\nwhere a raw data directory, `/path/to/data/cosmos_YYYYmmddHHMMSS`, will be specified, then an intermediate reduced data directory will be created as `./.cache/reduced_YYYYmmddHHMMSS`, and finally a merged DEMS file will be placed as `./dems_YYYYmmddHHMMSS.zarr.zip`.\n\n## Raw data directory\n\nThe name and the file structure of a raw data directory must be as follows:\n\n```plaintext\ncosmos_YYYYmmddHHMMSS/\n\u251c\u2500\u2500 YYYYmmddHHMMSS.ant\n\u251c\u2500\u2500 YYYYmmddHHMMSS.cabin (optional)\n\u251c\u2500\u2500 YYYYmmddHHMMSS.fits\n\u251c\u2500\u2500 YYYYmmddHHMMSS.misti (optional)\n\u251c\u2500\u2500 YYYYmmddHHMMSS.obs\n\u251c\u2500\u2500 YYYYmmddHHMMSS.skychopper.dat.xz\n\u251c\u2500\u2500 YYYYmmddHHMMSS.wea\n\u251c\u2500\u2500 YYYYmmddHHMMSS_info.txt\n\u251c\u2500\u2500 kid_corresp.json\n\u251c\u2500\u2500 kids.list\n\u251c\u2500\u2500 localsweep.sweep\n\u251c\u2500\u2500 localsweep_info.txt\n\u2514\u2500\u2500 pretune\n    \u251c\u2500\u2500 kids.list\n    \u251c\u2500\u2500 localsweep.sweep\n    \u2514\u2500\u2500 localsweep_info.txt\n```\n\n## Use as a Python package\n\nAll (sub)commands are also available as Python functions of the same names in the `demerge` package.\nFor example, the following two runs are equivalent:\n\n```shell\n# run by a shell script\ndemerge YYYYmmddHHMMSS --data_dir /path/to/data --reduced_dir .cache\n```\n\n```python\n# run by a Python script\nfrom demerge import demerge\ndemerge(\"YYYYmmddHHMMSS\", data_dir=\"/path/to/data\", reduced_dir=\".cache\")\n```\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "DESHIMA merge code for observed datasets",
    "version": "2024.8.0",
    "project_urls": {
        "Documentation": "https://deshima-dev.github.io/demerge/",
        "Homepage": "https://github.com/deshima-dev/demerge/"
    },
    "split_keywords": [
        "astronomy",
        " radio-astronomy",
        " submillimeter",
        " spectroscopy",
        " deshima"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "0708b2f7c98fab8c664b80e68d59c2500fd910564fcbe0a4bdb7adad1734d70a",
                "md5": "6941d9de2dadcb417b0eaf30c5f6c9c1",
                "sha256": "89d36f8cae61584921fa59b940d66e1576f7bc52fa215f3856c2f96866ed92ae"
            },
            "downloads": -1,
            "filename": "demerge-2024.8.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "6941d9de2dadcb417b0eaf30c5f6c9c1",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": "<3.13,>=3.9",
            "size": 13770658,
            "upload_time": "2024-08-06T12:47:15",
            "upload_time_iso_8601": "2024-08-06T12:47:15.378289Z",
            "url": "https://files.pythonhosted.org/packages/07/08/b2f7c98fab8c664b80e68d59c2500fd910564fcbe0a4bdb7adad1734d70a/demerge-2024.8.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "6c20c995c6b80e5b5155bc8b75e1b58bae2f7af91c97e8c2c809c50eb57ebec2",
                "md5": "913b04983c6841078874612132543643",
                "sha256": "34cd35787dddfbb96986de6341448db7eb0671b1471dcfd5d68eaff3f53d2842"
            },
            "downloads": -1,
            "filename": "demerge-2024.8.0.tar.gz",
            "has_sig": false,
            "md5_digest": "913b04983c6841078874612132543643",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": "<3.13,>=3.9",
            "size": 13737863,
            "upload_time": "2024-08-06T12:47:18",
            "upload_time_iso_8601": "2024-08-06T12:47:18.076735Z",
            "url": "https://files.pythonhosted.org/packages/6c/20/c995c6b80e5b5155bc8b75e1b58bae2f7af91c97e8c2c809c50eb57ebec2/demerge-2024.8.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-08-06 12:47:18",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "deshima-dev",
    "github_project": "demerge",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "demerge"
}
        
Elapsed time: 0.26649s