Metadata-Version: 2.4
Name: sgnl-config
Version: 0.1.0
Summary: Unified configuration for the SGNL inspiral search pipeline
Author-email: Chad Hanna <crh184@psu.edu>, Cort Posnansky <cort.posnansky@ligo.org>
License: MPL-2.0
Project-URL: Homepage, https://git.ligo.org/greg/sgnl-config
Project-URL: Issues, https://git.ligo.org/greg/sgnl-config/issues
Classifier: Programming Language :: Python :: 3
Classifier: License :: OSI Approved :: Mozilla Public License 2.0 (MPL 2.0)
Classifier: Operating System :: OS Independent
Requires-Python: >=3.11
Description-Content-Type: text/markdown
Requires-Dist: lalsuite>=7.26
Requires-Dist: igwn-ligolw
Requires-Dist: igwn-segments
Requires-Dist: dqsegdb2
Requires-Dist: pyyaml
Provides-Extra: test
Requires-Dist: pytest; extra == "test"
Requires-Dist: pytest-cov; extra == "test"
Provides-Extra: lint
Requires-Dist: black; extra == "lint"
Requires-Dist: flake8; extra == "lint"
Requires-Dist: flake8-pyproject; extra == "lint"
Requires-Dist: isort; extra == "lint"

# sgnl-config

Configuration for the SGNL inspiral search pipeline: it defines what makes a *search*
a search, and generates the user-facing config that drives a run.

## Generating a config

```
sgnl-config-create --search ew --instruments H1L1V1 --online --injections -o config.yml
```

This writes a complete config YAML for the chosen search, instruments, mode
(`--online` / `--offline`, exactly one required) and whether injections are run.
Site-specific values are emitted as commented `# FIXME` placeholders; the `source` and
`upload` sections are pre-filled with example values but rendered commented out, so you
have to uncomment and check them before use.

The generated file is then the **single source of truth**: `sgnl-dagger` and
`sgnl-ll-dagger` read only what it contains.

## Where the search options come from

`search_specific_options.yml` holds two sections:

- `default-options` — the values a search gets unless it says otherwise (these
  describe a standard AllSky search);
- `searches` — the per-search overrides (`ew`, `ssm`, `mdc`, `ssm_mdc`). To add a new
  search type, add an entry here overriding only what differs.

At generation time these are resolved for the chosen `--search` and **distributed into
the sections that consume them** rather than kept in a section of their own: the snr-chi
binning and thresholds go to `filter`, `sub-bank-exclusive-split-banks` to `svd`, and the
gracedb options to `upload`. The dag builders never read this file.

## API

- `build_config(config_path_or_dict, dag_dir)` — parse a complete config into the object
  the dag builders consume. It is a **pure parser**: it derives segments/ifos but injects
  no defaults of its own.
- `generate_config(search, instruments, online, injections)` — the generator as a dict.
- `search_specific_defaults(search=None)` — resolve the search options without a user
  YAML. Used to populate the command-line defaults of worker executables.

## Dependencies

`sgnl-config` is a leaf package: it depends only on external LIGO/scientific packages,
never on `sgnl` or `strike`. `sgnl` depends on it for config parsing, segment handling
and the shared config helpers; `strike` does not depend on it at all.
