SpikeInterface / MEArec

Fast and customizable of extracellular recordings on MEA
GNU General Public License v3.0
42 stars 19 forks source link

control over amplitude distribution #143

Open bendichter opened 1 year ago

bendichter commented 1 year ago

Request by Liam Paninski

alejoe91 commented 1 year ago

Thanks @bendichter

@colehurwitz The way one can control amplitude distribution i(or anything else) is the following:

# load templates
tempgen = mr.load_templates("path-to-h5")

# define a custom way to select the templates you want, e.g. by imposing amplitude distributions, locations, etc
templates = tempgen.templates
my_template_ids = my_function_to_select_template_idxs(templates)

# generate the recording with the pre-selected templates
recgen = mr.generate_recording(tempgen=tempgen, params=your_params, template_ids=my_template_ids)

This will skip the internal template selection and directly use the provided template indices.