PowerSpec module#
- PowerSpec.apply_windowing(Ni, Nj, data, window)#
- PowerSpec.detrend_by_fiting2dplane(x, y, data)#
- PowerSpec.detrend_data(x, y, data, detrend)#
- PowerSpec.e1e2(navlon, navlat)#
Compute scale factors from navlon,navlat.
- PowerSpec.fill_nan(data)#
replaces a NaN value in a dataset with an interpolated one
- PowerSpec.get_spec_1D(kradial, wavnum, spec_2D)#
Compute the azimuthaly avearge of the 2D spectrum
- PowerSpec.get_spec_2D(data_reg, dx, dy, Ni, Nj)#
Compute the 2D spectrum of the data
- PowerSpec.get_spectrum(data, x, y, window='Tukey', detrend='Both')#
data_reg : Interpolated data. x_reg and y_reg : interpolate coordinates in meters. window : None , ‘Hanning’ or ‘Tukey’ (tappered consine window with /apha = 0.5). detrend : if “both” : detrend the 2D data along both axes. if “zonal” : detrend the data in the zonal direction only if “RemoveMean” : Remove only the mean of the data if ‘RmeanDtrend’ : Remove the mean then detrend the data in both direction if None : use the raw data
- PowerSpec.hanning(Ni, Nj)#
Using Hanning window
- PowerSpec.interpolate(data, navlon, navlat, interp=None)#
Perform a spatial interpolation if required; return x_reg,y_reg,data_reg. data : raw data nalon : longitude navlat : latitude interp : if None return data with cordinates in meters, if ‘basemap’, return interpolated data using basemap from mpl_toolkits and also cordinates in meters.
- PowerSpec.isdata_contain_nan(data)#
This function check if a data contains any NaN value If yes, it replaces the NaN values with an interpolated value using the fill_nan function.
- PowerSpec.tukey(Ni, Nj)#
Using tukey window : tapered cosine window. /alpha = 0.5
- PowerSpec.wavenumber_vector(Ni, Nj, dx, dy)#