-
Notifications
You must be signed in to change notification settings - Fork 55
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ENH/REF: Feature planning: Removing celltype hardcoding #972
Comments
As I've been going through #970 and trying to get it back to passing all tests, I've noticed a minor "bug" so to speak, that
This means that I see two ways to approach this:
Regardless, we should make discriminating between "cell type" spikes and "drive" spikes very clear and easy, including in plotting. Just like with wagdy88's changes, we could force the |
@katduecker @ntolley @jasmainak @rythorpe @dylansdaniels
Let's use this Issue to coordinate the work needed for both de-hardcoding celltypes and allowing a user to provide their own.
Growing list of things that a custom celltype is required to provide:
Network.cell_types
, which is a dictionary wherecell.py::Cell
object describing the celltypeCell
object is what it sounds like, and where you have to set sections, biophysics, etc.Network.pos_dict
(position dictionary, which is normally set duringNetwork.__init__()
)Network._inplane_distance
andNetwork._layer_separation
, either providing their own or using our hardcoded valuesRelated tasks:
CellResponse
andNetwork
: who owns the cell type info, and how is the info communicated?Network
should own all celltype information (including per-celltype coloring for plots), andCellResponse
should be able to access the celltype info of its "parent"Network
. Reasons include:Network
already requires havingcell_types
attributesCellResponse
belongs as an attribute to a specificNetwork
(see https://github.com/jonescompneurolab/hnn-core/blob/master/hnn_core/parallel_backends.py#L46 ), except for the deprecatedcell_response.py::read_spikes()
.CellResponse
-requiring plotting functions to have access to theNetwork
object, which it use to determine canonical colors for both celltypes and drives, AND understand which ofCellResponse
'sspike_types
are celltypes as opposed to drives.CellResponse.cell_types
(see first comment, ENH/REF: Feature planning: Removing celltype hardcoding #972 (comment) )DeprecationWarning
before it is removed.viz.py::plot_spikes_hist()
,viz.py::plot_spikes_raster()
, andviz.py::plot_cells()
. In these cases, it may make the most sense to have some kind ofcolors
dictionary attribute inNetwork
for every unique spike type in its resultingCellResponse
children.Cell.name
attributes andNetwork
/etc. level cell type names. Also, provide a way to editCell.name
.Note that this Issue is limited to the API only; we have no plans to support generalized celltypes in the GUI.
Please ignore what I said about using a "feature-branch" in #970 or in-person. Let's just do things the standard way, with multiple smaller PRs into
master
branch.Note that the first comment in this Issue will be frequently re-edited to keep track of what needs to be done. Feel free to edit it yourself if you think of related tasks we need to include.
The text was updated successfully, but these errors were encountered: