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.

Attributes

logger

morphology_workflows.marker_helper.logger
exception morphology_workflows.marker_helper.MarkerHelperError

Bases: morphology_workflows.MorphologyWorkflowsError

Exception for Marker helpers.

class morphology_workflows.marker_helper.MarkerSet

Container of several markers for a single morphology.

classmethod from_markers(markers)

Load from a list of Marker object.

static check_labels(markers)

Ensure label names are different.

classmethod from_file(marker_path)

Load maker yaml file.

classmethod from_dicts(markers)

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

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

Plot morphology with markers.

to_dicts()

Create a list of dicts from marker class.

save(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

Returns data without numpy types.

to_dict()

Create a dict from marker class.