Hi Travis,
What control do we have to set the default save directory?
You have no control. It’s always $HOME/Documents/MWorks/Data
, where $HOME
is the home directory of the user running MWServer.
However, you can save in to subdirectories of Documents/MWorks/Data
, by starting the name of the data file with a relative path. For example, setting the name of the data file to Rig_1/Monkey_1/Run_1
will result in events being saved to $HOME/Documents/MWorks/Data/Rig_1/Monkey_1/Run_1.mwk
.
I was able to move to the cloud directory with …/'s, so I have …/…/…/Box/Data etc.
If that works, it’s only by accident. The intent is for everything to go in Documents/MWorks/Data
.
I’ve learned that Mworks will save this as the new default after I close and reopen the program.
It will persist after closing and reopening an experiment. However, if you quit and restart MWClient, it will be forgotten.
One thing it does not do is automatically provide a filename if I only point it to a directory. Is there anyway to institute this?
That isn’t supported at present. However, in MWClient’s preferences, if you check “Automatically open data file when experiment starts”, then the client will automatically create a data file for you. The name has the format username-experiment-date-time
, e.g.
cstawarz-my_experiment-20190329-094836.mwk
All that said, what you want to do is certainly very reasonable, and we ought to support it. I suggest two changes:
-
Add a preference to MWServer that lets you set the data file directory.
It needs to be a server preference, because data files are stored server side. If unspecified, it would default to the current location. We might even make this configurable on a per-experiment basis.
-
Extend MWClient’s automatic data file creation to include a user-specified filename template. That template could include the names of experiment variables, e.g.
${animal}/${protocol_name}/trial_${trial_number}
Does that sound like it would meet your needs?
Cheers,
Chris