Skip to content

Commit

Permalink
added helptext, finished pspm_pupil_pp_options
Browse files Browse the repository at this point in the history
  • Loading branch information
4gwe committed Jan 24, 2025
1 parent 04c80af commit c26064d
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 9 deletions.
2 changes: 1 addition & 1 deletion src/pspm_pupil_pp.m
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@
% ├─────.end : [decimal][Unit: second] Ending time of the segment.
% ├────.name : [string] Name of the segment. Segment will be stored by this name.
% ├.plot_data: [Boolean][Default: false or 0] Plot the preprocessing steps.
% ├─.chan_valid_cutoff : [optional][Default: 0.01]
% ├─.chan_valid_cutoff : [optional][Default: 0.2]
% │ A cut-off value for checking whether there are too many missing values
% │ in a data channel for combination. If the difference in
% │ missing data percentage between the two channels exceeds
Expand Down
34 changes: 27 additions & 7 deletions src/pspm_pupil_pp_options.m
Original file line number Diff line number Diff line change
Expand Up @@ -90,25 +90,44 @@
% │ Cutoff frequency for first order Butterworth filter.
% │ (Default: 16 Hz)
%
% ├─residualsFilter_lowpassB:
% │ Numerator (B) coefficients of the first-order
% │ Butterworth filter used in the residuals filter passes.
% │ Automatically computed from residualsFilter_lowpassCF
% │ and residualsFilter_interpFs.
% ├─residualsFilter_lowpassA:
% │ Denominator (A) coefficients of the first-order
% │ Butterworth filter used in the residuals filter
% │ passes. Automatically computed.
%
% │ // Keep filter data
%
% └─keepFilterData: If true, intermediate filter data will be stored.
% └───────keepFilterData:If true, intermediate filter data will be stored.
% Set to false to save memory and improve plotting
% performance. (Default: true)
%
% // Final data smoothing
%
% // Final data smoothing
% // The below computation is performed:
% // [LpFilt_B, LpFilt_A] = butter(LpFilt_order, ...
% // 2*LpFilt_cutoffFreq/interp_upsamplingFreq );
%
% ┌───────────────valid
% ├interp_upsamplingFreq:The upsampling frequency used to generate the smooth
% │ signal. (Default: 1000 Hz)
% ├─────────────LpFilt_B:The numerator coefficients of the digital Butterworth
% │ low-pass filter.
% ├─────────────LpFilt_A:The denominator coefficients of the digital
% │ Butterworth low-pass filter.
% └───────interp_maxGap: Maximum gap in the used (valid) raw samples to
% interpolate over. Sections that were interpolated
% over distances larger than this value will be set
% to NaN. (Default: 250 ms)
% ├───────interp_maxGap: Maximum gap in the used (valid) raw samples to
% │ interpolate over. Sections that were interpolated
% │ over distances larger than this value will be set
% │ to NaN. (Default: 250 ms)
% ├────LpFilt_cutoffFreq:The cutoff frequency (in Hz) for the low-pass Butterworth filter
% │ that is applied to the upsampled signal. (Default: 4 Hz)
% └─────────LpFilt_order:The order of the Butterworth filter used on the
% upsampled signal. (Default: 4)
%
%
% ● History
% Introduced In PsPM version ?.
% Written in 2019 by Eshref Yozdemir (University of Zurich)
Expand Down Expand Up @@ -163,6 +182,7 @@
addpath(libpath{:});
default_settings = PupilDataModel.getDefaultSettings();

% gets
default_settings.valid.LpFilt_cutoffFreq = 4; % could also be added to the default_settings in ValidSamplesModel
default_settings.valid.LpFilt_order = 4; % could also be added to the default_settings in ValidSamplesModel

Expand Down
3 changes: 2 additions & 1 deletion test/pspm_pupil_pp_test.m
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,9 @@ function backup(this)
import{end + 1}.type = 'gaze_x_l';
import{end + 1}.type = 'gaze_y_l';
import{end + 1}.type = 'marker';
options.overwrite = 1;
[sts, this.pspm_input_filename] = pspm_import(...
this.raw_input_filename, 'eyelink', import, struct());
this.raw_input_filename, 'eyelink', import, options);
this.pspm_input_filename = this.pspm_input_filename;
end
end
Expand Down

0 comments on commit c26064d

Please sign in to comment.