"""
from read_DBY import read_DBY
from remove_60Hz_slope import remove_60Hz_slope
from chop_gw_ir import chop_gw_ir
import numpy as np
from lowpass import lowpass
import matplotlib.pyplot as plt
x_max = 450e-6

read_DBY_output = read_DBY(38, 1, 26.522908895, 8, x_max, 1)  #UF 15-38, RS1
#read_DBY_output=read_DBY(39,1,66.583436840,9,x_max,1) #UF 15-39, RS1
#read_DBY_output=read_DBY(40,3,20.767465080,10,x_max,1) #UF 15-40, RS3
#read_DBY_output=read_DBY(41,1,57.298446790,11,x_max,1) #UF 15-41, RS1
#read_DBY_output=read_DBY(42,4,43.058185590,12,x_max,1) #UF 15-42, RS4
#read_DBY_output=read_DBY(43,4,23.293418545,13,x_max,1) #UF 15-43, RS4
remove_60Hz_slope_output = remove_60Hz_slope(read_DBY_output, x_max)
print('UTC reference time: %s' % remove_60Hz_slope_output[2])
gw_time, gw_data, ir_time, ir_data = chop_gw_ir(remove_60Hz_slope_output)

gw_time = gw_time
gw = gw_data
ir_time = ir_time
ir = ir_data

gw_peak = gw_time[np.argmax(gw)]
print(gw_peak)
#plt.plot(gw_time-gw_peak,gw,ir_time-gw_peak,ir)
#plt.show()

lpf_gw_data = lowpass(gw, 100e3)
lpf_ir_data = lowpass(ir, 100e3)
"""
from read_DBY import read_DBY
from remove_60Hz_slope import remove_60Hz_slope
from chop_gw_ir import chop_gw_ir
import numpy as np
from lowpass import lowpass
import matplotlib.pyplot as plt
x_max=450e-6

read_DBY_output=read_DBY(38,1,26.522908895,8,x_max,1) #UF 15-38, RS1
#read_DBY_output=read_DBY(39,1,66.583436840,9,x_max,1) #UF 15-39, RS1
#read_DBY_output=read_DBY(40,3,20.767465080,10,x_max,1) #UF 15-40, RS3
#read_DBY_output=read_DBY(41,1,57.298446790,11,x_max,1) #UF 15-41, RS1
#read_DBY_output=read_DBY(42,4,43.058185590,12,x_max,1) #UF 15-42, RS4
#read_DBY_output=read_DBY(43,4,23.293418545,13,x_max,1) #UF 15-43, RS4
remove_60Hz_slope_output=remove_60Hz_slope(read_DBY_output,x_max)
print('UTC reference time: %s' %remove_60Hz_slope_output[2])
gw_time,gw_data,ir_time,ir_data=chop_gw_ir(remove_60Hz_slope_output)

gw_time=gw_time
gw=gw_data
ir_time=ir_time
ir=ir_data

gw_peak=gw_time[np.argmax(gw)]
print(gw_peak)
#plt.plot(gw_time-gw_peak,gw,ir_time-gw_peak,ir)
#plt.show()

lpf_gw_data=lowpass(gw,100e3)
lpf_ir_data=lowpass(ir,100e3)
#read_skywaves_output=read_skywaves_2016(station,year,81316,23,1,27.286644730,437,x_max,1) #UF 16-23, RS1 DBY
#read_skywaves_output=read_skywaves_2016(station,year,81316,23,1,27.286644730,2,x_max,1) #UF 16-23, RS1 VE
#read_skywaves_output=read_skywaves_2016(station,year,81316,23,1,27.286644730,291,x_max,1) #UF 16-23, RS1 GL
#read_skywaves_output=read_skywaves_2016(station,year,81316,23,2,27.333111390,437,x_max,1) #UF 16-23, RS2 DBY
#read_skywaves_output=read_skywaves_2016(station,year,81316,23,2,27.333111390,2,x_max,1) #UF 16-23, RS2 VE
#read_skywaves_output=read_skywaves_2016(station,year,81316,23,2,27.333111390,291,x_max,1) #UF 16-23, RS2 GL
#read_skywaves_output=read_skywaves_2016(station,year,81316,23,3,27.436680310,437,x_max,1) #UF 16-23, RS3 DBY
#read_skywaves_output=read_skywaves_2016(station,year,81316,23,3,27.436680310,2,x_max,1) #UF 16-23, RS3 VE
#read_skywaves_output=read_skywaves_2016(station,year,81316,23,3,27.436680310,291,x_max,1) #UF 16-23, RS3 GL
#read_skywaves_output=read_skywaves_2016(station,year,81316,23,4,27.565600070,437,x_max,1) #UF 16-23, RS4 DBY
#read_skywaves_output=read_skywaves_2016(station,year,81316,23,4,27.565600070,2,x_max,1) #UF 16-23, RS4 VE
read_skywaves_output=read_skywaves_2016(station,year,81316,23,4,27.565600070,291,x_max,1) #UF 16-23, RS4 GL
#read_skywaves_output=read_skywaves_2016(station,year,80316,0,0,45.694707,290,x_max,1) #UF Natural GL

