PESummary merge requestshttps://git.ligo.org/lscsoft/pesummary/-/merge_requests2024-03-27T22:29:20Zhttps://git.ligo.org/lscsoft/pesummary/-/merge_requests/784Pass tidal parameters to waveform generator2024-03-27T22:29:20ZCharlie HoyPass tidal parameters to waveform generatorThe purpose of this MR is to pass the tidal parameters to the waveform generation. cc @jocelyn-readThe purpose of this MR is to pass the tidal parameters to the waveform generation. cc @jocelyn-readhttps://git.ligo.org/lscsoft/pesummary/-/merge_requests/783DRAFT: Plot waveforms that are not in LALSimulation2024-03-15T19:55:11ZCharlie HoyDRAFT: Plot waveforms that are not in LALSimulationThe purpose of this MR is to add functionality to plot waveforms produced with waveform models that are not included in LALSimulation. This fixes #313.The purpose of this MR is to add functionality to plot waveforms produced with waveform models that are not included in LALSimulation. This fixes #313.https://git.ligo.org/lscsoft/pesummary/-/merge_requests/782Add remnant fits for SEOBNRv5*2024-03-13T19:55:14ZCharlie HoyAdd remnant fits for SEOBNRv5*The purpose of this MR is to calculate the remnant fits (`final_mass`, `final_spin`) using the SEOBNRv5 waveform family.The purpose of this MR is to calculate the remnant fits (`final_mass`, `final_spin`) using the SEOBNRv5 waveform family.https://git.ligo.org/lscsoft/pesummary/-/merge_requests/781Generate waveforms with gwsignal2024-03-13T19:56:45ZCharlie HoyGenerate waveforms with gwsignalThe purpose of this MR is to add functionality to generate waveforms using models that are not in LALSimulation. This is related to https://git.ligo.org/lscsoft/pesummary/-/issues/313.The purpose of this MR is to add functionality to generate waveforms using models that are not in LALSimulation. This is related to https://git.ligo.org/lscsoft/pesummary/-/issues/313.https://git.ligo.org/lscsoft/pesummary/-/merge_requests/780Add remnant fits for IMRPhenomX2024-03-25T01:39:55ZCharlie HoyAdd remnant fits for IMRPhenomXThe purpose of this MR is to calculate the remnant fits (`final_mass`, `final_spin`) using the IMRPhenomX waveform family. @geraint.pratten has agreed to review this MR (thanks!)The purpose of this MR is to calculate the remnant fits (`final_mass`, `final_spin`) using the IMRPhenomX waveform family. @geraint.pratten has agreed to review this MR (thanks!)https://git.ligo.org/lscsoft/pesummary/-/merge_requests/779Performance improvement for SamplesDict and reading2024-03-05T23:34:09ZThomas SainratPerformance improvement for SamplesDict and readingHello,
I have been using this package for reading the O4a online PE hdf5 files and found that reading them (using the `pesummary.io.read` function) was fairly slow. Using profiling tools, I found that half of the time was spent within la...Hello,
I have been using this package for reading the O4a online PE hdf5 files and found that reading them (using the `pesummary.io.read` function) was fairly slow. Using profiling tools, I found that half of the time was spent within lalinference (see this issue for more details https://git.ligo.org/lscsoft/lalsuite/-/issues/738), and half was spent dealing with the specific structures from this package (`List`, `Dict` and so on). Those incur a quite significant overhead.
This PR aims to improve the performance of `SamplesDict` ~~by adding some caching~~; indeed, each time an element is accessed, the `keys` are retrieved (this behavior is inherited for `Dict`, which does so because it checks whether the keys that were passed to it are actual keys in order to raise a warning (which does not seem like a very desirable behavior, but anyway)); however, for `SamplesDict` in particular, retrieving the keys is not free, as by default it filters the keys starting by an underscore. ~~With this PR, the filtered keys are cached, and the cache is reset when an element of the dict is set or deleted.~~
Combined with the changes to lalinference, I am able to obtain something like a 4-fold improvement in performance.
EDIT : Was not a good idea in the end. See comment below.
Caveats:
* If the dict is modified in some arcane way (unsure of whether this is possible), the keys may not be correct anymore.
Possible (untested) alternatives:
* ~~Somehow calling `keys` with the `remove_debug=False` argument. Not trivial as this would break for other objects than `SamplesDict`. This could be achieved by making False the default value, but this may break something else.~~
* ~~Grouping calls to `keys` : could also be done now; this probably divides the number of calls by 2 in total, which I think is less significant than the current improvement.~~
* Removing this behavior of `Dict` altogether, allowing it to err if any of the keys passed to it is not in the dictionary. I do not know whether this behavior is used somewhere but it seems very error prone.
* Figure out some way to get the same behavior without `keys`; probably using the `get` method.
In any case, no matter the solution that gets chosen, I think this is an issue to be aware of as it may affect anyone using this to load PE results.https://git.ligo.org/lscsoft/pesummary/-/merge_requests/778Replace sphinx-panels with sphinx-design in docs build2024-02-20T15:17:51ZDuncan Macleodduncan.macleod@ligo.orgReplace sphinx-panels with sphinx-design in docs buildThis MR replaces the use of `sphinx-panels` with that of `sphinx-design`, as recommended by the sphinx-design github project, following the instructions [here](https://sphinx-design.readthedocs.io/en/furo-theme/get_started.html#migrating...This MR replaces the use of `sphinx-panels` with that of `sphinx-design`, as recommended by the sphinx-design github project, following the instructions [here](https://sphinx-design.readthedocs.io/en/furo-theme/get_started.html#migrating-from-sphinx-panels).https://git.ligo.org/lscsoft/pesummary/-/merge_requests/771Call pytest directly from summarytest and using pytest for examples tests2024-02-20T14:22:53ZDuncan Macleodduncan.macleod@ligo.orgCall pytest directly from summarytest and using pytest for examples testsThis MR refactors `summarytest` to call `pytest.main` directly, rather than using `subprocess`. This should be minimally more efficient, but also gives more control over what's going on.
I also refactored the calling functions to use a ...This MR refactors `summarytest` to call `pytest.main` directly, rather than using `subprocess`. This should be minimally more efficient, but also gives more control over what's going on.
I also refactored the calling functions to use a common `_pytest` function.
I also also wrote a pytest module for the examples tests, which should make things a little easier to debug.https://git.ligo.org/lscsoft/pesummary/-/merge_requests/755DRAFT: Updating source classification probability code2023-11-24T17:06:27ZCharlie HoyDRAFT: Updating source classification probability codeThe purpose of this MR is to move away from `pepredicates` for calculating the source classification probabilities, and rather use the code developed by @anarya.ray in https://git.ligo.org/lscsoft/bilby/-/merge_requests/1292 (since @colm...The purpose of this MR is to move away from `pepredicates` for calculating the source classification probabilities, and rather use the code developed by @anarya.ray in https://git.ligo.org/lscsoft/bilby/-/merge_requests/1292 (since @colm.talbot suggested that the code lives downstream of `bilby`).https://git.ligo.org/lscsoft/pesummary/-/merge_requests/746Unpin matplotlib2023-11-24T11:29:44ZCharlie HoyUnpin matplotlibThe purpose of this MR is too unpin `matplotlib`. The issues described in https://git.ligo.org/lscsoft/pesummary/-/merge_requests/738 seem to be caused by `gwpy`, see discussion [here](https://github.com/dfm/corner.py/issues/236). A new ...The purpose of this MR is too unpin `matplotlib`. The issues described in https://git.ligo.org/lscsoft/pesummary/-/merge_requests/738 seem to be caused by `gwpy`, see discussion [here](https://github.com/dfm/corner.py/issues/236). A new release of `gwpy` was made, and therefore we update the requirements to have `gwpy>=3.0.7`https://git.ligo.org/lscsoft/pesummary/-/merge_requests/740Parallelise 'draw_conditioned_prior_samples'2023-09-29T17:21:58ZCharlie HoyParallelise 'draw_conditioned_prior_samples'The purpose of this MR is to parallelise the `pesummary.utils.utils.draw_conditioned_prior_samples` function as it can be slow.The purpose of this MR is to parallelise the `pesummary.utils.utils.draw_conditioned_prior_samples` function as it can be slow.https://git.ligo.org/lscsoft/pesummary/-/merge_requests/736Resolve "Missing opening <head> tag"2023-08-15T16:10:40ZMatthew PitkinResolve "Missing opening <head> tag"closes #297
This also removes duplicate of the `<title>` tags.closes #297
This also removes duplicate of the `<title>` tags.https://git.ligo.org/lscsoft/pesummary/-/merge_requests/732Dingo integration2023-03-23T14:16:15ZStephen GreenDingo integrationThis merge request extends PESummary to read HDF5 output files from Dingo.
### Main changes
* Add `pesummary.core.file.formats.dingo` and `pesummary.gw.file.formats.dingo` modules, which are based closely on their Bilby counterparts. T...This merge request extends PESummary to read HDF5 output files from Dingo.
### Main changes
* Add `pesummary.core.file.formats.dingo` and `pesummary.gw.file.formats.dingo` modules, which are based closely on their Bilby counterparts. These use the Dingo Result class to load the HDF5 file and access its contents. The Result class has specific methods to return the samples, prior, and relevant metadata for PESummary.
* Modify `pesummary.core.file.read` to have a function to check whether a file is a Dingo HDF5 file.
* Add Dingo as an "extras" dependency for PESummary.
### Comments
* Currently there is a bug in PESummary that overwrites the metadata from the HDF5 file (e.g., https://git.ligo.org/lscsoft/pesummary/-/blob/master/pesummary/gw/conversions/__init__.py#L345-360) but once fixed, the Dingo metadata should be loaded.
* The merge request does not implement loading of event strain data or PSDs into PESummary.https://git.ligo.org/lscsoft/pesummary/-/merge_requests/729Simplify `needs` for pages CI job2022-11-21T16:35:06ZDuncan Macleodduncan.macleod@ligo.orgSimplify `needs` for pages CI jobThis MR simplifies the `needs` array for the `pages` CI job, it doesn't need _everything_.This MR simplifies the `needs` array for the `pages` CI job, it doesn't need _everything_.https://git.ligo.org/lscsoft/pesummary/-/merge_requests/727Cache `samples_dict` for loaded file2022-10-27T07:56:17ZCharlie HoyCache `samples_dict` for loaded fileThe purpose of this MR is to store the generated `samples_dict` in cache.The purpose of this MR is to store the generated `samples_dict` in cache.https://git.ligo.org/lscsoft/pesummary/-/merge_requests/718Fix a bunch of invalid escape sequence warnings2022-11-07T11:26:01ZDuncan Macleodduncan.macleod@ligo.orgFix a bunch of invalid escape sequence warningsThis MR fixes a few 'invalid escape sequence' warnings.This MR fixes a few 'invalid escape sequence' warnings.https://git.ligo.org/lscsoft/pesummary/-/merge_requests/704Reduce duplicated options amongst the different `pesummary` executables -- pa...2022-08-11T12:26:45ZCharlie HoyReduce duplicated options amongst the different `pesummary` executables -- part 2The purpose of this MR is to reduce the duplicated options among the different `pesummary` executables and therefore fixes #288.The purpose of this MR is to reduce the duplicated options among the different `pesummary` executables and therefore fixes #288.https://git.ligo.org/lscsoft/pesummary/-/merge_requests/681Draft: Modify Conversion class to use a LazySamplesDict2022-05-26T15:25:32ZCharlie HoyDraft: Modify Conversion class to use a LazySamplesDictThe purpose of this MR is to modify how conversions are done in PESummary. Rather than running all transformations (even those that the user doesn't want), it now only runs transformations that the user requests. This builds upon @daniel...The purpose of this MR is to modify how conversions are done in PESummary. Rather than running all transformations (even those that the user doesn't want), it now only runs transformations that the user requests. This builds upon @daniel.wysocki's suggestion in #283.Charlie HoyCharlie Hoyhttps://git.ligo.org/lscsoft/pesummary/-/merge_requests/679Deprecate `generate_all_posterior_samples` function2022-05-03T22:12:20ZCharlie HoyDeprecate `generate_all_posterior_samples` functionThe purpose of this MR is to deprecate the `generate_all_posterior_samples` function. This is replaced with the `convert` method.The purpose of this MR is to deprecate the `generate_all_posterior_samples` function. This is replaced with the `convert` method.https://git.ligo.org/lscsoft/pesummary/-/merge_requests/659Add units to parameter definitions2022-05-26T08:18:12ZCharlie HoyAdd units to parameter definitionsThe purpose of this MR is to add units to the parameter definitions table in the documentation.
cc @nathan-johnson-mcdanielThe purpose of this MR is to add units to the parameter definitions table in the documentation.
cc @nathan-johnson-mcdaniel