dq-genesis 0.1.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- dq_genesis-0.1.0/.claude/settings.local.json +13 -0
- dq_genesis-0.1.0/.gitignore +10 -0
- dq_genesis-0.1.0/.gitlab-ci.yml +78 -0
- dq_genesis-0.1.0/CHANGELOG.md +9 -0
- dq_genesis-0.1.0/Dockerfile +39 -0
- dq_genesis-0.1.0/Makefile +42 -0
- dq_genesis-0.1.0/PKG-INFO +133 -0
- dq_genesis-0.1.0/README.md +69 -0
- dq_genesis-0.1.0/configs/dqmodule_h1.yaml +53 -0
- dq_genesis-0.1.0/docs/gen_ref_nav.py +58 -0
- dq_genesis-0.1.0/docs/index.md +1 -0
- dq_genesis-0.1.0/mkdocs.yml +60 -0
- dq_genesis-0.1.0/pyproject.toml +219 -0
- dq_genesis-0.1.0/src/dqgenesis/__init__.py +13 -0
- dq_genesis-0.1.0/src/dqgenesis/_version.py +24 -0
- dq_genesis-0.1.0/src/dqgenesis/cli.py +363 -0
- dq_genesis-0.1.0/src/dqgenesis/config/__init__.py +12 -0
- dq_genesis-0.1.0/src/dqgenesis/config/loader.py +205 -0
- dq_genesis-0.1.0/src/dqgenesis/config/model.py +44 -0
- dq_genesis-0.1.0/src/dqgenesis/pipeline/__init__.py +5 -0
- dq_genesis-0.1.0/src/dqgenesis/pipeline/builder.py +228 -0
- dq_genesis-0.1.0/src/dqgenesis/py.typed +0 -0
- dq_genesis-0.1.0/src/dqgenesis/tests/__init__.py +0 -0
- dq_genesis-0.1.0/src/dqgenesis/tests/test_cli.py +172 -0
- dq_genesis-0.1.0/src/dqgenesis/tests/test_config.py +218 -0
- dq_genesis-0.1.0/src/dqgenesis/tests/test_e2e_offline.py +128 -0
- dq_genesis-0.1.0/src/dqgenesis/tests/test_pipeline_builder.py +296 -0
- dq_genesis-0.1.0/uv.lock +3106 -0
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
{
|
|
2
|
+
"permissions": {
|
|
3
|
+
"allow": [
|
|
4
|
+
"Read(//Users/zachyarbrough/miniforge3/envs/sgn-dq-dev/lib/python3.12/site-packages/sgn_arrakis/**)",
|
|
5
|
+
"Bash(python -c \"import arrakis, inspect; print\\(inspect.signature\\(arrakis.Publisher.__init__\\)\\); print\\('---register---'\\); print\\(inspect.signature\\(arrakis.Publisher.register\\)\\); print\\('---publish---'\\); print\\(inspect.signature\\(arrakis.Publisher.publish\\)\\); print\\('---Channel---'\\); print\\(inspect.signature\\(arrakis.Channel.__init__\\) if hasattr\\(arrakis.Channel,'__init__'\\) else arrakis.Channel\\); print\\('---SeriesBlock---'\\); print\\(inspect.signature\\(arrakis.SeriesBlock.__init__\\) if hasattr\\(arrakis,'SeriesBlock'\\) else 'n/a'\\)\")",
|
|
6
|
+
"Read(//private/tmp/publisher-configurations/LHO/**)",
|
|
7
|
+
"Read(//private/tmp/publisher-configurations/**)",
|
|
8
|
+
"Read(//Users/zachyarbrough/projects/ligo/sgn-ligo/**)",
|
|
9
|
+
"Read(//Users/zachyarbrough/projects/ligo/sgndq/sgn-ligo/**)",
|
|
10
|
+
"Read(//Users/zachyarbrough/projects/**)"
|
|
11
|
+
]
|
|
12
|
+
}
|
|
13
|
+
}
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
include:
|
|
2
|
+
# -- python
|
|
3
|
+
- component: git.ligo.org/computing/gitlab/components/python/sdist@1
|
|
4
|
+
- component: git.ligo.org/computing/gitlab/components/python/wheel@1
|
|
5
|
+
- component: git.ligo.org/computing/gitlab/components/python/code-quality@1
|
|
6
|
+
inputs:
|
|
7
|
+
analyzer: "ruff"
|
|
8
|
+
requirements: "-r requirements-lint.txt"
|
|
9
|
+
- component: git.ligo.org/computing/gitlab/components/python/dependency-scanning@1
|
|
10
|
+
- component: git.ligo.org/computing/gitlab/components/python/type-checking@1
|
|
11
|
+
inputs:
|
|
12
|
+
project_dir: "src"
|
|
13
|
+
- component: git.ligo.org/computing/gitlab/components/python/test@1
|
|
14
|
+
inputs:
|
|
15
|
+
install_extra: test
|
|
16
|
+
python_versions:
|
|
17
|
+
- "3.11"
|
|
18
|
+
- "3.12"
|
|
19
|
+
- "3.13"
|
|
20
|
+
# -- docker
|
|
21
|
+
- component: git.ligo.org/computing/gitlab/components/docker/build@1
|
|
22
|
+
inputs:
|
|
23
|
+
image_tag: $CI_COMMIT_SHA
|
|
24
|
+
- component: git.ligo.org/computing/gitlab/components/docker/push@1
|
|
25
|
+
inputs:
|
|
26
|
+
pull_image_tag: $CI_COMMIT_SHA
|
|
27
|
+
push_image_tag: $CI_COMMIT_REF_NAME
|
|
28
|
+
push_when: "all"
|
|
29
|
+
tag_latest: false
|
|
30
|
+
rules:
|
|
31
|
+
- if: $CI_COMMIT_BRANCH
|
|
32
|
+
- if: $CI_COMMIT_TAG !~ /^(\d+\.)?(\d+\.)?(\*|\d+)$/
|
|
33
|
+
- component: git.ligo.org/computing/gitlab/components/docker/push@1
|
|
34
|
+
inputs:
|
|
35
|
+
pull_image_tag: $CI_COMMIT_SHA
|
|
36
|
+
push_image_tag: $CI_COMMIT_TAG
|
|
37
|
+
push_when: "tags"
|
|
38
|
+
tag_latest: true
|
|
39
|
+
rules:
|
|
40
|
+
# tag latest only on new versions
|
|
41
|
+
- if: $CI_COMMIT_TAG =~ /^(\d+\.)?(\d+\.)?(\*|\d+)$/
|
|
42
|
+
# -- docs
|
|
43
|
+
- component: git.ligo.org/computing/gitlab/components/mkdocs/build@1
|
|
44
|
+
inputs:
|
|
45
|
+
requirements: "-r requirements-docs.txt"
|
|
46
|
+
- component: git.ligo.org/computing/gitlab/components/mkdocs/pages@1
|
|
47
|
+
inputs:
|
|
48
|
+
pages_when: "default"
|
|
49
|
+
|
|
50
|
+
# -- customizations
|
|
51
|
+
docker_push_gitlab:
|
|
52
|
+
rules:
|
|
53
|
+
- if: $CI_PIPELINE_SOURCE == "merge_request_event"
|
|
54
|
+
when: never
|
|
55
|
+
- when: always
|
|
56
|
+
|
|
57
|
+
ruff:
|
|
58
|
+
needs:
|
|
59
|
+
- requirements
|
|
60
|
+
|
|
61
|
+
mkdocs:
|
|
62
|
+
needs:
|
|
63
|
+
- requirements
|
|
64
|
+
|
|
65
|
+
# -- requirements
|
|
66
|
+
requirements:
|
|
67
|
+
stage: build
|
|
68
|
+
image: python:3.12
|
|
69
|
+
script:
|
|
70
|
+
- python -m pip install pipx
|
|
71
|
+
- pipx ensurepath
|
|
72
|
+
- source ~/.bashrc
|
|
73
|
+
- pipx install hatch
|
|
74
|
+
- hatch dep show requirements --feature docs > requirements-docs.txt
|
|
75
|
+
- hatch dep show requirements --feature lint > requirements-lint.txt
|
|
76
|
+
artifacts:
|
|
77
|
+
paths:
|
|
78
|
+
- requirements-*.txt
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
## [Unreleased]
|
|
4
|
+
|
|
5
|
+
- Add Arrakis data source (`--arrakis`) for bounded replay or live streaming.
|
|
6
|
+
- Initial release: YAML flag config parsing, pipeline construction, and CLI
|
|
7
|
+
with offline (frame cache) and online (shared-memory) data sources.
|
|
8
|
+
|
|
9
|
+
[unreleased]: https://git.ligo.org/detchar/sgn-dq/dq-genesis/-/commits/main
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
# build stage: export locked dependencies
|
|
2
|
+
FROM ghcr.io/astral-sh/uv:0.8-python3.13-bookworm AS build
|
|
3
|
+
|
|
4
|
+
WORKDIR /app
|
|
5
|
+
RUN apt-get update && apt-get install -y --no-install-recommends git && \
|
|
6
|
+
rm -rf /var/lib/apt/lists/*
|
|
7
|
+
|
|
8
|
+
COPY . .
|
|
9
|
+
|
|
10
|
+
RUN uv export --no-editable --no-emit-project --locked \
|
|
11
|
+
--format requirements.txt -o requirements.txt
|
|
12
|
+
RUN uv build --wheel
|
|
13
|
+
|
|
14
|
+
# install stage: install dependencies into virtualenv
|
|
15
|
+
FROM python:3.13 AS install
|
|
16
|
+
|
|
17
|
+
WORKDIR /app
|
|
18
|
+
COPY --from=build /app/requirements.txt /app
|
|
19
|
+
COPY --from=build /app/dist/*.whl /app
|
|
20
|
+
|
|
21
|
+
RUN python -m venv /opt/venv
|
|
22
|
+
ENV PATH="/opt/venv/bin:$PATH"
|
|
23
|
+
|
|
24
|
+
RUN pip install --no-cache-dir -r requirements.txt
|
|
25
|
+
RUN pip install --no-cache-dir --no-deps *.whl
|
|
26
|
+
|
|
27
|
+
# final stage: minimal runtime image
|
|
28
|
+
FROM python:3.13-slim
|
|
29
|
+
|
|
30
|
+
COPY --from=install /opt/venv /opt/venv
|
|
31
|
+
|
|
32
|
+
RUN groupadd --gid 1000 dqgenesis && \
|
|
33
|
+
useradd --uid 1000 --gid 1000 -m dqgenesis
|
|
34
|
+
|
|
35
|
+
USER dqgenesis
|
|
36
|
+
|
|
37
|
+
ENV PATH="/opt/venv/bin:$PATH"
|
|
38
|
+
|
|
39
|
+
ENTRYPOINT ["dq-genesis"]
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
ifeq ($(PYTHONPATH),)
|
|
2
|
+
PYTHONPATH := src
|
|
3
|
+
else
|
|
4
|
+
PYTHONPATH := src:$(PYTHONPATH)
|
|
5
|
+
endif
|
|
6
|
+
export PYTHONPATH
|
|
7
|
+
|
|
8
|
+
.PHONY: all
|
|
9
|
+
all : format lint check test
|
|
10
|
+
|
|
11
|
+
.PHONY: help
|
|
12
|
+
help :
|
|
13
|
+
@echo
|
|
14
|
+
@echo 'Commands:'
|
|
15
|
+
@echo
|
|
16
|
+
@echo ' make test run tests'
|
|
17
|
+
@echo ' make lint run linter'
|
|
18
|
+
@echo ' make format run code formatter'
|
|
19
|
+
@echo ' make check run static type checker'
|
|
20
|
+
@echo ' make docs build documentation'
|
|
21
|
+
@echo
|
|
22
|
+
|
|
23
|
+
.PHONY: test
|
|
24
|
+
test :
|
|
25
|
+
pytest -v --cov=dqgenesis --cov-report=term-missing src/dqgenesis/tests
|
|
26
|
+
|
|
27
|
+
.PHONY: lint
|
|
28
|
+
lint :
|
|
29
|
+
ruff check
|
|
30
|
+
|
|
31
|
+
.PHONY: format
|
|
32
|
+
format :
|
|
33
|
+
ruff format
|
|
34
|
+
ruff check --fix
|
|
35
|
+
|
|
36
|
+
.PHONY: check
|
|
37
|
+
check :
|
|
38
|
+
mypy src
|
|
39
|
+
|
|
40
|
+
.PHONY: docs
|
|
41
|
+
docs :
|
|
42
|
+
mkdocs build -c
|
|
@@ -0,0 +1,133 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: dq-genesis
|
|
3
|
+
Version: 0.1.0
|
|
4
|
+
Summary: Pipeline construction and execution for the SGN DQ module
|
|
5
|
+
Project-URL: Homepage, https://git.ligo.org/detchar/sgn-dq/dq-genesis
|
|
6
|
+
Project-URL: Documentation, https://detchar.docs.ligo.org/sgn-dq/dq-genesis
|
|
7
|
+
Project-URL: Repository, https://git.ligo.org/detchar/sgn-dq/dq-genesis.git
|
|
8
|
+
Project-URL: Issues, https://git.ligo.org/detchar/sgn-dq/dq-genesis/issues
|
|
9
|
+
Author-email: Derek Davis <derek.davis@ligo.org>, Olivia Godwin <olivia.godwin@ligo.org>, Zach Yarbrough <zach.yarbrough@ligo.org>
|
|
10
|
+
Maintainer-email: Derek Davis <derek.davis@ligo.org>, Olivia Godwin <olivia.godwin@ligo.org>, Zach Yarbrough <zach.yarbrough@ligo.org>
|
|
11
|
+
License-Expression: GPL-3.0-or-later
|
|
12
|
+
Classifier: Development Status :: 3 - Alpha
|
|
13
|
+
Classifier: Intended Audience :: Science/Research
|
|
14
|
+
Classifier: License :: OSI Approved :: GNU General Public License v3 or later (GPLv3+)
|
|
15
|
+
Classifier: Programming Language :: Python :: 3
|
|
16
|
+
Classifier: Topic :: Scientific/Engineering :: Astronomy
|
|
17
|
+
Classifier: Topic :: Scientific/Engineering :: Physics
|
|
18
|
+
Requires-Python: >=3.11
|
|
19
|
+
Requires-Dist: pyyaml>=6.0
|
|
20
|
+
Requires-Dist: scipy>=1.10
|
|
21
|
+
Requires-Dist: sgn-arrakis
|
|
22
|
+
Requires-Dist: sgn-dq>=0.0.4
|
|
23
|
+
Requires-Dist: sgn-gwframe
|
|
24
|
+
Requires-Dist: sgn-ligo
|
|
25
|
+
Requires-Dist: sgn-ts
|
|
26
|
+
Requires-Dist: sgn>=0.6
|
|
27
|
+
Provides-Extra: dev
|
|
28
|
+
Requires-Dist: markdown-callouts>=0.2; extra == 'dev'
|
|
29
|
+
Requires-Dist: markdown-exec>=0.5; extra == 'dev'
|
|
30
|
+
Requires-Dist: mkdocs-coverage>=0.2; extra == 'dev'
|
|
31
|
+
Requires-Dist: mkdocs-gen-files>=0.3; extra == 'dev'
|
|
32
|
+
Requires-Dist: mkdocs-literate-nav>=0.4; extra == 'dev'
|
|
33
|
+
Requires-Dist: mkdocs-material-igwn; extra == 'dev'
|
|
34
|
+
Requires-Dist: mkdocs-section-index>=0.3; extra == 'dev'
|
|
35
|
+
Requires-Dist: mkdocs>=1.3; extra == 'dev'
|
|
36
|
+
Requires-Dist: mkdocstrings[python]; extra == 'dev'
|
|
37
|
+
Requires-Dist: mypy; extra == 'dev'
|
|
38
|
+
Requires-Dist: mypy-extensions; extra == 'dev'
|
|
39
|
+
Requires-Dist: pip; extra == 'dev'
|
|
40
|
+
Requires-Dist: pytest; extra == 'dev'
|
|
41
|
+
Requires-Dist: pytest-cov; extra == 'dev'
|
|
42
|
+
Requires-Dist: ruff; extra == 'dev'
|
|
43
|
+
Requires-Dist: toml>=0.10; extra == 'dev'
|
|
44
|
+
Provides-Extra: docs
|
|
45
|
+
Requires-Dist: markdown-callouts>=0.2; extra == 'docs'
|
|
46
|
+
Requires-Dist: markdown-exec>=0.5; extra == 'docs'
|
|
47
|
+
Requires-Dist: mkdocs-coverage>=0.2; extra == 'docs'
|
|
48
|
+
Requires-Dist: mkdocs-gen-files>=0.3; extra == 'docs'
|
|
49
|
+
Requires-Dist: mkdocs-literate-nav>=0.4; extra == 'docs'
|
|
50
|
+
Requires-Dist: mkdocs-material-igwn; extra == 'docs'
|
|
51
|
+
Requires-Dist: mkdocs-section-index>=0.3; extra == 'docs'
|
|
52
|
+
Requires-Dist: mkdocs>=1.3; extra == 'docs'
|
|
53
|
+
Requires-Dist: mkdocstrings[python]; extra == 'docs'
|
|
54
|
+
Requires-Dist: toml>=0.10; extra == 'docs'
|
|
55
|
+
Provides-Extra: lint
|
|
56
|
+
Requires-Dist: mypy; extra == 'lint'
|
|
57
|
+
Requires-Dist: mypy-extensions; extra == 'lint'
|
|
58
|
+
Requires-Dist: pip; extra == 'lint'
|
|
59
|
+
Requires-Dist: ruff; extra == 'lint'
|
|
60
|
+
Provides-Extra: test
|
|
61
|
+
Requires-Dist: pytest; extra == 'test'
|
|
62
|
+
Requires-Dist: pytest-cov; extra == 'test'
|
|
63
|
+
Description-Content-Type: text/markdown
|
|
64
|
+
|
|
65
|
+
# dq-genesis
|
|
66
|
+
|
|
67
|
+
Pipeline construction and execution for the creation of the data quality vector.
|
|
68
|
+
|
|
69
|
+
`dq-genesis` parses a YAML DQ flag config, assembles an `sgn.Pipeline` from the
|
|
70
|
+
evaluators and transforms provided by `sgn-dq`, and runs it against frame data
|
|
71
|
+
(offline frame cache), shared-memory frames (online), or an Arrakis stream. The
|
|
72
|
+
output is a uint32 `DQG-DQ_VECTOR` channel written to a GWF frame stream.
|
|
73
|
+
|
|
74
|
+
## Install
|
|
75
|
+
|
|
76
|
+
```bash
|
|
77
|
+
pip install -e /path/to/dq-genesis
|
|
78
|
+
```
|
|
79
|
+
|
|
80
|
+
`dq-genesis` depends on `sgn-dq` (evaluators, `Not`, `Parity`), `sgn-ts`,
|
|
81
|
+
`sgn-ligo`, and `sgn`.
|
|
82
|
+
|
|
83
|
+
## Quick start
|
|
84
|
+
|
|
85
|
+
```bash
|
|
86
|
+
# Validate a config
|
|
87
|
+
dq-genesis --flags configs/dqmodule_h1.yaml --dry-run
|
|
88
|
+
|
|
89
|
+
# Offline run against a frame cache
|
|
90
|
+
dq-genesis --flags configs/dqmodule_h1.yaml \
|
|
91
|
+
--gps-start 1234567890 --gps-end 1234568000 \
|
|
92
|
+
--frame-cache h1.cache --output-dir /tmp/out
|
|
93
|
+
|
|
94
|
+
# Bounded replay from Arrakis (omit --gps-start/--gps-end for a live stream)
|
|
95
|
+
dq-genesis --flags configs/dqmodule_h1.yaml \
|
|
96
|
+
--arrakis --gps-start 1234567890 --gps-end 1234568000 \
|
|
97
|
+
--output-dir /tmp/out
|
|
98
|
+
```
|
|
99
|
+
|
|
100
|
+
See `src/dqgenesis/cli.py --help` for the full argument surface.
|
|
101
|
+
|
|
102
|
+
## Output destinations
|
|
103
|
+
|
|
104
|
+
The assembled DQ vector can be fanned out to one or more sinks. Select any
|
|
105
|
+
combination of the `--publish-*` flags; if none is given it defaults to disk,
|
|
106
|
+
preserving the original frame-writing behaviour.
|
|
107
|
+
|
|
108
|
+
- `--publish-disk` — write the DQ vector to GWF frame files. Control the
|
|
109
|
+
destination with `--output-dir` (and `--write-path`, `--frame-duration`).
|
|
110
|
+
- `--publish-arrakis` — publish the DQ vector channel back to an Arrakis
|
|
111
|
+
server. Requires `--publisher-id`; pass `--replay-id` to publish into a
|
|
112
|
+
replay namespace.
|
|
113
|
+
|
|
114
|
+
```bash
|
|
115
|
+
# Save to GWF frames (default)
|
|
116
|
+
dq-genesis --flags configs/dqmodule_h1.yaml \
|
|
117
|
+
--gps-start 1234567890 --gps-end 1234568000 \
|
|
118
|
+
--frame-cache h1.cache --publish-disk --output-dir /tmp/out
|
|
119
|
+
|
|
120
|
+
# Publish back into Arrakis
|
|
121
|
+
dq-genesis --flags configs/dqmodule_h1.yaml \
|
|
122
|
+
--arrakis --gps-start 1234567890 --gps-end 1234568000 \
|
|
123
|
+
--publish-arrakis --publisher-id <publisher_id>
|
|
124
|
+
|
|
125
|
+
# Both at once — the DQ vector is fanned out to disk and Arrakis
|
|
126
|
+
dq-genesis --flags configs/dqmodule_h1.yaml \
|
|
127
|
+
--arrakis --gps-start 1234567890 --gps-end 1234568000 \
|
|
128
|
+
--publish-disk --output-dir /tmp/out \
|
|
129
|
+
--publish-arrakis --publisher-id <publisher_id>
|
|
130
|
+
```
|
|
131
|
+
|
|
132
|
+
The output channel is named `<IFO>:DQG-DQ_VECTOR` by default; override it with
|
|
133
|
+
`--output-channel`.
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
# dq-genesis
|
|
2
|
+
|
|
3
|
+
Pipeline construction and execution for the creation of the data quality vector.
|
|
4
|
+
|
|
5
|
+
`dq-genesis` parses a YAML DQ flag config, assembles an `sgn.Pipeline` from the
|
|
6
|
+
evaluators and transforms provided by `sgn-dq`, and runs it against frame data
|
|
7
|
+
(offline frame cache), shared-memory frames (online), or an Arrakis stream. The
|
|
8
|
+
output is a uint32 `DQG-DQ_VECTOR` channel written to a GWF frame stream.
|
|
9
|
+
|
|
10
|
+
## Install
|
|
11
|
+
|
|
12
|
+
```bash
|
|
13
|
+
pip install -e /path/to/dq-genesis
|
|
14
|
+
```
|
|
15
|
+
|
|
16
|
+
`dq-genesis` depends on `sgn-dq` (evaluators, `Not`, `Parity`), `sgn-ts`,
|
|
17
|
+
`sgn-ligo`, and `sgn`.
|
|
18
|
+
|
|
19
|
+
## Quick start
|
|
20
|
+
|
|
21
|
+
```bash
|
|
22
|
+
# Validate a config
|
|
23
|
+
dq-genesis --flags configs/dqmodule_h1.yaml --dry-run
|
|
24
|
+
|
|
25
|
+
# Offline run against a frame cache
|
|
26
|
+
dq-genesis --flags configs/dqmodule_h1.yaml \
|
|
27
|
+
--gps-start 1234567890 --gps-end 1234568000 \
|
|
28
|
+
--frame-cache h1.cache --output-dir /tmp/out
|
|
29
|
+
|
|
30
|
+
# Bounded replay from Arrakis (omit --gps-start/--gps-end for a live stream)
|
|
31
|
+
dq-genesis --flags configs/dqmodule_h1.yaml \
|
|
32
|
+
--arrakis --gps-start 1234567890 --gps-end 1234568000 \
|
|
33
|
+
--output-dir /tmp/out
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
See `src/dqgenesis/cli.py --help` for the full argument surface.
|
|
37
|
+
|
|
38
|
+
## Output destinations
|
|
39
|
+
|
|
40
|
+
The assembled DQ vector can be fanned out to one or more sinks. Select any
|
|
41
|
+
combination of the `--publish-*` flags; if none is given it defaults to disk,
|
|
42
|
+
preserving the original frame-writing behaviour.
|
|
43
|
+
|
|
44
|
+
- `--publish-disk` — write the DQ vector to GWF frame files. Control the
|
|
45
|
+
destination with `--output-dir` (and `--write-path`, `--frame-duration`).
|
|
46
|
+
- `--publish-arrakis` — publish the DQ vector channel back to an Arrakis
|
|
47
|
+
server. Requires `--publisher-id`; pass `--replay-id` to publish into a
|
|
48
|
+
replay namespace.
|
|
49
|
+
|
|
50
|
+
```bash
|
|
51
|
+
# Save to GWF frames (default)
|
|
52
|
+
dq-genesis --flags configs/dqmodule_h1.yaml \
|
|
53
|
+
--gps-start 1234567890 --gps-end 1234568000 \
|
|
54
|
+
--frame-cache h1.cache --publish-disk --output-dir /tmp/out
|
|
55
|
+
|
|
56
|
+
# Publish back into Arrakis
|
|
57
|
+
dq-genesis --flags configs/dqmodule_h1.yaml \
|
|
58
|
+
--arrakis --gps-start 1234567890 --gps-end 1234568000 \
|
|
59
|
+
--publish-arrakis --publisher-id <publisher_id>
|
|
60
|
+
|
|
61
|
+
# Both at once — the DQ vector is fanned out to disk and Arrakis
|
|
62
|
+
dq-genesis --flags configs/dqmodule_h1.yaml \
|
|
63
|
+
--arrakis --gps-start 1234567890 --gps-end 1234568000 \
|
|
64
|
+
--publish-disk --output-dir /tmp/out \
|
|
65
|
+
--publish-arrakis --publisher-id <publisher_id>
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
The output channel is named `<IFO>:DQG-DQ_VECTOR` by default; override it with
|
|
69
|
+
`--output-channel`.
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
# H1 DQ Flag Definitions
|
|
2
|
+
# Equivalent to: H-DQ+Gate_O3.json (dq_flags section only)
|
|
3
|
+
#
|
|
4
|
+
# These flags are evaluated at 16 Hz (flag_step = 0.0625s) and assembled
|
|
5
|
+
# into the H1:DQG-DQ_VECTOR channel. Bit convention: 1 = good, 0 = problem.
|
|
6
|
+
# Flags with invert: true produce buffer when the problem IS detected, so
|
|
7
|
+
# the bit is cleared (set to 0) when the evaluator fires.
|
|
8
|
+
|
|
9
|
+
parity_bit: 0
|
|
10
|
+
flag_step: 0.0625
|
|
11
|
+
|
|
12
|
+
flags:
|
|
13
|
+
- name: "OMC_DCPD_ADC_OVERFLOW"
|
|
14
|
+
bit: 1
|
|
15
|
+
evaluator: overflow
|
|
16
|
+
invert: true
|
|
17
|
+
channels:
|
|
18
|
+
- "H1:FEC-8_ADC_OVERFLOW_ACC_0_12"
|
|
19
|
+
- "H1:FEC-8_ADC_OVERFLOW_ACC_0_13"
|
|
20
|
+
|
|
21
|
+
- name: "BLRMS_STRAIN_70_110"
|
|
22
|
+
bit: 5
|
|
23
|
+
evaluator: band_rms
|
|
24
|
+
channels:
|
|
25
|
+
- "H1:CAL-DELTAL_EXTERNAL_DQ"
|
|
26
|
+
params:
|
|
27
|
+
rms_max: 3.0e-7
|
|
28
|
+
settle: 2.0
|
|
29
|
+
bandpass:
|
|
30
|
+
type: elliptic
|
|
31
|
+
order: 8
|
|
32
|
+
ripple_db: 1.0
|
|
33
|
+
stop_atten_db: 100.0
|
|
34
|
+
low_hz: 70
|
|
35
|
+
high_hz: 110
|
|
36
|
+
test_channel: "H1:DMT-BLRMS_STRAIN_70_110"
|
|
37
|
+
|
|
38
|
+
- name: "BLRMS_STRAIN_25_50"
|
|
39
|
+
bit: 6
|
|
40
|
+
evaluator: band_rms
|
|
41
|
+
channels:
|
|
42
|
+
- "H1:CAL-DELTAL_EXTERNAL_DQ"
|
|
43
|
+
params:
|
|
44
|
+
rms_max: 5.0e-7
|
|
45
|
+
settle: 2.0
|
|
46
|
+
bandpass:
|
|
47
|
+
type: elliptic
|
|
48
|
+
order: 8
|
|
49
|
+
ripple_db: 1.0
|
|
50
|
+
stop_atten_db: 100.0
|
|
51
|
+
low_hz: 25
|
|
52
|
+
high_hz: 50
|
|
53
|
+
test_channel: "H1:DMT-BLRMS_STRAIN_25_50"
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
# Copyright (c) 2021, Timothee Mazzucotelli
|
|
2
|
+
#
|
|
3
|
+
# Permission to use, copy, modify, and/or distribute this software for any
|
|
4
|
+
# purpose with or without fee is hereby granted, provided that the above
|
|
5
|
+
# copyright notice and this permission notice appear in all copies.
|
|
6
|
+
#
|
|
7
|
+
# THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
|
|
8
|
+
# WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
|
9
|
+
# MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
|
|
10
|
+
# ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
|
11
|
+
# WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
|
12
|
+
# ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
|
|
13
|
+
# OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
|
14
|
+
|
|
15
|
+
"""Generate the code reference pages and navigation."""
|
|
16
|
+
|
|
17
|
+
from pathlib import Path
|
|
18
|
+
|
|
19
|
+
import mkdocs_gen_files
|
|
20
|
+
|
|
21
|
+
nav = mkdocs_gen_files.Nav()
|
|
22
|
+
|
|
23
|
+
src = Path("src")
|
|
24
|
+
|
|
25
|
+
for path in sorted(src.joinpath("dqgenesis").rglob("*.py")):
|
|
26
|
+
if path.name[0] == "_" or "tests" in path.parts:
|
|
27
|
+
continue
|
|
28
|
+
|
|
29
|
+
# Module path relative to src/ (e.g., dqgenesis/pipeline/builder)
|
|
30
|
+
module_path = path.relative_to(src).with_suffix("")
|
|
31
|
+
# Doc path mirrors module structure
|
|
32
|
+
doc_path = path.relative_to(src).with_suffix(".md")
|
|
33
|
+
full_doc_path = Path("reference", doc_path)
|
|
34
|
+
|
|
35
|
+
parts = tuple(module_path.parts)
|
|
36
|
+
|
|
37
|
+
if parts[-1] == "__init__":
|
|
38
|
+
parts = parts[:-1]
|
|
39
|
+
doc_path = doc_path.with_name("index.md")
|
|
40
|
+
full_doc_path = full_doc_path.with_name("index.md")
|
|
41
|
+
elif parts[-1] == "__main__":
|
|
42
|
+
continue
|
|
43
|
+
|
|
44
|
+
nav[parts] = doc_path.as_posix()
|
|
45
|
+
|
|
46
|
+
with mkdocs_gen_files.open(full_doc_path, "w") as fd:
|
|
47
|
+
ident = ".".join(parts)
|
|
48
|
+
fd.write(f"::: {ident}")
|
|
49
|
+
|
|
50
|
+
mkdocs_gen_files.set_edit_path(full_doc_path, path.relative_to(src))
|
|
51
|
+
|
|
52
|
+
with mkdocs_gen_files.open("reference/SUMMARY.md", "w") as nav_file:
|
|
53
|
+
nav_file.writelines(nav.build_literate_nav())
|
|
54
|
+
|
|
55
|
+
changelog = Path("CHANGELOG.md")
|
|
56
|
+
if changelog.exists():
|
|
57
|
+
with mkdocs_gen_files.open("changelog.md", "w") as fd:
|
|
58
|
+
fd.write(changelog.read_text())
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
--8<-- "README.md"
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
site_name: dq-genesis
|
|
2
|
+
site_description: Pipeline construction and execution for the SGN DQ module
|
|
3
|
+
site_url: https://detchar.docs.ligo.org/sgn-dq/dq-genesis
|
|
4
|
+
repo_url: https://git.ligo.org/detchar/sgn-dq/dq-genesis
|
|
5
|
+
repo_name: detchar/sgn-dq/dq-genesis
|
|
6
|
+
site_dir: site
|
|
7
|
+
watch: [README.md, src/dqgenesis]
|
|
8
|
+
|
|
9
|
+
nav:
|
|
10
|
+
- Home:
|
|
11
|
+
- Overview: index.md
|
|
12
|
+
# defer to gen-files + literate-nav
|
|
13
|
+
- API Reference: reference/
|
|
14
|
+
- Changelog: changelog.md
|
|
15
|
+
|
|
16
|
+
theme:
|
|
17
|
+
name: material_igwn
|
|
18
|
+
features:
|
|
19
|
+
- content.code.copy
|
|
20
|
+
- content.code.annotate
|
|
21
|
+
|
|
22
|
+
markdown_extensions:
|
|
23
|
+
- admonition
|
|
24
|
+
- callouts:
|
|
25
|
+
strip_period: no
|
|
26
|
+
- pymdownx.highlight
|
|
27
|
+
- pymdownx.inlinehilite
|
|
28
|
+
- pymdownx.magiclink
|
|
29
|
+
- pymdownx.snippets:
|
|
30
|
+
check_paths: true
|
|
31
|
+
- pymdownx.superfences
|
|
32
|
+
- toc:
|
|
33
|
+
permalink: true
|
|
34
|
+
toc_depth: 4
|
|
35
|
+
|
|
36
|
+
plugins:
|
|
37
|
+
- search
|
|
38
|
+
- markdown-exec
|
|
39
|
+
- gen-files:
|
|
40
|
+
scripts:
|
|
41
|
+
- docs/gen_ref_nav.py
|
|
42
|
+
- literate-nav:
|
|
43
|
+
nav_file: SUMMARY.md
|
|
44
|
+
- section-index
|
|
45
|
+
- mkdocstrings:
|
|
46
|
+
handlers:
|
|
47
|
+
python:
|
|
48
|
+
paths: [src]
|
|
49
|
+
inventories:
|
|
50
|
+
- https://docs.python.org/3/objects.inv
|
|
51
|
+
- https://mkdocstrings.github.io/objects.inv
|
|
52
|
+
- https://mkdocstrings.github.io/griffe/objects.inv
|
|
53
|
+
- https://numpy.org/doc/stable/objects.inv
|
|
54
|
+
options:
|
|
55
|
+
docstring_style: numpy
|
|
56
|
+
docstring_options:
|
|
57
|
+
ignore_init_summary: yes
|
|
58
|
+
merge_init_into_class: yes
|
|
59
|
+
separate_signature: yes
|
|
60
|
+
show_root_full_path: no
|