nrgpy.convert.convert_rwd module#

class nrgpy.convert.convert_rwd.local(rwd_dir: str = '', out_dir: str = '', filename: str = '', encryption_pin: str = '', sdr_path: str = 'C:/NRG/SymDR/SDR.exe', convert_type: str = 'meas', file_filter: str = '', wine_folder: str = '~/.wine/drive_c/', use_site_file: bool = False, raw_mode: bool = False, progress_bar: bool = True, show_result: bool = True, **kwargs)[source]#

Bases: object

nrgpy.convert_rwd.local - use local installation of Symphonie Data Retriever (SDR) to convert *.RWD files to *.TXT

Parameters:
filenamestr

if populated, a single file is exported

encryption_pinstr

four digit pin, only used for encrypted files

sdr_pathstr

r‘“C:/NRG/SymDR/SDR.exe”’, may be any path

file_filterstr

filters files on text in filename

rwd_dirstr (path-like)

folder to check for RWD files

out_dirstr (path-like)

folder to save exported TXT files into

wine_folderstr

‘~/.wine/drive_c/’, for linux installations

use_site_filebool

set to True to use local site file

raw_modebool

set to True to convert raw counts and voltages

progress_barbool

set to False to see individual file conversions

show_resultbool

set to False to hide prints to console

Returns:
None

Examples

Convert a folder of RWD files to Text with SymphoniePRO Desktop Software

>>> from nrgpy.convert_rwd import local
>>> converter = local(
        rwd_dir='/path/to/rwd/files',
        out_dir=/path/to/txt/outputs,
        file_filter='1234202001', # for files from January 2020
    )
>>> converter.convert()

Convert a folder … on Linux; this assumes you followed the instructions in the ‘’’SDR_Linux_README.md’’’ file.

>>> import getpass
>>> import nrgpy
>>> username = getpass.getuser()
>>> rwd_dir = f"/home/{username}/data/symplus3/raw"
>>> txt_dir = f"/home/{username}/data/symplus3/export"
>>> wine_folder = f"/home/{username}/prefix32/drive_c"
>>> converter = nrgpy.convert_rwd.local(
        rwd_dir=rwd_dir,
        out_dir=txt_dir,
        wine_folder=wine_folder
    )
>>> converter.convert()
check_sdr()[source]#

determine if SDR is installed

convert()[source]#

process rwd files

create list of RWD files that match filtering copy RWD files to RawData directory iterate through files