bilby issueshttps://git.ligo.org/lscsoft/bilby/-/issues2020-12-23T06:17:41Zhttps://git.ligo.org/lscsoft/bilby/-/issues/536plot_waveform_posterior uses non representative samples2020-12-23T06:17:41ZMoritz Huebnerplot_waveform_posterior uses non representative samplesThe following discussion from !817 should be addressed:
- [x] @avi.vajpeyi started a [discussion](https://git.ligo.org/lscsoft/bilby/-/merge_requests/817#note_185464): (+3 comments)
> While working on this, I noticed that if `n_sa...The following discussion from !817 should be addressed:
- [x] @avi.vajpeyi started a [discussion](https://git.ligo.org/lscsoft/bilby/-/merge_requests/817#note_185464): (+3 comments)
> While working on this, I noticed that if `n_samples` is passed to `plot_waveform_posterior` then n samples from the top of the posterior data frame are used (the samples with the lowest LogL).
>
> Would it be better to use the n samples from the bottom of the data frame (the samples with the highest LogL)?
>
> Should I make an issue about this, or am I understanding something wrong?
I think it should take random samples. In any case, we should aim to fix this soon.Futurehttps://git.ligo.org/lscsoft/bilby/-/issues/522Sanity_check_labels returns error when NoneType is in label keys2020-09-10T02:51:44ZSamson LeongSanity_check_labels returns error when NoneType is in label keysWhen a dictionary of parameters is passed to `result.plot_corner()`, if the dictionary contains a key that does not have a latex label (time_jitter in my case), sanity_check would raise `TypeError: argument of type 'NoneType' is not iter...When a dictionary of parameters is passed to `result.plot_corner()`, if the dictionary contains a key that does not have a latex label (time_jitter in my case), sanity_check would raise `TypeError: argument of type 'NoneType' is not iterable` because the latex label is a NoneType.
My current fix is to add a line in `get_latex_labels_from_parameter_keys` to swap all NoneType to 'None', like this:
> `latex_labels = ['None' if label is None else label for label in latex_labels]`Futurehttps://git.ligo.org/lscsoft/bilby/-/issues/479Double check `theta_jn` and `iota` consistency in the docs2020-05-01T17:07:53ZGregory Ashtongregory.ashton@ligo.orgDouble check `theta_jn` and `iota` consistency in the docsIssue to resolve left over from !648Issue to resolve left over from !648Futurehttps://git.ligo.org/lscsoft/bilby/-/issues/438CPNest resuming on HTCondor2020-05-14T12:53:24ZGregory Ashtongregory.ashton@ligo.orgCPNest resuming on HTCondorFutureColm Talbotcolm.talbot@ligo.orgColm Talbotcolm.talbot@ligo.orghttps://git.ligo.org/lscsoft/bilby/-/issues/424Make sure all conditional priors can draw multiple samples at once2019-10-24T01:06:23ZMoritz HuebnerMake sure all conditional priors can draw multiple samples at onceThis involves a possible issue when you create a `ConditionalPriorDict` and use the `sample` method to draw multiple samples at once. This involves a possible issue when you create a `ConditionalPriorDict` and use the `sample` method to draw multiple samples at once. FutureMoritz HuebnerMoritz Huebnerhttps://git.ligo.org/lscsoft/bilby/-/issues/410Discontinue Python 2.7 support?2020-01-15T05:25:11ZMatthew PitkinDiscontinue Python 2.7 support?Come the new year are we planning to continue trying to make sure bilby supports both Python 2.7 and Python 3, or will we move to a development state where we don't explicitly try and keep everything Python 2.7 compatible? I imagine that...Come the new year are we planning to continue trying to make sure bilby supports both Python 2.7 and Python 3, or will we move to a development state where we don't explicitly try and keep everything Python 2.7 compatible? I imagine that we should make sure the v1.0 release works for Python 2.7, but maybe after that we could move to Python 3-only support?Futurehttps://git.ligo.org/lscsoft/bilby/-/issues/406PowerLaw prior does not check if prior minimum/maximum are valid2020-04-25T01:10:32ZMoritz HuebnerPowerLaw prior does not check if prior minimum/maximum are valid```
---------------------------------------------------------------------------
ZeroDivisionError Traceback (most recent call last)
<ipython-input-58-1f15b00eece0> in <module>()
1 grid = np.linspace(0.1, 5, ...```
---------------------------------------------------------------------------
ZeroDivisionError Traceback (most recent call last)
<ipython-input-58-1f15b00eece0> in <module>()
1 grid = np.linspace(0.1, 5, 100)
----> 2 plt.plot(grid, p.prob(grid))
3 plt.xlabel('value')
4 plt.ylabel('probability')
5 plt.savefig('prior_1')
/usr/local/lib/python3.6/dist-packages/bilby/core/prior.py in prob(self, val)
1016 return np.nan_to_num(val ** self.alpha * (1 + self.alpha) /
1017 (self.maximum ** (1 + self.alpha) -
-> 1018 self.minimum ** (1 + self.alpha))) * self.is_in_prior_range(val)
1019
1020 def ln_prob(self, val):
ZeroDivisionError: 0.0 cannot be raised to a negative power
```
Here my `self.minimum` was 0. We should catch this earlier.FutureMoritz HuebnerVirginia d'EmilioMoritz Huebnerhttps://git.ligo.org/lscsoft/bilby/-/issues/400Add the waveforms check to the C.I.2020-07-21T11:12:24ZGregory Ashtongregory.ashton@ligo.orgAdd the waveforms check to the C.I.Part of the bilby review, suggested by @matthew-pitkin, was to do a check that the waveforms produced by the bilby waveform generator are "correct".
[Link to the review wiki page](https://git.ligo.org/lscsoft/bilby_pipe/wikis/O3-review/...Part of the bilby review, suggested by @matthew-pitkin, was to do a check that the waveforms produced by the bilby waveform generator are "correct".
[Link to the review wiki page](https://git.ligo.org/lscsoft/bilby_pipe/wikis/O3-review/analytic-waveforms)
In the review, we compared against pycbc and we had agreement that, for IMRPhenomPv2 and IMRPhenomD_NRT things where sufficiently good. However, Matt recommended we eventually move this test into the C.I. to make results robust against changes in the waveform. This issue has been created to track progress on this.FutureKHUN PHUKONKHUN PHUKONhttps://git.ligo.org/lscsoft/bilby/-/issues/396Issue when sampling using BasicGravitationalWaveTransient2019-08-20T00:56:27ZJonathan DaviesIssue when sampling using BasicGravitationalWaveTransientI'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 sho...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 <module>
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'FutureSylvia BiscoveanuSylvia Biscoveanuhttps://git.ligo.org/lscsoft/bilby/-/issues/393Error in the example of GW1708172019-08-20T10:14:38ZChristos KarathanasisError in the example of GW170817An error appears when running the example for GW170817 (https://git.ligo.org/lscsoft/bilby/blob/master/examples/open_data_examples/GW170817.py).
When running this I get the following error:
File "/nfs/pic.es/user/c/ckaratha/miniconda3/li...An error appears when running the example for GW170817 (https://git.ligo.org/lscsoft/bilby/blob/master/examples/open_data_examples/GW170817.py).
When running this I get the following error:
File "/nfs/pic.es/user/c/ckaratha/miniconda3/lib/python3.7/site-packages/bilby/gw/waveform_generator.py", line 218, in parameters
new_parameters.pop(key)
KeyError: 'tilt_1'
I included the following priors to fix this and other similar errors:
priors['a_1'] = bilby.core.prior.Uniform(name='a_1', minimum=0, maximum=0.05, boundary='reflective',latex_label='$a_1$')
priors['a_2'] = bilby.core.prior.Uniform(name='a_2', minimum=0, maximum=0.05, boundary='reflective',latex_label='$a_2$')
priors['tilt_1']=bilby.core.prior.Sine(name='tilt_1', boundary='reflective')
priors['tilt_2']=bilby.core.prior.Sine(name='tilt_2', boundary='reflective')
priors['phi_jl']=bilby.core.prior.Uniform(name='phi_jl', minimum=0, maximum=2 * np.pi, boundary='periodic')
priors['phi_12']=bilby.core.prior.Uniform(name='phi_12', minimum=0, maximum=2 * np.pi, boundary='periodic')
But then I get an other error:
Error in `python': free(): invalid pointer: 0x00007f0c958f8be8
The same error I also get when I change the prior file from binary_neutron_stars.prior to precessing_binary_neutron_stars.prior.FutureVirginia d'EmilioVirginia d'Emiliohttps://git.ligo.org/lscsoft/bilby/-/issues/365Define credible interval object2019-05-07T00:50:56ZGregory Ashtongregory.ashton@ligo.orgDefine credible interval objectIn !446 @sylvia.biscoveanu added a `confidence_interval` method. This is super useful and I can see lots of people making use of it. Before it becomes widely used (and hence we can't monkey around with it), it would be good to generalise...In !446 @sylvia.biscoveanu added a `confidence_interval` method. This is super useful and I can see lots of people making use of it. Before it becomes widely used (and hence we can't monkey around with it), it would be good to generalise it.
Ideally, we should have a `CredibelInterval` object which behaves as such
```python
>>> ci = CredibleInterval(data, level)
>>> print(ci.lower_absolute, ci.upper_absolute, ci.median, ci.lower_relative, ci.upper_relative)
```
such that `ci.lower_absolute` is the value of the lower C.I while `ci_lower_relative` would be the relative offset (not sure that naming convention is the best, but you get the idea hopefully).
It could also do neat things like
```python
>>> str(ci)
"10.2^{+0.2}_{-0.3}"
```Futurehttps://git.ligo.org/lscsoft/bilby/-/issues/335Fix equality check for Beta prior2019-04-26T03:40:25ZMoritz HuebnerFix equality check for Beta priorCurrently this does not work because of self._distCurrently this does not work because of self._distFuturehttps://git.ligo.org/lscsoft/bilby/-/issues/330Add cacheing of marginalized luminosity-distance lookup table2019-03-11T23:32:35ZMoritz HuebnerAdd cacheing of marginalized luminosity-distance lookup tableIf a user chooses the bilby default prior for luminosity distance, we could have the lookup table saved so that it can be just loaded in. I think it would be useful in some cases where people are interested to play around with their like...If a user chooses the bilby default prior for luminosity distance, we could have the lookup table saved so that it can be just loaded in. I think it would be useful in some cases where people are interested to play around with their likelihood but don't want to wait for the lookup table to be built each time.
EDIT: (Greg) I changed the title to describe the solution discussed in the comments belowFuturehttps://git.ligo.org/lscsoft/bilby/-/issues/318Add time marginalisation to the ROQ likelihood2019-06-25T04:01:21ZCarl-Johan HasterAdd time marginalisation to the ROQ likelihoodThis is primarily for the time marginalised likelihood.
Also check about other marginalised ROQ likelihoods (phase and distance as well)This is primarily for the time marginalised likelihood.
Also check about other marginalised ROQ likelihoods (phase and distance as well)FutureCarl-Johan HasterCarl-Johan Hasterhttps://git.ligo.org/lscsoft/bilby/-/issues/315Fake sampler for likelihood consistency check2019-03-21T10:24:55ZCarl-Johan HasterFake sampler for likelihood consistency checkImplement a "fake sampler" which reads in a set of parameters from a file, and then computes the likelihood for those paramters.
This would be a really useful consistency check between the ROQ and nonROQ likelihood functions, as well as ...Implement a "fake sampler" which reads in a set of parameters from a file, and then computes the likelihood for those paramters.
This would be a really useful consistency check between the ROQ and nonROQ likelihood functions, as well as an useful check for when the likelihood function is updated/appended (as, in order to accept a merge request to the likelihood function it needs to sufficiently reproduce the likelihood values from a fiducial set of parameter samples)FutureMichael PuerrerMichael Puerrerhttps://git.ligo.org/lscsoft/bilby/-/issues/310Nestle steps argument doesn't work2019-07-26T05:56:21ZRhys GreenNestle steps argument doesn't workIf using the method = 'classic' argument, there should be an option to set the number of mcmc steps between samples, this is currently not accepted by bilbyIf using the method = 'classic' argument, there should be an option to set the number of mcmc steps between samples, this is currently not accepted by bilbyFuturehttps://git.ligo.org/lscsoft/bilby/-/issues/304Organise the examples2019-08-20T00:56:44ZGregory Ashtongregory.ashton@ligo.orgOrganise the examplesWe need to organize the examples directory to
* Clearly indicate gw and non-gw examples
* Create a set of "core" examples differentiated from, perhaps, more specific examples
* Provide clear documentation (both a README in the directory...We need to organize the examples directory to
* Clearly indicate gw and non-gw examples
* Create a set of "core" examples differentiated from, perhaps, more specific examples
* Provide clear documentation (both a README in the directory and well described links from the docs)
* Take into consideration files that are referred to in the Bilby paper.FuturePaul EasterPaul Easterhttps://git.ligo.org/lscsoft/bilby/-/issues/303Add detecor frame sky-parametrization2019-06-25T03:51:09ZCarl-Johan HasterAdd detecor frame sky-parametrizationIt's convenient to sample in this parametrization of the sky-coordinates
This is implemented in `LALInference` in https://git.ligo.org/lscsoft/lalsuite/blob/master/lalinference/src/DetectorFixedSkyCoords.cIt's convenient to sample in this parametrization of the sky-coordinates
This is implemented in `LALInference` in https://git.ligo.org/lscsoft/lalsuite/blob/master/lalinference/src/DetectorFixedSkyCoords.cFutureJohn Douglas Veitchjohn.veitch@ligo.orgJohn Douglas Veitchjohn.veitch@ligo.orghttps://git.ligo.org/lscsoft/bilby/-/issues/302Add ability to inject NR waveforms2019-06-25T03:50:30ZCarl-Johan HasterAdd ability to inject NR waveformsPossibly preferably similar to the NR-injection infrastructure in LALSimulationPossibly preferably similar to the NR-injection infrastructure in LALSimulationFutureSerguei OssokineMichael PuerrerSerguei Ossokinehttps://git.ligo.org/lscsoft/bilby/-/issues/294Stopping conditions to produce N independent samples2019-06-25T04:04:59ZChristopher BerryStopping conditions to produce N independent samplesInvestigate how different samplers produce independent samples, so we can aim to produce a desired number of samples per runInvestigate how different samplers produce independent samples, so we can aim to produce a desired number of samples per runFutureChristopher BerryChristopher Berry