Skip to content

Commit 85589cc

Browse files
committed
First release
1 parent 6f9b3c1 commit 85589cc

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

43 files changed

+5541
-0
lines changed
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
[codestyle]
2+
indentation = True
3+
edge_line = True
4+
edge_line_columns = 79
5+
6+
[main]
7+
version = 0.2.0
8+
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
[encoding]
2+
text_encoding = utf-8
3+
4+
[main]
5+
version = 0.2.0
6+
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
[vcs]
2+
use_version_control = False
3+
version_control_system =
4+
5+
[main]
6+
version = 0.2.0
7+
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
[workspace]
2+
restore_data_on_startup = True
3+
save_data_on_exit = True
4+
save_history = True
5+
save_non_project_files = False
6+
project_type = 'empty-project-type'
7+
recent_files = ['benspy_extwaves.py', 'benspy_drum2wave.py', 'benspy_getwaves.py', 'seismo_section.py', '../../../../home/seismo/GDrive/OngoingPapers/InSight/RayleighEllipticity/rayleigh_ellipticity/REllipticity.py', 'seismogram_eq.py']
8+
9+
[main]
10+
version = 0.2.0
11+
recent_files = []
12+

.spyproject/config/codestyle.ini

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
[codestyle]
2+
indentation = True
3+
edge_line = True
4+
edge_line_columns = 79
5+
6+
[main]
7+
version = 0.2.0
8+
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
[codestyle]
2+
indentation = True
3+
edge_line = True
4+
edge_line_columns = 79
5+
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
[encoding]
2+
text_encoding = utf-8
3+
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
[vcs]
2+
use_version_control = False
3+
version_control_system =
4+
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
[workspace]
2+
restore_data_on_startup = True
3+
save_data_on_exit = True
4+
save_history = True
5+
save_non_project_files = False
6+

.spyproject/config/encoding.ini

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
[encoding]
2+
text_encoding = utf-8
3+
4+
[main]
5+
version = 0.2.0
6+

.spyproject/config/vcs.ini

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
[vcs]
2+
use_version_control = False
3+
version_control_system =
4+
5+
[main]
6+
version = 0.2.0
7+

.spyproject/config/workspace.ini

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
[workspace]
2+
restore_data_on_startup = True
3+
save_data_on_exit = True
4+
save_history = True
5+
save_non_project_files = False
6+
project_type = 'empty-project-type'
7+
recent_files = ['benspy_drum2wave.py', 'benspy_getwaves.py', 'seismo_section.py', '../../../../home/seismo/GDrive/OngoingPapers/InSight/RayleighEllipticity/rayleigh_ellipticity/REllipticity.py']
8+
9+
[main]
10+
version = 0.2.0
11+
recent_files = []
12+

Map/Station_params.txt

