Welcome! Log In Create A New Profile

Advanced

Long loading times for condition files

Posted by alex.pascoe 
Long loading times for condition files
August 31, 2022 11:05PM
Hello,

I am looking for some guidance on condition files with MonkeyLogic: Currently, we use NIMH Cortex in our lab, which has a similar structure for programs to MonkeyLogic. Typically, in our cognitive tasks, we will have anywhere between 5-25k conditions (allowing for full, or a least reliable pseudo randomisation of trials and task objects). In Cortex, such a condition file normally takes 1-2mins to load. However, upon recreating a similarly structured task (DMS) in MonkeyLogic, a condition file containing ~15k conditions takes close to an hour to load. Looking at Task Manger during this process shows usage in all domains (CPU, RAM, SSD) does not exceed 30%, so I am confident it is not a hardware issue. I was wondering if anyone else has used cognitive tasks with large amounts of conditions in MonkeyLogic, and how they circumvented or solved this problem. I have attached a copy of the conditions file I'm trying to load to this post - for reference, each of the 36 images used as task objects are basic coloured shapes in bmp format, 10.8kb in size.

Thanks for any help,
Alex
Attachments:
open | download - dms.txt (1.91 MB)
Re: Long loading times for condition files
September 01, 2022 11:26AM
There are a couple of things that you can try.

1. Add the extension (.bmp) to the stimulus filenames in the conditions.
2. Download NIMH ML again. The new package includes an improvement to reduce the loading time when the same files are used in multiple conditions.
Re: Long loading times for condition files
September 01, 2022 11:55PM
Dear Jaewon,

Thank you for your reply - your suggestions have significantly reduced the loading time for the same conditions file, from 1hr to now ~20mins.

If you don't mind, I have one more question concerning the output of behavioural codes: Currently, I have configured my task to use event markers to send behavioural codes through the assigned channels in the I/O subsection of MonkeyLogic settings. Whilst this works for sending codes to one device, ideally I would want to send differing behavioural codes to two different outputs (in this case separate EDA and EEG amplifiers). Is there any way to configure MonkeyLogic to let's say, send event codes (e.g. 1-25) to channels of one port, and event codes (e.g. 26-50) to channels of a different port?
Re: Long loading times for condition files
September 02, 2022 02:30AM
20 mins still seem way too long. I tested with your conditions file and 11-kB BMP files that I made. It took 67 sec on my computer (i7-10700, 32 GB memory, 1TB SSD).

The lines you assign to Behavioral Codes cannot be regrouped nor controlled individually, but you can send two different codes with a little trick.
code1 = 10;  % Line 1-25
code2 = 20;  % Line 26-50
eventmarker(code1 + code2 * 2^25);

The National Institute of Mental Health (NIMH) is part of the National Institutes of Health (NIH), a component of the U.S. Department of Health and Human Services.