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(moment_rate) #128

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

plotting issue(moment_rate) #128

mohammadrezarezazadeh opened this issue May 6, 2024 · 7 comments

Comments

@mohammadrezarezazadeh
Copy link

mohammadrezarezazadeh commented May 6, 2024

hi. after summarizing tried to plot the moment_rate but an error came up which implied that the plot is existed, but it is not. i checked the figures directory it's not there. i used -- force but the error still exists. appreciate any help.
that's the log:
2024-04-27 19:33:57,018 - seismic - INFO - Fault(s) discretized to 2.0 [km] patches.
2024-04-27 19:33:57,018 - config - INFO - not solving for utens, got fixed at 0.0
2024-04-27 19:33:57,018 - models - INFO - Using "none" regularization ...
2024-04-27 19:33:57,019 - backend - INFO - Loading multitrace from /home/x_301025/project/HojedkEQ/ffi/stage_-1
2024-04-27 19:33:57,711 - plotting.ffi - INFO - Drawing ensemble of 0 moment rate functions ...
2024-04-27 19:33:57,711 - plotting.ffi - INFO - Drawing total rates ...
2024-04-27 19:33:57,712 - plotting.ffi - INFO - Fault 1 / 1
2024-04-27 19:33:57,823 - beat - WARNING - Could not plot moment_rate got Error: plot_exists() missing 1 required positional argument: 'force'
Traceback (most recent call last):
File "/home/x_301025/src/miniconda/envs/beatenv/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/beatenv/lib/python3.11/site-packages/beat/plotting/ffi.py", line 148, in draw_moment_rate
if plot_exists(outpath, po.force):
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: plot_exists() missing 1 required positional argument: 'force'

@hvasbath
Copy link
Owner

hvasbath commented May 7, 2024

Thanks for reporting! There is a bug in the code I/someone/you will need to fix. There is a missing input argument to the plot_exists function, the outputformat is missing.

@mohammadrezarezazadeh
Copy link
Author

thanks, i'll try to fix it

@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. previous error does not exist. but there is a new error due to fixed nucleation dip.
here is the log:
(beatenv3.11) [x_301025@localhost project]$ beat plot HojedkEQ/ moment_rate --mode=ffi
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 Drawing ensemble of 0 moment rate functions ...
plotting.ffi - INFO Drawing total rates ...
plotting.ffi - INFO Fault 1 / 1
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 141, in draw_moment_rate
ref_mrf_rates, ref_mrf_times = fault.get_moment_rate_function(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/x_301025/src/miniconda/envs/beatenv3.11/lib/python3.11/site-packages/beat/ffi/fault.py", line 454, in get_moment_rate_function
rates, times = self.get_subfault_moment_rate_function(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/x_301025/src/miniconda/envs/beatenv3.11/lib/python3.11/site-packages/beat/ffi/fault.py", line 413, in get_subfault_moment_rate_function
starttimes = self.point2starttimes(point, index=index).ravel()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
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

Same here, will be able to replicate once you provided the setup from the other issue.

@mohammadrezarezazadeh
Copy link
Author

data.zip
provided

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