SeismicJulia / SeisMakie.jl

MIT License
2 stars 3 forks source link

Animations #26

Closed firasalchalabi closed 3 weeks ago

firasalchalabi commented 3 months ago

Code to test animations:

using SeisMakie, SeisProcessing, CairoMakie

function test_animation()

    orig_d = SeisLinearEvents()
    d = Observable(orig_d)
    pclip = Observable(98)
    cmap = Observable(:seismic)
    ox = Observable(1)

    #fig, ax, img = seisoverlayplot(d, pclip=pclip, cmap=cmap, ox=ox)
    fig, ax = seisPlotTX(d, ox=ox, pclip=pclip, cmap=cmap, style="overlay")

    cmaps = [:seismic, :viridis, :grays, :PuOr]

    record(fig, "animations/seisoverlay_animation.mp4", 0:200, framerate = 30) do p 

        # pclip[] = p
        # cmap[] = cmaps[p % 4 + 1]
        println(p)
        d[] = hcat(orig_d[:, (p)%size(orig_d, 2)+1:end], orig_d[:, begin:(p)%size(orig_d, 2)+1])
        #ox[] = p
        # cmap[] = cmaps[p % 4 + 1]
        # autolimits!(ax)
    end
end

test_animation()
AtilaSaraiva commented 3 weeks ago

@firasalchalabi sorry for taking so long. I see that you did a merge instead of a rebase to bring this branch to the HEAD. can you do a rebase?

AtilaSaraiva commented 3 weeks ago

I want to create a new release tonight so I just did it myself, sorry for the rush