Lines changed: 129 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,129 @@
1+
sta,net,lat,lon,ele
2+
BD15,B4,50.9145,6.5903,74.0
3+
BER,B4,50.9593,6.6355,78.0
4+
HNK,B4,51.096533,6.464822,133.0
5+
MIL,B4,50.991683,6.556971,125.0
6+
ROE,B4,50.943313,6.674004,126.0
7+
SIN,B4,50.917506,6.66368,123.0
8+
HMB,B4,50.936491,6.483115,139.0
9+
BD17,B4,51.046901,6.404548,143.0
10+
BD14,B4,51.081524,6.392214,122.0
11+
FUN,B4,50.884191,6.501562,158.0
12+
AHRW,GR,50.541,7.076,-319.0
13+
BUG,GR,51.4412,7.2707,65.0
14+
KAST,GR,51.20272,8.416204,616.0
15+
MILB,GR,49.8284,9.2923,369.0
16+
TNS,GR,50.2236,8.4489,815.0
17+
HGN,NL,50.764,5.9317,135.0
18+
HRKB,NL,51.1879,6.1678,1.0
19+
MAME,NL,50.8,5.9727,154.0
20+
OPLO,NL,51.5888,5.8121,1.0
21+
ROLD,NL,50.86939,6.08469,145.0
22+
TERZ,NL,50.756763,5.906114,150.0
23+
VKB,NL,50.8669,5.7847,90.0
24+
BHE,NH,50.3529,7.1796,290.0
25+
ENT,NH,51.2416,7.4115,300.0
26+
GSH,NH,50.7359,6.3797,370.0
27+
HES,NH,51.367,7.042,130.0
28+
LOH,NH,50.1825,6.5356,580.0
29+
OLF,NH,50.4939,6.4202,470.0
30+
PLH,NH,51.0043,6.8199,-300.0
31+
RWB,NH,51.1018,6.155,45.0
32+
SOR,NH,51.3497,7.9714,280.0
33+
TDN,NH,50.575,6.9445,406.0
34+
WBS,NH,50.8061,7.2831,130.0
35+
XAN,NH,51.663,6.452,24.0
36+
ACN,NH,50.7746,6.0839,163.0
37+
JCK,NH,51.0353,6.4314,109.0
38+
BA01,BQ,50.7789,6.0614,216.0
39+
BA02,BQ,50.7722,6.2157,230.0
40+
BA04,BQ,50.762,6.7941,118.0
41+
BA05,BQ,50.9175,6.6637,72.0
42+
BA06,BQ,50.9196,6.7052,73.0
43+
BA08,BQ,50.9642,7.0755,58.0
44+
BA09,BQ,50.9638,7.1755,200.0
45+
BA10,BQ,50.6131,6.9945,186.0
46+
BA11,BQ,50.7666,6.501,138.0
47+
BA12,BQ,50.9091,6.1863,116.0
48+
BA13,BQ,51.0707,6.0753,42.0
49+
BA14,BQ,50.6717,6.5661,239.0
50+
BA15,BQ,50.7117,6.9275,157.0
51+
BA16,BQ,51.0301,6.6616,81.0
52+
BA17,BQ,51.2516,6.3657,65.0
53+
BA18,BQ,50.5938,6.8393,262.0
54+
BA26,BQ,50.9261,6.9329,47.0
55+
BA19,BQ,50.9412,6.9577,48.0
56+
BA20,BQ,50.9412,6.9577,80.0
57+
BA21,BQ,50.9412,6.9577,135.0
58+
BA22,BQ,50.9412,6.9577,165.0
59+
BA23,BQ,50.9412,6.9577,110.0
60+
BA30,BQ,50.842519,6.278102,157.0
61+
DREG,BQ,50.661833,6.23,395.0
62+
BNS,BQ,50.96297,7.17501,262.0
63+
HOBG,BQ,50.98273,7.33271,270.0
64+
HILG,BQ,50.291974,6.678656,571.0
65+
JUE,BQ,50.910534,6.409547,148.0
66+
BGG,BQ,50.20507,7.33665,140.0
67+
KLL,BQ,50.6467,6.3113,440.0
68+
KOE,BQ,50.42407,7.731363,601.0
69+
LAUG,BQ,51.350569,6.940529,187.0
70+
RODG,BQ,51.1447,6.1803,70.0
71+
NAST,BQ,50.195425,7.860908,374.0
72+
BEBN,BE,50.797,5.6778,80.0
73+
OPTB,BE,51.1115,5.636,51.0
74+
RCHB,BE,50.1559,5.2276,221.0
75+
UCC,BE,50.79724,4.36038,100.0
76+
MEM,BE,50.608691,6.009614,244.3
77+
MRG,BE,50.51123,6.07412,674.0
78+
HOU,BE,50.35356,6.00517,495.0
79+
BIW,LE,50.7308,7.8373,312.0
80+
GLOK,LE,50.54466,7.43375,293.0
81+
LAGB,LE,50.3608,7.1007,372.0
82+
MUEZ,LE,50.26253,6.25044,543.0
83+
HMES,RN,51.65777,7.72634,56.0
84+
BAVN,RN,51.738,7.122,65.0
85+
BPFI,RN,51.4185,7.2276,120.0
86+
ZER1,RN,51.59472,6.82523,58.0
87+
DOR50,YD,51.525864,7.553876,76.0
88+
HAM29,YD,51.659767,7.822975,66.0
89+
LUN39,YD,51.603756,7.538812,46.0
90+
WER38,YD,51.65009,7.565257,77.0
91+
KLB,LU,50.1,6.109,475.0
92+
VIA,LU,49.9351,6.2025,306.0
93+
WILW,LU,49.99233,6.00481,357.0
94+
CB21,ZB,50.860186,6.330475,139.0
95+
CB22,ZB,50.82393176,6.31124583,190.272
96+
TB16,ZB,50.87974,6.331636,146.0
97+
TB17,ZB,50.852841,6.316028,183.0
98+
TB18,ZB,50.801145,6.280039,193.0
99+
TB19,ZB,50.849672,6.351232,170.0
100+
TB20,ZB,50.92868145,6.32374391,120.967
101+
R5F74,AM,50.93693694,7.277145275,168.0
102+
RB99F,AM,50.95495495,7.166330586,200.0
103+
R79BC,AM,50.16216216,7.889410246,370.0
104+
R00A4,AM,51.03603604,5.845722394,31.0
105+
RA538,AM,51.03603604,5.845709777,31.0
106+
RFA17,AM,50.67567568,7.066202715,164.0
107+
R942F,AM,51.4954955,7.439029882,104.0
108+
R28DF,AM,50.51351351,7.282807997,63.0
109+
R3B38,AM,50.15315315,8.015793865,501.0
110+
R653E,AM,50.32432432,7.211084891,246.0
111+
R1055,AM,50.11711712,8.008776126,452.0
112+
R71C2,AM,51.33333333,6.53300399,43.0
113+
R898A,AM,51.34234234,5.43813383,26.0
114+
R21A2,AM,51.43243243,7.54407332,128.0
115+
R5CF8,AM,50.1981982,5.573625888,299.0
116+
R8795,AM,50.75675676,6.978268798,102.0
117+
R5D58,AM,50.86486486,6.109977567,142.0
118+
R4C26,AM,50.82882883,6.076317602,180.0
119+
R5B44,AM,50.56756757,6.213571534,100.0
120+
REE4E,AM,50.91891892,7.274501559,108.0
121+
R6250,AM,51.0,7.202025424,180.0
122+
R9335,AM,50.7027027,6.159354023,265.0
123+
R81B0,AM,50.74774775,7.147928079,68.0
124+
R6FAF,AM,50.40540541,6.361374134,684.0
125+
GWBC,HS,50.3926,8.2687,197.0
126+
GWBD,HS,50.114,7.9021,428.0
127+
GWBE,HS,50.1064,8.1804,272.0
128+
GWBO,HS,49.936,7.9876,286.0
129+
WBFO,HS,50.5745,8.4227,211.0

