Skip to main content

No project description provided

Project description

SEISCOD

Tools to manage seismic traces

  • Store, filter, manipulate seismic waveforms
  • Visualise array data based on matplotlib collections
  • Save and load seismic data using numpy npz format (system independent)
  • No dependency to obspy, although conversion from obspy is handled

This program was originally named seispy, renamed to seiscod
because the name was already used.

Install with anaconda3

Change the current directory to the installation path

cd ./to/installation/path

Now get the seiscod package from gitlab

git clone https://gitlab.com/mlehujeur/seiscod.git

Ceate a dedicated conda environment, and install seiscod in it

conda create --name seiscodenv python=3.9 --yes
conda activate seiscodenv

cd seiscod
python -m pip install lib/*.whl
python -m pip install -e .

Optional dependencies
obspy is not a dependency of this package (and I don't want it to be!!)
but might be used in some optional functions

conda config --add channels conda-forge  # ignore the warning if any
conda install obspy

Test

viz -m 1 -d -ns ./seiscod/readwrite/filesamples/segdfile.segd

How to ...

Create a stream of traces from scratch, and display it

from seiscod import *

# create an empty stream object
st = Stream()

# append traces to it
for i in range(12):
    # generate a waveform array (whatever)
    data_array = np.zeros(256, float)
    data_array[5 * i + 30] = 1.0
    
    # create the trace object
    tr = Trace(
        seedid=f"trace#{i}", # name of the trace
        starttime=0.,  # time of first sample
        delta=0.000001,  # sampling interv in sec
        data=data_array)  # numpy.ndarray, 1d
    
    # process it (methods can be queued as follow)
    tr.detrend().taperwidth(width=10e-6)
    tr.gaussbandpass(freq0=100000., alpha=5.0)
    
    # add it to the current stream
    st.append(tr)

fig = plt.figure(figsize=(12, 6))
axt = plt.subplot(121, xlabel="time")
axf = plt.subplot(122, xlabel="frequency", sharey=axt)

# colormap display
st.shade(ax=axt, 
        powergain=0.8,
        cmap=plt.get_cmap('gray'),
        seedticks=True,  # display trace names
        timeticks=False,  # True for calendar data
        )

# wiggle display (on top of it)
st.show(ax=axt, 
        facealpha=0.5,
        facecolor="br",
        seedticks=True,  # display trace names
        timeticks=False,  # True for calendar data
        )
microtimetick(axt)

# display in Fourier domain
st.fft()
st.show(axf, 
        facealpha=0.5,
        facecolor="br",
        seedticks=True,  # display trace names
        timeticks=False,  # True for calendar data
        )

plt.show()

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

seiscod-3.3.3-py3-none-any.whl (98.8 kB view details)

Uploaded Python 3

File details

Details for the file seiscod-3.3.3-py3-none-any.whl.

File metadata

  • Download URL: seiscod-3.3.3-py3-none-any.whl
  • Upload date:
  • Size: 98.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.9.19

File hashes

Hashes for seiscod-3.3.3-py3-none-any.whl
Algorithm Hash digest
SHA256 93e4db1c661d5fa023ca9658eb048aecde7a02c75fd5a81ae727ce0e1c907f6d
MD5 e9bf50c69794452a0348a5cbc8a953a8
BLAKE2b-256 5e9230a41f3f39028e40d69dd65ec5c2e751f3af6504edb1ab2d2e7a2f0170bc

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page