Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
122 commits
Select commit Hold shift + click to select a range
93bb226
Create test.ipynb
djps May 31, 2024
2d18806
Created using Colab
djps May 31, 2024
d04f39f
Created using Colab
djps May 31, 2024
db3cd19
Merge branch 'waltsims:master' into pstdelastic3D
djps Jul 1, 2024
50d9e7a
elastic wave propagation setup
djps Jul 1, 2024
568009d
fix ruff errors
djps Jul 1, 2024
04ca59b
fix ruff errors
djps Jul 1, 2024
5cd5fcc
scaling
djps Jul 2, 2024
be124cf
grid sizes
djps Jul 2, 2024
09156d8
Merge branch 'waltsims:master' into pstdelastic3D
djps Jul 3, 2024
1683956
runs through
djps Jul 5, 2024
c8606f8
first working version
djps Jul 7, 2024
590ff13
Merge branch 'waltsims:master' into pstdelastic3D
djps Jul 7, 2024
c2493a8
first working version: fix for python 3.9 tests
djps Jul 7, 2024
f724667
Merge branch 'pstdelastic3D' of https://github.com/djps/k-wave-python…
djps Jul 7, 2024
62e1a93
first working versiion: typo
djps Jul 7, 2024
0786571
first working versiion: ruff errors
djps Jul 7, 2024
295bc5d
first working version: ruff errors
djps Jul 7, 2024
1394f27
Merge branch 'waltsims:master' into pstdelastic3D
djps Jul 24, 2024
5437450
examples
djps Jul 25, 2024
4339db7
Merge branch 'pstdelastic3D' of https://github.com/djps/k-wave-python…
djps Jul 25, 2024
9d60e7a
loop for s_xx
djps Jul 30, 2024
44543d7
loops for syy and sxy and example
djps Jul 31, 2024
7a99c1a
draft example
djps Jul 31, 2024
8c54359
example which runs through
djps Aug 2, 2024
297882c
attempt first ruff error free 3d
djps Aug 5, 2024
73467f2
revert minor changes
djps Aug 5, 2024
61093d7
revert minus one in matlab_find
djps Aug 5, 2024
c7b1017
3d simulations
djps Aug 6, 2024
ac1ef01
consistent cuboid lengths
djps Aug 6, 2024
483ec42
tidying
djps Aug 6, 2024
cda5ae1
tidying
djps Aug 14, 2024
7c549b4
minor fixes
djps Aug 14, 2024
656e0d3
working 3d example
djps Aug 15, 2024
b594a71
focus handles arrays
djps Aug 15, 2024
46fd430
handling on multiple cuboid corners
djps Aug 15, 2024
34ae934
2d sims
djps Aug 16, 2024
ce15c18
2d sims
djps Aug 16, 2024
72a04c4
remove redundant comments
djps Aug 16, 2024
e0c7c4f
tidy for branching
djps Aug 19, 2024
d3cc02b
tidy example for branching
djps Aug 19, 2024
8f8fd53
failing tests
djps Aug 21, 2024
95ff97e
failing tests
djps Aug 23, 2024
24dc2d8
Merge branch 'waltsims:master' into pstdelastic3D
djps Aug 27, 2024
730851e
new pst_elastic_3d tests
djps Aug 30, 2024
74f1cc6
update tests
djps Sep 3, 2024
b246b6e
Merge branch 'waltsims:master' into pstdelastic3D
djps Sep 5, 2024
0c7bacf
bug fix
djps Sep 10, 2024
696b5d9
working test
djps Sep 10, 2024
936dfb3
passing tests and fixes
djps Sep 10, 2024
b43b64e
running, failing test
djps Sep 13, 2024
c2d75ad
add another test
djps Sep 17, 2024
6315859
test partial success
djps Sep 19, 2024
a2ff5f3
update with working tests
djps Sep 27, 2024
a299fba
Delete tests/test_pstd_elastic_3d_mpml_stability.py
djps Sep 27, 2024
6abb94d
disable failing tests
djps Sep 27, 2024
8f5d882
Merge branch 'pstdelastic3D' of https://github.com/djps/k-wave-python…
djps Sep 27, 2024
a02a0a4
disable failing tests
djps Sep 27, 2024
11d3c4d
update with latest
djps Sep 27, 2024
8389bf2
fixes
djps Sep 27, 2024
96ea282
update ksource
djps Sep 27, 2024
66b93e9
batch update
djps Sep 27, 2024
1320db1
update main scripts
djps Sep 29, 2024
cbe3271
typo
djps Sep 29, 2024
8a16bee
don't try to write None in hdf5 file
djps Sep 30, 2024
113002d
attemp fix mapgen
djps Sep 30, 2024
c2c5c63
remove print statement
djps Oct 1, 2024
936e8c2
pass ruff
djps Oct 1, 2024
d7d8980
pass more output when fails
djps Oct 1, 2024
f1a48ff
slightly less strict tol
djps Oct 1, 2024
9bb2fcf
revert
djps Oct 1, 2024
df21516
typo
djps Oct 1, 2024
e5d8019
typo
djps Oct 1, 2024
5369f72
remove none
djps Oct 1, 2024
18f2346
revert blank sensor
djps Oct 2, 2024
dd96f7f
make sensor explicit
djps Oct 2, 2024
03cba82
formatting
djps Oct 18, 2024
aeb6a68
load everything
djps Oct 18, 2024
7bd5f60
fix for passing with old update
djps Oct 18, 2024
fb8f41e
update branch
djps Oct 18, 2024
ba5ca1d
Merge remote-tracking branch 'upstream/master' into pstdelastic3D
djps Oct 18, 2024
645ae6a
update to merge master in elastic
djps Oct 18, 2024
e28a260
change default argument
djps Oct 18, 2024
dfd9bbf
update tests
djps Dec 8, 2024
003e12c
tests WIP
djps Dec 10, 2024
b1a6a9d
typo in adding source term
djps Dec 10, 2024
43f4e0f
change materialProperties
djps Dec 10, 2024
07aef82
typo
djps Dec 11, 2024
986ff30
updates
djps Dec 13, 2024
c96f981
updates
djps Dec 17, 2024
ce31a22
wip
djps Dec 17, 2024
368746b
WIP
djps Dec 18, 2024
1bdd984
add examples
djps Jan 9, 2025
8c0527d
update of WIP
djps Jan 17, 2025
b6e3550
update gitignore
djps Jan 17, 2025
b56b4a1
now with 1d acoustic
djps Aug 9, 2025
48b6414
Update test_example.yml
djps Aug 11, 2025
088a4f7
update workflows
djps Aug 11, 2025
c0a4af5
fix ruff errors pt 1
djps Aug 11, 2025
30ab7fe
update python version
djps Aug 11, 2025
2f6d990
fixes for ruff
djps Aug 11, 2025
cee6d82
test fixes
djps Aug 12, 2025
cce03fc
fix empty line
djps Aug 12, 2025
ee03bd3
update optional requirments
djps Aug 12, 2025
8cb3ec2
Update test_example.yml
djps Aug 12, 2025
9ebfced
Update test_example.yml
djps Aug 12, 2025
8d12dd0
fix sensor_x declarations
djps Aug 12, 2025
fba263c
Merge branch 'pstdelastic3D' of https://github.com/djps/k-wave-python…
djps Aug 12, 2025
3cf4b55
remove 3.13
djps Aug 12, 2025
04239fd
Update test_example.yml
djps Aug 12, 2025
565eecc
Update pyproject.toml
djps Aug 21, 2025
3086248
Update pytest.yml
djps Aug 21, 2025
8ccceac
Update test_example.yml
djps Aug 21, 2025
11f29ba
update test_optional_deps
djps Aug 21, 2025
fd1a961
add pytest.ini
djps Aug 21, 2025
62a3b8a
matlab mask types
djps Aug 21, 2025
63ba777
change int type in matlab_mask
djps Aug 22, 2025
2d08416
direct import of INT
djps Aug 22, 2025
dd21933
revert to int
djps Aug 22, 2025
43b2b67
remove type checking on diff argument in mask
djps Aug 22, 2025
a949785
remove another type check unflatten_matlab_mask
djps Aug 22, 2025
654eff9
try cast and copy
djps Aug 22, 2025
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
25 changes: 25 additions & 0 deletions .github/workflows/codespell.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: Spell Check

