Skip to content

Instantly share code, notes, and snippets.

View iandol's full-sized avatar
👾
typing away...

Ian Max Andolina iandol

👾
typing away...
  • Institute of Neuroscience, Chinese Academy of Sciences
  • Shanghai
  • 22:03 (UTC +08:00)
View GitHub Profile
@iandol
iandol / degtest.m
Last active August 19, 2019 05:43
Bug in DrawFormatted2 but only on MATLAB 2019b
function degtest()
bgColour = 0.5;
screen = max(Screen('Screens'));
screenSize = [];
ptb = mySetup(screen,bgColour,screenSize);
text = sprintf('The <b>distance<b> is %.2f°\nThe <b>size<b> is %.2f°',56.13,12.75);
% text=strrep(text,'°','d') %uncomment at it then works...
@iandol
iandol / LOG2
Last active August 9, 2019 06:54
I have a 1920x1080 native screen 2, but when I open a window in PTB on it, it reports WinRect as [0 0 2880 1620], Screen('WindowSize', window) also gives the same value. PTB does open a screen this size, if I draw a 20pixel square it measures ~13pixels across (2880/1920 = 1.5; 20/1.5 = 13).
>> PsychTweak('ScreenVerbosity', 10)
>> ProceduralGarboriumDemo
PTB-DEBUG: DirectDraw DLL available. Binding controls ... ...done
PTB-INFO: Multi-display setup in explicit multi-display mode detected. Using the following mapping:
PTB-INFO: Screen 0 corresponds to the full Windows desktop area. Useful for stereo presentations in stereomode=4 ...
PTB-INFO: Screen 1 corresponds to the display area of the monitor with the Windows-internal name \\.\DISPLAY2 ...
PTB-INFO: Screen 2 corresponds to the display area of the monitor with the Windows-internal name \\.\DISPLAY1 ...
PTB-INFO: Process DPI awareness level is: System global aware.
PTB-INFO: Your version of Matlab 64-Bit is global system DPI aware. On Windows-8 or later, fullscreen onscreen windows will only work
@iandol
iandol / Papers to Scan
Last active October 18, 2019 08:08
DOIs for papers found when not close to Bookends
https://doi.org/10.1002/aur.1894
https://doi.org/10.1038/s41467-019-11298-3
https://doi.org/10.1101/679324
https://doi.org/10.1101/583963
https://doi.org/10.1016/j.cub.2019.06.070
Meaning, intention, and inference in primate vocal communication https://doi.org/10.1016/j.neubiorev.2016.10.014
Social manipulation in nonhuman primates: Cognitive and motivational determinants https://doi.org/10.1016/j.neubiorev.2016.09.008
Do monkeys have a theory of mind? How to answer the question? https://doi.org/10.1016/j.neubiorev.2016.11.007
@iandol
iandol / main-190730.log
Created July 29, 2019 12:32
Tobii ETM log
{"name":"main","hostname":"cog1","pid":6457,"level":30,"msg":"##### cli flags: { _: [], auto: false }","time":"2019-07-29T19:57:28.412Z","v":0}
{"name":"main","hostname":"cog1","pid":6457,"level":30,"msg":"Setting Flag:: _, ","time":"2019-07-29T19:57:28.413Z","v":0}
{"name":"main","hostname":"cog1","pid":6457,"level":30,"msg":"Setting Flag:: auto, false","time":"2019-07-29T19:57:28.414Z","v":0}
{"name":"main","hostname":"cog1","pid":6457,"level":30,"msg":"Process started with args: ","time":"2019-07-29T19:57:28.414Z","v":0}
{"name":"main","hostname":"cog1","pid":6457,"level":30,"msg":"[\"/opt/TobiiProEyeTrackerManager/TobiiProEyeTrackerManager\"]","time":"2019-07-29T19:57:28.414Z","v":0}
{"name":"main","hostname":"cog1","pid":6457,"level":30,"msg":"Squirell is False, resuming start of app","time":"2019-07-29T19:57:28.414Z","v":0}
{"name":"main","hostname":"cog1","pid":6457,"level":50,"msg":"BlockStatistics::blockTobiiUsers all external ip services failed","time":"2019-07-29T19:57:38.549Z","v":0}
{"name":"main
@iandol
iandol / motiontest1.m
Last active October 23, 2019 04:44
Moving dots across the vertical height, variable (sinusoidal) speed to test speed-dependent ghosting; can control GTG via arrow keys: [left|right]=background [up|down]=dots
function motiontest1()
screen = 1;
screenSize = [];
cycleTime = 2; % time for one sweep, determines max speed
bgColour = 0.55;
dotColour = [0 0 0]';
dotSize = 0.5;
nDots = 35;
@iandol
iandol / minimal.m
Last active October 11, 2018 09:26
Screen('Preference', 'SkipSyncTests', 2)
PsychDefaultSetup(2);
screenId = max(Screen('Screens')); % get screen ID
PsychImaging('PrepareConfiguration');
PsychImaging('AddTask', 'General', 'UseFastOffscreenWindows');
PsychImaging('AddTask', 'General', 'FloatingPoint32Bit');
@iandol
iandol / error.txt
Created August 30, 2018 06:45
appdesigner error
>> appdesigner
Error using appdesservices.internal.browser.WebWindowController/startBrowser (line 87)
Unable to start App Designer due to an internal error.
MATLABWindow application failed to launch. Unable to launch the MATLABWindow application
Error in appdesservices.internal.browser.AbstractBrowserController (line 47)
obj.startBrowser(browserOptionsStruct);
Error in appdesservices.internal.browser.WebWindowController (line 23)
@iandol
iandol / convertOM2OSXTags.sh
Created July 27, 2018 01:07 — forked from scottstanfield/convertOM2OSXTags.sh
This script converts OpenMeta to OS X Mavericks tags.
#!/bin/bash
#
# This script converts OpenMeta to OS X Mavericks tags.
#
# http://code2k.net
#
# Copyright © 2013 CODE2K:LABS. All Rights Reserved.
mdfind "kMDItemOMUserTags == *" -onlyin "." | while IFS= read -r file; do
echo "$file"
@iandol
iandol / changeres.scpt
Created May 17, 2018 01:40
Applescript to toggle Retina Scale mode
-- Launch "System Preferences", open the "Displays" options and change to the "Display" tab
tell application "System Preferences"
activate
set the current pane to pane id "com.apple.preference.displays"
reveal anchor "displaysDisplayTab" of pane id "com.apple.preference.displays"
end tell
local index1, index2, index3, indexToUse
set index1 to 3