Metadata-Version: 2.4
Name: rift-pesummary-asimov-adapter
Version: 0.1.0a2
Summary: ASIMOV 0.7+ adapter for RIFT PESummary postprocessing
Author: RIFT contributors
License: MIT License
        
        Copyright (c) 2026 RIFT contributors
        
        Permission is hereby granted, free of charge, to any person obtaining a copy
        of this software and associated documentation files (the "Software"), to deal
        in the Software without restriction, including without limitation the rights
        to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
        copies of the Software, and to permit persons to whom the Software is
        furnished to do so, subject to the following conditions:
        
        The above copyright notice and this permission notice shall be included in all
        copies or substantial portions of the Software.
        
        THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
        IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
        FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
        AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
        LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
        OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
        SOFTWARE.
        
Project-URL: Repository, https://github.com/oshaughnessy-junior/rift-pesummary-asimov-adapter
Requires-Python: >=3.10
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: asimov<0.8,>=0.7
Requires-Dist: pesummary>=1.6
Provides-Extra: test
Requires-Dist: pytest>=7; extra == "test"
Requires-Dist: jsonschema>=4; extra == "test"
Dynamic: license-file

# RIFT PESummary ASIMOV adapter

ASIMOV 0.7+ postprocessing adapter for producing single-analysis and combined
PESummary pages from RIFT results.

The adapter consumes the versioned `rift-assets/v1` contract published by the
RIFT ASIMOV plugin. It intentionally lives outside RIFT so PESummary CLI and
metadata changes can be tested and released independently.

Development starts on reviewable feature branches. See the repository's draft
pull requests for the first implementation and compatibility matrix.

## Install

Install this package in the same environment as ASIMOV and PESummary:

```console
python -m pip install rift-pesummary-asimov-adapter
```

ASIMOV discovers the `rift-pesummary` pipeline through its standard
`asimov.pipelines` entry-point group. RIFT itself remains responsible for the
inference job and publishes a versioned `rift-assets/v1` dictionary. This
adapter consumes that dictionary and owns the mutable `summarypages` command.

## Use

Apply `examples/single-rift-pesummary.yaml` after changing its `needs` entry to
the name of one completed RIFT analysis. For one page comparing every RIFT
analysis on an event, apply `examples/combined-rift-pesummary.yaml`. These are
separate analysis blueprints: neither changes the RIFT inference workflow.

```console
asimov apply -f examples/combined-rift-pesummary.yaml -e EVENT
asimov manage build --event EVENT --dry-run
```

The generated command aligns every sample, configuration, approximant, low and
reference frequency, PSD, and calibration envelope. Detector assets use
PESummary's per-label arguments, which avoids incorrectly sharing one RIFT
analysis's files across a combined page.

When a RIFT run publishes both `samples_raw` and `samples_calmarg`, select both
as independently labelled PESummary analyses with:

```yaml
postprocessing:
  pesummary:
    sample variants: all
```

The accepted values are `preferred` (the backward-compatible default),
`standard`, `calmarg`, `all`, or a list of those values. Missing variants are
skipped for `all` and rejected when explicitly requested alone.

RIFT also publishes its marginalized-likelihood grid as `lnL_marg`. PESummary
1.6 has no CLI input for the RIFT `all.net` format, so the adapter does not pass
it as posterior samples or weights. It can instead preserve and publish an
unaltered copy alongside the postprocessing job:

```yaml
postprocessing:
  pesummary:
    capture all.net: true
```

The copy is exposed in `collect_assets()` and `results()` under `likelihood`.
This keeps the data available for a future PESummary reader without coupling
the stable adapter to an unsupported conversion.

## Compatibility policy

The adapter currently targets ASIMOV 0.7 and PESummary 1.6 or newer. Both RIFT
`rift_O4c` (0.0.17.13) and `rift_O4d` publish the same `rift-assets/v1`
contract. See `compatibility.yaml` and `docs/coordination.md` for the supported
matrix and synchronized-change policy.
