Exemple #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)
Exemple #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))
Exemple #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()
Exemple #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)
Exemple #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))
Exemple #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)
Exemple #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)
Exemple #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)
Exemple #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))
Exemple #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)
Exemple #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()
Exemple #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()
Exemple #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)
Exemple #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)
Exemple #15
0
def find_device():
    """List available Explore devices"""
    explorepy.set_bt_interface(default_bt_backend)
    explorepy.tools.bt_scan()
Exemple #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))
Exemple #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)
Exemple #18
0
def find_device(bluetooth):
    """List available Explore devices."""
    explorepy.set_bt_interface(bluetooth)
    explorepy.tools.bt_scan()
Exemple #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()
Exemple #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()
Exemple #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))
Exemple #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)
Exemple #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)
Exemple #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)