Skip to content

Commit ff0388a

Browse files
authored
Merge pull request #92 from MagneticParticleImaging/nh/inMemoryMdf
2 parents 5c683c4 + 8bcc1a6 commit ff0388a

File tree

74 files changed

+3204
-925
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

74 files changed

+3204
-925
lines changed

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ jobs:
1515
fail-fast: false
1616
matrix:
1717
version:
18-
- '1.9'
18+
- 'lts'
1919
- '1'
2020
#- 'nightly'
2121
os:

CHANGELOG.md

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
# Changelog
2+
3+
## 0.6.0
4+
5+
### Most Important Breaking Changes
6+
- **Breaking**: There have been multiple changes to arguments in the Scanner.toml related to both devices and the scanner, please find a detailed migration guide [https://magneticparticleimaging.github.io/MPIMeasurements.jl/dev/config/upgrade.html#v0.5-to-v0.6](here)
7+
- **Breaking**: the receive transfer function is now defined per receive channel instead of per scanner, this allows the sequence to flexibly select receive channels and assemble the correct TF
8+
9+
### Improved support for arbitrary waveform components
10+
- define an `ArbitraryElectricalComponent` by using an amplitude, phase and base waveform (`values`)
11+
- `values` can either be a vector or the filename to an .h5 file with field "/values" located in the new `Waveforms` folder of the Scanner
12+
- added TX controller for arbitrary waveform components (see next section)
13+
14+
### Updated TxDAQController and Feedback
15+
- completely reworked internals of `TxDAQController` device
16+
- added new `ControlSequence` type structure to implement a tx controller to control arbitrary waveform and DC enabled channels, the type of ControlSequence to be used is automatically detected based on the requirements of the sequence that should be controlled, the old behaviour is implemented as `CrossCouplingControlSequence`
17+
- split `amplitudeAccuracy` and `fieldToVolDeviation` settings into relative and absolute values to improve flexibility, the two conditions are combined as OR
18+
- `phaseAccuracy` has a unit now
19+
- added caching of last control values to increase control speed of repeating measurements
20+
- feedback calibration is now handled as a complex valued, optionally frequency dependent transfer function
21+
- forward calibration of tx channels can now be a complex number to include a phase shift
22+
- removed `correctCrossCoupling` setting from TxDAQControllerParams, if any field sets decouple=true the controller will try to decouple it
23+
24+
25+
### New MPS Measurement Protocol
26+
Updated the `MPSMeasurementProtocol` used to measure hybrid system matrix measurements in an MPS.
27+
New features include:
28+
- offsets are now defined as a `ProtocolOffsetElectricalChannel` directly in the sequence instead of the protocol
29+
- added a wait time per offset channel, to account for slow DC sources. Any data recorded during this settling time will be discarded
30+
- added functionality to RedPitayaDAQ channels to use H-bridges for switching the polarity of DC offsets
31+
- new algorithm ordering the channels to reduce total wait time
32+
- save data in proper system matrix format for hybrid reconstruction
33+
34+
### New MultiSequenceSystemMatrixProtocol
35+
Measures a (hybrid) system matrix that is defined by one `Sequence` per position, this can be used to flexibly vary any component of the field sequence like amplitudes, phases and offsets. The individual measurements will be saved together as frames in a joint MDF file. Between the individual measurements the system can be instructed to wait until the value of a temperature sensor is below a configurable threshhold.
36+
37+
### General Updates
38+
- the phase of signal components can now also be one of {"cosine", "cos", "sine", "sin", "-cosine", "-cos", "-sine", "-sin"} instead of giving the phase directly
39+
- a magnetic field that needs to be decoupled will also require control
40+
- frequency dividers can now be rational, the trajectory length will still be an integer using the lcm of the numerators
41+
- all field amplitudes can now be given as a voltage, circumventing field control
42+
- add `block` keyword argument to `startProtocol` of the ConsoleProtocolHandler to only return from the function when the protocol is finished
43+
- devices now have a config file parameter containing the file from which they were initialized
44+
- re-included implementation for fiber optical temperature sensor (FOTemp.jl)
45+
- small fixes regarding different Isel robot versions
46+
- renamed the `saveAsSystemMatrix` parameter to `saveInCalibFolder`
47+
- removed `defaultSequence` parameter from scanner as the sequence is always defined in the protocol
48+
- small updates to documentation

Project.toml

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,50 +1,56 @@
11
name = "MPIMeasurements"
22
uuid = "a874a27a-e9a7-503d-98b6-bf61df4bb725"
33
authors = ["Tobias Knopp <[email protected]>"]
4-
version = "0.5.0"
4+
version = "0.6.0"
55

66
[deps]
77
DataStructures = "864edb3b-99cc-5e75-8d2d-829cb0a9cfe8"
88
Dates = "ade2ca70-3891-5945-98fb-dc099432e06a"
99
DocStringExtensions = "ffbed154-4ef7-542d-bbb7-c09d3a79fcae"
10+
FFTW = "7a1cc6ca-52ef-59f5-83cd-3a7055c09341"
1011
HDF5 = "f67ccb44-e63f-5c2f-98bd-6dc0ccc4ba2f"
1112
InteractiveUtils = "b77e0a4c-d291-57a0-90e8-8db25a27a240"
1213
LibSerialPort = "a05a14c7-6e3b-5ba9-90a2-45558833e1df"
1314
LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e"
1415
MPIFiles = "371237a9-e6c1-5201-9adb-3d8cfa78fa9f"
1516
MacroTools = "1914dd2f-81c6-5fcd-8719-6d5c9610ff09"
1617
Mmap = "a63ad114-7e13-5084-954f-fe012c677804"
18+
NaturalSort = "c020b1a1-e9b0-503a-9c33-f039bfc54a85"
1719
ProgressMeter = "92933f4c-e287-5a05-a399-4b506db050ca"
1820
REPL = "3fa0cd96-eef1-5676-8a61-b3b8758bbffb"
1921
RedPitayaDAQServer = "c544963a-496b-56d4-a5fe-f99a3f174c8f"
20-
Reexport = "189a3867-3050-52da-a836-e630ba90ab69"
22+
RelocatableFolders = "05181044-ff0b-4ac5-8273-598c1e38db00"
2123
ReplMaker = "b873ce64-0db9-51f5-a568-4457d8e49576"
2224
Scratch = "6c6a2e73-6563-6170-7368-637461726353"
2325
Sockets = "6462fe0b-24de-5631-8697-dd941f90decc"
26+
Statistics = "10745b16-79ce-11e8-11f9-7d13ad32a3b2"
2427
StringEncodings = "69024149-9ee7-55f6-a4c4-859efe599b68"
2528
TOML = "fa267f1f-6049-4f14-aa54-33bafae1ed76"
2629
ThreadPools = "b189fb0b-2eb5-4ed4-bc0c-d34c51242431"
2730
UUIDs = "cf7118a7-6976-5b1a-9a39-7adc72f591a4"
31+
UnicodePlots = "b8865327-cd53-5732-bb35-84acbb429228"
2832
Unitful = "1986cc42-f94f-5a68-af5c-568840ba703d"
2933

3034
[compat]
3135
Aqua = "0.8"
3236
DataStructures = "0.18, 0.19"
3337
Dates = "1"
3438
DocStringExtensions = "0.8, 0.9"
39+
FFTW = "1.8"
3540
HDF5 = "0.16, 0.17"
3641
InteractiveUtils = "1"
3742
LibSerialPort = "0.5.2"
3843
LinearAlgebra = "1"
39-
MPIFiles = "0.14.2, 0.15, 0.16, 0.17"
44+
MPIFiles = "0.15,0.16,0.17"
4045
MacroTools = "0.5.6"
4146
Mmap = "1"
47+
NaturalSort = "1"
4248
Pkg = "1"
4349
Plots = "1.39"
4450
ProgressMeter = "1.5"
4551
REPL = "1"
46-
RedPitayaDAQServer = "0.6, 0.7, 0.8, 0.10"
47-
Reexport = "0.2, 1.0"
52+
RedPitayaDAQServer = "0.6, 0.7, 0.8, 0.9, 0.10, 0.11"
53+
RelocatableFolders = "1"
4854
ReplMaker = "0.2.7"
4955
Scratch = "1.1.0"
5056
Sockets = "1"
@@ -54,8 +60,9 @@ TOML = "1"
5460
Test = "1"
5561
ThreadPools = "2.1.1"
5662
UUIDs = "1"
63+
UnicodePlots = "3"
5764
Unitful = "1.13, 1.14, 1.15, 1.16, 1.17"
58-
julia = "1.9"
65+
julia = "1.10"
5966

6067
[extras]
6168
Aqua = "4c88cf16-eb10-579e-8560-4a9242c79595"

config/SimpleRedPitayaScanner/Scanner.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ topology = "FFL"
77
gradient = "42T/m"
88
#datasetStore = "/opt/data/HeadScanner"
99
datasetStore = "~/.mpi/Data"
10-
defaultSequence = "1DSequence"
1110
defaultProtocol = "MPIMeasurement"
1211
producerThreadID = 2
1312
consumerThreadID = 3

config/SimpleSimulatedScanner/Scanner.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ name = "SimpleSimulatedScanner"
66
topology = "FFL" # Of course ;)
77
gradient = "42T/m" # Note: This is later parsed with Unitful
88
datasetStore = "/home/foerger/Documents/DatasetStores/store1"
9-
defaultSequence = "1DSequence"
109
defaultProtocol = "MPIMeasurement"
1110
producerThreadID = 2
1211
consumerThreadID = 3

docs/make.jl

Lines changed: 17 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -7,39 +7,42 @@ using Unitful
77
makedocs(
88
sitename = "MPIMeasurements",
99
authors = "Tobias Knopp et al.",
10-
format = Documenter.HTML(prettyurls = false),
10+
format = Documenter.HTML(prettyurls = false, size_threshold = 500000,),
1111
modules = [MPIMeasurements],
1212
pages = [
1313
"Home" => "index.md",
1414
"Installation" => "installation.md",
15-
"Framework" => Any[
15+
"Framework Explanations" => Any[
1616
"Scanner" => "framework/scanner.md",
1717
"Devices" => "framework/devices.md",
1818
"Sequences" => "framework/sequences.md",
1919
"Protocols" => "framework/protocols.md",
2020
"Examples" => "framework/examples.md",
2121
],
22+
"Configuration Files / Parameters" => Any[
23+
"Upgrade Guide" => "config/upgrade.md",
24+
"Scanner" => "config/scanner.md",
25+
"Devices" => "config/devices.md",
26+
"Sequences" => "config/sequence.md",
27+
"Protocols" => "config/protocols.md",
28+
],
2229
"Library" => Any[
2330
"Framework" => Any[
2431
"Scanner" => "lib/framework/scanner.md",
2532
"Device" => "lib/framework/device.md",
2633
"Sequence" => "lib/framework/sequence.md",
2734
"Protocol" => "lib/framework/protocol.md",
2835
],
29-
"Base" => Any[
30-
"Devices" => Any[
31-
"Robots" => Any[
32-
"Interface" => "lib/base/devices/robots/interface.md",
33-
"Isel" => "lib/base/devices/robots/isel.md"
34-
],
35-
"Virtual" => Any[
36-
"Serial Port Pool" => "lib/base/devices/virtual/serialportpool.md",
37-
]
36+
37+
"Devices" => Any[
38+
"Robots" => Any[
39+
"Interface" => "lib/base/devices/robots/interface.md",
40+
"Isel" => "lib/base/devices/robots/isel.md"
3841
],
39-
"Protocols" => Any[
40-
"MPIMeasurement" => "lib/base/protocols/mpimeasurement.md"
42+
"Virtual" => Any[
43+
"Serial Port Pool" => "lib/base/devices/virtual/serialportpool.md",
4144
]
42-
]
45+
],
4346
],
4447
],
4548
warnonly = [:docs_block, :autodocs_block, :cross_references],

docs/src/config/devices.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# Device Parameters
2+
## DAQ
3+
```@docs
4+
MPIMeasurements.RedPitayaDAQParams
5+
MPIMeasurements.RedPitayaLUTChannelParams
6+
MPIMeasurements.DAQRxChannelParams
7+
MPIMeasurements.DAQTxChannelParams
8+
```
9+
10+
## TxController
11+
```@docs
12+
MPIMeasurements.TxDAQControllerParams
13+
```

docs/src/config/protocols.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
# Protocols
2+
3+
```@autodocs
4+
Modules = [MPIMeasurements]
5+
Filter = t -> typeof(t) === DataType && t <: MPIMeasurements.ProtocolParams
6+
```

docs/src/config/scanner.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
# Scanner Parameters
2+
```@docs
3+
MPIMeasurements.MPIScannerGeneral
4+
```

docs/src/config/sequence.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# Sequence Parameters
2+
## Magnetic Field
3+
```@docs
4+
MagneticField
5+
```
6+
7+
## Channels
8+
```@autodocs
9+
Modules = [MPIMeasurements]
10+
Filter = t -> typeof(t) === DataType && t <: MPIMeasurements.TxChannel
11+
```
12+
13+
## Components
14+
```@autodocs
15+
Modules = [MPIMeasurements]
16+
Filter = t -> typeof(t) === DataType && t <: MPIMeasurements.ElectricalComponent
17+
```

0 commit comments

Comments
 (0)