Skip to content

GitLab

  • Menu
Projects Groups Snippets
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
  • RTIS Dev RTIS Dev
  • Project information
    • Project information
    • Activity
    • Members
  • Packages & Registries
    • Packages & Registries
    • Package Registry
    • Infrastructure Registry
  • Wiki
    • Wiki
  • Activity
Collapse sidebar
  • RTIS Software
  • RTIS DevRTIS Dev
  • Wiki
  • Home

Home · Changes

Page history
Update home authored Nov 21, 2023 by Wouter Jansen's avatar Wouter Jansen
Hide whitespace changes
Inline Side-by-side
home.md
View page @ 990a0e22
# **RTIS Dev Documentation - Table of Content**
- [General Example](#general-example)
- [Classes](#classes)
- [RTISMeasurement](#rtismeasurement)
- [RTISSettings](#rtissettings)
- [TimeStampRecorderProcess](#timestamprecorderprocess)
- [MeasureExternalTriggerQueueThread](#measureexternaltriggerqueuethread)
- [MeasureExternalTriggerCallbackThread](#measureexternaltriggercallbackthread)
- [Methods](#methods)
- [open_connection](#open_connection)
- [close_connection](#close_connection)
- [set_recording_settings](#set_recording_settings)
- [set_processing_settings](#set_processing_settings)
- [get_current_settings_config_name_list](#get_current_settings_config_name_list)
- [get_current_settings](#get_current_settings)
- [clear_current_settings](#clear_current_settings)
- [get_settings](#get_settings)
- [set_settings_from_class](#set_settings_from_class)
- [get_premade_processing_settings_list](#get_premade_processing_settings_list)
- [get_premade_recording_settings_list](#get_premade_recording_settings_list)
- [get_microphone_layout_list](#get_microphone_layout_list)
- [prepare_processing](#prepare_processing)
- [unload_processing](#unload_processing)
- [get_raw_measurement](#get_raw_measurement)
- [get_signal_measurement](#get_signal_measurement)
- [get_processed_measurement](#get_processed_measurement)
- [process_measurement](#process_measurement)
- [set_counter](#set_counter)
- [set_behaviour](#set_behaviour)
- [get_firmware_version](#get_firmware_version)
- [create_measure_external_trigger_queue](#create_measure_external_trigger_queue)
- [create_measure_external_trigger_callback](#create_measure_external_trigger_callback)
- [create_processing_workers](#create_processing_workers)
- [toggle_amplifier](#toggle_amplifier)
- [toggle_external_triggers](#toggle_external_triggers)
- [reset_device](#reset_device)
- [set_log_mode](#set_log_mode)
- [set_custom_logger](#set_custom_logger)
......@@ -196,6 +232,34 @@ Class storing all data and information on an RTIS device measurement.
</tbody>
</table>
#### Methods
<p class="func-header">
<i></i> <b>update_processed_data</b>(<i>self, processedData: np.ndarray</i>) <a class="src-href" target="_blank" href="https://cosysgit.uantwerpen.be/rtis-software/rtisdev/-/blob/master/rtisdev/RTISDev.py#L420">[source]</a>
</p>
If only the attribute `processedData` needs to be updated, use this function.
<table class="docutils field-list field-table" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field">
<th class="field-name"><b>Parameters:</b></td>
<td class="field-body" width="100%"><b>processedData : <i>Numpy ndarray (None by default)</i></b>
<p class="attr">
This stores the (partially) processed data that has gone through the processing pipeline as configured by the user.
</p></td>
</tr>
</tbody>
</table>
## **RTISSettings**
<p class="func-header">
......@@ -214,6 +278,148 @@ Can be converted to a dictionary.
</table>
#### Methods
<p class="func-header">
<i></i> <b>set_recording_settings</b>(<i>self, adcSignal, dacSignal, microphoneSampleFrequency, dacSampleFrequency, microphoneSamples, callDuration, callMinimumFrequency, callMaximumFrequency, callEmissions</i>) <a class="src-href" target="_blank" href="https://cosysgit.uantwerpen.be/rtis-software/rtisdev/-/blob/master/rtisdev/RTISDev.py#L453">[source]</a>
</p>
<table class="docutils field-list field-table" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
</table>
<p class="func-header">
<i></i> <b>set_processing_settings</b>(<i>self, pdmEnable, preFilterEnable, matchedFilterEnable, beamformingEnable, postFilterEnable, enveloppeEnable, cleanEnable, preloadToggle, delayMatrix, directions, ranges, microphoneLayout, disableList, postFilter, preFilter</i>) <a class="src-href" target="_blank" href="https://cosysgit.uantwerpen.be/rtis-software/rtisdev/-/blob/master/rtisdev/RTISDev.py#L472">[source]</a>
</p>
<table class="docutils field-list field-table" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
</table>
## **TimeStampRecorderProcess**
<p class="func-header">
<i>class</i> <b>TimeStampRecorderProcess</b>(<i>*args, **kwargs</i>) <a class="src-href" target="_blank" href="https://cosysgit.uantwerpen.be/rtis-software/rtisdev/-/blob/master/rtisdev/RTISDev.py#L591">[source]</a>
</p>
The class based on a Multiprocessing Process to start a process to store the latest timestamp of a recorded
measurement using RTIS Sync pulses. It will use the Jetson GPIO library to wait for the RTIS Sync pulse
and store the system time. This is to circumvent having to take the timestamp after a measurement instead of
before.
<table class="docutils field-list field-table" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
</table>
#### Methods
<p class="func-header">
<i></i> <b>set_configuration</b>(<i>self, latestTimestamp, localLogger, debug</i>) <a class="src-href" target="_blank" href="https://cosysgit.uantwerpen.be/rtis-software/rtisdev/-/blob/master/rtisdev/RTISDev.py#L606">[source]</a>
</p>
Set the configuration parameters for this process after creating it.
<table class="docutils field-list field-table" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field">
<th class="field-name"><b>Parameters:</b></td>
<td class="field-body" width="100%"><b>latestTimestamp : <i>multiprocessing.Manager.Value</i></b>
<p class="attr">
Memory storage shared between processes to store the latest timestamp value on.
</p>
<b>localLogger : <i>logging.Logger</i></b>
<p class="attr">
The custom logger to be used by RTIS Dev.
</p>
<b>debug : <i>int</i></b>
<p class="attr">
The toggle of the debug mode where a RTIS device is simulated using pre-recorded data.
</p></td>
</tr>
</tbody>
</table>
<p class="func-header">
<i></i> <b>stop_thread</b>(<i>self</i>) <a class="src-href" target="_blank" href="https://cosysgit.uantwerpen.be/rtis-software/rtisdev/-/blob/master/rtisdev/RTISDev.py#L625">[source]</a>
</p>
Stop the process gracefully.
<table class="docutils field-list field-table" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
</table>
<p class="func-header">
<i></i> <b>stopped</b>(<i>self</i>) <a class="src-href" target="_blank" href="https://cosysgit.uantwerpen.be/rtis-software/rtisdev/-/blob/master/rtisdev/RTISDev.py#L631">[source]</a>
</p>
Get status of the process if it should be stopped or not.
<table class="docutils field-list field-table" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
</table>
<p class="func-header">
<i></i> <b>run</b>(<i>self</i>) <a class="src-href" target="_blank" href="https://cosysgit.uantwerpen.be/rtis-software/rtisdev/-/blob/master/rtisdev/RTISDev.py#L637">[source]</a>
</p>
Main process function to run continuously. Should not be used directly. Use `start()` instead.
<table class="docutils field-list field-table" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
</table>
## **MeasureExternalTriggerQueueThread**
<p class="func-header">
......@@ -235,6 +441,117 @@ Use [`create_measure_external_trigger_queue(dataQueue)`](https://cosysgit.uantwe
</table>
#### Methods
<p class="func-header">
<i></i> <b>set_configuration</b>(<i>self, dataQueue, settings, debugCounter, behaviour, device_id, localLogger, debug, latestTimestamp, useTimestampRecorder</i>) <a class="src-href" target="_blank" href="https://cosysgit.uantwerpen.be/rtis-software/rtisdev/-/blob/master/rtisdev/RTISDev.py#L686">[source]</a>
</p>
Set the configuration parameters for this process after creating it.
<table class="docutils field-list field-table" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field">
<th class="field-name"><b>Parameters:</b></td>
<td class="field-body" width="100%"><b>dataQueue : <i>multiprocessing.Manager.Queue</i></b>
<p class="attr">
This is the data queue that will be used to store the RTISMeasurement objects on.
</p>
<b>settings : <i>RTISSettings</i></b>
<p class="attr">
The complete class containing all RTIS settings for recording and processing that needs to be set.
</p>
<b>debugCounter : <i>int</i></b>
<p class="attr">
The internal counter to use for indexing measurements in debug mode.
</p>
<b>behaviour : <i>int</i></b>
<p class="attr">
The behaviour mode chosen. 0 = passive 1 = active
</p>
<b>device_id : <i>String</i></b>
<p class="attr">
The identifier to use for the measurements.
</p>
<b>localLogger : <i>logging.Logger</i></b>
<p class="attr">
The custom logger to be used by RTIS Dev.
</p>
<b>debug : <i>int</i></b>
<p class="attr">
The toggle of the debug mode where a RTIS device is simulated using pre-recorded data.
</p>
<b>latestTimestamp : <i>multiprocessing.Manager.Value</i></b>
<p class="attr">
Memory storage shared between processes to store the latest timestamp value on.
</p>
<b>useTimestampRecorder : <i>bool</i></b>
<p class="attr">
Indicate to use the separate timestamp recorder or take timestamp afterwards.
</p></td>
</tr>
</tbody>
</table>
<p class="func-header">
<i></i> <b>stop_thread</b>(<i>self</i>) <a class="src-href" target="_blank" href="https://cosysgit.uantwerpen.be/rtis-software/rtisdev/-/blob/master/rtisdev/RTISDev.py#L732">[source]</a>
</p>
Stop the measurement process gracefully.
<table class="docutils field-list field-table" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
</table>
<p class="func-header">
<i></i> <b>stopped</b>(<i>self</i>) <a class="src-href" target="_blank" href="https://cosysgit.uantwerpen.be/rtis-software/rtisdev/-/blob/master/rtisdev/RTISDev.py#L739">[source]</a>
</p>
Get status of the process if it should be stopped or not.
<table class="docutils field-list field-table" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
</table>
<p class="func-header">
<i></i> <b>run</b>(<i>self</i>) <a class="src-href" target="_blank" href="https://cosysgit.uantwerpen.be/rtis-software/rtisdev/-/blob/master/rtisdev/RTISDev.py#L745">[source]</a>
</p>
Main process function to run continuously. Should not be used directly. Use `start()` instead.
<table class="docutils field-list field-table" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
</table>
## **MeasureExternalTriggerCallbackThread**
<p class="func-header">
......@@ -256,12 +573,123 @@ Use [`create_measure_external_trigger_callback(save_callback)`](https://cosysgit
</table>
#### Methods
<p class="func-header">
<i></i> <b>set_configuration</b>(<i>self, callback, settings, debugCounter, behaviour, device_id, localLogger, debug, latestTimestamp, useTimestampRecorder</i>) <a class="src-href" target="_blank" href="https://cosysgit.uantwerpen.be/rtis-software/rtisdev/-/blob/master/rtisdev/RTISDev.py#L849">[source]</a>
</p>
Set the configuration parameters for this process after creating it.
<table class="docutils field-list field-table" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field">
<th class="field-name"><b>Parameters:</b></td>
<td class="field-body" width="100%"><b>callback : <i>method with one argument (RTISMeasurement)</i></b>
<p class="attr">
This is the method that will be used as a callback when a new measurement is triggered by the external trigger. This function should only require one argument, the <a href="https://cosysgit.uantwerpen.be/rtis-software/rtisdev/-/wikis/home#rtismeasurement"><code>RTISMeasurement</code></a> object containing the measurement data.
</p>
<b>settings : <i>RTISSettings</i></b>
<p class="attr">
The complete class containing all RTIS settings for recording and processing that needs to be set.
</p>
<b>debugCounter : <i>int</i></b>
<p class="attr">
The internal counter to use for indexing measurements in debug mode.
</p>
<b>behaviour : <i>int</i></b>
<p class="attr">
The behaviour mode chosen. 0 = passive 1 = active
</p>
<b>device_id : <i>String</i></b>
<p class="attr">
The identifier to use for the measurements.
</p>
<b>localLogger : <i>logging.Logger</i></b>
<p class="attr">
The custom logger to be used by RTIS Dev.
</p>
<b>debug : <i>int</i></b>
<p class="attr">
The toggle of the debug mode where a RTIS device is simulated using pre-recorded data.
</p>
<b>latestTimestamp : <i>multiprocessing.Manager.Value</i></b>
<p class="attr">
Memory storage shared between processes to store the latest timestamp value on.
</p>
<b>useTimestampRecorder : <i>bool</i></b>
<p class="attr">
Indicate to use the separate timestamp recorder or take timestamp afterwards.
</p></td>
</tr>
</tbody>
</table>
<p class="func-header">
<i></i> <b>stop_thread</b>(<i>self</i>) <a class="src-href" target="_blank" href="https://cosysgit.uantwerpen.be/rtis-software/rtisdev/-/blob/master/rtisdev/RTISDev.py#L897">[source]</a>
</p>
Stop the measurement process gracefully.
<table class="docutils field-list field-table" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
</table>
<p class="func-header">
<i></i> <b>stopped</b>(<i>self</i>) <a class="src-href" target="_blank" href="https://cosysgit.uantwerpen.be/rtis-software/rtisdev/-/blob/master/rtisdev/RTISDev.py#L904">[source]</a>
</p>
Get status of the process if it should be stopped or not.
<table class="docutils field-list field-table" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
</table>
<p class="func-header">
<i></i> <b>run</b>(<i>self</i>) <a class="src-href" target="_blank" href="https://cosysgit.uantwerpen.be/rtis-software/rtisdev/-/blob/master/rtisdev/RTISDev.py#L910">[source]</a>
</p>
Main process function to run continuously. Should not be used directly. Use `start()` instead.
<table class="docutils field-list field-table" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
</table>
# **Methods**
## **open_connection**
<p class="func-header">
<i>def</i> <b>open_connection</b>(<i>port: string='/dev/ttyACM0', allowDebugMode: bool=False </i>) <a class="src-href" target="_blank" href="https://cosysgit.uantwerpen.be/rtis-software/rtisdev/-/blob/master/rtisdev/RTISDev.py#L2644">[source]</a>
<i>def</i> <b>open_connection</b>(<i>port: string='/dev/ttyACM0', allowDebugMode: bool=False </i>) <a class="src-href" target="_blank" href="https://cosysgit.uantwerpen.be/rtis-software/rtisdev/-/blob/master/rtisdev/RTISDev.py#L2672">[source]</a>
</p>
Connect to the port of the RTIS Hardware.
......@@ -296,7 +724,7 @@ Connect to the port of the RTIS Hardware.
## **close_connection**
<p class="func-header">
<i>def</i> <b>close_connection</b>(<i></i>) <a class="src-href" target="_blank" href="https://cosysgit.uantwerpen.be/rtis-software/rtisdev/-/blob/master/rtisdev/RTISDev.py#L2748">[source]</a>
<i>def</i> <b>close_connection</b>(<i></i>) <a class="src-href" target="_blank" href="https://cosysgit.uantwerpen.be/rtis-software/rtisdev/-/blob/master/rtisdev/RTISDev.py#L2776">[source]</a>
</p>
Manually close the connection to the RTIS device.
......@@ -322,7 +750,7 @@ be closed gracefully. This will also unload all RTIS CUDA workers.
## **set_recording_settings**
<p class="func-header">
<i>def</i> <b>set_recording_settings</b>(<i>premade: str=None, jsonPath: str=None, callCustom: str=None, microphoneSamples: int=163840, microphoneSampleFrequency: int=4500000, callSampleFrequency: int=450000, callDuration: float=2.5, callMinimumFrequency: int=25000, callMaximumFrequency: int=50000, callEmissions: int=1, configName: str= '', applyToDevice: bool=True</i>) <a class="src-href" target="_blank" href="https://cosysgit.uantwerpen.be/rtis-software/rtisdev/-/blob/master/rtisdev/RTISDev.py#L2783">[source]</a>
<i>def</i> <b>set_recording_settings</b>(<i>premade: str=None, jsonPath: str=None, callCustom: str=None, microphoneSamples: int=163840, microphoneSampleFrequency: int=4500000, callSampleFrequency: int=450000, callDuration: float=2.5, callMinimumFrequency: int=25000, callMaximumFrequency: int=50000, callEmissions: int=1, configName: str= '', applyToDevice: bool=True</i>) <a class="src-href" target="_blank" href="https://cosysgit.uantwerpen.be/rtis-software/rtisdev/-/blob/master/rtisdev/RTISDev.py#L2811">[source]</a>
</p>
Set the recording settings. All parameters are optional and most have default values.
......@@ -336,7 +764,7 @@ Please read their decription carefully.
<th class="field-name"><b>Parameters:</b></td>
<td class="field-body" width="100%"><b>premade : <i>String (default = Not used)</i></b>
<p class="attr">
When using get_premade_recording_settings() you can get a set of premade configurations with a unique identifier as name. To use one of those use that identifier name with this argument.
When using get_premade_recording_settings_list() you can get a set of premade configurations with a unique identifier as name. To use one of those use that identifier name with this argument.
</p>
<b>jsonPath : <i>String (default = Not used)</i></b>
<p class="attr">
......@@ -459,7 +887,7 @@ config_uuid = rtisdev.set_recording_settings(callCustom="mycall.csv")
## **set_processing_settings**
<p class="func-header">
<i>def</i> <b>set_processing_settings</b>(<i>configName: str, premade: str=None, jsonPath: str=None, customPath: str=None, microphoneLayout: str='eRTIS_v3D1', mode: int=1, directions: int=181, minRange: float=0.5, maxRange: float= 5, pdmEnable: bool=True, preFilterEnable: bool=False, matchedFilterEnable: bool=True, beamformingEnable: bool=True, postFilterEnable: bool=False, enveloppeEnable: bool=True, cleanEnable: bool=True, preloadToggle: bool=True, preFilter: np.ndarray=None, postFilter: np.ndarray=None</i>) <a class="src-href" target="_blank" href="https://cosysgit.uantwerpen.be/rtis-software/rtisdev/-/blob/master/rtisdev/RTISDev.py#L2959">[source]</a>
<i>def</i> <b>set_processing_settings</b>(<i>configName: str, premade: str=None, jsonPath: str=None, customPath: str=None, microphoneLayout: str='eRTIS_v3D1', mode: int=1, directions: int=181, minRange: float=0.5, maxRange: float= 5, pdmEnable: bool=True, preFilterEnable: bool=False, matchedFilterEnable: bool=True, beamformingEnable: bool=True, postFilterEnable: bool=False, enveloppeEnable: bool=True, cleanEnable: bool=True, preloadToggle: bool=True, preFilter: np.ndarray=None, postFilter: np.ndarray=None</i>) <a class="src-href" target="_blank" href="https://cosysgit.uantwerpen.be/rtis-software/rtisdev/-/blob/master/rtisdev/RTISDev.py#L2987">[source]</a>
</p>
Set the processing settings. All parameters are optional and most have default values.
......@@ -477,7 +905,7 @@ Please read their decription carefully.
</p>
<b>premade : <i>String (default = Not used)</i></b>
<p class="attr">
When using get_premade_processing_settings() you can get a set of premade configurations with a unique identifier as name. To use one of those use that identifier name with this argument.
When using get_premade_processing_settings_list() you can get a set of premade configurations with a unique identifier as name. To use one of those use that identifier name with this argument.
</p>
<b>jsonPath : <i>String (default = Not used)</i></b>
<p class="attr">
......@@ -652,7 +1080,7 @@ rtisdev.set_processing_settings(postFilter=postf, postFilterEnable=True, configN
## **get_current_settings_config_name_list**
<p class="func-header">
<i>def</i> <b>get_current_settings_config_name_list</b>(<i></i>) <a class="src-href" target="_blank" href="https://cosysgit.uantwerpen.be/rtis-software/rtisdev/-/blob/master/rtisdev/RTISDev.py#L3210">[source]</a>
<i>def</i> <b>get_current_settings_config_name_list</b>(<i></i>) <a class="src-href" target="_blank" href="https://cosysgit.uantwerpen.be/rtis-software/rtisdev/-/blob/master/rtisdev/RTISDev.py#L3238">[source]</a>
</p>
Get a list of names of all the currently loaded configurations.
......@@ -676,7 +1104,7 @@ Get a list of names of all the currently loaded configurations.
## **get_current_settings**
<p class="func-header">
<i>def</i> <b>get_current_settings</b>(<i>configName: str=''</i>) <a class="src-href" target="_blank" href="https://cosysgit.uantwerpen.be/rtis-software/rtisdev/-/blob/master/rtisdev/RTISDev.py#L3222">[source]</a>
<i>def</i> <b>get_current_settings</b>(<i>configName: str=''</i>) <a class="src-href" target="_blank" href="https://cosysgit.uantwerpen.be/rtis-software/rtisdev/-/blob/master/rtisdev/RTISDev.py#L3250">[source]</a>
</p>
Returns all(dict) or a single [`RTISSettings`](https://cosysgit.uantwerpen.be/rtis-software/rtisdev/-/wikis/home#rtissettings) object of the current settings for processing and recording.
......@@ -707,7 +1135,7 @@ Returns all(dict) or a single [`RTISSettings`](https://cosysgit.uantwerpen.be/rt
## **clear_current_settings**
<p class="func-header">
<i>def</i> <b>clear_current_settings</b>(<i>configName: str=''</i>) <a class="src-href" target="_blank" href="https://cosysgit.uantwerpen.be/rtis-software/rtisdev/-/blob/master/rtisdev/RTISDev.py#L3257">[source]</a>
<i>def</i> <b>clear_current_settings</b>(<i>configName: str=''</i>) <a class="src-href" target="_blank" href="https://cosysgit.uantwerpen.be/rtis-software/rtisdev/-/blob/master/rtisdev/RTISDev.py#L3285">[source]</a>
</p>
Clear all or the current applied [`RTISSettings`](https://cosysgit.uantwerpen.be/rtis-software/rtisdev/-/wikis/home#rtissettings) configuration depending on setting the configName parameter.
......@@ -731,7 +1159,7 @@ Clear all or the current applied [`RTISSettings`](https://cosysgit.uantwerpen.be
## **get_settings**
<p class="func-header">
<i>def</i> <b>get_settings</b>(<i>recordingPremade: str=None, recordingJsonPath: str=None, recordingCallCustom: str=None, processingPremade: str=None, processingJsonPath: str=None, processingCustomPath: str=None, microphoneSamples: int=163840, microphoneSampleFrequency: int=4500000, callSampleFrequency: int=450000, callDuration: float=2.5, callMinimumFrequency: int=25000, callMaximumFrequency: int=50000, callEmissions: int=1, microphoneLayout: str='eRTIS_v3D1', mode: int=1, directions: int=181, minRange: float=0.5, maxRange: float=5, pdmEnable: bool=True, preFilterEnable=False, matchedFilterEnable: bool=True, beamformingEnable: bool=True, postFilterEnable: bool=False, enveloppeEnable: bool=True, cleanEnable: bool=True, preloadToggle: bool =True, preFilter: np.ndarray=None, postFilter: np.ndarray=None, configName: str=''</i>) <a class="src-href" target="_blank" href="https://cosysgit.uantwerpen.be/rtis-software/rtisdev/-/blob/master/rtisdev/RTISDev.py#L3285">[source]</a>
<i>def</i> <b>get_settings</b>(<i>recordingPremade: str=None, recordingJsonPath: str=None, recordingCallCustom: str=None, processingPremade: str=None, processingJsonPath: str=None, processingCustomPath: str=None, microphoneSamples: int=163840, microphoneSampleFrequency: int=4500000, callSampleFrequency: int=450000, callDuration: float=2.5, callMinimumFrequency: int=25000, callMaximumFrequency: int=50000, callEmissions: int=1, microphoneLayout: str='eRTIS_v3D1', mode: int=1, directions: int=181, minRange: float=0.5, maxRange: float=5, pdmEnable: bool=True, preFilterEnable=False, matchedFilterEnable: bool=True, beamformingEnable: bool=True, postFilterEnable: bool=False, enveloppeEnable: bool=True, cleanEnable: bool=True, preloadToggle: bool =True, preFilter: np.ndarray=None, postFilter: np.ndarray=None, configName: str=''</i>) <a class="src-href" target="_blank" href="https://cosysgit.uantwerpen.be/rtis-software/rtisdev/-/blob/master/rtisdev/RTISDev.py#L3313">[source]</a>
</p>
Returns an [`RTISSettings`](https://cosysgit.uantwerpen.be/rtis-software/rtisdev/-/wikis/home#rtissettings) object with all chosen recording and processing settings based on the
......@@ -747,7 +1175,7 @@ the [`set_recording_settings()`](https://cosysgit.uantwerpen.be/rtis-software/rt
<th class="field-name"><b>Parameters:</b></td>
<td class="field-body" width="100%"><b>recordingPremade : <i>String (default = Not used)</i></b>
<p class="attr">
When using get_premade_recording_settings() you can get a set of premade configurations with a unique identifier as name. To use one of those use that identifier name with this argument.
When using get_premade_recording_settings_list() you can get a set of premade configurations with a unique identifier as name. To use one of those use that identifier name with this argument.
</p>
<b>recordingJsonPath : <i>String (default = Not used)</i></b>
<p class="attr">
......@@ -759,7 +1187,7 @@ the [`set_recording_settings()`](https://cosysgit.uantwerpen.be/rtis-software/rt
</p>
<b>processingPremade : <i>String (default = Not used)</i></b>
<p class="attr">
When using get_premade_processing_settings() you can get a set of premade configurations with a unique identifier as name. To use one of those use that identifier name with this argument.
When using get_premade_processing_settings_list() you can get a set of premade configurations with a unique identifier as name. To use one of those use that identifier name with this argument.
</p>
<b>processingJsonPath : <i>String (default = Not used)</i></b>
<p class="attr">
......@@ -877,7 +1305,7 @@ the [`set_recording_settings()`](https://cosysgit.uantwerpen.be/rtis-software/rt
## **set_settings_from_class**
<p class="func-header">
<i>def</i> <b>set_settings_from_class</b>(<i>settings: RTISSettings, applyToDevice: bool=True </i>) <a class="src-href" target="_blank" href="https://cosysgit.uantwerpen.be/rtis-software/rtisdev/-/blob/master/rtisdev/RTISDev.py#L3504">[source]</a>
<i>def</i> <b>set_settings_from_class</b>(<i>settings: RTISSettings, applyToDevice: bool=True </i>) <a class="src-href" target="_blank" href="https://cosysgit.uantwerpen.be/rtis-software/rtisdev/-/blob/master/rtisdev/RTISDev.py#L3532">[source]</a>
</p>
Set the wanted settings from an [`RTISSettings`](https://cosysgit.uantwerpen.be/rtis-software/rtisdev/-/wikis/home#rtissettings) object. These can be created
......@@ -913,7 +1341,7 @@ with the [`get_settings()`](https://cosysgit.uantwerpen.be/rtis-software/rtisdev
## **get_premade_processing_settings_list**
<p class="func-header">
<i>def</i> <b>get_premade_processing_settings_list</b>(<i></i>) <a class="src-href" target="_blank" href="https://cosysgit.uantwerpen.be/rtis-software/rtisdev/-/blob/master/rtisdev/RTISDev.py#L3544">[source]</a>
<i>def</i> <b>get_premade_processing_settings_list</b>(<i></i>) <a class="src-href" target="_blank" href="https://cosysgit.uantwerpen.be/rtis-software/rtisdev/-/blob/master/rtisdev/RTISDev.py#L3572">[source]</a>
</p>
Get a list of names of all the available premade settings for processing.
......@@ -937,7 +1365,7 @@ Get a list of names of all the available premade settings for processing.
## **get_premade_recording_settings_list**
<p class="func-header">
<i>def</i> <b>get_premade_recording_settings_list</b>(<i></i>) <a class="src-href" target="_blank" href="https://cosysgit.uantwerpen.be/rtis-software/rtisdev/-/blob/master/rtisdev/RTISDev.py#L3559">[source]</a>
<i>def</i> <b>get_premade_recording_settings_list</b>(<i></i>) <a class="src-href" target="_blank" href="https://cosysgit.uantwerpen.be/rtis-software/rtisdev/-/blob/master/rtisdev/RTISDev.py#L3587">[source]</a>
</p>
Get a list of names of all the available premade settings for recording.
......@@ -961,7 +1389,7 @@ Get a list of names of all the available premade settings for recording.
## **get_microphone_layout_list**
<p class="func-header">
<i>def</i> <b>get_microphone_layout_list</b>(<i></i>) <a class="src-href" target="_blank" href="https://cosysgit.uantwerpen.be/rtis-software/rtisdev/-/blob/master/rtisdev/RTISDev.py#L3574">[source]</a>
<i>def</i> <b>get_microphone_layout_list</b>(<i></i>) <a class="src-href" target="_blank" href="https://cosysgit.uantwerpen.be/rtis-software/rtisdev/-/blob/master/rtisdev/RTISDev.py#L3602">[source]</a>
</p>
Get a list of names of all the available microphone layouts that are available for recording.
......@@ -985,7 +1413,7 @@ Get a list of names of all the available microphone layouts that are available f
## **prepare_processing**
<p class="func-header">
<i>def</i> <b>prepare_processing</b>(<i>configName: str=''</i>) <a class="src-href" target="_blank" href="https://cosysgit.uantwerpen.be/rtis-software/rtisdev/-/blob/master/rtisdev/RTISDev.py#L3588">[source]</a>
<i>def</i> <b>prepare_processing</b>(<i>configName: str=''</i>) <a class="src-href" target="_blank" href="https://cosysgit.uantwerpen.be/rtis-software/rtisdev/-/blob/master/rtisdev/RTISDev.py#L3616">[source]</a>
</p>
Start the CUDA workers for looped measurements with processing enabled.
......@@ -1021,7 +1449,7 @@ will prepare that one.
## **unload_processing**
<p class="func-header">
<i>def</i> <b>unload_processing</b>(<i>configName: str=''</i>) <a class="src-href" target="_blank" href="https://cosysgit.uantwerpen.be/rtis-software/rtisdev/-/blob/master/rtisdev/RTISDev.py#L3631">[source]</a>
<i>def</i> <b>unload_processing</b>(<i>configName: str=''</i>) <a class="src-href" target="_blank" href="https://cosysgit.uantwerpen.be/rtis-software/rtisdev/-/blob/master/rtisdev/RTISDev.py#L3659">[source]</a>
</p>
Stop all CUDA workers of all workers or of one specified if the configuration name is provided.
......@@ -1054,7 +1482,7 @@ stopped when your script ends.
## **get_raw_measurement**
<p class="func-header">
<i>def</i> <b>get_raw_measurement</b>(<i>behaviour: bool=False, configName: str='' </i>) <a class="src-href" target="_blank" href="https://cosysgit.uantwerpen.be/rtis-software/rtisdev/-/blob/master/rtisdev/RTISDev.py#L3655">[source]</a>
<i>def</i> <b>get_raw_measurement</b>(<i>behaviour: bool=False, configName: str='' </i>) <a class="src-href" target="_blank" href="https://cosysgit.uantwerpen.be/rtis-software/rtisdev/-/blob/master/rtisdev/RTISDev.py#L3683">[source]</a>
</p>
Start an RTIS sonar measurement and return the raw data in an [`RTISMeasurement`](https://cosysgit.uantwerpen.be/rtis-software/rtisdev/-/wikis/home#rtismeasurement) object.
......@@ -1099,7 +1527,7 @@ measurement = rtisdev.get_raw_measurement(True)
## **get_signal_measurement**
<p class="func-header">
<i>def</i> <b>get_signal_measurement</b>(<i>behaviour: bool=False, configName: str='' </i>) <a class="src-href" target="_blank" href="https://cosysgit.uantwerpen.be/rtis-software/rtisdev/-/blob/master/rtisdev/RTISDev.py#L3695">[source]</a>
<i>def</i> <b>get_signal_measurement</b>(<i>behaviour: bool=False, configName: str='' </i>) <a class="src-href" target="_blank" href="https://cosysgit.uantwerpen.be/rtis-software/rtisdev/-/blob/master/rtisdev/RTISDev.py#L3723">[source]</a>
</p>
Start an RTIS sonar measurement and process it with only PDM filtering
......@@ -1147,7 +1575,7 @@ signal_measurement = rtisdev.get_signal_measurement(True)
## **get_processed_measurement**
<p class="func-header">
<i>def</i> <b>get_processed_measurement</b>(<i>behaviour: bool=False, configName: str='' </i>) <a class="src-href" target="_blank" href="https://cosysgit.uantwerpen.be/rtis-software/rtisdev/-/blob/master/rtisdev/RTISDev.py#L3741">[source]</a>
<i>def</i> <b>get_processed_measurement</b>(<i>behaviour: bool=False, configName: str='' </i>) <a class="src-href" target="_blank" href="https://cosysgit.uantwerpen.be/rtis-software/rtisdev/-/blob/master/rtisdev/RTISDev.py#L3769">[source]</a>
</p>
Start an RTIS sonar measurement and process it and return the raw and processed data
......@@ -1194,7 +1622,7 @@ processed_measurement = rtisdev.get_processed_measurement(True)
## **process_measurement**
<p class="func-header">
<i>def</i> <b>process_measurement</b>(<i>measurement: RTISMeasurement, configName: str='' </i>) <a class="src-href" target="_blank" href="https://cosysgit.uantwerpen.be/rtis-software/rtisdev/-/blob/master/rtisdev/RTISDev.py#L3789">[source]</a>
<i>def</i> <b>process_measurement</b>(<i>measurement: RTISMeasurement, configName: str='' </i>) <a class="src-href" target="_blank" href="https://cosysgit.uantwerpen.be/rtis-software/rtisdev/-/blob/master/rtisdev/RTISDev.py#L3817">[source]</a>
</p>
Process a previously recorded raw RTIS sonar measurement from a [`RTISMeasurement`](https://cosysgit.uantwerpen.be/rtis-software/rtisdev/-/wikis/home#rtismeasurement) object
......@@ -1242,7 +1670,7 @@ processed_measurement = rtisdev.process_measurement(measurement)
## **set_counter**
<p class="func-header">
<i>def</i> <b>set_counter</b>(<i>newCount: int=0</i>) <a class="src-href" target="_blank" href="https://cosysgit.uantwerpen.be/rtis-software/rtisdev/-/blob/master/rtisdev/RTISDev.py#L3835">[source]</a>
<i>def</i> <b>set_counter</b>(<i>newCount: int=0</i>) <a class="src-href" target="_blank" href="https://cosysgit.uantwerpen.be/rtis-software/rtisdev/-/blob/master/rtisdev/RTISDev.py#L3863">[source]</a>
</p>
Set the internal measurement counter of the sonar hardware.
......@@ -1273,7 +1701,7 @@ Set the internal measurement counter of the sonar hardware.
## **set_behaviour**
<p class="func-header">
<i>def</i> <b>set_behaviour</b>(<i>mode: bool</i>) <a class="src-href" target="_blank" href="https://cosysgit.uantwerpen.be/rtis-software/rtisdev/-/blob/master/rtisdev/RTISDev.py#L3858">[source]</a>
<i>def</i> <b>set_behaviour</b>(<i>mode: bool</i>) <a class="src-href" target="_blank" href="https://cosysgit.uantwerpen.be/rtis-software/rtisdev/-/blob/master/rtisdev/RTISDev.py#L3886">[source]</a>
</p>
Set the behaviour of the sonar hardware to passive or active. This is only necessary if using external
......@@ -1307,7 +1735,7 @@ argument to define the sonar behaviour.
## **get_firmware_version**
<p class="func-header">
<i>def</i> <b>get_firmware_version</b>(<i></i>) <a class="src-href" target="_blank" href="https://cosysgit.uantwerpen.be/rtis-software/rtisdev/-/blob/master/rtisdev/RTISDev.py#L3883">[source]</a>
<i>def</i> <b>get_firmware_version</b>(<i></i>) <a class="src-href" target="_blank" href="https://cosysgit.uantwerpen.be/rtis-software/rtisdev/-/blob/master/rtisdev/RTISDev.py#L3911">[source]</a>
</p>
Get the firmware version of the internal RTIS firmware used on the device.
......@@ -1331,7 +1759,7 @@ Get the firmware version of the internal RTIS firmware used on the device.
## **create_measure_external_trigger_queue**
<p class="func-header">
<i>def</i> <b>create_measure_external_trigger_queue</b>(<i>dataQueue: Queue, configName: str='' </i>) <a class="src-href" target="_blank" href="https://cosysgit.uantwerpen.be/rtis-software/rtisdev/-/blob/master/rtisdev/RTISDev.py#L3898">[source]</a>
<i>def</i> <b>create_measure_external_trigger_queue</b>(<i>dataQueue: Queue, configName: str='' </i>) <a class="src-href" target="_blank" href="https://cosysgit.uantwerpen.be/rtis-software/rtisdev/-/blob/master/rtisdev/RTISDev.py#L3926">[source]</a>
</p>
This will create and return a Multiprocessing Process
......@@ -1384,7 +1812,7 @@ measure_thread.join()
## **create_measure_external_trigger_callback**
<p class="func-header">
<i>def</i> <b>create_measure_external_trigger_callback</b>(<i>callback: Callable[[ RTISMeasurement], any], configName: str='' </i>) <a class="src-href" target="_blank" href="https://cosysgit.uantwerpen.be/rtis-software/rtisdev/-/blob/master/rtisdev/RTISDev.py#L3973">[source]</a>
<i>def</i> <b>create_measure_external_trigger_callback</b>(<i>callback: Callable[[ RTISMeasurement], any], configName: str='' </i>) <a class="src-href" target="_blank" href="https://cosysgit.uantwerpen.be/rtis-software/rtisdev/-/blob/master/rtisdev/RTISDev.py#L4001">[source]</a>
</p>
This will create and return a Multiprocessing Process
......@@ -1443,7 +1871,7 @@ measure_thread.join()
## **create_processing_workers**
<p class="func-header">
<i>def</i> <b>create_processing_workers</b>(<i>workerCount: int, inputQueue: Queue, outputQueue: Queue, configName: str=''</i>) <a class="src-href" target="_blank" href="https://cosysgit.uantwerpen.be/rtis-software/rtisdev/-/blob/master/rtisdev/RTISDev.py#L4057">[source]</a>
<i>def</i> <b>create_processing_workers</b>(<i>workerCount: int, inputQueue: Queue, outputQueue: Queue, configName: str=''</i>) <a class="src-href" target="_blank" href="https://cosysgit.uantwerpen.be/rtis-software/rtisdev/-/blob/master/rtisdev/RTISDev.py#L4085">[source]</a>
</p>
This will create and return a Multiprocessing Pool that will generate a chosen amount of processing
......@@ -1514,7 +1942,7 @@ workersPool.terminate()
## **toggle_amplifier**
<p class="func-header">
<i>def</i> <b>toggle_amplifier</b>(<i>mode: bool</i>) <a class="src-href" target="_blank" href="https://cosysgit.uantwerpen.be/rtis-software/rtisdev/-/blob/master/rtisdev/RTISDev.py#L4132">[source]</a>
<i>def</i> <b>toggle_amplifier</b>(<i>mode: bool</i>) <a class="src-href" target="_blank" href="https://cosysgit.uantwerpen.be/rtis-software/rtisdev/-/blob/master/rtisdev/RTISDev.py#L4160">[source]</a>
</p>
Enable/disable the high voltage amplifier's step up controller.
......@@ -1547,7 +1975,7 @@ This will save on power usage and heat production.
## **toggle_external_triggers**
<p class="func-header">
<i>def</i> <b>toggle_external_triggers</b>(<i>mode: bool</i>) <a class="src-href" target="_blank" href="https://cosysgit.uantwerpen.be/rtis-software/rtisdev/-/blob/master/rtisdev/RTISDev.py#L4154">[source]</a>
<i>def</i> <b>toggle_external_triggers</b>(<i>mode: bool</i>) <a class="src-href" target="_blank" href="https://cosysgit.uantwerpen.be/rtis-software/rtisdev/-/blob/master/rtisdev/RTISDev.py#L4182">[source]</a>
</p>
Enable/disable external triggers being able to start a measurement on the RTIS device.
......@@ -1579,7 +2007,7 @@ They are disabled by default so have to be manually enabled.
## **reset_device**
<p class="func-header">
<i>def</i> <b>reset_device</b>(<i>stm32pin: int=7</i>) <a class="src-href" target="_blank" href="https://cosysgit.uantwerpen.be/rtis-software/rtisdev/-/blob/master/rtisdev/RTISDev.py#L4175">[source]</a>
<i>def</i> <b>reset_device</b>(<i>stm32pin: int=7</i>) <a class="src-href" target="_blank" href="https://cosysgit.uantwerpen.be/rtis-software/rtisdev/-/blob/master/rtisdev/RTISDev.py#L4203">[source]</a>
</p>
The function to reset the RTIS device hardware.
......@@ -1610,7 +2038,7 @@ The function to reset the RTIS device hardware.
## **set_log_mode**
<p class="func-header">
<i>def</i> <b>set_log_mode</b>(<i>mode: int</i>) <a class="src-href" target="_blank" href="https://cosysgit.uantwerpen.be/rtis-software/rtisdev/-/blob/master/rtisdev/RTISDev.py#L4221">[source]</a>
<i>def</i> <b>set_log_mode</b>(<i>mode: int</i>) <a class="src-href" target="_blank" href="https://cosysgit.uantwerpen.be/rtis-software/rtisdev/-/blob/master/rtisdev/RTISDev.py#L4249">[source]</a>
</p>
The function to set the logging level of the RTIS Dev module.
......@@ -1634,7 +2062,7 @@ The function to set the logging level of the RTIS Dev module.
## **set_custom_logger**
<p class="func-header">
<i>def</i> <b>set_custom_logger</b>(<i>customLogger: logging.Logger</i>) <a class="src-href" target="_blank" href="https://cosysgit.uantwerpen.be/rtis-software/rtisdev/-/blob/master/rtisdev/RTISDev.py#L4249">[source]</a>
<i>def</i> <b>set_custom_logger</b>(<i>customLogger: logging.Logger</i>) <a class="src-href" target="_blank" href="https://cosysgit.uantwerpen.be/rtis-software/rtisdev/-/blob/master/rtisdev/RTISDev.py#L4277">[source]</a>
</p>
The function to set a custom logger to be used by RTIS Dev.
......
Clone repository
  • General Example
  • Classes
    • RTISMeasurement
    • RTISSettings
    • MeasureExternalTriggerQueueThread
    • MeasureExternalTriggerCallbackThread
  • Methods
    • open_connection
    • close_connection
    • set_recording_settings
    • set_processing_settings
    • get_current_settings_config_name_list
    • get_current_settings
    • clear_current_settings
    • get_settings
    • set_settings_from_class
    • get_premade_processing_settings_list
    • get_premade_recording_settings_list
    • get_microphone_layout_list
    • prepare_processing
    • unload_processing
    • get_raw_measurement
    • get_signal_measurement
    • get_processed_measurement
    • process_measurement
    • set_counter
    • set_behaviour
    • get_firmware_version
    • create_measure_external_trigger_queue
    • create_measure_external_trigger_callback
    • create_processing_workers
    • toggle_amplifier
    • toggle_external_triggers
    • reset_device
    • set_log_mode
    • set_custom_logger