Ejemplo n.º 1
0
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)
Ejemplo n.º 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))
Ejemplo n.º 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()
Ejemplo n.º 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)
Ejemplo n.º 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))
Ejemplo n.º 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)
Ejemplo n.º 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)
Ejemplo n.º 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)
Ejemplo n.º 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))
Ejemplo n.º 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)
Ejemplo n.º 11
0
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()
Ejemplo n.º 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()
Ejemplo n.º 13
0
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)
Ejemplo n.º 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)
Ejemplo n.º 15
0
def find_device():
    """List available Explore devices"""
    explorepy.set_bt_interface(default_bt_backend)
    explorepy.tools.bt_scan()
Ejemplo n.º 16
0
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))
Ejemplo n.º 17
0
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)
Ejemplo n.º 18
0
def find_device(bluetooth):
    """List available Explore devices."""
    explorepy.set_bt_interface(bluetooth)
    explorepy.tools.bt_scan()
Ejemplo n.º 19
0
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()
Ejemplo n.º 20
0
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()
Ejemplo n.º 21
0
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))
Ejemplo n.º 22
0
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)
Ejemplo n.º 23
0
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)
Ejemplo n.º 24
0
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)