%Spectra::data_scan

%Spectra::data_scan is a string indexed array (hash) that stores the most recent counter readings and other scalar quantities that appear in the during-scan-macro. The hash is intended to be used by virtual counters. If required, this hash can be extended.

The keys in %Spectra::data_scan are counter, sca and virtual counter names. They can be found by inspecting the during-scan-macro. Here is an example of a virtual counter which returns a normalized SCA value:

if( $method =~ /reset/i)
{
  return 1;
}

if( $method =~ /read/i)
{
  return $Spectra::data_scan{ "SCA1"}/Spectra::doris();
}