コード例 #1
0
ファイル: cli.py プロジェクト: stefanches7/explorepy
def disable_module(address, name, module, bluetooth):
    """Disable a module of Explore device"""
    explorepy.set_bt_interface(bluetooth)

    explore = explorepy.explore.Explore()
    explore.connect(mac_address=address, device_name=name)
    explore.disable_module(module)
コード例 #2
0
def impedance(address, name, notchfreq, bluetooth):
    """Impedance measurement in a browser-based dashboard"""
    if name is None and address is None:
        raise ValueError("Either name or address must be given!")
    explorepy.set_bt_interface(bluetooth)
    explore = explorepy.explore.Explore()
    explore.connect(mac_address=address, device_name=name)
    explore.measure_imp(notch_freq=int(notchfreq))
コード例 #3
0
def format_memory(address, name, bluetooth):
    """format the memory of Explore device"""
    if name is None and address is None:
        raise ValueError("Either name or address must be given!")
    explorepy.set_bt_interface(bluetooth)
    explore = explorepy.explore.Explore()
    explore.connect(mac_address=address, device_name=name)
    explore.format_memory()
コード例 #4
0
def set_channels(address, name, channel_mask, bluetooth):
    """Mask the channels of selected explore device"""
    if name is None and address is None:
        raise ValueError("Either name or address must be given!")
    explorepy.set_bt_interface(bluetooth)
    explore = explorepy.explore.Explore()
    explore.connect(mac_address=address, device_name=name)
    explore.set_channels(channel_mask)
コード例 #5
0
def set_sampling_rate(address, name, sampling_rate, bluetooth):
    """Change sampling rate of the Explore device"""
    if name is None and address is None:
        raise ValueError("Either name or address must be given!")
    explorepy.set_bt_interface(bluetooth)
    explore = explorepy.explore.Explore()
    explore.connect(mac_address=address, device_name=name)
    explore.set_sampling_rate(int(sampling_rate))
コード例 #6
0
def enable_module(address, name, module, bluetooth):
    """Enable a module of Explore device"""
    if name is None and address is None:
        raise ValueError("Either name or address must be given!")
    explorepy.set_bt_interface(bluetooth)
    explore = explorepy.explore.Explore()
    explore.connect(mac_address=address, device_name=name)
    explore.enable_module(module)
コード例 #7
0
def calibrate_orn(address, name, overwrite, bluetooth):
    """Calibrate the orientation module of the specified device"""
    if name is None and address is None:
        raise ValueError("Either name or address must be given!")
    explorepy.set_bt_interface(bluetooth)
    explore = explorepy.explore.Explore()
    explore.connect(mac_address=address, device_name=name)
    explore.calibrate_orn(do_overwrite=overwrite)
コード例 #8
0
def acquire(name, address, duration, bluetooth):
    """Connect to a device with selected name or address. Only one input is necessary"""
    if name is None and address is None:
        raise ValueError("Either name or address must be given!")
    explorepy.set_bt_interface(bluetooth)
    explore = explorepy.explore.Explore()
    explore.connect(mac_address=address, device_name=name)
    explore.acquire(duration)
コード例 #9
0
def visualize(address, name, notchfreq, lowfreq, highfreq, bluetooth):
    """Visualizing signal in a browser-based dashboard"""
    if name is None and address is None:
        raise ValueError("Either name or address must be given!")
    explorepy.set_bt_interface(bluetooth)
    explore = explorepy.explore.Explore()
    explore.connect(mac_address=address, device_name=name)
    explore.visualize(notch_freq=int(notchfreq), bp_freq=(lowfreq, highfreq))
コード例 #10
0
def push2lsl(address, name, duration, bluetooth):
    """Push data to lsl"""
    if name is None and address is None:
        raise ValueError("Either name or address must be given!")
    explorepy.set_bt_interface(bluetooth)
    explore = explorepy.explore.Explore()
    explore.connect(mac_address=address, device_name=name)
    explore.push2lsl(duration)
コード例 #11
0
ファイル: cli.py プロジェクト: stefanches7/explorepy
def soft_reset(address, name, bluetooth):
    """Software reset of Explore device

    Reset the selected explore device (current session will be terminated)."""

    explorepy.set_bt_interface(bluetooth)
    explore = explorepy.explore.Explore()
    explore.connect(mac_address=address, device_name=name)
    explore.reset_soft()
コード例 #12
0
def soft_reset(address, name, bluetooth):
    """Software reset of Explore device"""
    if name is None and address is None:
        raise ValueError("Either name or address must be given!")
    explorepy.set_bt_interface(bluetooth)
    """Reset the selected explore device (current session will be terminated)."""
    explore = explorepy.explore.Explore()
    explore.connect(mac_address=address, device_name=name)
    explore.reset_soft()
