Fix issue with default waveform argument minimum frequency that causes data saving to fail
When the minimum_frequency
is a dictionary, e.g. minimum_frequency_dict = {'H1': 30, 'L1': 20}
, the waveform_generator
gets passed waveform_arguments
that contain a minimum_frequency
that is set using
minimum_frequency = np.min(
[xx for xx in minimum_frequency_dict.values()]
)
This causes the following error when writing the result file:
03:47 bilby ERROR :
Saving the data has failed with the following message:
Object of type 'int64' is not JSON serializable
which, in turn, prevents marginalised parameters from being reconstructed, since the results file is broken. The final error is
json.decoder.JSONDecodeError: Expecting value: line 185 column 30 (char 15735)
because the results file terminates at line 185 with
"likelihood": {
"interferometers": {
"H1": {},
"L1": {}
},
"time_marginalization": true,
"phase_marginalization": true,
"distance_marginalization": true,
"waveform_arguments": {
"reference_frequency": 20.0,
"waveform_approximant": "IMRPhenomPV2",
"minimum_frequency":