allensdk.brain_observatory.ecephys.utils module

allensdk.brain_observatory.ecephys.utils.clobbering_merge(to_df, from_df, **kwargs)[source]
allensdk.brain_observatory.ecephys.utils.group_1d_by_unit(data, data_unit_map, local_to_global_unit_map=None)[source]
allensdk.brain_observatory.ecephys.utils.load_and_squeeze_npy(path)[source]
allensdk.brain_observatory.ecephys.utils.scale_amplitudes(spike_amplitudes, templates, spike_templates, scale_factor=1.0)[source]
allensdk.brain_observatory.ecephys.utils.strip_substructure_acronym(acronym: str | list | float | None) str | list | None[source]

Sanitize a structure acronym or a list of structure acronyms by removing the substructure (e.g. DG-mo becomes DG).

If acronym is a list, every element in the list will be sanitized and a list of unique acronyms will be returned. Element order will not be preserved.

If acronym is None, return None. If None occurs in a list of sturture acronyms, it will be omitted

Note: if acronym is NaN, it will get converted to None; any other float will provoke an error.