项目作者: earthinversion

项目描述 :
Convert CSV to Mseed Utility Program. Works on any size of the CSV file and interpolate the data for the sampling rate of 50Hz.
高级语言: Python
项目地址: git://github.com/earthinversion/csv2mseed_utility.git
创建时间: 2021-04-26T13:16:47Z
项目社区:https://github.com/earthinversion/csv2mseed_utility

开源协议:BSD 2-Clause "Simplified" License

下载


Python utility program to write mseed file from csv

Utpal Kumar, 2021/04

Installation

Using Anaconda/Miniconda

  1. conda create -n rfidgetenv
  2. conda activate rfidgetenv
  3. conda install -c conda-forge obspy pandas

Using venv

  1. python -m venv venv
  2. source venv/bin/activate
  3. pip install obspy pandas

Usage

type python csv2mseed.py -h

  1. usage: csv2mseed.py [-h] -inp INPUT [-stn STATION] [-net NETWORK] [-sr SAMPLE_RATE] [-gal GAL] [-p] [-dm]
  2. Python utility program to write mseed file from csv based on Pandas, Numpy and Obspy (by Utpal Kumar, IESAS, 2021/04)
  3. optional arguments:
  4. -h, --help show this help message and exit
  5. -inp INPUT, --input INPUT
  6. input CSV file to convert to mseed, e.g. network_station_data.csv
  7. -stn STATION, --station STATION
  8. station name, e.g. XYZ
  9. -net NETWORK, --network NETWORK
  10. network name, e.g. TW
  11. -sr SAMPLE_RATE, --sample_rate SAMPLE_RATE
  12. sampling rate as integer
  13. -gal GAL, --gal GAL 1 for Gal and 0 for g
  14. -p, --plot_data plot the output mseed data
  15. -dm, --demean remove mean from the data
  16. csv file format: 'Datetime', 'X', 'Y', 'Z' (2021-04-17 00:00:00.005829,0.00824,-0.01095,1.00362)
  • Convert to mseed, remove mean and plot
    1. python csv2mseed.py -inp "RCEC7B/phidgetData_0009.csv" -p -dm -stn RCEC7B
  1. Reading file /mnt/d/csv2mseed_utility/RCEC7B/phidgetData_0009.csv in chunks...
  2. Finished writing file TW-RCEC7B-BNX.mseed
  3. Finished writing file TW-RCEC7B-BNY.mseed
  4. Finished writing file TW-RCEC7B-BNZ.mseed... with sampling rate: 50 Hz

RFidget Plot