Data generation¶
The <input> and <output> tags of every module on this page additionally accept the attributes common to all analysis modules.
const¶
This module will initialize a buffer to a constant value. Both inputs are optional, and without any inputs it will fill the entire buffer with zero. If value is set, the buffer gets filled with this value, and if length is set, only length values will be initialized. (This is useful in combination with the append module to zero-pad a buffer.)
An explicit length of 0, an empty length buffer and a non-finite or negative length value all yield an empty output; only an absent length input falls back to the size of the output buffer. An empty value buffer is an error yielding an empty output, while a present NaN value is allowed and fills the output with NaN as a deliberate initialization.
<const>
<input as="value">BUFFER</input>
<input as="length">BUFFER</input>
<output as="out">BUFFER</output>
</const>
Inputs
as |
Count | as required |
Allowed types |
|---|---|---|---|
value |
optional | yes | buffer, value |
length |
optional | yes | buffer, value |
Outputs
as |
Count | as required |
|---|---|---|
out |
exactly one | no |
ramp¶
This module will create a ramp of values, i.e. a linear range of values. This is very useful to create time bases, for example for audio recordings. The module takes as inputs start, stop and the optional length. It will make sure that the first value is exactly start and the last value is stop. It will return length values or, if length is not provided, as many values as the size of the output buffer. A length of 1 outputs exactly the start value.
An empty start/stop buffer and a non-finite start or stop value are errors yielding an empty output. The length input behaves like const's: an explicit 0, an empty buffer and a non-finite or negative value yield an empty output; only an absent length input falls back to the size of the output buffer.
<ramp>
<input as="start">BUFFER</input>
<input as="stop">BUFFER</input>
<input as="length">BUFFER</input>
<output as="out">BUFFER</output>
</ramp>
Inputs
as |
Count | as required |
Allowed types |
|---|---|---|---|
start |
exactly one | yes | buffer, value |
stop |
exactly one | yes | buffer, value |
length |
optional | yes | buffer, value |
Outputs
as |
Count | as required |
|---|---|---|
out |
exactly one | no |
timer¶
Simple module which outputs the (fractional) seconds that have passed since the experiment started (referred to as "experiment time") and the current analysis run began. By default, experiment time does not increase while the experiment is paused and will continue with barely any gap when the experiment is resumed. Alternatively, you can set the attribute linearTime to true to output "linear time" instead, which is almost identical to experiment time but keeps increasing while the experiment is paused.
The timer module has a second output that gives the offset between the given time (experiment or linear time) and the widely used Unix timestamp, which is the number of seconds since 01.01.1970.
<timer linearTime="BOOLEAN">
<output as="out">BUFFER</output>
<output as="offset1970">BUFFER</output>
</timer>
Attributes
- linearTime
- See the module description.
- added in 1.12 optional, boolean, default:
false
Outputs
as |
Count | as required |
|---|---|---|
out |
optional | no |
offset1970 |
optional | yes |
offset1970- added in 1.12 Offset between the reported time axis and the Unix epoch, in seconds. Before the experiment has ever been started the experiment time is zero, so this is the current Unix timestamp (decided 2026-08-24); after the first start it is the start event's system time.
info¶added in 1.19
The info module is used as a generic way to access system information like the device's battery level. This is typically data that only has a use-case in a few specific applications and that cannot reasonably be considered as a sensor. It's more about metadata for the experiment (although this of course is not a precise criterion).
The module has no attributes, but several outputs, which are all optional and determine the system information to be retrieved:
<info>
<output as="batteryLevel">BUFFER</output>
<output as="wifiSignalStrength">BUFFER</output>
<output as="systemVolume">BUFFER</output>
<output as="batteryVoltage">BUFFER</output>
<output as="batteryCurrent">BUFFER</output>
<output as="batteryTemperature">BUFFER</output>
</info>
Outputs
as |
Count | as required |
|---|---|---|
batteryLevel |
optional | yes |
wifiSignalStrength |
optional | yes |
systemVolume |
optional | yes |
batteryVoltage |
optional | yes |
batteryCurrent |
optional | yes |
batteryTemperature |
optional | yes |
batteryLevel- Current battery level of the device that runs phyphox.
wifiSignalStrength- Signal strength of the current wifi connection. Only available on Android - iOS cannot obtain this metric and leaves the data container empty rather than refusing the file, so the module's other outputs stay usable.
systemVolume- Volume of the audio output (playback audio stream).
batteryVoltage- added in 1.20 Current battery voltage of the device that runs phyphox. Only available on Android.
batteryCurrent- added in 1.20 Current battery current of the device that runs phyphox. Android's convention is that positive values are charging the battery, but there have been reports of devices not following that convention correctly. Only available on Android.
batteryTemperature- added in 1.20 Current battery temperature of the device that runs phyphox. Only available on Android.