Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Release 6.1.2 update #613

Closed
wants to merge 42 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
42 commits
Select commit Hold shift + click to select a range
e664523
Update pspm_convert_ppg2hb.m
teddychao Dec 18, 2023
1a78e81
Update pspm_cfg_run_interpolate.m
teddychao Dec 18, 2023
7264cab
update
teddychao Dec 18, 2023
f351809
update functions
teddychao Dec 19, 2023
f66bc78
update functions
teddychao Dec 19, 2023
6df7736
update
teddychao Dec 19, 2023
74dbbca
update cfg functions
teddychao Dec 23, 2023
1160ce6
update
teddychao Dec 23, 2023
f9d429f
Update pspm_cfg_run_dcm.m
teddychao Dec 25, 2023
03b9b9e
update update_struct
teddychao Dec 25, 2023
ff38200
update
teddychao Dec 28, 2023
ff130ac
Merge branch 'develop' into 559-pspm_convert_ppg2hb-supports-both-opt…
teddychao Jan 7, 2024
eb34c44
Merge branch 'develop' into 559-pspm_convert_ppg2hb-supports-both-opt…
teddychao Jan 8, 2024
a17bcaa
update functions
teddychao Jan 8, 2024
aeb1f0d
Merge branch '559-pspm_convert_ppg2hb-supports-both-optionsreplace-an…
teddychao Jan 8, 2024
98b4416
Merge branch 'develop' into 559-pspm_convert_ppg2hb-supports-both-opt…
teddychao Jan 8, 2024
740c8d6
update functions
teddychao Jan 8, 2024
f50fd41
Merge branch '559-pspm_convert_ppg2hb-supports-both-optionsreplace-an…
teddychao Jan 8, 2024
45929a3
update
teddychao Jan 8, 2024
806e1d0
update CFG
teddychao Jan 8, 2024
b27df55
Update pspm_cfg_run_artefact_rm.m
teddychao Jan 8, 2024
bf93d03
minor update
teddychao Jan 8, 2024
d7638be
Update pspm_cfg_run_dcm.m
teddychao Jan 8, 2024
2368eed
minor update
teddychao Jan 8, 2024
c4f1c85
minor fix
teddychao Jan 8, 2024
da304e3
Merge branch 'fix-578' into 561-release-version-611
teddychao Jan 14, 2024
a31d3a1
Merge branch 'develop' into 561-release-version-611
teddychao Jan 15, 2024
37a247d
Update pspm_msg.txt
uzaygokay Jan 17, 2024
1257133
Update pspm_quit.m
uzaygokay Jan 17, 2024
5a77505
Update pspm_ui.m
uzaygokay Jan 17, 2024
d10da89
Merge branch '545-issue-running-first-level-contrasts-in-dcmnon-linea…
teddychao Jan 17, 2024
977991e
update
teddychao Jan 17, 2024
0b7177d
Update pspm_guide.fig
teddychao Jan 17, 2024
2e43133
Update PsPM_References.pdf
teddychao Jan 17, 2024
d31914a
update documents for 6.1.1
teddychao Jan 17, 2024
ba17e1c
update
teddychao Jan 17, 2024
bacb426
update documents
teddychao Jan 17, 2024
94916c4
Merge branch 'develop' into 561-release-version-611
teddychao Jan 17, 2024
a5b70bf
Merge branch 'develop' into Release-6.1.2
teddychao Jan 25, 2024
9e03268
update documents
teddychao Jan 25, 2024
b91f7af
update release notes
teddychao Jan 25, 2024
fa7758c
Update pspm_ui.m
teddychao Jan 25, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions doc/PsPM_Developers_Guide.lyx
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@
% Added by lyx2lyx
\renewcommand{\textendash}{--}
\renewcommand{\textemdash}{---}

\renewcommand*\l@subsection{\@dottedtocline{2}{3.8em}{3.2 em}}
\renewcommand*\l@subsubsection{\@dottedtocline{3}{7.0em}{4.1em}}
\usepackage{bera}
\usepackage{enumitem} \setlist[itemize]{noitemsep}
\end_preamble
Expand Down Expand Up @@ -102,7 +103,7 @@ Developer's Guide