コード例 #13
0
ファイル: cli.py プロジェクト: stefanches7/explorepy
def record_data(address, name, filename, overwrite, duration, file_type,
                bluetooth):
    """Record data from Explore to a file"""
    explorepy.set_bt_interface(bluetooth)
    explore = explorepy.explore.Explore()
    explore.connect(mac_address=address, device_name=name)
    explore.record_data(file_name=filename,
                        file_type=file_type,
                        do_overwrite=overwrite,
                        duration=duration,
                        block=True)
コード例 #14
0
def record_data(address, name, filename, overwrite, duration, file_type,
                bluetooth):
    """Record data from Explore to a file """
    if name is None and address is None:
        raise ValueError("Either name or address must be given!")
    explorepy.set_bt_interface(bluetooth)
    explore = explorepy.explore.Explore()
    explore.connect(mac_address=address, device_name=name)
    explore.record_data(file_name=filename,
                        file_type=file_type,
                        do_overwrite=overwrite,
                        duration=duration,
                        block=True)
コード例 #15
0
ファイル: cli.py プロジェクト: Mentalab-hub/explorepy
def find_device():
    """List available Explore devices"""
    explorepy.set_bt_interface(default_bt_backend)
    explorepy.tools.bt_scan()
コード例 #16
0
ファイル: cli.py プロジェクト: stefanches7/explorepy
def visualize(address, name, notchfreq, lowfreq, highfreq, bluetooth):
    """Visualizing signal in a browser-based dashboard"""
    explorepy.set_bt_interface(bluetooth)
    explore = explorepy.explore.Explore()
    explore.connect(mac_address=address, device_name=name)
    explore.visualize(notch_freq=int(notchfreq), bp_freq=(lowfreq, highfreq))
コード例 #17
0
ファイル: cli.py プロジェクト: stefanches7/explorepy
def push2lsl(address, name, duration, bluetooth):
    """Push data to lsl"""
    explorepy.set_bt_interface(bluetooth)
    explore = explorepy.explore.Explore()
    explore.connect(mac_address=address, device_name=name)
    explore.push2lsl(duration)
コード例 #18
0
def find_device(bluetooth):
    """List available Explore devices."""
    explorepy.set_bt_interface(bluetooth)
    explorepy.tools.bt_scan()
コード例 #19
0
ファイル: cli.py プロジェクト: stefanches7/explorepy
def impedance(address, name, bluetooth):
    """Impedance measurement in a browser-based dashboard"""
    explorepy.set_bt_interface(bluetooth)
    explore = explorepy.explore.Explore()
    explore.connect(mac_address=address, device_name=name)
    explore.measure_imp()
コード例 #20
0
ファイル: cli.py プロジェクト: stefanches7/explorepy
def format_memory(address, name, bluetooth):
    """Format the memory of Explore device"""
    explorepy.set_bt_interface(bluetooth)
    explore = explorepy.explore.Explore()
    explore.connect(mac_address=address, device_name=name)
    explore.format_memory()
コード例 #21
0
ファイル: cli.py プロジェクト: stefanches7/explorepy
def set_sampling_rate(address, name, sampling_rate, bluetooth):
    """Change sampling rate of the Explore device"""
    explorepy.set_bt_interface(bluetooth)
    explore = explorepy.explore.Explore()
    explore.connect(mac_address=address, device_name=name)
    explore.set_sampling_rate(int(sampling_rate))
コード例 #22
0
ファイル: cli.py プロジェクト: stefanches7/explorepy
def set_channels(address, name, channel_mask, bluetooth):
    """Mask the channels of the Explore device"""
    explorepy.set_bt_interface(bluetooth)
    explore = explorepy.explore.Explore()
    explore.connect(mac_address=address, device_name=name)
    explore.set_channels(channel_mask)
コード例 #23
0
ファイル: cli.py プロジェクト: stefanches7/explorepy
def calibrate_orn(address, name, overwrite, bluetooth):
    """Calibrate the orientation module"""
    explorepy.set_bt_interface(bluetooth)
    explore = explorepy.explore.Explore()
    explore.connect(mac_address=address, device_name=name)
    explore.calibrate_orn(do_overwrite=overwrite)
コード例 #24
0
ファイル: cli.py プロジェクト: stefanches7/explorepy
def acquire(name, address, duration, bluetooth):
    """Connect to a device and print the ExG stream in the console"""
    explorepy.set_bt_interface(bluetooth)
    explore = explorepy.explore.Explore()
    explore.connect(mac_address=address, device_name=name)
    explore.acquire(duration)