if station == "DBY":
    remove_60Hz_slope_output=remove_60Hz_slope(read_skywaves_output,x_max)
    filtered=filter_DBY(remove_60Hz_slope_output[1])
    
#    plt.plot(read_skywaves_output[0]*1e6,read_skywaves_output[10])
#    plt.plot(remove_60Hz_slope_output[0],remove_60Hz_slope_output[1])
    plt.plot(remove_60Hz_slope_output[0][1510:-1]*1e6-150,filtered[1510:-1])
    plt.title('UF 16-'+str(read_skywaves_output[14])+', RS '+str(read_skywaves_output[15])+' from UF '+station+' ('+str(distance/1000)+' km) station')
    plt.xlabel('Time ($\mu s$) after '+str(read_skywaves_output[2]))
    plt.ylabel('Uncalibrated Ez')
    plt.grid()
    plt.show()

elif station == "VE":
    remove_60Hz_slope_output=remove_60Hz_slope(read_skywaves_output,x_max)
    filtered=filter_VE(remove_60Hz_slope_output[1])
    
Example #4
0
#read_skywaves_output=read_skywaves_2016(station,year,81316,23,1,27.286644730,291,x_max,1) #UF 16-23, RS1 GL
#read_skywaves_output=read_skywaves_2016(station,year,81316,23,2,27.333111390,437,x_max,1) #UF 16-23, RS2 DBY
#read_skywaves_output=read_skywaves_2016(station,year,81316,23,2,27.333111390,2,x_max,1) #UF 16-23, RS2 VE
#read_skywaves_output=read_skywaves_2016(station,year,81316,23,2,27.333111390,291,x_max,1) #UF 16-23, RS2 GL
#read_skywaves_output=read_skywaves_2016(station,year,81316,23,3,27.436680310,437,x_max,1) #UF 16-23, RS3 DBY
#read_skywaves_output=read_skywaves_2016(station,year,81316,23,3,27.436680310,2,x_max,1) #UF 16-23, RS3 VE
#read_skywaves_output=read_skywaves_2016(station,year,81316,23,3,27.436680310,291,x_max,1) #UF 16-23, RS3 GL
#read_skywaves_output=read_skywaves_2016(station,year,81316,23,4,27.565600070,437,x_max,1) #UF 16-23, RS4 DBY
#read_skywaves_output=read_skywaves_2016(station,year,81316,23,4,27.565600070,2,x_max,1) #UF 16-23, RS4 VE
read_skywaves_output = read_skywaves_2016(station, year, 81316, 23, 4,
                                          27.565600070, 291, x_max,
                                          1)  #UF 16-23, RS4 GL
#read_skywaves_output=read_skywaves_2016(station,year,80316,0,0,45.694707,290,x_max,1) #UF Natural GL

if station == "DBY":
    remove_60Hz_slope_output = remove_60Hz_slope(read_skywaves_output, x_max)
    filtered = filter_DBY(remove_60Hz_slope_output[1])

    #    plt.plot(read_skywaves_output[0]*1e6,read_skywaves_output[10])
    #    plt.plot(remove_60Hz_slope_output[0],remove_60Hz_slope_output[1])
    plt.plot(remove_60Hz_slope_output[0][1510:-1] * 1e6 - 150,
             filtered[1510:-1])
    plt.title('UF 16-' + str(read_skywaves_output[14]) + ', RS ' +
              str(read_skywaves_output[15]) + ' from UF ' + station + ' (' +
              str(distance / 1000) + ' km) station')
    plt.xlabel('Time ($\mu s$) after ' + str(read_skywaves_output[2]))
    plt.ylabel('Uncalibrated Ez')
    plt.grid()
    plt.show()

elif station == "VE":