You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+18-20Lines changed: 18 additions & 20 deletions
Original file line number
Diff line number
Diff line change
@@ -27,7 +27,7 @@ This package can readily be used to develop new transducer array designs by spec
27
27
- Performant:
28
28
- Beamform a 1024 x 1024 image for 256 x 256 transmits/receives in < 2 seconds (RTX 3070)
29
29
- Hardware acceleration via CUDA (Nvidia) or OpenCL (AMD, Apple, Intel, Nvidia), or natively via the [Parallel Computing Toolbox](https://www.mathworks.com/products/parallel-computing.html)
30
-
- Memory efficient classes and methods minimize data storage and computional load
30
+
- Memory efficient classes and methods such as separable beamforming delay and apodization ND-arrays minimize data storage and computational load
31
31
- Batch simulations locally via [`parcluster`](https://www.mathworks.com/help/parallel-computing/parcluster.html) or scale to a cluster with the [MATLAB Parallel Server](https://www.mathworks.com/products/matlab-parallel-server.html) (optional) toolbox.
32
32
33
33
- Modular:
@@ -38,14 +38,14 @@ This package can readily be used to develop new transducer array designs by spec
38
38
- Export or import data between [USTB](https://www.ustb.no/) or [Verasonics](https://verasonics.com/vantage-advantage/) data structures
39
39
40
40
- Intuitive:
41
-
- Native MATLAB semantics with tab auto-completion
41
+
- Native MATLAB semantics with [argument validation](https://www.mathworks.com/help/matlab/matlab_prog/function-argument-validation-1.html) and tab auto-completion
42
42
- Overloaded `plot` and `imagesc` functions for data visualization
43
43
- Documentation via `help` and `doc`
44
44
45
45
46
46
## Installation
47
47
### MATLAB R2023b+ & git
48
-
Starting in MATLAB R2023b+, QUPS and most of it's extension packages can be installed within MATLAB via [buildtool](https://www.mathworks.com/help/matlab/ref/buildtool.html) if you have setup [git for MATLAB](https://www.mathworks.com/help/matlab/matlab_prog/set-up-git-source-control.html).
48
+
Starting in MATLAB R2023b+, QUPS and most of it's extension packages can be installed from within MATLAB via [buildtool](https://www.mathworks.com/help/matlab/ref/buildtool.html) if you have setup [git for MATLAB](https://www.mathworks.com/help/matlab/matlab_prog/set-up-git-source-control.html).
figure; imagesc(us.scan, b); % plot the image (in dB when b is complex)
142
-
dbr b-mode 60; % ... with 60dB dynamic range
140
+
figure; imagesc(us.scan, b); dbr b-mode 60;
143
141
title('B-mode image');
144
142
```
145
143
@@ -169,17 +167,17 @@ If you use any of the extensions, please see their citation policies:
169
167
*[USTB](https://www.ustb.no/citation/)
170
168
171
169
## Parallel Processing with External Packages
172
-
Some QUPS methods, including most simulation and beamforming methods, can be parallelized natively by specifying a `parcluster` or launching a `parallel.ProcessPool` or a `parallel.ThreadPool`. However, restrictions apply.
170
+
Some QUPS methods, including most simulation and beamforming methods, can be parallelized natively by specifying a `parcluster` or launching a `parallel.ProcessPool` or ideally a `parallel.ThreadPool`. However, restrictions apply.
173
171
174
-
Workers in a `parallel.ThreadPool` cannot call mex functions, use GUIs or user inputs, or perform any file operations (reading or writing). Workers in a `parallel.ProcessPool` or `parcluster` do not have these restrictions, but tend to be somewhat slower and require much more memory. All workers are subject to [race conditions](https://en.wikipedia.org/wiki/Race_condition).
172
+
Workers in a `parallel.ThreadPool` cannot call mex functions, use GUIs or user inputs, or perform any file operations (reading or writing)[before R2024a](https://www.mathworks.com/help/parallel-computing/release-notes.html#mw_c7230d70-f9e0-4600-8c6b-3e47ed5396c2). Workers in a `parallel.ProcessPool` or `parcluster` do not have these restrictions, but tend to be somewhat slower and require much more memory. All workers are subject to [race conditions](https://en.wikipedia.org/wiki/Race_condition).
175
173
176
-
Removing race conditions and inaccesible functions in the extension packages will enable native parallelization. The patches described below are applied automatically with the "patch" task via buildtool. Otherwise, you will need to apply the patches manually to enable parallelization.
174
+
Removing race conditions and inaccesible functions in the extension packages will enable native parallelization. The patches described below are applied automatically with the "[patch](https://github.com/thorstone25/qups/edit/main/README.md#matlab-r2023b--git)" task via buildtool. Otherwise, you will need to apply the patches manually to enable parallelization.
177
175
178
176
### [FieldII](https://www.field-ii.dk/)
179
177
FieldII uses [mex](https://www.mathworks.com/help/matlab/call-mex-file-functions.html) functions for all calls, which requires file I/O. This **cannot** be used with a `parallel.ThreadPool`, but can easily be used with a `parallel.ProcessPool` or `parcluster`.
To enable simulating multiple transmits simultaneously using k-Wave binaries, the temporary filename race condition in `kspaceFirstOrder3DC.m` must be removed.
180
+
To enable simulating multiple transmits simultaneously using k-Wave binaries, the temporary filename race condition in `kspaceFirstOrder3DC.m` must be remedied.
183
181
Edit `kspaceFirstOrder3DC.m` and look for an expression setting the temporary folder `data_path = tempdir`. Replace this with `data_path = tempname; mkdir(data_path);` to create a new temporary directory for each worker.
184
182
You may also want to delete this folder after the temporary files are deleted. Record a variable `new_path = true;` if a new directory was created, and place `if new_path, rmdir(data_path); end` at the end of the function. Otherwise, the temporary drive is cleared when the system reboots.
0 commit comments