bilby-dev / bilby

A unified framework for stochastic sampling packages and gravitational-wave inference in Python.
https://bilby-dev.github.io/bilby/
MIT License
64 stars 72 forks source link

Trouble running eccentric_inspiral.py example #245

Closed bilby-bot closed 1 month ago

bilby-bot commented 6 years ago

In GitLab by @git.ligo:thomas-callister on Sep 17, 2018, 21:51

Hi tupak folks,

I've been playing with the various examples in the .../injection_examples/ folder and am running into some trouble when running eccentric_inspiral.py. Looks like there's a call to pymultinest.solve() that's causing the trouble. Here's my traceback:

13:43 tupak INFO : Using sampler Pymultinest with kwargs {'importance_nested_sampling': False, 'verbose': True, 'resume': True, 'sampling_efficiency': 'parameter', 'outputfiles_basename': 'outdir_multinest/pymultinest_eccentric_GW140914/', 'n_live_points': 1000}

Traceback (most recent call last):

File "eccentric_inspiral_multinest.py", line 82, in outdir=outdir, label=label)

File "/home/thomas.callister/virtualEnvs/tupak/lib/python2.7/site-packages/tupak-0.2.1-py2.7.egg/tupak/core/sampler.py", line 1031, in run_sampler result = sampler._run_external_sampler()

File "/home/thomas.callister/virtualEnvs/tupak/lib/python2.7/site-packages/tupak-0.2.1-py2.7.egg/tupak/core/sampler.py", line 798, in _run_external_sampler out = pymultinest.solve(

AttributeError: 'module' object has no attribute 'solve'

There is, of course, a very decent chance that I'm doing something wrong on my end.

Thanks! Tom

bilby-bot commented 6 years ago

In GitLab by @git.ligo:gregory.ashton on Sep 18, 2018, 10:05

Hi Tom,

Thanks for giving this a go. My immediate guess would be that the version of pymultinest you are using differs from whichever version we used when developing. It works on my machine, which has pymutlinest v2.6 installed. What version are you using [1]?

You could simply change the sampler (replace sampler="pymultinest" with sampler="dynesty").

[1] FYI you can see the version information by calling $ pip show pymultinest if you installed it from pip.

Cheers,

Greg

bilby-bot commented 6 years ago

In GitLab by @git.ligo:thomas-callister on Sep 18, 2018, 17:00

Hi Greg,

This was indeed the issue! I was using pymultinest v1.6. Updating my pymultinest installation to v2.6 fixed things. Thanks a lot!

Best, Tom

bilby-bot commented 6 years ago

In GitLab by @git.ligo:thomas-callister on Sep 18, 2018, 17:00

closed

bilby-bot commented 1 month ago

In GitLab by @git.ligo:michael.williams on Oct 3, 2024, 17:56

unassigned @git.ligo:gregory.ashton