Skip to main content

A Python package for preprocessing seismological data

Project description

format_seismo

format_seismo is a package for preprocessing seismological data. It utilizes functions from the ObsPy and NumPy 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 to None (default value), output will be stored in a newly created subdirectory /hourly_formatted_data inside IN_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:

    • deu German
    • spa Spanish
    • fra French
    • zho Chinese (Simplified)
    • eng English
  • 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
...

Project details


Download files

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

Source Distribution

format_seismo-0.1.1.tar.gz (7.1 kB view details)

Uploaded Source

Built Distribution

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

format_seismo-0.1.1-py3-none-any.whl (5.9 kB view details)

Uploaded Python 3

File details

Details for the file format_seismo-0.1.1.tar.gz.

File metadata

  • Download URL: format_seismo-0.1.1.tar.gz
  • Upload date:
  • Size: 7.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.2

File hashes

Hashes for format_seismo-0.1.1.tar.gz
Algorithm Hash digest
SHA256 c30743f58578c9dab12d1fcaf3658232961395f795ea0a9dcc6b728fbad688cb
MD5 8e37f0f8465880f1bfd4e36a8ece6765
BLAKE2b-256 ebd5b9d9670a12a3d46772be41aba2b2ce9d7509b864f49a3c1e6fd08c54ef47

See more details on using hashes here.

File details

Details for the file format_seismo-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: format_seismo-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 5.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.2

File hashes

Hashes for format_seismo-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 bfb236243bc648b435a3bb6addf503f5fa350f4d2144be74dc054d89592f2be5
MD5 dfb88b4e7afae592b2408d2ff999f7ad
BLAKE2b-256 04620a4a4f444b8347c105f0f503b357782255cbd4f9d4469dd13c68ce623023

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