Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • 00:27
    nukenine edited #2777
  • 00:26
    nukenine opened #2777
  • Jan 16 06:33
    cicyby starred obspy/obspy
  • Jan 15 22:24
    scottstanie starred obspy/obspy
  • Jan 13 04:41
  • Jan 13 00:03
    dsentinel commented #2761
  • Jan 11 21:08
    chad-iris edited #2776
  • Jan 11 21:06
    chad-iris commented #2761
  • Jan 11 20:32
    chad-iris commented #2761
  • Jan 11 17:18
    dsentinel commented #2761
  • Jan 11 13:15
  • Jan 11 13:15
    limitswen starred obspy/obspy
  • Jan 11 01:53
    chad-iris commented #2761
  • Jan 11 01:10
    chad-iris opened #2776
  • Jan 10 09:43
    malikos180 commented #2767
  • Jan 08 15:46
    lsawade starred obspy/obspy
  • Jan 08 00:04
    JakovGlavac starred obspy/obspy
  • Jan 06 03:18
    lynlyf opened #2775
  • Jan 06 02:29
  • Jan 06 01:10
    tkoyama010 starred obspy/obspy
Thomas Lecocq
@ThomasLecocq

Hello,
I rotated the IRIS data component to R and T components , for the surface tomography, using both Obspy and SAC , but the output seems to be different . Is there anyway to find which one is wrong? or anyone I can consult here?

without a screenshot, an example etc... difficult to say. did you apply the same filters (if any), etc ?

@ecastillot nope, no idea, difficult from your explanation to understand what you expect, but I guess it's linked to the way the MassDownloader indexes the "already downloaded data", @krischer ?
vivigb
@vivigb
@ThomasLecocq I didn't apply the filter at all. I resampled all the files into 1Hz. Is there any way to share screenshots or attach images here?
Thomas Lecocq
@ThomasLecocq
yep, just copy paste
vivigb
@vivigb
New Microsoft Word Document.pdf
these are the result I got from both obspy and SAC.
Thomas Lecocq
@ThomasLecocq
SAC doesn't rename the components ?
I don't know SAC but did you follow all the commadns to set the orientations of the E and N sensors ? http://geophysics.eas.gatech.edu/classes/SAC/ --> Rotate a pair of data.
?
79seismo
@79seismo
@vivigb I have a feeling that you're doing something wrong with SAC. As @ThomasLecocq mentioned, your channel codes haven't changed after the rotation. SAC does change these codes. Are you using "rotate to GCP"?
vivigb
@vivigb
@ThomasLecocq @79seismo I think SAC won't rename the components when using the rotate command.
Please see this link
@79seismo yeah i am using " rotate to GCP"
brioglade
@brioglade_gitlab
from obspy.imaging.radpattern import plot_3drpattern
mt = [0.91, -0.89, -0.02, 1.78, -1.55, 0.47]
plot_3drpattern(mt,kind='p_sphere')

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'

hi,how can I fix it?
Elliott Sales de Andrade
@QuLogic
What is radpattern? There's no such thing in ObsPy
brioglade
@brioglade_gitlab
Elliott Sales de Andrade
@QuLogic
That is very old, and never released like that, which you can see in that PR
brioglade
@brioglade_gitlab
@QuLogic So what's the right way to write to do seismic source ridiation pattern?I am a new hand.Thank you very much.
What's the CMTSOLUTION file format to write?Do you have an example?Thank you.
Calum Chamberlain
@calum-chamberlain
This first thing that comes up when I google "obspy radiation plot" is this which is what appears to have been the merged change in PR #1192. It looks like you might want to check that page of the obspy docs out and see if that is what you want.
Calum Chamberlain
@calum-chamberlain

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.

