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).
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. |
|
Verify that the parameters meet the operation specification. |
|
Summarize a specified HED type variable such as Condition-variable . |
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.
- Raises:
KeyError –
If a required parameter is missing.
If an unexpected parameter is provided.
TypeError –
If a parameter has the wrong type.
- SummarizeHedTypeOp.check_parameters(parameters)¶
Verify that the parameters meet the operation specification.
- Parameters:
parameters (dict) – Dictionary of parameters for this operation.
- Raises:
KeyError –
If a required parameter is missing.
If an unexpected parameter is provided.
TypeError –
If a parameter has the wrong type.
- 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.
- SummarizeHedTypeOp.PARAMS = {'operation': 'summarize_hed_type', 'optional_parameters': {'append_timecode': <class 'bool'>}, 'required_parameters': {'summary_filename': <class 'str'>, 'summary_name': <class 'str'>, 'type_tag': <class 'str'>}}¶
- SummarizeHedTypeOp.SUMMARY_TYPE = 'hed_type_summary'¶