// Set pmlgX

aHpmlg = aH90
$pwHpmlg = sqrt(2.0/3.0)*4.0*pwH90
pwHpmlg = 0.1*trunc($pwHpmlg/0.1 + 0.5)
if (nHpmlg < 1.0) then nHpmlg = 1 endif
if ((qHpmlg > -1.0) and (qHpmlg < 1.0)) then qHpmlg = 1 endif

// Reset the PMLG amplitude to match the rounded 2pi pulse.

$aHpmlg = ($pwHpmlg/pwHpmlg)*aHpmlg
aHpmlg = trunc($aHpmlg + 0.5)
