{"id":18290227,"url":"https://github.com/deshima-dev/demerge","last_synced_at":"2025-11-02T15:06:30.472Z","repository":{"id":199830223,"uuid":"392930098","full_name":"deshima-dev/demerge","owner":"deshima-dev","description":":truck: DESHIMA merge code for observed datasets","archived":false,"fork":false,"pushed_at":"2024-09-10T12:42:01.000Z","size":249894,"stargazers_count":3,"open_issues_count":13,"forks_count":1,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-03-21T02:32:33.837Z","etag":null,"topics":["aste","astronomy","deshima","spectroscopy","submillimeter"],"latest_commit_sha":null,"homepage":"https://deshima-dev.github.io/demerge/","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/deshima-dev.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":"CITATION.cff","codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-08-05T06:31:54.000Z","updated_at":"2024-08-06T12:46:33.000Z","dependencies_parsed_at":"2024-01-02T08:09:53.116Z","dependency_job_id":"bbb96298-cead-4ff0-8a96-03a05dcba3d1","html_url":"https://github.com/deshima-dev/demerge","commit_stats":{"total_commits":392,"total_committers":4,"mean_commits":98.0,"dds":0.2755102040816326,"last_synced_commit":"bebba988419521b97a3a81172b52e9694e8c075d"},"previous_names":["deshima-dev/dmerge"],"tags_count":34,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/deshima-dev%2Fdemerge","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/deshima-dev%2Fdemerge/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/deshima-dev%2Fdemerge/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/deshima-dev%2Fdemerge/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/deshima-dev","download_url":"https://codeload.github.com/deshima-dev/demerge/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247324324,"owners_count":20920622,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["aste","astronomy","deshima","spectroscopy","submillimeter"],"created_at":"2024-11-05T14:09:56.235Z","updated_at":"2025-11-02T15:06:30.464Z","avatar_url":"https://github.com/deshima-dev.png","language":"Python","readme":"# de:merge\n\n[![Release](https://img.shields.io/pypi/v/demerge?label=Release\u0026color=cornflowerblue\u0026style=flat-square)](https://pypi.org/project/demerge/)\n[![Python](https://img.shields.io/pypi/pyversions/demerge?label=Python\u0026color=cornflowerblue\u0026style=flat-square)](https://pypi.org/project/demerge/)\n[![Downloads](https://img.shields.io/pypi/dm/demerge?label=Downloads\u0026color=cornflowerblue\u0026style=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\u0026style=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==2025.8.4\n```\n\n## Command line interface\n\nde:merge ships with three commands, `demerge`, `reduce`, and `merge`.\n`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.\n`reduce` and `merge` are the 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 \u003cflags\u003e\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    --cdb=CDB\n        Type: Path\n        Default: PosixPath('/path/to/demerge/data/cdb_20250528.zarr.zip')\n        Path of CDB (KID correspondence database) file.\n    --ddb=DDB\n        Type: Path\n        Default: PosixPath('/path/to/demerge/data/ddb_20250819.fits.gz')\n        Path of DDB (DESHIMA database) file.\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 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`.\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├── YYYYMMDDHHMMSS.ant\n├── YYYYMMDDHHMMSS.cabin\n├── YYYYMMDDHHMMSS.fits\n├── YYYYMMDDHHMMSS.misti\n├── YYYYMMDDHHMMSS.obs\n├── YYYYMMDDHHMMSS.skychopper.dat.xz\n├── YYYYMMDDHHMMSS.wea\n├── YYYYMMDDHHMMSS_info.txt\n├── kid_corresp.json\n├── kids.list\n├── localsweep.sweep\n├── localsweep_info.txt\n└── pretune\n    ├── kids.list\n    ├── localsweep.sweep\n    └── localsweep_info.txt\n```\n\nIf multiple files with the same extension exist, then the last one sorted by name will be selected.\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","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdeshima-dev%2Fdemerge","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdeshima-dev%2Fdemerge","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdeshima-dev%2Fdemerge/lists"}