\begin_layout Standard
\align center
Version 6.1.1
Version 6.1.2
\end_layout

\begin_layout Standard
Expand Down
Binary file modified doc/PsPM_Developers_Guide.pdf
Binary file not shown.
64 changes: 63 additions & 1 deletion doc/PsPM_Manual.lyx
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
\renewcommand{\textendash}{--}
\renewcommand{\textemdash}{---}
\usepackage{bera}
\renewcommand*\l@subsection{\@dottedtocline{2}{1.8em}{3.2 em}}
\end_preamble
\use_default_options true
\begin_modules
Expand Down Expand Up @@ -104,7 +105,7 @@ PsPM: Psychophysiological Modelling

\begin_layout Standard
\align center
Version 6.1.1
Version 6.1.2
\end_layout

\begin_layout Standard
Expand Down Expand Up @@ -21529,6 +21530,67 @@ UI improvements
PsPM's UI in Linux environment has been improved.
\end_layout

\begin_layout Subsection*
Version 6.1.2
\end_layout

\begin_layout Subsubsection*
Bug fixes
\end_layout

\begin_layout Itemize
GUI
\end_layout

\begin_deeper
\begin_layout Itemize
A bug that made channel actions in EMG pre-processing unrecognised has been
fixed.
\end_layout

\begin_layout Itemize
A bug, which sometimes made DCM not run from the GUI, has been fixed.
\end_layout

\end_deeper
\begin_layout Itemize

\family typewriter
pspm_convert_hb2hp
\end_layout

\begin_deeper
\begin_layout Itemize
A bug, which incorrectly selected heart rate channels, has been fixed.
\end_layout

\end_deeper
\begin_layout Itemize

\family typewriter
pspm_dcm
\end_layout

\begin_deeper
\begin_layout Itemize
A bug, which could lead to a wrong sample rate being used if more than one
SCR channel existed in the file, has been fixed.
\end_layout

\end_deeper
\begin_layout Itemize

\family typewriter
pspm_glm
\end_layout

\begin_deeper
\begin_layout Itemize
A bug, which leads to markers being taken from the first marker channel
but markervalues from the last, has been fixed.
\end_layout

\end_deeper
\begin_layout Part
Acknowledgements
\end_layout
Expand Down
Binary file modified doc/PsPM_Manual.pdf
Binary file not shown.
8 changes: 4 additions & 4 deletions doc/PsPM_References.lyx
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,12 @@
\definecolor{colComments}{rgb}{0.53, 0.66, 0.42}
\definecolor{colString}{rgb}{0.87, 0.36, 0.51}
\definecolor{barColor}{rgb}{0.43, 0.5, 0.5}
% Added by lyx2lyx
\renewcommand{\textendash}{--}
\renewcommand{\textemdash}{---}

\usepackage{bera}
\usepackage{enumitem} \setlist[itemize]{noitemsep}
\renewcommand*\l@subsection{\@dottedtocline{2}{1.8em}{3.2 em}}
\usepackage{enumitem}
\setlist[itemize]{noitemsep}
\end_preamble
\use_default_options true
\maintain_unincluded_children false
Expand Down Expand Up @@ -98,7 +98,7 @@ PsPM: Option References

\begin_layout Standard
\align center
Version 6.1.1
Version 6.1.2
\end_layout

\begin_layout Standard
Expand Down
Binary file modified doc/PsPM_References.pdf
Binary file not shown.
Binary file modified doc/release_notes.pdf
Binary file not shown.
27 changes: 26 additions & 1 deletion doc/release_notes.tex
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@
framexleftmargin=1pt,
frame=l}
\renewcommand{\lstlistingname}{Listing}
\title{PsPM Release Notes\\ ~\\ Version 6.1.1}
\title{PsPM Release Notes\\ ~\\ Version 6.1.2}

\begin{document}
\maketitle
Expand Down Expand Up @@ -1213,6 +1213,31 @@ \subsection*{UI improvements}
\item PsPM's UI in Linux environment has been improved.
\end{itemize}


