HedTagCounts

class HedTagCounts(name, total_events=0)[source]

Counts of HED tags for a tabular file.

Parameters:
  • name (str) – An identifier for these counts (usually the filename of the tabular file)

  • total_events (int) – The total number of events in the tabular file.

Methods

hed.tools.analysis.hed_tag_counts.HedTagCounts.__init__(name)

hed.tools.analysis.hed_tag_counts.HedTagCounts.create_template(tags)

hed.tools.analysis.hed_tag_counts.HedTagCounts.get_summary()

hed.tools.analysis.hed_tag_counts.HedTagCounts.merge_tag_dicts(...)

hed.tools.analysis.hed_tag_counts.HedTagCounts.organize_tags(...)

Organize tags into categories as specified by the tag_template.

hed.tools.analysis.hed_tag_counts.HedTagCounts.update_event_counts(...)

Update the tag counts based on a hed string object.

Attributes

HedTagCounts.__init__(name, total_events=0)[source]
static HedTagCounts.create_template(tags)[source]
HedTagCounts.get_summary()[source]
HedTagCounts.merge_tag_dicts(other_dict)[source]
HedTagCounts.organize_tags(tag_template)[source]

Organize tags into categories as specified by the tag_template.

Parameters:

tag_template (dict) – A dictionary whose keys are titles and values are lists of HED tags (str).

Returns:

dict - keys are tags (strings) and values are list of HedTagCount for items fitting template. list - of HedTagCount objects corresponding to tags that don’t fit the template.

HedTagCounts.update_event_counts(hed_string_obj, file_name)[source]

Update the tag counts based on a hed string object.

Parameters:
  • hed_string_obj (HedString) – The HED string whose tags should be counted.

  • file_name (str) – The name of the file corresponding to these counts.