Giter Site home page Giter Site logo

qishengli / virtual_chinrest Goto Github PK

View Code? Open in Web Editor NEW
19.0 1.0 9.0 686 KB

JavaScript plug-in, data, and analysis code for Scientific Reports submission: Controlling for Participants’ Viewing Distance in Large-Scale, Psychophysical Online Experiments Using a Virtual Chinrest

Jupyter Notebook 99.39% HTML 0.28% CSS 0.02% JavaScript 0.32%

virtual_chinrest's Introduction

The Virtual Chinrest

JavaScript plug-in, data, and analysis code for Scientific Reports submission: Controlling for Participants’ Viewing Distance in Large-Scale,Psychophysical Online Experiments Using a Virtual Chinrest

jsPsych Plugin

https://www.jspsych.org/plugins/jspsych-virtual-chinrest/

Citation

If you are interested in this work, please see our research paper on Scientific Reports and consider citing our work:

@article{Li2020,
  doi = {10.1038/s41598-019-57204-1},
  url = {https://doi.org/10.1038/s41598-019-57204-1},
  year = {2020},
  month = jan,
  publisher = {Springer Science and Business Media {LLC}},
  volume = {10},
  number = {1},
  author = {Qisheng Li and Sung Jun Joo and Jason D. Yeatman and Katharina Reinecke},
  title = {Controlling for Participants' Viewing Distance in Large-Scale,  Psychophysical Online Experiments Using a Virtual Chinrest},
  journal = {Scientific Reports}
}

Contact

Please feel free to email Qisheng ([email protected]) if you have any questions regarding the research paper and the JavaScript library.

virtual_chinrest's People

Contributors

qishengli avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

virtual_chinrest's Issues

Why isn't the black square located at the horizontal center of the screen?

Hello and thank you for this work.

Reading through your paper, it seems like the method relies on measuring the distance between the blind spot and the center of display, however the fixation black square never really is at the center of the display's X axis. Instead its position seems to vary with the px2mm measurement of card size.

I'm curious whether this is intentional, and whether the viewing distance measurement that results from this non-central position of the black square is equivalent to what it would be if the black square was at the center.

The recordPosition keep running after 5 times

Hi, I find out that the recordPosition function keeps running after the "counter" is 0. That is, even the ball is not moving, but if you press the space, it will record it and recalculate the viewing distance. This may affect the result if participants make mistakes. By the way, using blindspot to calculate viewing distance, GENIUS.

bug in viewing distance calculation?

Hi Qisheng

When you compute the viewing distance:

var viewDistance = ball_sqr_distance/Math.radians(angle)

should that not be

var viewDistance = ball_sqr_distance / Math.tan(Math.radians(angle));

according to Equation 2 in your paper?

Unless I am missing something your code would slightly overestimate the viewing distance (by ~2%) given the angle and measured distance between ball and fixation.

Best,

Peter

Incorrect pixel card width

Hello,

I have encountered a bug using your script. The size in pixels of the credit card is inexact on all my monitors.

On my 24" Samsung CFG73 (520mm width, 1920x1080 resolution), the returned cardWidthPx value is 351px. However, the actual width is closer to 318px (Obtained via capturing the screen area of the virtual card, that was the easiest method I found, although it is a bit imprecise).
Calculating screen width from cardWidthPx gives a width of 1920/(351/85.6) = 468mm whereas using the screenshot width outputs 517mm (much closer to real size).

On my 22" LG L226-WA (475mm width, 1680x1050), cardWidthPx = 342px and screenshot width = 298px.
Screen width with cardWidthPx = 421mm, with screenshot width = 482mm.

Finally, on my 55" LG C8 (1225mm width, 3840x2160), cardWidthPx = 297px and screenshot width = 269px.
Screen width with cardWidthPx = 1107mm, with screenshot width = 1222mm.

Sadly, I have no idea how to fix this.

Best regards,
Martin Constant.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.