Skip to content
Open
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
2 changes: 1 addition & 1 deletion Project.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name = "CloudSeis"
uuid = "a8ea0714-0c8b-51e5-9b11-67a2d82946d2"
version = "1.14.0"
version = "1.15.0"

[deps]
AbstractStorage = "14dbef02-f468-5f15-853e-5ec8dee7b899"
Expand Down
5 changes: 5 additions & 0 deletions src/CloudSeis.jl
Original file line number Diff line number Diff line change
Expand Up @@ -627,6 +627,11 @@ function csopen_write(containers::Vector{<:Container}, mode; kwargs...)
axis_lstarts = length(kwargs[:axis_lstarts]) == 0 ? [1 for i=1:ndim] : kwargs[:axis_lstarts]
axis_lincs = length(kwargs[:axis_lincs]) == 0 ? [1 for i=1:ndim] : kwargs[:axis_lincs]

if any(axis_pincs .< 1.0)
@warn "Warning: Physical deltas less than 1.0 are not permitted, physical delta less than 1.0 are being set to 1.0"
axis_pincs[findall(axis_pincs .< 1.0)] .= 1.0
end

traceproperties = get_trace_properties(kwargs[:tracepropertydefs], axis_propdefs)

traceformat = kwargs[:traceformat]
Expand Down
13 changes: 13 additions & 0 deletions test/runtests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -444,6 +444,19 @@ const compressors = Sys.iswindows() ? ("none","blosc","leftjustify","zfp") : ("n
rm(io)
end

@testset "pincs override" begin
r = uuid4()
io = csopen_robust(mkcontainer(cloud, "test-$r-cs"), "w", axis_lengths=[10,11,12], axis_pincs=[3.0,-1.0,0.0], compressor=compressor, compressor_options=compressor_options)
@test pincs(io,1) ≈ 3.0
@test pincs(io,2) ≈ 1.0
@test pincs(io,3) ≈ 1.0
@test pincs(io)[1] ≈ 3.0
@test pincs(io)[2] ≈ 1.0
@test pincs(io)[3] ≈ 1.0
close(io)
rm(io)
end

@testset "pstarts" begin
r = uuid4()
io = csopen_robust(mkcontainer(cloud, "test-$r-cs"), "w", axis_lengths=[10,11,12], axis_pstarts=[1.0,2.0,3.0], compressor=compressor, compressor_options=compressor_options)
Expand Down