Jump to content

Template:StorageParams

From BCI2000 Wiki
Revision as of 16:46, 19 September 2022 by Mellinger (talk | contribs) (DataFile)

Common Data Storage Parameters

These are storage parameters common to all Data File Formats. {{{remark}}}

DataDirectory

Path to an existing directory. Recorded data will be stored below that directory. The path may be absolute, or relative to the source module's working directory at startup. Usually, the working directory at startup matches the source module's executable location in the prog directory.

DataFile

The path to the data file relative to the directory, including the file name.

The DataFile parameter is a string that may contain references to other parameters in the form ${Parameter}. By default, it contains a session directory, named according to the ${SubjectSession} parameter, and a file name containing the ${SubjectRun} parameter along with the session number, and a date.

Date variables: The user can introduce date and/or time into the file name. One may enter ${DateTime:<format string>} to add date and/or time in an arbitrary format. <format string> must be a date-time format string as defined for the POSIX strftime() function. For example, ${DateTime:%F} will produce the date in the standard format YYYY-MM-DD. Be careful with time formats which will typically contain the : character, which is illegal in Windows file names. To produce both date and time, use ${DateTime:%F-%H-%M-%S}.

NOTE: When the file name contains both a run number, and a date/time string, auto-incrementing the run number will not work properly. Auto-incrementing the run number depends on all other components of the file name being constant, which is not the case for date and time.

SubjectName

A textual ID for the subject. This text may appear in session directories, and data file names.

SubjectSession

A textual ID for the current session. Sessions correspond to data directories. By default, the path of a session directory is constructed according to

${DataDirectory}/${SubjectName}${SubjectSession}

SubjectRun

A number indicating the current run. Runs correspond to data files. To avoid accidental loss of data, run numbers are auto-incremented to the largest unused value. Within a session directory, data file names are by default constructed according to

${SubjectName}S${SubjectSession}R${SubjectRun}.${FileFormat}

By default, a data file's extension depends on its File Format.

ID_System, ID_Amp, ID_Montage

These parameters are provided for documentation purposes and may contain arbitrary text.