Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

plotting issue(slip_distribution) #127

Open
mohammadrezarezazadeh opened this issue May 6, 2024 · 8 comments
Open

plotting issue(slip_distribution) #127

mohammadrezarezazadeh opened this issue May 6, 2024 · 8 comments

Comments

@mohammadrezarezazadeh
Copy link

hi. i intended to plot slip distribution but the keyError: 'nucleation_dip' came up. appreciate any hint.
that's the log:
(beat) [x_301025@localhost project]$ beat plot HojedkEQ/ slip_distribution --mode=ffi --nensemble=100
To enable 'bem' mode packages 'pygmsh' and 'cutde' need to be installed.
beat - INFO Loading problem ...
config - INFO All hierarchicals ok!
config - INFO All hyperparameters ok!
config - INFO All priors ok!
models - INFO ... Initialising Distribution Optimizer ...

models - INFO Analysing problem ...
models - INFO ---------------------

seismic - INFO Loading seismic data for event 0 from: /home/x_301025/project/HojedkEQ/seismic_data.pkl
seismic - INFO Initialising seismic wavemap for "any_P" ...
heart - INFO Consistent number of datasets and targets in any_P_0 wavemap!
heart - INFO Number of seismic datasets for wavemap: any_P_0: 39

seismic - INFO Fault(s) discretized to 2.0 [km] patches.
config - INFO not solving for nucleation_dip, got fixed at 7.4
config - INFO not solving for time, got fixed at -2.9389
config - INFO not solving for utens, got fixed at 0.0
models - INFO Using "none" regularization ...
backend - INFO Loading multitrace from /home/x_301025/project/HojedkEQ/ffi/stage_-1
plotting.ffi - INFO Rendering rupture fronts ...
0%| | 0/100 [00:00<?, ?it/s]
Traceback (most recent call last):
File "/home/x_301025/src/miniconda/envs/beat/bin/beat", line 8, in
sys.exit(main())
File "/home/x_301025/src/miniconda/envs/beat/lib/python3.10/site-packages/beat/apps/beat.py", line 2442, in main
globals()"command_" + command
File "/home/x_301025/src/miniconda/envs/beat/lib/python3.10/site-packages/beat/apps/beat.py", line 1958, in command_plot
plotting.plots_catalog[plot](problem, po)
File "/home/x_301025/src/miniconda/envs/beat/lib/python3.10/site-packages/beat/plotting/ffi.py", line 803, in draw_slip_dist
figs, axs = fault_slip_distribution(
File "/home/x_301025/src/miniconda/envs/beat/lib/python3.10/site-packages/beat/plotting/ffi.py", line 604, in fault_slip_distribution
sts = fault.point2starttimes(point, index=ns)
File "/home/x_301025/src/miniconda/envs/beat/lib/python3.10/site-packages/beat/ffi/fault.py", line 619, in point2starttimes
nuc_dip = point["nucleation_dip"][index]
KeyError: 'nucleation_dip'

@mohammadrezarezazadeh
Copy link
Author

is it possible that the error is due to fixed time in the priors? i'll sample the space soultion with an unfixed time prior.

@hvasbath
Copy link
Owner

hvasbath commented May 7, 2024

It is due to fixed nucleation dip, but thats sth I need to fix in the code. I am sorry for that! However, I wont be able to do that until 20.5. i am in the mountains.

@mohammadrezarezazadeh
Copy link
Author

It is due to fixed nucleation dip, but thats sth I need to fix in the code. I am sorry for that! However, I wont be able to do that until 20.5. i am in the mountains.

thanks

@hvasbath
Copy link
Owner

Thanks for reporting! I fixed it on the current master branch. Please update your local installation with the master branch and report back if it works for you now. If not please again report the error- locally it is working here.

@hvasbath hvasbath reopened this May 18, 2024
@mohammadrezarezazadeh
Copy link
Author

thanks. i'll test it today and notify you whether it works correctly or not.

@mohammadrezarezazadeh
Copy link
Author

hello again. unfortunatelly the error still exists.
here is the log:
(beatenv3.11) [x_301025@localhost project]$ beat plot HojedkEQ/ slip_distribution --mode=ffi --nensemble=100
To enable 'bem' mode packages 'pygmsh' and 'cutde' need to be installed.
beat - INFO Loading problem ...
config - INFO All hierarchicals ok!
config - INFO All hyperparameters ok!
config - INFO All priors ok!
models - INFO ... Initialising Distribution Optimizer ...

models - INFO Analysing problem ...
models - INFO ---------------------

seismic - INFO Loading seismic data for event 0 from: /home/x_301025/project/HojedkEQ/seismic_data.pkl
seismic - INFO Initialising seismic wavemap for "any_P" ...
heart - INFO Consistent number of datasets and targets in any_P_0 wavemap!
heart - INFO Number of seismic datasets for wavemap: any_P_0: 39

seismic - INFO Fault(s) discretized to 2.0 [km] patches.
config - INFO not solving for nucleation_dip, got fixed at 7.4
config - INFO not solving for time, got fixed at -2.9389
config - INFO not solving for utens, got fixed at 0.0
models - INFO Using "none" regularization ...
backend - INFO Loading multitrace from /home/x_301025/project/HojedkEQ/ffi/stage_-1
plotting.ffi - INFO Rendering rupture fronts ...
0%| | 0/100 [00:00<?, ?it/s]
Traceback (most recent call last):
File "/home/x_301025/src/miniconda/envs/beatenv3.11/bin/beat", line 8, in
sys.exit(main())
^^^^^^
File "/home/x_301025/src/miniconda/envs/beatenv3.11/lib/python3.11/site-packages/beat/apps/beat.py", line 2442, in main
globals()"command_" + command
File "/home/x_301025/src/miniconda/envs/beatenv3.11/lib/python3.11/site-packages/beat/apps/beat.py", line 1958, in command_plot
plotting.plots_catalog[plot](problem, po)
File "/home/x_301025/src/miniconda/envs/beatenv3.11/lib/python3.11/site-packages/beat/plotting/ffi.py", line 803, in draw_slip_dist
figs, axs = fault_slip_distribution(
^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/x_301025/src/miniconda/envs/beatenv3.11/lib/python3.11/site-packages/beat/plotting/ffi.py", line 604, in fault_slip_distribution
sts = fault.point2starttimes(point, index=ns)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/x_301025/src/miniconda/envs/beatenv3.11/lib/python3.11/site-packages/beat/ffi/fault.py", line 619, in point2starttimes
nuc_dip = point["nucleation_dip"][index]
~~~~~^^^^^^^^^^^^^^^^^^
KeyError: 'nucleation_dip

@hvasbath
Copy link
Owner

hvasbath commented May 21, 2024

I need your setup to replicate. Please provide the config_ffi. Thanks!

@mohammadrezarezazadeh
Copy link
Author

data.zip
provided. sorry about the delay

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants