Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tutorial for SimpleMotion creation and simulation #387

Merged
merged 58 commits into from
Jun 3, 2024
Merged
Show file tree
Hide file tree
Changes from 12 commits
Commits
Show all changes
58 commits
Select commit Hold shift + click to select a range
cbda572
Initial
pvillacorta May 1, 2024
dfc6356
Solve rotation bug in `displacement_z`
pvillacorta May 1, 2024
c812ab1
Default `max_spins` to 100000
pvillacorta May 1, 2024
5cec38d
Improve example
pvillacorta May 1, 2024
d710be8
Solve bugs
pvillacorta May 1, 2024
fb5655c
Comment all tests for easy docs preview
pvillacorta May 1, 2024
cc42132
Revert comments
pvillacorta May 1, 2024
41a66b7
Merge branch 'docs-simplemotion' of https://github.com/JuliaHealth/Ko…
pvillacorta May 1, 2024
04c7c2f
Revert comments
pvillacorta May 1, 2024
fd5476d
Merge branch 'docs-simplemotion' of https://github.com/JuliaHealth/Ko…
pvillacorta May 1, 2024
86bb9e4
Revert comments
pvillacorta May 1, 2024
adf5678
Comment CI
pvillacorta May 1, 2024
4e5a42e
Revert comment
pvillacorta May 1, 2024
435fbe4
Minor change
pvillacorta May 1, 2024
9f24700
Merge branch 'master' into docs-simplemotion
cncastillo May 2, 2024
5fc9305
Correct bugs in lit-05-SimpleMotion.jl
pvillacorta May 2, 2024
2a0bb1b
Solve another bug
pvillacorta May 2, 2024
a0d5835
Merge branch 'master' into docs-simplemotion
cncastillo May 5, 2024
0cd06a1
Fix literate badges
cncastillo May 5, 2024
8062bdb
Add InteractiveUtils compat to KomaFiles
cncastillo May 5, 2024
592b85f
Small changes in plot_phantom_map
cncastillo May 5, 2024
f8ae5df
Changes in motion example
cncastillo May 5, 2024
6711697
Removed some boilerplate
cncastillo May 5, 2024
6e74e2e
Syntax highlight in docs
cncastillo May 5, 2024
6f409c5
Minor modifications
cncastillo May 5, 2024
62ee462
Syntax hightlight docs
cncastillo May 5, 2024
58d0ae0
Change figure size
cncastillo May 5, 2024
8534e80
Updated motion example
cncastillo May 5, 2024
bc1b615
Plain text citation, now copy-pastable
cncastillo May 5, 2024
1534ddc
Organize make
cncastillo May 6, 2024
049a0ca
removed node dep
cncastillo May 6, 2024
125c81a
update simple motion example
cncastillo May 6, 2024
8293ca1
Improve SimpleMotion example
pvillacorta May 28, 2024
4252bf4
Minor changes in Simple Motion tutorial
pvillacorta May 28, 2024
f914592
Minor change
pvillacorta May 28, 2024
bbdb64b
Docstrings
pvillacorta May 29, 2024
7aec83e
Minor changes
pvillacorta May 30, 2024
255090c
Try adding image into docstring
pvillacorta May 30, 2024
e025248
Minor change
pvillacorta May 30, 2024
7cdf263
Fix LaTex syntax
pvillacorta May 30, 2024
871ed6a
Fix scape character
pvillacorta May 30, 2024
08bc2a5
Remove comment
pvillacorta May 30, 2024
6195c1c
Merge branch 'master' into docs-simplemotion
pvillacorta May 30, 2024
1e22d54
Try reducing image size
pvillacorta May 31, 2024
b5d22fc
Merge branch 'docs-simplemotion' of https://github.com/JuliaHealth/Ko…
pvillacorta May 31, 2024
0565ce3
Fix reducing image size
pvillacorta May 31, 2024
5913158
Requested changes
pvillacorta May 31, 2024
3c2c8c5
Fix table does not work on docstrings
pvillacorta May 31, 2024
378664a
Change LaTex equation syntax
pvillacorta Jun 2, 2024
58cd73b
Change explanation
pvillacorta Jun 2, 2024
9460d17
Change explanation
pvillacorta Jun 2, 2024
eeea1dc
Change explanation
pvillacorta Jun 2, 2024
662c0fb
Change explanation
pvillacorta Jun 2, 2024
9eedd1d
Minor change in docstring
pvillacorta Jun 2, 2024
4223e7c
Reduce figure size
pvillacorta Jun 2, 2024
099080c
Remove explanation from API docs, leave for "Explanations"
pvillacorta Jun 2, 2024
f3df812
Merge branch 'master' into docs-simplemotion
pvillacorta Jun 2, 2024
f6074ec
Δx -> ux(t) in plot
pvillacorta Jun 3, 2024
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
382 changes: 191 additions & 191 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,191 +1,191 @@
name: CI
on:
pull_request:
branches:
- master
push:
branches:
- master
tags: '*'
jobs:
ci:
if: "!contains(github.event.head_commit.message, '[skip ci]')"
name: Julia ${{ matrix.version }} - ${{ matrix.os }} - ${{ matrix.arch }} - ${{ github.event_name }}
runs-on: ${{ matrix.os }}
timeout-minutes: 60
strategy:
fail-fast: false
matrix:
version:
- '1.9' # Replace this with the minimum Julia version that your package supports. E.g. if your package requires Julia 1.5 or higher, change this to '1.5'.
- '1' # Leave this line unchanged. '1' will automatically expand to the latest stable 1.x release of Julia.
os: [ubuntu-latest, windows-latest, macos-12] # macos-latest]
arch: [x64]
include:
- os: ubuntu-latest
prefix: xvfb-run # julia-actions/julia-runtest/blob/master/README.md
steps:
- uses: actions/checkout@v4
- uses: julia-actions/setup-julia@v1
with:
version: ${{ matrix.version }}
arch: ${{ matrix.arch }}
- uses: actions/cache@v4
env:
cache-name: cache-artifacts
with:
path: ~/.julia/artifacts
key: ${{ runner.os }}-test-${{ env.cache-name }}-${{ hashFiles('**/Project.toml') }}
restore-keys: |
${{ runner.os }}-test-${{ env.cache-name }}-
${{ runner.os }}-test-
${{ runner.os }}-
- name: "KomaMRIBase: Build"
if: '!cancelled()'
uses: julia-actions/julia-buildpkg@v1
with:
project: KomaMRIBase
- name: "KomaMRIBase: Run Tests"
if: '!cancelled()'
uses: julia-actions/julia-runtest@v1
with:
project: KomaMRIBase
- name: "KomaMRICore: Development Setup"
if: '!cancelled()'
shell: bash
run: |
julia --color=yes --project="KomaMRICore" -e "using Pkg; Pkg.develop(PackageSpec(; path=\"./KomaMRIBase\"));"
- name: "KomaMRICore: Build"
if: '!cancelled()'
uses: julia-actions/julia-buildpkg@v1
with:
project: KomaMRICore
- name: "KomaMRICore: Run Tests"
if: '!cancelled()'
uses: julia-actions/julia-runtest@v1
with:
project: KomaMRICore
- name: "KomaMRIFiles: Development Setup"
if: '!cancelled()'
shell: bash
run: |
julia --color=yes --project="KomaMRIFiles" -e "using Pkg; Pkg.develop(PackageSpec(; path=\"./KomaMRIBase\"));"
- name: "KomaMRIFiles: Build"
if: '!cancelled()'
uses: julia-actions/julia-buildpkg@v1
with:
project: KomaMRIFiles
- name: "KomaMRIFiles: Run Tests"
if: '!cancelled()'
uses: julia-actions/julia-runtest@v1
with:
project: KomaMRIFiles
- name: "KomaMRIPlots: Development Setup"
if: '!cancelled()'
shell: bash
run: |
julia --color=yes --project="KomaMRIPlots" -e "using Pkg; Pkg.develop(PackageSpec(; path=\"./KomaMRIBase\"));"
- name: "KomaMRIPlots: Build"
if: '!cancelled()'
uses: julia-actions/julia-buildpkg@v1
with:
project: KomaMRIPlots
- name: "KomaMRIPlots: Run Tests"
if: '!cancelled()'
uses: julia-actions/julia-runtest@v1
with:
project: KomaMRIPlots
prefix: ${{ matrix.prefix }} # for `xvfb-run`
- name: "KomaMRI: Development Setup"
if: '!cancelled()'
shell: julia --color=yes --project {0}
run: |
using Pkg
Pkg.develop([
PackageSpec(path=pwd(), subdir="KomaMRIBase"),
PackageSpec(path=pwd(), subdir="KomaMRICore"),
PackageSpec(path=pwd(), subdir="KomaMRIFiles"),
PackageSpec(path=pwd(), subdir="KomaMRIPlots")
])
- name: "KomaMRI: Build"
if: '!cancelled()'
uses: julia-actions/julia-buildpkg@v1
- name: "KomaMRI: Run Tests"
if: '!cancelled()'
uses: julia-actions/julia-runtest@v1
with:
prefix: ${{ matrix.prefix }} # for `xvfb-run`
- uses: julia-actions/julia-processcoverage@v1
with:
directories: src
- uses: codecov/codecov-action@c16abc29c95fcf9174b58eb7e1abf4c866893bc8 # v4.1.1
with:
files: lcov.info
flags: komamri
token: ${{ secrets.CODECOV_TOKEN }} # required
- uses: julia-actions/julia-processcoverage@v1
with:
directories: KomaMRIBase/src
- uses: codecov/codecov-action@c16abc29c95fcf9174b58eb7e1abf4c866893bc8 # v4.1.1
with:
files: lcov.info
flags: base
token: ${{ secrets.CODECOV_TOKEN }} # required
- uses: julia-actions/julia-processcoverage@v1
with:
directories: KomaMRICore/src
- uses: codecov/codecov-action@c16abc29c95fcf9174b58eb7e1abf4c866893bc8 # v4.1.1
with:
files: lcov.info
flags: core
token: ${{ secrets.CODECOV_TOKEN }} # required
- uses: julia-actions/julia-processcoverage@v1
with:
directories: KomaMRIPlots/src
- uses: codecov/codecov-action@c16abc29c95fcf9174b58eb7e1abf4c866893bc8 # v4.1.1
with:
files: lcov.info
flags: plots
token: ${{ secrets.CODECOV_TOKEN }} # required
- uses: julia-actions/julia-processcoverage@v1
with:
directories: KomaMRIFiles/src
- uses: codecov/codecov-action@c16abc29c95fcf9174b58eb7e1abf4c866893bc8 # v4.1.1
with:
files: lcov.info
flags: files
token: ${{ secrets.CODECOV_TOKEN }} # required
docs:
name: Documentation
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: julia-actions/setup-julia@v1
with:
version: '1'
- run: |
julia --project=docs -e '
using Pkg
Pkg.develop([
PackageSpec(path=pwd(), subdir="."),
PackageSpec(path=pwd(), subdir="KomaMRIBase"),
PackageSpec(path=pwd(), subdir="KomaMRICore"),
PackageSpec(path=pwd(), subdir="KomaMRIFiles"),
PackageSpec(path=pwd(), subdir="KomaMRIPlots")
])
Pkg.instantiate()'
- run: |
julia --project=docs -e '
using Documenter: doctest
using KomaMRI
doctest(KomaMRI)' # change MYPACKAGE to the name of your package
- run: julia --project=docs docs/make.jl
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
DOCUMENTER_KEY: ${{ secrets.DOCUMENTER_KEY }}
Skip:
if: contains(github.event.head_commit.message, '[skip ci]')
runs-on: ubuntu-latest
steps:
- name: Skip CI 🚫
run: echo skip ci
# name: CI
# on:
# pull_request:
# branches:
# - master
# push:
# branches:
# - master
# tags: '*'
# jobs:
# ci:
# if: "!contains(github.event.head_commit.message, '[skip ci]')"
# name: Julia ${{ matrix.version }} - ${{ matrix.os }} - ${{ matrix.arch }} - ${{ github.event_name }}
# runs-on: ${{ matrix.os }}
# timeout-minutes: 60
# strategy:
# fail-fast: false
# matrix:
# version:
# - '1.9' # Replace this with the minimum Julia version that your package supports. E.g. if your package requires Julia 1.5 or higher, change this to '1.5'.
# - '1' # Leave this line unchanged. '1' will automatically expand to the latest stable 1.x release of Julia.
# os: [ubuntu-latest, windows-latest, macos-12] # macos-latest]
# arch: [x64]
# include:
# - os: ubuntu-latest
# prefix: xvfb-run # julia-actions/julia-runtest/blob/master/README.md
# steps:
# - uses: actions/checkout@v4
# - uses: julia-actions/setup-julia@v1
# with:
# version: ${{ matrix.version }}
# arch: ${{ matrix.arch }}
# - uses: actions/cache@v4
# env:
# cache-name: cache-artifacts
# with:
# path: ~/.julia/artifacts
# key: ${{ runner.os }}-test-${{ env.cache-name }}-${{ hashFiles('**/Project.toml') }}
# restore-keys: |
# ${{ runner.os }}-test-${{ env.cache-name }}-
# ${{ runner.os }}-test-
# ${{ runner.os }}-
# - name: "KomaMRIBase: Build"
# if: '!cancelled()'
# uses: julia-actions/julia-buildpkg@v1
# with:
# project: KomaMRIBase
# - name: "KomaMRIBase: Run Tests"
# if: '!cancelled()'
# uses: julia-actions/julia-runtest@v1
# with:
# project: KomaMRIBase
# - name: "KomaMRICore: Development Setup"
# if: '!cancelled()'
# shell: bash
# run: |
# julia --color=yes --project="KomaMRICore" -e "using Pkg; Pkg.develop(PackageSpec(; path=\"./KomaMRIBase\"));"
# - name: "KomaMRICore: Build"
# if: '!cancelled()'
# uses: julia-actions/julia-buildpkg@v1
# with:
# project: KomaMRICore
# - name: "KomaMRICore: Run Tests"
# if: '!cancelled()'
# uses: julia-actions/julia-runtest@v1
# with:
# project: KomaMRICore
# - name: "KomaMRIFiles: Development Setup"
# if: '!cancelled()'
# shell: bash
# run: |
# julia --color=yes --project="KomaMRIFiles" -e "using Pkg; Pkg.develop(PackageSpec(; path=\"./KomaMRIBase\"));"
# - name: "KomaMRIFiles: Build"
# if: '!cancelled()'
# uses: julia-actions/julia-buildpkg@v1
# with:
# project: KomaMRIFiles
# - name: "KomaMRIFiles: Run Tests"
# if: '!cancelled()'
# uses: julia-actions/julia-runtest@v1
# with:
# project: KomaMRIFiles
# - name: "KomaMRIPlots: Development Setup"
# if: '!cancelled()'
# shell: bash
# run: |
# julia --color=yes --project="KomaMRIPlots" -e "using Pkg; Pkg.develop(PackageSpec(; path=\"./KomaMRIBase\"));"
# - name: "KomaMRIPlots: Build"
# if: '!cancelled()'
# uses: julia-actions/julia-buildpkg@v1
# with:
# project: KomaMRIPlots
# - name: "KomaMRIPlots: Run Tests"
# if: '!cancelled()'
# uses: julia-actions/julia-runtest@v1
# with:
# project: KomaMRIPlots
# prefix: ${{ matrix.prefix }} # for `xvfb-run`
# - name: "KomaMRI: Development Setup"
# if: '!cancelled()'
# shell: julia --color=yes --project {0}
# run: |
# using Pkg
# Pkg.develop([
# PackageSpec(path=pwd(), subdir="KomaMRIBase"),
# PackageSpec(path=pwd(), subdir="KomaMRICore"),
# PackageSpec(path=pwd(), subdir="KomaMRIFiles"),
# PackageSpec(path=pwd(), subdir="KomaMRIPlots")
# ])
# - name: "KomaMRI: Build"
# if: '!cancelled()'
# uses: julia-actions/julia-buildpkg@v1
# - name: "KomaMRI: Run Tests"
# if: '!cancelled()'
# uses: julia-actions/julia-runtest@v1
# with:
# prefix: ${{ matrix.prefix }} # for `xvfb-run`
# - uses: julia-actions/julia-processcoverage@v1
# with:
# directories: src
# - uses: codecov/codecov-action@c16abc29c95fcf9174b58eb7e1abf4c866893bc8 # v4.1.1
# with:
# files: lcov.info
# flags: komamri
# token: ${{ secrets.CODECOV_TOKEN }} # required
# - uses: julia-actions/julia-processcoverage@v1
# with:
# directories: KomaMRIBase/src
# - uses: codecov/codecov-action@c16abc29c95fcf9174b58eb7e1abf4c866893bc8 # v4.1.1
# with:
# files: lcov.info
# flags: base
# token: ${{ secrets.CODECOV_TOKEN }} # required
# - uses: julia-actions/julia-processcoverage@v1
# with:
# directories: KomaMRICore/src
# - uses: codecov/codecov-action@c16abc29c95fcf9174b58eb7e1abf4c866893bc8 # v4.1.1
# with:
# files: lcov.info
# flags: core
# token: ${{ secrets.CODECOV_TOKEN }} # required
# - uses: julia-actions/julia-processcoverage@v1
# with:
# directories: KomaMRIPlots/src
# - uses: codecov/codecov-action@c16abc29c95fcf9174b58eb7e1abf4c866893bc8 # v4.1.1
# with:
# files: lcov.info
# flags: plots
# token: ${{ secrets.CODECOV_TOKEN }} # required
# - uses: julia-actions/julia-processcoverage@v1
# with:
# directories: KomaMRIFiles/src
# - uses: codecov/codecov-action@c16abc29c95fcf9174b58eb7e1abf4c866893bc8 # v4.1.1
# with:
# files: lcov.info
# flags: files
# token: ${{ secrets.CODECOV_TOKEN }} # required
# docs:
# name: Documentation
# runs-on: ubuntu-latest
# steps:
# - uses: actions/checkout@v4
# - uses: julia-actions/setup-julia@v1
# with:
# version: '1'
# - run: |
# julia --project=docs -e '
# using Pkg
# Pkg.develop([
# PackageSpec(path=pwd(), subdir="."),
# PackageSpec(path=pwd(), subdir="KomaMRIBase"),
# PackageSpec(path=pwd(), subdir="KomaMRICore"),
# PackageSpec(path=pwd(), subdir="KomaMRIFiles"),
# PackageSpec(path=pwd(), subdir="KomaMRIPlots")
# ])
# Pkg.instantiate()'
# - run: |
# julia --project=docs -e '
# using Documenter: doctest
# using KomaMRI
# doctest(KomaMRI)' # change MYPACKAGE to the name of your package
# - run: julia --project=docs docs/make.jl
# env:
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# DOCUMENTER_KEY: ${{ secrets.DOCUMENTER_KEY }}
# Skip:
# if: contains(github.event.head_commit.message, '[skip ci]')
# runs-on: ubuntu-latest
# steps:
# - name: Skip CI 🚫
# run: echo skip ci
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,9 @@ function displacement_z(
α = t_unit .* motion_type.pitch
β = t_unit .* motion_type.roll
γ = t_unit .* motion_type.yaw
return -sind.(β) .* x + cosd.(β) .* sind.(α) .* y .- z
return -sind.(β) .* x +
cosd.(β) .* sind.(α) .* y +
cosd.(β) .* cosd.(α) .* z .- z
end

function times(motion_type::PeriodicRotation)
Expand Down
Loading
Loading