README

Lines changed: 120 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,120 @@
1+
###############################################################################
2+
############################### BENSPY ########################################
3+
Set of python scripts for managing seismic data and resources of the Bensberg
4+
Earthquake Observatory of the University of Cologne
5+
###############################################################################
6+
7+
INITIAL CONSIDERATIONS:
8+
0.0 This README file contains the steps for installing and running the Benspy package in Linux machine only.
9+
10+
0.1 All the Bensberg python scripts (Benspy package) are stored in the following directory:
11+
/mnt/Station/scripts/benspy
12+
The idea of this README file is to configure your machine to run it directly from there.
13+
This way, any changes to the code will be done just once.
14+
If you want to do modifications to the scripts, please make a local copy of it and configure accordingly.
15+
16+
0.2 Because we work over the network, you need to mount the NAS directories, which are expected to be mounted in the /mnt directory. The netConnect script should do this easily.
17+
In particular, please be sure you have the following directories already mounted:
18+
/mnt/Station
19+
/mnt/SC-Share
20+
/mnt/ACQ
21+
/mnt/SeisAn
22+
/mnt/Projects
23+
24+
0.3 The requirements for running the Benspy scripts are:
25+
26+
- Python3.8
27+
- py3seismo environment (and all the python packages there, see below)
28+
- dos2unix package (sudo apt install dos2unix)
29+
- java (optional, but really needed for benspy_metadata) >> sudo apt install dos2unix openjdk-11-jdk
30+
31+
0.4 Due to the standarization, the Benspy scripts run with the same shebang: /home/seismo/venvs/py3seismo/bin/python
32+
Therefore, the username of your machine MUST be seismo and the virtual environment has to be installed under venvs directory.
33+
34+
################ INSTALLATION PY3SEISMO VIRTUAL ENVIRONMENT ####################
35+
36+
1.1 Create a virtual environment directory: /home/seismo/venvs
37+
38+
> mkdir /home/seismo/venvs
39+
40+
1.2 Create the py3seismo virtual environment using the python commands:
41+
42+
> python3 -m venv /home/seismo/venvs/py3seismo (check that the python3 is python3.8 version)
43+
44+
** For this, you need to have installed python3.8-venv (can be 3.10 or any other version)
45+
46+
1.3 Activate the py3seismo venv by sourcing the activate binary:
47+
48+
> source /home/seismo/venvs/py3seismo/bin/activate
49+
50+
1.4 Once this is done, you will be working inside the virtual environment. Now, you need to install all the required packages.
51+
To do this, please use the requirements file under the Benspy directory:
52+
53+
> pip install -r /mnt/Station/scripts/benspy/requirements_py3seismo_20221205.txt
54+
55+
1.5 Once these packages are installed, you can deactivate the environment by commanding:
56+
57+
> deactivate
58+
59+
##### RUNNING BENSPY SCRIPTS ######
60+
61+
2.1 In order to run the Benspy scripts anywhere from the terminal, you have to
62+
include the Benspy directory to your PATH and PYTHONPATH, so you have to modify
63+
your .bashrc (~/.bashrc) file with your favourite text editor
64+
and just copy & paste these lines at the end of the file.
65+
66+
## Benspy
67+
alias py3='source /home/seismo/venvs/py3seismo/bin/activate'
68+
benspydir='/mnt/Station/scripts/benspy'
69+
export PYTHONPATH=${PYTHONPATH}:${benspydir}
70+
export PATH=${PATH}:${benspydir}
71+
72+
2.2 Source your ~/.bashrc file (or close and open a new terminal/tab instead):
73+
74+
> source ~/.bashrc
75+
76+
2.3 In order to properly run the unix2dos function and create the drum files (benspy_createdrums.py or benspy_extdrums.py),
77+
you might have to give sudo permissions to unix2dos. To do this, type in the terminal:
78+
79+
> sudo visudo (will ask for the sudo password and open the /etc/sudoers file)
80+
81+
Add the following line at the end of the file.
82+
83+
seismo ALL=(ALL) NOPASSWD: /usr/bin/unix2dos
84+
85+
############
86+
87+
Now you should be able to run all the python scripts from the terminal! ;-)
88+
You can run benspy_info (simple bash script) to get an overview of all the benspy scripts and their purposes. You will get the following output:
89+
90+
The following scripts are part of the Benspy package and should be ready to run in your machine:
91+
> benspy_availability: Create availability plots for custom stations/networks.
92+
93+
> benspy_checkgaps: Check for gaps in 2-min files due to corrupted data.
94+
95+
> benspy_createdrums: Create daily drums for custom stations.
96+
97+
> benspy_drum2wave: Get waveforms of Bensberg stations based on drum_select files.
98+
99+
> benspy_drumplots: Create PNG files to be shown at Bensberg website.
100+
101+
> benspy_extdrums.py: Create daily drums for non-Bensberg stations.
102+
103+
> benspy_extwaves.py: Get waveforms of non-Bensberg stations based on drum_select files.
104+
105+
> benspy_gdarchive.py: Archive GD waveforms.
106+
107+
> benspy_getwaves.py: Get waveforms based on custom starting and ending times, for custom stations.
108+
109+
> benspy_metadata.py: Update and download metadata from SMP.
110+
111+
> benspy_ppsd.py: Create PPSDs figures and curves for custom stations/channels and times.
112+
113+
> benspy_soh.py: Create state-of-health figures for Seedlink stations.
114+
115+
> benspy_toarchive.py: Archive 2-min files to SDSarchive.
116+
117+
118+
Should you have any questions, suggestions, comments, etc, don't hesitate to let me know, please.
119+
120+
Sebastian
76 Bytes
Binary file not shown.
12 Bytes
Binary file not shown.
11 KB
Binary file not shown.
12.5 KB
Binary file not shown.
11.8 KB
Binary file not shown.
26 KB
Binary file not shown.

__pycache__/seismospec.cpython-38.pyc

26.3 KB
Binary file not shown.

0 commit comments

Comments
 (0)