from numpy import array, ones, size, mean, zeros, dot, pi from numpy import diag, nan, max, std, exp, conjugate from numpy import random, cos, sin, sqrt from numpy import ceil, log2, real, concatenate from scipy.linalg import sqrtm from scipy import fft, ifft, any, isreal, argsort, isnan from scipy.signal import lfilter, butter from scipy.signal.spectral import coherence #============================================================ station = 1 if station == 1: numselect = 'I31' sensors = extractstationlocations(numselect, ReferenceEllipsoid=23) nbsensors = len(sensors) xsensors_m = zeros([nbsensors, 3]) for im in range(nbsensors): evi = sensors[im] xsensors_m[im, :] = array( [evi.geolocs.X_km, evi.geolocs.Y_km, evi.geolocs.Z_km]) * 1000.0 xsensors_m = xsensors_m - xsensors_m[0, :] if station == 2: #=== I22 xsensors_m = 1.0e+03 * array( [[-0.088034341864435, -0.095905624230955, 0.272],
sys.path.insert(0, '/Users/maurice/etudes/ctbto/allJOBs2016/myjob/progspy/toolutilities') sys.path.insert(0, '/Users/maurice/etudes/ctbto/allJOBs2016/myjob/progspy/toolcalibration') from geoloc import extractstationlocations from toolIS import MCCM, consistence from toolIS import estimSCP, generateISsto, logMSCtheoGaussian class struct: def __init__(self, **kwds): self.__dict__.update(kwds) from matplotlib import pyplot as plt from numpy import array, size, zeros, exp station = 'I31' sensors = extractstationlocations(station, ReferenceEllipsoid=23) nbsensors = len(sensors) xsensors_m = zeros([nbsensors,3]) if nbsensors == 0: sys.exit('no sensor in %s'%station) else: for im in range(nbsensors): evi = sensors[im] xsensors_m[im,:] = array([evi.geolocs.X_km, evi.geolocs.Y_km, evi.geolocs.Z_km])*1000.0; xsensors_m = xsensors_m - xsensors_m[0,:] M = size(xsensors_m,0); # M = size(xsensors_m,0);
sys.path.append(mypaths[ip]) from geoloc import extractstationlocations from tool4generate import generator from numpy import array, size, zeros, isnan from matplotlib import pyplot as plt #========================================================================================== # This part extracts useful informatons about the sensors. # station is a sequence of structures describing the sensosrs. It is computed from the # geolocation of the sensors provided in file XLSfile. # That could be removed in the future # Here the only part we use is the sensor coordinates xsensors_m numselect = 'I31' XLSfile = '/Users/maurice/etudes/ctbto/allJOBs2016/myjob/progspy/pierrick/testsIDC/allISs.xls' station = extractstationlocations(XLSfile, numselect, ReferenceEllipsoid=23) #========================================================================================== nbsensors = len(station) xsensors_m = zeros([nbsensors, 3]) for im in range(nbsensors): evi = station[im] xsensors_m[im,:] = array([evi.geolocs.X_km, \ evi.geolocs.Y_km, \ evi.geolocs.Z_km])*1000.0 #========================================================================================== #================ call the generator ====================================================== settingfile = 'settings1.txt' signals, groundtruth = generator(xsensors_m, settingfile) #========================================================================================== #========================================================================================== #==========================================================================================
#30:M=6 #31:M=8 #32:M=7 #33:M=8 (with a few co-located) #34,M=12 (with a few co-located) #45:M=4 #================= #listIS = ('I22',) # from scipy.signal import lfilter, butter station = 'I22' sensors = extractstationlocations(station, ReferenceEllipsoid=23) nbsensors = len(sensors) xsensors_m = zeros([nbsensors,3]) if nbsensors == 0: print 'no sensor in %s'%station else: for im in range(nbsensors): evi = sensors[im] xsensors_m[im,:] = array([evi.geolocs.X_km, evi.geolocs.Y_km, evi.geolocs.Z_km])*1000.0; xsensors_m = xsensors_m - xsensors_m[0,:] M = size(xsensors_m,0); T_sec = 1200;
from geoloc import extractstationlocations from tool4generate import generator from numpy import array, size, zeros, isnan from matplotlib import pyplot as plt #========================================================================================== # This part extracts useful informatons about the sensors. # station is a sequence of structures describing the sensosrs. It is computed from the # geolocation of the sensors provided in file XLSfile. # That could be removed in the future # Here the only part we use is the sensor coordinates xsensors_m numselect = 'I31' XLSfile = '/Users/maurice/etudes/ctbto/allJOBs2016/myjob/progspy/pierrick/testsIDC/allISs.xls'; station = extractstationlocations(XLSfile, numselect, ReferenceEllipsoid=23) #========================================================================================== nbsensors = len(station) xsensors_m = zeros([nbsensors,3]) for im in range(nbsensors): evi = station[im] xsensors_m[im,:] = array([evi.geolocs.X_km, \ evi.geolocs.Y_km, \ evi.geolocs.Z_km])*1000.0; #========================================================================================== #================ call the generator ====================================================== settingfile = 'settings1.txt'; signals, groundtruth = generator(xsensors_m,settingfile) #========================================================================================== #========================================================================================== #==========================================================================================