dingo-gw / dingo

Dingo: Deep inference for gravitational-wave observations
MIT License
60 stars 20 forks source link

Remove update to WaveformDataset.settings based on update to domain. #94

Closed stephengreen closed 2 years ago

stephengreen commented 2 years ago

This removes the update to WaveformDataset.settings based on an updated domain. That way, we preserve the domain details of how waveforms were generated, which is important when producing injections and evaluating likelihoods.

I don't believe that there will be any impact on the functioning of the code, since the functions build_domain_from_model_metadata() and build_dataset() both apply the domain_update on top of the domain settings when constructing objects.

As far as trained models go, this should only impact the metadata for models that applied a domain_update, likely EOB models where f_max was reduced. I can make a script to change these values.

stephengreen commented 2 years ago

I added a script that lets you modify the metadata of a model. It could be useful, e.g., if the old code had set f_max = 1024.0, but you want to restore it to the dataset setting of 4096.0:

python update_model_metadata.py --checkpoint model_latest.pt --key dataset_settings domain f_max --value 4096.0
stephengreen commented 2 years ago

At some point it might be useful to improve this script into a standard dingo command.