ModuleNotFoundError Traceback (most recent call last)
<ipython-input-2-4718903f829c> in <module>
1 import obspy
----> 2 from obspy.imaging.radpattern import plot_3drpattern
3 mt = [0.91, -0.89, -0.02, 1.78, -1.55, 0.47]
4 plot_3drpattern(mt,kind='p_sphere')
ModuleNotFoundError: No module named 'obspy.imaging.radpattern'
For your second question, CMTSOLUTION
is a standard format that looks like this.
However, the Event.plot()
with defaults to kind=('beachball', 'p_sphere', 's_sphere')
calls the obspy.imaging.source.plot_radiation_pattern
under the hood, which if you have the moment-tensor and no Event
might be simpler to call.
Good moorning!
I tried to install obspy with miniconda in google collab. Apparently, it was installed ok. However, when I wanted to use ' obspy.read() ' appears this error: 'TypeError: Unknown format for file /usr/local/lib/python3.6/site-packages/obspy/core/data/BW_RJOB.xml'
can you help me please? Maybe obspy can't be installed with conda in google collab? When I installed with pip, it does his job ok. But for certain reasons I need to install it with conda.
In the next link, you can see the collab notebook that I'm using:
https://colab.research.google.com/drive/1eXNROuqsYeWjHqEyCbIDbZFlgSlPKNMS?usp=sharing
@ThomasLecocq Thanks a lot!, with your comment I could recognize that if I restart the kernel, collab doesn't reinit the conda env.
With this help https://datascience.stackexchange.com/questions/75948/how-to-setup-and-run-conda-on-google-colab . I could find the way to correct it, but only it's ok if I run all my python code in one cell, you can see the way in the next link: https://github.com/ecastillot/notebooks/blob/master/test_obspy_condainstall.ipynb
Due to run all my python notebook code in one cell is uncomfortable, then I tried to type "!conda deactivate" or "!conda activate" for deactivate or activate the env . However, this error appears :
"CommandNotFoundError: Your shell has not been properly configured to use 'conda deactivate'.
To initialize your shell, run
$ conda init <SHELL_NAME>
Currently supported shells are:
See 'conda init --help' for more information and options.
IMPORTANT: You may need to close and restart your shell after running 'conda init'."
generic question related to "best practice": how far away from each other could you have two sensors sharing net+sta , but not loc ids ? I imagine on a field with up to 100m apart, logged on a single unit? or borehole strings with different sensors at different depths ?
I think SEED manual says something about it, pretty sure officially its less than 100m, more like 20m or something, but personally I wouldnt be too picky, most important what fits your workflow
stream.rotate()
call
->ZNE
first, which will solely rely on the sensor orientation specified in your Inventory. Your Traces should then be rotated and relabled to ZNE
. Then do a second rotate call with NE->RT
, specifying the back azimuth.