text to show visual_angle is cm per degree

parent d1c2221b
......@@ -283,7 +283,7 @@ async function experimentInit() {
text = new visual.TextStim({
win: psychoJS.window,
name: 'text',
text: 'This shape should be a 5 cm square.\nComponent size (5*x_scale, 5*y_scale) set every repeat.\nThe circle should have a visual angle of 10 degrees.\nPress space to continue',
text: "This shape should be a 5 cm square.\nComponent size (5*x_scale, 5*y_scale) set every repeat.\nThe circle should have a visual angle of 10 degrees using\nsize (10 * visual_angle * x_scale, 10 * visual_angle * y_scale)\nPress space to continue'",
font: 'Arial',
units: 'norm',
pos: [0, (- 0.8)], height: 0.075, wrapWidth: 1.5, ori: 0,
......@@ -910,6 +910,7 @@ function blind_spotRoutineEnd(snapshot) {
var visual_angle;
var validCount;
var angle_text;
var _key_resp_allKeys;
var rectangleComponents;
function rectangleRoutineBegin(snapshot) {
......@@ -938,6 +939,7 @@ function rectangleRoutineBegin(snapshot) {
}
visual_angle = (((visual_angle / validCount) / 15) / x_scale);
console.log("visual_angle cm", visual_angle);
angle_text = (util.round((visual_angle * 1000)) / 1000).toString();
polygon.setSize([(5 * x_scale), (5 * y_scale)]);
key_resp.keys = undefined;
......
......@@ -291,7 +291,7 @@ async function experimentInit() {
text = new visual.TextStim({
win: psychoJS.window,
name: 'text',
text: 'This shape should be a 5 cm square.\nComponent size (5*x_scale, 5*y_scale) set every repeat.\nThe circle should have a visual angle of 10 degrees.\nPress space to continue',
text: "This shape should be a 5 cm square.\nComponent size (5*x_scale, 5*y_scale) set every repeat.\nThe circle should have a visual angle of 10 degrees using\nsize (10 * visual_angle * x_scale, 10 * visual_angle * y_scale)\nPress space to continue'",
font: 'Arial',
units: 'norm',
pos: [0, (- 0.8)], height: 0.075, wrapWidth: 1.5, ori: 0,
......@@ -915,6 +915,7 @@ function blind_spotRoutineEnd(snapshot) {
var visual_angle;
var validCount;
var angle_text;
var _key_resp_allKeys;
var rectangleComponents;
function rectangleRoutineBegin(snapshot) {
......@@ -943,6 +944,7 @@ function rectangleRoutineBegin(snapshot) {
}
visual_angle = (((visual_angle / validCount) / 15) / x_scale);
console.log("visual_angle cm", visual_angle);
angle_text = (util.round((visual_angle * 1000)) / 1000).toString();
polygon.setSize([(5 * x_scale), (5 * y_scale)]);
key_resp.keys = undefined;
......
......@@ -186,8 +186,8 @@
<Param val="" valType="extendedCode" updates="constant" name="Before JS Experiment"/>
<Param val="" valType="extendedCode" updates="constant" name="Begin Experiment"/>
<Param val="" valType="extendedCode" updates="constant" name="Begin JS Experiment"/>
<Param val="fixation_cross.setPos([0, 0]);&amp;#10;fixation_cross.setColor(blue);&amp;#10;fixation_cross.setAutoDraw(true);&amp;#10;circle_10.setFillColor(transparent);&amp;#10;visual_angle = 0;&amp;#10;validCount = 0;&amp;#10;for (var Idx, _pj_c = 0, _pj_a = util.range(4), _pj_b = _pj_a.length; (_pj_c &lt; _pj_b); _pj_c += 1) {&amp;#10; Idx = _pj_a[_pj_c];&amp;#10; if ((Math.abs(blind_spots[Idx]) &gt; 0)) {&amp;#10; visual_angle += Math.abs(blind_spots[Idx]);&amp;#10; validCount += 1;&amp;#10; }&amp;#10;}&amp;#10;visual_angle = (((visual_angle / validCount) / 15) / x_scale);&amp;#10;console.log(&quot;visual_angle cm&quot;, visual_angle);&amp;#10;" valType="extendedCode" updates="constant" name="Begin JS Routine"/>
<Param val="fixation_cross.setPos([0,0])&amp;#10;fixation_cross.setColor(blue)&amp;#10;fixation_cross.setAutoDraw(True)&amp;#10;circle_10.setFillColor(transparent)&amp;#10;visual_angle = 0&amp;#10;validCount = 0&amp;#10;for Idx in range (4):&amp;#10; if abs(blind_spots[Idx]) &gt; 0:&amp;#10; visual_angle += abs(blind_spots[Idx])&amp;#10; validCount += 1&amp;#10;visual_angle = visual_angle / validCount / 15 / x_scale&amp;#10;print('visual_angle cm',visual_angle)&amp;#10;" valType="extendedCode" updates="constant" name="Begin Routine"/>
<Param val="fixation_cross.setPos([0, 0]);&amp;#10;fixation_cross.setColor(blue);&amp;#10;fixation_cross.setAutoDraw(true);&amp;#10;circle_10.setFillColor(transparent);&amp;#10;visual_angle = 0;&amp;#10;validCount = 0;&amp;#10;for (var Idx, _pj_c = 0, _pj_a = util.range(4), _pj_b = _pj_a.length; (_pj_c &lt; _pj_b); _pj_c += 1) {&amp;#10; Idx = _pj_a[_pj_c];&amp;#10; if ((Math.abs(blind_spots[Idx]) &gt; 0)) {&amp;#10; visual_angle += Math.abs(blind_spots[Idx]);&amp;#10; validCount += 1;&amp;#10; }&amp;#10;}&amp;#10;visual_angle = (((visual_angle / validCount) / 15) / x_scale);&amp;#10;console.log(&quot;visual_angle cm&quot;, visual_angle);&amp;#10;angle_text = (util.round((visual_angle * 1000)) / 1000).toString();&amp;#10;" valType="extendedCode" updates="constant" name="Begin JS Routine"/>
<Param val="fixation_cross.setPos([0,0])&amp;#10;fixation_cross.setColor(blue)&amp;#10;fixation_cross.setAutoDraw(True)&amp;#10;circle_10.setFillColor(transparent)&amp;#10;visual_angle = 0&amp;#10;validCount = 0&amp;#10;for Idx in range (4):&amp;#10; if abs(blind_spots[Idx]) &gt; 0:&amp;#10; visual_angle += abs(blind_spots[Idx])&amp;#10; validCount += 1&amp;#10;visual_angle = visual_angle / validCount / 15 / x_scale&amp;#10;print('visual_angle cm',visual_angle)&amp;#10;angle_text = str(round(visual_angle * 1000) / 1000)" valType="extendedCode" updates="constant" name="Begin Routine"/>
<Param val="Auto-&gt;JS" valType="str" updates="None" name="Code Type"/>
<Param val="fixation_cross.setSize([5*x_scale*(.75+sin(t*4)*.25),5*y_scale*(.75+sin(t*6)*.25)])&amp;#10;" valType="extendedCode" updates="constant" name="Each Frame"/>
<Param val="fixation_cross.setSize([((5 * x_scale) * (0.75 + (Math.sin((t * 4)) * 0.25))), ((5 * y_scale) * (0.75 + (Math.sin((t * 6)) * 0.25)))]);&amp;#10;" valType="extendedCode" updates="constant" name="Each JS Frame"/>
......@@ -219,7 +219,7 @@
<Param val="duration (s)" valType="str" updates="None" name="stopType"/>
<Param val="" valType="code" updates="constant" name="stopVal"/>
<Param val="True" valType="bool" updates="None" name="syncScreenRefresh"/>
<Param val="This shape should be a 5 cm square.&amp;#10;Component size (5*x_scale, 5*y_scale) set every repeat.&amp;#10;The circle should have a visual angle of 10 degrees.&amp;#10;Press space to continue" valType="str" updates="constant" name="text"/>
<Param val="This shape should be a 5 cm square.&amp;#10;Component size (5*x_scale, 5*y_scale) set every repeat.&amp;#10;The circle should have a visual angle of 10 degrees using&amp;#10;size (10 * visual_angle * x_scale, 10 * visual_angle * y_scale)&amp;#10;Press space to continue'" valType="str" updates="constant" name="text"/>
<Param val="norm" valType="str" updates="None" name="units"/>
<Param val="1.5" valType="code" updates="constant" name="wrapWidth"/>
</TextComponent>
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment