From 2260cb23982c7e8206abb244602ba3e6b231a715 Mon Sep 17 00:00:00 2001 From: Dominik Bach Date: Sat, 1 Feb 2025 07:51:46 +0100 Subject: [PATCH] update function reference files --- .../2024-01-01-pspm_combine_markerchannels.md | 3 +- .../2024-01-01-pspm_convert_area2diameter.md | 3 +- _posts/ref/2024-01-01-pspm_convert_au2unit.md | 4 +- _posts/ref/2024-01-01-pspm_convert_ecg2hb.md | 4 +- .../2024-01-01-pspm_convert_ecg2hb_amri.md | 3 +- _posts/ref/2024-01-01-pspm_convert_gaze.md | 4 +- _posts/ref/2024-01-01-pspm_convert_hb2hp.md | 4 +- _posts/ref/2024-01-01-pspm_convert_ppg2hb.md | 12 ++++-- _posts/ref/2024-01-01-pspm_dcm.md | 3 +- _posts/ref/2024-01-01-pspm_emg_pp.md | 4 +- _posts/ref/2024-01-01-pspm_expand_epochs.md | 37 +++++++++++++++++++ _posts/ref/2024-01-01-pspm_export.md | 4 +- .../ref/2024-01-01-pspm_extract_segments.md | 4 +- _posts/ref/2024-01-01-pspm_find_sounds.md | 5 +-- .../2024-01-01-pspm_find_valid_fixations.md | 4 +- _posts/ref/2024-01-01-pspm_gaze_pp.md | 5 +-- _posts/ref/2024-01-01-pspm_get_markerinfo.md | 4 +- _posts/ref/2024-01-01-pspm_glm.md | 3 +- _posts/ref/2024-01-01-pspm_import.md | 4 +- _posts/ref/2024-01-01-pspm_interpolate.md | 4 +- _posts/ref/2024-01-01-pspm_merge.md | 4 +- _posts/ref/2024-01-01-pspm_pp.md | 5 +-- .../2024-01-01-pspm_process_illuminance.md | 5 +-- .../2024-01-01-pspm_pupil_correct_eyelink.md | 4 +- _posts/ref/2024-01-01-pspm_pupil_pp.md | 6 +-- _posts/ref/2024-01-01-pspm_remove_epochs.md | 5 +-- _posts/ref/2024-01-01-pspm_rename.md | 4 +- _posts/ref/2024-01-01-pspm_resp_pp.md | 4 +- _posts/ref/2024-01-01-pspm_scr_pp.md | 4 +- _posts/ref/2024-01-01-pspm_sf.md | 19 +++++----- _posts/ref/2024-01-01-pspm_split_sessions.md | 3 +- _posts/ref/2024-01-01-pspm_tam.md | 6 ++- _posts/ref/2024-01-01-pspm_trim.md | 3 +- 33 files changed, 119 insertions(+), 71 deletions(-) create mode 100644 _posts/ref/2024-01-01-pspm_expand_epochs.md diff --git a/_posts/ref/2024-01-01-pspm_combine_markerchannels.md b/_posts/ref/2024-01-01-pspm_combine_markerchannels.md index 81dfea52..0ef6a657 100644 --- a/_posts/ref/2024-01-01-pspm_combine_markerchannels.md +++ b/_posts/ref/2024-01-01-pspm_combine_markerchannels.md @@ -3,7 +3,7 @@ layout: post title: pspm_combine_markerchannels permalink: /ref/pspm_combine_markerchannels --- - + [Back to index](/PsPM/ref/) ## Description @@ -29,4 +29,5 @@ This allows for example creating GLM timing definitions based on markers distrib | options.channel_action | Accepted values: 'add'/'replace' Defines whether the new channel should be added on top of combined marker channels ('add'), or all combined marker channels should be deleted and replaced with the one new channel ('replace'). If the first option is used, then use marker channel indexing in further processing which by default takes the first marker channel as input. | | options.marker_chan_num | Choose any number of marker channel numbers to combine. If 0 all marker channels are used [default: use all channels]. | + [Back to index](/PsPM/ref/) diff --git a/_posts/ref/2024-01-01-pspm_convert_area2diameter.md b/_posts/ref/2024-01-01-pspm_convert_area2diameter.md index eef71175..e679e5de 100644 --- a/_posts/ref/2024-01-01-pspm_convert_area2diameter.md +++ b/_posts/ref/2024-01-01-pspm_convert_area2diameter.md @@ -3,7 +3,7 @@ layout: post title: pspm_convert_area2diameter permalink: /ref/pspm_convert_area2diameter --- - + [Back to index](/PsPM/ref/) ## Description @@ -29,4 +29,5 @@ All pupil size models in PsPM are defined for diameter values and require this c | options.channel | [optional][numeric/string] [Default: 'both'] Channel ID to be preprocessed. To process both eyes, use 'both', which will work on 'pupil_r' and 'pupil_l'. To process a specific eye, use 'pupil_l' or 'pupil_r'. To process the combined left and right eye, use 'pupil_c'. The identifier 'pupil' will use the first existing option out of the following: (1) L-R-combined pupil; (2) non-lateralised pupil; (3) best eye pupil; (4) any pupil channel. ; If there are multiple channels of the specified type, only last one will be processed. You can also specify the number of a channel. | | options.channel_action | ['add'/'replace', default as 'add'] Defines whether the new channel should be added or the previous outputs of this function should be replaced. | + [Back to index](/PsPM/ref/) diff --git a/_posts/ref/2024-01-01-pspm_convert_au2unit.md b/_posts/ref/2024-01-01-pspm_convert_au2unit.md index 91464d5e..6ae4cb7c 100644 --- a/_posts/ref/2024-01-01-pspm_convert_au2unit.md +++ b/_posts/ref/2024-01-01-pspm_convert_au2unit.md @@ -3,8 +3,7 @@ layout: post title: pspm_convert_au2unit permalink: /ref/pspm_convert_au2unit --- - - + [Back to index](/PsPM/ref/) ## Description @@ -46,4 +45,5 @@ Using the given variables, the following calculations are performed: 0. Take squ | options.channel | [optional][numeric/string] [Default: 'both'] Channel ID to be preprocessed. To process both eyes, use 'both', which will work on 'pupil_r' and 'pupil_l'. To process a specific eye, use 'pupil_l' or 'pupil_r'. To process the combined left and right eye, use 'pupil_c'. The identifier 'pupil' will use the first existing option out of the following: (1) L-R-combined pupil; (2) non-lateralised pupil; (3) best eye pupil; (4) any pupil channel. If there are multiple channels of the specified type, only last one will be processed. You can also specify the number of a channel. | | options.channel_action | ['add'/'replace', default as 'add'] Defines whether the new channel should be added or the previous outputs of this function should be replaced. | + [Back to index](/PsPM/ref/) diff --git a/_posts/ref/2024-01-01-pspm_convert_ecg2hb.md b/_posts/ref/2024-01-01-pspm_convert_ecg2hb.md index c692d55f..745b5502 100644 --- a/_posts/ref/2024-01-01-pspm_convert_ecg2hb.md +++ b/_posts/ref/2024-01-01-pspm_convert_ecg2hb.md @@ -3,8 +3,7 @@ layout: post title: pspm_convert_ecg2hb permalink: /ref/pspm_convert_ecg2hb --- - - + [Back to index](/PsPM/ref/) ## Description @@ -31,4 +30,5 @@ pspm_convert_ecg2hb identifies the position of QRS complexes in ECG data and wri | options.twthresh | Sets the threshold to perform the twave check. [def. 0.36s]. | | options.channel_action | ['add'/'replace', default as 'replace'] Defines whether the new channel should be added or the previous outputs of this function should be replaced. | + [Back to index](/PsPM/ref/) diff --git a/_posts/ref/2024-01-01-pspm_convert_ecg2hb_amri.md b/_posts/ref/2024-01-01-pspm_convert_ecg2hb_amri.md index 474d35e8..86af4749 100644 --- a/_posts/ref/2024-01-01-pspm_convert_ecg2hb_amri.md +++ b/_posts/ref/2024-01-01-pspm_convert_ecg2hb_amri.md @@ -3,7 +3,7 @@ layout: post title: pspm_convert_ecg2hb_amri permalink: /ref/pspm_convert_ecg2hb_amri --- - + [Back to index](/PsPM/ref/) ## Description @@ -33,6 +33,7 @@ pspm_convert_ecg2hb_amri performs R-peak detection from an ECG signal using the | options.min_relative_amplitude | [numeric, default as 0.4] Minimum relative peak amplitude of a candidate R-peak such that it is classified as an R-peak. | | options.channel_action | ['add'/'replace'] Defines whether corrected data should be added or the corresponding preprocessed channel should be replaced. Note that 'replace' mode does not replace the raw data channel, but a previously stored heartbeat channel. Default as 'replace'. | + ## Outputs | Variable | Definition | diff --git a/_posts/ref/2024-01-01-pspm_convert_gaze.md b/_posts/ref/2024-01-01-pspm_convert_gaze.md index 91100ffb..0bf5b4ab 100644 --- a/_posts/ref/2024-01-01-pspm_convert_gaze.md +++ b/_posts/ref/2024-01-01-pspm_convert_gaze.md @@ -3,8 +3,7 @@ layout: post title: pspm_convert_gaze permalink: /ref/pspm_convert_gaze --- - - + [Back to index](/PsPM/ref/) ## Description @@ -34,4 +33,5 @@ Display width and height are required for conversion from pixels to relate the s | options.channel | gaze x and y channels to work on. This can be a pair of channel numbers, any pair of channel types, 'gaze', which will search gaze_x and gaze_y channel according to the precedence order specified in pspm_load_channel. Default is 'gaze'. | | options.channel_action | Channel action for sps data, add / replace existing sps data (default: add). | + [Back to index](/PsPM/ref/) diff --git a/_posts/ref/2024-01-01-pspm_convert_hb2hp.md b/_posts/ref/2024-01-01-pspm_convert_hb2hp.md index e2cc4a1d..b1cff053 100644 --- a/_posts/ref/2024-01-01-pspm_convert_hb2hp.md +++ b/_posts/ref/2024-01-01-pspm_convert_hb2hp.md @@ -3,8 +3,7 @@ layout: post title: pspm_convert_hb2hp permalink: /ref/pspm_convert_hb2hp --- - - + [Back to index](/PsPM/ref/) ## Description @@ -30,4 +29,5 @@ pspm_convert_hb2hp transforms heart beat data into an interpolated heart rate si | options.upper | [numeric] Specifies the upper limit of the heart periods in seconds. Default is 2. | | options.lower | [numeric] Specifies the lower limit of the heart periods in seconds. Default is 0.2. | + [Back to index](/PsPM/ref/) diff --git a/_posts/ref/2024-01-01-pspm_convert_ppg2hb.md b/_posts/ref/2024-01-01-pspm_convert_ppg2hb.md index 53f5824e..633df85b 100644 --- a/_posts/ref/2024-01-01-pspm_convert_ppg2hb.md +++ b/_posts/ref/2024-01-01-pspm_convert_ppg2hb.md @@ -3,15 +3,14 @@ layout: post title: pspm_convert_ppg2hb permalink: /ref/pspm_convert_ppg2hb --- - - + [Back to index](/PsPM/ref/) ## Description pspm_convert_ppg2hb converts a pulse oxymeter channel to heartbeats. -First a template is generated from non-ambiguous heartbeats. The ppg signal is then cross-correlated with the template and maxima are identified as heartbeats. +Two methods are available: (1) Template-matching algorithm (method "classic"): First a template is generated from non-ambiguous heartbeats. The ppg signal is then cross-correlated with the template and maxima are identified as heartbeats. (2) HeartPy (see reference [1], requires Python installation. ## Format @@ -33,4 +32,11 @@ First a template is generated from non-ambiguous heartbeats. The ppg signal is t | options.lsm | [integer] for method 'classic' large spikes mode compensates for large spikes while generating template by removing the [integer] largest percentile of spikes from consideration. | | options.python_path | [char] for method 'heartpy' The path where python can be found. Mandatory if python environment is not yet set up. | + +## References + +[1] van Gent, P, Farah, H, van Nes, N, & van Arem, B. (2019) Heartpy: A novel heart rate algorithm for the analysis of noisy signals. Transportation Research Part F: Traffic Psychology and Behaviour 66, 368–378. + + + [Back to index](/PsPM/ref/) diff --git a/_posts/ref/2024-01-01-pspm_dcm.md b/_posts/ref/2024-01-01-pspm_dcm.md index 0e7d0591..21ba090e 100644 --- a/_posts/ref/2024-01-01-pspm_dcm.md +++ b/_posts/ref/2024-01-01-pspm_dcm.md @@ -3,7 +3,7 @@ layout: post title: pspm_dcm permalink: /ref/pspm_dcm --- - + [Back to index](/PsPM/ref/) ## Description @@ -62,6 +62,7 @@ For each session, experimental timing is defined by providing a 1-column vector | options.trlnames | Cell array of names for individual trials. This is only for housekeeping (e.g. condition descriptions), not for model estimation. Default: no trial names. | | options.eventnames | Cell array of names for individual events, in the order they are specified in the model.timing array - to be used for display and export only. | + ## References [1] Model development: Bach DR, Daunizeau J, Friston KJ, Dolan RJ (2010). Dynamic causal modelling of anticipatory skin conductance changes. Biological Psychology, 85(1), 163-70 diff --git a/_posts/ref/2024-01-01-pspm_emg_pp.md b/_posts/ref/2024-01-01-pspm_emg_pp.md index bd1ae535..e85b8292 100644 --- a/_posts/ref/2024-01-01-pspm_emg_pp.md +++ b/_posts/ref/2024-01-01-pspm_emg_pp.md @@ -3,8 +3,7 @@ layout: post title: pspm_emg_pp permalink: /ref/pspm_emg_pp --- - - + [Back to index](/PsPM/ref/) ## Description @@ -35,6 +34,7 @@ While the input data must be an EMG channel, the output channel will be of type | options.channel | [numeric/string] Channel to be preprocessed. Can be a channel ID or a channel name. Default is 'emg' (i.e. last EMG channel). | | options.channel_action | ['add'/'replace'] Defines whether the new channel should be added or the previous outputs of this function should be replaced. (Default: 'replace'). | + ## References [1] Khemka S, Tzovara A, Gerster S, Quednow BB, Bach DR (2017). Modelling startle eye blink electromyogram to assess fear learning. Psychophysiology, 54, 202-214. diff --git a/_posts/ref/2024-01-01-pspm_expand_epochs.md b/_posts/ref/2024-01-01-pspm_expand_epochs.md new file mode 100644 index 00000000..439428c0 --- /dev/null +++ b/_posts/ref/2024-01-01-pspm_expand_epochs.md @@ -0,0 +1,37 @@ +--- +layout: post +title: pspm_expand_epochs +permalink: /ref/pspm_expand_epochs +--- + +[Back to index](/PsPM/ref/) + +## Description + +pspm_expand_epochs expands epochs in time, and merges overlapping epochs. + +This is useful in processing missing data epochs. The function can take a missing epochs file and creates a new file with the original name prepended with 'e', a matrix of missing epochs, or a PsPM data file with missing data in a given channel. + + +## Format + +`[sts, output_file] = pspm_expand_epochs(epochs_fn, expansion, options)` or +`[sts, expanded_epochs] = pspm_expand_epochs(epochs, expansion, options) ` or +`[sts, channel_index] = pspm_expand_epochs(data_fn, channel, expansion , options)` + + +## Arguments + +| Variable | Definition | +|:--|:--| +| epochs_fn | An epochs file as defined in pspm_get_timing. | +| epochs | A 2-column matrix with epochs onsets and offsets in seconds. | +| data_fn | A PsPM data file. | +| channel | Channel identifier accepted by pspm_load_channel. | +| expansion | A 2-element vector with positive numbers [pre, post]. | +| options | See following fields. | +| options.overwrite | Define if already existing files should be overwritten. Default ist 2. (Only used if input is epochs file.). | +| options.channel_action | Channel action, add / replace existing data data (default: add). | + + +[Back to index](/PsPM/ref/) diff --git a/_posts/ref/2024-01-01-pspm_export.md b/_posts/ref/2024-01-01-pspm_export.md index 41b8733c..23802105 100644 --- a/_posts/ref/2024-01-01-pspm_export.md +++ b/_posts/ref/2024-01-01-pspm_export.md @@ -3,8 +3,7 @@ layout: post title: pspm_export permalink: /ref/pspm_export --- - - + [Back to index](/PsPM/ref/) ## Description @@ -30,4 +29,5 @@ The output is organised as a matrix with rows for observations (first-level mode | options.delim | [optional, default is tab('\t')] delimiter for output file. | | options.exclude_missing | [optional, default as 0] Exclude parameters from conditions with too many NaN values. This option can only be used for GLM files when exclude_missing was set during model setup. Otherwise this argument is ignored. | + [Back to index](/PsPM/ref/) diff --git a/_posts/ref/2024-01-01-pspm_extract_segments.md b/_posts/ref/2024-01-01-pspm_extract_segments.md index d7692513..5bdf77a0 100644 --- a/_posts/ref/2024-01-01-pspm_extract_segments.md +++ b/_posts/ref/2024-01-01-pspm_extract_segments.md @@ -3,8 +3,7 @@ layout: post title: pspm_extract_segments permalink: /ref/pspm_extract_segments --- - - + [Back to index](/PsPM/ref/) ## Description @@ -47,4 +46,5 @@ The output can also be written to a matlab file. | options.nan_output | ['screen', filename, or 'none'] Output NaN ratios of the trials for each condition. Values can be printed on the screen or written to a matlab file. Default is no NaN output. | | options.norm | If 1, z-scores the entire data time series (default: 0). | + [Back to index](/PsPM/ref/) diff --git a/_posts/ref/2024-01-01-pspm_find_sounds.md b/_posts/ref/2024-01-01-pspm_find_sounds.md index 44bfbc6e..60c4aaff 100644 --- a/_posts/ref/2024-01-01-pspm_find_sounds.md +++ b/_posts/ref/2024-01-01-pspm_find_sounds.md @@ -3,9 +3,7 @@ layout: post title: pspm_find_sounds permalink: /ref/pspm_find_sounds --- - - - + [Back to index](/PsPM/ref/) ## Description @@ -39,4 +37,5 @@ A sound is detected as event if it is longer than 10 ms, and events are recogniz | options.marker_chan_num | [integer] number of a channel holding markers. By default first 'marker' channel. | | options.expectedSoundCount | [integer] Checks for correct number of detected sounds. If too few are found, lowers threshold until at least specified count is reached. Threshold is lowered by .01 until 0.05 is reached for a max of 95 iterations. This is a EXPERIMENTAL variable, use with caution!. | + [Back to index](/PsPM/ref/) diff --git a/_posts/ref/2024-01-01-pspm_find_valid_fixations.md b/_posts/ref/2024-01-01-pspm_find_valid_fixations.md index d5079e07..b2d7cd4a 100644 --- a/_posts/ref/2024-01-01-pspm_find_valid_fixations.md +++ b/_posts/ref/2024-01-01-pspm_find_valid_fixations.md @@ -3,8 +3,7 @@ layout: post title: pspm_find_valid_fixations permalink: /ref/pspm_find_valid_fixations --- - - + [Back to index](/PsPM/ref/) ## Description @@ -43,6 +42,7 @@ By default, screen centre is assumed as fixation point. If an explicit fixation | options.add_invalid | [0/1] If this option is enabled, an extra channel will be written containing information about the valid samples. Data points equal to 1 correspond to invalid fixation. Default is not to add this channel. | | options.channel | Choose channels in which the data should be set to NaN during invalid fixations. This can be a channel number, any channel type including 'pupil' (which will select a channel according to the precedence order specified in pspm_load_channel), or 'both', which will work on 'pupil_r' and 'pupil_l' and then update channel statistics and best eye. The selected channel must be an eyetracker channel, and the file must contain the corresponding gaze channel(s) in the correct units: distance units for mode "fixation" and distance or pixel units for mode "bitmap". Default is 'pupil'. | + ## References [1] Korn CW & Bach DR (2016). A solid frame for the window on cognition: Modelling event-related pupil responses. Journal of Vision, 16:28,1-6. diff --git a/_posts/ref/2024-01-01-pspm_gaze_pp.md b/_posts/ref/2024-01-01-pspm_gaze_pp.md index 38d22354..7f57b7e6 100644 --- a/_posts/ref/2024-01-01-pspm_gaze_pp.md +++ b/_posts/ref/2024-01-01-pspm_gaze_pp.md @@ -3,9 +3,7 @@ layout: post title: pspm_gaze_pp permalink: /ref/pspm_gaze_pp --- - - - + [Back to index](/PsPM/ref/) ## Description @@ -28,4 +26,5 @@ pspm_gaze_pp combines left/right gaze x and gaze y channels at the same time and | options.channel | gaze_x_r/gaze_x_l/gaze_y_r/gaze_y_l channels to work on. This can be a 4-element vector of channel numbers, or 'gaze', which will use the last channel of the types specified above. Default is 'gaze'. | | options.channel_action | 'replace' existing gaze_x_c and gaze_y_c channels, or 'add' new ones (default). | + [Back to index](/PsPM/ref/) diff --git a/_posts/ref/2024-01-01-pspm_get_markerinfo.md b/_posts/ref/2024-01-01-pspm_get_markerinfo.md index 187a865c..fe3a98d2 100644 --- a/_posts/ref/2024-01-01-pspm_get_markerinfo.md +++ b/_posts/ref/2024-01-01-pspm_get_markerinfo.md @@ -3,8 +3,7 @@ layout: post title: pspm_get_markerinfo permalink: /ref/pspm_get_markerinfo --- - - + [Back to index](/PsPM/ref/) ## Description @@ -27,4 +26,5 @@ pspm_get_markerinfo extracts markerinfo from PsPM files that contain such inform | options.filename | [char] name of a file to write the markerinfo to; default value: empty, meaning no file will be written. | | options.overwrite | [logical] (0 or 1) Define whether to overwrite existing output files or not. Default value: determined by pspm_overwrite. | + [Back to index](/PsPM/ref/) diff --git a/_posts/ref/2024-01-01-pspm_glm.md b/_posts/ref/2024-01-01-pspm_glm.md index fee8270d..f33d09fd 100644 --- a/_posts/ref/2024-01-01-pspm_glm.md +++ b/_posts/ref/2024-01-01-pspm_glm.md @@ -3,7 +3,7 @@ layout: post title: pspm_glm permalink: /ref/pspm_glm --- - + [Back to index](/PsPM/ref/) ## Description @@ -45,6 +45,7 @@ The user specifies events for different conditions. These are used to estimate t | options.marker_chan_num | [optional] marker channel number; default first marker channel. | | options.exclude_missing | [optional] marks trials during which NaN percentage exceeds a cutoff value. Requires two subfields: 'segment_length' (in s after onset) and 'cutoff' (in % NaN per segment). Results are written into model structure as fields .stats_missing and .stats_exclude but not used further. | + ## Outputs | Variable | Definition | diff --git a/_posts/ref/2024-01-01-pspm_import.md b/_posts/ref/2024-01-01-pspm_import.md index 514ef8ea..7cce3fec 100644 --- a/_posts/ref/2024-01-01-pspm_import.md +++ b/_posts/ref/2024-01-01-pspm_import.md @@ -3,8 +3,7 @@ layout: post title: pspm_import permalink: /ref/pspm_import --- - - + [Back to index](/PsPM/ref/) ## Description @@ -36,4 +35,5 @@ pspm_import imports data from various formats and writes them to a PsPM file on | options | See following fields. | | options.overwrite | overwrite existing files by default. [logical] (0 or 1) Define whether to overwrite existing output files or not. Default value: determined by pspm_overwrite. | + [Back to index](/PsPM/ref/) diff --git a/_posts/ref/2024-01-01-pspm_interpolate.md b/_posts/ref/2024-01-01-pspm_interpolate.md index 0727b4c2..4268220a 100644 --- a/_posts/ref/2024-01-01-pspm_interpolate.md +++ b/_posts/ref/2024-01-01-pspm_interpolate.md @@ -3,8 +3,7 @@ layout: post title: pspm_interpolate permalink: /ref/pspm_interpolate --- - - + [Back to index](/PsPM/ref/) ## Description @@ -31,4 +30,5 @@ pspm_interpolate interpolates NaN values. It either acts on one selected channel | options.overwrite | Defines if existing datafiles should be overwritten. [logical] (0 or 1) Define whether to overwrite existing output files or not. Default value: do not overwrite. Only used if 'channel' is 'all'. | | options.channel_action | Defines whether the interpolated data should be added or the corresponding channel should be replaced. [optional; accept: 'add', 'replace'; default: 'add'] Only used if 'channel' is not 'all'. | + [Back to index](/PsPM/ref/) diff --git a/_posts/ref/2024-01-01-pspm_merge.md b/_posts/ref/2024-01-01-pspm_merge.md index 15250b9b..d1bb3c47 100644 --- a/_posts/ref/2024-01-01-pspm_merge.md +++ b/_posts/ref/2024-01-01-pspm_merge.md @@ -3,8 +3,7 @@ layout: post title: pspm_merge permalink: /ref/pspm_merge --- - - + [Back to index](/PsPM/ref/) ## Description @@ -28,4 +27,5 @@ pspm_merge merges two PsPM datafiles recorded in an overlapping time interval by | options.overwrite | overwrite existing file by default [logical] (0 or 1) Default value: determined by pspm_overwrite. | | options.marker_chan_num | 2-element vector of marker channel numbers to be used as a reference. Ignored if reference is specified as 'file'. If undefined or 0, the first marker channel of either file is used. | + [Back to index](/PsPM/ref/) diff --git a/_posts/ref/2024-01-01-pspm_pp.md b/_posts/ref/2024-01-01-pspm_pp.md index be734325..6274aa4a 100644 --- a/_posts/ref/2024-01-01-pspm_pp.md +++ b/_posts/ref/2024-01-01-pspm_pp.md @@ -3,9 +3,7 @@ layout: post title: pspm_pp permalink: /ref/pspm_pp --- - - - + [Back to index](/PsPM/ref/) ## Description @@ -39,4 +37,5 @@ pspm_pp contains various preprocessing/filtering utilities for reducing noise in | options | See following fields. | | options.channel_action | [optional][string][Accepts: 'add'/'replace'][Default: 'add'] Defines whether corrected data should be added or the corresponding preprocessed channel should be replaced. | + [Back to index](/PsPM/ref/) diff --git a/_posts/ref/2024-01-01-pspm_process_illuminance.md b/_posts/ref/2024-01-01-pspm_process_illuminance.md index fc392daa..274209c5 100644 --- a/_posts/ref/2024-01-01-pspm_process_illuminance.md +++ b/_posts/ref/2024-01-01-pspm_process_illuminance.md @@ -3,9 +3,7 @@ layout: post title: pspm_process_illuminance permalink: /ref/pspm_process_illuminance --- - - - + [Back to index](/PsPM/ref/) ## Description @@ -37,6 +35,7 @@ The illuminance file should be a .mat file with a vector variable called Lx. In | options.bf.offset | Offset in seconds. | + ## Outputs | Variable | Definition | diff --git a/_posts/ref/2024-01-01-pspm_pupil_correct_eyelink.md b/_posts/ref/2024-01-01-pspm_pupil_correct_eyelink.md index 070dc6a1..34dff271 100644 --- a/_posts/ref/2024-01-01-pspm_pupil_correct_eyelink.md +++ b/_posts/ref/2024-01-01-pspm_pupil_correct_eyelink.md @@ -3,8 +3,7 @@ layout: post title: pspm_pupil_correct_eyelink permalink: /ref/pspm_pupil_correct_eyelink --- - - + [Back to index](/PsPM/ref/) ## Description @@ -39,6 +38,7 @@ In order to perform PFE, we need both pupil and gaze data. If the gaze data in t | options.channel | [optional][numeric/string] [Default: 'pupil'] Channel ID to be preprocessed. To process a specific eye, use 'pupil_l' or 'pupil_r'. To process the combined left and right eye, use 'pupil_c'. The default identifier 'pupil' will use the first existing option out of the following: (1) L-R-combined pupil; (2) non-lateralised pupil; (3) best eye pupil; (4) any pupil channel. If there are multiple channels of the specified type, only last one will be processed. You can also specify the number of a channel. | | options.channel_action | [optional] ['add'/'replace'] Defines whether output data should be added or the corresponding preprocessed channel should be replaced. (Default: 'add'). | + ## Outputs | Variable | Definition | diff --git a/_posts/ref/2024-01-01-pspm_pupil_pp.md b/_posts/ref/2024-01-01-pspm_pupil_pp.md index b4ded7e1..0d96a314 100644 --- a/_posts/ref/2024-01-01-pspm_pupil_pp.md +++ b/_posts/ref/2024-01-01-pspm_pupil_pp.md @@ -3,8 +3,7 @@ layout: post title: pspm_pupil_pp permalink: /ref/pspm_pupil_pp --- - - + [Back to index](/PsPM/ref/) ## Description @@ -49,9 +48,10 @@ Pupil preprocessing is performed in three main steps: 1. In the first step, the | options.end | [decimal][Unit: second] Ending time of the segment. | | options.name | [string] Name of the segment. Segment will be stored by this name. | | options.plot_data | [Boolean][Default: false or 0] Plot the preprocessing steps. | -| options.chan_valid_cutoff | [optional][Default: 0.01] 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 this cutoff, then combining will be skipped, and both channels will be processed separately. | +| options.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 this cutoff, then combining will be skipped, and both channels will be processed separately. | | options.out_chan | Channel ID of the preprocessed output. | + ## Outputs | Variable | Definition | diff --git a/_posts/ref/2024-01-01-pspm_remove_epochs.md b/_posts/ref/2024-01-01-pspm_remove_epochs.md index f7f5e84f..54e35310 100644 --- a/_posts/ref/2024-01-01-pspm_remove_epochs.md +++ b/_posts/ref/2024-01-01-pspm_remove_epochs.md @@ -3,9 +3,7 @@ layout: post title: pspm_remove_epochs permalink: /ref/pspm_remove_epochs --- - - - + [Back to index](/PsPM/ref/) ## Description @@ -30,4 +28,5 @@ pspm_remove_epochs sets epochs of data, as defined by an epoch file, to NaN. | options.channel_action | ['add'/'replace'] Defines whether new channels should be added or corresponding channels should be replaced. The default value is 'add'. | | options.expand_epochs | [pre, post]. | + [Back to index](/PsPM/ref/) diff --git a/_posts/ref/2024-01-01-pspm_rename.md b/_posts/ref/2024-01-01-pspm_rename.md index 67a51a7a..8378c7c7 100644 --- a/_posts/ref/2024-01-01-pspm_rename.md +++ b/_posts/ref/2024-01-01-pspm_rename.md @@ -3,8 +3,7 @@ layout: post title: pspm_rename permalink: /ref/pspm_rename --- - - + [Back to index](/PsPM/ref/) ## Description @@ -26,4 +25,5 @@ pspm_ren renames a PsPM datafile and updates the internal structure (the field ' | options | See following fields. | | options.overwrite | [Optional, logical] overwrite existing file by default The default value is determined by pspm_overwrite. | + [Back to index](/PsPM/ref/) diff --git a/_posts/ref/2024-01-01-pspm_resp_pp.md b/_posts/ref/2024-01-01-pspm_resp_pp.md index 313b5d12..4ba03716 100644 --- a/_posts/ref/2024-01-01-pspm_resp_pp.md +++ b/_posts/ref/2024-01-01-pspm_resp_pp.md @@ -3,8 +3,7 @@ layout: post title: pspm_resp_pp permalink: /ref/pspm_resp_pp --- - - + [Back to index](/PsPM/ref/) ## Description @@ -30,6 +29,7 @@ pspm_resp_pp preprocesses raw respiration traces. The function detects respirati | options.plot | [0/1] Create a respiratory cycle detection plot. | | options.channel_action | ['add'(default) /'replace'] Defines whether the new channels should be added or the corresponding channel should be replaced. | + ## References [1] Bach DR, Gerster S, Tzovara A, Castegnetti G (2016). A linear model for event-related respiration responses. Journal of Neuroscience Methods, 270, 174-155. diff --git a/_posts/ref/2024-01-01-pspm_scr_pp.md b/_posts/ref/2024-01-01-pspm_scr_pp.md index 2e8c40e8..190aaa84 100644 --- a/_posts/ref/2024-01-01-pspm_scr_pp.md +++ b/_posts/ref/2024-01-01-pspm_scr_pp.md @@ -3,8 +3,7 @@ layout: post title: pspm_scr_pp permalink: /ref/pspm_scr_pp --- - - + [Back to index](/PsPM/ref/) ## Description @@ -48,6 +47,7 @@ If a missing epochs filename is specified, the detected epochs will be written t | options.overwrite | [logical] (0 or 1) [Optional] Define whether to overwrite existing missing epochs files or not (default). Will only be used if options.missing_epochs_filename is specified. | | options.channel_action | [Optional] Accepted values: 'add'/'replace' Defines whether the new channel should be added or the previous outputs of this function should be replaced. Default: 'add'. Will not be used if options.missing_epochs_filename is specified. | + ## Outputs | Variable | Definition | diff --git a/_posts/ref/2024-01-01-pspm_sf.md b/_posts/ref/2024-01-01-pspm_sf.md index eeb1803c..e6c7e5df 100644 --- a/_posts/ref/2024-01-01-pspm_sf.md +++ b/_posts/ref/2024-01-01-pspm_sf.md @@ -3,21 +3,20 @@ layout: post title: pspm_sf permalink: /ref/pspm_sf --- - - + [Back to index](/PsPM/ref/) ## Description -pspm_sf is a wrapper function for analysis of skin conductance as a measure of tonic arousal. SF are analysed over time windows that typically last 60 s and should at least be 15 s long. PsPM implements 3 different models. +pspm_sf is a wrapper function for analysis of skin conductance as a measure of tonic arousal. SF are analysed over time windows that typically last 60 s and should at least be 15 s long. PsPM implements 3 different models. (1) Skin conductance level (SCL): this is the mean signal over the epoch. -(2) Area under the curve (AUC): this is the time-integral of the signal with the minimum value subtracted (to account for pre-epoch arousal), divided by epoch duration. This is designed to be independent from SCL and ideally represents the number x amplitude of spontaneous fluctuations (also termed non-specific SCR) in this epoch. +(2) Area under the curve (AUC): this is the time-integral of the signal with the minimum value subtracted (to account for pre-epoch arousal), divided by epoch duration. This is designed to be independent from SCL and ideally represents the number x amplitude of spontaneous fluctuations (also termed non-specific SCR) in this epoch. (3) Number of SF estimated by DCM: this is a non-linear estimation of the number and onset of SF, and is the most sensitive indicator of tonic arousal. For counting peaks, a threshold in mcS is applied; hence it is important that the data are provided in the correct units. Estimated SF onset is stored in the model and is expressed in CNS time, i.e. the time point at which an SF was generated in the CNS. Thus, it already takes into account the conduction delay from CNS into the periphery. -(4) Number of SF estimated by MP: This is the same model as in (3) but estimated with an approximative matching pursuit (MP) algorithm. +(4) Number of SF estimated by MP: This is the same model as in (3) but estimated with an approximative matching pursuit (MP) algorithm. ## Format @@ -30,14 +29,15 @@ pspm_sf is a wrapper function for analysis of skin conductance as a measure of t | Variable | Definition | |:--|:--| | model | See following fields. | -| model.datafile | one data filename or cell array of filenames. | -| model.modelfile | one data filename or cell array of filenames. | +| model.datafile | one data filename. | +| model.modelfile | one model filename. | | model.timing | can be one of the following - an SPM style onset file with two event types: onset & offset (names are ignored) - a .mat file with a variable 'epochs', see below - a two-column text file with on/offsets - e x 2 array of epoch on- and offsets, with e: number of epochs or cell array of any of these, for multiple files. | | model.timeunits | seconds, samples, markers, whole (in the last case, 'timing' will be ignored and the entire file will be used). | | model.method | [optional, string/cell_array] [string] accept 'auc', 'scl', 'dcm', or 'mp', default as 'dcm'. [cell_array] a cell array of methods mentioned above. | | model.filter | [optional] filter settings; modality specific default. | -| model.missing | [optional, string/cell_array] [default: no missing values] Allows to specify missing (e.g. artefact) epochs in the data file. See pspm_get_timing for epoch definition; specify a cell array for multiple input files. This must always be specified in SECONDS. | -| model.channel | [optional, integer, default: last SCR channel] Channel number. || options | See following fields. | +| model.missing | [optional, string] [default: no missing values] Allows to specify missing (e.g. artefact) epochs in the data file. See pspm_get_timing for epoch definition. This must always be specified in SECONDS. | +| model.channel | [optional, integer, default: last SCR channel] Channel number. | +| options | See following fields. | | options.overwrite | [logical, default: determined by pspm_overwrite] Define whether to overwrite existing output files or not. | | options.marker_chan_num | [integer] marker channel number if undefined or 0, first marker channel is used. | | options.threshold | [numeric, default: 0.1] [unit: mcS] Threshold for counting estimated SN peaks (default 0.1 mcS). (Used for DCM and MP only.). | @@ -47,6 +47,7 @@ pspm_sf is a wrapper function for analysis of skin conductance as a measure of t | options.dispsmallwin | [logical, default: 0] Display intermediate progress windows. (Used for DCM only.). | | options.missingthresh | [numeric, default: 2] [unit: second] Threshold value for controlling missing epochs. (Used for DCM only). | + ## References [1] DCM for SF: Bach DR, Daunizeau J, Kuelzow N, Friston KJ, Dolan RJ (2010). Dynamic causal modelling of spontaneous fluctuations in skin conductance. Psychophysiology, 48, 252-257. diff --git a/_posts/ref/2024-01-01-pspm_split_sessions.md b/_posts/ref/2024-01-01-pspm_split_sessions.md index 7a64de52..be155250 100644 --- a/_posts/ref/2024-01-01-pspm_split_sessions.md +++ b/_posts/ref/2024-01-01-pspm_split_sessions.md @@ -3,7 +3,7 @@ layout: post title: pspm_split_sessions permalink: /ref/pspm_split_sessions --- - + [Back to index](/PsPM/ref/) ## Description @@ -39,6 +39,7 @@ The individual session dat will be written to new files with a suffix '_sn' and | options.verbose | [default:1] printing processing messages. | | options.missing | Optional name of an epoch file, e.g. containing a missing epochs definition in s. This is then split accordingly. | + ## Outputs | Variable | Definition | diff --git a/_posts/ref/2024-01-01-pspm_tam.md b/_posts/ref/2024-01-01-pspm_tam.md index 27b57284..bac7d4cc 100644 --- a/_posts/ref/2024-01-01-pspm_tam.md +++ b/_posts/ref/2024-01-01-pspm_tam.md @@ -3,7 +3,7 @@ layout: post title: pspm_tam permalink: /ref/pspm_tam --- - + [Back to index](/PsPM/ref/) ## Description @@ -38,10 +38,12 @@ pspm_tam starts by extracting and averaging signal segments of length `model.win | model.filter | [optional] filter settings; modality specific default. | | model.baseline | [optional] allows to specify a baseline in 'seconds' which is applied to the data before fitting the model. It has to be positive and smaller than model.window. If no baseline specified, data will be baselined wrt. the first datapoint. DEFAULT: 0. | | model.std_exp_cond | [optional] allows to specify the standard experimental condition as a string or an index in timing.names. if specified this experimental condition will be substracted from all the other conditions. DEFAULT: 'none'. | -| model.norm_max | [optional] set the first peak at 1 before model fitting. DEFAULT: 0 (not normalize). || options | See following fields. | +| model.norm_max | [optional] set the first peak at 1 before model fitting. DEFAULT: 0 (not normalize). | +| options | See following fields. | | options.marker_chan | marker channel number DEFAULT: 'marker' (i.e. last marker channel). | | options.overwrite | (optional) overwrite existing model output; [logical] (0 or 1) Define whether to overwrite existing output files or not. Default value: determined by pspm_overwrite. | + ## Outputs | Variable | Definition | diff --git a/_posts/ref/2024-01-01-pspm_trim.md b/_posts/ref/2024-01-01-pspm_trim.md index 02a529bf..d1bc3814 100644 --- a/_posts/ref/2024-01-01-pspm_trim.md +++ b/_posts/ref/2024-01-01-pspm_trim.md @@ -3,7 +3,7 @@ layout: post title: pspm_trim permalink: /ref/pspm_trim --- - + [Back to index](/PsPM/ref/) ## Description @@ -32,6 +32,7 @@ Trimming limits can be defined in terms of file start, first/last marker, or any | options.missing | Optional name of an epoch file, e.g. containing a missing epochs definition in s. This is then split accordingly. | | options.drop_offset_markers | if 'from' and 'to' are defined with respect to markers, you might be interested in the data that within extend beyond these markers but not in any additional markers which are within this interval. Set this option to 1 to drop markers which lie in the offset. this is for event channels only. Default is 0. | + ## Outputs | Variable | Definition |