suncasa.utils.stackplot
Classes
Functions
|
|
|
|
|
|
|
|
|
|
|
get the cross correlation map along y axis |
|
|
|
|
|
|
|
smooth the data using a window with requested size. |
|
Convert 3 column data to matplotlib grid |
|
Module Contents
- suncasa.utils.stackplot.XCorrStackplt(z, x, y, doxscale=True)[source]
get the cross correlation map along y axis :param z: data :param x: x axis :param y: y axis :return:
- suncasa.utils.stackplot.FitSlit(xx, yy, cutwidth, cutang, cutlength, s=None, method='Polyfit', ascending=True)[source]
- suncasa.utils.stackplot.getimprofile(data, cutslit, xrange=None, yrange=None, get_peak=False)[source]
- suncasa.utils.stackplot.smooth(x, window_len=11, window='hanning')[source]
smooth the data using a window with requested size.
This method is based on the convolution of a scaled window with the signal. The signal is prepared by introducing reflected copies of the signal (with the window size) in both ends so that transient parts are minimized in the begining and end part of the output signal.
- input:
x: the input signal window_len: the dimension of the smoothing window; should be an odd integer window: the type of window from ‘flat’, ‘hanning’, ‘hamming’, ‘bartlett’, ‘blackman’
flat window will produce a moving average smoothing.
- output:
the smoothed signal
example:
t=linspace(-2,2,0.1) x=sin(t)+randn(len(t))*0.1 y=smooth(x)
see also:
numpy.hanning, numpy.hamming, numpy.bartlett, numpy.blackman, numpy.convolve scipy.signal.lfilter
NOTE: length(output) != length(input), to correct this: return y[(window_len/2-1):-(window_len/2)] instead of just y.
- suncasa.utils.stackplot.grid(x, y, z, resX=20, resY=40)[source]
Convert 3 column data to matplotlib grid
- class suncasa.utils.stackplot.SpaceTimeSlitBuilder(axes, cutlength=80, cutsmooth=10.0, scale=1.0, color='white')[source]
- class suncasa.utils.stackplot.CutslitBuilder(axes, cutwidth=5, cutang=0, cutlength=80, cutsmooth=10.0, scale=1.0)[source]
- class suncasa.utils.stackplot.Stackplot(infile=None)[source]
-
- plot_map(smap, dspec=None, diff=False, norm=None, cmap=None, SymLogNorm=False, linthresh=0.5, returnImAx=False, layout_vert=False, uni_cm=False, draw_limb=False, draw_grid=False, colortitle=None, title=['observatory', 'detector', 'wavelength', 'time'], fov=fov, *args, **kwargs)[source]
- make_mapcube(trange, outfile=None, fov=None, wavelength='171', binpix=1, dt_data=1, derotate=False, tosave=True, superpixel=False, aia_prep=False, mapinterp=False)[source]
- mapcube_mkdiff(mode='rdiff', dt=36.0, medfilt=None, gaussfilt=None, bfilter=False, lowcut=1 / 10 / 60.0, highcut=1 / 1 / 60.0, window=[None, None], outfile=None, tosave=False)[source]
- Parameters:
mode – accept modes: rdiff, rratio, bdiff, bratio, dtrend
dt – time difference in second between frames when [rdiff, rratio, bdiff, bratio] is invoked
medfilt
gaussfilt
bfilter – do butter bandpass filter
lowcut – low cutoff frequency in Hz
highcut – high cutoff frequency in Hz
outfile
tosave
- Returns:
- plot_mapcube(mapcube=None, hdr=False, norm=None, vmax=None, vmin=None, cmap=None, diff=False, sav_img=False, out_dir=None, dpi=100, anim=False, silent=False, draw_limb=False, draw_grid=False, colortitle=None, title=['observatory', 'detector', 'wavelength', 'time'], fov=[], fps=15)[source]
- Parameters:
mapcube
hdr
vmax
vmin
diff
sav_img
out_dir
dpi
anim
- Returns:
- plot_stackplot(mapcube=None, hdr=False, norm=None, vmax=None, vmin=None, cmap=None, layout_vert=False, diff=False, uni_cm=True, sav_img=False, out_dir=None, dpi=100, anim=False, frm_range=[], cutslitplt=None, silent=False, refresh=True, threshold=None, gamma=1.0, get_peak=False)[source]
- stackplt_traject_fromfile(infile, frm_range=[], cmap='inferno', vmax=None, vmin=None, gamma=1.0)[source]