Calum Chamberlain
@calum-chamberlain
I didn't know about this though - they look like really cool plots!
brioglade
@brioglade_gitlab
@calum-chamberlain Thank you very much!
79seismo
@79seismo
@vivigb yes, you are right, KCMPNM has to be changed manually. However, you should read in only the horizontal components for rotate to GCP. The fact that your Z is also changing after the rotation suggests that you're doing something additional to rotating? Rotate to GCP is only a horizontal operation.
Emmanuel D. Castillo Taborda
@ecastillot

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

Calum Chamberlain
@calum-chamberlain
Kia Ora, this is the same as obspy/obspy#2547 - the solution then was to use pip and restart the run-time. I don't know if simply restarting the run-time is enough with conda installs, but it is worth a try.
Emmanuel D. Castillo Taborda
@ecastillot
@calum-chamberlain Regards,
I usually use this solution for pip. However, with conda installs are not the same. The error persists.
Thomas Lecocq
@ThomasLecocq
you have to restart the runtime/kernel
the install is likely correct, but obspy doens't find the 'entry points' (=all format readers are defined via entry points) if the kernels are not restarted
Emmanuel D. Castillo Taborda
@ecastillot
@ThomasLecocq have you tried it with conda? Just like I told to @calum-chamberlain , this solution is ok for pip. However, when I restart the kernel after the conda installation, nothing happens.
Thomas Lecocq
@ThomasLecocq
I never used google collab. but it shouldn't be different (and I didn't understand from your answer that it actually worked for you)
and are you working in the right env ?
Emmanuel D. Castillo Taborda
@ecastillot
Yes, I'm agree with you, it shouldn't be different. For this reason I don't understand what is the mistake... I guess that I am working in the right env because
as you can see in the link that I posted, obspy is well imported.
Thomas Lecocq
@ThomasLecocq
So when you restart the kernel, do you actually reinit the conda env? Could you deactivate and activate, evne if it is the base env?
uky-jps
@uky-jps
MLMC.20200928T0000-20200928T0059.spectrogram.png
I am creating 1x3 plots with each component (1,2,Z) hour long spectrograms using Obspy, but I am creating each hour long plot to be compared to other hour long plots. I want to set the cmap scale to be based on a min/max value that I hard code as opposed to the "clip=[0.0-1.0]" scaled option that is currently available, because that "clip" for the cmapping range is based on the min/max values calculated from that hour specifically (as far as I can tell). Is there a way with Trace.spectrogram() that I can set the values that cmap is based on, as opposed to the min/max from the current hour? any help here is appreciated! ( https://docs.obspy.org/packages/autogen/obspy.imaging.spectrogram.spectrogram.html ). As an aside, here is a current example of my plot. above.
my current code that plots one of these individual spectrograms looks like
stm[ii].spectrogram(show=False, axes=ax[ii], clip=[0.35, 0.95], dbscale=True, cmap='jet')
Emmanuel D. Castillo Taborda
@ecastillot

@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:

  • bash
  • fish
  • tcsh
  • xonsh
  • zsh
  • powershell

See 'conda init --help' for more information and options.

IMPORTANT: You may need to close and restart your shell after running 'conda init'."

Emmanuel D. Castillo Taborda
@ecastillot
For now I am satisfied with the solution that I showed. If someone finds a better way that would be great!
Thomas Lecocq
@ThomasLecocq
Top!!??
Top!!!
Tobias Megies
@megies

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

Thomas Lecocq
@ThomasLecocq
Trueeeeeee
Thomas Lecocq
@ThomasLecocq
did some loading time tests in #2748 ; I initially thought that the matplotlib stack was the culprit, but it's interesting to see that it's not !
vivigb
@vivigb
Hi ,everyone
Me again with the doubts related to obspy rotate command.
Why I can't rotate the files with component names such as BH1 & BH2 ? it seems like there is no change after using rotate command on such files!! Also there is no change in component's name after applying rotation!
Thomas Lecocq
@ThomasLecocq
did you apply the changes (1,2,etc) shown in the doc ?https://docs.obspy.org/packages/autogen/obspy.core.stream.Stream.rotate.html
Tobias Megies
@megies
it will get passed down from your stream.rotate() call