Skip to content

mcmc failing to run #59

@SquirrelKnight

Description

@SquirrelKnight

Please fill in the following details as much as possible when submitting your issue as this will help with testing and reproducing the issue

Environment Information

{
"version": "1.0.5",
"c_extensions present": [
"cmarkov_chain_monte_carlo",
"cprobability",
"cmoment_tensor_conversion",
"cscatangle"
],
"platform": "darwin",
"num_threads": 8,
"python version": "3.7.1 (default, Dec 14 2018, 13:28:58) \n[Clang 4.0.1 (tags/RELEASE_401/final)]",
"python version info": [
3,
7,
1,
"final",
0
],
"dependency info": {
"numpy": "1.15.4",
"scipy": "1.1.0",
"matplotlib": "3.0.2",
"cython": "0.29.2",
"sphinx": "1.8.2",
"h5py": "2.8.0"
}
}

What error you are getting

Warning: divide by zero encountered in log
Cython Error
Traceback (most recent call last):
File "/Users/jesse/anaconda3/lib/python3.7/site-packages/MTfit/algorithms/markov_chain_monte_carlo.py", line 1582, in _acceptance_check
dc_prior=getattr(self, 'dc_prior', 0.))
TypeError: Argument 'x' has incorrect type (expected list, got dict)

What behaviour you would expect

This causes the program to stop, should be performing an McMC inversion. The regular 'iterate' algorithm works fine.

Reproduction steps

Run an McMC inversion using the following parameters:

algorithm = 'mcmc'
dc = False
parallel = False
phys_mem = 1
output_format = 'pickle'
conversion = False
inversion_options = ['PPolarity','P/SHAmplitudeRatio']
burn_length = 30000
chain_length = 100000
min_acceptance_rate = 0.1
max_acceptance_rate = 0.3

inversion_object = Inversion(event,algorithm=algorithm, dc=dc,parallel=parallel,phys_mem=phys_mem,convert=conversion,output_format=output_format, inversion_options=inversion_options, burn_length=burn_length,chain_length=chain_length, min_acceptance_rate=min_acceptance_rate,max_acceptance_rate=max_acceptance_rate)

inversion_object.forward()

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions