"""Maciej Barnaś, [email protected]
Program plots stations and events from 2010 year, with local magnitude greater than 1.2, below the 600 m b.s. l in
Bobrek coal mine (data from IS-EPOS platform).
Last edit: 2017-10-02"""

import pandas as pd
import matplotlib.pyplot as plt
from mpl_toolkits.mplot3d import Axes3D
from mpl_toolkits.basemap import pyproj
from datetime import datetime
from def_import_Bobrek import import_events, import_stations
from numpy import arange

print(__doc__)

Bobr = import_events(file='BOBREK_catalog_01.2010_ML1.2_Z-600.mat')  # Importing events from Matlab file
stations = import_stations()
PL2000VI = pyproj.Proj("+init=EPSG:2177") # ETRS89 / Poland CS2000 zone 6

# Convert geographical coordinates of the stations to Poland CS2000 zone 6 coordinates
for lab, row in stations.iterrows():
    stations.loc[lab, 'Y_2000'], stations.loc[lab, 'X_2000'] = PL2000VI(row['Longitude'], row['Latitude'])

stations_two = stations[stations['Code'].str.contains('S013|S015')]

# Convert geographical coordinates of the events to Poland CS2000 zone 6 coordinates
for lab, row in Bobr.iterrows():
    Bobr.loc[lab, 'Y_2000'], Bobr.loc[lab, 'X_2000'] = PL2000VI(row['Long'], row['Lat'])

# Adding column with event number
for lab, row in Bobr.iterrows():
Exemple #2
0
'''Maciej Barnaś, [email protected]
On first figure program plots stations and all events in Bobrek coal mine (data from IS-EPOS platform). On second
figure one chosen events is plotted.
Last edit: 2017-05-24'''

import pandas as pd
import matplotlib.pyplot as plt
from mpl_toolkits.mplot3d import Axes3D
from mpl_toolkits.basemap import pyproj
from def_import_Bobrek import import_events

Bobr = import_events(file='Bobrek_catalog.mat', catalog='Catalog')

stations_file = 'Stations.xlsx'
stations_Excel = pd.ExcelFile(stations_file)
stations = stations_Excel.parse('Arkusz1')

PL2000VI = pyproj.Proj("+init=EPSG:2177")  # ETRS89 / Poland CS2000 zone 6

for lab, row in stations.iterrows():
    stations.loc[lab, 'Y_2000'], stations.loc[lab, 'X_2000'] = PL2000VI(
        row['Longitude'], row['Latitude'])

for lab, row in Bobr.iterrows():
    Bobr.loc[lab,
             'Y_2000'], Bobr.loc[lab,
                                 'X_2000'] = PL2000VI(row['Long'], row['Lat'])

for lab, row in Bobr.iterrows():
    Bobr.loc[lab, 'nr'] = Bobr.loc[lab, 'ID'][17:]
Exemple #3
0
import pandas as pd
from obspy.core import UTCDateTime
import numpy as np
import matplotlib.pyplot as plt
import def_import_Bobrek
from scipy.stats import linregress
from scipy.interpolate import splev, splrep

Bobr = def_import_Bobrek.import_events(
    file='BOBREK_catalog_01.2010_ML1.2_Z-600.mat')
sd = 86400  # Amount of seconds in day
time_dif1 = UTCDateTime(
    Bobr['Time'].iat[0] * sd) - UTCDateTime('2010-01-22T11:08:47.1')
time_dif2 = UTCDateTime(
    Bobr['Time'].iat[-1] * sd) - UTCDateTime('2010-06-23T11:49:12.5')

time_difs = [time_dif1, time_dif2]
for lab, row in Bobr.iterrows():
    Bobr.loc[lab,
             'UTC_Time'] = UTCDateTime(row['Time'] * sd - np.mean(time_difs))

start_meas = UTCDateTime(2010, 1, 22)
end_meas = UTCDateTime(2010, 6, 23)
#print((end_meas - start_meas) / sd)

time = [
    start_meas + i * sd for i in range(int((end_meas - start_meas) / sd) + 1)
]  # List with days from
# measurements start to end, one day interval
t_distance = 10
time_distance = [
Exemple #4
0
from def_import_Bobrek import import_events, import_stations
from mpl_toolkits.basemap import pyproj
import pandas as pd
import numpy as np
import matplotlib.pyplot as plt
from mpl_toolkits.mplot3d import Axes3D
from math import ceil
from cm2inch import cm2inch
from matplotlib import gridspec

events = import_events(file='BOBREK_catalog_01.2010_ML1.2_Z-600.mat')
stations = import_stations()
stations.index = stations["Code"]

PL2000VI = pyproj.Proj("+init=EPSG:2177")  # ETRS89 / Poland CS2000 zone 6

# Convert geographical coordinates of the stations to Poland CS2000 zone 6 coordinates
for lab, row in stations.iterrows():
    stations.loc[lab, 'Y_2000'], stations.loc[lab, 'X_2000'] = PL2000VI(
        row['Longitude'], row['Latitude'])

# Convert geographical coordinates of the events to Poland CS2000 zone 6 coordinates
for lab, row in events.iterrows():
    events.loc[lab, 'Y_2000'], events.loc[lab, 'X_2000'] = PL2000VI(
        row['Long'], row['Lat'])

# Adding column with event number
for lab, row in events.iterrows():
    events.loc[lab, 'nr'] = events.loc[lab, 'ID'][17:]

events[['nr']] = events[['nr']].apply(pd.to_numeric)