dingo-gw / dingo

Dingo: Deep inference for gravitational-wave observations
MIT License
55 stars 18 forks source link

Separate Sampler and Results classes #123

Closed stephengreen closed 1 year ago

stephengreen commented 1 year ago

This splits off importance sampling and related functionality from the Sampler class into the Result class (previously SamplesDataset). The purpose is to simplify and streamline the code, to make it easier to maintain and to write a new inference interface.

Key changes / methods in each class:

Action required

For detector-time GNPE, I introduced new parameter names L1_time_proxy_relative, etc., to denote the L1_time_proxy after having subtracted off the relative time shifts. This is needed in order to separately preserve L1_time_proxy for training unconditional flows, etc. (This replaces GNPE:L1_time_proxy, etc.) Consequently the GNPE networks are conditioned on L1_time_proxy_relative rather than L1_time_proxy.

To make existing networks compatible with the new GNPEDetectorTimes class, it is necessary to rename the context variables in the .pt files. This can be done using the compatibility script, update_saved_model_gnpe_context_names.py.

Still to-do

stephengreen commented 1 year ago

I've made various additional improvements to the code: