Skip to content

Commit

Permalink
Uniqueoffsets (#141)
Browse files Browse the repository at this point in the history
* small fixes for sindbad

* Remove debug show
  • Loading branch information
meggart authored May 23, 2022
1 parent 6d427d6 commit 53c8d8a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions src/DAT/DAT.jl
Original file line number Diff line number Diff line change
Expand Up @@ -484,12 +484,12 @@ function getloopchunks(dc::DATConfig)
ii = findAxis(ax, caxes(ic.cube))
ii === nothing ? nothing : eachchunk(ic.cube.data).chunks[ii]
end
allchunks = filter(!isnothing, allchunks)
allchunks = unique(filter(!isnothing, allchunks))
if length(allchunks) == 1
return to_chunksize(allchunks[1],cs,dc.allow_irregular_chunks)
end
# check if one of the chunks should determine the offset
allchunks = filter(i->mod(cs,approx_chunksize(i))==0, allchunks)
allchunks_offset = filter(i->mod(cs,approx_chunksize(i))==0, allchunks)
allchunks = isempty(allchunks_offset) ? allchunks : allchunks_offset
if length(allchunks) == 1
return to_chunksize(allchunks[1],cs,dc.allow_irregular_chunks)
end
Expand Down
2 changes: 1 addition & 1 deletion src/DAT/registration.jl
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ Axes.findAxis(m::MovingWindow, c) = findAxis(m.desc, c)

wrapWorkArray(::Type{Array}, a, axes) = a
wrapWorkArray(T, a, axes) =
yaxcreate(T, a, map(axname, axes), map(i -> i.values, axes), Dict{String, Any}())
yaxcreate(T, a, map(axsym, axes), map(i -> i.values, axes), Dict{String, Any}())

abstract type ProcFilter end
struct AllMissing <: ProcFilter end
Expand Down

0 comments on commit 53c8d8a

Please sign in to comment.