def test_generate(): probe = generate_dummy_probe() probegroup = generate_dummy_probe_group() tetrode = generate_tetrode() multi_columns = generate_multi_columns_probe(num_columns=3, num_elec_per_column=[10, 12, 10], xpitch=22, ypitch=20, y_shift_per_column=[0, -10, 0]) linear = generate_linear_probe(num_elec=16, ypitch=20, electrode_shapes='square', electrode_shape_params={'width': 15}) multi_shank = generate_multi_shank()
import numpy as np import matplotlib.pyplot as plt from probeinterface import Probe, ProbeGroup from probeinterface.plotting import plot_probe, plot_probe_group ############################################################################## # Generate 4 tetrodes: # from probeinterface import generate_tetrode probegroup = ProbeGroup() for i in range(4): tetrode = generate_tetrode() tetrode.move([i * 50, 0]) probegroup.add_probe(tetrode) probegroup.set_global_device_channel_indices(np.arange(16)) df = probegroup.to_dataframe() df plot_probe_group(probegroup, with_channel_index=True, same_axes=True) ############################################################################## # Generate a linear probe: # from probeinterface import generate_linear_probe
""" Use to generate figure and format for documentation """ import numpy as np import matplotlib.pyplot as plt from probeinterface import Probe, ProbeGroup, combine_probes, write_probeinterface from probeinterface.plotting import plot_probe, plot_probe_group from probeinterface import generate_tetrode probe0 = generate_tetrode(r=25) probe0.create_auto_shape(probe_type='tip') probe1 = generate_tetrode(r=25) probe1.create_auto_shape(probe_type='tip') probe1.move([150, 0]) probe = combine_probes([probe0, probe1]) pos = probe.electrode_positions pos[np.abs(pos) < 0.0001] = 0 probe.electrode_positions = pos # do not include wiring in example : too complicated # probe.set_device_channel_indices([3,2,1,0, 7, 6, 5, 4]) probe.annotate(name='2 shank tetrodes', manufacturer='homemade') print(probe.shank_ids) d = probe.to_dict()