Skip to content

Commit

Permalink
Add test for constructing a pyramid with additional dimension
Browse files Browse the repository at this point in the history
  • Loading branch information
felixcremer committed Aug 5, 2024
1 parent 4bb73dd commit b56101b
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions test/runtests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -123,3 +123,19 @@ end
end
=#

@testitem "Building pyramid with additional dimension in memory" begin
# The aim of this test is to check whether we can build a pyramid from a data cube with an extra dimension.
# We will only build the pyramids on the spatial dimensions and keep the other dimensions as is.
using YAXArrays
using Zarr
using PyramidScheme
orgpath = joinpath(@__DIR__, "data", "world.zarr")
path = tempname() * ".zarr"
cp(orgpath, path)
c = Cube(path)
@time "Building world pyramid" pyr = Pyramid(c)
@test pyr isa Pyramid
@test length(dims(pyr)) == 3
@test size(pyr.levels)[end] = (256,128,3)

end

0 comments on commit b56101b

Please sign in to comment.