Parameter/Window sets in MWorks

Hi Chris,

I’m trying to do two things:

  1. Figure out how to save/load parameter sets in MWorks: the “retain variables” creates a field in the XML file called “persistent” and sets it to 1. I’m assuming this means it will be saved/set when I save a variable set.
  2. Load a set of windows automatically when an experiment is loaded. Looking through the discussions I found this: MWorks: Discussion. Is this “task definition” file the official way to achieve what I want for the windows? It also seems to be a way of loading parameter sets. If that’s the case, would I be able to learn how to use this functionality with the information in that thread?

Thanks,
Evan

Hi Evan,

the “retain variables” creates a field in the XML file called “persistent” and sets it to 1. I’m assuming this means it will be saved/set when I save a variable set.

Yes, that’s correct.

Looking through the discussions I found this: http://help.mworks-project.org/discussions/suggestions/73. Is this “task definition” file the official way to achieve what I want for the windows? It also seems to be a way of loading parameter sets.

Yes, that’s what you want. (FYI, they’re now called “workspaces”.)

If that’s the case, would I be able to learn how to use this functionality with the information in that thread?

Yes, all the details are in that thread, starting here. However, it’s pretty simple to use:

To create a workspace, first set everything up the way you want (connected server, loaded experiment, loaded variable set, client window state). Then, in MWClient’s “File” menu, select “Save Workspace…”.

To load an existing workspace, open the client (but don’t connect to a server – that’s part of the workspace definition), then select “File → Open Workspace…”.

You can also create and/or modify workspace files in a text editor. They’re stored as JSON data, which is well suited to direct manipulation by a human (far more so than XML).

Note that the workspace stuff is still a work in progress. In particular, some client windows don’t yet support saving/loading their state via workspaces. However, it should be sufficient to meet your needs, and I’d welcome any feedback or suggestions on how to further improve the feature.

Cheers,
Chris

Hi Chris,

I tried it out and it seems to do everything that I want it to do at this point. Which windows don’t support saving/loading their state?

Evan

Which windows don’t support saving/loading their state?

  • Reward window
  • Eye window
  • Behavioral window
  • Eye calibrator window

The open/closed state of these windows is saved and restored, but none of their other settings/parameters are.

Chris

Got it. The eye calibrator parameters get saved along with the parameter set, so that’s taken care of. Thanks!