morphology_workflows.marker_helper

Module to read/write/plot morphology markers.

Module Contents

Classes

MarkerSet

Container of several markers for a single morphology.

Marker

Container of a single marker.

morphology_workflows.marker_helper.logger
class morphology_workflows.marker_helper.MarkerSet

Container of several markers for a single morphology.

classmethod from_markers(cls, markers)

Load from a list of Marker object.

static check_labels(markers)

Ensure label names are different.

classmethod from_file(cls, marker_path)

Load maker yaml file.

classmethod from_dicts(cls, markers)

Load marker from dict, where markers[“markers”] is a list of dict markers.

plot(self, filename='markers.html', with_plotly=True, plane='3d', **kwargs)

Plot morphology with markers.

to_dicts(self)

Create a list of dicts from marker class.

save(self, filename=None, mode='a')

Save marker data.

Parameters
  • filename (str) – if provided, path to marker file

  • mode (str) – writing mode, ‘a’ or ‘w’

TODO: if data is large, write in an h5/pickle for speedup

class morphology_workflows.marker_helper.Marker(label, marker_type, data, morph_name=None, morph_path=None, plot_style=None, extra_data=None)

Container of a single marker.

property list_data(self)

Returns data without numpy types.

to_dict(self)

Create a dict from marker class.