on:
push:
branches: [ main ]
pull_request:
branches: [ main ]

jobs:
spellcheck:
name: Spell Check
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3

- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.10'

- name: Install codespell
run: pip install codespell

- name: Run codespell
run: codespell --config .codespellrc
7 changes: 3 additions & 4 deletions .github/workflows/pytest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,23 +58,22 @@ jobs:
files: |
./collectedValues
outPath: collectedValues.tar.gz
- name: upload reference values artifact
- name: Upload reference values artifact
id: artifact-upload-step
if: ${{ steps.matlab-refs-cache.outputs.cache-hit != 'true' }}
uses: actions/upload-artifact@v4
with:
name: matlab_reference_test_values
path: collectedValues.tar.gz
# overwrite: true

- name: Output artifact URL
if: ${{ steps.matlab-refs-cache.outputs.cache-hit != 'true' }}
run: echo 'Artifact URL is ${{ steps.artifact-upload-step.outputs.artifact-url }}'
test:
needs: collect_references
strategy:
matrix:
os: [ "windows-latest", "ubuntu-latest" , "macos-latest"]
python-version: [ "3.9", "3.10", "3.11", "3.12" ]
python-version: [ "3.10", "3.11", "3.12", "3.13" ]
runs-on: ${{matrix.os}}
steps:
- uses: actions/checkout@v4
Expand Down
56 changes: 56 additions & 0 deletions .github/workflows/run-examples.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
name: Run K-Wave Examples

