Skip to content

Commit

Permalink
Remove unfolding (#10)
Browse files Browse the repository at this point in the history
* remove unfolding

* bump minor version
  • Loading branch information
mastrof authored Jan 10, 2025
1 parent e1c7163 commit 8deb9a9
Show file tree
Hide file tree
Showing 4 changed files with 1 addition and 92 deletions.
2 changes: 1 addition & 1 deletion Project.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name = "MeanSquaredDisplacement"
uuid = "13c93d70-909c-440c-af92-39d48ffa2ba2"
authors = ["Riccardo Foffi <riccardo.foffi@protonmail.com>"]
version = "0.2.1"
version = "0.3.0"

[deps]
Autocorrelations = "b9118d5e-f165-4cbd-b2ae-b030566b7b26"
Expand Down
3 changes: 0 additions & 3 deletions src/MeanSquaredDisplacement.jl
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,4 @@ function imsd(x::AbstractVector, lags=0:size(x,1)-1)
@. S₁ - 2S₂
end


include("unfold.jl")

end # module MeanSquaredDisplacement
59 changes: 0 additions & 59 deletions src/unfold.jl

This file was deleted.

29 changes: 0 additions & 29 deletions test/runtests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -45,33 +45,4 @@ using Test
mb = [imsd(b); repeat([0.0], na-nb)]
divisor = [repeat([2], nb); repeat([1], na-nb)]
@test m (ma .+ mb) ./ divisor

@testset "Unfolding" begin
function wrap(x,L)
s = x
while !(0 s < L)
δ = s < 0 ? +L : s > L ? -L : 0
s += δ
end
return s
end
x = cumsum(rand(1000))
# wrap trajectory between 0 and L
L = 10
y = wrap.(x, L)
z = copy(y)
unfold!(y, L)
@test y x
y2 = unfold(x, L)
@test y2 == y

Lx, Ly = 8.6, 13.0
x = (1:100) .% Lx
y = (1:100) .% Ly
traj = Tuple.(zip(x,y))
utraj = copy(traj)
unfold!(utraj, (Lx, Ly))
@test first.(utraj) == (1:100)
@test last.(utraj) == (1:100)
end
end

2 comments on commit 8deb9a9

@mastrof
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@JuliaRegistrator register()

@JuliaRegistrator
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Registration pull request created: JuliaRegistries/General/122745

Tip: Release Notes

Did you know you can add release notes too? Just add markdown formatted text underneath the comment after the text
"Release notes:" and it will be added to the registry PR, and if TagBot is installed it will also be added to the
release that TagBot creates. i.e.

@JuliaRegistrator register

Release notes:

## Breaking changes

- blah

To add them here just re-invoke and the PR will be updated.

Tagging

After the above pull request is merged, it is recommended that a tag is created on this repository for the registered package version.

This will be done automatically if the Julia TagBot GitHub Action is installed, or can be done manually through the github interface, or via:

git tag -a v0.3.0 -m "<description of version>" 8deb9a915a3e616493bc25a491eba91c821b1b46
git push origin v0.3.0

Please sign in to comment.