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

  1. 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.

  2. Set gFactor = [1.0, 1.0, 1.0].
    This means 1 T/m will be translated to an amplitude of 1 for Ocra1/FHDO.

  3. Find the Larmor frequency using the Larmor sequence.

  4. Measure coil efficiency using the RabiFlops sequence.

  5. Perform shimming using the Shimming sequence.

  6. Select the RARE sequence and configure a projection image (e.g., 100×100 pixels).

  7. 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.

  8. Reduce the FOV iteratively until the phantom fully fits the image.

  9. Compute the gFactor:

    $$ gFactor = \frac{\text{fov}}{\text{size}} $$

  10. 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

  1. Connect Tx1 to Rx1 using a coaxial cable.
  2. Set adcFactor = 1.
  3. Run MaRGE and select the FID sequence.
  4. Set the working frequency.
  5. Set excitation amplitude to 1 (112.5 mV baseband amplitude).
  6. Set excitation time to 1 ms.
  7. Set dead time to −1 ms.
  8. Set acquisition time to 4 ms.
  9. 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

  1. Obtain an oscilloscope.
  2. Connect channel 1 to the GPA voltage input.
  3. Connect channel 2 to the GPA current sensor output.
    If unavailable, use a current clamp.
  4. Send a trapezoidal waveform using MaRGE or an external waveform generator.
  5. 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

  1. Run the RabiFlops sequence.
  2. Ensure the Larmor frequency is correct:
    • Set it manually in standalone mode, or
    • Measure it using the Larmor sequence.
  3. Choose RF amplitude between 0 and 1.
  4. Configure RF pulse time sweep range and number of steps.
  5. Set refocusing method = 1 and refocusing pulse time = 0.
  6. Select ECHO as the calibration method.
  7. Apply optimal shimming.
  8. Run the sequence — efficiency is printed in the console.
  9. 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:

Add new RF coils


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).