|
| 1 | +@setup_workload begin |
| 2 | + @compile_workload begin |
| 3 | + foldertest = joinpath(@__DIR__, "../test") |
| 4 | + header, data = read_gadget2(joinpath(foldertest, "plummer/snapshot_0000.gadget2"), uAstro, uGadget2, type=Star) |
| 5 | + h, d = read_gadget2(joinpath(foldertest, "plummer_unitless.gadget2"), nothing, uGadget2, type=Star) |
| 6 | + |
| 7 | + c = Cube(PVector(0.0,0.0,0.0), PVector(1.0,1.0,1.0)) |
| 8 | + fig = plot_makie(c, nothing) |
| 9 | + f = Figure() |
| 10 | + ax = Axis3(f[1,1]) |
| 11 | + plot_makie!(ax, c, nothing) |
| 12 | + |
| 13 | + m = MeshCartesianStatic(d) |
| 14 | + unicode_projection_density(m) |
| 15 | + # f = projection_density(m) #TODO |
| 16 | + unicode_slice(m, :rho, 5) |
| 17 | + f = plot_slice(m, :pos, 5) |
| 18 | + |
| 19 | + #! This is breaking. Anyway, tree plot is not often used |
| 20 | + # fig = plot_peano(3) |
| 21 | + # d = randn_pvector(15) |
| 22 | + # t = octree(d) |
| 23 | + # figure, axis, plot = plot_makie(t) |
| 24 | + |
| 25 | + fig = plot_profiling(joinpath(foldertest, "profiling.csv")) |
| 26 | + fig, df = plot_energy(joinpath(foldertest, "energy.csv")) |
| 27 | + fig, df = plot_energy_delta(joinpath(foldertest, "energy.csv")) |
| 28 | + fig = plot_densitycurve(data) |
| 29 | + fig = plot_rotationcurve(data) |
| 30 | + |
| 31 | + #TODO: there is something wrong??? |
| 32 | + plot_positionslice( |
| 33 | + joinpath(foldertest, "plummer"), "snapshot_", collect(0:20:200), ".gadget2", gadget2(), |
| 34 | + xlims = (-0.05, +0.05), ylims = (-0.05, +0.05), |
| 35 | + times = collect(0.0:0.01:0.1) * u"Gyr", |
| 36 | + ) |
| 37 | + fig, pos = plot_trajectory( |
| 38 | + joinpath(foldertest, "plummer/"), "snapshot_", collect(0:20:200), [1,2,3], ".gadget2", gadget2(), |
| 39 | + ) |
| 40 | + FigScale, FigLagrange, df = plot_radii( |
| 41 | + joinpath(foldertest, "plummer/"), "snapshot_", collect(0:20:200), ".gadget2", gadget2(), |
| 42 | + times = collect(0.0:0.01:0.1) * u"Gyr", title = "Direct Sum const", |
| 43 | + ) |
| 44 | + |
| 45 | + plot_positionslice(joinpath(foldertest, "mosaic/"), "snapshot_", collect(1:9:100), ".gadget2", gadget2(), |
| 46 | + dpi = 300, size = (800,800), |
| 47 | + xlims = (-0.06, +0.06), ylims = (-0.06, +0.06), |
| 48 | + times = collect(0.0:0.00005:0.005) * u"Gyr", |
| 49 | + ) |
| 50 | + plt = mosaicview(joinpath(foldertest, "mosaic/"), "pos_", collect(1:9:100), ".png"; fillvalue = 0.5, npad = 3, ncol = 4, rowmajor = true) |
| 51 | + |
| 52 | + png2video(joinpath(foldertest, "mosaic/"), "pos_", ".png", "TDE.mp4") |
| 53 | + |
| 54 | + unicode_scatter(d, nothing) |
| 55 | + unicode_density(d, nothing) |
| 56 | + unicode_rotationcurve(d, nothing) |
| 57 | + end |
| 58 | +end |
0 commit comments