Skip to content

calcPNS

Calculates peripheral nerve stimulation (PNS) levels using the safe model implementation by Szczepankiewicz and Witzel. The function takes hardware specifications and gradient waveforms as input and returns normalized PNS levels for each axis. It optionally plots the gradient waveforms and can calculate cardiac nerve stimulation (CNS) levels if the hardware data supports it.

Syntax

function [ok, pns_norm, pns_comp, t_axis]=calcPNS(hardware,doPlots,calcCNS)

Calling Pattern

seq.calcPNS(...)

Parameters

Required Parameters

Name Type Description Example Units
hardware string struct Hardware specifications. Can be either a structure generated by safe_example_hw() from the safe_pns_prediction package or a path to a Siemens .asc file (e.g., MP_GPA_K2309_2250V_951A_AS82.asc) containing hardware parameters. path/to/MP_GPA_K2309_2250V_951A_AS82.asc or safe_example_hw()

Optional Parameters

Name Type Default Description Example
doPlots logical true Boolean flag to control whether to plot the gradient waveforms. Defaults to true. Valid values: true, false false
calcCNS logical array false Boolean flag or array to control whether to calculate cardiac nerve stimulation (CNS) instead of or in addition to PNS. If the hardware data supports CNS and this parameter is not provided, it defaults to calculating both PNS and CNS. Defaults to false if CNS data is not available. Valid values: true, false, [false, true]

Returns

Output Type Description
ok logical Logical indicating success or failure of the calculation
pns_norm double Normalized PNS levels (normalized to 1, not 100%). Not explicitly defined in the excerpt but implied by the code
pns_comp double PNS levels for each axis
t_axis double Time axis for the PNS levels

Examples

% Basic PNS calculation for Prisma scanner
[pns, tpns] = seq.calcPNS('idea/asc/MP_GPA_K2309_2250V_951A_AS82.asc');

% PNS check for TERRA-XR scanner
[pns_ok, pns_n, pns_c, tpns] = seq.calcPNS('/rfanfs/pnl-zorro/home/ql087/qiang_gSlider_data/MP_GGA_K2309_2250V_951A_AS82.asc');

See Also

mr.Siemens.readasc