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 -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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file seiscod-3.3.9-py3-none-any.whl.
File metadata
- Download URL: seiscod-3.3.9-py3-none-any.whl
- Upload date:
- Size: 93.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.9.23
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c84344056d647c5fe168c32a32ea8aefe2dcab93c5dca7761dd1524ed34b5369
|
|
| MD5 |
a689a1db9c67b6fdca02308795fb83ab
|
|
| BLAKE2b-256 |
83efbb80473754cb3bf62878a4f423cf7a23e0a283a0aa7ecc4c20456867ba9d
|