-
Notifications
You must be signed in to change notification settings - Fork 42
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
AttributeError: 'numpy.ndarray' object has no attribute 'tmin' #113
Comments
Dear Eugenia, this error is really puzzling. Apparently, at least some of your observed traces are numpy arrays instead of pyrocko.trace.Trace objects. You can try loading your seismic_data.pkl through beat.utility.load_objects("seismic_data.pkl"). Please inspect your traces there and make sure that they are all in the correct format. Although, if that wasnt the case there should have been an error earlier in the loading, which is why it is puzzling... Hannes |
Hi Hannes, I checked my traces and they are all a beat.heart.SeismicDataset object. The stranger thing is that I used the same seismic_data.pkl for the geometry mode and I didn't have this error... |
Thanks for checking again! I think I found the issue. Now I still do not understand why it still works in my test-case. I will keep you updated. Today evening I will have time to run more checks. |
Dear Eugenia, |
Thanks for help!! |
Hi Hannes, Finally the problem is solved using the new branch!!! Thank you very much!!! |
Thats good news! Thanks for testing! So I will collect few other changes for a new release. |
New release 1.2.3 is out where this is fixed. Closing. |
**Hi,
I'm trying to do the kinematic model of an event with M = 5.5, using local data. For the goemetry mode i didn't have any problem to plot waveform fits.
When the ffi mode was finished and then I'm going to plot the waveform fits I have this error:**
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/locchi/events/FFI_CAMPOTOSTO/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: 30
seismic - INFO Fault(s) discretized to 1.0 [km] patches.
seismic - INFO Preparing data of "any_P_0" for optimization
heart - INFO Did not find custom arrival times.
heart - INFO Using theoretical arrival times for "any_P_0"
models - INFO Using "none" regularization ...
plotting.seismic - INFO Drawing Waveform fits ...
backend - INFO Loading multitrace from /home/locchi/events/FFI_CAMPOTOSTO/ffi/stage_-1
plotting.seismic - INFO FFI waveform fit, using reference source ...
seismic - INFO Loading SeismicGFLibrary seismic_uparr_any_P_0_0
seismic - INFO Loading SeismicGFLibrary seismic_uperp_any_P_0_0
Traceback (most recent call last):
File "/home/locchi/anaconda3/envs/beat/bin/beat", line 8, in
sys.exit(main())
File "/home/locchi/anaconda3/envs/beat/lib/python3.9/site-packages/beat/apps/beat.py", line 2396, in main
globals()"command_" + command
File "/home/locchi/anaconda3/envs/beat/lib/python3.9/site-packages/beat/apps/beat.py", line 1910, in command_plot
plotting.plots_catalog[plot](problem, po)
File "/home/locchi/anaconda3/envs/beat/lib/python3.9/site-packages/beat/plotting/seismic.py", line 1114, in draw_seismic_fits
event_figs = seismic_fits(problem, stage, po)
File "/home/locchi/anaconda3/envs/beat/lib/python3.9/site-packages/beat/plotting/seismic.py", line 719, in seismic_fits
bresults = composite.assemble_results(
File "/home/locchi/anaconda3/envs/beat/lib/python3.9/site-packages/beat/models/seismic.py", line 482, in assemble_results
taper = at.get_pyrocko_taper(float(obs_tr.tmin - at.a))
AttributeError: 'numpy.ndarray' object has no attribute 'tmin'
**The seismic data are the same of geometry mode, with same taper but different filter!!
How can I fix this error??
Could it be an error due to numpy or pyrocko?
I have numpy 1.22.4, numpy-base 1.21.5, pyrocko 2022.06.10
Thanks**
The text was updated successfully, but these errors were encountered: