bachlab / PsPM

A matlab suite for Psycho-Physiological Modelling
GNU General Public License v3.0
43 stars 10 forks source link

Problem with exporting statistics from DCM/non-linear SCR-model #177

Closed andgad closed 3 years ago

andgad commented 3 years ago

Dear,

I got the following error message when i run Export statistics with data from first level DCM/non-linear SCR-model. It doesn't matter if I use Parameter, Condition, or Reconstructed as stats type.

Have you any suggestion how I can get around and export statistics?

Best

Anders


17-Jan-2021 09:58:05 - Running job #7

17-Jan-2021 09:58:05 - Running 'Export Statistics' 17-Jan-2021 09:58:11 - Failed 'Export Statistics' Error using cell/unique (line 85) Cell array input must be a cell array of character vectors. In file "/Applications/MATLAB_R2019b.app/toolbox/matlab/ops/@cell/unique.m" (???), function "unique" at line 85. In file "/Users/andersgaddlin/Documents/Psykologi/Termin_10/Kurs14/PsPm/Program/v5.0.0/pspm_load1.m" (???), function "pspm_load1" at line 218. In file "/Users/andersgaddlin/Documents/Psykologi/Termin_10/Kurs14/PsPm/Program/v5.0.0/pspm_exp.m" (???), function "pspm_exp" at line 133. In file "/Users/andersgaddlin/Documents/Psykologi/Termin_10/Kurs14/PsPm/Program/v5.0.0/pspm_cfg/pspm_cfg_run_export.m" (???), function "pspm_cfg_run_export" at line 34.

The following modules did not run: Failed: Export Statistics If the problem can be fixed without modifying the job, the computation can be resumed by running cfg_util('cont',7) from the MATLAB command line.

dominikbach commented 3 years ago

Hi Anders

thanks for posting this - it seems there is a bug in pspm_load1, or something wrong with the model file.

To troubleshoot, could you post (or send via email) the model file that causes this error?

Thanks

Dominik

andgad commented 3 years ago

Dear Dominik,

Thanks for your reply! Here is the model.

https://drive.google.com/drive/folders/1qpZZiNjxgXCsN9wzRnOmtopzAEjWbQVH?usp=sharing

Best Anders

teddychao commented 3 years ago

Dear Dominik,

Thanks for your reply! Here is the model.

https://drive.google.com/drive/folders/1qpZZiNjxgXCsN9wzRnOmtopzAEjWbQVH?usp=sharing

Best Anders

Dear Anders,

Many thanks for sending us the model file. We will get back to you once we find a solution to this issue.

Kind regards, Teddy

teddychao commented 3 years ago

Hi Anders,

We have investigated the issue and will fix it in the next release of PsPM.

If you would like to resolve it now, may I ask you to check Line 222 in _pspmload1, change

indata.(mdltype).condnames = unique(indata.(mdltype).trlnames);

to

indata.(mdltype).condnames = unique(indata.(mdltype).trlnames(cellfun(@ischar,indata.(mdltype).trlnames)));

and then check if the error will disappear.

Please feel free to keep me posted.

Best regards, Teddy

dominikbach commented 3 years ago

Hi Anders as a caveat, the issue was caused by the fact that some of the trial names are defined and others aren't. That case was not anticipated, and I'm not sure if that may lead to other issues down the line. Was that intended? If yes - I'd suggest giving every trial a name (even just a dummy one). If not - then we should investigate how you called DCM. Dominik