Skip to content

Commit

Permalink
Merge branch 'atlas_imports' into task_fix
Browse files Browse the repository at this point in the history
  • Loading branch information
mayofaulkner committed Sep 25, 2023
2 parents 634ff9f + e47b8ea commit 08d111b
Show file tree
Hide file tree
Showing 61 changed files with 151 additions and 6,955 deletions.
6 changes: 0 additions & 6 deletions MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1,9 +1,3 @@
include ibllib/atlas/allen_structure_tree.csv
include ibllib/atlas/franklin_paxinos_structure_tree.csv
include ibllib/atlas/beryl.npy
include ibllib/atlas/cosmos.npy
include ibllib/atlas/swanson.npy
include ibllib/atlas/mappings.pqt
include ibllib/io/extractors/extractor_types.json
include ibllib/io/extractors/task_extractor_map.json
include brainbox/tests/wheel_test.p
Expand Down
2 changes: 1 addition & 1 deletion brainbox/atlas.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
import numpy as np
import seaborn as sns
import matplotlib.pyplot as plt
from ibllib import atlas
from iblatlas import atlas


def _label2values(imlabel, fill_values, ba):
Expand Down
2 changes: 1 addition & 1 deletion brainbox/ephys_plots.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
plot_image, plot_probe, plot_scatter, arrange_channels2banks)
from brainbox.processing import compute_cluster_average
from iblutil.numerical import bincount2D
from ibllib.atlas.regions import BrainRegions
from iblatlas.regions import BrainRegions


def image_lfp_spectrum_plot(lfp_power, lfp_freq, chn_coords=None, chn_inds=None, freq_range=(0, 300),
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
from one.api import ONE

from ibllib.atlas import atlas
from iblatlas import atlas
from brainbox.io.one import load_channels_from_insertion

pid = "8413c5c6-b42b-4ec6-b751-881a54413628"
Expand Down
2 changes: 1 addition & 1 deletion brainbox/examples/docs_load_spike_sorting.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
"""

from one.api import ONE
from ibllib.atlas import AllenAtlas
from iblatlas.atlas import AllenAtlas
from brainbox.io.one import SpikeSortingLoader


Expand Down
2 changes: 1 addition & 1 deletion brainbox/examples/plot_atlas_color_values.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import numpy as np
import matplotlib.pyplot as plt
from ibllib import atlas
from iblatlas import atlas
from brainbox.atlas import plot_atlas


Expand Down
13 changes: 7 additions & 6 deletions brainbox/io/one.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@

from iblutil.util import Bunch
from ibllib.io.extractors.training_wheel import extract_wheel_moves, extract_first_movement_times
from ibllib.atlas import atlas, AllenAtlas, BrainRegions
from iblatlas.atlas import AllenAtlas, BrainRegions
from iblatlas import atlas
from ibllib.pipes import histology
from ibllib.pipes.ephys_alignment import EphysAlignment
from ibllib.plots import vertical_lines
Expand Down Expand Up @@ -243,7 +244,7 @@ def channel_locations_interpolation(channels_aligned, channels=None, brain_regio
'x', 'y', 'z', 'acronym', 'axial_um'
those are the guide for the interpolation
:param channels: Bunch or dictionary of aligned channels containing at least keys 'localCoordinates'
:param brain_regions: None (default) or ibllib.atlas.BrainRegions object
:param brain_regions: None (default) or iblatlas.regions.BrainRegions object
if None will return a dict with keys 'localCoordinates', 'mlapdv', 'brainLocationIds_ccf_2017
if a brain region object is provided, outputts a dict with keys
'x', 'y', 'z', 'acronym', 'atlas_id', 'axial_um', 'lateral_um'
Expand Down Expand Up @@ -372,7 +373,7 @@ def load_channel_locations(eid, probe=None, one=None, aligned=False, brain_atlas
An instance of ONE (shouldn't be in 'local' mode)
aligned : bool
Whether to get the latest user aligned channel when not resolved or use histology track
brain_atlas : ibllib.atlas.BrainAtlas
brain_atlas : iblatlas.BrainAtlas
Brain atlas object (default: Allen atlas)
Returns
-------
Expand Down Expand Up @@ -417,7 +418,7 @@ def load_spike_sorting_fast(eid, one=None, probe=None, dataset_types=None, spike
:param dataset_types: additional spikes/clusters objects to add to the standard default list
:param spike_sorter: name of the spike sorting you want to load (None for default)
:param collection: name of the spike sorting collection to load - exclusive with spike sorter name ex: "alf/probe00"
:param brain_regions: ibllib.atlas.regions.BrainRegions object - will label acronyms if provided
:param brain_regions: iblatlas.regions.BrainRegions object - will label acronyms if provided
:param nested: if a single probe is required, do not output a dictionary with the probe name as key
:param return_collection: (False) if True, will return the collection used to load
:return: spikes, clusters, channels (dict of bunch, 1 bunch per probe)
Expand Down Expand Up @@ -458,7 +459,7 @@ def load_spike_sorting(eid, one=None, probe=None, dataset_types=None, spike_sort
:param probe: name of probe to load in, if not given all probes for session will be loaded
:param dataset_types: additional spikes/clusters objects to add to the standard default list
:param spike_sorter: name of the spike sorting you want to load (None for default)
:param brain_regions: ibllib.atlas.regions.BrainRegions object - will label acronyms if provided
:param brain_regions: iblatlas.regions.BrainRegions object - will label acronyms if provided
:param return_collection:(bool - False) if True, returns the collection for loading the data
:return: spikes, clusters (dict of bunch, 1 bunch per probe)
"""
Expand Down Expand Up @@ -497,7 +498,7 @@ def load_spike_sorting_with_channel(eid, one=None, probe=None, aligned=False, da
spike_sorter : str
Name of the spike sorting you want to load (None for default which is pykilosort if it's
available otherwise the default MATLAB kilosort)
brain_atlas : ibllib.atlas.BrainAtlas
brain_atlas : iblatlas.atlas.BrainAtlas
Brain atlas object (default: Allen atlas)
return_collection: bool
Returns an extra argument with the collection chosen
Expand Down
Loading

0 comments on commit 08d111b

Please sign in to comment.