Storage
Overview
The Storage operator is a data storage and retrieval entry for floating point sampled data.Signals that are put into the operator are stored to disk in a file format as is selected in the FileType property and with the file name as specified in the FileNameFormat property.
Supported file formats are documented separately: "Installed File Formats"
Operator ports
Input S: Any sample type. The connection is not limited to one type of signal.Output S_stored: Any sample type. The connection is not limited to one type of signal.
Properties
Find more information about changing properties here: "Properties Viewer"Alias (stream name)
type: See descriptionThe short name (e.g. 'ECG') of a file data stream. Not all characters are allowed. You can also use variables in this property.
For more information about stream aliases, please refer to "Stream Alias - concept for naming of data files".
In Polybench an 'alias' means a variable file name. The alias only specifies what kind of recording this is, not the exact file name. The exact file name is determined by the system and by Polybench Manager.
Read more about stream aliases here: "Stream Alias - concept for naming of data files".
You may use variables here, for example if you require the alias to change for each new storage start. If you do that, it is possible to let this storage operator store data in the same measurement session (note that in one measurement session each alias is allowed only once!).
As an example, where the variable $cnt$ contains the value 1, then Pressures$cnt$ will result in the alias Pressures1.
In Polybench an 'alias' means a variable file name. The alias only specifies what kind of recording this is, not the exact file name. The exact file name is determined by the system and by Polybench Manager.
Read more about stream aliases here: "Stream Alias - concept for naming of data files".
You may use variables here, for example if you require the alias to change for each new storage start. If you do that, it is possible to let this storage operator store data in the same measurement session (note that in one measurement session each alias is allowed only once!).
As an example, where the variable $cnt$ contains the value 1, then Pressures$cnt$ will result in the alias Pressures1.
FileNameFormat
type: See descriptionThe format of the file name. The default is '[$year$,*][$month$,*][$day$,*]_[$hour$,*][$minute$,*][$second$,*].[$alias$,*].[$ext$,*]'.
The file name format can be a fixed file name, a combination of fixed text and variables, or a file name that includes variables in the form [$variable$,character count]:
- $variable$: this can be any global system variable (see "Free Global and Namespace Variables"), or variable parameter in your program. There are also two special variables that can be used here: $ext$ to get the default file extension, and $alias$ to copy the Alias name.
- character count: a specifier that determines how many characters from the variable are used. For example, [$SomeVariable$,2] only takes the first two characters of the value of $SomeVariable$. Set to '*' to take all characters.
You cannot define a sub-folder in the name here. The folder where the file is stored is determined by the external measurement manager, or if that is not available, the storage folder will by the default Documents folder of your Windows user account. Any forbidden characters are replaced by a hyphen ('-') or an underscore ('_').
If you leave this property empty, Polybench creates a default name which is equal to [$year$,*][$month$,*][$day$,*]_[$hour$,*][$minute$,*][$second$,*].[$alias$,*].[$ext$,*].
- $variable$: this can be any global system variable (see "Free Global and Namespace Variables"), or variable parameter in your program. There are also two special variables that can be used here: $ext$ to get the default file extension, and $alias$ to copy the Alias name.
- character count: a specifier that determines how many characters from the variable are used. For example, [$SomeVariable$,2] only takes the first two characters of the value of $SomeVariable$. Set to '*' to take all characters.
You cannot define a sub-folder in the name here. The folder where the file is stored is determined by the external measurement manager, or if that is not available, the storage folder will by the default Documents folder of your Windows user account. Any forbidden characters are replaced by a hyphen ('-') or an underscore ('_').
If you leave this property empty, Polybench creates a default name which is equal to [$year$,*][$month$,*][$day$,*]_[$hour$,*][$minute$,*][$second$,*].[$alias$,*].[$ext$,*].
FileNameFormatResult
type: See descriptionThe result after variables were exchanged of the FileNameFormat property. Use this to check if your FileNameFormat is correct. This value is only updated if you change the FileNameFormat.
FileType
type: UndefinedSelect a file type from the list. The file type is used to save your data to disk. File Settings will be set to their defaults.
The list shows the file types that are installed on your system. For descriptions per file type, see this: "Installed File Formats".
Warning: if you change the file type, then if the file type has any specific settings, those settings are set to default values!
Warning: if you change the file type, then if the file type has any specific settings, those settings are set to default values!
FileSettings
type: UndefinedOptional settings of the file format
It depends on the FileType that you have selected, if any specific settings are there. If a file format does not provide any settings, then this property is empty (empty list).
If the file format does allow you to define special settings, then you have to find the documentation of that file format in order to read more about what the settings mean.
An overview of the file formats on your system is provided here: "Installed File Formats".
If the file format does allow you to define special settings, then you have to find the documentation of that file format in order to read more about what the settings mean.
An overview of the file formats on your system is provided here: "Installed File Formats".
FilterSystemEvents
type: True or FalseSet to true to filter system event markers from the signal, so that they are not stored. System event names start with an underscore '_'.
Select one of those presets:
True or False
True may also be read like 'yes' and false like 'no'
True or False
True may also be read like 'yes' and false like 'no'
Per default this setting is true, so system events are not stored. Be careful setting this property to false, because in some situations there could be very many system events. If those are not needed for your application, they would only cost a lot of disk space.
RemoveTimeOffset
type: True or FalseSet to true to store the signal always from t = 0 seconds, also if the the input signal has a time offset.
Select one of those presets:
True or False
True may also be read like 'yes' and false like 'no'
True or False
True may also be read like 'yes' and false like 'no'
If you start and stop storing data from a measurement that is being continued meanwhile, you will see that the stored signals always begin at the measurement time the storing was started. In other words, the timing of the measurement is retained, also if you store only sections of it.
But sometimes it is required to have every section of stored data to begin at t = 0 seconds. This might be the case if the stored data is to be reviewed synchronously with data from another source. To let data be stored from t = 0 sec, set this property to True (default is False).
But sometimes it is required to have every section of stored data to begin at t = 0 seconds. This might be the case if the stored data is to be reviewed synchronously with data from another source. To let data be stored from t = 0 sec, set this property to True (default is False).
SyncID
type: See descriptionIf you require the Storage to start or stop separately from other objects, you should refer to the Storage with a SyncID. This is a word or number you can think out yourself.
For example, if you require the Storage to start on a special command, you would issue a START action with a Value which is the SyncID of the Storage operator.
If you have specified a SyncID, and a START Action is issued with another SyncID, then recording will not start for this operator.
For more information about the behavior of the START, STOP and RESET actions in relation to the SyncID setting, please read more here: "SyncID in relation to START, STOP and RESET".
If you have specified a SyncID, and a START Action is issued with another SyncID, then recording will not start for this operator.
For more information about the behavior of the START, STOP and RESET actions in relation to the SyncID setting, please read more here: "SyncID in relation to START, STOP and RESET".
Caption
type: Word or phraseThe name of the object in the project. This name must not contain '.', '$' nor '@' characters.
For more information about the rules and usage of the Caption property, please refer to "Caption property - background and usage".
Documentation
type: See descriptionOptional documentation of this object. If this object is an operator, the Documentation text is displayed below the operator symbol.
Variable Parameters
Find more information about Variable Parameters here: "Variable Parameters"ReviewFile
type: See descriptionShows the caption of the file that is currently available for review at the output.
RecordingSeconds
type: See descriptionShows the time in seconds the storage is recording signals
RecordingTime
type: See descriptionShows the time signals are being recorded, in hours, minutes and seconds
ExportTimeStamp
type: Parameter list (see "Parameter List")Start date and time of the exported file. You may optionally change the time stamp before starting to store data.
Once you have explicitly changed the export time stamp, you always have to change it before storing a measurement is started; until the operator is reset (with a RESET action), then the current time is taken as time stamp automatically.
ExportFileInformation
type: Parameter list (see "Parameter List")Contains a list of read-only texts about the file that is currently being stored, such as the file path and start date and time.
ImportTimeStamp
type: Parameter list (see "Parameter List")Start date and time of the imported file.
ImportFileInformation
type: Parameter list (see "Parameter List")Contains a list of read-only texts about the file that is currently open for reviewers at the output of the Storage operator, such as the file path and start date and time.
FileSettings
type: Parameter list (see "Parameter List")Optional settings of the file format
It depends on the FileType that you have selected, if any specific settings are there. If a file format does not provide any settings, then this property is empty (empty list).
If the file format does allow you to define special settings, then you have to find the documentation of that file format in order to read more about what the settings mean.
An overview of the file formats on your system is provided here: "Installed File Formats".
If the file format does allow you to define special settings, then you have to find the documentation of that file format in order to read more about what the settings mean.
An overview of the file formats on your system is provided here: "Installed File Formats".
Details
If you put a Review signal viewer at the output of the Storage operator, the signals that are being stored can be reviewed online. If no signals are being recorded, the signals that were recorded the last time can be reviewed (if any data are accessible, of course).In the image above is shown that a Y-T Reviewer ("Y-T Reviewer") can be connected to the output of the Storage operator. A live data Y-T Viewer ("Y-T Viewer", such as viewer 1.) or any other live data operators will not do anything, because the Storage delivers only stored data at its output. If recording data is stopped, you will see that viewer 2. continues to show the last recorded signals, until a new recording is started again.
Polybench, together with the patient database manager, determines where the signals are stored. In the Storage operator is specified what file type the recorded data are to be stored in (FileType), how the file name should look like (FileNameFormat), and a file short-name, the so called Alias. The stream alias is a short reference name, not for one recorded file, but for a type of signals you want to record. For example: if you record an ECG signal, you could give the recording a StreamAlias name of "ECG". Polybench takes care that for every new ECG recording, a new file is created, with a unique name, but always referring to the alias "ECG". A reviewer at the output will then only show ECG signals (or: only files that were recorded with the "ECG" alias).
If the Storage operator due to some problem cannot record the data, the Polybench Program Monitor pops up and states which Storage operator cannot start. If a fixed file name is chosen and a data file is about to be overwritten, the new file takes the file name as specified and puts "(new)" behind it. So, files are never overwritten!.
Note that the file is created as soon as the Storage operator receives a START action ("START"), and not when the Storage gets the first samples at its input. So, if you want to switch off a certain Storage operator in your measurement configuration, you should give it a unique SyncID and start it seperately when required. Also, if the Storage did not get a START action, then if signals are put to the input, nothing is stored!
Channel configuration change stops storage!
The Storage operator does not support the changing of any channel data while it is storing data. So, if during storage of data the number of channels changes, or the sample frequency, or even channel names or units, then the data stream is broken and the Storage operator stops storing data! It does not start again automatically, so you have to call a START action to resume storing data.Why is this? Because the Storage operator is a general interface to any kind of floating point file format. Many of these file formats do not support multiple data streams, or changing channel configurations. Therefore, the Storage closes a recording file as soon as the channel configuration changes.
Be careful with Action Sequences, where the Storage is started (with a START action), but that also cause the input channel configuration to change. If the START comes before the channel configuration change, the the Storage seems not to start! That is, because the Storage has started, but has stopped immediately thereafter.
Data events and markers
Data events and markers are stored with the sampled data, if the data file type allows that kind of information. Refer to the documentation of the file type you use, to find out how data events are stored. Note that some file formats store the events and markers in a separate .CSV file, which can be opened in most spread sheet programs. Please also read the information for the FilterSystemEvents property.How live data is stored
Streaming data at the input of the Storage operator may not be stored to disk immediately. For efficiency reasons, blocks of data may be buffered in memory, before they are written to disk. If the computer would switch off during a measurement, the data that is kept in memory will be lost. It is a requirement of Polybench that no more than a few seconds of data will get lost in this case.Stored data
The Storage operator, of course, works with stored data, but only at the output. In general, the Storage operator is a source of stored data to other operators.If a stored-data enabled operator is connected to the output, it can retrieve stored data. The data that is returned is either the data that is currenty being stored (until the data that were stored a few seconds ago), or the data that was stored most recently. If no data is available, the Storage operator is either not set up correctly, or the refered data does not exist (or cannot be found).
If you open a project that contains a Storage operator with a Reviewer connected at its output, then the Storage will try to load the data file that is currently selected in the patient and measurements manager. If you select another file of the same type (equal Alias), then you have to issue a RESET action in order to let the Storage load the newly selected file. Please note: you cannot review another file in a program that has just stored its own signals! As soon as a program records signals, reviewers will only show the data that have just been recorded.
How channel names and units are stored
The sampled data will be stored such, that the channels as offered at the input can be restored afterwards. If the data file allows for it, the channel names and units are stored to disk. If that is the case, review of data from the output will show the correct channel names and units (which are then equal to that of the input).Stored sample frequency
Data is normally stored at the sample rate that is offered at the input of the Storage operator. Refer to the documentation of the file type that you are using if data is actually stored that way. Note that some file formats do not support all sample frequencies.Starting behavior
If a START action is performed in a project, the Storage checks if it should start storing sampled data. Whether the Storage starts, depends on its SyncID property. If the SyncID has not been set (empty setting), the Storage will start on any START action, also if the START action has a SyncID value set. If the Storage does define a SyncID, it will only start storing data at its input if a START action is issued with that SyncID code in its Value (see Actions "Actions - Overview" for more details).Stopping behavior
If a STOP action is performed in a project, the Storage operator checks if it should stop storing sampled data that comes in at its input. Whether storing is stopped again depends on the SyncID setting, but in a different way as for starting: the Storage stops if no SyncID has been defined in the STOP action (a so called 'general stop'), or if the SyncID specified for the STOP action equals the SyncID value of the Storage operator. Of course, if the no sampled data is offered at the input of the Storage anymore, storing automatically stops.Channel configuration at the output - issues
Please note the following: the channel configuration at the output of the Storage operator will be the same as the input configuration, if the input is also connected. In that configuration, data will be recorded and can be reviewed (from the output of the Storage) in a signal reviewer. Both input and output have the same channel layouts.There is an issue with this however: the output remembers the (mostly hidden) identifiers of each each channel, also if the input is changed. So, if you have created a new schematic with a Storage, and you look at the connections to input and from output by using the signal probe, then in the probe you can see that the identifiers of input and output are equal. If you now connect a different source to the Storage, then you can observe that the output channel identifiers did not change.
Please note: if you intend to change the output identifiers of the Storage, then you can only do this by replacing the storage with a new one! Because only the first time the input is connected, the output identifiers will be set.