SummarizeHedTypeOp¶
- class SummarizeHedTypeOp(parameters)[source]
Summarize a HED type tag in a collection of tabular files.
- Required remodeling parameters:
summary_name (str): The name of the summary.
summary_filename (str): Base filename of the summary.
type_tag (str):Type tag to get_summary (e.g. condition-variable or task tags).
- Optional remodeling parameters:
append_timecode (bool): If true, the timecode is appended to the base filename when summary is saved.
The purpose of this op is to produce a summary of the occurrences of specified tag. This summary is often used with condition-variable to produce a summary of the experimental design.
Methods
|
Constructor for the summarize HED type operation. |
|
Summarize a specified HED type variable such as Condition-variable. |
Additional validation required of operation parameters not performed by JSON schema validator. |
Attributes
- SummarizeHedTypeOp.__init__(parameters)[source]¶
Constructor for the summarize HED type operation.
- Parameters:
parameters (dict) – Dictionary with the parameter values for required and optional parameters.
- SummarizeHedTypeOp.do_op(dispatcher, df, name, sidecar=None)[source]¶
Summarize a specified HED type variable such as Condition-variable.
- Parameters:
dispatcher (Dispatcher) – Manages the operation I/O.
df (DataFrame) – The DataFrame to be summarized.
name (str) – Unique identifier for the dataframe – often the original file path.
sidecar (Sidecar or file-like) – Usually required unless event file has a HED column.
- Returns:
A copy of df
- Return type:
DataFrame
- Side effect:
Updates the relevant summary.
- static SummarizeHedTypeOp.validate_input_data(parameters)[source]¶
Additional validation required of operation parameters not performed by JSON schema validator.
- SummarizeHedTypeOp.NAME = 'summarize_hed_type'¶
- SummarizeHedTypeOp.PARAMS = {'additionalProperties': False, 'properties': {'append_timecode': {'description': 'If true, the timecode is appended to the base filename so each run has a unique name.', 'type': 'boolean'}, 'summary_filename': {'description': 'Name to use for the summary file name base.', 'type': 'string'}, 'summary_name': {'description': 'Name to use for the summary in titles.', 'type': 'string'}, 'type_tag': {'description': 'Type tag (such as Condition-variable or Task to design summaries for..', 'type': 'string'}}, 'required': ['summary_name', 'summary_filename', 'type_tag'], 'type': 'object'}¶
- SummarizeHedTypeOp.SUMMARY_TYPE = 'hed_type_summary'¶