Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 4 additions & 13 deletions docs/src/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ For a comparable package in python, see [Kymatio](https://www.kymat.io/).
## Basic Example

```@setup
using ScatteringTransform, ScatteringPlots, Wavelets, Plots
using ScatteringTransform, Wavelets, Plots
```

As an example signal, lets work with the doppler signal:
Expand Down Expand Up @@ -91,21 +91,12 @@ gif(anim, "sliceBySecond.gif", fps=1)
```

For any fixed second layer frequency, we get approximately the curve in the first layer scalogram, with different portions emphasized, and the overall mass decreasing as the frequency increases, corresponding to the decreasing amplitude of the envelope for the doppler signal.
These plots can also be created using
These plots can also be created using various plotting utilities defined in this package.

From the companion package ScatteringPlots.jl, we have the denser representation:
For example, we can generate a denser representation with the `plotSecondLayer` function:

```@example ex
using ScatteringPlots, LinearAlgebra

# --- HOTFIX: Monkey-patch ScatteringPlots ---
# The package ScatteringPlots uses 'norm' but didn't declare LinearAlgebra as a dependency.
# We manually define 'norm' inside the ScatteringPlots module pointing to the real one.
Core.eval(ScatteringPlots, :(norm = $(LinearAlgebra.norm)))

# --------------------------------------------
# Fix: Explicitly use the function from ScatteringPlots to avoid ambiguity
ScatteringPlots.plotSecondLayer(sf, St)
plotSecondLayer(sf, St)
savefig("second.png") #hide
```

Expand Down
2 changes: 1 addition & 1 deletion src/scatteringplots.jl
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ function gifFirstLayer(origLoc, firstSig, saveTo="gradientFigures/tmp.gif", fps=
plotFirstLayer1D(j, origLoc, firstSig)
frame(anim)
end
gif(anim, saveTo, fps=2)
gif(anim, saveTo, fps=fps)
end

meanWave(wave) = sum(real.(range(0, stop=1, length=size(wave, 1)) .* wave), dims=1) ./ sum(real.(wave), dims=1)
Expand Down
Loading