... | ... | @@ -11,6 +11,7 @@ |
|
|
- [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)
|
... | ... | @@ -55,14 +56,14 @@ success_connect = rtisdev.open_connection() |
|
|
Set the default recording settings with 163840 samples and a call sweep between 25 and 50 KHz:
|
|
|
|
|
|
```python
|
|
|
success_settings_record = rtisdev.set_recording_settings(premade="default_25_50")
|
|
|
config_uuid = rtisdev.set_recording_settings(premade="default_25_50")
|
|
|
```
|
|
|
|
|
|
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:
|
|
|
|
|
|
```python
|
|
|
success_settings_processing = rtisdev.set_processing_settings(premade="2D_5m_181")
|
|
|
success_settings_processing = rtisdev.set_processing_settings(premade="2D_5m_181", configName=config_uuid)
|
|
|
```
|
|
|
|
|
|
Get the used settings as a RTISSettings object:
|
... | ... | @@ -150,7 +151,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</i>) <a class="src-href" target="_blank" href="https://cosysgit.uantwerpen.be/rtis-software/rtisdev/-/blob/master/rtisdev/RTISDev.py#L344">[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#L355">[source]</a>
|
|
|
</p>
|
|
|
|
|
|
Class storing all data and information on an RTIS device measurement.
|
... | ... | @@ -184,17 +185,19 @@ Class storing all data and information on an RTIS device measurement. |
|
|
<b>processedData : <i>Numpy ndarray</i></b>
|
|
|
<p class="attr">
|
|
|
This stores the (partially) processed data that has gone through the processing pipeline as configured by the user.
|
|
|
</p>
|
|
|
<b>configName : <i>string</i></b>
|
|
|
<p class="attr">
|
|
|
The identity of the settings configuration used for this measurement (and its processing).
|
|
|
</p></td>
|
|
|
</tr>
|
|
|
</tbody>
|
|
|
</table>
|
|
|
|
|
|
|
|
|
|
|
|
## **RTISSettings**
|
|
|
|
|
|
<p class="func-header">
|
|
|
<i>class</i> <b>RTISSettings</b>(<i>firmwareVersion, configName=''</i>) <a class="src-href" target="_blank" href="https://cosysgit.uantwerpen.be/rtis-software/rtisdev/-/blob/master/rtisdev/RTISDev.py#L414">[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#L431">[source]</a>
|
|
|
</p>
|
|
|
|
|
|
Class describing all the processing and recording settings related to RTIS devices.
|
... | ... | @@ -208,12 +211,10 @@ Can be converted to a dictionary. |
|
|
|
|
|
</table>
|
|
|
|
|
|
|
|
|
|
|
|
## **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#L638">[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#L657">[source]</a>
|
|
|
</p>
|
|
|
|
|
|
The class based on a Multiprocessing Process to start RTIS sonar measurements triggered by an external trigger.
|
... | ... | @@ -232,11 +233,10 @@ Use [`create_measure_external_trigger_queue(dataQueue)`](https://cosysgit.uantwe |
|
|
</table>
|
|
|
|
|
|
|
|
|
|
|
|
## **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#L799">[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#L820">[source]</a>
|
|
|
</p>
|
|
|
|
|
|
The class based on a Multiprocessing Process to start RTIS sonar measurements triggered by an external trigger.
|
... | ... | @@ -260,7 +260,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#L2408">[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#L2540">[source]</a>
|
|
|
</p>
|
|
|
|
|
|
Connect to the port of the RTIS Hardware.
|
... | ... | @@ -295,12 +295,12 @@ 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#L2512">[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#L2644">[source]</a>
|
|
|
</p>
|
|
|
|
|
|
Manually close the connection to the RTIS device.
|
|
|
Normally, when your script ends without exceptions the connection will automatically
|
|
|
be closed gracefully.
|
|
|
be closed gracefully. This will also unload all RTIS CUDA workers.
|
|
|
|
|
|
<table class="docutils field-list field-table" frame="void" rules="none">
|
|
|
<col class="field-name" />
|
... | ... | @@ -321,7 +321,7 @@ be closed gracefully. |
|
|
## **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#L2545">[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#L2677">[source]</a>
|
|
|
</p>
|
|
|
|
|
|
Set the recording settings. All parameters are optional and most have default values.
|
... | ... | @@ -375,7 +375,7 @@ Please read their decription carefully. |
|
|
</p>
|
|
|
<b>configName : <i>String (default = "")</i></b>
|
|
|
<p class="attr">
|
|
|
String to identify these settings with. If set to empty (as it is by default), it will become the name set for premade. If no premade settings are used it will default to <em>RTISSettings</em>.
|
|
|
String to identify these settings with. If set to empty it will default to a unique UUID.
|
|
|
</p>
|
|
|
<b>applyToDevice : <i>bool (default = True)</i></b>
|
|
|
<p class="attr">
|
... | ... | @@ -384,9 +384,9 @@ Please read their decription carefully. |
|
|
</tr>
|
|
|
<tr class="field">
|
|
|
<th class="field-name"><b>Returns:</b></td>
|
|
|
<td class="field-body" width="100%"><b>success : <i>bool</i></b>
|
|
|
<td class="field-body" width="100%"><b>configName : <i>string</i></b>
|
|
|
<p class="attr">
|
|
|
returns <code>True</code> on successful completion, returns <code>False</code> or will raise an exception on failure.
|
|
|
returns the given configuration name or generated UUID on successful completion or will raise an exception on failure.
|
|
|
</p></td>
|
|
|
</tr>
|
|
|
</tbody>
|
... | ... | @@ -397,7 +397,7 @@ Please read their decription carefully. |
|
|
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).
|
|
|
Create settings from a premade setup:
|
|
|
```python
|
|
|
rtisdev.set_recording_settings(premade="short_20_80")
|
|
|
config_uuid = rtisdev.set_recording_settings(premade="short_20_80")
|
|
|
```
|
|
|
|
|
|
Create settings from a json file.
|
... | ... | @@ -419,14 +419,14 @@ An example json: |
|
|
```
|
|
|
|
|
|
```python
|
|
|
rtisdev.set_recording_settings(jsonPath="./myrecordingsettings.json")
|
|
|
config_uuid = rtisdev.set_recording_settings(jsonPath="./myrecordingsettings.json")
|
|
|
```
|
|
|
|
|
|
Create settings from a json file.
|
|
|
This expects a json to be available with a format such as seen below.
|
|
|
Here we use manually generated call.
|
|
|
It has to be available on the given path and have the right format.
|
|
|
An example of such a custom call can be found [here](https://cosysgit.uantwerpen.be/rtis-software/rtisdev/-/blob/master/config/premadeSettings/recording/flutter.csv):
|
|
|
An example of such a custom call can be found [here](https://cosysgit.uantwerpen.be/rtis-software/rtisdev/-/blob/master/config/premadeSettings/recording/)flutter.csv:
|
|
|
|
|
|
```json
|
|
|
{
|
... | ... | @@ -439,26 +439,26 @@ An example of such a custom call can be found [here](https://cosysgit.uantwerpen |
|
|
```
|
|
|
|
|
|
```python
|
|
|
rtisdev.set_recording_settings(jsonPath="./myrecordingsettings.json")
|
|
|
config_uuid = rtisdev.set_recording_settings(jsonPath="./myrecordingsettings.json")
|
|
|
```
|
|
|
|
|
|
Create full custom settings with the arguments. All arguments that aren't filled in will use default values:
|
|
|
|
|
|
```python
|
|
|
rtisdev.set_processing_settings(microphoneSamples=294912, callDuration=3, callMinimumFrequency=25000, callMaximumFrequency=80000)
|
|
|
config_uuid = rtisdev.set_recording_settings(microphoneSamples=294912, callDuration=3, callMinimumFrequency=25000, callMaximumFrequency=80000)
|
|
|
```
|
|
|
|
|
|
Load in manually generated call. This requires the file to exist on the path and have the right format.
|
|
|
An example of such a custom call can be found [here](https://cosysgit.uantwerpen.be/rtis-software/rtisdev/-/blob/master/config/premadeSettings/recording/flutter.csv):
|
|
|
An example of such a custom call can be found [here](https://cosysgit.uantwerpen.be/rtis-software/rtisdev/-/blob/master/config/premadeSettings/recording/)flutter.csv:
|
|
|
|
|
|
```python
|
|
|
rtisdev.set_processing_settings(callCustom="mycall.csv")
|
|
|
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>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, matchedFilterEnable: bool=True, beamformingEnable: bool=True, enveloppeEnable: bool=True, cleanEnable: bool=True, preloadToggle: bool =True</i>) <a class="src-href" target="_blank" href="https://cosysgit.uantwerpen.be/rtis-software/rtisdev/-/blob/master/rtisdev/RTISDev.py#L2719">[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, matchedFilterEnable: bool=True, beamformingEnable: bool=True, postFilterEnable: bool=False, enveloppeEnable: bool=True, cleanEnable: bool=True, preloadToggle: bool =True, postFilter=None</i>) <a class="src-href" target="_blank" href="https://cosysgit.uantwerpen.be/rtis-software/rtisdev/-/blob/master/rtisdev/RTISDev.py#L2851">[source]</a>
|
|
|
</p>
|
|
|
|
|
|
Set the processing settings. All parameters are optional and most have default values.
|
... | ... | @@ -470,7 +470,11 @@ Please read their decription carefully. |
|
|
<tbody valign="top">
|
|
|
<tr class="field">
|
|
|
<th class="field-name"><b>Parameters:</b></td>
|
|
|
<td class="field-body" width="100%"><b>premade : <i>String (default = Not used)</i></b>
|
|
|
<td class="field-body" width="100%"><b>configName : <i>String</i></b>
|
|
|
<p class="attr">
|
|
|
String to identify these settings with.
|
|
|
</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.
|
|
|
</p>
|
... | ... | @@ -508,12 +512,16 @@ Please read their decription carefully. |
|
|
</p>
|
|
|
<b>matchedFilterEnable : <i>bool (default = True)</i></b>
|
|
|
<p class="attr">
|
|
|
Toggle for matched filter part of the RTIS processing pipeline using RTIS CUDA.
|
|
|
Toggle for optional matched filter part of the RTIS processing pipeline using RTIS CUDA.
|
|
|
</p>
|
|
|
<b>beamformingEnable : <i>bool (default = True)</i></b>
|
|
|
<p class="attr">
|
|
|
Toggle for beamforming part of the RTIS processing pipeline using RTIS CUDA.
|
|
|
</p>
|
|
|
<b>postFilterEnable : <i>bool (default = False)</i></b>
|
|
|
<p class="attr">
|
|
|
Toggle for the optional post-beamforming filter part of the RTIS processing pipeline using RTIS CUDA.
|
|
|
</p>
|
|
|
<b>enveloppeEnable : <i>bool (default = True)</i></b>
|
|
|
<p class="attr">
|
|
|
Toggle for enveloppe part of the RTIS processing pipeline using RTIS CUDA.
|
... | ... | @@ -525,6 +533,10 @@ Please read their decription carefully. |
|
|
<b>preloadToggle : <i>bool (default = True)</i></b>
|
|
|
<p class="attr">
|
|
|
Toggle for using RTIS CUDA preloading
|
|
|
</p>
|
|
|
<b>postFilter : <i>Numpy ndarray (default = Not used)</i></b>
|
|
|
<p class="attr">
|
|
|
The array holding the optional post-beamforming filter created with scipy firwin. (shape: npostfilter x 1)
|
|
|
</p></td>
|
|
|
</tr>
|
|
|
<tr class="field">
|
... | ... | @@ -543,24 +555,24 @@ You can get the available premade settings with [`get_premade_recording_settings |
|
|
Create settings from a premade setup with all processing steps on:
|
|
|
|
|
|
```python
|
|
|
rtisdev.set_processing_settings(premade="3D_5m_3000", pdmEnable=True, matchedFilterEnable=True, beamformingEnable=True, enveloppeEnable=True, cleanEnable=True, preloadToggle=True)
|
|
|
rtisdev.set_processing_settings(premade="3D_5m_3000", pdmEnable=True, matchedFilterEnable=True, beamformingEnable=True, enveloppeEnable=True, postFilterEnable=False, cleanEnable=True, preloadToggle=True, configName=config_uuid)
|
|
|
```
|
|
|
|
|
|
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")
|
|
|
rtisdev.set_processing_settings(premade="3D_5m_3000", 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_settingsde="2D_5m_181", pdmEnable=True, matchedFilterEnable=True, beamformingEnable=False, enveloppeEnable=False, cleanEnable=False)
|
|
|
rtisdev.set_processing_settings(premade="2D_5m_181", pdmEnable=True, matchedFilterEnable=True, beamformingEnable=False, enveloppeEnable=False, cleanEnable=False, configName=config_uuid)
|
|
|
```
|
|
|
|
|
|
Create settings from a json file with full processing settings on.
|
|
|
This expects a json to be available wit(premah a format such as seen below.
|
|
|
This expects a json to be available with a premade a format such as seen below.
|
|
|
An example of such json files can be found [here](https://cosysgit.uantwerpen.be/rtis-software/rtisdev/-/blob/master/config/premadeSettings/processing/).
|
|
|
Here we use auto-generated processing files:
|
|
|
|
... | ... | @@ -575,7 +587,7 @@ Here we use auto-generated processing files: |
|
|
```
|
|
|
|
|
|
```python
|
|
|
rtisdev.set_processing_settings(jsonPath="./myprocessingsettings.json")
|
|
|
rtisdev.set_processing_settings(jsonPath="./myprocessingsettings.json", configName=config_uuid)
|
|
|
```
|
|
|
|
|
|
Create settings from a json file with full processing settings on.
|
... | ... | @@ -594,13 +606,13 @@ An example of such custom processing files can be found [here](https://cosysgit. |
|
|
```
|
|
|
|
|
|
```python
|
|
|
rtisdev.set_processing_settings(jsonPath="./myprocessingsettings.json")
|
|
|
rtisdev.set_processing_settings(jsonPath="./myprocessingsettings.json", configName=config_uuid)
|
|
|
```
|
|
|
|
|
|
Create full custom settings with the arguments. All arguments that aren't filled in will use default values:
|
|
|
|
|
|
```python
|
|
|
rtisdev.set_processing_settings(mode = 0, directions = 1337, minRange = 0.5, maxRange = 10)
|
|
|
rtisdev.set_processing_settings(mode = 0, directions = 1337, minRange = 0.5, configName=config_uuid)
|
|
|
```
|
|
|
|
|
|
Load in manually generated processing files. This requires 3 files to exist in the given path:
|
... | ... | @@ -609,26 +621,65 @@ microphoneSampleFrequency values correctly as these are absent in these csv file |
|
|
An example of such custom processing files can be found [here](https://cosysgit.uantwerpen.be/rtis-software/rtisdev/-/blob/master/config/premadeSettings/processing/):
|
|
|
|
|
|
```python
|
|
|
rtisdev.set_processing_settings(customPath="mysettingsfolder")
|
|
|
rtisdev.set_processing_settings(customPath="mysettingsfolder", configName=config_uuid)
|
|
|
```
|
|
|
|
|
|
The post-beamforming filter is an optional filter to be performed after beamforming. It should be created
|
|
|
using a scipy firwin filter function as in the example below:
|
|
|
|
|
|
```python
|
|
|
pf = scipy.signal.firwin(512, [40000 / (450000 / 2), 50000 / (450000 / 2)], pass_zero=False).astype(np.float32)
|
|
|
rtisdev.set_processing_settings(postFilter=pf, postFilterEnable=True, configName=config_uuid)
|
|
|
```
|
|
|
|
|
|
## **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#L3087">[source]</a>
|
|
|
</p>
|
|
|
|
|
|
Get a list of names of all the currently loaded configurations.
|
|
|
|
|
|
<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>Returns:</b></td>
|
|
|
<td class="field-body" width="100%"><b>configNames : <i>list[str]</i></b>
|
|
|
<p class="attr">
|
|
|
A list holding all the names of currently loaded RTISSettings.
|
|
|
</p></td>
|
|
|
</tr>
|
|
|
</tbody>
|
|
|
</table>
|
|
|
|
|
|
|
|
|
|
|
|
## **get_current_settings**
|
|
|
|
|
|
<p class="func-header">
|
|
|
<i>def</i> <b>get_current_settings</b>(<i></i>) <a class="src-href" target="_blank" href="https://cosysgit.uantwerpen.be/rtis-software/rtisdev/-/blob/master/rtisdev/RTISDev.py#L2925">[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#L3099">[source]</a>
|
|
|
</p>
|
|
|
|
|
|
Returns the [`RTISSettings`](https://cosysgit.uantwerpen.be/rtis-software/rtisdev/-/wikis/home#rtissettings) object of the current settings for processing and recording.
|
|
|
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.
|
|
|
|
|
|
<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>configName : <i>String</i></b>
|
|
|
<p class="attr">
|
|
|
String to identify these settings with. If given will only return this settings configuration if found. If not provided will return a dict of all RTISSettings objects identified by their own config name.
|
|
|
</p></td>
|
|
|
</tr>
|
|
|
<tr class="field">
|
|
|
<th class="field-name"><b>Returns:</b></td>
|
|
|
<td class="field-body" width="100%"><b>settings : <i>RTISSettings</i></b>
|
|
|
<td class="field-body" width="100%"><b>settings : <i>RTISSettings or dict</i></b>
|
|
|
<p class="attr">
|
|
|
The complete class containing all RTIS settings for recording and processing. Returns 'None' or will raise an exception on failure.
|
|
|
If the configName parameter is given, it will only return the complete class containing all RTIS settings for recording and processing. If this argument is not given it will return a dict of all RTISSettings objects identified by their own config name. If there is only one settings object defined it will return this one instead of a dict. Returns 'None' or will raise an exception on failure.
|
|
|
</p></td>
|
|
|
</tr>
|
|
|
</tbody>
|
... | ... | @@ -639,10 +690,10 @@ Returns the [`RTISSettings`](https://cosysgit.uantwerpen.be/rtis-software/rtisde |
|
|
## **clear_current_settings**
|
|
|
|
|
|
<p class="func-header">
|
|
|
<i>def</i> <b>clear_current_settings</b>(<i></i>) <a class="src-href" target="_blank" href="https://cosysgit.uantwerpen.be/rtis-software/rtisdev/-/blob/master/rtisdev/RTISDev.py#L2942">[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#L3134">[source]</a>
|
|
|
</p>
|
|
|
|
|
|
Clear the current applied [`RTISSettings`](https://cosysgit.uantwerpen.be/rtis-software/rtisdev/-/wikis/home#rtissettings) configuration.
|
|
|
Clear all or the current applied [`RTISSettings`](https://cosysgit.uantwerpen.be/rtis-software/rtisdev/-/wikis/home#rtissettings) configuration.
|
|
|
|
|
|
<table class="docutils field-list field-table" frame="void" rules="none">
|
|
|
<col class="field-name" />
|
... | ... | @@ -656,7 +707,7 @@ Clear the current applied [`RTISSettings`](https://cosysgit.uantwerpen.be/rtis-s |
|
|
## **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, matchedFilterEnable: bool=True, beamformingEnable: bool=True, enveloppeEnable: bool=True, cleanEnable: bool=True, preloadToggle: bool =True, configName: str=''</i>) <a class="src-href" target="_blank" href="https://cosysgit.uantwerpen.be/rtis-software/rtisdev/-/blob/master/rtisdev/RTISDev.py#L2951">[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, matchedFilterEnable: bool=True, beamformingEnable: bool=True, postFilterEnable: bool=False, enveloppeEnable: bool=True, cleanEnable: bool=True, preloadToggle: bool=True, postFilter=None, configName: str='' </i>) <a class="src-href" target="_blank" href="https://cosysgit.uantwerpen.be/rtis-software/rtisdev/-/blob/master/rtisdev/RTISDev.py#L3151">[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
|
... | ... | @@ -748,12 +799,16 @@ the [`set_recording_settings()`](https://cosysgit.uantwerpen.be/rtis-software/rt |
|
|
</p>
|
|
|
<b>matchedFilterEnable : <i>bool (default = True)</i></b>
|
|
|
<p class="attr">
|
|
|
Toggle for matched filter part of the RTIS processing pipeline using RTIS CUDA.
|
|
|
Toggle for the optional matched filter part of the RTIS processing pipeline using RTIS CUDA.
|
|
|
</p>
|
|
|
<b>beamformingEnable : <i>bool (default = True)</i></b>
|
|
|
<p class="attr">
|
|
|
Toggle for beamforming part of the RTIS processing pipeline using RTIS CUDA.
|
|
|
</p>
|
|
|
<b>postFilterEnable : <i>bool (default = False)</i></b>
|
|
|
<p class="attr">
|
|
|
Toggle for the optional post-beamforming filter part of the RTIS processing pipeline using RTIS CUDA.
|
|
|
</p>
|
|
|
<b>enveloppeEnable : <i>bool (default = True)</i></b>
|
|
|
<p class="attr">
|
|
|
Toggle for enveloppe part of the RTIS processing pipeline using RTIS CUDA.
|
... | ... | @@ -766,9 +821,13 @@ the [`set_recording_settings()`](https://cosysgit.uantwerpen.be/rtis-software/rt |
|
|
<p class="attr">
|
|
|
Toggle for using RTIS CUDA preloading
|
|
|
</p>
|
|
|
<b>postFilter : <i>Numpy ndarray (default = Not used)</i></b>
|
|
|
<p class="attr">
|
|
|
The array holding the optional post-beamforming filter created with scipy firwin. (shape: npostfilter x 1)
|
|
|
</p>
|
|
|
<b>configName : <i>String (default = "")</i></b>
|
|
|
<p class="attr">
|
|
|
String to identify these settings with. If set to empty (as it is by default), it will become the name set for recordingPremade. If no premade recording settings are used it will default to <em>RTISSettings</em>.
|
|
|
String to identify these settings with. If set to empty (as it is by default) it will default to a unique UUID.
|
|
|
</p></td>
|
|
|
</tr>
|
|
|
<tr class="field">
|
... | ... | @@ -786,7 +845,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#L3154">[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#L3361">[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
|
... | ... | @@ -822,7 +881,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#L3188">[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#L3397">[source]</a>
|
|
|
</p>
|
|
|
|
|
|
Get a list of names of all the available premade settings for processing.
|
... | ... | @@ -846,7 +905,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#L3203">[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#L3412">[source]</a>
|
|
|
</p>
|
|
|
|
|
|
Get a list of names of all the available premade settings for recording.
|
... | ... | @@ -870,7 +929,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#L3218">[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#L3427">[source]</a>
|
|
|
</p>
|
|
|
|
|
|
Get a list of names of all the available microphone layouts that are available for recording.
|
... | ... | @@ -894,19 +953,28 @@ 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></i>) <a class="src-href" target="_blank" href="https://cosysgit.uantwerpen.be/rtis-software/rtisdev/-/blob/master/rtisdev/RTISDev.py#L3232">[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#L3441">[source]</a>
|
|
|
</p>
|
|
|
|
|
|
Start the CUDA workers for looped measurements with processing enabled.
|
|
|
It is not required to run this method for doing processing, but it will speed up the workflow
|
|
|
significantly if doing many processed measurements at a high frequency.
|
|
|
Furthermore, if using the default settings for processing this is enabled already.
|
|
|
If no config name parameter is provided it will assume only one settings configuration is available and
|
|
|
will prepare that one.
|
|
|
|
|
|
<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>configName : <i>string</i></b>
|
|
|
<p class="attr">
|
|
|
The identity of the settings configuration to be used. If not given it will assume only one settings configuration is defined within RTIS Dev.
|
|
|
</p></td>
|
|
|
</tr>
|
|
|
<tr class="field">
|
|
|
<th class="field-name"><b>Returns:</b></td>
|
|
|
<td class="field-body" width="100%"><b>success : <i>bool</i></b>
|
|
|
<p class="attr">
|
... | ... | @@ -921,10 +989,10 @@ Furthermore, if using the default settings for processing this is enabled alread |
|
|
## **unload_processing**
|
|
|
|
|
|
<p class="func-header">
|
|
|
<i>def</i> <b>unload_processing</b>(<i></i>) <a class="src-href" target="_blank" href="https://cosysgit.uantwerpen.be/rtis-software/rtisdev/-/blob/master/rtisdev/RTISDev.py#L3259">[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#L3484">[source]</a>
|
|
|
</p>
|
|
|
|
|
|
Stop all CUDA workers.
|
|
|
Stop all CUDA workers of all workers or of one specified if the configuration name is provided.
|
|
|
Only required if actually using preloading of CUDA workers. CUDA workers are also automatically
|
|
|
stopped when your script ends.
|
|
|
|
... | ... | @@ -933,6 +1001,13 @@ stopped when your script ends. |
|
|
<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>configName : <i>string</i></b>
|
|
|
<p class="attr">
|
|
|
The identity of the settings configuration to be used. If not given it will stop the workers of all configurations.
|
|
|
</p></td>
|
|
|
</tr>
|
|
|
<tr class="field">
|
|
|
<th class="field-name"><b>Returns:</b></td>
|
|
|
<td class="field-body" width="100%"><b>success : <i>bool</i></b>
|
|
|
<p class="attr">
|
... | ... | @@ -947,7 +1022,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</i>) <a class="src-href" target="_blank" href="https://cosysgit.uantwerpen.be/rtis-software/rtisdev/-/blob/master/rtisdev/RTISDev.py#L3274">[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#L3508">[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.
|
... | ... | @@ -962,6 +1037,10 @@ This means that it will only record and not perform any processing. |
|
|
<td class="field-body" width="100%"><b>behaviour : <i>bool</i></b>
|
|
|
<p class="attr">
|
|
|
A configuration toggle to set the required sonar behaviour (active or passive).
|
|
|
</p>
|
|
|
<b>configName : <i>string</i></b>
|
|
|
<p class="attr">
|
|
|
The identity of the settings configuration to be used. If not given it will assume only one settings configuration is defined within RTIS Dev.
|
|
|
</p></td>
|
|
|
</tr>
|
|
|
<tr class="field">
|
... | ... | @@ -988,7 +1067,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</i>) <a class="src-href" target="_blank" href="https://cosysgit.uantwerpen.be/rtis-software/rtisdev/-/blob/master/rtisdev/RTISDev.py#L3306">[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#L3548">[source]</a>
|
|
|
</p>
|
|
|
|
|
|
Start an RTIS sonar measurement and process it with only PDM filtering
|
... | ... | @@ -1005,6 +1084,10 @@ have set. But will still use the other chosen recording and processing settings. |
|
|
<td class="field-body" width="100%"><b>behaviour : <i>bool</i></b>
|
|
|
<p class="attr">
|
|
|
A configuration toggle to set the required sonar behaviour (active or passive).
|
|
|
</p>
|
|
|
<b>configName : <i>string</i></b>
|
|
|
<p class="attr">
|
|
|
The identity of the settings configuration to be used. If not given it will assume only one settings configuration is defined within RTIS Dev.
|
|
|
</p></td>
|
|
|
</tr>
|
|
|
<tr class="field">
|
... | ... | @@ -1024,15 +1107,15 @@ Create a connection, set recording and processing settings and make a signal mea |
|
|
```python
|
|
|
import rtisdev
|
|
|
rtisdev.open_connection()
|
|
|
rtisdev.set_recording_settings(premade="default_25_50")
|
|
|
rtisdev.set_processing_settings(premade="2D_5m_181")
|
|
|
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)
|
|
|
```
|
|
|
|
|
|
## **get_processed_measurement**
|
|
|
|
|
|
<p class="func-header">
|
|
|
<i>def</i> <b>get_processed_measurement</b>(<i>behaviour: bool=False</i>) <a class="src-href" target="_blank" href="https://cosysgit.uantwerpen.be/rtis-software/rtisdev/-/blob/master/rtisdev/RTISDev.py#L3345">[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#L3594">[source]</a>
|
|
|
</p>
|
|
|
|
|
|
Start an RTIS sonar measurement and process it and return the raw and processed data
|
... | ... | @@ -1047,6 +1130,10 @@ in an [`RTISMeasurement`](https://cosysgit.uantwerpen.be/rtis-software/rtisdev/- |
|
|
<td class="field-body" width="100%"><b>behaviour : <i>bool</i></b>
|
|
|
<p class="attr">
|
|
|
A configuration toggle to set the required sonar behaviour (active or passive).
|
|
|
</p>
|
|
|
<b>configName : <i>string</i></b>
|
|
|
<p class="attr">
|
|
|
The identity of the settings configuration to be used. If not given it will assume only one settings configuration is defined within RTIS Dev.
|
|
|
</p></td>
|
|
|
</tr>
|
|
|
<tr class="field">
|
... | ... | @@ -1067,15 +1154,15 @@ a processed measurement with active behaviour: |
|
|
```python
|
|
|
import rtisdev
|
|
|
rtisdev.open_connection()
|
|
|
rtisdev.set_recording_settings(premade="default_25_50")
|
|
|
rtisdev.set_processing_settings(premade="2D_5m_181")
|
|
|
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)
|
|
|
```
|
|
|
|
|
|
## **process_measurement**
|
|
|
|
|
|
<p class="func-header">
|
|
|
<i>def</i> <b>process_measurement</b>(<i>measurement: RTISMeasurement</i>) <a class="src-href" target="_blank" href="https://cosysgit.uantwerpen.be/rtis-software/rtisdev/-/blob/master/rtisdev/RTISDev.py#L3384">[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#L3640">[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
|
... | ... | @@ -1090,6 +1177,10 @@ and return same measurement with processed data in a new [`RTISMeasurement`](htt |
|
|
<td class="field-body" width="100%"><b>measurement : <i>RTISMeasurement</i></b>
|
|
|
<p class="attr">
|
|
|
The data class holding the raw measurement of the RTIS device.
|
|
|
</p>
|
|
|
<b>configName : <i>string</i></b>
|
|
|
<p class="attr">
|
|
|
The identity of the settings configuration to be used. If not given it will assume only one settings configuration is defined within RTIS Dev.
|
|
|
</p></td>
|
|
|
</tr>
|
|
|
<tr class="field">
|
... | ... | @@ -1110,8 +1201,8 @@ Then afterwards process it: |
|
|
```python
|
|
|
import rtisdev
|
|
|
rtisdev.open_connection()
|
|
|
rtisdev.set_recording_settings(premade="default_25_50")
|
|
|
rtisdev.set_processing_settings(premade="2D_5m_181")
|
|
|
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)
|
|
|
```
|
... | ... | @@ -1119,7 +1210,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#L3422">[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#L3686">[source]</a>
|
|
|
</p>
|
|
|
|
|
|
Set the internal measurement counter of the sonar hardware.
|
... | ... | @@ -1150,7 +1241,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#L3445">[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#L3709">[source]</a>
|
|
|
</p>
|
|
|
|
|
|
Set the behaviour of the sonar hardware to passive or active. This is only necessary if using external
|
... | ... | @@ -1184,7 +1275,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#L3470">[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#L3734">[source]</a>
|
|
|
</p>
|
|
|
|
|
|
Get the firmware version of the internal RTIS firmware used on the device.
|
... | ... | @@ -1208,7 +1299,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 </i>) <a class="src-href" target="_blank" href="https://cosysgit.uantwerpen.be/rtis-software/rtisdev/-/blob/master/rtisdev/RTISDev.py#L3485">[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#L3749">[source]</a>
|
|
|
</p>
|
|
|
|
|
|
This will create and return a Multiprocessing Process
|
... | ... | @@ -1224,6 +1315,10 @@ the RTIS Device and afterwards put this measurement on a data queue. |
|
|
<td class="field-body" width="100%"><b>dataQueue : <i>multiprocessing.Manager.Queue</i></b>
|
|
|
<p class="attr">
|
|
|
On this queue the <a href="https://cosysgit.uantwerpen.be/rtis-software/rtisdev/-/wikis/home#rtismeasurement"><code>RTISMeasurement</code></a> objects will be put after an external trigger starts a new measurement.
|
|
|
</p>
|
|
|
<b>configName : <i>string</i></b>
|
|
|
<p class="attr">
|
|
|
The identity of the settings configuration to be used. If not given it will assume only one settings configuration is defined within RTIS Dev.
|
|
|
</p></td>
|
|
|
</tr>
|
|
|
<tr class="field">
|
... | ... | @@ -1244,11 +1339,11 @@ Create a queue to save the measurement to and assign it to the process: |
|
|
from multiprocessing import Manager
|
|
|
import rtisdev
|
|
|
rtisdev.open_connection()
|
|
|
rtisdev.set_recording_settings(premade="default_25_50")
|
|
|
rtisdev.set_processing_settings(premade="2D_5m_181")
|
|
|
config_uuid = rtisdev.set_recording_settings(premade="default_25_50")
|
|
|
rtisdev.set_processing_settings(premade="2D_5m_181",configName=config_uuid)
|
|
|
manager = Manager()
|
|
|
dataQueue = manager.Queue()
|
|
|
measure_thread = rtisdev.create_measure_external_trigger_queue(dataQueue)
|
|
|
measure_thread = rtisdev.create_measure_external_trigger_queue(dataQueue, config_uuid)
|
|
|
measure_thread.start()
|
|
|
measure_thread.join()
|
|
|
```
|
... | ... | @@ -1256,7 +1351,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]</i>) <a class="src-href" target="_blank" href="https://cosysgit.uantwerpen.be/rtis-software/rtisdev/-/blob/master/rtisdev/RTISDev.py#L3547">[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#L3823">[source]</a>
|
|
|
</p>
|
|
|
|
|
|
This will create and return a Multiprocessing Process
|
... | ... | @@ -1272,6 +1367,10 @@ the RTIS Device and afterwards put this measurement on a data queue. |
|
|
<td class="field-body" width="100%"><b>callback : <i>method with one argument of type 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>configName : <i>string</i></b>
|
|
|
<p class="attr">
|
|
|
The identity of the settings configuration to be used. If not given it will assume only one settings configuration is defined within RTIS Dev.
|
|
|
</p></td>
|
|
|
</tr>
|
|
|
<tr class="field">
|
... | ... | @@ -1291,8 +1390,8 @@ Create a callback to save the measurement to disk: |
|
|
```python
|
|
|
import rtisdev
|
|
|
rtisdev.open_connection()
|
|
|
rtisdev.set_recording_settings(premade="default_25_50")
|
|
|
rtisdev.set_processing_settings(premade="2D_5m_181")
|
|
|
config_uuid = rtisdev.set_recording_settings(premade="default_25_50")
|
|
|
rtisdev.set_processing_settings(premade="2D_5m_181", configName=config_uuid)
|
|
|
index = 0
|
|
|
def save_callback(measurement=None):
|
|
|
if measurement is not None :
|
... | ... | @@ -1302,7 +1401,7 @@ def save_callback(measurement=None): |
|
|
file_handle_data.write(data_sonar)
|
|
|
file_handle_data.close()
|
|
|
index = index + 1
|
|
|
measure_thread = rtisdev.create_measure_external_trigger_callback(save_callback)
|
|
|
measure_thread = rtisdev.create_measure_external_trigger_callback(save_callback, config_uuid)
|
|
|
measure_thread.start()
|
|
|
measure_thread.join()
|
|
|
```
|
... | ... | @@ -1310,7 +1409,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</i>) <a class="src-href" target="_blank" href="https://cosysgit.uantwerpen.be/rtis-software/rtisdev/-/blob/master/rtisdev/RTISDev.py#L3618">[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#L3906">[source]</a>
|
|
|
</p>
|
|
|
|
|
|
This will create and return a Multiprocessing Pool that will generate a chosen amount of processing
|
... | ... | @@ -1338,6 +1437,10 @@ potential crash of RTIS Dev! |
|
|
<b>outputQueue : <i>multiprocessing.Manager.Queue</i></b>
|
|
|
<p class="attr">
|
|
|
This is the data queue that will be used to store the processed <a href="https://cosysgit.uantwerpen.be/rtis-software/rtisdev/-/wikis/home#rtismeasurement"><code>RTISMeasurement</code></a> objects on.
|
|
|
</p>
|
|
|
<b>configName : <i>string</i></b>
|
|
|
<p class="attr">
|
|
|
The identity of the settings configuration to be used. If not given it will assume only one settings configuration is defined within RTIS Dev.
|
|
|
</p></td>
|
|
|
</tr>
|
|
|
<tr class="field">
|
... | ... | @@ -1360,14 +1463,14 @@ Once the work is done, terminate the workers gracefully: |
|
|
from multiprocessing import Manager
|
|
|
import rtisdev
|
|
|
rtisdev.open_connection()
|
|
|
rtisdev.set_recording_settings(premade="default_25_50")
|
|
|
rtisdev.set_processing_settings(premade="2D_5m_181")
|
|
|
config_uuid = rtisdev.set_recording_settings(premade="default_25_50")
|
|
|
rtisdev.set_processing_settings(premade="2D_5m_181", configName=config_uuid)
|
|
|
manager = Manager()
|
|
|
inputQueue = manager.Queue()
|
|
|
outputQueue = manager.Queue()
|
|
|
workersPool = rtisdev.create_processing_workers(4, inputQueue, outputQueue)
|
|
|
workersPool = rtisdev.create_processing_workers(4, inputQueue, outputQueue, config_uuid)
|
|
|
for measurement_index in range(0, 30):
|
|
|
measurement = rtisdev.get_raw_measurement()
|
|
|
measurement = rtisdev.get_raw_measurement(configName=config_uuid)
|
|
|
inputQueue.put(measurement)
|
|
|
for measurement_index in range(0, 30):
|
|
|
measurement = outputQueue.get()
|
... | ... | @@ -1377,7 +1480,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#L3682">[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#L3980">[source]</a>
|
|
|
</p>
|
|
|
|
|
|
Enable/disable the high voltage amplifier's step up controller.
|
... | ... | @@ -1410,7 +1513,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#L3704">[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#L4002">[source]</a>
|
|
|
</p>
|
|
|
|
|
|
Enable/disable external triggers being able to start a measurement on the RTIS device.
|
... | ... | @@ -1442,7 +1545,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#L3725">[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#L4023">[source]</a>
|
|
|
</p>
|
|
|
|
|
|
The function to reset the RTIS device hardware.
|
... | ... | @@ -1473,7 +1576,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#L3771">[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#L4069">[source]</a>
|
|
|
</p>
|
|
|
|
|
|
The function to set the logging level of the RTIS Dev module.
|
... | ... | @@ -1497,7 +1600,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#L3799">[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#L4097">[source]</a>
|
|
|
</p>
|
|
|
|
|
|
The function to set a custom logger to be used by RTIS Dev.
|
... | ... | |