Plotting Scattering Transforms
ScatteringTransform.plotZerothLayer1D — Function
plotZerothLayer1D(sf; saveTo=nothing, index=1)Function that plots the zeroth layer of the scattering transform at a specified example index.
ScatteringTransform.plotFirstLayer1D — Function
plotFirstLayer1D(j, origLoc, origSig; saveTo=nothing, index=1)Function that plots the first layer gradient wavelet at index j across space, along with the original signal. It also includes heatmaps of the gradient wavelet in both the spatial and frequency domains. The variable j specifies which wavelet to plot from the first layer, index specifies which example in the batch to plot, origLoc is the ScatteredOut object containing the scattering transform results, and origSig is the original input signal.
ScatteringTransform.gifFirstLayer — Function
gifFirstLayer(origLoc, origSig; fps=2, saveTo=nothing, index=1)Function to create a GIF visualizing all wavelets in the first layer across space for each example in the batch. The variable origLoc is the ScatteredOut object containing the scattering transform results, index specifies which example in the batch to plot, origSig is the original input signal, saveTo specifies the file path to save the GIF, and fps sets the frames per second for the GIF animation. If saveTo is provided, the GIF is saved to that file path.
ScatteringTransform.plotFirstLayer1DAll — Function
plotFirstLayer1DAll(origLoc, origSig; saveTo=nothing, index=1, cline=:darkrainbow)Function that plots all first layer gradient wavelets for a specific example signal index across space, along with the original signal. It also includes heatmaps of the gradient wavelets in both the spatial and frequency domains. The variable index specifies which example in the batch to plot, origLoc is the ScatteredOut object containing the scattering transform results, origSig is the original input signal, and saveTo is the file path to save the plot.
ScatteringTransform.plotFirstLayer — Function
plotFirstLayer(stw, St; saveTo=nothing, index=1)Function that creates a heatmap of the first layer scattering transform results at a specified example index. The variable stw is the scattered output, St is the scattering transform object, saveTo is the file path to save the plot, and index specifies which example in the batch to plot.
ScatteringTransform.plotSecondLayerSpecificPath — Function
plotSecondLayerSpecificPath(stw, St, firstLayerWaveletIndex, secondLayerWaveletIndex, original; saveTo=nothing, index=1)stw is the scattered output, St is the scattering transform object, firstLayerWaveletIndex and secondLayerWaveletIndex specify the path to plot, original is the original signal, and index specifies which example in the batch to plot. This function creates a plot showing the original signal and the scattering result for the specified path. It also displays the mean frequencies associated with the selected wavelets. Finally, it displays the log-power norm of the second layer signal for the specified path. This value is used elsewhere to create heatmaps of the second layer scattering results.
ScatteringTransform.plotSecondLayer1DSubsetGif — Function
plotSecondLayer1DSubsetGif(stw, St, firstLayerWavelets, secondLayerWavelets, original; fps=2, saveTo=nothing, index=1)Create a GIF visualizing the second layer scattering results for specified subsets of wavelets from the first and second layers. The variables firstLayerWavelets and secondLayerWavelets are arrays containing the indices of the wavelets to be visualized from the first and second layers, respectively. For example, to visualize all the wavelets from the first layer with respect to a specific wavelet from the second layer, you can set firstLayerWavelets = 1:size(stw[1], 2) and secondLayerWavelets = k, where k is the index of the desired second layer wavelet. Once again, the index parameter specifies which example in the batch to plot. It defaults to the first example in the batch. If saveTo is not provided, the GIF is saved to "tmp.gif".
ScatteringTransform.plotSecondLayerFixAndVary — Function
plotSecondLayerFixAndVary(stw, St, firstLayerWavelets, secondLayerWavelets; fps=2, saveTo=nothing, index=1)Create a GIF visualizing slices of the second layer scattering results by fixing one layer's wavelet and varying the other layer's wavelet. The variables firstLayerWavelets and secondLayerWavelets are arrays containing the indices of the wavelets to be visualized from the first and second layers, respectively. If firstLayerWavelets contains only one index, the function fixes that wavelet and varies the second layer wavelets, and vice versa. If saveTo is not provided, the GIF is saved to "tmp.gif".
ScatteringTransform.plotSecondLayer — Function
plotSecondLayer(stw, St; saveTo=nothing, index=1, title="Second Layer results", xVals=-1, yVals=-1, logPower=true, toHeat=nothing, c=cgrad(:viridis, [0,.9]), threshold=0, linePalette=:greys, minLog=NaN, kwargs...)TODO fix the similarity of these names. xVals and yVals give the spacing of the grid, as it doesn't seem to be done correctly by default. xVals gives the distance from the left and the right as a tuple, while yVals gives the distance from the top and the bottom, also as a tuple. Default values are xVals = (.037, .852), yVals = (.056, .939), or if you have no title, use xVals = (.0105, .882), yVals = (.056, .939) If you have no colorbar, set xVals = (.0015, .997), yVals = (.002, .992) In the case that arbitrary space has been introduced, if you have a title, use xVals = (.037, .852), yVals = (.056, .939), or if you have no title, use xVals = (.0105, .882), yVals = (.056, .939)
ScatteringTransform.jointPlot — Function
jointPlot(thingToPlot, thingName, cSymbol, St; saveTo=nothing, sharedColorScaling=:exp, targetExample=1, δt=1000, freqigdigits=3, sharedColorbar=false, extraPlot=nothing, allPositive=false, logPower=false)Create a joint plot visualizing the zeroth, first, and second layer scattering results for a specified example. The variable thingToPlot is a tuple containing the scattering results for the zeroth, first, and second layers, thingName is the title for the plot, cSymbol specifies the color gradient to use, and St is the scattering transform object. The function allows for various customization options, including shared color scaling, target example selection, frequency digit rounding, and additional plotting options.