... | ... | @@ -38,6 +38,7 @@ |
|
|
- [reset_device](#reset_device)
|
|
|
- [set_log_mode](#set_log_mode)
|
|
|
- [set_custom_logger](#set_custom_logger)
|
|
|
|
|
|
|
|
|
# **General Example**
|
|
|
|
... | ... | @@ -55,29 +56,29 @@ Open a connection to the RTIS Device over the default serial port: |
|
|
success_connect = rtisdev.open_connection()
|
|
|
```
|
|
|
|
|
|
Set the default recording settings with 163840 samples and a call sweep between 25 and 50 KHz:
|
|
|
Set the recording settings with 327680 samples and a call sweep between 20 and 80 KHz:
|
|
|
|
|
|
```python
|
|
|
config_uuid = rtisdev.set_recording_settings(premade="default_25_50")
|
|
|
config_uuid = rtisdev.set_recording_settings(microphoneSamples=327680, callMinimumFrequency=20000, callMaximumFrequency=80000)
|
|
|
```
|
|
|
|
|
|
Enable all processing steps and preload them with RTIS CUDA. This will produce a 2D energyscape with 181 directions
|
|
|
with a maximum distance of 5m:
|
|
|
Enable all processing steps and preload them with RTIS CUDA. This will produce a 2D energyscape with 91 directions
|
|
|
with a maximum distance of 6m:
|
|
|
|
|
|
```python
|
|
|
success_settings_processing = rtisdev.set_processing_settings(premade="2D_5m_181", configName=config_uuid)
|
|
|
success_settings_processing = rtisdev.set_processing_settings(directions=91, maxRange=6, configName=config_uuid)
|
|
|
```
|
|
|
|
|
|
Get the used settings as a RTISSettings object:
|
|
|
|
|
|
```python
|
|
|
settings = rtisdev.get_current_settings()
|
|
|
settings = rtisdev.get_current_settings(configName=config_uuid)
|
|
|
```
|
|
|
|
|
|
Get an ACTIVE measurement (protect your ears!) in raw data:
|
|
|
|
|
|
```python
|
|
|
measurement = rtisdev.get_raw_measurement(True)
|
|
|
measurement = rtisdev.get_raw_measurement(True, configName=config_uuid)
|
|
|
```
|
|
|
|
|
|
Store the raw data of that measurement as a binary file. This can be opened in another application for further work:
|
... | ... | @@ -92,13 +93,13 @@ file_handle_data.close() |
|
|
Process that raw measurement to an energyscape using the configuration chosen earlier:
|
|
|
|
|
|
```python
|
|
|
processed_measurement = rtisdev.process_measurement(measurement)
|
|
|
processed_measurement = rtisdev.process_measurement(measurement, configName=config_uuid)
|
|
|
```
|
|
|
|
|
|
Get a new ACTIVE measurement (protect your ears!) in both raw and processed data formats directly:
|
|
|
|
|
|
```python
|
|
|
new_processed_measurement = rtisdev.get_processed_measurement(True)
|
|
|
new_processed_measurement = rtisdev.get_processed_measurement(True, configName=config_uuid)
|
|
|
```
|
|
|
|
|
|
Plot the 2D energyscape of this processed measurement using matplotlib:
|
... | ... | @@ -125,7 +126,7 @@ plt.show() |
|
|
Get a new ACTIVE measurement (protect your ears!) in both raw and microphone signal format directly:
|
|
|
|
|
|
```python
|
|
|
signal_measurement = rtisdev.get_signal_measurement(True)
|
|
|
signal_measurement = rtisdev.get_signal_measurement(True, configName=config_uuid)
|
|
|
```
|
|
|
|
|
|
Plot the microphone signals of this measurement:
|
... | ... | @@ -153,7 +154,7 @@ fig.suptitle("RTIS Dev - Microphone Signals") |
|
|
## **RTISMeasurement**
|
|
|
|
|
|
<p class="func-header">
|
|
|
<i>class</i> <b>RTISMeasurement</b>(<i>id: str='', timestamp: float=0, behaviour: bool=False, index: int=0, rawData: np.ndarray=None, processedData: 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#L358">[source]</a>
|
|
|
<i>class</i> <b>RTISMeasurement</b>(<i>id: str='', timestamp: float=0, behaviour: bool=False, index: int=0, rawData: np.ndarray=None, processedData: 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#L359">[source]</a>
|
|
|
</p>
|
|
|
|
|
|
Class storing all data and information on an RTIS device measurement.
|
... | ... | @@ -199,7 +200,7 @@ Class storing all data and information on an RTIS device measurement. |
|
|
## **RTISSettings**
|
|
|
|
|
|
<p class="func-header">
|
|
|
<i>class</i> <b>RTISSettings</b>(<i>firmwareVersion: str, configName: str</i>) <a class="src-href" target="_blank" href="https://cosysgit.uantwerpen.be/rtis-software/rtisdev/-/blob/master/rtisdev/RTISDev.py#L434">[source]</a>
|
|
|
<i>class</i> <b>RTISSettings</b>(<i>firmwareVersion: str, configName: str</i>) <a class="src-href" target="_blank" href="https://cosysgit.uantwerpen.be/rtis-software/rtisdev/-/blob/master/rtisdev/RTISDev.py#L435">[source]</a>
|
|
|
</p>
|
|
|
|
|
|
Class describing all the processing and recording settings related to RTIS devices.
|
... | ... | @@ -217,7 +218,7 @@ Can be converted to a dictionary. |
|
|
## **MeasureExternalTriggerQueueThread**
|
|
|
|
|
|
<p class="func-header">
|
|
|
<i>class</i> <b>MeasureExternalTriggerQueueThread</b>(<i>*args, **kwargs</i>) <a class="src-href" target="_blank" href="https://cosysgit.uantwerpen.be/rtis-software/rtisdev/-/blob/master/rtisdev/RTISDev.py#L670">[source]</a>
|
|
|
<i>class</i> <b>MeasureExternalTriggerQueueThread</b>(<i>*args, **kwargs</i>) <a class="src-href" target="_blank" href="https://cosysgit.uantwerpen.be/rtis-software/rtisdev/-/blob/master/rtisdev/RTISDev.py#L700">[source]</a>
|
|
|
</p>
|
|
|
|
|
|
The class based on a Multiprocessing Process to start RTIS sonar measurements triggered by an external trigger.
|
... | ... | @@ -238,7 +239,7 @@ Use [`create_measure_external_trigger_queue(dataQueue)`](https://cosysgit.uantwe |
|
|
## **MeasureExternalTriggerCallbackThread**
|
|
|
|
|
|
<p class="func-header">
|
|
|
<i>class</i> <b>MeasureExternalTriggerCallbackThread</b>(<i>*args, **kwargs</i>) <a class="src-href" target="_blank" href="https://cosysgit.uantwerpen.be/rtis-software/rtisdev/-/blob/master/rtisdev/RTISDev.py#L833">[source]</a>
|
|
|
<i>class</i> <b>MeasureExternalTriggerCallbackThread</b>(<i>*args, **kwargs</i>) <a class="src-href" target="_blank" href="https://cosysgit.uantwerpen.be/rtis-software/rtisdev/-/blob/master/rtisdev/RTISDev.py#L863">[source]</a>
|
|
|
</p>
|
|
|
|
|
|
The class based on a Multiprocessing Process to start RTIS sonar measurements triggered by an external trigger.
|
... | ... | @@ -261,7 +262,7 @@ Use [`create_measure_external_trigger_callback(save_callback)`](https://cosysgit |
|
|
## **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#L2889">[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#L2907">[source]</a>
|
|
|
</p>
|
|
|
|
|
|
Connect to the port of the RTIS Hardware.
|
... | ... | @@ -296,7 +297,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#L2993">[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#L3011">[source]</a>
|
|
|
</p>
|
|
|
|
|
|
Manually close the connection to the RTIS device.
|
... | ... | @@ -322,7 +323,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#L3028">[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#L3046">[source]</a>
|
|
|
</p>
|
|
|
|
|
|
Set the recording settings. All parameters are optional and most have default values.
|
... | ... | @@ -456,10 +457,13 @@ An example of such a custom call can be found [here](https://cosysgit.uantwerpen |
|
|
config_uuid = rtisdev.set_recording_settings(callCustom="mycall.csv")
|
|
|
```
|
|
|
|
|
|
Note that when multiple recording configurations are loaded, the module will automatically
|
|
|
load the settings as asked for by the configName argument to the RTIS device before performing a new measurement.
|
|
|
|
|
|
## **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, azimuthLowLimit: float=-90, azimuthHighLimit: float=90, elevationLowLimit: float=-90, elevationHighLimit: float=90, 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, meanEnergyRangeMultiplier: float=2, maxEnergyRangeThresholdMultiplier: float=0.5</i>) <a class="src-href" target="_blank" href="https://cosysgit.uantwerpen.be/rtis-software/rtisdev/-/blob/master/rtisdev/RTISDev.py#L3204">[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, azimuthLowLimit: float=-90, azimuthHighLimit: float=90, elevationLowLimit: float=-90, elevationHighLimit: float=90, 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, meanEnergyRangeMultiplier: float=2, maxEnergyRangeThresholdMultiplier: float=0.5</i>) <a class="src-href" target="_blank" href="https://cosysgit.uantwerpen.be/rtis-software/rtisdev/-/blob/master/rtisdev/RTISDev.py#L3225">[source]</a>
|
|
|
</p>
|
|
|
|
|
|
Set the processing settings. All parameters are optional and most have default values.
|
... | ... | @@ -594,14 +598,14 @@ rtisdev.set_processing_settings(premade="3D_5m_3000", pdmEnable=True, matchedFil |
|
|
You don't have to define all the processing steps, as they are all on by default:
|
|
|
|
|
|
```python
|
|
|
rtisdev.set_processing_settings(premade="3D_5m_3000", configName=config_uuid)
|
|
|
rtisdev.set_processing_settings(directions=91, configName=config_uuid)
|
|
|
```
|
|
|
|
|
|
Create settings from a premade setup with only part of the processing steps enabled and no preloading.
|
|
|
You can get the available premade settings with [`get_premade_recording_settings_list()`](https://cosysgit.uantwerpen.be/rtis-software/rtisdev/-/wikis/home#get_premade_processing_settings_list):
|
|
|
|
|
|
```python
|
|
|
rtisdev.set_processing_settings(premade="2D_5m_181", pdmEnable=True, preFilterEnable=False, matchedFilterEnable=True, beamformingEnable=False, enveloppeEnable=False, cleanEnable=False, configName=config_uuid)
|
|
|
rtisdev.set_processing_settings(pdmEnable=True, preFilterEnable=False, matchedFilterEnable=True, beamformingEnable=False, enveloppeEnable=False, cleanEnable=False, configName=config_uuid)
|
|
|
```
|
|
|
|
|
|
Create settings from a json file with full processing settings on.
|
... | ... | @@ -617,6 +621,8 @@ Here we use auto-generated processing files: |
|
|
"minRange" : 0.5,
|
|
|
"maxRange" : 5,
|
|
|
"directions": 181,
|
|
|
"azimuthLowLimit": -30,
|
|
|
"azimuthHighLimit": 30,
|
|
|
"2D": 1
|
|
|
}
|
|
|
```
|
... | ... | @@ -682,7 +688,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#L3493">[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#L3516">[source]</a>
|
|
|
</p>
|
|
|
|
|
|
Get a list of names of all the currently loaded configurations.
|
... | ... | @@ -706,7 +712,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#L3505">[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#L3528">[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.
|
... | ... | @@ -737,7 +743,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#L3540">[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#L3563">[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.
|
... | ... | @@ -761,7 +767,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, azimuthLowLimit: float=-90, azimuthHighLimit: float=90, elevationLowLimit: float=-90, elevationHighLimit: float=90, 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, meanEnergyRangeMultiplier: float=2, maxEnergyRangeThresholdMultiplier: float=0.5, configName: str=''</i>) <a class="src-href" target="_blank" href="https://cosysgit.uantwerpen.be/rtis-software/rtisdev/-/blob/master/rtisdev/RTISDev.py#L3568">[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, azimuthLowLimit: float=-90, azimuthHighLimit: float=90, elevationLowLimit: float=-90, elevationHighLimit: float=90, 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, meanEnergyRangeMultiplier: float=2, maxEnergyRangeThresholdMultiplier: float=0.5, configName: str=''</i>) <a class="src-href" target="_blank" href="https://cosysgit.uantwerpen.be/rtis-software/rtisdev/-/blob/master/rtisdev/RTISDev.py#L3591">[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
|
... | ... | @@ -931,7 +937,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#L3814">[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#L3837">[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
|
... | ... | @@ -967,7 +973,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#L3854">[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#L3877">[source]</a>
|
|
|
</p>
|
|
|
|
|
|
Get a list of names of all the available premade settings for processing.
|
... | ... | @@ -991,7 +997,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#L3869">[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#L3892">[source]</a>
|
|
|
</p>
|
|
|
|
|
|
Get a list of names of all the available premade settings for recording.
|
... | ... | @@ -1015,7 +1021,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#L3884">[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#L3907">[source]</a>
|
|
|
</p>
|
|
|
|
|
|
Get a list of names of all the available microphone layouts that are available for recording.
|
... | ... | @@ -1039,7 +1045,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#L3898">[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#L3921">[source]</a>
|
|
|
</p>
|
|
|
|
|
|
Start the CUDA workers for looped measurements with processing enabled.
|
... | ... | @@ -1075,7 +1081,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#L3941">[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#L3964">[source]</a>
|
|
|
</p>
|
|
|
|
|
|
Stop all CUDA workers of all workers or of one specified if the configuration name is provided.
|
... | ... | @@ -1108,7 +1114,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#L3965">[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#L3988">[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.
|
... | ... | @@ -1146,14 +1152,17 @@ Create a connection, set recording settings and make a raw measurement with pass |
|
|
```python
|
|
|
import rtisdev
|
|
|
rtisdev.open_connection()
|
|
|
rtisdev.set_recording_settings(premade="default_25_50")
|
|
|
measurement = rtisdev.get_raw_measurement(True)
|
|
|
config_uuid = rtisdev.set_recording_settings(callMinimumFrequency=20000, callMaximumFrequency=80000)
|
|
|
measurement = rtisdev.get_raw_measurement(True, configName=config_uuid)
|
|
|
```
|
|
|
|
|
|
Note that when multiple recording configurations are loaded, the module will automatically
|
|
|
load the settings as asked for by the configName argument to the RTIS device before performing a new measurement.
|
|
|
|
|
|
## **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#L4005">[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#L4031">[source]</a>
|
|
|
</p>
|
|
|
|
|
|
Start an RTIS sonar measurement and process it with only PDM filtering
|
... | ... | @@ -1193,15 +1202,17 @@ Create a connection, set recording and processing settings and make a signal mea |
|
|
```python
|
|
|
import rtisdev
|
|
|
rtisdev.open_connection()
|
|
|
config_uuid = rtisdev.set_recording_settings(premade="default_25_50")
|
|
|
rtisdev.set_processing_settings(premade="2D_5m_181", configName=config_uuid)
|
|
|
signal_measurement = rtisdev.get_signal_measurement(True)
|
|
|
config_uuid = rtisdev.set_recording_settings(callMinimumFrequency=20000, callMaximumFrequency=80000)
|
|
|
signal_measurement = rtisdev.get_signal_measurement(True, configName=config_uuid)
|
|
|
```
|
|
|
|
|
|
Note that when multiple recording configurations are loaded, the module will automatically
|
|
|
load the settings as asked for by the configName argument to the RTIS device before performing a new measurement.
|
|
|
|
|
|
## **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#L4051">[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#L4076">[source]</a>
|
|
|
</p>
|
|
|
|
|
|
Start an RTIS sonar measurement and process it and return the raw and processed data
|
... | ... | @@ -1240,15 +1251,18 @@ a processed measurement with active behaviour: |
|
|
```python
|
|
|
import rtisdev
|
|
|
rtisdev.open_connection()
|
|
|
config_uuid = rtisdev.set_recording_settings(premade="default_25_50")
|
|
|
rtisdev.set_processing_settings(premade="2D_5m_181", configName=config_uuid)
|
|
|
processed_measurement = rtisdev.get_processed_measurement(True)
|
|
|
config_uuid = rtisdev.set_recording_settings(callMinimumFrequency=20000, callMaximumFrequency=80000)
|
|
|
rtisdev.set_processing_settings(directions=91, configName=config_uuid)
|
|
|
processed_measurement = rtisdev.get_processed_measurement(True, configName=config_uuid)
|
|
|
```
|
|
|
|
|
|
Note that when multiple recording configurations are loaded, the module will automatically
|
|
|
load the settings as asked for by the configName argument to the RTIS device before performing a new measurement.
|
|
|
|
|
|
## **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#L4099">[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#L4127">[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
|
... | ... | @@ -1282,21 +1296,21 @@ and return same measurement with processed data in a new [`RTISMeasurement`](htt |
|
|
#### Examples
|
|
|
|
|
|
Create a connection, set recording and processing settings and make a raw measurement with active behaviour.
|
|
|
Then afterwards process it:
|
|
|
Then afterward process it:
|
|
|
|
|
|
```python
|
|
|
import rtisdev
|
|
|
rtisdev.open_connection()
|
|
|
config_uuid = rtisdev.set_recording_settings(premade="default_25_50")
|
|
|
rtisdev.set_processing_settings(premade="2D_5m_181", configName=config_uuid)
|
|
|
measurement = rtisdev.get_raw_measurement(True)
|
|
|
processed_measurement = rtisdev.process_measurement(measurement)
|
|
|
config_uuid = rtisdev.set_recording_settings(callMinimumFrequency=20000, callMaximumFrequency=80000)
|
|
|
rtisdev.set_processing_settings(directions=91, configName=config_uuid)
|
|
|
measurement = rtisdev.get_raw_measurement(True, configName=config_uuid)
|
|
|
processed_measurement = rtisdev.process_measurement(measurement, configName=config_uuid)
|
|
|
```
|
|
|
|
|
|
## **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#L4145">[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#L4173">[source]</a>
|
|
|
</p>
|
|
|
|
|
|
Set the internal measurement counter of the sonar hardware.
|
... | ... | @@ -1327,7 +1341,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#L4168">[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#L4196">[source]</a>
|
|
|
</p>
|
|
|
|
|
|
Set the behaviour of the sonar hardware to passive or active. This is only necessary if using external
|
... | ... | @@ -1361,7 +1375,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#L4193">[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#L4221">[source]</a>
|
|
|
</p>
|
|
|
|
|
|
Get the firmware version of the internal RTIS firmware used on the device.
|
... | ... | @@ -1385,12 +1399,12 @@ 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#L4208">[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#L4236">[source]</a>
|
|
|
</p>
|
|
|
|
|
|
This will create and return a Multiprocessing Process
|
|
|
that will be waiting for an external trigger to measure from
|
|
|
the RTIS Device and afterwards put this measurement on a data queue.
|
|
|
the RTIS Device and afterward put this measurement on a data queue.
|
|
|
This method will return a [`MeasureExternalTriggerQueueThread`](https://cosysgit.uantwerpen.be/rtis-software/rtisdev/-/wikis/home#measureexternaltriggerqueuethread).
|
|
|
|
|
|
<table class="docutils field-list field-table" frame="void" rules="none">
|
... | ... | @@ -1426,8 +1440,8 @@ Create a queue to save the measurement to and assign it to the process: |
|
|
from multiprocessing import Manager
|
|
|
import rtisdev
|
|
|
rtisdev.open_connection()
|
|
|
config_uuid = rtisdev.set_recording_settings(premade="default_25_50")
|
|
|
rtisdev.set_processing_settings(premade="2D_5m_181",configName=config_uuid)
|
|
|
config_uuid = rtisdev.set_recording_settings(callMinimumFrequency=20000, callMaximumFrequency=80000)
|
|
|
rtisdev.set_processing_settings(directions=91,configName=config_uuid)
|
|
|
manager = Manager()
|
|
|
dataQueue = manager.Queue()
|
|
|
measure_thread = rtisdev.create_measure_external_trigger_queue(dataQueue, config_uuid)
|
... | ... | @@ -1438,12 +1452,12 @@ 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#L4283">[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#L4311">[source]</a>
|
|
|
</p>
|
|
|
|
|
|
This will create and return a Multiprocessing Process
|
|
|
that will be waiting for an external trigger to measure from
|
|
|
the RTIS Device and afterwards put this measurement on a data queue.
|
|
|
the RTIS Device and afterward put this measurement on a data queue.
|
|
|
This method will return a [`MeasureExternalTriggerCallbackThread`](https://cosysgit.uantwerpen.be/rtis-software/rtisdev/-/wikis/home#measureexternaltriggercallbackthread).
|
|
|
|
|
|
<table class="docutils field-list field-table" frame="void" rules="none">
|
... | ... | @@ -1478,8 +1492,8 @@ Create a callback to save the measurement to disk: |
|
|
```python
|
|
|
import rtisdev
|
|
|
rtisdev.open_connection()
|
|
|
config_uuid = rtisdev.set_recording_settings(premade="default_25_50")
|
|
|
rtisdev.set_processing_settings(premade="2D_5m_181", configName=config_uuid)
|
|
|
config_uuid = rtisdev.set_recording_settings(callMinimumFrequency=20000, callMaximumFrequency=80000)
|
|
|
rtisdev.set_processing_settings(directions=91, configName=config_uuid)
|
|
|
index = 0
|
|
|
def save_callback(measurement=None):
|
|
|
if measurement is not None :
|
... | ... | @@ -1497,7 +1511,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#L4367">[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#L4395">[source]</a>
|
|
|
</p>
|
|
|
|
|
|
This will create and return a Multiprocessing Pool that will generate a chosen amount of processing
|
... | ... | @@ -1543,7 +1557,7 @@ potential crash of RTIS Dev! |
|
|
|
|
|
#### Examples
|
|
|
|
|
|
Create the data queues, set up the worker pool with 4 workers, generate some measurements and afterwards parse
|
|
|
Create the data queues, set up the worker pool with 4 workers, generate some measurements and afterward parse
|
|
|
all these measurements by getting them from the output queue.
|
|
|
Once the work is done, terminate the workers gracefully:
|
|
|
|
... | ... | @@ -1551,8 +1565,8 @@ Once the work is done, terminate the workers gracefully: |
|
|
from multiprocessing import Manager
|
|
|
import rtisdev
|
|
|
rtisdev.open_connection()
|
|
|
config_uuid = rtisdev.set_recording_settings(premade="default_25_50")
|
|
|
rtisdev.set_processing_settings(premade="2D_5m_181", configName=config_uuid, preloadToggle=False)
|
|
|
config_uuid = rtisdev.set_recording_settings(callMinimumFrequency=20000, callMaximumFrequency=80000)
|
|
|
rtisdev.set_processing_settings(directions=91, configName=config_uuid, preloadToggle=False)
|
|
|
manager = Manager()
|
|
|
inputQueue = manager.Queue()
|
|
|
outputQueue = manager.Queue()
|
... | ... | @@ -1568,7 +1582,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#L4442">[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#L4470">[source]</a>
|
|
|
</p>
|
|
|
|
|
|
Enable/disable the high voltage amplifier's step up controller.
|
... | ... | @@ -1601,7 +1615,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, pin: int=1</i>) <a class="src-href" target="_blank" href="https://cosysgit.uantwerpen.be/rtis-software/rtisdev/-/blob/master/rtisdev/RTISDev.py#L4464">[source]</a>
|
|
|
<i>def</i> <b>toggle_external_triggers</b>(<i>mode: bool, pin: int=1</i>) <a class="src-href" target="_blank" href="https://cosysgit.uantwerpen.be/rtis-software/rtisdev/-/blob/master/rtisdev/RTISDev.py#L4492">[source]</a>
|
|
|
</p>
|
|
|
|
|
|
Enable/disable external triggers being able to start a measurement on the RTIS device.
|
... | ... | @@ -1633,7 +1647,7 @@ They are disabled by default so have to be manually enabled. You can also set th |
|
|
## **custom_command**
|
|
|
|
|
|
<p class="func-header">
|
|
|
<i>def</i> <b>custom_command</b>(<i>command: str</i>) <a class="src-href" target="_blank" href="https://cosysgit.uantwerpen.be/rtis-software/rtisdev/-/blob/master/rtisdev/RTISDev.py#L4487">[source]</a>
|
|
|
<i>def</i> <b>custom_command</b>(<i>command: str</i>) <a class="src-href" target="_blank" href="https://cosysgit.uantwerpen.be/rtis-software/rtisdev/-/blob/master/rtisdev/RTISDev.py#L4515">[source]</a>
|
|
|
</p>
|
|
|
|
|
|
Send a custom command to the RTIS device to execute over serial.
|
... | ... | @@ -1666,7 +1680,7 @@ comma-seperated command values. |
|
|
## **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#L4508">[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#L4536">[source]</a>
|
|
|
</p>
|
|
|
|
|
|
The function to reset the RTIS device hardware.
|
... | ... | @@ -1697,7 +1711,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#L4554">[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#L4582">[source]</a>
|
|
|
</p>
|
|
|
|
|
|
The function to set the logging level of the RTIS Dev module.
|
... | ... | @@ -1721,7 +1735,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#L4582">[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#L4610">[source]</a>
|
|
|
</p>
|
|
|
|
|
|
The function to set a custom logger to be used by RTIS Dev.
|
... | ... | |