hvasbath / beat

Bayesian Earthquake Analysis Tool
GNU General Public License v3.0
133 stars 43 forks source link

Error in beat import nsources > 1 #132

Closed hvasbath closed 1 month ago

hvasbath commented 1 month ago

beat import WCF_8f_1sc_LVM_FM --results=WCF_8f_1sc_LVM --import_from_mode=geometry --loglevel=debug
and I get this error: beat         - INFO     Importing non-linear source geometry results!
Traceback (most recent call last):
  File "/home/renierlgv/Common_bin/beat_rye/.venv/bin/beat", line 8, in <module>
    sys.exit(main())
             ^^^^^^
  File "/home/renierlgv/Common_bin/beat_rye/.venv/lib/python3.11/site-packages/beat/apps/beat.py", line 2442, in main
    globals()["command_" + command](args)
  File "/home/renierlgv/Common_bin/beat_rye/.venv/lib/python3.11/site-packages/beat/apps/beat.py", line 747, in command_import
    new_bounds[param] = extract_bounds_from_summary(
                        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/renierlgv/Common_bin/beat_rye/.venv/lib/python3.11/site-packages/beat/backend.py", line 1377, in extract_bounds_from_summary
    indexes = _create_flat_names_summary(varname, shape)
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/renierlgv/Common_bin/beat_rye/.venv/lib/python3.11/site-packages/beat/backend.py", line 84, in _create_flat_names_summary
    if not shape or sum(shape) == 1:
                    ^^^^^^^^^^
TypeError: unsupported operand type(s) for +: 'int' and 'list'
``
hvasbath commented 1 month ago

I cannot reproduce with n_sources=2. Need more information.

hvasbath commented 1 month ago

Also cannot reproduce with setup provided by user reporting the issue.