Hardware configuration - josalggui/MaRGE GitHub Wiki
Hardware Configuration Notes
This section describes the hardware parameters included in the hw_config.py file.
gFactor Setting
The gFactor is a list of three float numbers that allows MaRGE to convert from T/m to the Ocra1/FHDO required amplitude.
These factors depend on:
- Gradient board used
- Gradient power amplifier
- Gradient coil efficiency
Calibration is required before running gradients for the first time. One possible step-by-step configuration method is described below (other methods may also be used).
Calibration Procedure
-
Introduce a well-known phantom into your scanner.
Example: a cylinder with 10 cm diameter and 10 cm length filled with water and copper sulfate. -
Set
gFactor = [1.0, 1.0, 1.0].
This means 1 T/m will be translated to an amplitude of 1 for Ocra1/FHDO. -
Find the Larmor frequency using the
Larmorsequence. -
Measure coil efficiency using the
RabiFlopssequence. -
Perform shimming using the
Shimmingsequence. -
Select the
RAREsequence and configure a projection image (e.g., 100×100 pixels). -
Select a large field of view (FOV), about one order of magnitude larger than your scanner FOV, and run the sequence.
The image should appear much smaller than the selected FOV. -
Reduce the FOV iteratively until the phantom fully fits the image.
-
Compute the gFactor:
$$ gFactor = \frac{\text{fov}}{\text{size}} $$
-
Repeat for the remaining axis.
Alternative Analytical Method
If you know:
- Gradient coil efficiency (T/m/A)
- Gradient transconductance (A/V)
- Board output voltage gain (V/unit)
Then:
gFactor = efficiency × transconductance × gain
Example
gFactor = 0.00025\,\text{T/m/A} \times 5\,\text{A/V} \times 10\,\text{V/unit} = 0.0125\,\text{T/m/unit}
adcFactor Setting
The adcFactor parameter converts Red Pitaya signal measurements into mV.
This is especially useful for noise measurements.
A default value is provided in hw_config.py, but this parameter is frequency-dependent and must be calibrated at the working frequency.
Calibration Procedure
- Connect Tx1 to Rx1 using a coaxial cable.
- Set
adcFactor = 1. - Run MaRGE and select the
FIDsequence. - Set the working frequency.
- Set excitation amplitude to 1 (112.5 mV baseband amplitude).
- Set excitation time to 1 ms.
- Set dead time to −1 ms.
- Set acquisition time to 4 ms.
- Run the sequence.
After running, the observed signal amplitude should correspond to 112.5 mV.
Formula
$$ \mathrm{adcFactor} = \frac{112.5}{Y_{\mathrm{out}}} $$
where $Y_{\mathrm{out}}$ is the measured amplitude.
Note
The Red Pitaya output amplitude may be frequency dependent. Verify using an oscilloscope with a 50 Ω load.
Gradient Delay
The gradient delay parameter compensates for the delay between GPA input voltage and output current waveforms.
This keeps gradients synchronized with the sequence timing.
Measurement Procedure
- Obtain an oscilloscope.
- Connect channel 1 to the GPA voltage input.
- Connect channel 2 to the GPA current sensor output.
If unavailable, use a current clamp. - Send a trapezoidal waveform using MaRGE or an external waveform generator.
- Measure the delay between voltage and current waveforms.
RFPA De-blanking Time
The RFPA de-blanking time specifies how long the RF power amplifier needs to switch on before transmission.
- RFPA is enabled during excitation.
- RFPA is disabled during reception to avoid LNA noise coupling.
This value is typically given in the RFPA datasheet.
RF Coils
The RF coil parameter is a dictionary listing antennas and their efficiencies.
Efficiency Measurement Procedure
- Run the
RabiFlopssequence. - Ensure the Larmor frequency is correct:
- Set it manually in standalone mode, or
- Measure it using the
Larmorsequence.
- Choose RF amplitude between 0 and 1.
- Configure RF pulse time sweep range and number of steps.
- Set refocusing method = 1 and refocusing pulse time = 0.
- Select ECHO as the calibration method.
- Apply optimal shimming.
- Run the sequence — efficiency is printed in the console.
- Record the time for the first minimum ($\pi$ flip angle).
Efficiency Formula
$$ \varepsilon = \frac{\pi}{\text{Amplitude} \times t_{\pi}} $$
where:
- $\varepsilon$ = efficiency
- Amplitude = RF amplitude (0–1)
- $t_{\pi}$ = time for $\pi$ flip angle
More details:
lnaGain Setting
The lnaGain parameter is used by the Noise sequence to estimate the Johnson noise limit.
- Value in dB
- Represents total receive chain gain
- Found in the LNA datasheet or measured using:
- Network analyzer
- Signal generator + oscilloscope
RFPA Model and GPA Model
These parameters enable remote control of the RFPA and GPA modules.
An MRILab interlock hardware module is required.
rfpa_model— only"Barthel"supported; otherwise use""gpa_model— only"Barthel"supported; otherwise use""
Hardware available from MRILab, CSIC (Valencia).