GithubHelp home page GithubHelp logo

Comments (6)

shippy avatar shippy commented on June 2, 2024

Oh, and it occurs to me that settings.objects enumerates a combination of elements and stages, so that would need to be cleaned up as well.

from psychtaskframework.

shippy avatar shippy commented on June 2, 2024
  • Determine the data structure for passing already-drawn elements
  • Determine the standard interface for element-drawing functions: trialSettings, blockSettings
  • Determine the terminology ("draw scripts" or "phase scripts"? "elements" or "objects"?) and amend config + file & function names appropriately

from psychtaskframework.

shippy avatar shippy commented on June 2, 2024

Current next steps:

  • Implement offCenterByPx in drawLotto and a (more general) drawRef so that tasks can stop endlessly duplicating that code. (Done in 3ad5aa4)

from psychtaskframework.

shippy avatar shippy commented on June 2, 2024

...okay. All of the ideas above are kinda bad. Here's where we're at.

Each phase draws many elements and one action. The draw scripts are fully defined by trial/block settings; they don't need to know about other drawn objects and it is the responsibility of the user to set them up correctly. The action is (in our current use cases) either to wait for some amount of time before moving onto the next phase, or to collect a response.

Actions are exactly what the callback logic was written for. The only problem: how do they know what phase they should be getting settings from? Some phaseSettings struct, or some way to extract the relevant phaseSettings out of blockSettings, is necessary.

This might not be a bad time to emulate Stream in pre-set config objects and set up a phaseConfig function that produces a validated phaseConfig struct. This struct has to contain (at least) duration, cell array of draw function handles, and an action function handle.

from psychtaskframework.

shippy avatar shippy commented on June 2, 2024

One way to get around the "what phase am I getting settings from?" problem is to create phaseSettings right before the action callback in the phase script. The phase script knows what phase it is and what durations to look for. This can be generalized, but at the cost of either (a) exporting the callback logic to separate XYZ_runTrial files, or (b) defining the actions in the config somehow.

See #26 for extended discussion.

from psychtaskframework.

shippy avatar shippy commented on June 2, 2024

There's pie-in-the-sky work to be done on #26, but draw elements, actions, and phases have been separated fairly cleanly. This issue will close as soon as I merge 37_phase_and_draw_scripts.

from psychtaskframework.

Related Issues (20)

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.