\section{PsPM Version 6.1.2 }
\subsection*{Bug fixes}
\begin{itemize}
\item GUI
\begin{itemize}
\item A bug that made channel actions in EMG pre-processing unrecognised has been fixed.
\item A bug, which sometimes made DCM not run from the GUI, has been fixed.
\end{itemize}
\item \texttt{pspm\_convert\_hb2hp}
\begin{itemize}
\item A bug, which incorrectly selected heart rate channels, has been
fixed.
\end{itemize}
\item \texttt{pspm\_dcm}
\begin{itemize}
\item A bug, which could lead to a wrong sample rate being used if more than one SCR channel existed in the file, has been fixed.
\end{itemize}
\item \texttt{pspm\_glm}
\begin{itemize}
\item A bug, which leads to markers being taken from the first marker
channel but markervalues from the last, has been fixed.
\end{itemize}
\end{itemize}

\bibliographystyle{pnas2009}
\bibliography{PsPM}

Expand Down
64 changes: 31 additions & 33 deletions src/pspm_cfg/pspm_cfg_run_artefact_rm.m
Original file line number Diff line number Diff line change
@@ -1,41 +1,39 @@
function out = pspm_cfg_run_artefact_rm(job)
% Executes pspm_pp

% $Id$
% $Rev$

options = struct;
options.overwrite = job.overwrite;

% Reviewed and updated on 18-Dec-2023 by Teddy
options = struct();
options = pspm_update_struct(options, job, {'overwrite'});
filtertype = fieldnames(job.filtertype);
filtertype = filtertype{1};
datafile = job.datafile;
datafile = datafile{1};
channelnumber = job.chan_nr;

switch filtertype
case 'median'
n = job.filtertype.(filtertype).nr_time_pt;
out = pspm_pp(filtertype, datafile, n, channelnumber, options);
case 'butter'
freq = job.filtertype.(filtertype).freq;
out = pspm_pp(filtertype, datafile, freq, channelnumber, options);
case 'scr_pp'
scr_job = job.filtertype.(filtertype);
% Option structure sent to pspm_simple_qa
scr = struct();
if isfield(scr_job, 'min'), scr.min = scr_job.min; end % Check if min is defined
if isfield(scr_job, 'max'), scr.max = scr_job.max; end % Check if max is defined
if isfield(scr_job, 'slope'), scr.slope = scr_job.slope; end % Check if slope is defined
if isfield(scr_job.missing_epochs, 'write_to_file') % Check if missing_epochs is defined
if isfield(scr_job.missing_epochs.write_to_file,'filename') && isfield(scr_job.missing_epochs.write_to_file,'outdir')
scr.missing_epochs_filename = fullfile(scr_job.missing_epochs.write_to_file.outdir{1}, scr_job.missing_epochs.write_to_file.filename);
end
end
if isfield(scr_job, 'deflection_threshold'), scr.deflection_threshold = scr_job.deflection_threshold; end % Check if deflection_threshold is defined
if isfield(scr_job, 'data_island_threshold'), scr.data_island_threshold = scr_job.data_island_threshold; end % Check if data_island_threshold is defined
if isfield(scr_job, 'expand_epochs'), scr.expand_epochs = scr_job.expand_epochs; end % Check if expand_epochs is defined
if isfield(scr_job, 'change_data'), scr_job.change_data = scr_job.change_data; else, scr_job.change_data = "replace"; end % Check if data will be changed

