Pycwb2sac is a python version of Cwb2sac which convers CWB .D files to either SAC or Obspy Stream format
Written by Lindsay Chuang @ June 24, 2019
Please contact author by [email protected] if there is any question
- Python 3
- Obspy
Modify the first line of Pycwb2sac.py and change it to where your python path is. i.e.
Change it from
#!/Users/anaconda/envs/obspy/bin/python
to
#!/Linda/anaconda/envs/obspy/bin/python
Pycwb2sac <NSTA.DAT> <output_format SAC:0, Obspy:1> <Pfile(optional)>
$ ./Pycwb2sac.py 13010557.d05 NSTA.DAT 0 13010557.p05
Note:
(1) NSTA.DAT in here is a fixed version from the original one.
(2) Pfile is optional. If given, the earthquke and station information will be wrote to headers
(3) All the data files in .D file will be converted regardless if the station is listed in .P file.
To further convert .pk file to individual SAC files, please run the script Obspy2SAC.py
$ ./Obspy2SAC.py 1991-01-01T01:19:46.930000Z_1991-01-01T01:26:02.760000Z.pk