def get_height_histogram(n_t=None, d_delta=7): """ Look at the height histograms. """ md = mr.mmaria_data(c.data_directory) b = md.get_bounds() if n_t == None: n_t = int(n.floor((b[1] - b[0]) / (d_delta * 24 * 3600))) print(n_t) t0 = 24 * 3600 * n.floor(b[0] / (24 * 3600)) n_ranges = 30 rgs = n.linspace(70, 110, num=n_ranges + 1) S = n.zeros([n_t, n_ranges]) for di in range(n_t): d = md.read_data(t0 + di * d_delta * 24 * 3600, t0 + (di + 1) * d_delta * 24 * 3600) hist, bins = n.histogram(d["heights"] / 1e3, bins=rgs) ranges = 0.5 * (bins[0:len(hist)] + bins[1:(len(hist) + 1)]) S[di, :] = hist tvec = d_delta * n.arange(n_t) plt.pcolormesh(tvec, ranges, n.transpose(S)) plt.plot(tvec, ranges[n.argmax(S, axis=1)]) plt.show()
def get_decay_histogram(n_t=None, d_delta=1, height=[70, 110], logalpha=[0, 2.0], N=50): """ Look at the height histograms. """ md = mr.mmaria_data(c.data_directory) b = md.get_bounds() if n_t == None: n_t = int(n.floor((b[1] - b[0]) / (d_delta * 24 * 3600))) hbins = n.linspace(height[0], height[1], num=N) abins = n.linspace(logalpha[0], logalpha[1], num=N) S = n.zeros([N, N]) t0 = 24 * 3600 * n.floor(b[0] / (24 * 3600)) for di in range(n_t): d = md.read_data(t0 + di * d_delta * 24 * 3600, t0 + (di + 1) * d_delta * 24 * 3600) bragg_scale = n.sqrt(d["braggs"][:, 0]**2.0 + d["braggs"][:, 1]**2.0 + d["braggs"][:, 2]**2.0) print(bragg_scale) H, x, y = n.histogram2d(n.log10(d["alpha_norm"] * bragg_scale**2.0), d["heights"] / 1e3, bins=[abins, hbins]) plt.pcolormesh(abins, hbins, n.transpose(H)) plt.show()
def get_horizontal_histogram(n_t=None,d_delta=1,lat_min=65,lat_max=74,lon_min=5,lon_max=32,N=50): """ Look at the height histograms. """ md=mr.mmaria_data(c.data_directory) b=md.get_bounds() if n_t == None: n_t=int(n.floor((b[1]-b[0])/(d_delta*24*3600))) lons=n.linspace(lon_min,lon_max,num=N) lats=n.linspace(lat_min,lat_max,num=N) S=n.zeros([N,N]) t0=24*3600*n.floor(b[0]/(24*3600)) for di in range(n_t): d=md.read_data(t0+di*d_delta*24*3600,t0+(di+1)*d_delta*24*3600) H,x,y=n.histogram2d(d["lons"],d["lats"],bins=[lons,lats]) plt.pcolormesh(lons,lats,n.transpose(H)) plt.show()
pairs = [] latdeg2km = 111.321 londeg2km = 65.122785 meridional_distance = True zonal_distance = False horizontal_distance = False #h=h5py.File("res/simone_nov2018_multilink_juha_30min_1000m.h5","r")# For a single file #lats=h["lats"].value #lons=h["lons"].value #heights=h["heights"].value #heights in km #t=h["t"].value #works for mmaria_data md = mr.mmaria_data(c.data_directory) #for many files in a directory b = md.get_bounds() d = md.read_data(1514774804, 1515974804) lats = d["lats"] lons = d["lons"] heights = d["heights"] #hights in meters heights = heights / 1000 t = d["t"] # In[] print("total number of measurements %d" % (len(t))) # define a histogram n_m = len(lats)
zonb = n.real(n.fft.ifft(Z)) return (zonb) def lpf_mag(mag, N=60): return (n.convolve(n.abs(mag)**2.0, n.repeat(1.0 / N, N), mode="same")) d = smr.supermag_data(fname="tro_2018_2019.csv", plot=False) b = d.get_bounds() print(b) # get all data from "TRO" m = d.get_meas(b[0], b[0] + 365 * 24 * 3600, station="TRO") # directory with all mmaria network data md = mmr.mmaria_data(c.data_directory) # what is the data bounds (first and last time stamp) print(md.get_bounds()) # read all meteor radar data between these two timestamps d = md.read_data(b[0], b[0] + 365 * 24 * 3600, read_all_detections=False) zon = d["v"][0, :, :] mer = d["v"][1, :, :] #zonb=remove_baseline(zon[:,20]) zonb = remove_baseline(zon[:, 25]) merb = remove_baseline(mer[:, 25]) wken = zonb**2.0 + merb**2.0 plt.plot(d["times"], zonb)