beat icon indicating copy to clipboard operation
beat copied to clipboard

plotting issue(slip_distribution)

Open mohammadrezarezazadeh opened this issue 1 year ago • 8 comments

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 avatar May 06 '24 14:05 mohammadrezarezazadeh

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.

mohammadrezarezazadeh avatar May 06 '24 20:05 mohammadrezarezazadeh

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.

hvasbath avatar May 07 '24 19:05 hvasbath

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

mohammadrezarezazadeh avatar May 08 '24 18:05 mohammadrezarezazadeh

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 avatar May 18 '24 20:05 hvasbath

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

mohammadrezarezazadeh avatar May 19 '24 09:05 mohammadrezarezazadeh

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

mohammadrezarezazadeh avatar May 21 '24 13:05 mohammadrezarezazadeh

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

hvasbath avatar May 21 '24 16:05 hvasbath

data.zip provided. sorry about the delay

mohammadrezarezazadeh avatar May 25 '24 18:05 mohammadrezarezazadeh