ScanImage 2018 : Class Data Files

Description:

The 'Class Data Files' are produced by ScanImage to save and configure the preferences of various hardware and software components during startup.

 

Directory Location:

<ScanImage Application Directory>/ConfigData/

 

Functions:

scanimage.util.function resetClassDataFiles(dataDir)

 

 

Example Files:

  • Motors_classData.mat
  • ResScanner_classData.mat
  • LinScan_LinScanner_classData.mat
  • FastZ_classData.mat

 

File descriptions:

Motors_classData.mat

This file has 14 variables inside called backlashCompensationmotorToRefTransformscanimageToMotorTF.

backlashCompensation

backlashCompensation = [0 0 0];         %numeric, vector of 3: compensates the backlash of the stage by overshooting the target position and moving to the targetPosition consistently from the same side; values determine the amount of overshoot
% These variables still need to be documented
motorToRefTransform
scanimageToMotorTF


ResScanner_classData.mat

This file has 14 variables inside called galvoCalibration, keepResonantScannerOn, linePhaseMap_ks, linePhaseMap_vs, linePhaseMode, resFov2VoltsMap_ks, resFov2VoltsMap_nom_max, resFov2VoltsMap_vs, resonantLimitedFovMode, scanFreqMap_ks, scanFreqMap_vs, scanFreqNominal, scannerToRefTransform, and useNonlinearResonantFov2VoltsCurve.

galvoCalibration

% The galvoCalibration structure includes either the xGalvo or yGalvo attribute or both. The contents of this structure depends on the scan
% configuration. Both of these attributes have two variables called feedVoltageInterpolant and offsetVoltScaling. These attributes are set to the 
% calibrationData attribute of the scanimage.mroi.scanners.Galvo() object.
 
 
galvoCalibration_ = obj.getClassDataVar('galvoCalibration',obj.classDataFileName);
if isstruct(galvoCalibration_) && isfield(galvoCalibration_,'xGalvo') && ~isempty(obj.xGalvo)
	obj.xGalvo.calibrationData = galvoCalibration_.xGalvo;
end
            
if isstruct(galvoCalibration_) && isfield(galvoCalibration_,'yGalvo') && ~isempty(obj.yGalvo)
	obj.yGalvo.calibrationData = galvoCalibration_.yGalvo;
end

keepResonantScannerOn

keepResonantScannerOn = false;  % Indicates that resonant scanner should always be on. Avoids settling time and temperature drift

linePhaseMode

 linePhaseMode = 'Nearest Neighbor';   % Specifies method for estimating line phase if it is not measured at the current resonant amplitude
        % Note: This is all just guessing. The user must either explicitly
        % set scan phases for all zoom levels or we have to make a way for
        % the scanner to automatically set the scan phase for perfect bidi
        % alignment.
        %
        % Interpolate:      Linearly interpolate between next lower and next
        %                   higher zoom factor with a set scan phase.
        % Nearest Neighbor: Choose between scan phase of next lower and next
        %                   higher zoom factor with a set scan phase, whichever zoom factor is
        %                   closest to current.
        % Next Lower:       Choose the scan phase of the next lower zoom factor
        %                   with a set scan phase.
        % Next Higher:      Choose the scan phase of the next higher zoom factor
        %                   with a set scan phase.

linePhaseMap_ks, linePhaseMap_vs, resFov2VoltsMap_ks, resFov2VoltsMap_nom_max, resFov2VoltsMap_vs, resonantLimitedFovMode, scanFreqMap_ks, scanFreqMap_vs, scanFreqNominal

linePhaseMap;                   % containers.Map() that holds the LUT values for scan phase. Saved on acq abort to class data file.
 
scanFreqMap;                    % containers.Map() that holds the LUT values for scan frequency. Saved on acq abort to class data file.
 
resFov2VoltsMap;                % containers.Map() that holds the LUT values for scan angle to voltage conversion to correct for non linearity
 
resonantLimitedFovMode = true;  % [logical] defines if the resonant scanner range should define the maximum range of the x-scan
 
scanFreqNominal_ = obj.getClassDataVar('scanFreqNominal',obj.classDataFileName); % Sets nominal scan frequency which should match the value in the MDF 

scannerToRefTransform, and useNonlinearResonantFov2VoltsCurve, resFov2VoltsMap_nom_max

 
%These variables still needs to be documented
useNonlinearResonantFov2VoltsCurve
scannerToRefTransform
resFov2VoltsMap_nom_max

 

LinScan_LinScanner_classData.mat

galvoCalibration

% This file has two variables inside called galvoClibration and scannerToRef. The structure galvoCalibration includes either the xGalvo or yGalvo 
% attribute or both. Both of these attributes have two variables called feedVoltageInterpolant and offsetVoltScaling. These attributes are set to 
% the calibrationData attribute of the scanimage.mroi.scanners.Galvo() object.
 
galvoCalibration_ = obj.getClassDataVar('galvoCalibration',obj.classDataFileName);
if isstruct(galvoCalibration_) && isfield(galvoCalibration_,'xGalvo') && ~isempty(obj.xGalvo)
	obj.xGalvo.calibrationData = galvoCalibration_.xGalvo;
end
            
if isstruct(galvoCalibration_) && isfield(galvoCalibration_,'yGalvo') && ~isempty(obj.yGalvo)
	obj.yGalvo.calibrationData = galvoCalibration_.yGalvo;
end

 

FastZ_classData.mat

This file has 2 variables inside called fastZCalibrations and zAlignments.

fastZCalibrations

fastZCalibrations;               % stores the calibration data - feedbackVoltInterpolant, offsetVoltScaling
% This variable still needs to be documented
zAlignments