on:
schedule:
- cron: '0 0 * * 1' # Every Monday at 00:00 UTC
workflow_dispatch: # Manual trigger

jobs:
discover-examples:
runs-on: ubuntu-latest
outputs:
example_paths: ${{ steps.find-examples.outputs.examples }}
steps:
- uses: actions/checkout@v4
- id: find-examples
run: |
# Find all Python files in examples subdirectories
EXAMPLES=$(find examples -name "*.py" -not -path "*/\.*" | jq -R -s -c 'split("\n")[:-1]')
echo "examples=$EXAMPLES" >> "$GITHUB_OUTPUT"

run-examples:
needs: discover-examples
runs-on: ubuntu-latest
timeout-minutes: 60 # 1 hour timeout per example
strategy:
fail-fast: false # Continue running other examples even if one fails
matrix:
example: ${{ fromJson(needs.discover-examples.outputs.example_paths) }}

steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Install system dependencies
run: |
sudo apt-get update
sudo apt-get install -y ffmpeg

- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.10' # Matches requires-python from pyproject.toml
cache: 'pip'

- name: Install dependencies
run: |
python -m pip install --upgrade pip
# Install the package with example dependencies
pip install -e ".[example]"

- name: Run example
env:
KWAVE_FORCE_CPU: 1
run: |
echo "Running example: ${{ matrix.example }}"
python "${{ matrix.example }}"
4 changes: 2 additions & 2 deletions .github/workflows/test_example.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ jobs:
strategy:
matrix:
os: [ "windows-latest", "ubuntu-latest" , "macos-latest"]
python-version: [ "3.9", "3.10", "3.11", "3.12"]
python-version: [ "3.10", "3.11", "3.12", "3.13" ]
runs-on: ${{matrix.os}}
steps:
- uses: actions/checkout@v4
Expand All @@ -23,7 +23,7 @@ jobs:
run: |
python3 examples/us_bmode_linear_transducer/us_bmode_linear_transducer.py
- name: Upload example results
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: example_bmode_reconstruction_results_${{ matrix.os }}_${{ matrix.python-version }}
path: ${{ github.workspace }}/example_bmode.png
4 changes: 2 additions & 2 deletions .github/workflows/test_optional_dependencies.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
strategy:
matrix:
os: [ "windows-latest", "ubuntu-latest" , "macos-latest"]
python-version: [ "3.9", "3.10", "3.11", "3.12" ]
python-version: [ "3.10", "3.11", "3.12", "3.13" ]
extra_requirements: [ "test", "examples", "docs", "dev", "all" ]
runs-on: ${{matrix.os}}
steps:
Expand All @@ -26,4 +26,4 @@ jobs:
cache: 'pip'
- name: Install dependencies
run: |
pip install '.[${{ matrix.extra_requirements }}]'
pip install '.[${{ matrix.extra_requirements }}]'
4 changes: 2 additions & 2 deletions .github/workflows/test_pages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@ jobs:
fetch-depth: 0 # otherwise, you will fail to push refs to dest repo
- uses: actions/setup-python@v5
with:
python-version: '3.9'
python-version: '3.10'
cache: 'pip'
- name: Build and Commit
uses: waltsims/[email protected]
with:
pyproject_toml_deps: ".[docs]"
pyproject_toml_deps: ".[docs]"
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -44,3 +44,8 @@ tests/reference_outputs
kspaceFirstOrder-*_metadata.json


*.nii
*.vtk
*.vtk
examples/benchmarks/8/runner.log
*.vtk
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@
amp_on_axis = amp[:, Ny // 2]

# define axis vectors for plotting
x_vec = kgrid.x_vec[source_x_offset + 1 :, :] - kgrid.x_vec[source_x_offset]
x_vec = kgrid.x_vec[source_x_offset + 1: -1, :] - kgrid.x_vec[source_x_offset]
y_vec = kgrid.y_vec

# =========================================================================
Expand Down
Loading