While running participants, we use multi-page logs (e.g. arrival time, researchers present, start time of each run of each task). After a session is over, we scan these to save on the server for easy reference later. However, with the most recent round of computer upgrades, the scanner functionality has decreased. Specifically, saving multiple images to a single PDF no longer works. Opening multiple image files is a pain, so I wanted to find a quick way to convert the combine the images into a PDF. My solution was to use the img2pdf package and some Python3 code. The script I came up with does 4 things: Read in all…
-
-
Utilities: Python and xjView reports
I use xjView to visualize statistical maps most of the time. One reason why, is that it's report function generates a lot of useful information, including not only the peak MNI coordinates and peak intensity, but also a breakdown of the number of voxels within each cluster than within specific AAL labels (is that parahippocampal or amgydala?). I also use these reports when I need to generate tables for manuscripts. The processes isn't overly elegant, but it's functional: Load the stats image. Generate the xjView report. Paste the report from the MATLAB command window into a *.txt document. Convert the *.txt document into a comma-separated table. Open the CSV tables…