A Python package to format seismic data
Project description
format_seismo
format_seismo is a package for preprocessing seismological data. It utilizes functions from theobspy 1 and numpy 2 libraries.
Instalation
Install from PyPI:
pip install format_seizmo
Import
Import the format_seismo library in python code:
import format_seismo as fs
Functions
solohr
Formats seismological data gathered by a SmartSolo portable seismograph into an hourly time-step format.
SmartSolo instruments store seismological data in MiniSEED format (.mseed extension).
Call the function solohr() with the following arguments:
fs.solohr(IN_path, OUT_path=None, station_code='CODE', station_net='NET', language='cro', silent=False)
-
IN_path:Path to a folder containing all .mseed files of a single smartsolo station. -
OUT_path:(Optional) Path to the folder where formatted .mseed files will be saved. If set toNone(default value), output will be stored in a newly created subdirectory/hourly_formatted_datainsideIN_path. -
station_code:(Optional) Deault is'CODE'. Used in the filename and metadata of the formatted .mseed files. -
staton_net:(Optional) Default is'NET'. Used in metadata of the formatted .mseed files. -
language:(optional) Default is'cro'(Croatian). Language used in naming folders in the output path. Supported languages are:deuGermanspaSpanishfraFrenchzhoChinese (Simplified)engEnglish
-
silent:(optional) If set to True, suppresses terminal output. Default is False.
Note
This function processes data for one station at a time.
If you have multiple stations, wrap this function in a loop.
Example
Importing and calling the solohr() function:
import format_seismo as fs
fs.solohr('/mnt/raw_solo_data', '/mnt/formatted_solo_data', station_code='STAT', station_net='NET', language='eng')
Part of the function output:
UserWarning: Warning: Default network code 'NET' is used. Please provide a valid network code.
Working on station: STAT, network: NET, component: Z
Directory mnt/formatted_solo_data/year_2025/month_07/day_04/hour_17 created.
Formatted file stat_z_250_20250704_1700.mseed
Directory mnt/formatted_solo_data/year_2025/month_07/day_04/hour_18 created.
Formatted file stat_z_250_20250704_1800.mseed
Directory mnt/formatted_solo_data/year_2025/month_07/day_04/hour_19 created.
Formatted file stat_z_250_20250704_1900.mseed
Directory mnt/formatted_solo_data/year_2025/month_07/day_04/hour_20 created.
Formatted file stat_z_250_20250704_2000.mseed
Directory mnt/formatted_solo_data/year_2025/month_07/day_04/hour_21 created.
Formatted file stat_z_250_20250704_2100.mseed
...
Part of the output directory tree:
user@DESKTOP:/mnt/formatted_solo_data$ tree
.
└── year_2025
└── month_07
├── day_04
│ ├── hour_17
│ │ ├── stat_e_250_20250704_1700.mseed
│ │ ├── stat_n_250_20250704_1700.mseed
│ │ └── stat_z_250_20250704_1700.mseed
│ ├── hour_18
│ │ ├── stat_e_250_20250704_1800.mseed
│ │ ├── stat_n_250_20250704_1800.mseed
│ │ └── stat_z_250_20250704_1800.mseed
│ ├── hour_19
│ │ ├── stat_e_250_20250704_1900.mseed
│ │ ├── stat_n_250_20250704_1900.mseed
│ │ └── stat_z_250_20250704_1900.mseed
│ ├── hour_20
│ │ ├── stat_e_250_20250704_2000.mseed
│ │ ├── stat_n_250_20250704_2000.mseed
│ │ └── stat_z_250_20250704_2000.mseed
│ ├── hour_21
│ │ ├── stat_e_250_20250704_2100.mseed
│ │ ├── stat_n_250_20250704_2100.mseed
│ │ └── stat_z_250_20250704_2100.mseed
│ ├── hour_22
│ │ ├── stat_e_250_20250704_2200.mseed
│ │ ├── stat_n_250_20250704_2200.mseed
│ │ └── stat_z_250_20250704_2200.mseed
│ └── hour_23
│ ├── stat_e_250_20250704_2300.mseed
│ ├── stat_n_250_20250704_2300.mseed
│ └── stat_z_250_20250704_2300.mseed
├── day_05
│ ├── hour_00
│ │ ├── stat_e_250_20250705_0000.mseed
│ │ ├── stat_n_250_20250705_0000.mseed
│ │ └── stat_z_250_20250705_0000.mseed
...
References
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
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 format_seismo-0.1.0.tar.gz.
File metadata
- Download URL: format_seismo-0.1.0.tar.gz
- Upload date:
- Size: 7.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2dabf48bed6c05716f8e94ea53d43f6e9c8022f08b433c1ad0c005c568019732
|
|
| MD5 |
12cdd23f319c2e17aaccb96fa27eb8d6
|
|
| BLAKE2b-256 |
30388fcf8daea0245e9468cb1e293febf2f9caf87056907aeffd7f072f0654c4
|
File details
Details for the file format_seismo-0.1.0-py3-none-any.whl.
File metadata
- Download URL: format_seismo-0.1.0-py3-none-any.whl
- Upload date:
- Size: 6.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b87c799eb4641aadaca5ef2dd02fbb68bbe90fb7e7429bff2b3b2dc41c5d76bc
|
|
| MD5 |
12e9cfcc5b5d5b7f9f25965bf96bf261
|
|
| BLAKE2b-256 |
fe7cb865f0b040b0ba0e2f54638af83d5e0e13e52d323db9e200e1889c4fc29e
|