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