The session configuration defines the highest level of configuration available in Exploration
Tool. It mainly consists of one or several sensor configurations (SensorConfig) for
the server to run. It also sets the update rate for the server, and the data format
(“extended”) returned from the client.
Mapping from sensor ID to sensor config is done here in the session config. For example, if you
want to want to use sensor 2, you can do:
SessionConfig({2:SensorConfig(start_point=123)})
The default sensor ID is 1. Going further, you may run multiple sensors at the same time (in
parallel) like this:
The dictionary shown above forms a group of sensor configs. Further extending upon this, you
may specify multiple groups which are run in sequence, like this:
You may reuse the same sensor across groups. If a sensor is used multiple times, a
reconfiguration will be done prior to each measurement.
A session config with multiple sensor configs (in a single group or multiple) is considered
“extended”. This is reflected in the shape of some return types. A SessionConfig with a single
SensorConfig is not extended, but the return values can be passed as extended with the keyword
argument extended=True, see below:
extended – Forces whether to use the extended format or not. If not given (=None), the extended
format will be used automatically if multiple sensor configs are given.
update_rate – The update rate limit on the server. Defaults to None, not limiting the rate.
Raises:
ValueError – If the session config must be extended but extended=False.
The sensor config represents a 1-1 mapping to the RSS service config.
By default, the sensor config holds a single SubsweepConfig. The parameters defined by
the subsweep config, like start_point, can be accessed via the sensor config. If
multiple subsweeps are used, those parameters must be accessed via their respective subsweep
configs.
For example, a sensor config can be created like this:
SensorConfig(sweeps_per_frame=16,start_point=123)
Note that the start_point is implicitly set in the underlying subsweep config. If you
want to explicitly set the subsweep config(s), you can do
Each data point can be sampled several times and the sensor hardware then produces an
average value of those samples. The time needed to measure a sweep is roughly proportional
to the number of averaged samples. Hence, if there is a need to obtain a higher update
rate, HWAAS could be decreased but this leads to lower SNR.
Each profile consists of a number of settings for the sensor that configures the RX and TX
paths. Lower profiles have higher depth resolution while higher profiles have higher radar
loop gain.
Must be a value between 0 and 23 inclusive where 23 is the highest gain and 0 the lowest.
Lower gain gives higher SNR. However, too low gain may result in quantization, lowering
SNR. Too high gain may result in saturation, corrupting the data.
Enabling loopback will activate an internal route between TX and RX in the sensor.
The signal will take this route instead of being transmitted out of the sensor.
Note, loopback can’t be enabled together with profile 2.
If enabled, the data phase will be enhanced such that coherent distance filtering can be
applied. Given a single reflection from an object, the phase will appear as “flat” around
the amplitude peak.
Enabling the phase enhancement increases the processing execution time.
Pulse Repetition Frequency, PRF, is the frequency at which pulses are sent out from
the radar system. The measurement time is approximately proportional to the PRF.
The higher the PRF, the shorter the measurement time.
This parameter sets the Maximum Measurable Distance, MMD, that can be achieved. MMD is the
maximum value for the end point, i.e., the start point + (number of points * step length).
For example, an MMD of 7.0 m means that the range cannot be set further out than 7.0 m.
It also sets the Maximum Unambiguous Range, MUR, that can be achieved. MUR is the maximum
distance at which an object can be located to guarantee that its reflection corresponds to
the most recent transmitted pulse. Objects farther away than the MUR may fold into the
measured range. For example, with a MUR of 11.5 m, an object at 13.5 m could become
visible at 2 m.
Setting the frame rate to unlimited means that the rate is not limited by the sensor but
the rate that the host acknowledge and reads out the measurement data.
In Hz. Must be > 0 or None, where None is interpreted as unlimited.
With CSM, the sensor timing is set up to generate a continuous
stream of sweeps, even if more than one sweep per frame is used.
The interval between the last sweep in one frame to the first
sweep in the next frame becomes equal to the interval between
sweeps within a frame (given by the sweep rate).
It ensures that:
‘frame rate’ = ‘sweep rate’ / ‘sweeps per frame’
While the frame rate parameter can be set to approximately
satisfy this condition, using CSM is more precise.
If only one sweep per frame is used, CSM has no use since a
continuous stream of sweeps is already given (if a fixed frame
rate is used).
The main use for CSM is to allow reading out data at a slower
rate than the sweep rate, while maintaining that sweep rate
continuously.
Note that in most cases, double buffering must be enabled to
allow high rates without delays.
If enabled, the sensor buffer will be split in two halves reducing the
maximum number of samples. A frame can be read while sampling is done into the
other buffer.
When using double buffering, measurements coinciding with SPI activity may have distorted
phase. To mitigate this issue, applying a median filter is recommended.
The inter frame idle state is the state the sensor idles in between each frame.
Idle state Deep sleep is the deepest state where as much of the
sensor hardware as possible is shut down and idle state Ready is
the lightest state where most of the sensor hardware is kept on.
Deep sleep is the slowest to transition from while Ready is the fastest.
The inter sweep idle state is the state the sensor idles in
between each sweep in a frame.
Idle state Deep sleep is the deepest state where as much of the
sensor hardware as possible is shut down and idle state Ready is
the lightest state where most of the sensor hardware is kept on.
Deep sleep is the slowest to transition from while Ready is the fastest.
The subsweep config represents a 1-1 mapping to the RSS service subsweep config.
Normally used as a part of the SensorConfig. Multiple group configurations are required
when certain parameters cannot be configured in subsweep config.
Each profile consists of a number of settings for the sensor that configures the RX and TX
paths. Lower profiles have higher depth resolution while higher profiles have higher radar
loop gain.
Each data point can be sampled several times and the sensor hardware then produces an
average value of those samples. The time needed to measure a sweep is roughly proportional
to the number of averaged samples. Hence, if there is a need to obtain a higher update
rate, HWAAS could be decreased but this leads to lower SNR.
Must be a value between 0 and 23 inclusive where 23 is the highest gain and 0 the lowest.
Lower gain gives higher SNR. However, too low gain may result in quantization, lowering
SNR. Too high gain may result in saturation, corrupting the data.
Enabling loopback will activate an internal route between TX and RX in the sensor.
The signal will take this route instead of being transmitted out of the sensor.
Note, loopback can’t be enabled together with profile 2.
If enabled, the data phase will be enhanced such that coherent distance filtering can be
applied. Given a single reflection from an object, the phase will appear as “flat” around
the amplitude peak.
Enabling the phase enhancement increases the processing execution time.
Pulse Repetition Frequency, PRF, is the frequency at which pulses are sent out from
the radar system. The measurement time is approximately proportional to the PRF.
The higher the PRF, the shorter the measurement time.
This parameter sets the Maximum Measurable Distance, MMD, that can be achieved. MMD is the
maximum value for the end point, i.e., the start point + (number of points * step length).
For example, an MMD of 7.0 m means that the range cannot be set further out than 7.0 m.
It also sets the Maximum Unambiguous Range, MUR, that can be achieved. MUR is the maximum
distance at which an object can be located to guarantee that its reflection corresponds to
the most recent transmitted pulse. Objects farther away than the MUR may fold into the
measured range. For example, with a MUR of 11.5 m, an object at 13.5 m could become
visible at 2 m.
Pulse Repetition Frequency, PRF, is the frequency at which pulses are sent out from
the radar system. The measurement time is approximately proportional to the PRF.
The higher the PRF, the shorter the measurement time.
This parameter sets the Maximum Measurable Distance, MMD, that can be achieved. MMD is the
maximum value for the end point, i.e., the start point + (number of points * step length).
For example, an MMD of 7.0 m means that the range cannot be set further out than 7.0 m.
It also sets the Maximum Unambiguous Range, MUR, that can be achieved. MUR is the maximum
distance at which an object can be located to guarantee that its reflection corresponds to
the most recent transmitted pulse. Objects farther away than the MUR may fold into the
measured range. For example, with a MUR of 11.5 m, an object at 13.5 m could become
visible at 2 m.
Flag indicating if high speed mode is used.
If true, it means that the sensor has been configured in a way where it
can optimize its measurements and obtain a high max sweep rate.
Configuration limitations to enable high speed mode:
- Continuous sweep mode: off
- Inter sweep idle state: Ready
- Subsweeps: 1
- Profile 3-5
If a path-like object, by default (depending on mode below) an HDF5 file is created at
that path. When stopping, the file is closed.
If an h5py.File, that file is used as-is. In this case, the file is not closed when
stopping.
attachable – A Client that the recorder will be attached to. When a recorder is attached to a
Client, all metadata and data frames will be recorded.
mode – The file mode to use if a path-like object was given for path_or_file. Default value is
‘x’, meaning that we open for exclusive creation, failing if the file already exists.
_chunk_size –
If given, data will be written to file every _chunk_size samples.
If not given, data will be written at least every 512:th sample, or at least once per
second, whichever comes first.
Setting a small chunk size (e.g. 1) may degrade performance for high sample rates.
Record representing all data needed to recreate multiple sessions
A Record also is a SessionRecord, but its session-related accessors
(like results, session_config) will raise an error if this Record contains
multiple sessions/SessionRecords.
Representation of multiple Result stacked together. Scalar values, like
Result.data_saturated, become 1-D arrays of the same type. The Result.frame,
which is originally a 2-D array, becomes a 3-D array where the frames are stacked in the first
dimension.
See Result for details on the attributes/properties.
Since this function returns a PersistentRecord, data is not immediately loaded into
memory. Rather, data is lazily loaded from the underlying file on demand.
Either a path or an opened file (h5py.File) may be given. If a path is given, the file
will be opened by this function, and must be closed again by the user. The recommended way to
do this is by using the context manager of the returned persistent record, like:
Converts an array with plain complex dtype (non-structured)
into an array with dtype = INT_16_COMPLEX
(structured with parts “real” and “imag”) using numpy.round.
Calculates the number of points required for filter initialization when performing
distance filtering, using the filter coefficients supplied by the function
get_distance_filter_coeffs.
Returns an array of all distances measured by the config.
The distances are returned in the same order as found in the result frame
(acconeer.exptool.a121.Result.frame())
Calculate temperature compensation for mean sweep and background noise(tx off) standard
deviation.
The signal adjustment models how the amplitude level fluctuates with temperature.
If the same object is measured against while the temperature changes,
the amplitude level should be multiplied with this factor.
The temperature difference should be calculated by subtracting
the (calibration) recorded temperature from the measured.
Example of usage:
reference_temperature (recorded temperature during calibration)
reference_amplitude (recorded amplitude during calibration)
measurement_temperature (temperature at measurement time)
The reference_amplitude_new is an approximation of what the calibrated amplitude
would be at the new temperature.
E.g. When the temperature falls 60 degrees, the amplitude (roughly) doubles.
This yields a signal_adjustment_factor of (about) 2.
The signal adjustment model is follows 2 ** (temperature_diff / model_parameter), where
model_parameter reflects the temperature difference relative the reference temperature,
required for the amplitude to double/halve.
The deviation_adjustment_factor works the same way, but is applied to a measurement
taken with the Tx off. So if instead of measurement_amplitude, we have a measurement of tx_off.
The procedure for calculating this is to take the same configuration as
the application will use, but turning off the Tx.
This calibration value is multiplied with the deviation_adjustment_factor.