Use dict's getter in `get_all_injection_credible_levels`
Explaination
isinstance(self.injection_parameters[key], float)
can result in KeyError
if key
does not exist inside self.injection_parameters
(I got a KeyError: 'time_jitter'
from here)
This can be avoided by using the dict's getter:
self.injection_parameters.get(key, None)
where None is the default value returned if the key
does not exist inside self.injection_parameters
.
Test
After adding this fix, I was able to successfully create the following pp-plot for a set of 585 bilby result.json