HedTagSummary

class HedTagSummary(sum_op)[source]

Methods

hed.tools.remodeling.operations.summarize_hed_tags_op.HedTagSummary.__init__(sum_op)

hed.tools.remodeling.operations.summarize_hed_tags_op.HedTagSummary.dump_summary(...)

hed.tools.remodeling.operations.summarize_hed_tags_op.HedTagSummary.get_details_dict(...)

Return the summary-specific information in a dictionary.

hed.tools.remodeling.operations.summarize_hed_tags_op.HedTagSummary.get_individual(...)

hed.tools.remodeling.operations.summarize_hed_tags_op.HedTagSummary.get_summary([...])

Return a summary dictionary with the information.

hed.tools.remodeling.operations.summarize_hed_tags_op.HedTagSummary.get_summary_details([...])

Return a dictionary with the details for individual files and the overall dataset.

hed.tools.remodeling.operations.summarize_hed_tags_op.HedTagSummary.get_text_summary([...])

hed.tools.remodeling.operations.summarize_hed_tags_op.HedTagSummary.get_text_summary_details([...])

hed.tools.remodeling.operations.summarize_hed_tags_op.HedTagSummary.merge_all_info()

Create a HedTagCounts containing the overall dataset HED tag summary.

hed.tools.remodeling.operations.summarize_hed_tags_op.HedTagSummary.save(...)

hed.tools.remodeling.operations.summarize_hed_tags_op.HedTagSummary.update_summary(...)

Update the summary for a given tabular input file.

Attributes

hed.tools.remodeling.operations.summarize_hed_tags_op.HedTagSummary.DISPLAY_INDENT

hed.tools.remodeling.operations.summarize_hed_tags_op.HedTagSummary.INDIVIDUAL_SUMMARIES_PATH

HedTagSummary.__init__(sum_op)[source]
static HedTagSummary.dump_summary(filename, summary)
HedTagSummary.get_details_dict(tag_counts)[source]

Return the summary-specific information in a dictionary.

Parameters:

tag_counts (HedTagCounts) – Contains the counts of tags in the dataset.

Returns:

dictionary with the summary results.

Return type:

dict

HedTagSummary.get_individual(summary_details, separately=True)
HedTagSummary.get_summary(individual_summaries='separate')

Return a summary dictionary with the information.

Parameters:

individual_summaries (str) – “separate”, “consolidated”, or “none”

Returns:

dict - dictionary with “Dataset” and “Individual files” keys.

Notes: The individual_summaries value is processed as follows
  • “separate” individual summaries are to be in separate files

  • “consolidated” means that the individual summaries are in same file as overall summary

  • “none” means that only the overall summary is produced.

HedTagSummary.get_summary_details(include_individual=True)

Return a dictionary with the details for individual files and the overall dataset.

Parameters:

include_individual (bool) – If True, summaries for individual files are included.

Returns:

dict - a dictionary with ‘Dataset’ and ‘Individual files’ keys.

Notes

  • The ‘Dataset’ value is either a string or a dictionary with the overall summary.

  • The ‘Individual files’ value is dictionary whose keys are file names and values are

    their corresponding summaries.

Users are expected to provide merge_all_info and get_details_dict to support this.

HedTagSummary.get_text_summary(individual_summaries='separate')
HedTagSummary.get_text_summary_details(include_individual=True)
HedTagSummary.merge_all_info()[source]

Create a HedTagCounts containing the overall dataset HED tag summary.

Returns:

HedTagCounts - the overall dataset summary object for HED tag counts.

HedTagSummary.save(save_dir, file_formats=['.txt'], individual_summaries='separate', task_name='')
HedTagSummary.update_summary(new_info)[source]

Update the summary for a given tabular input file.

Parameters:

new_info (dict) – A dictionary with the parameters needed to update a summary.

Notes

  • The summary needs a “name” str, a “schema”, a “df, and a “Sidecar”.

HedTagSummary.DISPLAY_INDENT = '   '
HedTagSummary.INDIVIDUAL_SUMMARIES_PATH = 'individual_summaries'