Issue when sampling using BasicGravitationalWaveTransient
I've been trying to modify the bilby code so that uncertainty in the form of the PSD can be folded into the analysis i.e. multiple PSD files are loaded in and the indices of these are implemented as parameters to be fitted. The error shown below got thrown up in run_sampler, as I am using BasicGravitationalWaveTransient rather than GravitationalWaveTransient in bilby/bilby/gw/likelihood.py. It gets called like this:
result = bilby.run_sampler( likelihood, prior, outdir=outdir, label=label, sampler=sampler, npoints=npoints, use_ratio=False, injection_parameters=None, conversion_function=bilby.gw.conversion.generate_all_bbh_parameters, resume=False, n_check_point=5000)
It seems that the issue is that the generate_all_bbh_parameters function is expecting the likelihood to have the various marginalization flags as attributes, and it fails for the Basic version which doesn't have those options.
Traceback (most recent call last): File "GW150914_advanced.py", line 130, in conversion_function=bilby.gw.conversion.generate_all_bbh_parameters, resume=True, n_check_point=5000) File "/home/jonathan.davies/bilby/bilby/core/sampler/init.py", line 203, in run_sampler conversion_function=conversion_function) File "/home/jonathan.davies/bilby/bilby/core/result.py", line 1072, in samples_to_posterior data_frame = conversion_function(data_frame, likelihood, priors) File "/home/jonathan.davies/bilby/bilby/gw/conversion.py", line 703, in generate_all_bbh_parameters likelihood=likelihood, priors=priors) File "/home/jonathan.davies/bilby/bilby/gw/conversion.py", line 667, in _generate_all_cbc_parameters samples=output_sample, likelihood=likelihood) File "/home/jonathan.davies/bilby/bilby/gw/conversion.py", line 1015, in generate_posterior_samples_from_marginalized_likelihood if not any([likelihood.phase_marginalization, AttributeError: 'BasicGravitationalWaveTransient' object has no attribute 'phase_marginalization'