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.7-py3-none-any.whl (101.9 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for seiscod-3.3.7-py3-none-any.whl
Algorithm Hash digest
SHA256 ce3b1a72f5f32898a36a9ffb11581b8461def342751a2e8c1d8817ac13197b29
MD5 26900bd26bf422c59e2ef4cfa3f3ed73
BLAKE2b-256 9c44654c5d521fff307dd8514f08549f02739547b00b07995dec338137036f62

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