[~, out] = pspm_scr_pp(datafile, scr);
case 'median'
n = job.filtertype.(filtertype).nr_time_pt;
out = pspm_pp(filtertype, datafile, n, channelnumber, options);
case 'butter'
freq = job.filtertype.(filtertype).freq;
out = pspm_pp(filtertype, datafile, freq, channelnumber, options);
case 'scr_pp'
scr_job = job.filtertype.(filtertype);
options = pspm_update_struct(options, scr_job, {'min',...
'max',...
'slope',...
'deflection_threshold',...
'data_island_threshold',...
'expand_epochs'})
if isfield(scr_job.missing_epochs, 'write_to_file')
if isfield(scr_job.missing_epochs.write_to_file,'filename') && ...
isfield(scr_job.missing_epochs.write_to_file,'outdir')
options.missing_epochs_filename = fullfile(...
scr_job.missing_epochs.write_to_file.outdir{1}, ...
scr_job.missing_epochs.write_to_file.filename);
end
end
if isfield(scr_job, 'change_data')
options.channel_action = 'add';
else
options.channel_action = 'replace';
end
[~, out] = pspm_scr_pp(datafile, options);
end
12 changes: 8 additions & 4 deletions src/pspm_cfg/pspm_cfg_run_combine_markerchannels.m
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
function pspm_cfg_run_combine_markerchannels(job)
% Updated on 19-12-2023 by Teddy
%% Variables
% fn
fn = job.datafile{1};
channel_action = job.channel_action;
marker_channel_number = job.marker_chan_num;
options = struct('channel_action', channel_action, ...
'marker_chan_num', marker_channel_number);
% options
options = struct();
options = pspm_update_struct(options, job, {'channel_action',...
'marker_chan_num'})
%% Run
pspm_combine_markerchannels(fn, options);
27 changes: 10 additions & 17 deletions src/pspm_cfg/pspm_cfg_run_contrast1.m
Original file line number Diff line number Diff line change
@@ -1,28 +1,21 @@
function out = pspm_cfg_run_contrast1(job)
% Executes pspm_con1

% $Id$
% $Rev$

% Updated on 18-12-2023 by Teddy
%% Variables
% modelfile
modelfile = job.modelfile;

% contrast names & vectors
% connames, convec
nrCon = size(job.con,2);
for iCon=1:nrCon
for iCon = 1:nrCon
connames{1,iCon} = job.con(iCon).conname;
convec{1,iCon} = job.con(iCon).convec;
end

% delete existing contrast
deletecon = job.deletecon;

% zscore data
options.zscored = job.zscored;

% datatype
datatype = job.datatype;

% deletecon
deletecon = job.deletecon;
% options
options = struct();
options = pspm_update_struct(options, job, 'zscored')
%% Run
pspm_con1(modelfile, connames, convec, datatype, deletecon, options);

out = modelfile;
31 changes: 12 additions & 19 deletions src/pspm_cfg/pspm_cfg_run_contrast2.m
Original file line number Diff line number Diff line change
@@ -1,27 +1,22 @@
function out = pspm_cfg_run_contrast2(job)
% Executes pspm_con1

% $Id$
% $Rev$

% Updated on 19-12-2023 by Teddy
%% Variables
% modelfile
if isfield(job.testtype, 'one_sample')
modelfile = job.testtype.one_sample.modelfile';
modelfile = job.testtype.one_sample.modelfile';
else
modelfile{1,1} = job.testtype.two_sample.modelfile1';
modelfile{1,2} = job.testtype.two_sample.modelfile2';
modelfile{1,1} = job.testtype.two_sample.modelfile1';
modelfile{1,2} = job.testtype.two_sample.modelfile2';
end

% outfile
outfile = [job.outdir{1} filesep job.filename '.mat'];

% connames & con
% con and connames
connames = fieldnames(job.def_con_name);
connames = connames{1};
if isfield(job.def_con_name.(connames),'con_all')
con = 'all';
con = 'all';
else
con = job.def_con_name.(connames).convec;
con = job.def_con_name.(connames).convec;
end
% nrCon = size(job.def_con_name.(connames).con, 2);
% if strcmp(connames, 'name')
Expand All @@ -35,13 +30,11 @@
% con(1,iCon) = job.def_con_name.(connames).con(iCon).conval;
% end
% end

% datatype
%datatype = job.datatype;

% datatype = job.datatype;
% options
options.overwrite = job.overwrite;

options = struct();
options = pspm_update_struct(options, job, 'overwrite');
%% Run
pspm_con2(modelfile, outfile, con, connames, options);

out = {outfile};
Loading
Loading