diff --git a/.github/dependabot.yml b/.github/dependabot.yml index 2234e7061..8f7ecd13c 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -16,4 +16,3 @@ updates: interval: "daily" target-branch: "develop" directory: / - automerge: true \ No newline at end of file diff --git a/.github/workflows/spec_tests.yaml b/.github/workflows/spec_tests.yaml index e41edd61f..b4e9dbf37 100644 --- a/.github/workflows/spec_tests.yaml +++ b/.github/workflows/spec_tests.yaml @@ -33,8 +33,7 @@ jobs: - name: Test with unittest run: | - python -m unittest spec_tests/* > test_results.txt - continue-on-error: true + python -m unittest spec_tests/test_errors.py > test_results.txt - name: Upload spec test results uses: actions/upload-artifact@v3 diff --git a/README.md b/README.md index 16fac1748..90473203e 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,7 @@ +[![Maintainability](https://api.codeclimate.com/v1/badges/11bf2329590e7b0164ba/maintainability)](https://codeclimate.com/github/hed-standard/hed-python/maintainability) +[![Test Coverage](https://api.codeclimate.com/v1/badges/11bf2329590e7b0164ba/test_coverage)](https://codeclimate.com/github/hed-standard/hed-python/test_coverage) +![PyPI - Status](https://img.shields.io/pypi/v/hedtools) + # HEDTools - Python HED (Hierarchical Event Descriptors) is a framework for systematically describing both laboratory and real-world events as well as other experimental metadata. @@ -95,7 +99,7 @@ Use `hed.schema.set_cache_directory` to change the location. The HED cache can be shared across processes. Starting with `hedtools 0.2.0` local copies of the most recent schema versions -are stored within the code modules for easy access. +are stored within the code modules for easy access. ### Other links of interest diff --git a/docs/requirements.txt b/docs/requirements.txt index 9ecb73f32..94b716c1a 100644 --- a/docs/requirements.txt +++ b/docs/requirements.txt @@ -1,12 +1,10 @@ defusedxml>=0.7.1 -inflect>=5.5.1 +inflect>=6.0.2 myst-parser>=0.18.1 -openpyxl>=3.0.9 +numpy>=1.21.6 +openpyxl>=3.1.0 pandas>=1.3.5 -portalocker>=2.4.0 -semantic_version>=2.9.0 +portalocker>=2.7.0 +semantic_version>=2.10.0 Sphinx>=5.2.2 sphinx_rtd_theme>=1.0.0 - -# This is just needed for secure_filename and should probably be removed -Werkzeug>=2.1.2 diff --git a/hed/errors/__init__.py b/hed/errors/__init__.py index a094256df..8bbe1f662 100644 --- a/hed/errors/__init__.py +++ b/hed/errors/__init__.py @@ -1,4 +1,5 @@ from .error_reporter import ErrorHandler, get_printable_issue_string, sort_issues -from .error_types import DefinitionErrors, OnsetErrors, SchemaErrors, SchemaWarnings, SidecarErrors, ValidationErrors +from .error_types import DefinitionErrors, OnsetErrors, SchemaErrors, SchemaWarnings, SidecarErrors, \ + ValidationErrors, ColumnErrors from .error_types import ErrorContext, ErrorSeverity from .exceptions import HedExceptions, HedFileError diff --git a/hed/errors/error_messages.py b/hed/errors/error_messages.py index 36d1b446f..c6f4250e4 100644 --- a/hed/errors/error_messages.py +++ b/hed/errors/error_messages.py @@ -9,24 +9,24 @@ SidecarErrors, SchemaWarnings, ErrorSeverity, DefinitionErrors, OnsetErrors, ColumnErrors -@hed_tag_error(ValidationErrors.HED_UNITS_INVALID) +@hed_tag_error(ValidationErrors.UNITS_INVALID) def val_error_invalid_unit(tag, units): units_string = ','.join(sorted(units)) return f'Invalid unit - "{tag}" valid units are "{units_string}"' -@hed_error(ValidationErrors.HED_TAG_EMPTY) +@hed_error(ValidationErrors.TAG_EMPTY) def val_error_extra_comma(source_string, char_index): character = source_string[char_index] return f"HED tags cannot be empty. Extra delimiter found: '{character}' at index {char_index}'" -@hed_tag_error(ValidationErrors.HED_GROUP_EMPTY, actual_code=ValidationErrors.HED_TAG_EMPTY) +@hed_tag_error(ValidationErrors.HED_GROUP_EMPTY, actual_code=ValidationErrors.TAG_EMPTY) def val_error_empty_group(tag): return f"HED tags cannot be empty. Extra delimiters found: '{tag}'" -@hed_tag_error(ValidationErrors.HED_TAG_EXTENDED, has_sub_tag=True, default_severity=ErrorSeverity.WARNING) +@hed_tag_error(ValidationErrors.TAG_EXTENDED, has_sub_tag=True, default_severity=ErrorSeverity.WARNING) def val_error_tag_extended(tag, problem_tag): return f"Hed tag is extended. '{problem_tag}' in {tag}" @@ -43,7 +43,7 @@ def val_error_invalid_tag_character(tag, problem_tag): return f"Invalid character '{problem_tag}' in {tag}" -@hed_error(ValidationErrors.HED_TILDES_UNSUPPORTED) +@hed_error(ValidationErrors.TILDES_UNSUPPORTED) def val_error_tildes_not_supported(source_string, char_index): character = source_string[char_index] return f"Tildes not supported. Replace (a ~ b ~ c) with (a, (b, c)). '{character}' at index {char_index}'" @@ -54,29 +54,29 @@ def val_error_comma_missing(tag): return f"Comma missing after - '{tag}'" -@hed_tag_error(ValidationErrors.HED_TAG_REPEATED) +@hed_tag_error(ValidationErrors.HED_TAG_REPEATED, actual_code=ValidationErrors.TAG_EXPRESSION_REPEATED) def val_error_duplicate_tag(tag): return f'Repeated tag - "{tag}"' -@hed_error(ValidationErrors.HED_TAG_REPEATED_GROUP) +@hed_error(ValidationErrors.HED_TAG_REPEATED_GROUP, actual_code=ValidationErrors.TAG_EXPRESSION_REPEATED) def val_error_duplicate_group(group): return f'Repeated group - "{group}"' -@hed_error(ValidationErrors.HED_PARENTHESES_MISMATCH) +@hed_error(ValidationErrors.PARENTHESES_MISMATCH) def val_error_parentheses(opening_parentheses_count, closing_parentheses_count): return f'Number of opening and closing parentheses are unequal. '\ f'{opening_parentheses_count} opening parentheses. {closing_parentheses_count} '\ 'closing parentheses' -@hed_tag_error(ValidationErrors.HED_TAG_REQUIRES_CHILD) +@hed_tag_error(ValidationErrors.TAG_REQUIRES_CHILD) def val_error_require_child(tag): return f"Descendant tag required - '{tag}'" -@hed_error(ValidationErrors.HED_TAG_NOT_UNIQUE) +@hed_error(ValidationErrors.TAG_NOT_UNIQUE) def val_error_multiple_unique(tag_prefix): return f"Multiple unique tags with prefix - '{tag_prefix}'" @@ -86,30 +86,29 @@ def val_error_prefix_invalid(tag, tag_prefix): return f"Prefixes can only contain alpha characters. - '{tag_prefix}'" -@hed_tag_error(ValidationErrors.INVALID_EXTENSION, actual_code=ValidationErrors.HED_TAG_INVALID) +@hed_tag_error(ValidationErrors.TAG_EXTENSION_INVALID) def val_error_invalid_extension(tag): return f'Invalid extension on tag - "{tag}"' -@hed_tag_error(ValidationErrors.INVALID_PARENT_NODE, has_sub_tag=True, actual_code=ValidationErrors.HED_TAG_INVALID) +@hed_tag_error(ValidationErrors.INVALID_PARENT_NODE, has_sub_tag=True, actual_code=ValidationErrors.TAG_EXTENSION_INVALID) def val_error_invalid_parent(tag, problem_tag, expected_parent_tag): - return f"In '{tag}', '{problem_tag}' appears as '{str(expected_parent_tag)}' and cannot be used " \ - f"as an extension." + return f"In '{tag}', '{problem_tag}' appears as '{str(expected_parent_tag)}' and cannot be used as an extension." -@hed_tag_error(ValidationErrors.NO_VALID_TAG_FOUND, has_sub_tag=True, actual_code=ValidationErrors.HED_TAG_INVALID) +@hed_tag_error(ValidationErrors.NO_VALID_TAG_FOUND, has_sub_tag=True, actual_code=ValidationErrors.TAG_INVALID) def val_error_no_valid_tag(tag, problem_tag): return f"'{problem_tag}' in {tag} is not a valid base hed tag." -@hed_tag_error(ValidationErrors.HED_VALUE_INVALID) +@hed_tag_error(ValidationErrors.VALUE_INVALID) def val_error_no_value(tag): - return f"''{tag}' has an invalid value portion." + return f"'{tag}' has an invalid value portion." @hed_error(ValidationErrors.HED_MISSING_REQUIRED_COLUMN, default_severity=ErrorSeverity.WARNING) -def val_error_missing_column(column_name): - return f"Required column '{column_name}' not specified or found in file." +def val_error_missing_column(column_name, column_type): + return f"Required {column_type} column '{column_name}' not specified or found in file." @hed_error(ValidationErrors.HED_UNKNOWN_COLUMN, default_severity=ErrorSeverity.WARNING) @@ -118,27 +117,46 @@ def val_error_extra_column(column_name): "or identified in sidecars." +@hed_error(ValidationErrors.SIDECAR_AND_OTHER_COLUMNS) +def val_error_sidecar_with_column(column_names): + return f"You cannot use a sidecar and tag or prefix columns at the same time. " \ + f"Found {column_names}." + + +@hed_error(ValidationErrors.DUPLICATE_COLUMN_IN_LIST) +def val_error_duplicate_clumn(column_number, column_name, list_name): + if column_name: + return f"Found column '{column_name}' at index {column_number} twice in {list_name}." + else: + return f"Found column number {column_number} twice in {list_name}. This isn't a major concern, but does indicate a mistake." + + +@hed_error(ValidationErrors.DUPLICATE_COLUMN_BETWEEN_SOURCES) +def val_error_duplicate_clumn(column_number, column_name, list_names): + if column_name: + return f"Found column '{column_name}' at index {column_number} in the following inputs: {list_names}. " \ + f"Each entry must be unique." + else: + return f"Found column number {column_number} in the following inputs: {list_names}. " \ + f"Each entry must be unique." + + @hed_error(ValidationErrors.HED_BLANK_COLUMN, default_severity=ErrorSeverity.WARNING) def val_error_hed_blank_column(column_number): return f"Column number {column_number} has no column name" -@hed_error(ValidationErrors.HED_DUPLICATE_COLUMN, default_severity=ErrorSeverity.WARNING) -def val_error_hed_duplicate_column(column_name): - return f"Multiple columns have name {column_name}. This is not a fatal error, but discouraged." - - -@hed_tag_error(ValidationErrors.HED_LIBRARY_UNMATCHED) +@hed_tag_error(ValidationErrors.HED_LIBRARY_UNMATCHED, actual_code=ValidationErrors.TAG_PREFIX_INVALID) def val_error_unknown_prefix(tag, unknown_prefix, known_prefixes): return f"Tag '{tag} has unknown prefix '{unknown_prefix}'. Valid prefixes: {known_prefixes}" -@hed_tag_error(ValidationErrors.HED_NODE_NAME_EMPTY, has_sub_tag=True) +@hed_tag_error(ValidationErrors.NODE_NAME_EMPTY, has_sub_tag=True) def val_error_extra_slashes_spaces(tag, problem_tag): return f"Extra slashes or spaces '{problem_tag}' in tag '{tag}'" -@hed_error(ValidationErrors.HED_SIDECAR_KEY_MISSING, default_severity=ErrorSeverity.WARNING) +@hed_error(ValidationErrors.SIDECAR_KEY_MISSING, default_severity=ErrorSeverity.WARNING) def val_error_sidecar_key_missing(invalid_key, category_keys): return f"Category key '{invalid_key}' does not exist in column. Valid keys are: {category_keys}" @@ -181,34 +199,34 @@ def val_error_def_expand_value_extra(tag): return f"A Def-expand tag does not take a placeholder value, but was given one. Definition: '{tag}" -@hed_tag_error(ValidationErrors.HED_TOP_LEVEL_TAG, actual_code=ValidationErrors.HED_TAG_GROUP_ERROR) +@hed_tag_error(ValidationErrors.HED_TOP_LEVEL_TAG, actual_code=ValidationErrors.TAG_GROUP_ERROR) def val_error_top_level_tag(tag): return f"A tag that must be in a top level group was found in another location. {str(tag)}" -@hed_tag_error(ValidationErrors.HED_TAG_GROUP_TAG, actual_code=ValidationErrors.HED_TAG_GROUP_ERROR) +@hed_tag_error(ValidationErrors.HED_TAG_GROUP_TAG, actual_code=ValidationErrors.TAG_GROUP_ERROR) def val_error_tag_group_tag(tag): return f"A tag that must be in a group was found in another location. {str(tag)}" -@hed_tag_error(ValidationErrors.HED_MULTIPLE_TOP_TAGS, actual_code=ValidationErrors.HED_TAG_GROUP_ERROR) +@hed_tag_error(ValidationErrors.HED_MULTIPLE_TOP_TAGS, actual_code=ValidationErrors.TAG_GROUP_ERROR) def val_error_top_level_tags(tag, multiple_tags): tags_as_string = [str(tag) for tag in multiple_tags] return f"Multiple top level tags found in a single group. First one found: {str(tag)}. " + \ f"Remainder:{str(tags_as_string)}" -@hed_error(ValidationErrors.HED_REQUIRED_TAG_MISSING) +@hed_error(ValidationErrors.REQUIRED_TAG_MISSING) def val_warning_required_prefix_missing(tag_prefix): return f"Tag with prefix '{tag_prefix}' is required" -@hed_tag_error(ValidationErrors.HED_STYLE_WARNING, default_severity=ErrorSeverity.WARNING) +@hed_tag_error(ValidationErrors.STYLE_WARNING, default_severity=ErrorSeverity.WARNING) def val_warning_capitalization(tag): return f"First word not capitalized or camel case - '{tag}'" -@hed_tag_error(ValidationErrors.HED_UNITS_DEFAULT_USED, default_severity=ErrorSeverity.WARNING) +@hed_tag_error(ValidationErrors.UNITS_MISSING, default_severity=ErrorSeverity.WARNING) def val_warning_default_units_used(tag, default_unit): return f"No unit specified. Using '{default_unit}' as the default - '{tag}'" @@ -220,6 +238,13 @@ def schema_error_hed_duplicate_node(tag, duplicate_tag_list, section): f"{tag_join_delimiter}{tag_join_delimiter.join(duplicate_tag_list)}" +@hed_error(SchemaErrors.HED_SCHEMA_DUPLICATE_FROM_LIBRARY) +def schema_error_hed_duplicate_node(tag, duplicate_tag_list, section): + tag_join_delimiter = "\n\t" + return f"Duplicate term '{str(tag)}' was found in the library and in the standard schema in '{section}' section schema as:" + \ + f"{tag_join_delimiter}{tag_join_delimiter.join(duplicate_tag_list)}" + + @hed_error(SchemaErrors.HED_SCHEMA_ATTRIBUTE_INVALID) def schema_error_unknown_attribute(attribute_name, source_tag): return f"Attribute '{attribute_name}' used by '{source_tag}' was not defined in the schema, " \ @@ -250,6 +275,13 @@ def schema_warning_non_placeholder_class(tag_name, invalid_attribute_name): f"Found {invalid_attribute_name} on {tag_name}" +@hed_error(SchemaWarnings.INVALID_ATTRIBUTE, default_severity=ErrorSeverity.ERROR) +def schema_error_invalid_attribute(tag_name, invalid_attribute_name): + return f"'{invalid_attribute_name}' should not be present in a loaded schema, found on '{tag_name}'." \ + f"Something went very wrong." + + + @hed_error(SidecarErrors.BLANK_HED_STRING) def sidecar_error_blank_hed_string(): return "No HED string found for Value or Category column." @@ -260,12 +292,12 @@ def sidecar_error_hed_data_type(expected_type, given_type): return f"Invalid HED string datatype sidecar. Should be '{expected_type}', but got '{given_type}'" -@hed_error(SidecarErrors.INVALID_POUND_SIGNS_VALUE, actual_code=ValidationErrors.HED_PLACEHOLDER_INVALID) +@hed_error(SidecarErrors.INVALID_POUND_SIGNS_VALUE, actual_code=ValidationErrors.PLACEHOLDER_INVALID) def sidecar_error_invalid_pound_sign_count(pound_sign_count): return f"There should be exactly one # character in a sidecar string. Found {pound_sign_count}" -@hed_error(SidecarErrors.INVALID_POUND_SIGNS_CATEGORY, actual_code=ValidationErrors.HED_PLACEHOLDER_INVALID) +@hed_error(SidecarErrors.INVALID_POUND_SIGNS_CATEGORY, actual_code=ValidationErrors.PLACEHOLDER_INVALID) def sidecar_error_too_many_pound_signs(pound_sign_count): return f"There should be no # characters in a category sidecar string. Found {pound_sign_count}" @@ -276,17 +308,17 @@ def sidecar_error_unknown_column(column_name): "Most likely the column definition in question needs a # sign to replace a number somewhere." -@hed_error(SidecarErrors.SIDECAR_HED_USED, actual_code=SidecarErrors.SIDECAR_INVALID) +@hed_error(SidecarErrors.SIDECAR_HED_USED, actual_code=ValidationErrors.SIDECAR_INVALID) def SIDECAR_HED_USED(): return "'HED' is a reserved name and cannot be used as a sidecar except in expected places." -@hed_error(SidecarErrors.SIDECAR_HED_USED_COLUMN, actual_code=SidecarErrors.SIDECAR_INVALID) +@hed_error(SidecarErrors.SIDECAR_HED_USED_COLUMN, actual_code=ValidationErrors.SIDECAR_INVALID) def SIDECAR_HED_USED_COLUMN(): return "'HED' is a reserved name and cannot be used as a sidecar column name" -@hed_error(SidecarErrors.SIDECAR_NA_USED, actual_code=SidecarErrors.SIDECAR_INVALID) +@hed_error(SidecarErrors.SIDECAR_NA_USED, actual_code=ValidationErrors.SIDECAR_INVALID) def sidecar_na_used(column_name): return f"Invalid category key 'n/a' found in column {column_name}." @@ -294,19 +326,31 @@ def sidecar_na_used(column_name): @hed_tag_error(DefinitionErrors.DEF_TAG_IN_DEFINITION, actual_code=ValidationErrors.DEFINITION_INVALID) def def_error_def_tag_in_definition(tag, def_name): return f"Invalid tag {tag} found in definition for {def_name}. " +\ - f"Def and Def-expand tags cannot be in definitions." + f"Def, Def-expand, and Definition tags cannot be in definitions." + +@hed_error(DefinitionErrors.NO_DEFINITION_CONTENTS, actual_code=ValidationErrors.DEFINITION_INVALID) +def def_error_no_group_tags(def_name): + return f"No group tag found in definition for {def_name}." -@hed_error(DefinitionErrors.WRONG_NUMBER_GROUP_TAGS, actual_code=ValidationErrors.DEFINITION_INVALID) + +@hed_error(DefinitionErrors.WRONG_NUMBER_GROUPS, actual_code=ValidationErrors.DEFINITION_INVALID) def def_error_wrong_group_tags(def_name, tag_list): tag_list_strings = [str(tag) for tag in tag_list] return f"Too many group tags found in definition for {def_name}. Expected 1, found: {tag_list_strings}" +@hed_error(DefinitionErrors.WRONG_NUMBER_TAGS, actual_code=ValidationErrors.DEFINITION_INVALID) +def def_error_wrong_group_tags(def_name, tag_list): + tag_list_strings = [str(tag) for tag in tag_list] + return f"Too many tags found in definition for {def_name}. Expected 1, found: {tag_list_strings}" + + + @hed_error(DefinitionErrors.WRONG_NUMBER_PLACEHOLDER_TAGS, actual_code=ValidationErrors.DEFINITION_INVALID) def def_error_wrong_placeholder_count(def_name, expected_count, tag_list): tag_list_strings = [str(tag) for tag in tag_list] - return f"Incorrect number placeholder tags found in definition for {def_name}. " + \ + return f"Incorrect number placeholders or placeholder tags found in definition for {def_name}. " + \ f"Expected {expected_count}, found: {tag_list_strings}" @@ -315,74 +359,89 @@ def def_error_duplicate_definition(def_name): return f"Duplicate definition found for '{def_name}'." -@hed_error(DefinitionErrors.TAG_IN_SCHEMA, actual_code=ValidationErrors.DEFINITION_INVALID) -def def_error_tag_already_in_schema(def_name): - return f"Term '{def_name}' already used as term in schema and cannot be re-used as a definition." +@hed_tag_error(DefinitionErrors.INVALID_DEFINITION_EXTENSION, actual_code=ValidationErrors.DEFINITION_INVALID) +def def_error_invalid_def_extension(tag, def_name): + return f"Tag '{str(tag)}' has an invalid placeholder in definition '{def_name}'" + + +@hed_error(DefinitionErrors.PLACEHOLDER_NO_TAKES_VALUE, actual_code=ValidationErrors.DEFINITION_INVALID) +def def_error_no_takes_value(def_name, placeholder_tag): + return f"Definition '{def_name}' has has a placeholder tag {str(placeholder_tag)} that isn't a takes value tag." + +@hed_tag_error(DefinitionErrors.BAD_PROP_IN_DEFINITION, actual_code=ValidationErrors.DEFINITION_INVALID) +def def_error_no_takes_value(tag, def_name): + return f"Tag '{str(tag)}' in Definition '{def_name}' has has a tag with the unique or required attribute." -@hed_error(DefinitionErrors.INVALID_DEFINITION_EXTENSION, actual_code=ValidationErrors.DEFINITION_INVALID) -def def_error_invalid_def_extension(def_name): - return f"Term '{def_name}' has an invalid extension. Definitions can only have one term." +@hed_tag_error(DefinitionErrors.BAD_DEFINITION_LOCATION, actual_code=ValidationErrors.DEFINITION_INVALID) +def def_error_bad_location(tag): + return f"Tag '{str(tag)}' is found in a location it is not allowed to be." -@hed_tag_error(OnsetErrors.ONSET_DEF_UNMATCHED, actual_code=ValidationErrors.HED_ONSET_OFFSET_ERROR) + +@hed_tag_error(OnsetErrors.ONSET_DEF_UNMATCHED, actual_code=ValidationErrors.ONSET_OFFSET_INSET_ERROR) def onset_error_def_unmatched(tag): return f"The def tag in an onset/offset tag is unmatched. Def tag: '{tag}'" -@hed_tag_error(OnsetErrors.OFFSET_BEFORE_ONSET, actual_code=ValidationErrors.HED_ONSET_OFFSET_ERROR) +@hed_tag_error(OnsetErrors.OFFSET_BEFORE_ONSET, actual_code=ValidationErrors.ONSET_OFFSET_INSET_ERROR) def onset_error_offset_before_onset(tag): return f"Offset tag '{tag}' does not have a matching onset." -@hed_tag_error(OnsetErrors.ONSET_NO_DEF_TAG_FOUND, actual_code=ValidationErrors.HED_ONSET_OFFSET_ERROR) +@hed_tag_error(OnsetErrors.INSET_BEFORE_ONSET, actual_code=ValidationErrors.ONSET_OFFSET_INSET_ERROR) +def onset_error_inset_before_onset(tag): + return f"Inset tag '{tag}' does not have a matching onset." + + +@hed_tag_error(OnsetErrors.ONSET_NO_DEF_TAG_FOUND, actual_code=ValidationErrors.ONSET_OFFSET_INSET_ERROR) def onset_no_def_found(tag): return f"'{tag}' tag has no def or def-expand tag in string." -@hed_tag_error(OnsetErrors.ONSET_TOO_MANY_DEFS, actual_code=ValidationErrors.HED_ONSET_OFFSET_ERROR) +@hed_tag_error(OnsetErrors.ONSET_TOO_MANY_DEFS, actual_code=ValidationErrors.ONSET_OFFSET_INSET_ERROR) def onset_too_many_defs(tag, tag_list): tag_list_strings = [str(tag) for tag in tag_list] return f"Too many def tags found in onset for {tag}. Expected 1, also found: {tag_list_strings}" -@hed_tag_error(OnsetErrors.ONSET_WRONG_NUMBER_GROUPS, actual_code=ValidationErrors.HED_ONSET_OFFSET_ERROR) +@hed_tag_error(OnsetErrors.ONSET_WRONG_NUMBER_GROUPS, actual_code=ValidationErrors.ONSET_OFFSET_INSET_ERROR) def onset_too_many_groups(tag, tag_list): tag_list_strings = [str(a_tag) for a_tag in tag_list] return f"An onset tag should have at most 2 sibling nodes, an offset tag should have 1. " +\ f"Found {len(tag_list_strings)}: {tag_list_strings}" -@hed_tag_error(OnsetErrors.ONSET_TAG_OUTSIDE_OF_GROUP, actual_code=ValidationErrors.HED_ONSET_OFFSET_ERROR) +@hed_tag_error(OnsetErrors.ONSET_TAG_OUTSIDE_OF_GROUP, actual_code=ValidationErrors.ONSET_OFFSET_INSET_ERROR) def onset_wrong_type_tag(tag, def_tag): return f"Onset def tag '{def_tag}' has an improper sibling tag '{tag}'. All onset context tags must be " + \ f"in a single group together." -@hed_tag_error(OnsetErrors.ONSET_PLACEHOLDER_WRONG, actual_code=ValidationErrors.HED_ONSET_OFFSET_ERROR) +@hed_tag_error(OnsetErrors.ONSET_PLACEHOLDER_WRONG, actual_code=ValidationErrors.ONSET_OFFSET_INSET_ERROR) def onset_wrong_placeholder(tag, has_placeholder): if has_placeholder: return f"Onset/offset def tag {tag} expects a placeholder value, but does not have one." return f"Onset/offset def tag {tag} should not have a placeholder, but has one." -@hed_error(ColumnErrors.INVALID_COLUMN_REF) -def invalid_column_ref(bad_refs): - return f"Bad column references found(columns do not exist): {bad_refs}" +@hed_error(ColumnErrors.INVALID_COLUMN_REF, actual_code=SidecarErrors.SIDECAR_BRACES_INVALID) +def invalid_column_ref(bad_ref): + return f"The column '{bad_ref}' is unknown.'" -@hed_error(ColumnErrors.SELF_COLUMN_REF) +@hed_error(ColumnErrors.SELF_COLUMN_REF, actual_code=SidecarErrors.SIDECAR_BRACES_INVALID) def self_column_ref(self_ref): return f"Column references itself: {self_ref}" -@hed_error(ColumnErrors.NESTED_COLUMN_REF) +@hed_error(ColumnErrors.NESTED_COLUMN_REF, actual_code=SidecarErrors.SIDECAR_BRACES_INVALID) def nested_column_ref(column_name, ref_column): return f"Column {column_name} has a nested reference to {ref_column}. " \ f"Column reference columns cannot contain other column references." -@hed_error(ColumnErrors.MALFORMED_COLUMN_REF) +@hed_error(ColumnErrors.MALFORMED_COLUMN_REF, actual_code=SidecarErrors.SIDECAR_BRACES_INVALID) def nested_column_ref(column_name, index, symbol): return f"Column {column_name} has a malformed column reference. Improper symbol {symbol} found at index {index}." diff --git a/hed/errors/error_reporter.py b/hed/errors/error_reporter.py index 61381e82a..4f8ba17f1 100644 --- a/hed/errors/error_reporter.py +++ b/hed/errors/error_reporter.py @@ -30,8 +30,7 @@ # ErrorContext which is expected to be int based. int_sort_list = [ - ErrorContext.ROW, - ErrorContext.COLUMN, + ErrorContext.ROW ] hed_string_sort_list = [ @@ -397,10 +396,9 @@ def val_error_unknown(*args, **kwargs): Returns: str: The error message. - dict: The extra args. """ - return f"Unknown error. Args: {str(args)}", kwargs + return f"Unknown error. Args: {str(args), str(kwargs)}" @staticmethod def filter_issues_by_severity(issues_list, severity): diff --git a/hed/errors/error_types.py b/hed/errors/error_types.py index 5da166247..36ef907af 100644 --- a/hed/errors/error_types.py +++ b/hed/errors/error_types.py @@ -27,8 +27,30 @@ class ValidationErrors: DEF_EXPAND_INVALID = "DEF_EXPAND_INVALID" DEF_INVALID = "DEF_INVALID" DEFINITION_INVALID = "DEFINITION_INVALID" - - # NOT OFFICIAL + NODE_NAME_EMPTY = 'NODE_NAME_EMPTY' + ONSET_OFFSET_INSET_ERROR = 'ONSET_OFFSET_INSET_ERROR' + PARENTHESES_MISMATCH = 'PARENTHESES_MISMATCH' + PLACEHOLDER_INVALID = 'PLACEHOLDER_INVALID' + REQUIRED_TAG_MISSING = 'REQUIRED_TAG_MISSING' + SIDECAR_INVALID = 'SIDECAR_INVALID' + SIDECAR_KEY_MISSING = 'SIDECAR_KEY_MISSING' + STYLE_WARNING = "STYLE_WARNING" + TAG_EMPTY = 'TAG_EMPTY' + TAG_EXPRESSION_REPEATED = 'TAG_EXPRESSION_REPEATED' + TAG_EXTENDED = 'TAG_EXTENDED' + TAG_EXTENSION_INVALID = 'TAG_EXTENSION_INVALID' + TAG_GROUP_ERROR = "TAG_GROUP_ERROR" + TAG_INVALID = "TAG_INVALID" + TAG_NOT_UNIQUE = 'TAG_NOT_UNIQUE' + TAG_PREFIX_INVALID = 'TAG_PREFIX_INVALID' + TAG_REQUIRES_CHILD = 'TAG_REQUIRES_CHILD' + TILDES_UNSUPPORTED = 'TILDES_UNSUPPORTED' + UNITS_INVALID = 'UNITS_INVALID' + UNITS_MISSING = 'UNITS_MISSING' + VERSION_DEPRECATED = 'VERSION_DEPRECATED' + VALUE_INVALID = 'VALUE_INVALID' + + # Internal codes HED_DEF_UNMATCHED = "HED_DEF_UNMATCHED" HED_DEF_VALUE_MISSING = "HED_DEF_VALUE_MISSING" HED_DEF_VALUE_EXTRA = "HED_DEF_VALUE_EXTRA" @@ -37,57 +59,41 @@ class ValidationErrors: HED_DEF_EXPAND_UNMATCHED = "HED_DEF_EXPAND_UNMATCHED" HED_DEF_EXPAND_VALUE_MISSING = "HED_DEF_EXPAND_VALUE_MISSING" HED_DEF_EXPAND_VALUE_EXTRA = "HED_DEF_EXPAND_VALUE_EXTRA" - # END NOT OFFICIAL - - HED_NODE_NAME_EMPTY = 'HED_NODE_NAME_EMPTY' - HED_ONSET_OFFSET_ERROR = 'HED_ONSET_OFFSET_ERROR' - HED_PARENTHESES_MISMATCH = 'HED_PARENTHESES_MISMATCH' - HED_PLACEHOLDER_INVALID = 'HED_PLACEHOLDER_INVALID' - HED_REQUIRED_TAG_MISSING = 'HED_REQUIRED_TAG_MISSING' - HED_SIDECAR_KEY_MISSING = 'HED_SIDECAR_KEY_MISSING' - HED_STYLE_WARNING = 'HED_STYLE_WARNING' - HED_TAG_EMPTY = 'HED_TAG_EMPTY' - HED_TAG_EXTENDED = 'HED_TAG_EXTENDED' - HED_TAG_GROUP_ERROR = "HED_TAG_GROUP_ERROR" - HED_TAG_INVALID = "HED_TAG_INVALID" - HED_TAG_NOT_UNIQUE = 'HED_TAG_NOT_UNIQUE' + HED_TAG_REPEATED = 'HED_TAG_REPEATED' HED_TAG_REPEATED_GROUP = 'HED_TAG_REPEATED_GROUP' - HED_TAG_REQUIRES_CHILD = 'HED_TAG_REQUIRES_CHILD' - HED_TILDES_UNSUPPORTED = 'HED_TILDES_UNSUPPORTED' - HED_UNITS_INVALID = 'HED_UNITS_INVALID' - HED_UNITS_DEFAULT_USED = 'HED_UNITS_DEFAULT_USED' - HED_VALUE_INVALID = 'HED_VALUE_INVALID' - HED_LIBRARY_UNMATCHED = "HED_LIBRARY_UNMATCHED" - TAG_PREFIX_INVALID = "TAG_PREFIX_INVALID" - # HED_VERSION_WARNING - - HED_MISSING_REQUIRED_COLUMN = "HED_MISSING_REQUIRED_COLUMN" - HED_UNKNOWN_COLUMN = "HED_UNKNOWN_COLUMN" - HED_DUPLICATE_COLUMN = "HED_DUPLICATE_COLUMN" - HED_BLANK_COLUMN = "HED_BLANK_COLUMN" - - # Below here shows what the given error maps to - HED_GROUP_EMPTY = 'emptyHedGroup' - INVALID_TAG_CHARACTER = 'invalidTagCharacter' - - # These are all HED_TAG_INVALID - INVALID_EXTENSION = 'invalidExtension' INVALID_PARENT_NODE = "invalidParent" NO_VALID_TAG_FOUND = "invalidTag" - # These are misc errors that need categorization. + HED_LIBRARY_UNMATCHED = "HED_LIBRARY_UNMATCHED" + HED_TOP_LEVEL_TAG = "HED_TOP_LEVEL_TAG" HED_MULTIPLE_TOP_TAGS = "HED_MULTIPLE_TOP_TAGS" HED_TAG_GROUP_TAG = "HED_TAG_GROUP_TAG" + HED_GROUP_EMPTY = 'HED_GROUP_EMPTY' + # end internal codes + + + # Still being worked on below this line + + HED_MISSING_REQUIRED_COLUMN = "HED_MISSING_REQUIRED_COLUMN" + HED_UNKNOWN_COLUMN = "HED_UNKNOWN_COLUMN" + SIDECAR_AND_OTHER_COLUMNS = "SIDECAR_AND_OTHER_COLUMNS" + + DUPLICATE_COLUMN_IN_LIST = "DUPLICATE_COLUMN_IN_LIST" + DUPLICATE_COLUMN_BETWEEN_SOURCES = "DUPLICATE_COLUMN_BETWEEN_SOURCES" + HED_BLANK_COLUMN = "HED_BLANK_COLUMN" + + # Below here shows what the given error maps to + + INVALID_TAG_CHARACTER = 'invalidTagCharacter' class SidecarErrors: # These are for json sidecar validation errors(sidecars can also produce most normal validation errors) - SIDECAR_INVALID = "SIDECAR_INVALID" # this is the generic error reported for several later ones BLANK_HED_STRING = 'blankValueString' WRONG_HED_DATA_TYPE = 'wrongHedDataType' INVALID_POUND_SIGNS_VALUE = 'invalidNumberPoundSigns' @@ -96,10 +102,13 @@ class SidecarErrors: SIDECAR_HED_USED_COLUMN = 'SIDECAR_HED_USED_COLUMN' SIDECAR_NA_USED = 'SIDECAR_NA_USED' SIDECAR_HED_USED = 'SIDECAR_HED_USED' + SIDECAR_BRACES_INVALID = "SIDECAR_BRACES_INVALID" + class SchemaErrors: HED_SCHEMA_DUPLICATE_NODE = 'HED_SCHEMA_DUPLICATE_NODE' HED_SCHEMA_ATTRIBUTE_INVALID = 'HED_SCHEMA_ATTRIBUTE_INVALID' + HED_SCHEMA_DUPLICATE_FROM_LIBRARY = "SCHEMA_LIBRARY_INVALID" class SchemaWarnings: @@ -109,19 +118,27 @@ class SchemaWarnings: HED_SCHEMA_CHARACTER_INVALID = "HED_SCHEMA_CHARACTER_INVALID" INVALID_CAPITALIZATION = 'invalidCaps' NON_PLACEHOLDER_HAS_CLASS = 'NON_PLACEHOLDER_HAS_CLASS' + INVALID_ATTRIBUTE = "INVALID_ATTRIBUTE" -# These are all DEFINITION_INVALID errors class DefinitionErrors: - DEF_TAG_IN_DEFINITION = 'DEF_TAG_IN_DEFINITION' - WRONG_NUMBER_GROUP_TAGS = 'wrongNumberGroupTags' + # These are all DEFINITION_INVALID errors WRONG_NUMBER_PLACEHOLDER_TAGS = 'wrongNumberPlaceholderTags' DUPLICATE_DEFINITION = 'duplicateDefinition' - TAG_IN_SCHEMA = 'defAlreadyInSchema' INVALID_DEFINITION_EXTENSION = 'invalidDefExtension' + DEF_TAG_IN_DEFINITION = 'DEF_TAG_IN_DEFINITION' + NO_DEFINITION_CONTENTS = "NO_DEFINITION_CONTENTS" + PLACEHOLDER_NO_TAKES_VALUE = 'PLACEHOLDER_NO_TAKES_VALUE' + + WRONG_NUMBER_TAGS = 'WRONG_NUMBER_TAGS' + WRONG_NUMBER_GROUPS = 'WRONG_NUMBER_GROUPS' + BAD_PROP_IN_DEFINITION = 'BAD_PROP_IN_DEFINITION' + + BAD_DEFINITION_LOCATION = 'BAD_DEFINITION_LOCATION' class OnsetErrors: + # These are all ONSET_OFFSET_INSET_ERROR OFFSET_BEFORE_ONSET = "OFFSET_BEFORE_ONSET" ONSET_DEF_UNMATCHED = "ONSET_DEF_UNMATCHED" ONSET_WRONG_NUMBER_GROUPS = "ONSET_WRONG_NUMBER_GROUPS" @@ -129,7 +146,7 @@ class OnsetErrors: ONSET_PLACEHOLDER_WRONG = "ONSET_PLACEHOLDER_WRONG" ONSET_TOO_MANY_DEFS = "ONSET_TOO_MANY_DEFS" ONSET_TAG_OUTSIDE_OF_GROUP = "ONSET_TAG_OUTSIDE_OF_GROUP" - + INSET_BEFORE_ONSET = "INSET_BEFORE_ONSET" class ColumnErrors: INVALID_COLUMN_REF = "INVALID_COLUMN_REF" diff --git a/hed/errors/exceptions.py b/hed/errors/exceptions.py index 94b1b6e75..59ca86340 100644 --- a/hed/errors/exceptions.py +++ b/hed/errors/exceptions.py @@ -14,7 +14,16 @@ class HedExceptions: # These are actual schema issues, not that the file cannot be found or parsed SCHEMA_HEADER_MISSING = 'HED_SCHEMA_HEADER_INVALID' HED_SCHEMA_HEADER_INVALID = 'HED_SCHEMA_HEADER_INVALID' - BAD_HED_LIBRARY_NAME = 'badHedLibraryName' + + SCHEMA_LIBRARY_INVALID = "SCHEMA_LIBRARY_INVALID" + BAD_HED_LIBRARY_NAME = 'SCHEMA_LIBRARY_INVALID' + BAD_WITH_STANDARD = "SCHEMA_LIBRARY_INVALID" + BAD_WITH_STANDARD_VERSION = "SCHEMA_LIBRARY_INVALID" + ROOTED_TAG_INVALID = "SCHEMA_LIBRARY_INVALID" + ROOTED_TAG_HAS_PARENT = "SCHEMA_LIBRARY_INVALID" + ROOTED_TAG_DOES_NOT_EXIST = "SCHEMA_LIBRARY_INVALID" + IN_LIBRARY_IN_UNMERGED = "SCHEMA_LIBRARY_INVALID" + HED_SCHEMA_VERSION_INVALID = 'HED_SCHEMA_VERSION_INVALID' SCHEMA_START_MISSING = 'HED_WIKI_SEPARATOR_INVALID' SCHEMA_END_INVALID = 'HED_WIKI_SEPARATOR_INVALID' @@ -31,8 +40,8 @@ class HedExceptions: class HedFileError(Exception): """Exception raised when a file cannot be parsed due to being malformed, file IO, etc.""" - def __init__(self, error_type, message, filename, issues=None): - self.error_type = error_type + def __init__(self, code, message, filename, issues=None): + self.code = code self.message = message self.filename = filename self.issues = issues @@ -40,5 +49,5 @@ def __init__(self, error_type, message, filename, issues=None): self.issues = [ {'message': message, ErrorContext.FILE_NAME: filename, - 'error_code': error_type} + 'code': code} ] diff --git a/hed/models/__init__.py b/hed/models/__init__.py index 3f6d50d56..73ac61deb 100644 --- a/hed/models/__init__.py +++ b/hed/models/__init__.py @@ -14,3 +14,4 @@ from .sidecar import Sidecar from .tabular_input import TabularInput from .timeseries_input import TimeseriesInput +from .df_util import get_assembled, convert_to_form, shrink_defs, expand_defs, process_def_expands diff --git a/hed/models/base_input.py b/hed/models/base_input.py index f0e4209c2..65ac75101 100644 --- a/hed/models/base_input.py +++ b/hed/models/base_input.py @@ -82,7 +82,7 @@ def __init__(self, file, file_type=None, worksheet_name=None, has_column_names=T raise HedFileError(HedExceptions.INVALID_DATAFRAME, "Invalid dataframe(malformed datafile, etc)", file) # todo: Can we get rid of this behavior now that we're using pandas? - column_issues = ColumnMapper.validate_column_map(self.columns, allow_blank_names=allow_blank_names) + column_issues = ColumnMapper.check_for_blank_names(self.columns, allow_blank_names=allow_blank_names) if column_issues: raise HedFileError(HedExceptions.BAD_COLUMN_NAMES, "Duplicate or blank columns found. See issues.", self.name, issues=column_issues) @@ -193,12 +193,11 @@ def expand_defs(self, hed_schema, def_dict): from df_util import expand_defs expand_defs(self._dataframe, hed_schema=hed_schema, def_dict=def_dict, columns=self._mapper.get_tag_columns()) - def to_excel(self, file, output_assembled=False): + def to_excel(self, file): """ Output to an Excel file. Parameters: file (str or file-like): Location to save this base input. - output_assembled (bool): Plug in categories and values from the sidecar directly. Raises: ValueError: if empty file object or file cannot be opened. """ @@ -206,10 +205,6 @@ def to_excel(self, file, output_assembled=False): raise ValueError("Empty file name or object passed in to BaseInput.save.") dataframe = self._dataframe - - if output_assembled: - dataframe = self.dataframe_a - if self._loaded_workbook: old_worksheet = self.get_worksheet(self._worksheet_name) # Excel spreadsheets are 1 based, then add another 1 for column names if present @@ -219,28 +214,24 @@ def to_excel(self, file, output_assembled=False): adj_for_one_based_cols = 1 for row_number, text_file_row in dataframe.iterrows(): for column_number, column_text in enumerate(text_file_row): + cell_value = dataframe.iloc[row_number, column_number] old_worksheet.cell(row_number + adj_row_for_col_names, - column_number + adj_for_one_based_cols).value = \ - dataframe.iloc[row_number, column_number] + column_number + adj_for_one_based_cols).value = cell_value + self._loaded_workbook.save(file) else: dataframe.to_excel(file, header=self._has_column_names) - def to_csv(self, file=None, output_assembled=False): + def to_csv(self, file=None): """ Write to file or return as a string. Parameters: file (str, file-like, or None): Location to save this file. If None, return as string. - output_assembled (bool): Plug in categories and values from the sidecar directly. Returns: None or str: None if file is given or the contents as a str if file is None. """ dataframe = self._dataframe - - if output_assembled: - dataframe = self.dataframe_a - csv_string_if_filename_none = dataframe.to_csv(file, '\t', index=False, header=self._has_column_names) return csv_string_if_filename_none @@ -251,9 +242,9 @@ def columns(self): Empty if no column names. Returns: - columns(dict): The column number:name pairs + columns(list): the column names """ - columns = {} + columns = [] if self._dataframe is not None and self._has_column_names: columns = list(self._dataframe.columns) return columns @@ -354,12 +345,12 @@ def _dataframe_has_names(dataframe): return True return False - def assemble(self, mapper=None, skip_square_brackets=False): + def assemble(self, mapper=None, skip_curly_braces=False): """ Assembles the hed strings Parameters: mapper(ColumnMapper or None): Generally pass none here unless you want special behavior. - skip_square_brackets (bool): If True, don't plug in square bracket values into columns. + skip_curly_braces (bool): If True, don't plug in curly brace values into columns. Returns: Dataframe: the assembled dataframe """ @@ -367,11 +358,12 @@ def assemble(self, mapper=None, skip_square_brackets=False): mapper = self._mapper all_columns = self._handle_transforms(mapper) - if skip_square_brackets: + if skip_curly_braces: return all_columns transformers, _ = mapper.get_transformers() - - return self._handle_square_brackets(all_columns, list(transformers)) + refs = self.get_column_refs() + column_names = list(transformers) + return self._handle_curly_braces_refs(all_columns, refs, column_names) def _handle_transforms(self, mapper): transformers, need_categorical = mapper.get_transformers() @@ -390,45 +382,67 @@ def _handle_transforms(self, mapper): return all_columns @staticmethod - def _find_column_refs(df, column_names): - found_column_references = [] - for column_name in column_names: - df_temp = df[column_name].str.findall("\[([a-z_\-0-9]+)\]", re.IGNORECASE) - u_vals = pd.Series([j for i in df_temp if isinstance(i, list) for j in i], dtype=str) - u_vals = u_vals.unique() - for val in u_vals: - if val not in found_column_references: - found_column_references.append(val) - - return found_column_references + def _replace_ref(text, newvalue, column_ref): + """ Replace column ref in x with y. If it's n/a, delete extra commas/parentheses. - @staticmethod - def _handle_square_brackets(df, known_columns=None): + Note: This function could easily be updated to handle non-curly brace values, but it's faster this way. + Parameters: + text (str): The input string containing the ref enclosed in curly braces. + newvalue (str): The replacement value for the ref. + column_ref (str): The ref to be replaced, without curly braces + + Returns: + str: The modified string with the ref replaced or removed. """ - Plug in square brackets with other columns + # If it's not n/a, we can just replace directly. + if newvalue != "n/a": + return text.replace(f"{{{column_ref}}}", newvalue) + + def _remover(match): + p1 = match.group("p1").count("(") + p2 = match.group("p2").count(")") + if p1 > p2: # We have more starting parens than ending. Make sure we don't remove comma before + output = match.group("c1") + "(" * (p1 - p2) + elif p2 > p1: # We have more ending parens. Make sure we don't remove comma after + output = ")" * (p2 - p1) + match.group("c2") + else: + c1 = match.group("c1") + c2 = match.group("c2") + if c1: + c1 = "" + elif c2: + c2 = "" + output = c1 + c2 + + return output + + # this finds all surrounding commas and parentheses to a reference. + # c1/c2 contain the comma(and possibly spaces) separating this ref from other tags + # p1/p2 contain the parentheses directly surrounding the tag + # All four groups can have spaces. + pattern = r'(?P[\s,]*)(?P[(\s]*)\{' + column_ref + r'\}(?P[\s)]*)(?P[\s,]*)' + return re.sub(pattern, _remover, text) - If known columns is passed, only use those columns to find or replace references. + @staticmethod + def _handle_curly_braces_refs(df, refs, column_names): """ - if known_columns is not None: - column_names = list(known_columns) - else: - column_names = list(df.columns) - possible_column_references = [f"{column_name}" for column_name in column_names if - isinstance(column_name, str) and column_name.lower() != "hed"] - found_column_references = BaseInput._find_column_refs(df, column_names) - - valid_replacements = [col for col in found_column_references if col in possible_column_references] - - # todo: break this into a sub function(probably) - for column_name in valid_replacements: - column_names.remove(column_name) - saved_columns = df[valid_replacements] - for column_name in column_names: - for replacing_name in valid_replacements: - column_name_brackets = f"[{replacing_name}]" - df[column_name] = pd.Series(x.replace(column_name_brackets, y) for x, y + Plug in curly braces with other columns + """ + # Filter out columns and refs that don't exist. + refs = [ref for ref in refs if ref in column_names] + remaining_columns = [column for column in column_names if column not in refs] + + # Replace references in the columns we are saving out. + saved_columns = df[refs] + for column_name in remaining_columns: + for replacing_name in refs: + # If the data has no n/a values, this version is MUCH faster. + # column_name_brackets = f"{{{replacing_name}}}" + # df[column_name] = pd.Series(x.replace(column_name_brackets, y) for x, y + # in zip(df[column_name], saved_columns[replacing_name])) + df[column_name] = pd.Series(BaseInput._replace_ref(x, y, replacing_name) for x, y in zip(df[column_name], saved_columns[replacing_name])) - df = df[column_names] + df = df[remaining_columns] return df @@ -447,4 +461,29 @@ def combine_dataframe(dataframe): lambda x: ', '.join(filter(lambda e: bool(e) and e != "n/a", map(str, x))), axis=1 ) - return dataframe \ No newline at end of file + return dataframe + + def get_def_dict(self, hed_schema=None, extra_def_dicts=None): + """ Returns the definition dict for this file + + Note: Baseclass implementation returns just extra_def_dicts. + + Parameters: + hed_schema(HedSchema): used to identify tags to find definitions(if needed) + extra_def_dicts (list, DefinitionDict, or None): Extra dicts to add to the list. + + Returns: + DefinitionDict: A single definition dict representing all the data(and extra def dicts) + """ + from hed.models.definition_dict import DefinitionDict + return DefinitionDict(extra_def_dicts, hed_schema) + + def get_column_refs(self): + """ Returns a list of column refs for this file. + + Default implementation returns none. + + Returns: + column_refs(list): A list of unique column refs found + """ + return [] diff --git a/hed/models/column_mapper.py b/hed/models/column_mapper.py index 3c4c87a63..3e82d8c5a 100644 --- a/hed/models/column_mapper.py +++ b/hed/models/column_mapper.py @@ -4,6 +4,7 @@ from hed.errors.error_types import ValidationErrors import copy +from collections import Counter PANDAS_COLUMN_PREFIX_TO_IGNORE = "Unnamed: " @@ -12,63 +13,75 @@ class ColumnMapper: """ Mapping of a base input file columns into HED tags. Notes: - - Functions and type_variables column and row indexing starts at 0. + - All column numbers are 0 based. """ + def __init__(self, sidecar=None, tag_columns=None, column_prefix_dictionary=None, - optional_tag_columns=None, requested_columns=None, warn_on_missing_column=False): + optional_tag_columns=None, warn_on_missing_column=False): """ Constructor for ColumnMapper. Parameters: sidecar (Sidecar): A sidecar to gather column data from. tag_columns: (list): A list of ints or strings containing the columns that contain the HED tags. Sidecar column definitions will take precedent if there is a conflict with tag_columns. - column_prefix_dictionary (dict): Dictionary with keys that are column numbers and values are HED tag + column_prefix_dictionary (dict): Dictionary with keys that are column numbers/names and values are HED tag prefixes to prepend to the tags in that column before processing. - May be deprecated. These are no longer prefixes, but rather converted to value columns. - eg. {"key": "Description"} will turn into a value column as {"key": "Description/#"} + May be deprecated/renamed. These are no longer prefixes, but rather converted to value columns. + eg. {"key": "Description", 1: "Label/"} will turn into value columns as + {"key": "Description/#", 1: "Label/#"} + Note: It will be a validation issue if column 1 is called "key" in the above example. This means it no longer accepts anything but the value portion only in the columns. optional_tag_columns (list): A list of ints or strings containing the columns that contain the HED tags. If the column is otherwise unspecified, convert this column type to HEDTags. - requested_columns (list or None): A list of columns you wish to retrieve. - If None, retrieve all columns. warn_on_missing_column (bool): If True, issue mapping warnings on column names that are missing from the sidecar. Notes: - All column numbers are 0 based. - - Examples: - column_prefix_dictionary = {3: 'Description/', 4: 'Label/'} - - The third column contains tags that need Description/ tag prepended, while the fourth column - contains tag that needs Label/ prepended. """ - # This points to column_type entries based on column names or indexes if columns have no column_name. - self.column_data = {} # Maps column number to column_entry. This is what's actually used by most code. self._final_column_map = {} self._no_mapping_info = True self._column_map = {} self._reverse_column_map = {} - self._requested_columns = [] self._warn_on_missing_column = warn_on_missing_column - self._tag_columns = [] - self._optional_tag_columns = [] - self._column_prefix_dictionary = {} + if tag_columns is None: + tag_columns = [] + self._tag_columns = tag_columns + if optional_tag_columns is None: + optional_tag_columns = [] + self._optional_tag_columns = optional_tag_columns + if column_prefix_dictionary is None: + column_prefix_dictionary = {} + self._column_prefix_dictionary = column_prefix_dictionary self._na_patterns = ["n/a", "nan"] - self._finalize_mapping_issues = [] self._sidecar = None self._set_sidecar(sidecar) - self.set_requested_columns(requested_columns, False) - self.set_tag_columns(tag_columns, optional_tag_columns, False) - self._add_value_columns(column_prefix_dictionary) - # finalize the column map based on initial settings with no header self._finalize_mapping() + @property + def tag_columns(self): + """ Returns the known tag and optional tag columns with numbers as names when possible + + Returns: + tag_columns(list of str or int): A list of all tag and optional tag columns as labels + """ + joined_list = self._tag_columns + self._optional_tag_columns + return list(set(self._convert_to_names(self._column_map, joined_list))) + + @property + def column_prefix_dictionary(self): + """ Returns the column_prefix_dictionary with numbers turned into names where possible + + Returns: + column_prefix_dictionary(list of str or int): A column_prefix_dictionary with column labels as keys + """ + return self._convert_to_names_dict(self._column_map, self._column_prefix_dictionary) + def get_transformers(self): """ Return the transformers to use on a dataframe @@ -79,29 +92,28 @@ def get_transformers(self): assign_to_column = column.column_name if isinstance(assign_to_column, int): if self._column_map: - assign_to_column = self._column_map[assign_to_column - 1] + assign_to_column = self._column_map[assign_to_column] else: - assign_to_column = assign_to_column - 1 + assign_to_column = assign_to_column if column.column_type == ColumnType.Ignore: continue elif column.column_type == ColumnType.Value: - value_str = column._hed_dict + value_str = column.hed_dict from functools import partial final_transformers[assign_to_column] = partial(self._value_handler, value_str) elif column.column_type == ColumnType.Categorical: need_categorical.append(column.column_name) - category_values = column._hed_dict + category_values = column.hed_dict from functools import partial final_transformers[assign_to_column] = partial(self._category_handler, category_values) else: final_transformers[assign_to_column] = lambda x: x - # print(column.column_type) return final_transformers, need_categorical @staticmethod - def validate_column_map(column_map, allow_blank_names): - """ Validate there are no issues with column names. + def check_for_blank_names(column_map, allow_blank_names): + """ Validate there are no blank column names Parameters: column_map(iterable): A list of column names @@ -113,17 +125,12 @@ def validate_column_map(column_map, allow_blank_names): # We don't have any checks right now if blank/duplicate is allowed if allow_blank_names: return [] + issues = [] - used_names = set() for column_number, name in enumerate(column_map): - if name is None or name.startswith(PANDAS_COLUMN_PREFIX_TO_IGNORE): + if name is None or not name or name.startswith(PANDAS_COLUMN_PREFIX_TO_IGNORE): issues += ErrorHandler.format_error(ValidationErrors.HED_BLANK_COLUMN, column_number) continue - # if name in used_names: - # # todo: Add this check once it's more fleshed out - # issues += ErrorHandler.format_error(ValidationErrors.HED_DUPLICATE_COLUMN, name) - # continue - used_names.add(name) return issues @@ -140,11 +147,16 @@ def _set_sidecar(self, sidecar): raise ValueError("Trying to set a second sidecar on a column mapper.") if not sidecar: return None - for column_data in sidecar.column_data: - self._add_column_data(column_data) self._sidecar = sidecar + @property + def sidecar_column_data(self): + if self._sidecar: + return self._sidecar.column_data + + return {} + def get_tag_columns(self): """ Returns the column numbers or names that are mapped to be HedTags @@ -154,8 +166,7 @@ def get_tag_columns(self): column_identifiers(list): A list of column numbers or names that are ColumnType.HedTags. 0-based if integer-based, otherwise column name. """ - return [column_entry.column_name - 1 if isinstance(column_entry.column_name, int) else column_entry.column_name - for number, column_entry in self._final_column_map.items() + return [column_entry.column_name for number, column_entry in self._final_column_map.items() if column_entry.column_type == ColumnType.HEDTags] def set_tag_columns(self, tag_columns=None, optional_tag_columns=None, finalize_mapping=True): @@ -168,10 +179,6 @@ def set_tag_columns(self, tag_columns=None, optional_tag_columns=None, finalize_ but not an error if missing. If None, clears existing tag_columns finalize_mapping (bool): Re-generate the internal mapping if True, otherwise no effect until finalize. - - Returns: - list: List of issues that occurred during this process. Each issue is a dictionary. - """ if tag_columns is None: tag_columns = [] @@ -180,24 +187,7 @@ def set_tag_columns(self, tag_columns=None, optional_tag_columns=None, finalize_ self._tag_columns = tag_columns self._optional_tag_columns = optional_tag_columns if finalize_mapping: - issues = self._finalize_mapping() - return issues - return [] - - def set_requested_columns(self, requested_columns, finalize_mapping=True): - """ Set to return only the columns listed in requested_columns - - Parameters: - requested_columns(list or None): If this is not None, return ONLY these columns. Names or numbers allowed. - finalize_mapping(bool): Finalize the mapping right now if True - - Returns: - issues(list): An empty list of mapping issues - """ - self._requested_columns = requested_columns - if finalize_mapping: - return self._finalize_mapping() - return [] + self._finalize_mapping() def set_column_map(self, new_column_map=None): """ Set the column number to name mapping. @@ -219,50 +209,18 @@ def set_column_map(self, new_column_map=None): column_map = {column_number: column_name for column_number, column_name in enumerate(new_column_map)} self._column_map = column_map self._reverse_column_map = {column_name: column_number for column_number, column_name in column_map.items()} - return self._finalize_mapping() - - def add_columns(self, column_names_or_numbers, column_type=ColumnType.HEDTags): - """ Add blank columns in the given column category. - - Parameters: - column_names_or_numbers (list): A list of column names or numbers to add as the specified type. - column_type (ColumnType property): The category of column these should be. - - """ - if column_names_or_numbers: - if not isinstance(column_names_or_numbers, list): - column_names_or_numbers = [column_names_or_numbers] - for column_name in column_names_or_numbers: - new_def = ColumnMetadata(column_type, column_name) - self._add_column_data(new_def) - - def _add_value_columns(self, column_prefix_dictionary): - if column_prefix_dictionary: - for col, prefix in column_prefix_dictionary.items(): - if prefix.endswith("/"): - prefix = prefix + "#" - else: - prefix = prefix + "/#" - new_def = ColumnMetadata(ColumnType.Value, col, hed_dict=prefix) - self._add_column_data(new_def) - - def _add_column_data(self, new_column_entry): - """ Add the metadata of a column to this column mapper. - - Parameters: - new_column_entry (ColumnMetadata): The column definition to add. - - Notes: - If an entry with the same name exists, the new entry will replace it. + self._finalize_mapping() - """ - column_name = new_column_entry.column_name - self.column_data[column_name] = copy.deepcopy(new_column_entry) + def set_column_prefix_dictionary(self, column_prefix_dictionary, finalize_mapping=True): + """Sets the column prefix dictionary""" + self._column_prefix_dictionary = column_prefix_dictionary + if finalize_mapping: + self._finalize_mapping() @staticmethod - def _get_basic_final_map(column_map, column_data): + def _get_sidecar_basic_map(column_map, column_data): basic_final_map = {} - unhandled_names = {} + unhandled_cols = [] if column_map: for column_number, column_name in column_map.items(): if column_name is None: @@ -270,126 +228,143 @@ def _get_basic_final_map(column_map, column_data): if column_name in column_data: column_entry = copy.deepcopy(column_data[column_name]) column_entry.column_name = column_name - basic_final_map[column_number] = column_entry + basic_final_map[column_name] = column_entry continue - elif column_name.startswith(PANDAS_COLUMN_PREFIX_TO_IGNORE): + elif isinstance(column_name, str) and column_name.startswith(PANDAS_COLUMN_PREFIX_TO_IGNORE): continue - unhandled_names[column_name] = column_number - for column_number in column_data: - if isinstance(column_number, int): - column_entry = copy.deepcopy(column_data[column_number]) - column_entry.column_name = column_number - basic_final_map[column_number] = column_entry + unhandled_cols.append(column_name) - return basic_final_map, unhandled_names + return basic_final_map, unhandled_cols @staticmethod - def _convert_to_indexes(name_to_column_map, column_list): - converted_indexes = [] - unknown_names = [] - for name in column_list: - if isinstance(name, str): - if name in name_to_column_map: - converted_indexes.append(name_to_column_map[name]) - continue - else: - unknown_names.append(name) + def _convert_to_names(column_to_name_map, column_list): + converted_names = [] + for index in column_list: + if isinstance(index, int): + if not column_to_name_map: + converted_names.append(index) + elif index in column_to_name_map: + converted_names.append(column_to_name_map[index]) else: - # Name is in int here - converted_indexes.append(name) - return converted_indexes, unknown_names + if index in column_to_name_map.values(): + converted_names.append(index) + return converted_names @staticmethod - def _add_tag_columns(final_map, unhandled_names, all_tag_columns, required_tag_columns, warn_on_missing_columns): - issues = [] - - # Add numbered tag columns - for column_name, column_number in unhandled_names.items(): - if column_number in all_tag_columns: - final_map[column_number] = ColumnMetadata(ColumnType.HEDTags, column_name) + def _convert_to_names_dict(column_to_name_map, column_dict): + converted_dict = {} + for index, column_data in column_dict.items(): + if isinstance(index, int): + if not column_to_name_map: + converted_dict[index] = column_data + elif index in column_to_name_map: + converted_dict[column_to_name_map[index]] = column_data else: - if warn_on_missing_columns and column_number not in required_tag_columns: - issues += ErrorHandler.format_error(ValidationErrors.HED_UNKNOWN_COLUMN, - column_name=column_name) - - # Add numbered tag columns - for column_name_or_number in all_tag_columns: - if isinstance(column_name_or_number, int): - if column_name_or_number not in final_map: - final_map[column_name_or_number] = ColumnMetadata(ColumnType.HEDTags, - column_name_or_number) - - # Switch any tag/requested columns to be HedTags if they were being ignored - for column_number, entry in final_map.items(): - if column_number in all_tag_columns and entry.column_type == ColumnType.Ignore: - entry.column_type = ColumnType.HEDTags - - return issues + if index in column_to_name_map.values(): + converted_dict[index] = column_data + return converted_dict @staticmethod - def _filter_by_requested(final_map, requested_columns): - if requested_columns is not None: - return {key: value for key, value in final_map.items() - if key in requested_columns or value.column_name in requested_columns} - return final_map + def _add_value_columns(final_map, column_prefix_dictionary): + for col, prefix in column_prefix_dictionary.items(): + if prefix.endswith("/"): + prefix = prefix + "#" + else: + prefix = prefix + "/#" + new_def = ColumnMetadata(ColumnType.Value, col, source=prefix) + final_map[col] = new_def @staticmethod - def _convert_tag_columns(tag_columns, optional_tag_columns, requested_columns, reverse_column_map): - all_tag_columns = tag_columns + optional_tag_columns - required_tag_columns = tag_columns.copy() - if requested_columns: - all_tag_columns += requested_columns - required_tag_columns += requested_columns + def _add_tag_columns(final_map, tag_columns): + for col in tag_columns: + new_def = ColumnMetadata(ColumnType.HEDTags, col) + final_map[col] = new_def + + def _get_column_lists(self): + column_lists = self._tag_columns, self._optional_tag_columns, self._column_prefix_dictionary + list_names = ["tag_columns", "optional_tag_columns", "column_prefix_dictionary"] - all_tag_columns, _ = ColumnMapper._convert_to_indexes(reverse_column_map, all_tag_columns) - required_tag_columns, missing_tag_column_names = ColumnMapper._convert_to_indexes(reverse_column_map, - required_tag_columns) + if not any(column for column in column_lists): + return column_lists, list_names + # Filter out empty lists from the above + column_lists, list_names = zip(*[(col_list, list_name) for col_list, list_name in zip(column_lists, list_names) + if col_list]) + return column_lists, list_names + + def _check_for_duplicates_and_required(self, list_names, column_lists): issues = [] - for column_name in missing_tag_column_names: - issues += ErrorHandler.format_error(ValidationErrors.HED_MISSING_REQUIRED_COLUMN, - column_name=column_name) + for list_name, col_list in zip(list_names, column_lists): + # Convert all known strings to ints, then check for duplicates + converted_list = [item if isinstance(item, int) else self._reverse_column_map.get(item, item) + for item in col_list] - return all_tag_columns, required_tag_columns, issues + if col_list != self._optional_tag_columns: + for test_col in converted_list: + if isinstance(test_col, str) and test_col not in self._reverse_column_map: + issues += ErrorHandler.format_error(ValidationErrors.HED_MISSING_REQUIRED_COLUMN, + test_col, list_name) - def _finalize_mapping(self): - # 1. All named and numbered columns are located from sidecars and put in final mapping - # 2. Add any tag columns and note issues about missing columns - # 3. Add any numbered columns that have required prefixes - # 4. Filter to just requested columns, if any - final_map, unhandled_names = self._get_basic_final_map(self._column_map, self.column_data) - - # convert all tag lists to indexes -> Issuing warnings at this time potentially for unknown ones - all_tag_columns, required_tag_columns, issues = self._convert_tag_columns(self._tag_columns, - self._optional_tag_columns, - self._requested_columns, - self._reverse_column_map) - - # Notes any missing required columns - issues += self._add_tag_columns(final_map, unhandled_names, all_tag_columns, required_tag_columns, - self._warn_on_missing_column) - - issues += ColumnMapper.validate_column_map(self._column_map.values(), allow_blank_names=False) - - self._final_column_map = self._filter_by_requested(final_map, self._requested_columns) - # Make sure this new dict is sorted - self._final_column_map = dict(sorted(final_map.items())) + issues += self._check_for_duplicates_between_lists(converted_list, list_name, + ValidationErrors.DUPLICATE_COLUMN_IN_LIST) + + return issues + + def _check_for_duplicates_between_lists(self, checking_list, list_names, error_type): + issues = [] + duplicates = [item for item, count in Counter(checking_list).items() if count > 1] + for duplicate in duplicates: + issues += ErrorHandler.format_error(error_type, duplicate, + self._column_map.get(duplicate), list_names) + return issues + + def check_for_mapping_issues(self, allow_blank_names=False): + """ Find all issues given the current column_map, tag_columns, etc. - self._no_mapping_info = not self._check_if_mapping_info() + Parameters: + allow_blank_names(bool): Only flag blank names if False - self._finalize_mapping_issues = issues + Returns: + issue_list(list of dict): Returns all issues found as a list of dicts + """ + # 1. Get the lists with entries + column_lists, list_names = self._get_column_lists() + # 2. Verify column_prefix columns and tag columns are present, and check for duplicates + issues = self._check_for_duplicates_and_required(list_names, column_lists) + + combined_list = self.tag_columns + list(self.column_prefix_dictionary) + # 3. Verify prefix and tag columns do not conflict. + issues += self._check_for_duplicates_between_lists(combined_list, list_names, + ValidationErrors.DUPLICATE_COLUMN_BETWEEN_SOURCES) + + # 4. Verify we didn't get both a sidecar and a tag column list + if self._sidecar and combined_list and combined_list != ["HED"]: + issues += ErrorHandler.format_error(ValidationErrors.SIDECAR_AND_OTHER_COLUMNS, column_names=combined_list) + + # 5. Verify we handled all columns + if self._warn_on_missing_column: + fully_combined_list = list(self.sidecar_column_data) + combined_list + for column in self._column_map.values(): + if column not in fully_combined_list: + issues += ErrorHandler.format_error(ValidationErrors.HED_UNKNOWN_COLUMN, column) + + issues += self.check_for_blank_names(self._column_map.values(), allow_blank_names=allow_blank_names) return issues - def _check_if_mapping_info(self): - # If any of these have any data, don't do default behavior. - return bool(self.column_data or self._final_column_map - or self._requested_columns is not None or self._tag_columns - or self._optional_tag_columns or self._column_prefix_dictionary) + def _finalize_mapping(self): + final_map, unhandled_cols = self._get_sidecar_basic_map(self._column_map, self.sidecar_column_data) + + self._add_tag_columns(final_map, self.tag_columns) + self._remove_from_list(unhandled_cols, self.tag_columns) - def _column_name_requested(self, column_name): - if self._requested_columns is None: - return True - return column_name in self._requested_columns + self._add_value_columns(final_map, self.column_prefix_dictionary) + self._remove_from_list(unhandled_cols, self.column_prefix_dictionary) + + self._final_column_map = dict(sorted(final_map.items())) + + @staticmethod + def _remove_from_list(list_to_alter, to_remove): + return [item for item in list_to_alter if item not in to_remove] def get_def_dict(self, hed_schema=None, extra_def_dicts=None): """ Return def dicts from every column description. @@ -407,13 +382,14 @@ def get_def_dict(self, hed_schema=None, extra_def_dicts=None): return [] def get_column_mapping_issues(self): - """ Get all the issues with finalizing column mapping. Primarily a missing required column. + """ Get all the issues with finalizing column mapping(duplicate columns, missing required, etc) + Note: this is deprecated and now a wrapper for "check_for_mapping_issues()" Returns: list: A list dictionaries of all issues found from mapping column names to numbers. """ - return self._finalize_mapping_issues + return self.check_for_mapping_issues() @staticmethod def _category_handler(category_values, x): diff --git a/hed/models/column_metadata.py b/hed/models/column_metadata.py index ecdc76f08..4fa43a6a5 100644 --- a/hed/models/column_metadata.py +++ b/hed/models/column_metadata.py @@ -1,5 +1,6 @@ from enum import Enum from hed.errors.error_types import SidecarErrors +import pandas as pd class ColumnType(Enum): @@ -21,30 +22,20 @@ class ColumnType(Enum): class ColumnMetadata: """ Column in a ColumnMapper. """ - def __init__(self, column_type=None, name=None, hed_dict=None, column_prefix=None): + def __init__(self, column_type=None, name=None, source=None): """ A single column entry in the column mapper. Parameters: column_type (ColumnType or None): How to treat this column when reading data. name (str, int, or None): The column_name or column number identifying this column. If name is a string, you'll need to use a column map to set the number later. - hed_dict (dict or str or None): The loaded data (usually from json) for the given def - For category columns, this is a dict. - For value columns, it's a string. - column_prefix (str or None): If present, prepend the given column_prefix to all hed tags in the columns. - Only works on ColumnType HedTags. - - Notes: - - Each column from which data is retrieved must have a ColumnMetadata representing its contents. - - The column_prefix dictionaries are used when the column is processed. + source (dict or str or None): Either the entire loaded json sidecar or a single HED string """ - if hed_dict is None: - hed_dict = {} - - self.column_type = column_type self.column_name = name - self.column_prefix = column_prefix - self._hed_dict = hed_dict + self._source = source + if column_type is None: + column_type = self._detect_column_type(self.source_dict) + self.column_type = column_type @property def hed_dict(self): @@ -54,7 +45,80 @@ def hed_dict(self): dict or str: A string or dict of strings for this column """ - return self._hed_dict + if self._source is None or isinstance(self._source, str): + return self._source + return self._source[self.column_name].get("HED", {}) + + @property + def source_dict(self): + """ The raw dict for this entry(if it exists) + + Returns: + dict or str: A string or dict of strings for this column + """ + if self._source is None or isinstance(self._source, str): + return {"HED": self._source} + return self._source[self.column_name] + + def get_hed_strings(self): + if not self.column_type: + return pd.Series(dtype=str) + + series = pd.Series(self.hed_dict, dtype=str) + + return series + + def set_hed_strings(self, new_strings): + if new_strings is None: + return False + + if not self.column_type: + return False + + if isinstance(new_strings, pd.Series): + if self.column_type == ColumnType.Categorical: + new_strings = new_strings.to_dict() + elif new_strings.empty: + return False + else: + new_strings = new_strings.iloc[0] + + self._source[self.column_name]["HED"] = new_strings + + return True + + @staticmethod + def _detect_column_type(dict_for_entry): + """ Determine the ColumnType of a given json entry. + + Parameters: + dict_for_entry (dict): The loaded json entry a specific column. + Generally has a "HED" entry among other optional ones. + + Returns: + ColumnType: The determined type of given column. Returns None if unknown. + + """ + if not dict_for_entry or not isinstance(dict_for_entry, dict): + return ColumnType.Ignore + + minimum_required_keys = ("HED",) + if not set(minimum_required_keys).issubset(dict_for_entry.keys()): + return ColumnType.Ignore + + hed_entry = dict_for_entry["HED"] + if isinstance(hed_entry, dict): + if not all(isinstance(entry, str) for entry in hed_entry.values()): + return None + return ColumnType.Categorical + + if not isinstance(hed_entry, str): + return None + + if "#" not in dict_for_entry["HED"]: + return None + + return ColumnType.Value @staticmethod def expected_pound_sign_count(column_type): diff --git a/hed/models/def_expand_gather.py b/hed/models/def_expand_gather.py index 5d2b5c935..f34461e46 100644 --- a/hed/models/def_expand_gather.py +++ b/hed/models/def_expand_gather.py @@ -1,5 +1,83 @@ import pandas as pd -from hed.models import DefinitionDict, DefinitionEntry, HedString +from hed.models.definition_dict import DefinitionDict +from hed.models.definition_entry import DefinitionEntry +from hed.models.hed_string import HedString + + +class AmbiguousDef: + def __init__(self): + self.actual_defs = [] + self.placeholder_defs = [] + + def add_def(self, def_tag, def_expand_group): + group_tag = def_expand_group.get_first_group() + def_extension = def_tag.extension.split('/')[-1] + self.actual_defs.append(group_tag) + group_tag = group_tag.copy() + matching_tags = [tag for tag in group_tag.get_all_tags() if + tag.extension == def_extension] + + for tag in matching_tags: + tag.extension = "#" + self.placeholder_defs.append(group_tag) + + def validate(self): + """Validate the given ambiguous definition + + Returns: + bool: True if this is a valid definition with exactly 1 placeholder. + + raises: + ValueError: Raised if this is an invalid(not ambiguous) definition. + """ + # todo: improve this and get_group + placeholder_group = self.get_group() + if not placeholder_group: + raise ValueError("Invalid Definition") + placeholder_mask = [(tag.extension == "#") for tag in placeholder_group.get_all_tags()] + all_tags_list = [group.get_all_tags() for group in self.actual_defs] + for tags, placeholder in zip(zip(*all_tags_list), placeholder_mask): + if placeholder: + continue + + tag_set = set(tag.extension for tag in tags) + if len(tag_set) > 1: + raise ValueError("Invalid Definition") + + return placeholder_mask.count(True) == 1 + + @staticmethod + def _get_matching_value(tags): + """Get the matching value for a set of HedTag extensions. + + Parameters: + tags (iterator): The list of HedTags to find a matching value for. + + Returns: + str or None: The matching value if found, None otherwise. + """ + extensions = [tag.extension for tag in tags] + unique_extensions = set(extensions) + + if len(unique_extensions) == 1: + return unique_extensions.pop() + elif "#" in unique_extensions: + unique_extensions.remove("#") + if len(unique_extensions) == 1: + return unique_extensions.pop() + return None + + def get_group(self): + new_group = self.placeholder_defs[0].copy() + + all_tags_list = [group.get_all_tags() for group in self.placeholder_defs] + for tags, new_tag in zip(zip(*all_tags_list), new_group.get_all_tags()): + matching_val = self._get_matching_value(tags) + if matching_val is None: + return None + new_tag.extension = matching_val + + return new_group class DefExpandGatherer: @@ -14,10 +92,10 @@ def __init__(self, hed_schema, known_defs=None, ambiguous_defs=None, errors=None """ self.hed_schema = hed_schema - self.known_defs = known_defs if known_defs else {} self.ambiguous_defs = ambiguous_defs if ambiguous_defs else {} + self.ambiguous_defs_new = ambiguous_defs if ambiguous_defs else {} self.errors = errors if errors else {} - self.def_dict = DefinitionDict(self.known_defs, self.hed_schema) + self.def_dict = DefinitionDict(known_defs, self.hed_schema) def process_def_expands(self, hed_strings, known_defs=None): """Process the HED strings containing def-expand tags. @@ -38,11 +116,11 @@ def process_def_expands(self, hed_strings, known_defs=None): self.def_dict.add_definitions(known_defs, self.hed_schema) for i in hed_strings[def_expand_mask].index: string = hed_strings.loc[i] - self._process_hed_string(string) + self._process_def_expand(string) return self.def_dict, self.ambiguous_defs, self.errors - def _process_hed_string(self, string): + def _process_def_expand(self, string): """Process a single HED string to extract definitions and handle known and ambiguous definitions. Parameters: @@ -74,109 +152,57 @@ def _handle_known_definition(self, def_tag, def_expand_group, def_group): if def_group_contents: if def_group_contents != def_expand_group: - self.errors.setdefault(def_tag_name.lower(), []).append(def_group) - return True - - if def_tag_name.lower() in self.errors: - self.errors.setdefault(def_tag_name.lower(), []).append(def_group) + self.errors.setdefault(def_tag_name.lower(), []).append(def_expand_group.get_first_group()) return True - return False - - def _handle_ambiguous_definition(self, def_tag, def_expand_group): - """Handle ambiguous def-expand tag in a HED string. - - Parameters: - def_tag (HedTag): The def-expand tag. - def_expand_group (HedGroup): The group containing the def-expand tag. - """ - def_tag_name = def_tag.extension.split('/')[0] - has_extension = "/" in def_tag.extension - if not has_extension: group_tag = def_expand_group.get_first_group() self.def_dict.defs[def_tag_name.lower()] = DefinitionEntry(name=def_tag_name, contents=group_tag, takes_value=False, source_context=[]) - else: - self._process_ambiguous_extension(def_tag, def_expand_group) + return True + + # this is needed for the cases where we have a definition with errors, but it's not a known definition. + if def_tag_name.lower() in self.errors: + self.errors.setdefault(f"{def_tag_name.lower()}", []).append(def_expand_group.get_first_group()) + return True + + return False - def _process_ambiguous_extension(self, def_tag, def_expand_group): - """Process ambiguous extensions in a def-expand HED string. + def _handle_ambiguous_definition(self, def_tag, def_expand_group): + """Handle ambiguous def-expand tag in a HED string. Parameters: def_tag (HedTag): The def-expand tag. def_expand_group (HedGroup): The group containing the def-expand tag. """ def_tag_name = def_tag.extension.split('/')[0] - def_extension = def_tag.extension.split('/')[-1] - - matching_tags = [tag for tag in def_expand_group.get_all_tags() if - tag.extension == def_extension and tag != def_tag] - - for tag in matching_tags: - tag.extension = "#" - - group_tag = def_expand_group.get_first_group() - - these_defs = self.ambiguous_defs.setdefault(def_tag_name.lower(), []) - these_defs.append(group_tag) - - value_per_tag = [] - if len(these_defs) >= 1: - all_tags_list = [group.get_all_tags() for group in these_defs] - for tags in zip(*all_tags_list): - matching_val = self._get_matching_value(tags) - value_per_tag.append(matching_val) - - self._handle_value_per_tag(def_tag_name, value_per_tag, group_tag) - - def _handle_value_per_tag(self, def_tag_name, value_per_tag, group_tag): - """Handle the values per tag in ambiguous def-expand tag. - - Parameters: - def_tag_name (str): The name of the def-expand tag. - value_per_tag (list): The list of values per HedTag. - group_tag (HedGroup): The def expand contents - """ - if value_per_tag.count(None): - groups = self.ambiguous_defs.get(def_tag_name.lower(), []) - for group in groups: - self.errors.setdefault(def_tag_name.lower(), []).append(group) - + these_defs = self.ambiguous_defs.setdefault(def_tag_name.lower(), AmbiguousDef()) + these_defs.add_def(def_tag, def_expand_group) + + try: + if these_defs.validate(): + new_contents = these_defs.get_group() + self.def_dict.defs[def_tag_name.lower()] = DefinitionEntry(name=def_tag_name, contents=new_contents, + takes_value=True, + source_context=[]) + del self.ambiguous_defs[def_tag_name.lower()] + except ValueError as e: + for ambiguous_def in these_defs.placeholder_defs: + self.errors.setdefault(def_tag_name.lower(), []).append(ambiguous_def) del self.ambiguous_defs[def_tag_name.lower()] - return - - ambiguous_values = value_per_tag.count("#") - if ambiguous_values == 1: - new_contents = group_tag.copy() - for tag, value in zip(new_contents.get_all_tags(), value_per_tag): - if value is not None: - tag.extension = f"{value}" - self.def_dict.defs[def_tag_name.lower()] = DefinitionEntry(name=def_tag_name, contents=new_contents, - takes_value=True, - source_context=[]) - del self.ambiguous_defs[def_tag_name.lower()] + return @staticmethod - def _get_matching_value(tags): - """Get the matching value for a set of HedTag extensions. - - Parameters: - tags (iterator): The list of HedTags to find a matching value for. + def get_ambiguous_group(ambiguous_def): + """Turns an entry in the ambiguous_defs dict into a single HedGroup Returns: - str or None: The matching value if found, None otherwise. + HedGroup: the ambiguous definition with known placeholders filled in """ - extensions = [tag.extension for tag in tags] - unique_extensions = set(extensions) - - if len(unique_extensions) == 1: - return unique_extensions.pop() - elif "#" in unique_extensions: - unique_extensions.remove("#") - if len(unique_extensions) == 1: - return unique_extensions.pop() - return None + if not ambiguous_def: + # mostly to not crash, this shouldn't happen. + return HedString("") + return ambiguous_def.get_group() diff --git a/hed/models/definition_dict.py b/hed/models/definition_dict.py index fce00e1fa..ebe1af6f8 100644 --- a/hed/models/definition_dict.py +++ b/hed/models/definition_dict.py @@ -3,6 +3,7 @@ from hed.errors.error_types import DefinitionErrors from hed.errors.error_reporter import ErrorHandler from hed.models.model_constants import DefTagNames +from hed.schema.hed_schema_constants import HedKey class DefinitionDict: @@ -98,38 +99,11 @@ def check_for_definitions(self, hed_string_obj, error_handler=None): list: List of issues encountered in checking for definitions. Each issue is a dictionary. """ - new_def_issues = [] + def_issues = [] for definition_tag, group in hed_string_obj.find_top_level_tags(anchor_tags={DefTagNames.DEFINITION_KEY}): + group_tag, new_def_issues = self._find_group(definition_tag, group, error_handler) def_tag_name = definition_tag.extension - # initial validation - groups = group.groups() - if len(groups) > 1: - new_def_issues += \ - ErrorHandler.format_error_with_context(error_handler, - DefinitionErrors.WRONG_NUMBER_GROUP_TAGS, - def_name=def_tag_name, tag_list=groups) - continue - if len(group.tags()) != 1: - new_def_issues += \ - ErrorHandler.format_error_with_context(error_handler, - DefinitionErrors.WRONG_NUMBER_GROUP_TAGS, - def_name=def_tag_name, - tag_list=[tag for tag in group.tags() - if tag is not definition_tag]) - continue - - group_tag = groups[0] if groups else None - - # final validation - # Verify no other def or def expand tags found in group - if group_tag: - for def_tag in group.find_def_tags(recursive=True, include_groups=0): - new_def_issues += ErrorHandler.format_error_with_context(error_handler, - DefinitionErrors.DEF_TAG_IN_DEFINITION, - tag=def_tag, - def_name=def_tag_name) - continue def_takes_value = def_tag_name.lower().endswith("/#") if def_takes_value: def_tag_name = def_tag_name[:-len("/#")] @@ -138,22 +112,18 @@ def check_for_definitions(self, hed_string_obj, error_handler=None): if "/" in def_tag_lower or "#" in def_tag_lower: new_def_issues += ErrorHandler.format_error_with_context(error_handler, DefinitionErrors.INVALID_DEFINITION_EXTENSION, + tag=definition_tag, def_name=def_tag_name) + + if new_def_issues: + def_issues += new_def_issues continue - # # Verify placeholders here. - placeholder_tags = [] - if group_tag: - for tag in group_tag.get_all_tags(): - if "#" in str(tag): - placeholder_tags.append(tag) + new_def_issues += self._validate_contents(definition_tag, group_tag, error_handler) + new_def_issues += self._validate_placeholders(def_tag_name, group_tag, def_takes_value, error_handler) - if (len(placeholder_tags) == 1) != def_takes_value: - new_def_issues += ErrorHandler.format_error_with_context(error_handler, - DefinitionErrors.WRONG_NUMBER_PLACEHOLDER_TAGS, - def_name=def_tag_name, - tag_list=placeholder_tags, - expected_count=1 if def_takes_value else 0) + if new_def_issues: + def_issues += new_def_issues continue if error_handler: @@ -164,12 +134,95 @@ def check_for_definitions(self, hed_string_obj, error_handler=None): new_def_issues += ErrorHandler.format_error_with_context(error_handler, DefinitionErrors.DUPLICATE_DEFINITION, def_name=def_tag_name) + def_issues += new_def_issues continue self.defs[def_tag_lower] = DefinitionEntry(name=def_tag_name, contents=group_tag, takes_value=def_takes_value, source_context=context) - return new_def_issues + return def_issues + + def _validate_placeholders(self, def_tag_name, group, def_takes_value, error_handler): + new_issues = [] + placeholder_tags = [] + tags_with_issues = [] + if group: + for tag in group.get_all_tags(): + count = str(tag).count("#") + if count: + placeholder_tags.append(tag) + if count > 1: + tags_with_issues.append(tag) + + if tags_with_issues: + new_issues += ErrorHandler.format_error_with_context(error_handler, + DefinitionErrors.WRONG_NUMBER_PLACEHOLDER_TAGS, + def_name=def_tag_name, + tag_list=tags_with_issues, + expected_count=1 if def_takes_value else 0) + + if (len(placeholder_tags) == 1) != def_takes_value: + new_issues += ErrorHandler.format_error_with_context(error_handler, + DefinitionErrors.WRONG_NUMBER_PLACEHOLDER_TAGS, + def_name=def_tag_name, + tag_list=placeholder_tags, + expected_count=1 if def_takes_value else 0) + return new_issues + + if def_takes_value: + placeholder_tag = placeholder_tags[0] + if not placeholder_tag.is_takes_value_tag(): + new_issues += ErrorHandler.format_error_with_context(error_handler, + DefinitionErrors.PLACEHOLDER_NO_TAKES_VALUE, + def_name=def_tag_name, + placeholder_tag=placeholder_tag) + + return new_issues + + def _find_group(self, definition_tag, group, error_handler): + # initial validation + groups = group.groups() + issues = [] + if len(groups) > 1: + issues += \ + ErrorHandler.format_error_with_context(error_handler, + DefinitionErrors.WRONG_NUMBER_GROUPS, + def_name=definition_tag.extension, tag_list=groups) + elif len(groups) == 0: + issues += \ + ErrorHandler.format_error_with_context(error_handler, + DefinitionErrors.NO_DEFINITION_CONTENTS, + def_name=definition_tag.extension) + if len(group.tags()) != 1: + issues += \ + ErrorHandler.format_error_with_context(error_handler, + DefinitionErrors.WRONG_NUMBER_TAGS, + def_name=definition_tag.extension, + tag_list=[tag for tag in group.tags() + if tag is not definition_tag]) + + group_tag = groups[0] if groups else None + + return group_tag, issues + + def _validate_contents(self, definition_tag, group, error_handler): + issues = [] + if group: + for def_tag in group.find_tags({DefTagNames.DEF_KEY, DefTagNames.DEF_EXPAND_KEY, DefTagNames.DEFINITION_KEY}, recursive=True, + include_groups=0): + issues += ErrorHandler.format_error_with_context(error_handler, + DefinitionErrors.DEF_TAG_IN_DEFINITION, + tag=def_tag, + def_name=definition_tag.extension) + + for tag in group.get_all_tags(): + if tag.has_attribute(HedKey.Unique) or tag.has_attribute(HedKey.Required): + issues += ErrorHandler.format_error_with_context(error_handler, + DefinitionErrors.BAD_PROP_IN_DEFINITION, + tag=tag, + def_name=definition_tag.extension) + + return issues def construct_def_tags(self, hed_string_obj): """ Identify def/def-expand tag contents in the given string. diff --git a/hed/models/definition_entry.py b/hed/models/definition_entry.py index ba9f69b6a..5d3f09edd 100644 --- a/hed/models/definition_entry.py +++ b/hed/models/definition_entry.py @@ -22,9 +22,6 @@ def __init__(self, name, contents, takes_value, source_context): self.contents = contents self.takes_value = takes_value self.source_context = source_context - # self.tag_dict = {} - # if contents: - # add_group_to_dict(contents, self.tag_dict) def get_definition(self, replace_tag, placeholder_value=None, return_copy_of_tag=False): """ Return a copy of the definition with the tag expanded and the placeholder plugged in. @@ -66,28 +63,5 @@ def get_definition(self, replace_tag, placeholder_value=None, return_copy_of_tag startpos=replace_tag.span[0], endpos=replace_tag.span[1], contents=output_contents) return f"{DefTagNames.DEF_EXPAND_ORG_KEY}/{name}", output_contents -# -# def add_group_to_dict(group, tag_dict=None): -# """ Add the tags and their values from a HED group to a tag dictionary. -# -# Parameters: -# group (HedGroup): Contents to add to the tag dict. -# tag_dict (dict): The starting tag dictionary to add to. -# -# Returns: -# dict: The updated tag_dict containing the tags with a list of values. -# -# Notes: -# - Expects tags to have forms calculated already. -# -# """ -# if tag_dict is None: -# tag_dict = {} -# for tag in group.get_all_tags(): -# short_base_tag = tag.short_base_tag -# value = tag.extension -# value_dict = tag_dict.get(short_base_tag, {}) -# if value: -# value_dict[value] = '' -# tag_dict[short_base_tag] = value_dict -# return tag_dict + def __str__(self): + return str(self.contents) \ No newline at end of file diff --git a/hed/models/df_util.py b/hed/models/df_util.py index 8d00d6770..6cd4943df 100644 --- a/hed/models/df_util.py +++ b/hed/models/df_util.py @@ -3,9 +3,8 @@ from hed.models.sidecar import Sidecar from hed.models.tabular_input import TabularInput -from hed import HedString +from hed.models.hed_string import HedString from hed.models.definition_dict import DefinitionDict -from hed.models.definition_entry import DefinitionEntry def get_assembled(tabular_file, sidecar, hed_schema, extra_def_dicts=None, join_columns=True, @@ -29,7 +28,7 @@ def get_assembled(tabular_file, sidecar, hed_schema, extra_def_dicts=None, join_ Expand any def tags found Returns: tuple: A list of HedStrings or a list of lists of HedStrings, DefinitionDict - + """ if isinstance(sidecar, str): sidecar = Sidecar(sidecar) @@ -52,7 +51,8 @@ def get_assembled(tabular_file, sidecar, hed_schema, extra_def_dicts=None, join_ return [[HedString(x, hed_schema, def_dict).expand_defs() if expand_defs else HedString(x, hed_schema, def_dict).shrink_defs() if shrink_defs else HedString(x, hed_schema, def_dict) - for x in text_file_row] for text_file_row in tabular_file.dataframe_a.itertuples(index=False)], def_dict + for x in text_file_row] for text_file_row in tabular_file.dataframe_a.itertuples(index=False)], \ + def_dict def convert_to_form(df, hed_schema, tag_form, columns=None): @@ -126,19 +126,17 @@ def expand_defs(df, hed_schema, def_dict, columns=None): def _convert_to_form(hed_string, hed_schema, tag_form): - from hed import HedString return str(HedString(hed_string, hed_schema).get_as_form(tag_form)) def _shrink_defs(hed_string, hed_schema): - from hed import HedString return str(HedString(hed_string, hed_schema).shrink_defs()) def _expand_defs(hed_string, hed_schema, def_dict): - from hed import HedString return str(HedString(hed_string, hed_schema, def_dict).expand_defs()) + def _get_matching_value(tags): # Filter out values equal to "#" and get unique values unique_values = set(tag.extension for tag in tags if tag.extension != "#") @@ -166,4 +164,4 @@ def process_def_expands(hed_strings, hed_schema, known_defs=None, ambiguous_defs """ from hed.models.def_expand_gather import DefExpandGatherer def_gatherer = DefExpandGatherer(hed_schema, known_defs, ambiguous_defs) - return def_gatherer.process_def_expands(hed_strings) \ No newline at end of file + return def_gatherer.process_def_expands(hed_strings) diff --git a/hed/models/hed_group.py b/hed/models/hed_group.py index 64b789ec4..37947a89d 100644 --- a/hed/models/hed_group.py +++ b/hed/models/hed_group.py @@ -517,11 +517,11 @@ def find_def_tags(self, recursive=False, include_groups=3): for group in groups: for child in group.children: if isinstance(child, HedTag): - if child.short_base_tag.lower() == DefTagNames.DEF_KEY: + if child.short_base_tag == DefTagNames.DEF_ORG_KEY: def_tags.append((child, child, group)) else: for tag in child.tags(): - if tag.short_base_tag.lower() == DefTagNames.DEF_EXPAND_KEY: + if tag.short_base_tag == DefTagNames.DEF_EXPAND_ORG_KEY: def_tags.append((tag, child, group)) if include_groups == 0 or include_groups == 1 or include_groups == 2: diff --git a/hed/models/hed_string.py b/hed/models/hed_string.py index 7be20fb5d..7f17df234 100644 --- a/hed/models/hed_string.py +++ b/hed/models/hed_string.py @@ -73,17 +73,11 @@ def remove_definitions(self): """ Remove definition tags and groups from this string. This does not validate definitions and will blindly removing invalid ones as well. - - Returns: - list: An empty list as there are no possible issues, this list is always blank. - """ definition_groups = self.find_top_level_tags({DefTagNames.DEFINITION_KEY}, include_groups=1) if definition_groups: self.remove(definition_groups) - return [] - def shrink_defs(self): """ Replace def-expand tags with def tags @@ -114,7 +108,7 @@ def expand_defs(self): replacements = [] for tag in def_tags: if tag.expandable and not tag.expanded: - replacements.append((tag, tag._expandable)) + replacements.append((tag, tag.expandable)) for tag, group in replacements: tag_parent = tag._parent @@ -333,7 +327,7 @@ def validate(self, hed_schema, allow_placeholders=True, error_handler=None): from hed.validator import HedValidator validator = HedValidator(hed_schema) - return validator.validate(self, allow_placeholders=allow_placeholders) + return validator.validate(self, allow_placeholders=allow_placeholders, error_handler=error_handler) def find_top_level_tags(self, anchor_tags, include_groups=2): """ Find top level groups with an anchor tag. @@ -363,3 +357,13 @@ def find_top_level_tags(self, anchor_tags, include_groups=2): if include_groups == 0 or include_groups == 1: return [tag[include_groups] for tag in top_level_tags] return top_level_tags + + def remove_refs(self): + """ This removes any refs(tags contained entirely inside curly braces) from the string. + + This does NOT validate the contents of the curly braces. This is only relevant when directly + editing sidecar strings. Tools will naturally ignore these. + """ + ref_tags = [tag for tag in self.get_all_tags() if tag.is_column_ref()] + if ref_tags: + self.remove(ref_tags) diff --git a/hed/models/hed_string_group.py b/hed/models/hed_string_group.py index 5fb5a1fd5..14e639f51 100644 --- a/hed/models/hed_string_group.py +++ b/hed/models/hed_string_group.py @@ -30,7 +30,7 @@ def __init__(self, hed_string_obj_list): self._original_children = self._children def get_original_hed_string(self): - return "".join([group._hed_string for group in self._children]) + return ",".join([group._hed_string for group in self._children]) def sort(self): combined_string = HedString.from_hed_strings(self._children) diff --git a/hed/models/hed_tag.py b/hed/models/hed_tag.py index 57fa7e3ad..d124c338e 100644 --- a/hed/models/hed_tag.py +++ b/hed/models/hed_tag.py @@ -237,7 +237,6 @@ def extension(self): def extension(self, x): self._extension_value = f"/{x}" - @property def long_tag(self): """ Long form including value or extension. @@ -298,6 +297,16 @@ def expandable(self): """ return self._expandable + def is_column_ref(self): + """ Returns if this tag is a column reference from a sidecar. + + You should only see these if you are directly accessing sidecar strings, tools should remove them otherwise. + + Returns: + bool: Returns True if this is a column ref + """ + return self.org_tag.startswith('{') and self.org_tag.endswith('}') + def __str__(self): """ Convert this HedTag to a string. diff --git a/hed/models/model_constants.py b/hed/models/model_constants.py index 98cc37091..5fdb54cda 100644 --- a/hed/models/model_constants.py +++ b/hed/models/model_constants.py @@ -13,11 +13,14 @@ class DefTagNames: DEF_KEY = DEF_ORG_KEY.lower() DEF_EXPAND_KEY = DEF_EXPAND_ORG_KEY.lower() DEFINITION_KEY = DEFINITION_ORG_KEY.lower() + DEF_KEYS = (DEF_KEY, DEF_EXPAND_KEY) ONSET_ORG_KEY = "Onset" OFFSET_ORG_KEY = "Offset" + INSET_ORG_KEY = "Inset" ONSET_KEY = ONSET_ORG_KEY.lower() OFFSET_KEY = OFFSET_ORG_KEY.lower() + INSET_KEY = INSET_ORG_KEY.lower() - DEF_KEYS = (DEF_KEY, DEF_EXPAND_KEY) \ No newline at end of file + TEMPORAL_KEYS = {ONSET_KEY, OFFSET_KEY, INSET_KEY} diff --git a/hed/models/sidecar.py b/hed/models/sidecar.py index 958cadfba..d48165e59 100644 --- a/hed/models/sidecar.py +++ b/hed/models/sidecar.py @@ -1,4 +1,6 @@ import json +import re + from hed.models.column_metadata import ColumnMetadata from hed.errors.error_types import ErrorContext from hed.errors import ErrorHandler @@ -8,7 +10,6 @@ from hed.models.definition_dict import DefinitionDict -# todo: Add/improve validation for definitions being in known columns(right now it just assumes they aren't) class Sidecar: """ Contents of a JSON file or merged file. @@ -33,7 +34,25 @@ def __iter__(self): iterator: An iterator over the column metadata values. """ - return iter(self.column_data) + return iter(self.column_data.values()) + + def __getitem__(self, column_name): + if column_name not in self.loaded_dict: + return None + return ColumnMetadata(name=column_name) + + @property + def all_hed_columns(self): + """ Returns all columns that are HED compatible + + returns: + column_refs(list): A list of all valid hed columns by name + """ + possible_column_references = [column.column_name for column in self if column.column_type != ColumnType.Ignore] + if "HED" not in possible_column_references: + possible_column_references.append("HED") + + return possible_column_references @property def def_dict(self): @@ -53,20 +72,7 @@ def column_data(self): Returns: list(ColumnMetadata): the list of column metadata defined by this sidecar """ - for col_name, col_dict in self.loaded_dict.items(): - yield self._generate_single_column(col_name, col_dict) - - def set_hed_string(self, new_hed_string, position): - """ Set a provided column/category key/etc. - - Parameters: - new_hed_string (str or HedString): The new hed_string to replace the value at position. - position (tuple): The (HedString, str, list) tuple returned from hed_string_iter. - - """ - column_name, position = position - hed_dict = self.loaded_dict[column_name] - hed_dict["HED"] = self._set_hed_string_low(new_hed_string, hed_dict["HED"], position) + return {col_name: ColumnMetadata(name=col_name, source=self.loaded_dict) for col_name in self.loaded_dict} def get_def_dict(self, hed_schema=None, extra_def_dicts=None): """ Returns the definition dict for this sidecar. @@ -186,56 +192,6 @@ def _load_json_file(self, fp): except json.decoder.JSONDecodeError as e: raise HedFileError(HedExceptions.CANNOT_PARSE_JSON, str(e), self.name) - def _generate_single_column(self, column_name, dict_for_entry, column_type=None): - """ Create a single column metadata entry and add to this sidecar. - - Parameters: - column_name (str or int): The column name or number - dict_for_entry (dict): The loaded dictionary for a given column entry (needs the "HED" key if nothing else). - column_type (ColumnType): Optional indicator of how to treat the column. - This overrides auto-detection from the dict_for_entry. - - """ - if column_type is None: - column_type = self._detect_column_type(dict_for_entry) - if dict_for_entry: - hed_dict = dict_for_entry.get("HED") - else: - hed_dict = None - column_entry = ColumnMetadata(column_type, column_name, hed_dict) - return column_entry - - @staticmethod - def _detect_column_type(dict_for_entry): - """ Determine the ColumnType of a given json entry. - - Parameters: - dict_for_entry (dict): The loaded json entry a specific column. - Generally has a "HED" entry among other optional ones. - - Returns: - ColumnType: The determined type of given column. Returns None if unknown. - - """ - if not dict_for_entry or not isinstance(dict_for_entry, dict): - return ColumnType.Ignore - - minimum_required_keys = ("HED",) - if not set(minimum_required_keys).issubset(dict_for_entry.keys()): - return ColumnType.Ignore - - hed_entry = dict_for_entry["HED"] - if isinstance(hed_entry, dict): - return ColumnType.Categorical - - if not isinstance(hed_entry, str): - return None - - if "#" not in dict_for_entry["HED"]: - return None - - return ColumnType.Value - def extract_definitions(self, hed_schema=None, error_handler=None): """ Gather and validate definitions in metadata. @@ -253,106 +209,40 @@ def extract_definitions(self, hed_schema=None, error_handler=None): self._extract_definition_issues = [] if hed_schema: - for hed_string, column_data, _ in self.hed_string_iter(error_handler): - hed_string_obj = HedString(hed_string, hed_schema) - error_handler.push_error_context(ErrorContext.HED_STRING, hed_string_obj) - self._extract_definition_issues += def_dict.check_for_definitions(hed_string_obj, error_handler) - error_handler.pop_error_context() - - return def_dict - - def hed_string_iter(self, error_handler=None): - """ Gather and validate definitions in metadata. - - Parameters: - error_handler (ErrorHandler): The error handler to use for context, uses a default one if None. - - Yields: - str: The hed string at a given column and key position. - column_data: the column data for the given string. - position: blackbox(pass back to set this string to a new value) - - """ - if error_handler is None: - error_handler = ErrorHandler() - - for column_data in self.column_data: - error_handler.push_error_context(ErrorContext.SIDECAR_COLUMN_NAME, column_data.column_name) - hed_dict = column_data.hed_dict - for (hed_string, position) in self._hed_string_iter(hed_dict, error_handler): - yield hed_string, column_data, position - error_handler.pop_error_context() + for column_data in self: + error_handler.push_error_context(ErrorContext.SIDECAR_COLUMN_NAME, column_data.column_name) + hed_strings = column_data.get_hed_strings() + for key_name, hed_string in hed_strings.items(): + hed_string_obj = HedString(hed_string, hed_schema) + if len(hed_strings) > 1: + error_handler.push_error_context(ErrorContext.SIDECAR_KEY_NAME, key_name) + error_handler.push_error_context(ErrorContext.HED_STRING, hed_string_obj) + self._extract_definition_issues += def_dict.check_for_definitions(hed_string_obj, error_handler) + error_handler.pop_error_context() + if len(hed_strings) > 1: + error_handler.pop_error_context() - @staticmethod - def _hed_string_iter(hed_strings, error_handler): - """ Iterate over the given dict of strings - - Parameters: - hed_strings(dict or str): A hed_string or dict of hed strings - error_handler (ErrorHandler): The error handler to use for context, uses a default one if none. - - Yields: - tuple: - - str: The hed string at a given column and key position. - - str: Indication of the where hed string was loaded from, so it can be later set by the user. - - """ - for hed_string, key_name in Sidecar._hed_iter_low(hed_strings): - if key_name: - error_handler.push_error_context(ErrorContext.SIDECAR_KEY_NAME, key_name) - yield hed_string, key_name - if key_name: error_handler.pop_error_context() - @staticmethod - def _hed_iter_low(hed_strings): - """ Iterate over the hed string entries. - - Used by hed_string_iter + return def_dict - Parameters: - hed_strings(dict or str): A hed_string or dict of hed strings + def get_column_refs(self): + """ Returns a list of column refs found in this sidecar. - Yields: - tuple: - - str: Individual hed strings for different entries. - - str: The position to pass back to set this string. + This does not validate + Returns: + column_refs(list): A list of unique column refs found """ - if isinstance(hed_strings, dict): - for key, hed_string in hed_strings.items(): - if not isinstance(hed_string, str): - continue - yield hed_string, key - elif isinstance(hed_strings, str): - yield hed_strings, None - - @staticmethod - def _set_hed_string_low(new_hed_string, hed_strings, position=None): - """ Set a hed string for a category key/etc. - Parameters: - new_hed_string (str or HedString): The new hed_string to replace the value at position. - hed_strings(dict or str or HedString): The hed strings we want to update - position (str, optional): This should only be a value returned from hed_string_iter. + found_vals = set() + for column_data in self: + if column_data.column_type == ColumnType.Ignore: + continue + hed_strings = column_data.get_hed_strings() + matches = hed_strings.str.findall(r"\{([a-z_\-0-9]+)\}", re.IGNORECASE) + u_vals = [match for sublist in matches for match in sublist] - Returns: - updated_string (str or dict): The newly updated string/dict. - Raises: - TypeError: If the mapping cannot occur. - - """ - if isinstance(hed_strings, dict): - if position is None: - raise TypeError("Error: Trying to set a category HED string with no category") - if position not in hed_strings: - raise TypeError("Error: Not allowed to add new categories to a column") - hed_strings[position] = str(new_hed_string) - elif isinstance(hed_strings, (str, HedString)): - if position is not None: - raise TypeError("Error: Trying to set a value HED string with a category") - hed_strings = str(new_hed_string) - else: - raise TypeError("Error: Trying to set a HED string on a column_type that doesn't support it.") + found_vals.update(u_vals) - return hed_strings + return list(found_vals) diff --git a/hed/models/spreadsheet_input.py b/hed/models/spreadsheet_input.py index b48f6985f..1c9b98520 100644 --- a/hed/models/spreadsheet_input.py +++ b/hed/models/spreadsheet_input.py @@ -16,16 +16,16 @@ def __init__(self, file=None, file_type=None, worksheet_name=None, tag_columns=N worksheet_name (str or None): The name of the Excel workbook worksheet that contains the HED tags. Not applicable to tsv files. If omitted for Excel, the first worksheet is assumed. tag_columns (list): A list of ints containing the columns that contain the HED tags. - The default value is [2] indicating only the second column has tags. + The default value is [1] indicating only the second column has tags. has_column_names (bool): True if file has column names. Validation will skip over the first line of the file if the spreadsheet as column names. - column_prefix_dictionary (dict): A dictionary with column number keys and prefix values. - This is partially deprecated - what this now turns the given columns into Value columns. - Examples: - A prefix dictionary {3: 'Label/', 5: 'Description/'} indicates that column 3 and 5 have HED tags - that need to be prefixed by Label/ and Description/ respectively. - Column numbers 3 and 5 should also be included in the tag_columns list. - + column_prefix_dictionary (dict): Dictionary with keys that are column numbers/names and values are HED tag + prefixes to prepend to the tags in that column before processing. + May be deprecated/renamed. These are no longer prefixes, but rather converted to value columns. + eg. {"key": "Description", 1: "Label/"} will turn into value columns as + {"key": "Description/#", 1: "Label/#"} + Note: It will be a validation issue if column 1 is called "key" in the above example. + This means it no longer accepts anything but the value portion only in the columns. """ if tag_columns is None: tag_columns = [1] diff --git a/hed/models/tabular_input.py b/hed/models/tabular_input.py index 388718fb9..8a6d5c5f8 100644 --- a/hed/models/tabular_input.py +++ b/hed/models/tabular_input.py @@ -15,7 +15,6 @@ def __init__(self, file=None, sidecar=None, name=None): Parameters: file (str or file like): A tsv file to open. sidecar (str or Sidecar): A Sidecar filename or Sidecar - Note: If this is a string you MUST also pass hed_schema. name (str): The name to display for this file for error purposes. """ if sidecar and not isinstance(sidecar, Sidecar): @@ -42,3 +41,30 @@ def reset_column_mapper(self, sidecar=None): new_mapper = ColumnMapper(sidecar=sidecar, optional_tag_columns=[self.HED_COLUMN_NAME]) self.reset_mapper(new_mapper) + + def get_def_dict(self, hed_schema=None, extra_def_dicts=None): + """ Returns the definition dict for this sidecar. + + Parameters: + hed_schema(HedSchema): used to identify tags to find definitions + extra_def_dicts (list, DefinitionDict, or None): Extra dicts to add to the list. + + Returns: + DefinitionDict: A single definition dict representing all the data(and extra def dicts) + """ + if self._sidecar: + return self._sidecar.get_def_dict(hed_schema, extra_def_dicts) + else: + super().get_def_dict(hed_schema, extra_def_dicts) + + def get_column_refs(self): + """ Returns a list of column refs for this file. + + Default implementation returns none. + + Returns: + column_refs(list): A list of unique column refs found + """ + if self._sidecar: + return self._sidecar.get_column_refs() + return [] diff --git a/hed/schema/hed_schema.py b/hed/schema/hed_schema.py index 47bfe53df..bcd93be8b 100644 --- a/hed/schema/hed_schema.py +++ b/hed/schema/hed_schema.py @@ -1,3 +1,5 @@ +import os +import shutil from hed.schema.hed_schema_constants import HedKey, HedSectionKey from hed.schema import hed_schema_constants as constants @@ -6,7 +8,7 @@ from hed.schema.schema_io.schema2wiki import HedSchema2Wiki from hed.schema import schema_validation_util -from hed.schema.hed_schema_section import HedSchemaSection, HedSchemaTagSection +from hed.schema.hed_schema_section import HedSchemaSection, HedSchemaTagSection, HedSchemaUnitClassSection from hed.errors import ErrorHandler from hed.errors.error_types import ValidationErrors @@ -84,7 +86,7 @@ def merged(self): """ - return self.header_attributes.get(constants.MERGED_ATTRIBUTE, "") + return not self.header_attributes.get(constants.UNMERGED_ATTRIBUTE, "") def get_save_header_attributes(self, save_merged=False): """ returns the attributes that should be saved. @@ -93,11 +95,12 @@ def get_save_header_attributes(self, save_merged=False): sort_to_start = "!!!!!!!!!!!!!!" header_attributes = dict(sorted(self.header_attributes.items(), key=lambda x: sort_to_start if x[0] == constants.VERSION_ATTRIBUTE else x[0], reverse=False)) if save_merged: - # make sure it's the last attribute(just to make sure it's in an order) - header_attributes.pop(constants.MERGED_ATTRIBUTE, None) - header_attributes[constants.MERGED_ATTRIBUTE] = "True" + header_attributes.pop(constants.UNMERGED_ATTRIBUTE, None) else: - header_attributes.pop(constants.MERGED_ATTRIBUTE, None) + # make sure it's the last attribute(just to make sure it's in an order) + header_attributes.pop(constants.UNMERGED_ATTRIBUTE, None) + header_attributes[constants.UNMERGED_ATTRIBUTE] = "True" + return header_attributes @@ -137,8 +140,8 @@ def get_as_mediawiki_string(self, save_merged=False): """ Return the schema to a mediawiki string. save_merged: bool - If true, this will save the schema as a merged schema if it is a "with-standard" schema. - If it is not a "with-standard" schema, this setting has no effect. + If true, this will save the schema as a merged schema if it is a "withStandard" schema. + If it is not a "withStandard" schema, this setting has no effect. Returns: str: The schema as a string in mediawiki format. @@ -147,12 +150,12 @@ def get_as_mediawiki_string(self, save_merged=False): output_strings = schema2wiki.process_schema(self, save_merged) return '\n'.join(output_strings) - def get_as_xml_string(self, save_merged=False): + def get_as_xml_string(self, save_merged=True): """ Return the schema to an XML string. save_merged: bool - If true, this will save the schema as a merged schema if it is a "with-standard" schema. - If it is not a "with-standard" schema, this setting has no effect. + If true, this will save the schema as a merged schema if it is a "withStandard" schema. + If it is not a "withStandard" schema, this setting has no effect. Returns: str: Return the schema as an XML string. @@ -161,33 +164,50 @@ def get_as_xml_string(self, save_merged=False): xml_tree = schema2xml.process_schema(self, save_merged) return schema_util._xml_element_2_str(xml_tree) - def save_as_mediawiki(self, save_merged=False): + def save_as_mediawiki(self, filename=None, save_merged=False): """ Save as mediawiki to a temporary file. + filename: str + If present, move the resulting file to this location. save_merged: bool - If true, this will save the schema as a merged schema if it is a "with-standard" schema. - If it is not a "with-standard" schema, this setting has no effect. + If true, this will save the schema as a merged schema if it is a "withStandard" schema. + If it is not a "withStandard" schema, this setting has no effect. + Returns: str: The newly created schema filename. - """ schema2wiki = HedSchema2Wiki() output_strings = schema2wiki.process_schema(self, save_merged) local_wiki_file = schema_util.write_strings_to_file(output_strings, ".mediawiki") + if filename: + directory = os.path.dirname(filename) + if directory and not os.path.exists(directory): + os.makedirs(directory) + shutil.move(local_wiki_file, filename) + return filename return local_wiki_file - def save_as_xml(self, save_merged=False): + def save_as_xml(self, filename=None, save_merged=True): """ Save as XML to a temporary file. + filename: str + If present, move the resulting file to this location. + save_merged: bool + If true, this will save the schema as a merged schema if it is a "withStandard" schema. + If it is not a "withStandard" schema, this setting has no effect. + Returns: str: The name of the newly created schema file. - save_merged: bool - If true, this will save the schema as a merged schema if it is a "with-standard" schema. - If it is not a "with-standard" schema, this setting has no effect. """ schema2xml = HedSchema2XML() xml_tree = schema2xml.process_schema(self, save_merged) local_xml_file = schema_util.write_xml_tree_2_xml_file(xml_tree, ".xml") + if filename: + directory = os.path.dirname(filename) + if directory and not os.path.exists(directory): + os.makedirs(directory) + shutil.move(local_xml_file, filename) + return filename return local_xml_file def set_schema_prefix(self, schema_prefix): @@ -691,7 +711,7 @@ def _create_empty_sections(): dictionaries[HedSectionKey.Attributes] = HedSchemaSection(HedSectionKey.Attributes) dictionaries[HedSectionKey.UnitModifiers] = HedSchemaSection(HedSectionKey.UnitModifiers) dictionaries[HedSectionKey.Units] = HedSchemaSection(HedSectionKey.Units) - dictionaries[HedSectionKey.UnitClasses] = HedSchemaSection(HedSectionKey.UnitClasses) + dictionaries[HedSectionKey.UnitClasses] = HedSchemaUnitClassSection(HedSectionKey.UnitClasses) dictionaries[HedSectionKey.ValueClasses] = HedSchemaSection(HedSectionKey.ValueClasses) dictionaries[HedSectionKey.AllTags] = HedSchemaTagSection(HedSectionKey.AllTags, case_sensitive=False) @@ -768,6 +788,14 @@ def _get_attributes_for_section(self, key_class): # =============================================== # Semi private function used to create a schema in memory(usually from a source file) # =============================================== - def _add_tag_to_dict(self, long_tag_name, key_class): + def _add_tag_to_dict(self, long_tag_name, new_entry, key_class): + # No reason we can't add this here always + if self.library and not self.merged and self.with_standard: + new_entry.set_attribute_value(HedKey.InLibrary, self.library) + + section = self._sections[key_class] + return section._add_to_dict(long_tag_name, new_entry) + + def _create_tag_entry(self, long_tag_name, key_class): section = self._sections[key_class] - return section._add_to_dict(long_tag_name) + return section._create_tag_entry(long_tag_name) \ No newline at end of file diff --git a/hed/schema/hed_schema_constants.py b/hed/schema/hed_schema_constants.py index 60ff97e5e..d5c65a6d7 100644 --- a/hed/schema/hed_schema_constants.py +++ b/hed/schema/hed_schema_constants.py @@ -39,6 +39,7 @@ class HedKey: ValueClass = "valueClass" RelatedTag = "relatedTag" SuggestedTag = "suggestedTag" + Rooted = "rooted" # All known properties BoolProperty = 'boolProperty' @@ -66,5 +67,5 @@ class HedKey: VERSION_ATTRIBUTE = 'version' LIBRARY_ATTRIBUTE = 'library' -WITH_STANDARD_ATTRIBUTE = "with-standard" -MERGED_ATTRIBUTE = "merged" \ No newline at end of file +WITH_STANDARD_ATTRIBUTE = "withStandard" +UNMERGED_ATTRIBUTE = "unmerged" \ No newline at end of file diff --git a/hed/schema/hed_schema_entry.py b/hed/schema/hed_schema_entry.py index 396392a1e..2c335b882 100644 --- a/hed/schema/hed_schema_entry.py +++ b/hed/schema/hed_schema_entry.py @@ -139,7 +139,6 @@ def __init__(self, *args, **kwargs): self._units = [] self.units = [] self.derivative_units = [] - self.unit_class_entry = None def add_unit(self, unit_entry): """ Add the given unit entry to this unit class. @@ -170,6 +169,12 @@ def finalize_entry(self, schema): derivative_units[modifier.name + derived_unit] = unit_entry self.derivative_units = derivative_units + def __eq__(self, other): + if not super().__eq__(other): + return False + if self.units != other.units: + return False + return True class UnitEntry(HedSchemaEntry): """ A single unit entry with modifiers in the HedSchema. """ @@ -188,7 +193,6 @@ def finalize_entry(self, schema): """ self.unit_modifiers = schema.get_modifiers_for_unit(self.name) - class HedTagEntry(HedSchemaEntry): """ A single tag entry in the HedSchema. """ def __init__(self, *args, **kwargs): @@ -202,36 +206,6 @@ def __init__(self, *args, **kwargs): self._parent_tag = None self.tag_terms = tuple() - @staticmethod - def get_fake_tag_entry(tag, tags_to_identify): - """ Create a tag entry if a given a tag has a match in a list of possible short tags. - - Parameters: - tag (str): The short/mid/long form tag to identify. - tags_to_identify (list): A list of lowercase short tags to identify. - - Returns: - tuple: - - HedTagEntry or None: The fake entry showing the short tag name as the found tag. - - str: The remaining text after the located short tag, which may be empty. - - Notes: - - The match is done left to right. - - """ - split_names = tag.split("/") - index = 0 - for name in split_names: - if name.lower() in tags_to_identify: - fake_entry = HedTagEntry(name=tag[:index + len(name)], section=None) - fake_entry.long_tag_name = fake_entry.name - fake_entry.short_tag_name = name - return fake_entry, tag[index + len(name):] - - index += len(name) + 1 - - return None, "" - def any_parent_has_attribute(self, attribute): """ Check if tag (or parents) has the attribute. @@ -271,6 +245,19 @@ def base_tag_has_attribute(self, tag_attribute): return base_entry.has_attribute(tag_attribute) + @property + def parent(self): + """Get the parent entry of this tag""" + return self._parent_tag + + @property + def parent_name(self): + """Gets the parent tag entry name""" + if self._parent_tag: + return self._parent_tag.name + parent_name, _, child_name = self.name.rpartition("/") + return parent_name + def finalize_entry(self, schema): """ Called once after schema loading to set state. diff --git a/hed/schema/hed_schema_io.py b/hed/schema/hed_schema_io.py index a1ab5281a..3f022d483 100644 --- a/hed/schema/hed_schema_io.py +++ b/hed/schema/hed_schema_io.py @@ -152,7 +152,7 @@ def _load_schema_version(xml_version=None, xml_folder=None): final_hed_xml_file = hed_cache.get_hed_version_path(xml_version, library_name, xml_folder) hed_schema = load_schema(final_hed_xml_file) except HedFileError as e: - if e.error_type == HedExceptions.FILE_NOT_FOUND: + if e.code == HedExceptions.FILE_NOT_FOUND: hed_cache.cache_xml_versions(cache_folder=xml_folder) final_hed_xml_file = hed_cache.get_hed_version_path(xml_version, library_name, xml_folder) if not final_hed_xml_file: diff --git a/hed/schema/hed_schema_section.py b/hed/schema/hed_schema_section.py index 3d1af3e84..c0cf21cfc 100644 --- a/hed/schema/hed_schema_section.py +++ b/hed/schema/hed_schema_section.py @@ -1,5 +1,5 @@ from hed.schema.hed_schema_entry import HedSchemaEntry, UnitClassEntry, UnitEntry, HedTagEntry -from hed.schema.hed_schema_constants import HedSectionKey +from hed.schema.hed_schema_constants import HedSectionKey, HedKey entries_by_section = { @@ -21,7 +21,7 @@ def __init__(self, section_key, case_sensitive=True): Parameters: section_key (HedSectionKey): Name of the schema section. - case_sensitive (bool): If True, names are case sensitive. + case_sensitive (bool): If True, names are case-sensitive. """ # {lower_case_name: HedSchemaEntry} @@ -46,13 +46,12 @@ def section_key(self): def duplicate_names(self): return self._duplicate_names - def _add_to_dict(self, name): - """ Add a name to the dictionary for this section. """ - name_key = name - if not self.case_sensitive: - name_key = name.lower() - + def _create_tag_entry(self, name): new_entry = self._section_entry(name, self) + return new_entry + + def _check_if_duplicate(self, name_key, new_entry): + return_entry = new_entry if name_key in self.all_names: if name_key not in self._duplicate_names: self._duplicate_names[name_key] = [self.all_names[name_key]] @@ -60,8 +59,20 @@ def _add_to_dict(self, name): else: self.all_names[name_key] = new_entry - self.all_entries.append(new_entry) - return new_entry + return return_entry + + def _add_to_dict(self, name, new_entry, parent_index=None): + """ Add a name to the dictionary for this section. """ + name_key = name + if not self.case_sensitive: + name_key = name.lower() + + return_entry = self._check_if_duplicate(name_key, new_entry) + + if parent_index is None: + parent_index = len(self.all_entries) + self.all_entries.insert(parent_index, new_entry) + return return_entry def get_entries_with_attribute(self, attribute_name, return_name_only=False, schema_prefix=""): """ Return entries or names with given attribute. @@ -136,6 +147,14 @@ def __bool__(self): return bool(self.all_names) +class HedSchemaUnitClassSection(HedSchemaSection): + def _check_if_duplicate(self, name_key, new_entry): + if name_key in self and len(new_entry.attributes) == 1\ + and HedKey.InLibrary in new_entry.attributes: + return self.all_names[name_key] + return super()._check_if_duplicate(name_key, new_entry) + + class HedSchemaTagSection(HedSchemaSection): """ A section of the schema. """ @@ -144,24 +163,28 @@ def __init__(self, *args, case_sensitive=False, **kwargs): # This dict contains all forms of all tags. The .all_names variable has ONLY the long forms. self.long_form_tags = {} - self._duplicate_terms = {} - - def _add_to_dict(self, name): + @staticmethod + def _get_tag_forms(name): name_key = name tag_forms = [] while name_key: tag_forms.append(name_key) slash_index = name_key.find("/") if slash_index == -1: - name_key = None + break else: name_key = name_key[slash_index + 1:] # We can't add value tags by themselves if tag_forms[-1] == "#": tag_forms = tag_forms[:-1] - new_entry = super()._add_to_dict(name) + return name_key, tag_forms + + def _create_tag_entry(self, name): + new_entry = super()._create_tag_entry(name) + + _, tag_forms = self._get_tag_forms(name) # remove the /# if present, but only from the entry, not from the lookups # This lets us easily use source_tag + remainder instead of having to strip off the /# later. short_name = tag_forms[-1] @@ -172,22 +195,39 @@ def _add_to_dict(self, name): new_entry.long_tag_name = long_tag_name new_entry.short_tag_name = short_name - for tag_key in tag_forms: - name_key = tag_key.lower() - if name_key in self.long_form_tags: - if name_key not in self._duplicate_terms: - self._duplicate_terms[name_key] = [self.long_form_tags[name_key]] - self._duplicate_terms[name_key].append(new_entry) - else: + return new_entry + + def _check_if_duplicate(self, name, new_entry): + name_key, tag_forms = self._get_tag_forms(name) + if name_key in self: + if name_key not in self._duplicate_names: + self._duplicate_names[name_key] = [self.get(name_key)] + self._duplicate_names[name_key].append(new_entry) + else: + self.all_names[name] = new_entry + for tag_key in tag_forms: + name_key = tag_key.lower() self.long_form_tags[name_key] = new_entry return new_entry - @property - def duplicate_names(self): - combined_with_terms = self._duplicate_names.copy() - combined_with_terms.update(self._duplicate_terms) - return combined_with_terms + def _add_to_dict(self, name, new_entry, parent_index=None): + if new_entry.has_attribute(HedKey.Rooted): + del new_entry.attributes[HedKey.Rooted] + if new_entry.has_attribute(HedKey.InLibrary): + parent_name = new_entry.parent_name + if parent_name.lower() in self: + # Make sure we insert the new entry after all previous relevant ones, as order isn't assured + # for rooted tags + parent_entry = self.get(parent_name.lower()) + parent_index = self.all_entries.index(parent_entry) + for i in range(parent_index, len(self.all_entries)): + if self.all_entries[i].name.startswith(parent_entry.name): + parent_index = i + 1 + continue + break + + return super()._add_to_dict(name, new_entry, parent_index) def get(self, key): if not self.case_sensitive: diff --git a/hed/schema/schema_compliance.py b/hed/schema/schema_compliance.py index c0b821723..ddb222663 100644 --- a/hed/schema/schema_compliance.py +++ b/hed/schema/schema_compliance.py @@ -49,6 +49,7 @@ def check_compliance(hed_schema, check_for_warnings=True, name=None, error_handl HedKey.RelatedTag: tag_exists_check, HedKey.UnitClass: tag_is_placeholder_check, HedKey.ValueClass: tag_is_placeholder_check, + HedKey.Rooted: tag_exists_base_schema_check, } # Check attributes @@ -69,7 +70,11 @@ def check_compliance(hed_schema, check_for_warnings=True, name=None, error_handl # Check duplicate names for name, duplicate_entries in hed_schema[section_key].duplicate_names.items(): - issues_list += error_handler.format_error_with_context(SchemaErrors.HED_SCHEMA_DUPLICATE_NODE, name, + values = set(entry.has_attribute(HedKey.InLibrary) for entry in duplicate_entries) + error_code = SchemaErrors.HED_SCHEMA_DUPLICATE_NODE + if len(values) == 2: + error_code = SchemaErrors.HED_SCHEMA_DUPLICATE_FROM_LIBRARY + issues_list += error_handler.format_error_with_context(error_code, name, duplicate_tag_list=[entry.name for entry in duplicate_entries], section=section_key) @@ -113,6 +118,30 @@ def tag_is_placeholder_check(hed_schema, tag_entry, possible_tags, force_issues_ return issues +def attribute_does_not_exist_check(hed_schema, tag_entry, attribute_name, force_issues_as_warnings=True): + """ Throws an error saying this is a bad attribute if found. + + Parameters: + hed_schema (HedSchema): The schema to check if the tag exists. + tag_entry (HedSchemaEntry): The schema entry for this tag. + attribute_name (str): the attribute name we're looking for + force_issues_as_warnings (bool): If True sets all the severity levels to warning. + + Returns: + list: A list of issues. Each issue is a dictionary. + + """ + issues = [] + issues += ErrorHandler.format_error(SchemaWarnings.INVALID_ATTRIBUTE, tag_entry.name, + attribute_name) + + if force_issues_as_warnings: + for issue in issues: + issue['severity'] = ErrorSeverity.WARNING + + return issues + + def tag_exists_check(hed_schema, tag_entry, possible_tags, force_issues_as_warnings=True): """ Check if comma separated list are valid HedTags. @@ -141,6 +170,33 @@ def tag_exists_check(hed_schema, tag_entry, possible_tags, force_issues_as_warni return issues +def tag_exists_base_schema_check(hed_schema, tag_entry, tag_name, force_issues_as_warnings=True): + """ Check if the single tag is a partnered schema tag + + Parameters: + hed_schema (HedSchema): The schema to check if the tag exists. + tag_entry (HedSchemaEntry): The schema entry for this tag. + tag_name (str): The tag to verify, can be any form. + force_issues_as_warnings (bool): If True, set all the severity levels to warning. + + Returns: + list: A list of issues. Each issue is a dictionary. + + """ + issues = [] + rooted_tag = tag_name.lower() + if rooted_tag not in hed_schema.all_tags: + issues += ErrorHandler.format_error(ValidationErrors.NO_VALID_TAG_FOUND, + rooted_tag, + index_in_tag=0, + index_in_tag_end=len(rooted_tag)) + + if force_issues_as_warnings: + for issue in issues: + issue['severity'] = ErrorSeverity.WARNING + return issues + + def validate_schema_term(hed_term): """ Check short tag for capitalization and illegal characters. diff --git a/hed/schema/schema_data/HED8.2.0.xml b/hed/schema/schema_data/HED8.2.0.xml new file mode 100644 index 000000000..1f55c7ae8 --- /dev/null +++ b/hed/schema/schema_data/HED8.2.0.xml @@ -0,0 +1,7296 @@ + + + The HED standard schema is a hierarchically-organized vocabulary for annotating events and experimental structure. HED annotations consist of comma-separated tags drawn from this vocabulary. This vocabulary can be augmented by terms drawn from specialized library schema. + +Each term in this vocabulary has a human-readable description and may include additional attributes that give additional properties or that specify how tools should treat the tag during analysis. The meaning of these attributes is described in the Additional schema properties section. + + + + + Event + Something that happens at a given time and (typically) place. Elements of this tag subtree designate the general category in which an event falls. + + suggestedTag + Task-property + + + Sensory-event + Something perceivable by the participant. An event meant to be an experimental stimulus should include the tag Task-property/Task-event-role/Experimental-stimulus. + + suggestedTag + Task-event-role + Sensory-presentation + + + + Agent-action + Any action engaged in by an agent (see the Agent subtree for agent categories). A participant response to an experiment stimulus should include the tag Agent-property/Agent-task-role/Experiment-participant. + + suggestedTag + Task-event-role + Agent + + + + Data-feature + An event marking the occurrence of a data feature such as an interictal spike or alpha burst that is often added post hoc to the data record. + + suggestedTag + Data-property + + + + Experiment-control + An event pertaining to the physical control of the experiment during its operation. + + + Experiment-procedure + An event indicating an experimental procedure, as in performing a saliva swab during the experiment or administering a survey. + + + Experiment-structure + An event specifying a change-point of the structure of experiment. This event is typically used to indicate a change in experimental conditions or tasks. + + + Measurement-event + A discrete measure returned by an instrument. + + suggestedTag + Data-property + + + + + Agent + Someone or something that takes an active role or produces a specified effect.The role or effect may be implicit. Being alive or performing an activity such as a computation may qualify something to be an agent. An agent may also be something that simulates something else. + + suggestedTag + Agent-property + + + Animal-agent + An agent that is an animal. + + + Avatar-agent + An agent associated with an icon or avatar representing another agent. + + + Controller-agent + An agent experiment control software or hardware. + + + Human-agent + A person who takes an active role or produces a specified effect. + + + Robotic-agent + An agent mechanical device capable of performing a variety of often complex tasks on command or by being programmed in advance. + + + Software-agent + An agent computer program. + + + + Action + Do something. + + extensionAllowed + + + Communicate + Convey knowledge of or information about something. + + Communicate-gesturally + Communicate nonverbally using visible bodily actions, either in place of speech or together and in parallel with spoken words. Gestures include movement of the hands, face, or other parts of the body. + + relatedTag + Move-face + Move-upper-extremity + + + Clap-hands + Strike the palms of against one another resoundingly, and usually repeatedly, especially to express approval. + + + Clear-throat + Cough slightly so as to speak more clearly, attract attention, or to express hesitancy before saying something awkward. + + relatedTag + Move-face + Move-head + + + + Frown + Express disapproval, displeasure, or concentration, typically by turning down the corners of the mouth. + + relatedTag + Move-face + + + + Grimace + Make a twisted expression, typically expressing disgust, pain, or wry amusement. + + relatedTag + Move-face + + + + Nod-head + Tilt head in alternating up and down arcs along the sagittal plane. It is most commonly, but not universally, used to indicate agreement, acceptance, or acknowledgement. + + relatedTag + Move-head + + + + Pump-fist + Raise with fist clenched in triumph or affirmation. + + relatedTag + Move-upper-extremity + + + + Raise-eyebrows + Move eyebrows upward. + + relatedTag + Move-face + Move-eyes + + + + Shake-fist + Clench hand into a fist and shake to demonstrate anger. + + relatedTag + Move-upper-extremity + + + + Shake-head + Turn head from side to side as a way of showing disagreement or refusal. + + relatedTag + Move-head + + + + Shhh + Place finger over lips and possibly uttering the syllable shhh to indicate the need to be quiet. + + relatedTag + Move-upper-extremity + + + + Shrug + Lift shoulders up towards head to indicate a lack of knowledge about a particular topic. + + relatedTag + Move-upper-extremity + Move-torso + + + + Smile + Form facial features into a pleased, kind, or amused expression, typically with the corners of the mouth turned up and the front teeth exposed. + + relatedTag + Move-face + + + + Spread-hands + Spread hands apart to indicate ignorance. + + relatedTag + Move-upper-extremity + + + + Thumbs-down + Extend the thumb downward to indicate disapproval. + + relatedTag + Move-upper-extremity + + + + Thumb-up + Extend the thumb upward to indicate approval. + + relatedTag + Move-upper-extremity + + + + Wave + Raise hand and move left and right, as a greeting or sign of departure. + + relatedTag + Move-upper-extremity + + + + Widen-eyes + Open eyes and possibly with eyebrows lifted especially to express surprise or fear. + + relatedTag + Move-face + Move-eyes + + + + Wink + Close and open one eye quickly, typically to indicate that something is a joke or a secret or as a signal of affection or greeting. + + relatedTag + Move-face + Move-eyes + + + + + Communicate-musically + Communicate using music. + + Hum + Make a low, steady continuous sound like that of a bee. Sing with the lips closed and without uttering speech. + + + Play-instrument + Make musical sounds using an instrument. + + + Sing + Produce musical tones by means of the voice. + + + Vocalize + Utter vocal sounds. + + + Whistle + Produce a shrill clear sound by forcing breath out or air in through the puckered lips. + + + + Communicate-vocally + Communicate using mouth or vocal cords. + + Cry + Shed tears associated with emotions, usually sadness but also joy or frustration. + + + Groan + Make a deep inarticulate sound in response to pain or despair. + + + Laugh + Make the spontaneous sounds and movements of the face and body that are the instinctive expressions of lively amusement and sometimes also of contempt or derision. + + + Scream + Make loud, vociferous cries or yells to express pain, excitement, or fear. + + + Shout + Say something very loudly. + + + Sigh + Emit a long, deep, audible breath expressing sadness, relief, tiredness, or a similar feeling. + + + Speak + Communicate using spoken language. + + + Whisper + Speak very softly using breath without vocal cords. + + + + + Move + Move in a specified direction or manner. Change position or posture. + + Breathe + Inhale or exhale during respiration. + + Blow + Expel air through pursed lips. + + + Cough + Suddenly and audibly expel air from the lungs through a partially closed glottis, preceded by inhalation. + + + Exhale + Blow out or expel breath. + + + Hiccup + Involuntarily spasm the diaphragm and respiratory organs, with a sudden closure of the glottis and a characteristic sound like that of a cough. + + + Hold-breath + Interrupt normal breathing by ceasing to inhale or exhale. + + + Inhale + Draw in with the breath through the nose or mouth. + + + Sneeze + Suddenly and violently expel breath through the nose and mouth. + + + Sniff + Draw in air audibly through the nose to detect a smell, to stop it from running, or to express contempt. + + + + Move-body + Move entire body. + + Bend + Move body in a bowed or curved manner. + + + Dance + Perform a purposefully selected sequences of human movement often with aesthetic or symbolic value. Move rhythmically to music, typically following a set sequence of steps. + + + Fall-down + Lose balance and collapse. + + + Flex + Cause a muscle to stand out by contracting or tensing it. Bend a limb or joint. + + + Jerk + Make a quick, sharp, sudden movement. + + + Lie-down + Move to a horizontal or resting position. + + + Recover-balance + Return to a stable, upright body position. + + + Sit-down + Move from a standing to a sitting position. + + + Sit-up + Move from lying down to a sitting position. + + + Stand-up + Move from a sitting to a standing position. + + + Stretch + Straighten or extend body or a part of body to its full length, typically so as to tighten muscles or in order to reach something. + + + Shudder + Tremble convulsively, sometimes as a result of fear or revulsion. + + + Stumble + Trip or momentarily lose balance and almost fall. + + + Turn + Change or cause to change direction. + + + + Move-body-part + Move one part of a body. + + Move-eyes + Move eyes. + + Blink + Shut and open the eyes quickly. + + + Close-eyes + Lower and keep eyelids in a closed position. + + + Fixate + Direct eyes to a specific point or target. + + + Inhibit-blinks + Purposely prevent blinking. + + + Open-eyes + Raise eyelids to expose pupil. + + + Saccade + Move eyes rapidly between fixation points. + + + Squint + Squeeze one or both eyes partly closed in an attempt to see more clearly or as a reaction to strong light. + + + Stare + Look fixedly or vacantly at someone or something with eyes wide open. + + + + Move-face + Move the face or jaw. + + Bite + Seize with teeth or jaws an object or organism so as to grip or break the surface covering. + + + Burp + Noisily release air from the stomach through the mouth. Belch. + + + Chew + Repeatedly grinding, tearing, and or crushing with teeth or jaws. + + + Gurgle + Make a hollow bubbling sound like that made by water running out of a bottle. + + + Swallow + Cause or allow something, especially food or drink to pass down the throat. + + Gulp + Swallow quickly or in large mouthfuls, often audibly, sometimes to indicate apprehension. + + + + Yawn + Take a deep involuntary inhalation with the mouth open often as a sign of drowsiness or boredom. + + + + Move-head + Move head. + + Lift-head + Tilt head back lifting chin. + + + Lower-head + Move head downward so that eyes are in a lower position. + + + Turn-head + Rotate head horizontally to look in a different direction. + + + + Move-lower-extremity + Move leg and/or foot. + + Curl-toes + Bend toes sometimes to grip. + + + Hop + Jump on one foot. + + + Jog + Run at a trot to exercise. + + + Jump + Move off the ground or other surface through sudden muscular effort in the legs. + + + Kick + Strike out or flail with the foot or feet. Strike using the leg, in unison usually with an area of the knee or lower using the foot. + + + Pedal + Move by working the pedals of a bicycle or other machine. + + + Press-foot + Move by pressing foot. + + + Run + Travel on foot at a fast pace. + + + Step + Put one leg in front of the other and shift weight onto it. + + Heel-strike + Strike the ground with the heel during a step. + + + Toe-off + Push with toe as part of a stride. + + + + Trot + Run at a moderate pace, typically with short steps. + + + Walk + Move at a regular pace by lifting and setting down each foot in turn never having both feet off the ground at once. + + + + Move-torso + Move body trunk. + + + Move-upper-extremity + Move arm, shoulder, and/or hand. + + Drop + Let or cause to fall vertically. + + + Grab + Seize suddenly or quickly. Snatch or clutch. + + + Grasp + Seize and hold firmly. + + + Hold-down + Prevent someone or something from moving by holding them firmly. + + + Lift + Raising something to higher position. + + + Make-fist + Close hand tightly with the fingers bent against the palm. + + + Point + Draw attention to something by extending a finger or arm. + + + Press + Apply pressure to something to flatten, shape, smooth or depress it. This action tag should be used to indicate key presses and mouse clicks. + + relatedTag + Push + + + + Push + Apply force in order to move something away. Use Press to indicate a key press or mouse click. + + relatedTag + Press + + + + Reach + Stretch out your arm in order to get or touch something. + + + Release + Make available or set free. + + + Retract + Draw or pull back. + + + Scratch + Drag claws or nails over a surface or on skin. + + + Snap-fingers + Make a noise by pushing second finger hard against thumb and then releasing it suddenly so that it hits the base of the thumb. + + + Touch + Come into or be in contact with. + + + + + + Perceive + Produce an internal, conscious image through stimulating a sensory system. + + Hear + Give attention to a sound. + + + See + Direct gaze toward someone or something or in a specified direction. + + + Smell + Inhale in order to ascertain an odor or scent. + + + Taste + Sense a flavor in the mouth and throat on contact with a substance. + + + Sense-by-touch + Sense something through receptors in the skin. + + + + Perform + Carry out or accomplish an action, task, or function. + + Close + Act as to blocked against entry or passage. + + + Collide-with + Hit with force when moving. + + + Halt + Bring or come to an abrupt stop. + + + Modify + Change something. + + + Open + Widen an aperture, door, or gap, especially one allowing access to something. + + + Operate + Control the functioning of a machine, process, or system. + + + Play + Engage in activity for enjoyment and recreation rather than a serious or practical purpose. + + + Read + Interpret something that is written or printed. + + + Repeat + Make do or perform again. + + + Rest + Be inactive in order to regain strength, health, or energy. + + + Write + Communicate or express by means of letters or symbols written or imprinted on a surface. + + + + Think + Direct the mind toward someone or something or use the mind actively to form connected ideas. + + Allow + Allow access to something such as allowing a car to pass. + + + Attend-to + Focus mental experience on specific targets. + + + Count + Tally items either silently or aloud. + + + Deny + Refuse to give or grant something requested or desired by someone. + + + Detect + Discover or identify the presence or existence of something. + + + Discriminate + Recognize a distinction. + + + Encode + Convert information or an instruction into a particular form. + + + Evade + Escape or avoid, especially by cleverness or trickery. + + + Generate + Cause something, especially an emotion or situation to arise or come about. + + + Identify + Establish or indicate who or what someone or something is. + + + Imagine + Form a mental image or concept of something. + + + Judge + Evaluate evidence to make a decision or form a belief. + + + Learn + Adaptively change behavior as the result of experience. + + + Memorize + Adaptively change behavior as the result of experience. + + + Plan + Think about the activities required to achieve a desired goal. + + + Predict + Say or estimate that something will happen or will be a consequence of something without having exact informaton. + + + Recognize + Identify someone or something from having encountered them before. + + + Respond + React to something such as a treatment or a stimulus. + + + Recall + Remember information by mental effort. + + + Switch-attention + Transfer attention from one focus to another. + + + Track + Follow a person, animal, or object through space or time. + + + + + Item + An independently existing thing (living or nonliving). + + extensionAllowed + + + Biological-item + An entity that is biological, that is related to living organisms. + + Anatomical-item + A biological structure, system, fluid or other substance excluding single molecular entities. + + Body + The biological structure representing an organism. + + + Body-part + Any part of an organism. + + Head + The upper part of the human body, or the front or upper part of the body of an animal, typically separated from the rest of the body by a neck, and containing the brain, mouth, and sense organs. + + Hair + The filamentous outgrowth of the epidermis. + + + Ear + A sense organ needed for the detection of sound and for establishing balance. + + + Face + The anterior portion of the head extending from the forehead to the chin and ear to ear. The facial structures contain the eyes, nose and mouth, cheeks and jaws. + + Cheek + The fleshy part of the face bounded by the eyes, nose, ear, and jaw line. + + + Chin + The part of the face below the lower lip and including the protruding part of the lower jaw. + + + Eye + The organ of sight or vision. + + + Eyebrow + The arched strip of hair on the bony ridge above each eye socket. + + + Forehead + The part of the face between the eyebrows and the normal hairline. + + + Lip + Fleshy fold which surrounds the opening of the mouth. + + + Nose + A structure of special sense serving as an organ of the sense of smell and as an entrance to the respiratory tract. + + + Mouth + The proximal portion of the digestive tract, containing the oral cavity and bounded by the oral opening. + + + Teeth + The hard bonelike structures in the jaws. A collection of teeth arranged in some pattern in the mouth or other part of the body. + + + + + Lower-extremity + Refers to the whole inferior limb (leg and/or foot). + + Ankle + A gliding joint between the distal ends of the tibia and fibula and the proximal end of the talus. + + + Calf + The fleshy part at the back of the leg below the knee. + + + Foot + The structure found below the ankle joint required for locomotion. + + Big-toe + The largest toe on the inner side of the foot. + + + Heel + The back of the foot below the ankle. + + + Instep + The part of the foot between the ball and the heel on the inner side. + + + Little-toe + The smallest toe located on the outer side of the foot. + + + Toes + The terminal digits of the foot. + + + + Knee + A joint connecting the lower part of the femur with the upper part of the tibia. + + + Shin + Front part of the leg below the knee. + + + Thigh + Upper part of the leg between hip and knee. + + + + Torso + The body excluding the head and neck and limbs. + + Torso-back + The rear surface of the human body from the shoulders to the hips. + + + Buttocks + The round fleshy parts that form the lower rear area of a human trunk. + + + Torso-chest + The anterior side of the thorax from the neck to the abdomen. + + + Gentalia + The external organs of reproduction. + + deprecatedFrom + 8.1.0 + + + + Hip + The lateral prominence of the pelvis from the waist to the thigh. + + + Waist + The abdominal circumference at the navel. + + + + Upper-extremity + Refers to the whole superior limb (shoulder, arm, elbow, wrist, hand). + + Elbow + A type of hinge joint located between the forearm and upper arm. + + + Forearm + Lower part of the arm between the elbow and wrist. + + + Hand + The distal portion of the upper extremity. It consists of the carpus, metacarpus, and digits. + + Finger + Any of the digits of the hand. + + Index-finger + The second finger from the radial side of the hand, next to the thumb. + + + Little-finger + The fifth and smallest finger from the radial side of the hand. + + + Middle-finger + The middle or third finger from the radial side of the hand. + + + Ring-finger + The fourth finger from the radial side of the hand. + + + Thumb + The thick and short hand digit which is next to the index finger in humans. + + + + Palm + The part of the inner surface of the hand that extends from the wrist to the bases of the fingers. + + + Knuckles + A part of a finger at a joint where the bone is near the surface, especially where the finger joins the hand. + + + + Shoulder + Joint attaching upper arm to trunk. + + + Upper-arm + Portion of arm between shoulder and elbow. + + + Wrist + A joint between the distal end of the radius and the proximal row of carpal bones. + + + + + + Organism + A living entity, more specifically a biological entity that consists of one or more cells and is capable of genomic replication (independently or not). + + Animal + A living organism that has membranous cell walls, requires oxygen and organic foods, and is capable of voluntary movement. + + + Human + The bipedal primate mammal Homo sapiens. + + + Plant + Any living organism that typically synthesizes its food from inorganic substances and possesses cellulose cell walls. + + + + + Language-item + An entity related to a systematic means of communicating by the use of sounds, symbols, or gestures. + + suggestedTag + Sensory-presentation + + + Character + A mark or symbol used in writing. + + + Clause + A unit of grammatical organization next below the sentence in rank, usually consisting of a subject and predicate. + + + Glyph + A hieroglyphic character, symbol, or pictograph. + + + Nonword + A group of letters or speech sounds that looks or sounds like a word but that is not accepted as such by native speakers. + + + Paragraph + A distinct section of a piece of writing, usually dealing with a single theme. + + + Phoneme + A speech sound that is distinguished by the speakers of a particular language. + + + Phrase + A phrase is a group of words functioning as a single unit in the syntax of a sentence. + + + Sentence + A set of words that is complete in itself, conveying a statement, question, exclamation, or command and typically containing an explicit or implied subject and a predicate containing a finite verb. + + + Syllable + A unit of spoken language larger than a phoneme. + + + Textblock + A block of text. + + + Word + A word is the smallest free form (an item that may be expressed in isolation with semantic or pragmatic content) in a language. + + + + Object + Something perceptible by one or more of the senses, especially by vision or touch. A material thing. + + suggestedTag + Sensory-presentation + + + Geometric-object + An object or a representation that has structure and topology in space. + + Pattern + An arrangement of objects, facts, behaviors, or other things which have scientific, mathematical, geometric, statistical, or other meaning. + + Dots + A small round mark or spot. + + + LED-pattern + A pattern created by lighting selected members of a fixed light emitting diode array. + + + + 2D-shape + A planar, two-dimensional shape. + + Arrow + A shape with a pointed end indicating direction. + + + Clockface + The dial face of a clock. A location identifier based on clockface numbering or anatomic subregion. + + + Cross + A figure or mark formed by two intersecting lines crossing at their midpoints. + + + Dash + A horizontal stroke in writing or printing to mark a pause or break in sense or to represent omitted letters or words. + + + Ellipse + A closed plane curve resulting from the intersection of a circular cone and a plane cutting completely through it, especially a plane not parallel to the base. + + Circle + A ring-shaped structure with every point equidistant from the center. + + + + Rectangle + A parallelogram with four right angles. + + Square + A square is a special rectangle with four equal sides. + + + + Single-point + A point is a geometric entity that is located in a zero-dimensional spatial region and whose position is defined by its coordinates in some coordinate system. + + + Star + A conventional or stylized representation of a star, typically one having five or more points. + + + Triangle + A three-sided polygon. + + + + 3D-shape + A geometric three-dimensional shape. + + Box + A square or rectangular vessel, usually made of cardboard or plastic. + + Cube + A solid or semi-solid in the shape of a three dimensional square. + + + + Cone + A shape whose base is a circle and whose sides taper up to a point. + + + Cylinder + A surface formed by circles of a given radius that are contained in a plane perpendicular to a given axis, whose centers align on the axis. + + + Ellipsoid + A closed plane curve resulting from the intersection of a circular cone and a plane cutting completely through it, especially a plane not parallel to the base. + + Sphere + A solid or hollow three-dimensional object bounded by a closed surface such that every point on the surface is equidistant from the center. + + + + Pyramid + A polyhedron of which one face is a polygon of any number of sides, and the other faces are triangles with a common vertex. + + + + + Ingestible-object + Something that can be taken into the body by the mouth for digestion or absorption. + + + Man-made-object + Something constructed by human means. + + Building + A structure that has a roof and walls and stands more or less permanently in one place. + + Room + An area within a building enclosed by walls and floor and ceiling. + + + Roof + A roof is the covering on the uppermost part of a building which provides protection from animals and weather, notably rain, but also heat, wind and sunlight. + + + Entrance + The means or place of entry. + + + Attic + A room or a space immediately below the roof of a building. + + + Basement + The part of a building that is wholly or partly below ground level. + + + + Clothing + A covering designed to be worn on the body. + + + Device + An object contrived for a specific purpose. + + Assistive-device + A device that help an individual accomplish a task. + + Glasses + Frames with lenses worn in front of the eye for vision correction, eye protection, or protection from UV rays. + + + Writing-device + A device used for writing. + + Pen + A common writing instrument used to apply ink to a surface for writing or drawing. + + + Pencil + An implement for writing or drawing that is constructed of a narrow solid pigment core in a protective casing that prevents the core from being broken or marking the hand. + + + + + Computing-device + An electronic device which take inputs and processes results from the inputs. + + Cellphone + A telephone with access to a cellular radio system so it can be used over a wide area, without a physical connection to a network. + + + Desktop-computer + A computer suitable for use at an ordinary desk. + + + Laptop-computer + A computer that is portable and suitable for use while traveling. + + + Tablet-computer + A small portable computer that accepts input directly on to its screen rather than via a keyboard or mouse. + + + + Engine + A motor is a machine designed to convert one or more forms of energy into mechanical energy. + + + IO-device + Hardware used by a human (or other system) to communicate with a computer. + + Input-device + A piece of equipment used to provide data and control signals to an information processing system such as a computer or information appliance. + + Computer-mouse + A hand-held pointing device that detects two-dimensional motion relative to a surface. + + Mouse-button + An electric switch on a computer mouse which can be pressed or clicked to select or interact with an element of a graphical user interface. + + + Scroll-wheel + A scroll wheel or mouse wheel is a wheel used for scrolling made of hard plastic with a rubbery surface usually located between the left and right mouse buttons and is positioned perpendicular to the mouse surface. + + + + Joystick + A control device that uses a movable handle to create two-axis input for a computer device. + + + Keyboard + A device consisting of mechanical keys that are pressed to create input to a computer. + + Keyboard-key + A button on a keyboard usually representing letters, numbers, functions, or symbols. + + # + Value of a keyboard key. + + takesValue + + + + + + Keypad + A device consisting of keys, usually in a block arrangement, that provides limited input to a system. + + Keypad-key + A key on a separate section of a computer keyboard that groups together numeric keys and those for mathematical or other special functions in an arrangement like that of a calculator. + + # + Value of keypad key. + + takesValue + + + + + + Microphone + A device designed to convert sound to an electrical signal. + + + Push-button + A switch designed to be operated by pressing a button. + + + + Output-device + Any piece of computer hardware equipment which converts information into human understandable form. + + Display-device + An output device for presentation of information in visual or tactile form the latter used for example in tactile electronic displays for blind people. + + Head-mounted-display + An instrument that functions as a display device, worn on the head or as part of a helmet, that has a small display optic in front of one (monocular HMD) or each eye (binocular HMD). + + + LED-display + A LED display is a flat panel display that uses an array of light-emitting diodes as pixels for a video display. + + + Computer-screen + An electronic device designed as a display or a physical device designed to be a protective meshwork. + + Screen-window + A part of a computer screen that contains a display different from the rest of the screen. A window is a graphical control element consisting of a visual area containing some of the graphical user interface of the program it belongs to and is framed by a window decoration. + + + + + Auditory-device + A device designed to produce sound. + + Headphones + An instrument that consists of a pair of small loudspeakers, or less commonly a single speaker, held close to ears and connected to a signal source such as an audio amplifier, radio, CD player or portable media player. + + + Loudspeaker + A device designed to convert electrical signals to sounds that can be heard. + + + + + Recording-device + A device that copies information in a signal into a persistent information bearer. + + EEG-recorder + A device for recording electric currents in the brain using electrodes applied to the scalp, to the surface of the brain, or placed within the substance of the brain. + + + File-storage + A device for recording digital information to a permanent media. + + + MEG-recorder + A device for measuring the magnetic fields produced by electrical activity in the brain, usually conducted externally. + + + Motion-capture + A device for recording the movement of objects or people. + + + Tape-recorder + A device for recording and reproduction usually using magnetic tape for storage that can be saved and played back. + + + + Touchscreen + A control component that operates an electronic device by pressing the display on the screen. + + + + Machine + A human-made device that uses power to apply forces and control movement to perform an action. + + + Measurement-device + A device in which a measure function inheres. + + Clock + A device designed to indicate the time of day or to measure the time duration of an event or action. + + Clock-face + A location identifier based on clockface numbering or anatomic subregion. + + + + + Robot + A mechanical device that sometimes resembles a living animal and is capable of performing a variety of often complex human tasks on command or by being programmed in advance. + + + Tool + A component that is not part of a device but is designed to support its assemby or operation. + + + + Document + A physical object, or electronic counterpart, that is characterized by containing writing which is meant to be human-readable. + + Letter + A written message addressed to a person or organization. + + + Note + A brief written record. + + + Book + A volume made up of pages fastened along one edge and enclosed between protective covers. + + + Notebook + A book for notes or memoranda. + + + Questionnaire + A document consisting of questions and possibly responses, depending on whether it has been filled out. + + + + Furnishing + Furniture, fittings, and other decorative accessories, such as curtains and carpets, for a house or room. + + + Manufactured-material + Substances created or extracted from raw materials. + + Ceramic + A hard, brittle, heat-resistant and corrosion-resistant material made by shaping and then firing a nonmetallic mineral, such as clay, at a high temperature. + + + Glass + A brittle transparent solid with irregular atomic structure. + + + Paper + A thin sheet material produced by mechanically or chemically processing cellulose fibres derived from wood, rags, grasses or other vegetable sources in water. + + + Plastic + Various high-molecular-weight thermoplastic or thermosetting polymers that are capable of being molded, extruded, drawn, or otherwise shaped and then hardened into a form. + + + Steel + An alloy made up of iron with typically a few tenths of a percent of carbon to improve its strength and fracture resistance compared to iron. + + + + Media + Media are audo/visual/audiovisual modes of communicating information for mass consumption. + + Media-clip + A short segment of media. + + Audio-clip + A short segment of audio. + + + Audiovisual-clip + A short media segment containing both audio and video. + + + Video-clip + A short segment of video. + + + + Visualization + An planned process that creates images, diagrams or animations from the input data. + + Animation + A form of graphical illustration that changes with time to give a sense of motion or represent dynamic changes in the portrayal. + + + Art-installation + A large-scale, mixed-media constructions, often designed for a specific place or for a temporary period of time. + + + Braille + A display using a system of raised dots that can be read with the fingers by people who are blind. + + + Image + Any record of an imaging event whether physical or electronic. + + Cartoon + A type of illustration, sometimes animated, typically in a non-realistic or semi-realistic style. The specific meaning has evolved over time, but the modern usage usually refers to either an image or series of images intended for satire, caricature, or humor. A motion picture that relies on a sequence of illustrations for its animation. + + + Drawing + A representation of an object or outlining a figure, plan, or sketch by means of lines. + + + Icon + A sign (such as a word or graphic symbol) whose form suggests its meaning. + + + Painting + A work produced through the art of painting. + + + Photograph + An image recorded by a camera. + + + + Movie + A sequence of images displayed in succession giving the illusion of continuous movement. + + + Outline-visualization + A visualization consisting of a line or set of lines enclosing or indicating the shape of an object in a sketch or diagram. + + + Point-light-visualization + A display in which action is depicted using a few points of light, often generated from discrete sensors in motion capture. + + + Sculpture + A two- or three-dimensional representative or abstract forms, especially by carving stone or wood or by casting metal or plaster. + + + Stick-figure-visualization + A drawing showing the head of a human being or animal as a circle and all other parts as straight lines. + + + + + Navigational-object + An object whose purpose is to assist directed movement from one location to another. + + Path + A trodden way. A way or track laid down for walking or made by continual treading. + + + Road + An open way for the passage of vehicles, persons, or animals on land. + + Lane + A defined path with physical dimensions through which an object or substance may traverse. + + + + Runway + A paved strip of ground on a landing field for the landing and takeoff of aircraft. + + + + Vehicle + A mobile machine which transports people or cargo. + + Aircraft + A vehicle which is able to travel through air in an atmosphere. + + + Bicycle + A human-powered, pedal-driven, single-track vehicle, having two wheels attached to a frame, one behind the other. + + + Boat + A watercraft of any size which is able to float or plane on water. + + + Car + A wheeled motor vehicle used primarily for the transportation of human passengers. + + + Cart + A cart is a vehicle which has two wheels and is designed to transport human passengers or cargo. + + + Tractor + A mobile machine specifically designed to deliver a high tractive effort at slow speeds, and mainly used for the purposes of hauling a trailer or machinery used in agriculture or construction. + + + Train + A connected line of railroad cars with or without a locomotive. + + + Truck + A motor vehicle which, as its primary funcion, transports cargo rather than human passangers. + + + + + Natural-object + Something that exists in or is produced by nature, and is not artificial or man-made. + + Mineral + A solid, homogeneous, inorganic substance occurring in nature and having a definite chemical composition. + + + Natural-feature + A feature that occurs in nature. A prominent or identifiable aspect, region, or site of interest. + + Field + An unbroken expanse as of ice or grassland. + + + Hill + A rounded elevation of limited extent rising above the surrounding land with local relief of less than 300m. + + + Mountain + A landform that extends above the surrounding terrain in a limited area. + + + River + A natural freshwater surface stream of considerable volume and a permanent or seasonal flow, moving in a definite channel toward a sea, lake, or another river. + + + Waterfall + A sudden descent of water over a step or ledge in the bed of a river. + + + + + + Sound + Mechanical vibrations transmitted by an elastic medium. Something that can be heard. + + Environmental-sound + Sounds occuring in the environment. An accumulation of noise pollution that occurs outside. This noise can be caused by transport, industrial, and recreational activities. + + Crowd-sound + Noise produced by a mixture of sounds from a large group of people. + + + Signal-noise + Any part of a signal that is not the true or original signal but is introduced by the communication mechanism. + + + + Musical-sound + Sound produced by continuous and regular vibrations, as opposed to noise. + + Tone + A musical note, warble, or other sound used as a particular signal on a telephone or answering machine. + + + Instrument-sound + Sound produced by a musical instrument. + + + Vocalized-sound + Musical sound produced by vocal cords in a biological agent. + + + + Named-animal-sound + A sound recognizable as being associated with particular animals. + + Barking + Sharp explosive cries like sounds made by certain animals, especially a dog, fox, or seal. + + + Bleating + Wavering cries like sounds made by a sheep, goat, or calf. + + + Crowing + Loud shrill sounds characteristic of roosters. + + + Chirping + Short, sharp, high-pitched noises like sounds made by small birds or an insects. + + + Growling + Low guttural sounds like those that made in the throat by a hostile dog or other animal. + + + Meowing + Vocalizations like those made by as those cats. These sounds have diverse tones and are sometimes chattered, murmured or whispered. The purpose can be assertive. + + + Mooing + Deep vocal sounds like those made by a cow. + + + Purring + Low continuous vibratory sound such as those made by cats. The sound expresses contentment. + + + Roaring + Loud, deep, or harsh prolonged sounds such as those made by big cats and bears for long-distance communication and intimidation. + + + Squawking + Loud, harsh noises such as those made by geese. + + + + Named-object-sound + A sound identifiable as coming from a particular type of object. + + Alarm-sound + A loud signal often loud continuous ringing to alert people to a problem or condition that requires urgent attention. + + + Beep + A short, single tone, that is typically high-pitched and generally made by a computer or other machine. + + + Buzz + A persistent vibratory sound often made by a buzzer device and used to indicate something incorrect. + + + Ka-ching + The sound made by a mechanical cash register, often to designate a reward. + + + Click + The sound made by a mechanical cash register, often to designate a reward. + + + Ding + A short ringing sound such as that made by a bell, often to indicate a correct response or the expiration of time. + + + Horn-blow + A loud sound made by forcing air through a sound device that funnels air to create the sound, often used to sound an alert. + + + Siren + A loud, continuous sound often varying in frequency designed to indicate an emergency. + + + + + + Property + Something that pertains to a thing. A characteristic of some entity. A quality or feature regarded as a characteristic or inherent part of someone or something. HED attributes are adjectives or adverbs. + + extensionAllowed + + + Agent-property + Something that pertains to an agent. + + extensionAllowed + + + Agent-state + The state of the agent. + + Agent-cognitive-state + The state of the cognitive processes or state of mind of the agent. + + Alert + Condition of heightened watchfulness or preparation for action. + + + Anesthetized + Having lost sensation to pain or having senses dulled due to the effects of an anesthetic. + + + Asleep + Having entered a periodic, readily reversible state of reduced awareness and metabolic activity, usually accompanied by physical relaxation and brain activity. + + + Attentive + Concentrating and focusing mental energy on the task or surroundings. + + + Distracted + Lacking in concentration because of being preoccupied. + + + Awake + In a non sleeping state. + + + Brain-dead + Characterized by the irreversible absence of cortical and brain stem functioning. + + + Comatose + In a state of profound unconsciousness associated with markedly depressed cerebral activity. + + + Drowsy + In a state of near-sleep, a strong desire for sleep, or sleeping for unusually long periods. + + + Intoxicated + In a state with disturbed psychophysiological functions and responses as a result of administration or ingestion of a psychoactive substance. + + + Locked-in + In a state of complete paralysis of all voluntary muscles except for the ones that control the movements of the eyes. + + + Passive + Not responding or initiating an action in response to a stimulus. + + + Resting + A state in which the agent is not exhibiting any physical exertion. + + + Vegetative + A state of wakefulness and conscience, but (in contrast to coma) with involuntary opening of the eyes and movements (such as teeth grinding, yawning, or thrashing of the extremities). + + + + Agent-emotional-state + The status of the general temperament and outlook of an agent. + + Angry + Experiencing emotions characterized by marked annoyance or hostility. + + + Aroused + In a state reactive to stimuli leading to increased heart rate and blood pressure, sensory alertness, mobility and readiness to respond. + + + Awed + Filled with wonder. Feeling grand, sublime or powerful emotions characterized by a combination of joy, fear, admiration, reverence, and/or respect. + + + Compassionate + Feeling or showing sympathy and concern for others often evoked for a person who is in distress and associated with altruistic motivation. + + + Content + Feeling satisfaction with things as they are. + + + Disgusted + Feeling revulsion or profound disapproval aroused by something unpleasant or offensive. + + + Emotionally-neutral + Feeling neither satisfied nor dissatisfied. + + + Empathetic + Understanding and sharing the feelings of another. Being aware of, being sensitive to, and vicariously experiencing the feelings, thoughts, and experience of another. + + + Excited + Feeling great enthusiasm and eagerness. + + + Fearful + Feeling apprehension that one may be in danger. + + + Frustrated + Feeling annoyed as a result of being blocked, thwarted, disappointed or defeated. + + + Grieving + Feeling sorrow in response to loss, whether physical or abstract. + + + Happy + Feeling pleased and content. + + + Jealous + Feeling threatened by a rival in a relationship with another individual, in particular an intimate partner, usually involves feelings of threat, fear, suspicion, distrust, anxiety, anger, betrayal, and rejection. + + + Joyful + Feeling delight or intense happiness. + + + Loving + Feeling a strong positive emotion of affection and attraction. + + + Relieved + No longer feeling pain, distress, anxiety, or reassured. + + + Sad + Feeling grief or unhappiness. + + + Stressed + Experiencing mental or emotional strain or tension. + + + + Agent-physiological-state + Having to do with the mechanical, physical, or biochemical function of an agent. + + Healthy + Having no significant health-related issues. + + relatedTag + Sick + + + + Hungry + Being in a state of craving or desiring food. + + relatedTag + Sated + Thirsty + + + + Rested + Feeling refreshed and relaxed. + + relatedTag + Tired + + + + Sated + Feeling full. + + relatedTag + Hungry + + + + Sick + Being in a state of ill health, bodily malfunction, or discomfort. + + relatedTag + Healthy + + + + Thirsty + Feeling a need to drink. + + relatedTag + Hungry + + + + Tired + Feeling in need of sleep or rest. + + relatedTag + Rested + + + + + Agent-postural-state + Pertaining to the position in which agent holds their body. + + Crouching + Adopting a position where the knees are bent and the upper body is brought forward and down, sometimes to avoid detection or to defend oneself. + + + Eyes-closed + Keeping eyes closed with no blinking. + + + Eyes-open + Keeping eyes open with occasional blinking. + + + Kneeling + Positioned where one or both knees are on the ground. + + + On-treadmill + Ambulation on an exercise apparatus with an endless moving belt to support moving in place. + + + Prone + Positioned in a recumbent body position whereby the person lies on its stomach and faces downward. + + + Sitting + In a seated position. + + + Standing + Assuming or maintaining an erect upright position. + + + Seated-with-chin-rest + Using a device that supports the chin and head. + + + + + Agent-task-role + The function or part that is ascribed to an agent in performing the task. + + Experiment-actor + An agent who plays a predetermined role to create the experiment scenario. + + + Experiment-controller + An agent exerting control over some aspect of the experiment. + + + Experiment-participant + Someone who takes part in an activity related to an experiment. + + + Experimenter + Person who is the owner of the experiment and has its responsibility. + + + + Agent-trait + A genetically, environmentally, or socially determined characteristic of an agent. + + Age + Length of time elapsed time since birth of the agent. + + # + + takesValue + + + valueClass + numericClass + + + + + Agent-experience-level + Amount of skill or knowledge that the agent has as pertains to the task. + + Expert-level + Having comprehensive and authoritative knowledge of or skill in a particular area related to the task. + + relatedTag + Intermediate-experience-level + Novice-level + + + + Intermediate-experience-level + Having a moderate amount of knowledge or skill related to the task. + + relatedTag + Expert-level + Novice-level + + + + Novice-level + Being inexperienced in a field or situation related to the task. + + relatedTag + Expert-level + Intermediate-experience-level + + + + + Gender + Characteristics that are socially constructed, including norms, behaviors, and roles based on sex. + + + Sex + Physical properties or qualities by which male is distinguished from female. + + Female + Biological sex of an individual with female sexual organs such ova. + + + Male + Biological sex of an individual with male sexual organs producing sperm. + + + Intersex + Having genitalia and/or secondary sexual characteristics of indeterminate sex. + + + + Ethnicity + Belong to a social group that has a common national or cultural tradition. Use with Label to avoid extension. + + + Handedness + Individual preference for use of a hand, known as the dominant hand. + + Left-handed + Preference for using the left hand or foot for tasks requiring the use of a single hand or foot. + + + Right-handed + Preference for using the right hand or foot for tasks requiring the use of a single hand or foot. + + + Ambidextrous + Having no overall dominance in the use of right or left hand or foot in the performance of tasks that require one hand or foot. + + + + Race + Belonging to a group sharing physical or social qualities as defined within a specified society. Use with Label to avoid extension. + + + + + Data-property + Something that pertains to data or information. + + extensionAllowed + + + Data-marker + An indicator placed to mark something. + + Data-break-marker + An indicator place to indicate a gap in the data. + + + Temporal-marker + An indicator placed at a particular time in the data. + + Inset + Marks an intermediate point in an ongoing event of temporal extent. + + topLevelTagGroup + + + reserved + + + relatedTag + Onset + Offset + + + + Onset + Marks the start of an ongoing event of temporal extent. + + topLevelTagGroup + + + reserved + + + relatedTag + Inset + Offset + + + + Offset + Marks the end of an event of temporal extent. + + topLevelTagGroup + + + reserved + + + relatedTag + Onset + Inset + + + + Pause + Indicates the temporary interruption of the operation a process and subsequently wait for a signal to continue. + + + Time-out + A cancellation or cessation that automatically occurs when a predefined interval of time has passed without a certain event occurring. + + + Time-sync + A synchronization signal whose purpose to help synchronize different signals or processes. Often used to indicate a marker inserted into the recorded data to allow post hoc synchronization of concurrently recorded data streams. + + + + + Data-resolution + Smallest change in a quality being measured by an sensor that causes a perceptible change. + + Printer-resolution + Resolution of a printer, usually expressed as the number of dots-per-inch for a printer. + + # + + takesValue + + + valueClass + numericClass + + + + + Screen-resolution + Resolution of a screen, usually expressed as the of pixels in a dimension for a digital display device. + + # + + takesValue + + + valueClass + numericClass + + + + + Sensory-resolution + Resolution of measurements by a sensing device. + + # + + takesValue + + + valueClass + numericClass + + + + + Spatial-resolution + Linear spacing of a spatial measurement. + + # + + takesValue + + + valueClass + numericClass + + + + + Spectral-resolution + Measures the ability of a sensor to resolve features in the electromagnetic spectrum. + + # + + takesValue + + + valueClass + numericClass + + + + + Temporal-resolution + Measures the ability of a sensor to resolve features in time. + + # + + takesValue + + + valueClass + numericClass + + + + + + Data-source-type + The type of place, person, or thing from which the data comes or can be obtained. + + Computed-feature + A feature computed from the data by a tool. This tag should be grouped with a label of the form Toolname_propertyName. + + + Computed-prediction + A computed extrapolation of known data. + + + Expert-annotation + An explanatory or critical comment or other in-context information provided by an authority. + + + Instrument-measurement + Information obtained from a device that is used to measure material properties or make other observations. + + + Observation + Active acquisition of information from a primary source. Should be grouped with a label of the form AgentID_featureName. + + + + Data-value + Designation of the type of a data item. + + Categorical-value + Indicates that something can take on a limited and usually fixed number of possible values. + + Categorical-class-value + Categorical values that fall into discrete classes such as true or false. The grouping is absolute in the sense that it is the same for all participants. + + All + To a complete degree or to the full or entire extent. + + relatedTag + Some + None + + + + Correct + Free from error. Especially conforming to fact or truth. + + relatedTag + Wrong + + + + Explicit + Stated clearly and in detail, leaving no room for confusion or doubt. + + relatedTag + Implicit + + + + False + Not in accordance with facts, reality or definitive criteria. + + relatedTag + True + + + + Implicit + Implied though not plainly expressed. + + relatedTag + Explicit + + + + Invalid + Not allowed or not conforming to the correct format or specifications. + + relatedTag + Valid + + + + None + No person or thing, nobody, not any. + + relatedTag + All + Some + + + + Some + At least a small amount or number of, but not a large amount of, or often. + + relatedTag + All + None + + + + True + Conforming to facts, reality or definitive criteria. + + relatedTag + False + + + + Valid + Allowable, usable, or acceptable. + + relatedTag + Invalid + + + + Wrong + Inaccurate or not correct. + + relatedTag + Correct + + + + + Categorical-judgment-value + Categorical values that are based on the judgment or perception of the participant such familiar and famous. + + Abnormal + Deviating in any way from the state, position, structure, condition, behavior, or rule which is considered a norm. + + relatedTag + Normal + + + + Asymmetrical + Lacking symmetry or having parts that fail to correspond to one another in shape, size, or arrangement. + + relatedTag + Symmetrical + + + + Audible + A sound that can be perceived by the participant. + + relatedTag + Inaudible + + + + Congruent + Concordance of multiple evidence lines. In agreement or harmony. + + relatedTag + Incongruent + + + + Complex + Hard, involved or complicated, elaborate, having many parts. + + relatedTag + Simple + + + + Constrained + Keeping something within particular limits or bounds. + + relatedTag + Unconstrained + + + + Disordered + Not neatly arranged. Confused and untidy. A structural quality in which the parts of an object are non-rigid. + + relatedTag + Ordered + + + + Familiar + Recognized, familiar, or within the scope of knowledge. + + relatedTag + Unfamiliar + Famous + + + + Famous + A person who has a high degree of recognition by the general population for his or her success or accomplishments. A famous person. + + relatedTag + Familiar + Unfamiliar + + + + Inaudible + A sound below the threshold of perception of the participant. + + relatedTag + Audible + + + + Incongruent + Not in agreement or harmony. + + relatedTag + Congruent + + + + Involuntary + An action that is not made by choice. In the body, involuntary actions (such as blushing) occur automatically, and cannot be controlled by choice. + + relatedTag + Voluntary + + + + Masked + Information exists but is not provided or is partially obscured due to security, privacy, or other concerns. + + relatedTag + Unmasked + + + + Normal + Being approximately average or within certain limits. Conforming with or constituting a norm or standard or level or type or social norm. + + relatedTag + Abnormal + + + + Ordered + Conforming to a logical or comprehensible arrangement of separate elements. + + relatedTag + Disordered + + + + Simple + Easily understood or presenting no difficulties. + + relatedTag + Complex + + + + Symmetrical + Made up of exactly similar parts facing each other or around an axis. Showing aspects of symmetry. + + relatedTag + Asymmetrical + + + + Unconstrained + Moving without restriction. + + relatedTag + Constrained + + + + Unfamiliar + Not having knowledge or experience of. + + relatedTag + Familiar + Famous + + + + Unmasked + Information is revealed. + + relatedTag + Masked + + + + Voluntary + Using free will or design; not forced or compelled; controlled by individual volition. + + relatedTag + Involuntary + + + + + Categorical-level-value + Categorical values based on dividing a continuous variable into levels such as high and low. + + Cold + Having an absence of heat. + + relatedTag + Hot + + + + Deep + Extending relatively far inward or downward. + + relatedTag + Shallow + + + + High + Having a greater than normal degree, intensity, or amount. + + relatedTag + Low + Medium + + + + Hot + Having an excess of heat. + + relatedTag + Cold + + + + Large + Having a great extent such as in physical dimensions, period of time, amplitude or frequency. + + relatedTag + Small + + + + Liminal + Situated at a sensory threshold that is barely perceptible or capable of eliciting a response. + + relatedTag + Subliminal + Supraliminal + + + + Loud + Having a perceived high intensity of sound. + + relatedTag + Quiet + + + + Low + Less than normal in degree, intensity or amount. + + relatedTag + High + + + + Medium + Mid-way between small and large in number, quantity, magnitude or extent. + + relatedTag + Low + High + + + + Negative + Involving disadvantage or harm. + + relatedTag + Positive + + + + Positive + Involving advantage or good. + + relatedTag + Negative + + + + Quiet + Characterizing a perceived low intensity of sound. + + relatedTag + Loud + + + + Rough + Having a surface with perceptible bumps, ridges, or irregularities. + + relatedTag + Smooth + + + + Shallow + Having a depth which is relatively low. + + relatedTag + Deep + + + + Small + Having a small extent such as in physical dimensions, period of time, amplitude or frequency. + + relatedTag + Large + + + + Smooth + Having a surface free from bumps, ridges, or irregularities. + + relatedTag + Rough + + + + Subliminal + Situated below a sensory threshold that is imperceptible or not capable of eliciting a response. + + relatedTag + Liminal + Supraliminal + + + + Supraliminal + Situated above a sensory threshold that is perceptible or capable of eliciting a response. + + relatedTag + Liminal + Subliminal + + + + Thick + Wide in width, extent or cross-section. + + relatedTag + Thin + + + + Thin + Narrow in width, extent or cross-section. + + relatedTag + Thick + + + + + Categorical-orientation-value + Value indicating the orientation or direction of something. + + Backward + Directed behind or to the rear. + + relatedTag + Forward + + + + Downward + Moving or leading toward a lower place or level. + + relatedTag + Leftward + Rightward + Upward + + + + Forward + At or near or directed toward the front. + + relatedTag + Backward + + + + Horizontally-oriented + Oriented parallel to or in the plane of the horizon. + + relatedTag + Vertically-oriented + + + + Leftward + Going toward or facing the left. + + relatedTag + Downward + Rightward + Upward + + + + Oblique + Slanting or inclined in direction, course, or position that is neither parallel nor perpendicular nor right-angular. + + relatedTag + Rotated + + + + Rightward + Going toward or situated on the right. + + relatedTag + Downward + Leftward + Upward + + + + Rotated + Positioned offset around an axis or center. + + + Upward + Moving, pointing, or leading to a higher place, point, or level. + + relatedTag + Downward + Leftward + Rightward + + + + Vertically-oriented + Oriented perpendicular to the plane of the horizon. + + relatedTag + Horizontally-oriented + + + + + + Physical-value + The value of some physical property of something. + + Weight + The relative mass or the quantity of matter contained by something. + + # + + takesValue + + + valueClass + numericClass + + + unitClass + weightUnits + + + + + Temperature + A measure of hot or cold based on the average kinetic energy of the atoms or molecules in the system. + + # + + takesValue + + + valueClass + numericClass + + + unitClass + temperatureUnits + + + + + + Quantitative-value + Something capable of being estimated or expressed with numeric values. + + Fraction + A numerical value between 0 and 1. + + # + + takesValue + + + valueClass + numericClass + + + + + Item-count + The integer count of something which is usually grouped with the entity it is counting. (Item-count/3, A) indicates that 3 of A have occurred up to this point. + + # + + takesValue + + + valueClass + numericClass + + + + + Item-index + The index of an item in a collection, sequence or other structure. (A (Item-index/3, B)) means that A is item number 3 in B. + + # + + takesValue + + + valueClass + numericClass + + + + + Item-interval + An integer indicating how many items or entities have passed since the last one of these. An item interval of 0 indicates the current item. + + # + + takesValue + + + valueClass + numericClass + + + + + Percentage + A fraction or ratio with 100 understood as the denominator. + + # + + takesValue + + + valueClass + numericClass + + + + + Ratio + A quotient of quantities of the same kind for different components within the same system. + + # + + takesValue + + + valueClass + numericClass + + + + + + Statistical-value + A value based on or employing the principles of statistics. + + extensionAllowed + + + Data-maximum + The largest possible quantity or degree. + + # + + takesValue + + + valueClass + numericClass + + + + + Data-mean + The sum of a set of values divided by the number of values in the set. + + # + + takesValue + + + valueClass + numericClass + + + + + Data-median + The value which has an equal number of values greater and less than it. + + # + + takesValue + + + valueClass + numericClass + + + + + Data-minimum + The smallest possible quantity. + + # + + takesValue + + + valueClass + numericClass + + + + + Probability + A measure of the expectation of the occurrence of a particular event. + + # + + takesValue + + + valueClass + numericClass + + + + + Standard-deviation + A measure of the range of values in a set of numbers. Standard deviation is a statistic used as a measure of the dispersion or variation in a distribution, equal to the square root of the arithmetic mean of the squares of the deviations from the arithmetic mean. + + # + + takesValue + + + valueClass + numericClass + + + + + Statistical-accuracy + A measure of closeness to true value expressed as a number between 0 and 1. + + # + + takesValue + + + valueClass + numericClass + + + + + Statistical-precision + A quantitative representation of the degree of accuracy necessary for or associated with a particular action. + + # + + takesValue + + + valueClass + numericClass + + + + + Statistical-recall + Sensitivity is a measurement datum qualifying a binary classification test and is computed by substracting the false negative rate to the integral numeral 1. + + # + + takesValue + + + valueClass + numericClass + + + + + Statistical-uncertainty + A measure of the inherent variability of repeated observation measurements of a quantity including quantities evaluated by statistical methods and by other means. + + # + + takesValue + + + valueClass + numericClass + + + + + + Spatiotemporal-value + A property relating to space and/or time. + + Rate-of-change + The amount of change accumulated per unit time. + + Acceleration + Magnitude of the rate of change in either speed or direction. The direction of change should be given separately. + + # + + takesValue + + + valueClass + numericClass + + + unitClass + accelerationUnits + + + + + Frequency + Frequency is the number of occurrences of a repeating event per unit time. + + # + + takesValue + + + valueClass + numericClass + + + unitClass + frequencyUnits + + + + + Jerk-rate + Magnitude of the rate at which the acceleration of an object changes with respect to time. The direction of change should be given separately. + + # + + takesValue + + + valueClass + numericClass + + + unitClass + jerkUnits + + + + + Sampling-rate + The number of digital samples taken or recorded per unit of time. + + # + + takesValue + + + unitClass + frequencyUnits + + + + + Refresh-rate + The frequency with which the image on a computer monitor or similar electronic display screen is refreshed, usually expressed in hertz. + + # + + takesValue + + + valueClass + numericClass + + + + + Speed + A scalar measure of the rate of movement of the object expressed either as the distance travelled divided by the time taken (average speed) or the rate of change of position with respect to time at a particular point (instantaneous speed). The direction of change should be given separately. + + # + + takesValue + + + valueClass + numericClass + + + unitClass + speedUnits + + + + + Temporal-rate + The number of items per unit of time. + + # + + takesValue + + + valueClass + numericClass + + + unitClass + frequencyUnits + + + + + + Spatial-value + Value of an item involving space. + + Angle + The amount of inclination of one line to another or the plane of one object to another. + + # + + takesValue + + + unitClass + angleUnits + + + valueClass + numericClass + + + + + Distance + A measure of the space separating two objects or points. + + # + + takesValue + + + valueClass + numericClass + + + unitClass + physicalLengthUnits + + + + + Position + A reference to the alignment of an object, a particular situation or view of a situation, or the location of an object. Coordinates with respect a specified frame of reference or the default Screen-frame if no frame is given. + + X-position + The position along the x-axis of the frame of reference. + + # + + takesValue + + + valueClass + numericClass + + + unitClass + physicalLengthUnits + + + + + Y-position + The position along the y-axis of the frame of reference. + + # + + takesValue + + + valueClass + numericClass + + + unitClass + physicalLengthUnits + + + + + Z-position + The position along the z-axis of the frame of reference. + + # + + takesValue + + + valueClass + numericClass + + + unitClass + physicalLengthUnits + + + + + + Size + The physical magnitude of something. + + Area + The extent of a 2-dimensional surface enclosed within a boundary. + + # + + takesValue + + + valueClass + numericClass + + + unitClass + areaUnits + + + + + Depth + The distance from the surface of something especially from the perspective of looking from the front. + + # + + takesValue + + + valueClass + numericClass + + + unitClass + physicalLengthUnits + + + + + Length + The linear extent in space from one end of something to the other end, or the extent of something from beginning to end. + + # + + takesValue + + + valueClass + numericClass + + + unitClass + physicalLengthUnits + + + + + Width + The extent or measurement of something from side to side. + + # + + takesValue + + + valueClass + numericClass + + + unitClass + physicalLengthUnits + + + + + Height + The vertical measurement or distance from the base to the top of an object. + + # + + takesValue + + + valueClass + numericClass + + + unitClass + physicalLengthUnits + + + + + Volume + The amount of three dimensional space occupied by an object or the capacity of a space or container. + + # + + takesValue + + + valueClass + numericClass + + + unitClass + volumeUnits + + + + + + + Temporal-value + A characteristic of or relating to time or limited by time. + + Delay + The time at which an event start time is delayed from the current onset time. This tag defines the start time of an event of temporal extent and may be used with the Duration tag. + + topLevelTagGroup + + + reserved + + + relatedTag + Duration + + + # + + takesValue + + + valueClass + numericClass + + + unitClass + timeUnits + + + + + Duration + The period of time during which an event occurs. This tag defines the end time of an event of temporal extent and may be used with the Delay tag. + + topLevelTagGroup + + + reserved + + + relatedTag + Delay + + + # + + takesValue + + + valueClass + numericClass + + + unitClass + timeUnits + + + + + Time-interval + The period of time separating two instances, events, or occurrences. + + # + + takesValue + + + valueClass + numericClass + + + unitClass + timeUnits + + + + + Time-value + A value with units of time. Usually grouped with tags identifying what the value represents. + + # + + takesValue + + + valueClass + numericClass + + + unitClass + timeUnits + + + + + + + + Data-variability-attribute + An attribute describing how something changes or varies. + + Abrupt + Marked by sudden change. + + + Constant + Continually recurring or continuing without interruption. Not changing in time or space. + + + Continuous + Uninterrupted in time, sequence, substance, or extent. + + relatedTag + Discrete + Discontinuous + + + + Decreasing + Becoming smaller or fewer in size, amount, intensity, or degree. + + relatedTag + Increasing + + + + Deterministic + No randomness is involved in the development of the future states of the element. + + relatedTag + Random + Stochastic + + + + Discontinuous + Having a gap in time, sequence, substance, or extent. + + relatedTag + Continuous + + + + Discrete + Constituting a separate entities or parts. + + relatedTag + Continuous + Discontinuous + + + + Flickering + Moving irregularly or unsteadily or burning or shining fitfully or with a fluctuating light. + + + Estimated-value + Something that has been calculated or measured approximately. + + + Exact-value + A value that is viewed to the true value according to some standard. + + + Fractal + Having extremely irregular curves or shapes for which any suitably chosen part is similar in shape to a given larger or smaller part when magnified or reduced to the same size. + + + Increasing + Becoming greater in size, amount, or degree. + + relatedTag + Decreasing + + + + Random + Governed by or depending on chance. Lacking any definite plan or order or purpose. + + relatedTag + Deterministic + Stochastic + + + + Repetitive + A recurring action that is often non-purposeful. + + + Stochastic + Uses a random probability distribution or pattern that may be analysed statistically but may not be predicted precisely to determine future states. + + relatedTag + Deterministic + Random + + + + Varying + Differing in size, amount, degree, or nature. + + + + + Environmental-property + Relating to or arising from the surroundings of an agent. + + Indoors + Located inside a building or enclosure. + + + Outdoors + Any area outside a building or shelter. + + + Real-world + Located in a place that exists in real space and time under realistic conditions. + + + Virtual-world + Using technology that creates immersive, computer-generated experiences that a person can interact with and navigate through. The digital content is generally delivered to the user through some type of headset and responds to changes in head position or through interaction with other types of sensors. Existing in a virtual setting such as a simulation or game environment. + + + Augmented-reality + Using technology that enhances real-world experiences with computer-derived digital overlays to change some aspects of perception of the natural environment. The digital content is shown to the user through a smart device or glasses and responds to changes in the environment. + + + Motion-platform + A mechanism that creates the feelings of being in a real motion environment. + + + Urban + Relating to, located in, or characteristic of a city or densely populated area. + + + Rural + Of or pertaining to the country as opposed to the city. + + + Terrain + Characterization of the physical features of a tract of land. + + Composite-terrain + Tracts of land characterized by a mixure of physical features. + + + Dirt-terrain + Tracts of land characterized by a soil surface and lack of vegetation. + + + Grassy-terrain + Tracts of land covered by grass. + + + Gravel-terrain + Tracts of land covered by a surface consisting a loose aggregation of small water-worn or pounded stones. + + + Leaf-covered-terrain + Tracts of land covered by leaves and composited organic material. + + + Muddy-terrain + Tracts of land covered by a liquid or semi-liquid mixture of water and some combination of soil, silt, and clay. + + + Paved-terrain + Tracts of land covered with concrete, asphalt, stones, or bricks. + + + Rocky-terrain + Tracts of land consisting or full of rock or rocks. + + + Sloped-terrain + Tracts of land arranged in a sloping or inclined position. + + + Uneven-terrain + Tracts of land that are not level, smooth, or regular. + + + + + Informational-property + Something that pertains to a task. + + extensionAllowed + + + Description + An explanation of what the tag group it is in means. If the description is at the top-level of an event string, the description applies to the event. + + requireChild + + + # + + takesValue + + + valueClass + textClass + + + + + ID + An alphanumeric name that identifies either a unique object or a unique class of objects. Here the object or class may be an idea, physical countable object (or class), or physical uncountable substance (or class). + + requireChild + + + # + + takesValue + + + valueClass + textClass + + + + + Label + A string of 20 or fewer characters identifying something. Labels usually refer to general classes of things while IDs refer to specific instances. A term that is associated with some entity. A brief description given for purposes of identification. An identifying or descriptive marker that is attached to an object. + + requireChild + + + # + + takesValue + + + valueClass + nameClass + + + + + Metadata + Data about data. Information that describes another set of data. + + CogAtlas + The Cognitive Atlas ID number of something. + + # + + takesValue + + + + + CogPo + The CogPO ID number of something. + + # + + takesValue + + + + + Creation-date + The date on which data creation of this element began. + + requireChild + + + # + + takesValue + + + valueClass + dateTimeClass + + + + + Experimental-note + A brief written record about the experiment. + + # + + takesValue + + + valueClass + textClass + + + + + Library-name + Official name of a HED library. + + # + + takesValue + + + valueClass + nameClass + + + + + OBO-identifier + The identifier of a term in some Open Biology Ontology (OBO) ontology. + + # + + takesValue + + + valueClass + nameClass + + + + + Pathname + The specification of a node (file or directory) in a hierarchical file system, usually specified by listing the nodes top-down. + + # + + takesValue + + + + + Subject-identifier + A sequence of characters used to identify, name, or characterize a trial or study subject. + + # + + takesValue + + + + + Version-identifier + An alphanumeric character string that identifies a form or variant of a type or original. + + # + Usually is a semantic version. + + takesValue + + + + + + Parameter + Something user-defined for this experiment. + + Parameter-label + The name of the parameter. + + # + + takesValue + + + valueClass + nameClass + + + + + Parameter-value + The value of the parameter. + + # + + takesValue + + + valueClass + textClass + + + + + + + Organizational-property + Relating to an organization or the action of organizing something. + + Collection + A tag designating a grouping of items such as in a set or list. + + # + Name of the collection. + + takesValue + + + valueClass + nameClass + + + + + Condition-variable + An aspect of the experiment or task that is to be varied during the experiment. Task-conditions are sometimes called independent variables or contrasts. + + # + Name of the condition variable. + + takesValue + + + valueClass + nameClass + + + + + Control-variable + An aspect of the experiment that is fixed throughout the study and usually is explicitly controlled. + + # + Name of the control variable. + + takesValue + + + valueClass + nameClass + + + + + Def + A HED-specific utility tag used with a defined name to represent the tags associated with that definition. + + requireChild + + + reserved + + + # + Name of the definition. + + takesValue + + + valueClass + nameClass + + + + + Def-expand + A HED specific utility tag that is grouped with an expanded definition. The child value of the Def-expand is the name of the expanded definition. + + requireChild + + + reserved + + + tagGroup + + + # + + takesValue + + + valueClass + nameClass + + + + + Definition + A HED-specific utility tag whose child value is the name of the concept and the tag group associated with the tag is an English language explanation of a concept. + + requireChild + + + reserved + + + topLevelTagGroup + + + # + Name of the definition. + + takesValue + + + valueClass + nameClass + + + + + Event-context + A special HED tag inserted as part of a top-level tag group to contain information about the interrelated conditions under which the event occurs. The event context includes information about other events that are ongoing when this event happens. + + reserved + + + topLevelTagGroup + + + unique + + + + Event-stream + A special HED tag indicating that this event is a member of an ordered succession of events. + + # + Name of the event stream. + + takesValue + + + valueClass + nameClass + + + + + Experimental-intertrial + A tag used to indicate a part of the experiment between trials usually where nothing is happening. + + # + Optional label for the intertrial block. + + takesValue + + + valueClass + nameClass + + + + + Experimental-trial + Designates a run or execution of an activity, for example, one execution of a script. A tag used to indicate a particular organizational part in the experimental design often containing a stimulus-response pair or stimulus-response-feedback triad. + + # + Optional label for the trial (often a numerical string). + + takesValue + + + valueClass + nameClass + + + + + Indicator-variable + An aspect of the experiment or task that is measured as task conditions are varied during the experiment. Experiment indicators are sometimes called dependent variables. + + # + Name of the indicator variable. + + takesValue + + + valueClass + nameClass + + + + + Recording + A tag designating the data recording. Recording tags are usually have temporal scope which is the entire recording. + + # + Optional label for the recording. + + takesValue + + + valueClass + nameClass + + + + + Task + An assigned piece of work, usually with a time allotment. A tag used to indicate a linkage the structured activities performed as part of the experiment. + + # + Optional label for the task block. + + takesValue + + + valueClass + nameClass + + + + + Time-block + A tag used to indicate a contiguous time block in the experiment during which something is fixed or noted. + + # + Optional label for the task block. + + takesValue + + + valueClass + nameClass + + + + + + Sensory-property + Relating to sensation or the physical senses. + + Sensory-attribute + A sensory characteristic associated with another entity. + + Auditory-attribute + Pertaining to the sense of hearing. + + Loudness + Perceived intensity of a sound. + + # + + takesValue + + + valueClass + numericClass + nameClass + + + + + Pitch + A perceptual property that allows the user to order sounds on a frequency scale. + + # + + takesValue + + + valueClass + numericClass + + + unitClass + frequencyUnits + + + + + Sound-envelope + Description of how a sound changes over time. + + Sound-envelope-attack + The time taken for initial run-up of level from nil to peak usually beginning when the key on a musical instrument is pressed. + + # + + takesValue + + + valueClass + numericClass + + + unitClass + timeUnits + + + + + Sound-envelope-decay + The time taken for the subsequent run down from the attack level to the designated sustain level. + + # + + takesValue + + + valueClass + numericClass + + + unitClass + timeUnits + + + + + Sound-envelope-release + The time taken for the level to decay from the sustain level to zero after the key is released. + + # + + takesValue + + + valueClass + numericClass + + + unitClass + timeUnits + + + + + Sound-envelope-sustain + The time taken for the main sequence of the sound duration, until the key is released. + + # + + takesValue + + + valueClass + numericClass + + + unitClass + timeUnits + + + + + + Timbre + The perceived sound quality of a singing voice or musical instrument. + + # + + takesValue + + + valueClass + nameClass + + + + + Sound-volume + The sound pressure level (SPL) usually the ratio to a reference signal estimated as the lower bound of hearing. + + # + + takesValue + + + valueClass + numericClass + + + unitClass + intensityUnits + + + + + + Gustatory-attribute + Pertaining to the sense of taste. + + Bitter + Having a sharp, pungent taste. + + + Salty + Tasting of or like salt. + + + Savory + Belonging to a taste that is salty or spicy rather than sweet. + + + Sour + Having a sharp, acidic taste. + + + Sweet + Having or resembling the taste of sugar. + + + + Olfactory-attribute + Having a smell. + + + Somatic-attribute + Pertaining to the feelings in the body or of the nervous system. + + Pain + The sensation of discomfort, distress, or agony, resulting from the stimulation of specialized nerve endings. + + + Stress + The negative mental, emotional, and physical reactions that occur when environmental stressors are perceived as exceeding the adaptive capacities of the individual. + + + + Tactile-attribute + Pertaining to the sense of touch. + + Tactile-pressure + Having a feeling of heaviness. + + + Tactile-temperature + Having a feeling of hotness or coldness. + + + Tactile-texture + Having a feeling of roughness. + + + Tactile-vibration + Having a feeling of mechanical oscillation. + + + + Vestibular-attribute + Pertaining to the sense of balance or body position. + + + Visual-attribute + Pertaining to the sense of sight. + + Color + The appearance of objects (or light sources) described in terms of perception of their hue and lightness (or brightness) and saturation. + + CSS-color + One of 140 colors supported by all browsers. For more details such as the color RGB or HEX values, check: https://www.w3schools.com/colors/colors_groups.asp. + + Blue-color + CSS color group. + + CadetBlue + CSS-color 0x5F9EA0. + + + SteelBlue + CSS-color 0x4682B4. + + + LightSteelBlue + CSS-color 0xB0C4DE. + + + LightBlue + CSS-color 0xADD8E6. + + + PowderBlue + CSS-color 0xB0E0E6. + + + LightSkyBlue + CSS-color 0x87CEFA. + + + SkyBlue + CSS-color 0x87CEEB. + + + CornflowerBlue + CSS-color 0x6495ED. + + + DeepSkyBlue + CSS-color 0x00BFFF. + + + DodgerBlue + CSS-color 0x1E90FF. + + + RoyalBlue + CSS-color 0x4169E1. + + + Blue + CSS-color 0x0000FF. + + + MediumBlue + CSS-color 0x0000CD. + + + DarkBlue + CSS-color 0x00008B. + + + Navy + CSS-color 0x000080. + + + MidnightBlue + CSS-color 0x191970. + + + + Brown-color + CSS color group. + + Cornsilk + CSS-color 0xFFF8DC. + + + BlanchedAlmond + CSS-color 0xFFEBCD. + + + Bisque + CSS-color 0xFFE4C4. + + + NavajoWhite + CSS-color 0xFFDEAD. + + + Wheat + CSS-color 0xF5DEB3. + + + BurlyWood + CSS-color 0xDEB887. + + + Tan + CSS-color 0xD2B48C. + + + RosyBrown + CSS-color 0xBC8F8F. + + + SandyBrown + CSS-color 0xF4A460. + + + GoldenRod + CSS-color 0xDAA520. + + + DarkGoldenRod + CSS-color 0xB8860B. + + + Peru + CSS-color 0xCD853F. + + + Chocolate + CSS-color 0xD2691E. + + + Olive + CSS-color 0x808000. + + + SaddleBrown + CSS-color 0x8B4513. + + + Sienna + CSS-color 0xA0522D. + + + Brown + CSS-color 0xA52A2A. + + + Maroon + CSS-color 0x800000. + + + + Cyan-color + CSS color group. + + Aqua + CSS-color 0x00FFFF. + + + Cyan + CSS-color 0x00FFFF. + + + LightCyan + CSS-color 0xE0FFFF. + + + PaleTurquoise + CSS-color 0xAFEEEE. + + + Aquamarine + CSS-color 0x7FFFD4. + + + Turquoise + CSS-color 0x40E0D0. + + + MediumTurquoise + CSS-color 0x48D1CC. + + + DarkTurquoise + CSS-color 0x00CED1. + + + + Green-color + CSS color group. + + GreenYellow + CSS-color 0xADFF2F. + + + Chartreuse + CSS-color 0x7FFF00. + + + LawnGreen + CSS-color 0x7CFC00. + + + Lime + CSS-color 0x00FF00. + + + LimeGreen + CSS-color 0x32CD32. + + + PaleGreen + CSS-color 0x98FB98. + + + LightGreen + CSS-color 0x90EE90. + + + MediumSpringGreen + CSS-color 0x00FA9A. + + + SpringGreen + CSS-color 0x00FF7F. + + + MediumSeaGreen + CSS-color 0x3CB371. + + + SeaGreen + CSS-color 0x2E8B57. + + + ForestGreen + CSS-color 0x228B22. + + + Green + CSS-color 0x008000. + + + DarkGreen + CSS-color 0x006400. + + + YellowGreen + CSS-color 0x9ACD32. + + + OliveDrab + CSS-color 0x6B8E23. + + + DarkOliveGreen + CSS-color 0x556B2F. + + + MediumAquaMarine + CSS-color 0x66CDAA. + + + DarkSeaGreen + CSS-color 0x8FBC8F. + + + LightSeaGreen + CSS-color 0x20B2AA. + + + DarkCyan + CSS-color 0x008B8B. + + + Teal + CSS-color 0x008080. + + + + Gray-color + CSS color group. + + Gainsboro + CSS-color 0xDCDCDC. + + + LightGray + CSS-color 0xD3D3D3. + + + Silver + CSS-color 0xC0C0C0. + + + DarkGray + CSS-color 0xA9A9A9. + + + DimGray + CSS-color 0x696969. + + + Gray + CSS-color 0x808080. + + + LightSlateGray + CSS-color 0x778899. + + + SlateGray + CSS-color 0x708090. + + + DarkSlateGray + CSS-color 0x2F4F4F. + + + Black + CSS-color 0x000000. + + + + Orange-color + CSS color group. + + Orange + CSS-color 0xFFA500. + + + DarkOrange + CSS-color 0xFF8C00. + + + Coral + CSS-color 0xFF7F50. + + + Tomato + CSS-color 0xFF6347. + + + OrangeRed + CSS-color 0xFF4500. + + + + Pink-color + CSS color group. + + Pink + CSS-color 0xFFC0CB. + + + LightPink + CSS-color 0xFFB6C1. + + + HotPink + CSS-color 0xFF69B4. + + + DeepPink + CSS-color 0xFF1493. + + + PaleVioletRed + CSS-color 0xDB7093. + + + MediumVioletRed + CSS-color 0xC71585. + + + + Purple-color + CSS color group. + + Lavender + CSS-color 0xE6E6FA. + + + Thistle + CSS-color 0xD8BFD8. + + + Plum + CSS-color 0xDDA0DD. + + + Orchid + CSS-color 0xDA70D6. + + + Violet + CSS-color 0xEE82EE. + + + Fuchsia + CSS-color 0xFF00FF. + + + Magenta + CSS-color 0xFF00FF. + + + MediumOrchid + CSS-color 0xBA55D3. + + + DarkOrchid + CSS-color 0x9932CC. + + + DarkViolet + CSS-color 0x9400D3. + + + BlueViolet + CSS-color 0x8A2BE2. + + + DarkMagenta + CSS-color 0x8B008B. + + + Purple + CSS-color 0x800080. + + + MediumPurple + CSS-color 0x9370DB. + + + MediumSlateBlue + CSS-color 0x7B68EE. + + + SlateBlue + CSS-color 0x6A5ACD. + + + DarkSlateBlue + CSS-color 0x483D8B. + + + RebeccaPurple + CSS-color 0x663399. + + + Indigo + CSS-color 0x4B0082. + + + + Red-color + CSS color group. + + LightSalmon + CSS-color 0xFFA07A. + + + Salmon + CSS-color 0xFA8072. + + + DarkSalmon + CSS-color 0xE9967A. + + + LightCoral + CSS-color 0xF08080. + + + IndianRed + CSS-color 0xCD5C5C. + + + Crimson + CSS-color 0xDC143C. + + + Red + CSS-color 0xFF0000. + + + FireBrick + CSS-color 0xB22222. + + + DarkRed + CSS-color 0x8B0000. + + + + Yellow-color + CSS color group. + + Gold + CSS-color 0xFFD700. + + + Yellow + CSS-color 0xFFFF00. + + + LightYellow + CSS-color 0xFFFFE0. + + + LemonChiffon + CSS-color 0xFFFACD. + + + LightGoldenRodYellow + CSS-color 0xFAFAD2. + + + PapayaWhip + CSS-color 0xFFEFD5. + + + Moccasin + CSS-color 0xFFE4B5. + + + PeachPuff + CSS-color 0xFFDAB9. + + + PaleGoldenRod + CSS-color 0xEEE8AA. + + + Khaki + CSS-color 0xF0E68C. + + + DarkKhaki + CSS-color 0xBDB76B. + + + + White-color + CSS color group. + + White + CSS-color 0xFFFFFF. + + + Snow + CSS-color 0xFFFAFA. + + + HoneyDew + CSS-color 0xF0FFF0. + + + MintCream + CSS-color 0xF5FFFA. + + + Azure + CSS-color 0xF0FFFF. + + + AliceBlue + CSS-color 0xF0F8FF. + + + GhostWhite + CSS-color 0xF8F8FF. + + + WhiteSmoke + CSS-color 0xF5F5F5. + + + SeaShell + CSS-color 0xFFF5EE. + + + Beige + CSS-color 0xF5F5DC. + + + OldLace + CSS-color 0xFDF5E6. + + + FloralWhite + CSS-color 0xFFFAF0. + + + Ivory + CSS-color 0xFFFFF0. + + + AntiqueWhite + CSS-color 0xFAEBD7. + + + Linen + CSS-color 0xFAF0E6. + + + LavenderBlush + CSS-color 0xFFF0F5. + + + MistyRose + CSS-color 0xFFE4E1. + + + + + Color-shade + A slight degree of difference between colors, especially with regard to how light or dark it is or as distinguished from one nearly like it. + + Dark-shade + A color tone not reflecting much light. + + + Light-shade + A color tone reflecting more light. + + + + Grayscale + Using a color map composed of shades of gray, varying from black at the weakest intensity to white at the strongest. + + # + White intensity between 0 and 1. + + takesValue + + + valueClass + numericClass + + + + + HSV-color + A color representation that models how colors appear under light. + + Hue + Attribute of a visual sensation according to which an area appears to be similar to one of the perceived colors. + + # + Angular value between 0 and 360. + + takesValue + + + valueClass + numericClass + + + + + Saturation + Colorfulness of a stimulus relative to its own brightness. + + # + B value of RGB between 0 and 1. + + takesValue + + + valueClass + numericClass + + + + + HSV-value + An attribute of a visual sensation according to which an area appears to emit more or less light. + + # + + takesValue + + + valueClass + numericClass + + + + + + RGB-color + A color from the RGB schema. + + RGB-red + The red component. + + # + R value of RGB between 0 and 1. + + takesValue + + + valueClass + numericClass + + + + + RGB-blue + The blue component. + + # + B value of RGB between 0 and 1. + + takesValue + + + valueClass + numericClass + + + + + RGB-green + The green component. + + # + G value of RGB between 0 and 1. + + takesValue + + + valueClass + numericClass + + + + + + + Luminance + A quality that exists by virtue of the luminous intensity per unit area projected in a given direction. + + + Opacity + A measure of impenetrability to light. + + + + + Sensory-presentation + The entity has a sensory manifestation. + + Auditory-presentation + The sense of hearing is used in the presentation to the user. + + Loudspeaker-separation + The distance between two loudspeakers. Grouped with the Distance tag. + + suggestedTag + Distance + + + + Monophonic + Relating to sound transmission, recording, or reproduction involving a single transmission path. + + + Silent + The absence of ambient audible sound or the state of having ceased to produce sounds. + + + Stereophonic + Relating to, or constituting sound reproduction involving the use of separated microphones and two transmission channels to achieve the sound separation of a live hearing. + + + + Gustatory-presentation + The sense of taste used in the presentation to the user. + + + Olfactory-presentation + The sense of smell used in the presentation to the user. + + + Somatic-presentation + The nervous system is used in the presentation to the user. + + + Tactile-presentation + The sense of touch used in the presentation to the user. + + + Vestibular-presentation + The sense balance used in the presentation to the user. + + + Visual-presentation + The sense of sight used in the presentation to the user. + + 2D-view + A view showing only two dimensions. + + + 3D-view + A view showing three dimensions. + + + Background-view + Parts of the view that are farthest from the viewer and usually the not part of the visual focus. + + + Bistable-view + Something having two stable visual forms that have two distinguishable stable forms as in optical illusions. + + + Foreground-view + Parts of the view that are closest to the viewer and usually the most important part of the visual focus. + + + Foveal-view + Visual presentation directly on the fovea. A view projected on the small depression in the retina containing only cones and where vision is most acute. + + + Map-view + A diagrammatic representation of an area of land or sea showing physical features, cities, roads. + + Aerial-view + Elevated view of an object from above, with a perspective as though the observer were a bird. + + + Satellite-view + A representation as captured by technology such as a satellite. + + + Street-view + A 360-degrees panoramic view from a position on the ground. + + + + Peripheral-view + Indirect vision as it occurs outside the point of fixation. + + + + + + Task-property + Something that pertains to a task. + + extensionAllowed + + + Task-attentional-demand + Strategy for allocating attention toward goal-relevant information. + + Bottom-up-attention + Attentional guidance purely by externally driven factors to stimuli that are salient because of their inherent properties relative to the background. Sometimes this is referred to as stimulus driven. + + relatedTag + Top-down-attention + + + + Covert-attention + Paying attention without moving the eyes. + + relatedTag + Overt-attention + + + + Divided-attention + Integrating parallel multiple stimuli. Behavior involving responding simultaneously to multiple tasks or multiple task demands. + + relatedTag + Focused-attention + + + + Focused-attention + Responding discretely to specific visual, auditory, or tactile stimuli. + + relatedTag + Divided-attention + + + + Orienting-attention + Directing attention to a target stimulus. + + + Overt-attention + Selectively processing one location over others by moving the eyes to point at that location. + + relatedTag + Covert-attention + + + + Selective-attention + Maintaining a behavioral or cognitive set in the face of distracting or competing stimuli. Ability to pay attention to a limited array of all available sensory information. + + + Sustained-attention + Maintaining a consistent behavioral response during continuous and repetitive activity. + + + Switched-attention + Having to switch attention between two or more modalities of presentation. + + + Top-down-attention + Voluntary allocation of attention to certain features. Sometimes this is referred to goal-oriented attention. + + relatedTag + Bottom-up-attention + + + + + Task-effect-evidence + The evidence supporting the conclusion that the event had the specified effect. + + Computational-evidence + A type of evidence in which data are produced, and/or generated, and/or analyzed on a computer. + + + External-evidence + A phenomenon that follows and is caused by some previous phenomenon. + + + Intended-effect + A phenomenon that is intended to follow and be caused by some previous phenomenon. + + + Behavioral-evidence + An indication or conclusion based on the behavior of an agent. + + + + Task-event-role + The purpose of an event with respect to the task. + + Experimental-stimulus + Part of something designed to elicit a response in the experiment. + + + Incidental + A sensory or other type of event that is unrelated to the task or experiment. + + + Instructional + Usually associated with a sensory event intended to give instructions to the participant about the task or behavior. + + + Mishap + Unplanned disruption such as an equipment or experiment control abnormality or experimenter error. + + + Participant-response + Something related to a participant actions in performing the task. + + + Task-activity + Something that is part of the overall task or is necessary to the overall experiment but is not directly part of a stimulus-response cycle. Examples would be taking a survey or provided providing a silva sample. + + + Warning + Something that should warn the participant that the parameters of the task have been or are about to be exceeded such as a warning message about getting too close to the shoulder of the road in a driving task. + + + + Task-action-type + How an agent action should be interpreted in terms of the task specification. + + Appropriate-action + An action suitable or proper in the circumstances. + + relatedTag + Inappropriate-action + + + + Correct-action + An action that was a correct response in the context of the task. + + relatedTag + Incorrect-action + Indeterminate-action + + + + Correction + An action offering an improvement to replace a mistake or error. + + + Done-indication + An action that indicates that the participant has completed this step in the task. + + relatedTag + Ready-indication + + + + Incorrect-action + An action considered wrong or incorrect in the context of the task. + + relatedTag + Correct-action + Indeterminate-action + + + + Imagined-action + Form a mental image or concept of something. This is used to identity something that only happened in the imagination of the participant as in imagined movements in motor imagery paradigms. + + + Inappropriate-action + An action not in keeping with what is correct or proper for the task. + + relatedTag + Appropriate-action + + + + Indeterminate-action + An action that cannot be distinguished between two or more possibibities in the current context. This tag might be applied when an outside evaluator or a classification algorithm cannot determine a definitive result. + + relatedTag + Correct-action + Incorrect-action + Miss + Near-miss + + + + Omitted-action + An expected response was skipped. + + + Miss + An action considered to be a failure in the context of the task. For example, if the agent is supposed to try to hit a target and misses. + + relatedTag + Near-miss + + + + Near-miss + An action barely satisfied the requirements of the task. In a driving experiment for example this could pertain to a narrowly avoided collision or other accident. + + relatedTag + Miss + + + + Ready-indication + An action that indicates that the participant is ready to perform the next step in the task. + + relatedTag + Done-indication + + + + + Task-relationship + Specifying organizational importance of sub-tasks. + + Background-subtask + A part of the task which should be performed in the background as for example inhibiting blinks due to instruction while performing the primary task. + + + Primary-subtask + A part of the task which should be the primary focus of the participant. + + + + Task-stimulus-role + The role the stimulus plays in the task. + + Cue + A signal for an action, a pattern of stimuli indicating a particular response. + + + Distractor + A person or thing that distracts or a plausible but incorrect option in a multiple-choice question. In pyschological studies this is sometimes referred to as a foil. + + + Expected + Considered likely, probable or anticipated. Something of low information value as in frequent non-targets in an RSVP paradigm. + + relatedTag + Unexpected + + + suggestedTag + Target + + + + Extraneous + Irrelevant or unrelated to the subject being dealt with. + + + Feedback + An evaluative response to an inquiry, process, event, or activity. + + + Go-signal + An indicator to proceed with a planned action. + + relatedTag + Stop-signal + + + + Meaningful + Conveying significant or relevant information. + + + Newly-learned + Representing recently acquired information or understanding. + + + Non-informative + Something that is not useful in forming an opinion or judging an outcome. + + + Non-target + Something other than that done or looked for. Also tag Expected if the Non-target is frequent. + + relatedTag + Target + + + + Not-meaningful + Not having a serious, important, or useful quality or purpose. + + + Novel + Having no previous example or precedent or parallel. + + + Oddball + Something unusual, or infrequent. + + relatedTag + Unexpected + + + suggestedTag + Target + + + + Planned + Something that was decided on or arranged in advance. + + relatedTag + Unplanned + + + + Penalty + A disadvantage, loss, or hardship due to some action. + + + Priming + An implicit memory effect in which exposure to a stimulus influences response to a later stimulus. + + + Query + A sentence of inquiry that asks for a reply. + + + Reward + A positive reinforcement for a desired action, behavior or response. + + + Stop-signal + An indicator that the agent should stop the current activity. + + relatedTag + Go-signal + + + + Target + Something fixed as a goal, destination, or point of examination. + + + Threat + An indicator that signifies hostility and predicts an increased probability of attack. + + + Timed + Something planned or scheduled to be done at a particular time or lasting for a specified amount of time. + + + Unexpected + Something that is not anticipated. + + relatedTag + Expected + + + + Unplanned + Something that has not been planned as part of the task. + + relatedTag + Planned + + + + + + + Relation + Concerns the way in which two or more people or things are connected. + + extensionAllowed + + + Comparative-relation + Something considered in comparison to something else. The first entity is the focus. + + Approximately-equal-to + (A, (Approximately-equal-to, B)) indicates that A and B have almost the same value. Here A and B could refer to sizes, orders, positions or other quantities. + + + Less-than + (A, (Less-than, B)) indicates that A is smaller than B. Here A and B could refer to sizes, orders, positions or other quantities. + + + Less-than-or-equal-to + (A, (Less-than-or-equal-to, B)) indicates that the relative size or order of A is smaller than or equal to B. + + + Greater-than + (A, (Greater-than, B)) indicates that the relative size or order of A is bigger than that of B. + + + Greater-than-or-equal-to + (A, (Greater-than-or-equal-to, B)) indicates that the relative size or order of A is bigger than or the same as that of B. + + + Equal-to + (A, (Equal-to, B)) indicates that the size or order of A is the same as that of B. + + + Not-equal-to + (A, (Not-equal-to, B)) indicates that the size or order of A is not the same as that of B. + + + + Connective-relation + Indicates two entities are related in some way. The first entity is the focus. + + Belongs-to + (A, (Belongs-to, B)) indicates that A is a member of B. + + + Connected-to + (A, (Connected-to, B)) indicates that A is related to B in some respect, usually through a direct link. + + + Contained-in + (A, (Contained-in, B)) indicates that A is completely inside of B. + + + Described-by + (A, (Described-by, B)) indicates that B provides information about A. + + + From-to + (A, (From-to, B)) indicates a directional relation from A to B. A is considered the source. + + + Group-of + (A, (Group-of, B)) indicates A is a group of items of type B. + + + Implied-by + (A, (Implied-by, B)) indicates B is suggested by A. + + + Includes + (A, (Includes, B)) indicates that A has B as a member or part. + + + Interacts-with + (A, (Interacts-with, B)) indicates A and B interact, possibly reciprocally. + + + Member-of + (A, (Member-of, B)) indicates A is a member of group B. + + + Part-of + (A, (Part-of, B)) indicates A is a part of the whole B. + + + Performed-by + (A, (Performed-by, B)) indicates that the action or procedure A was carried out by agent B. + + + Performed-using + (A, (Performed-using, B)) indicates that the action or procedure A was accomplished using B. + + + Related-to + (A, (Related-to, B)) indicates A has some relationship to B. + + + Unrelated-to + (A, (Unrelated-to, B)) indicates that A is not related to B. For example, A is not related to Task. + + + + Directional-relation + A relationship indicating direction of change of one entity relative to another. The first entity is the focus. + + Away-from + (A, (Away-from, B)) indicates that A is going or has moved away from B. The meaning depends on A and B. + + + Towards + (A, (Towards, B)) indicates that A is going to or has moved to B. The meaning depends on A and B. + + + + Logical-relation + Indicating a logical relationship between entities. The first entity is usually the focus. + + And + (A, (And, B)) means A and B are both in effect. + + + Or + (A, (Or, B)) means at least one of A and B are in effect. + + + + Spatial-relation + Indicating a relationship about position between entities. + + Above + (A, (Above, B)) means A is in a place or position that is higher than B. + + + Across-from + (A, (Across-from, B)) means A is on the opposite side of something from B. + + + Adjacent-to + (A, (Adjacent-to, B)) indicates that A is next to B in time or space. + + + Ahead-of + (A, (Ahead-of, B)) indicates that A is further forward in time or space in B. + + + Around + (A, (Around, B)) means A is in or near the present place or situation of B. + + + Behind + (A, (Behind, B)) means A is at or to the far side of B, typically so as to be hidden by it. + + + Below + (A, (Below, B)) means A is in a place or position that is lower than the position of B. + + + Between + (A, (Between, (B, C))) means A is in the space or interval separating B and C. + + + Bilateral-to + (A, (Bilateral, B)) means A is on both sides of B or affects both sides of B. + + + Bottom-edge-of + (A, (Bottom-edge-of, B)) means A is on the bottom most part or or near the boundary of B. + + relatedTag + Left-edge-of + Right-edge-of + Top-edge-of + + + + Boundary-of + (A, (Boundary-of, B)) means A is on or part of the edge or boundary of B. + + + Center-of + (A, (Center-of, B)) means A is at a point or or in an area that is approximately central within B. + + + Close-to + (A, (Close-to, B)) means A is at a small distance from or is located near in space to B. + + + Far-from + (A, (Far-from, B)) means A is at a large distance from or is not located near in space to B. + + + In-front-of + (A, (In-front-of, B)) means A is in a position just ahead or at the front part of B, potentially partially blocking B from view. + + + Left-edge-of + (A, (Left-edge-of, B)) means A is located on the left side of B on or near the boundary of B. + + relatedTag + Bottom-edge-of + Right-edge-of + Top-edge-of + + + + Left-side-of + (A, (Left-side-of, B)) means A is located on the left side of B usually as part of B. + + relatedTag + Right-side-of + + + + Lower-center-of + (A, (Lower-center-of, B)) means A is situated on the lower center part of B (due south). This relation is often used to specify qualitative information about screen position. + + relatedTag + Center-of + Lower-left-of + Lower-right-of + Upper-center-of + Upper-right-of + + + + Lower-left-of + (A, (Lower-left-of, B)) means A is situated on the lower left part of B. This relation is often used to specify qualitative information about screen position. + + relatedTag + Center-of + Lower-center-of + Lower-right-of + Upper-center-of + Upper-left-of + Upper-right-of + + + + Lower-right-of + (A, (Lower-right-of, B)) means A is situated on the lower right part of B. This relation is often used to specify qualitative information about screen position. + + relatedTag + Center-of + Lower-center-of + Lower-left-of + Upper-left-of + Upper-center-of + Upper-left-of + Lower-right-of + + + + Outside-of + (A, (Outside-of, B)) means A is located in the space around but not including B. + + + Over + (A, (Over, B)) means A above is above B so as to cover or protect or A extends over the a general area as from a from a vantage point. + + + Right-edge-of + (A, (Right-edge-of, B)) means A is located on the right side of B on or near the boundary of B. + + relatedTag + Bottom-edge-of + Left-edge-of + Top-edge-of + + + + Right-side-of + (A, (Right-side-of, B)) means A is located on the right side of B usually as part of B. + + relatedTag + Left-side-of + + + + To-left-of + (A, (To-left-of, B)) means A is located on or directed toward the side to the west of B when B is facing north. This term is used when A is not part of B. + + + To-right-of + (A, (To-right-of, B)) means A is located on or directed toward the side to the east of B when B is facing north. This term is used when A is not part of B. + + + Top-edge-of + (A, (Top-edge-of, B)) means A is on the uppermost part or or near the boundary of B. + + relatedTag + Left-edge-of + Right-edge-of + Bottom-edge-of + + + + Top-of + (A, (Top-of, B)) means A is on the uppermost part, side, or surface of B. + + + Upper-center-of + (A, (Upper-center-of, B)) means A is situated on the upper center part of B (due north). This relation is often used to specify qualitative information about screen position. + + relatedTag + Center-of + Lower-center-of + Lower-left-of + Lower-right-of + Upper-center-of + Upper-right-of + + + + Upper-left-of + (A, (Upper-left-of, B)) means A is situated on the upper left part of B. This relation is often used to specify qualitative information about screen position. + + relatedTag + Center-of + Lower-center-of + Lower-left-of + Lower-right-of + Upper-center-of + Upper-right-of + + + + Upper-right-of + (A, (Upper-right-of, B)) means A is situated on the upper right part of B. This relation is often used to specify qualitative information about screen position. + + relatedTag + Center-of + Lower-center-of + Lower-left-of + Upper-left-of + Upper-center-of + Lower-right-of + + + + Underneath + (A, (Underneath, B)) means A is situated directly below and may be concealed by B. + + + Within + (A, (Within, B)) means A is on the inside of or contained in B. + + + + Temporal-relation + A relationship that includes a temporal or time-based component. + + After + (A, (After B)) means A happens at a time subsequent to a reference time related to B. + + + Asynchronous-with + (A, (Asynchronous-with, B)) means A happens at times not occurring at the same time or having the same period or phase as B. + + + Before + (A, (Before B)) means A happens at a time earlier in time or order than B. + + + During + (A, (During, B)) means A happens at some point in a given period of time in which B is ongoing. + + + Synchronous-with + (A, (Synchronous-with, B)) means A happens at occurs at the same time or rate as B. + + + Waiting-for + (A, (Waiting-for, B)) means A pauses for something to happen in B. + + + + + + + accelerationUnits + + defaultUnits + m-per-s^2 + + + m-per-s^2 + + SIUnit + + + unitSymbol + + + conversionFactor + 1.0 + + + + + angleUnits + + defaultUnits + radian + + + radian + + SIUnit + + + conversionFactor + 1.0 + + + + rad + + SIUnit + + + unitSymbol + + + conversionFactor + 1.0 + + + + degree + + conversionFactor + 0.0174533 + + + + + areaUnits + + defaultUnits + m^2 + + + m^2 + + SIUnit + + + unitSymbol + + + conversionFactor + 1.0 + + + + + currencyUnits + Units indicating the worth of something. + + defaultUnits + $ + + + dollar + + conversionFactor + 1.0 + + + + $ + + unitPrefix + + + unitSymbol + + + conversionFactor + 1.0 + + + + euro + + + point + + + + electricPotentialUnits + + defaultUnits + uv + + + v + + SIUnit + + + unitSymbol + + + conversionFactor + 0.000001 + + + + Volt + + SIUnit + + + conversionFactor + 0.000001 + + + + + frequencyUnits + + defaultUnits + Hz + + + hertz + + SIUnit + + + conversionFactor + 1.0 + + + + Hz + + SIUnit + + + unitSymbol + + + conversionFactor + 1.0 + + + + + intensityUnits + + defaultUnits + dB + + + dB + Intensity expressed as ratio to a threshold. May be used for sound intensity. + + unitSymbol + + + conversionFactor + 1.0 + + + + candela + Units used to express light intensity. + + SIUnit + + + + cd + Units used to express light intensity. + + SIUnit + + + unitSymbol + + + + + jerkUnits + + defaultUnits + m-per-s^3 + + + m-per-s^3 + + unitSymbol + + + conversionFactor + 1.0 + + + + + magneticFieldUnits + Units used to magnetic field intensity. + + defaultUnits + fT + + + tesla + + SIUnit + + + conversionFactor + 10^-15 + + + + T + + SIUnit + + + unitSymbol + + + conversionFactor + 10^-15 + + + + + memorySizeUnits + + defaultUnits + B + + + byte + + SIUnit + + + conversionFactor + 1.0 + + + + B + + SIUnit + + + unitSymbol + + + conversionFactor + 1.0 + + + + + physicalLengthUnits + + defaultUnits + m + + + foot + + conversionFactor + 0.3048 + + + + inch + + conversionFactor + 0.0254 + + + + meter + + SIUnit + + + conversionFactor + 1.0 + + + + metre + + SIUnit + + + conversionFactor + 1.0 + + + + m + + SIUnit + + + unitSymbol + + + conversionFactor + 1.0 + + + + mile + + conversionFactor + 1609.34 + + + + + speedUnits + + defaultUnits + m-per-s + + + m-per-s + + SIUnit + + + unitSymbol + + + conversionFactor + 1.0 + + + + mph + + unitSymbol + + + conversionFactor + 0.44704 + + + + kph + + unitSymbol + + + conversionFactor + 0.277778 + + + + + temperatureUnits + + degree Celsius + + SIUnit + + + conversionFactor + 1.0 + + + + oC + + SIUnit + + + unitSymbol + + + conversionFactor + 1.0 + + + + + timeUnits + + defaultUnits + s + + + second + + SIUnit + + + conversionFactor + 1.0 + + + + s + + SIUnit + + + unitSymbol + + + conversionFactor + 1.0 + + + + day + + conversionFactor + 86400 + + + + minute + + conversionFactor + 60 + + + + hour + Should be in 24-hour format. + + conversionFactor + 3600 + + + + + volumeUnits + + defaultUnits + m^3 + + + m^3 + + SIUnit + + + unitSymbol + + + conversionFactor + 1.0 + + + + + weightUnits + + defaultUnits + g + + + g + + SIUnit + + + unitSymbol + + + conversionFactor + 1.0 + + + + gram + + SIUnit + + + conversionFactor + 1.0 + + + + pound + + conversionFactor + 453.592 + + + + lb + + conversionFactor + 453.592 + + + + + + + deca + SI unit multiple representing 10^1. + + SIUnitModifier + + + conversionFactor + 10.0 + + + + da + SI unit multiple representing 10^1. + + SIUnitSymbolModifier + + + conversionFactor + 10.0 + + + + hecto + SI unit multiple representing 10^2. + + SIUnitModifier + + + conversionFactor + 100.0 + + + + h + SI unit multiple representing 10^2. + + SIUnitSymbolModifier + + + conversionFactor + 100.0 + + + + kilo + SI unit multiple representing 10^3. + + SIUnitModifier + + + conversionFactor + 1000.0 + + + + k + SI unit multiple representing 10^3. + + SIUnitSymbolModifier + + + conversionFactor + 1000.0 + + + + mega + SI unit multiple representing 10^6. + + SIUnitModifier + + + conversionFactor + 10^6 + + + + M + SI unit multiple representing 10^6. + + SIUnitSymbolModifier + + + conversionFactor + 10^6 + + + + giga + SI unit multiple representing 10^9. + + SIUnitModifier + + + conversionFactor + 10^9 + + + + G + SI unit multiple representing 10^9. + + SIUnitSymbolModifier + + + conversionFactor + 10^9 + + + + tera + SI unit multiple representing 10^12. + + SIUnitModifier + + + conversionFactor + 10^12 + + + + T + SI unit multiple representing 10^12. + + SIUnitSymbolModifier + + + conversionFactor + 10^12 + + + + peta + SI unit multiple representing 10^15. + + SIUnitModifier + + + conversionFactor + 10^15 + + + + P + SI unit multiple representing 10^15. + + SIUnitSymbolModifier + + + conversionFactor + 10^15 + + + + exa + SI unit multiple representing 10^18. + + SIUnitModifier + + + conversionFactor + 10^18 + + + + E + SI unit multiple representing 10^18. + + SIUnitSymbolModifier + + + conversionFactor + 10^18 + + + + zetta + SI unit multiple representing 10^21. + + SIUnitModifier + + + conversionFactor + 10^21 + + + + Z + SI unit multiple representing 10^21. + + SIUnitSymbolModifier + + + conversionFactor + 10^21 + + + + yotta + SI unit multiple representing 10^24. + + SIUnitModifier + + + conversionFactor + 10^24 + + + + Y + SI unit multiple representing 10^24. + + SIUnitSymbolModifier + + + conversionFactor + 10^24 + + + + deci + SI unit submultiple representing 10^-1. + + SIUnitModifier + + + conversionFactor + 0.1 + + + + d + SI unit submultiple representing 10^-1. + + SIUnitSymbolModifier + + + conversionFactor + 0.1 + + + + centi + SI unit submultiple representing 10^-2. + + SIUnitModifier + + + conversionFactor + 0.01 + + + + c + SI unit submultiple representing 10^-2. + + SIUnitSymbolModifier + + + conversionFactor + 0.01 + + + + milli + SI unit submultiple representing 10^-3. + + SIUnitModifier + + + conversionFactor + 0.001 + + + + m + SI unit submultiple representing 10^-3. + + SIUnitSymbolModifier + + + conversionFactor + 0.001 + + + + micro + SI unit submultiple representing 10^-6. + + SIUnitModifier + + + conversionFactor + 10^-6 + + + + u + SI unit submultiple representing 10^-6. + + SIUnitSymbolModifier + + + conversionFactor + 10^-6 + + + + nano + SI unit submultiple representing 10^-9. + + SIUnitModifier + + + conversionFactor + 10^-9 + + + + n + SI unit submultiple representing 10^-9. + + SIUnitSymbolModifier + + + conversionFactor + 10^-9 + + + + pico + SI unit submultiple representing 10^-12. + + SIUnitModifier + + + conversionFactor + 10^-12 + + + + p + SI unit submultiple representing 10^-12. + + SIUnitSymbolModifier + + + conversionFactor + 10^-12 + + + + femto + SI unit submultiple representing 10^-15. + + SIUnitModifier + + + conversionFactor + 10^-15 + + + + f + SI unit submultiple representing 10^-15. + + SIUnitSymbolModifier + + + conversionFactor + 10^-15 + + + + atto + SI unit submultiple representing 10^-18. + + SIUnitModifier + + + conversionFactor + 10^-18 + + + + a + SI unit submultiple representing 10^-18. + + SIUnitSymbolModifier + + + conversionFactor + 10^-18 + + + + zepto + SI unit submultiple representing 10^-21. + + SIUnitModifier + + + conversionFactor + 10^-21 + + + + z + SI unit submultiple representing 10^-21. + + SIUnitSymbolModifier + + + conversionFactor + 10^-21 + + + + yocto + SI unit submultiple representing 10^-24. + + SIUnitModifier + + + conversionFactor + 10^-24 + + + + y + SI unit submultiple representing 10^-24. + + SIUnitSymbolModifier + + + conversionFactor + 10^-24 + + + + + + dateTimeClass + Date-times should conform to ISO8601 date-time format YYYY-MM-DDThh:mm:ss. Any variation on the full form is allowed. + + allowedCharacter + digits + T + - + : + + + + nameClass + Value class designating values that have the characteristics of node names. The allowed characters are alphanumeric, hyphen, and underbar. + + allowedCharacter + letters + digits + _ + - + + + + numericClass + Value must be a valid numerical value. + + allowedCharacter + digits + E + e + + + - + . + + + + posixPath + Posix path specification. + + allowedCharacter + digits + letters + / + : + + + + textClass + Value class designating values that have the characteristics of text such as in descriptions. + + allowedCharacter + letters + digits + blank + + + - + : + ; + . + / + ( + ) + ? + * + % + $ + @ + + + + + + allowedCharacter + A schema attribute of value classes specifying a special character that is allowed in expressing the value of a placeholder. Normally the allowed characters are listed individually. However, the word letters designates the upper and lower case alphabetic characters and the word digits designates the digits 0-9. The word blank designates the blank character. + + valueClassProperty + + + + conversionFactor + The multiplicative factor to multiply these units to convert to default units. + + unitProperty + + + unitModifierProperty + + + + deprecatedFrom + Indicates that this element is deprecated. The value of the attribute is the latest schema version in which the element appeared in undeprecated form. + + elementProperty + + + + defaultUnits + A schema attribute of unit classes specifying the default units to use if the placeholder has a unit class but the substituted value has no units. + + unitClassProperty + + + + extensionAllowed + A schema attribute indicating that users can add unlimited levels of child nodes under this tag. This tag is propagated to child nodes with the exception of the hashtag placeholders. + + boolProperty + + + nodeProperty + + + isInheritedProperty + + + + inLibrary + Indicates this schema element came from the named library schema, not the standard schema. This attribute is added by tools when a library schema is merged into its partnered standard schema. + + elementProperty + + + + recommended + A schema attribute indicating that the event-level HED string should include this tag. + + boolProperty + + + nodeProperty + + + + relatedTag + A schema attribute suggesting HED tags that are closely related to this tag. This attribute is used by tagging tools. + + nodeProperty + + + isInheritedProperty + + + + requireChild + A schema attribute indicating that one of the node elements descendants must be included when using this tag. + + boolProperty + + + nodeProperty + + + + required + A schema attribute indicating that every event-level HED string should include this tag. + + boolProperty + + + nodeProperty + + + + reserved + A schema attribute indicating that this tag has special meaning and requires special handling by tools. + + boolProperty + + + nodeProperty + + + + rooted + Indicates a top-level library schema node is identical to a node of the same name in the partnered standard schema. This attribute can only appear in nodes that have the inLibrary schema attribute. + + nodeProperty + + + + SIUnit + A schema attribute indicating that this unit element is an SI unit and can be modified by multiple and submultiple names. Note that some units such as byte are designated as SI units although they are not part of the standard. + + boolProperty + + + unitProperty + + + + SIUnitModifier + A schema attribute indicating that this SI unit modifier represents a multiple or submultiple of a base unit rather than a unit symbol. + + boolProperty + + + unitModifierProperty + + + + SIUnitSymbolModifier + A schema attribute indicating that this SI unit modifier represents a multiple or submultiple of a unit symbol rather than a base symbol. + + boolProperty + + + unitModifierProperty + + + + suggestedTag + A schema attribute that indicates another tag that is often associated with this tag. This attribute is used by tagging tools to provide tagging suggestions. + + nodeProperty + + + isInheritedProperty + + + + tagGroup + A schema attribute indicating the tag can only appear inside a tag group. + + boolProperty + + + nodeProperty + + + + takesValue + A schema attribute indicating the tag is a hashtag placeholder that is expected to be replaced with a user-defined value. + + boolProperty + + + nodeProperty + + + + topLevelTagGroup + A schema attribute indicating that this tag (or its descendants) can only appear in a top-level tag group. A tag group can have at most one tag with this attribute. + + boolProperty + + + nodeProperty + + + + unique + A schema attribute indicating that only one of this tag or its descendants can be used in the event-level HED string. + + boolProperty + + + nodeProperty + + + + unitClass + A schema attribute specifying which unit class this value tag belongs to. + + nodeProperty + + + + unitPrefix + A schema attribute applied specifically to unit elements to designate that the unit indicator is a prefix (e.g., dollar sign in the currency units). + + boolProperty + + + unitProperty + + + + unitSymbol + A schema attribute indicating this tag is an abbreviation or symbol representing a type of unit. Unit symbols represent both the singular and the plural and thus cannot be pluralized. + + boolProperty + + + unitProperty + + + + valueClass + A schema attribute specifying which value class this value tag belongs to. + + nodeProperty + + + + + + boolProperty + Indicates that the schema attribute represents something that is either true or false and does not have a value. Attributes without this value are assumed to have string values. + + + elementProperty + Indicates this schema attribute can apply to any type of element(tag term, unit class, etc). + + + isInheritedProperty + Indicates that this attribute is inherited by child nodes. This property only applies to schema attributes for nodes. + + + nodeProperty + Indicates this schema attribute applies to node (tag-term) elements. This was added to allow for an attribute to apply to multiple elements. + + + unitClassProperty + Indicates that the schema attribute is meant to be applied to unit classes. + + + unitModifierProperty + Indicates that the schema attribute is meant to be applied to unit modifier classes. + + + unitProperty + Indicates that the schema attribute is meant to be applied to units within a unit class. + + + valueClassProperty + Indicates that the schema attribute is meant to be applied to value classes. + + + This schema is released under the Creative Commons Attribution 4.0 International and is a product of the HED Working Group. The DOI for the latest version of the HED standard schema is 10.5281/zenodo.7876037. + + diff --git a/hed/schema/schema_io/schema2base.py b/hed/schema/schema_io/schema2base.py index 6f1c88a09..d7c717476 100644 --- a/hed/schema/schema_io/schema2base.py +++ b/hed/schema/schema_io/schema2base.py @@ -1,5 +1,6 @@ """Baseclass for mediawiki/xml writers""" from hed.schema.hed_schema_constants import HedSectionKey, HedKey +import copy class HedSchema2Base: @@ -16,8 +17,8 @@ def process_schema(self, hed_schema, save_merged=False): ---------- hed_schema : HedSchema save_merged: bool - If true, this will save the schema as a merged schema if it is a "with-standard" schema. - If it is not a "with-standard" schema, this setting has no effect. + If true, this will save the schema as a merged schema if it is a "withStandard" schema. + If it is not a "withStandard" schema, this setting has no effect. Returns ------- @@ -33,11 +34,9 @@ def process_schema(self, hed_schema, save_merged=False): self._save_base = True else: # Saving a standard schema or a library schema without a standard schema - save_merged = False - if hed_schema.library: - self._save_lib = True - else: - self._save_base = True + save_merged = True + self._save_lib = True + self._save_base = True self._save_merged = save_merged @@ -73,20 +72,32 @@ def _write_entry(self, entry, parent_node, include_props=True): def _output_tags(self, all_tags): schema_node = self._start_section(HedSectionKey.AllTags) - tag_levels = {} - for tag_entry in all_tags.values(): + # This assumes .all_entries is sorted in a reasonable way for output. + level_adj = 0 + all_nodes = {} # List of all nodes we've written out. + for tag_entry in all_tags.all_entries: if self._should_skip(tag_entry): continue tag = tag_entry.name level = tag.count("/") + if not tag_entry.has_attribute(HedKey.InLibrary): + level_adj = 0 if level == 0: root_tag = self._write_tag_entry(tag_entry, schema_node, level) - tag_levels[0] = root_tag + all_nodes[tag_entry.name] = root_tag else: - parent_tag = tag_levels[level - 1] - child_tag = self._write_tag_entry(tag_entry, parent_tag, level) - tag_levels[level] = child_tag + # Only output the rooted parent nodes if they have a parent(for duplicates that don't) + if tag_entry.has_attribute(HedKey.InLibrary) and tag_entry.parent and \ + not tag_entry.parent.has_attribute(HedKey.InLibrary) and not self._save_merged: + if tag_entry.parent.name not in all_nodes: + level_adj = level + tag_entry = copy.deepcopy(tag_entry) + tag_entry.attributes[HedKey.Rooted] = tag_entry.parent.short_tag_name + + parent_node = all_nodes.get(tag_entry.parent_name, schema_node) + child_node = self._write_tag_entry(tag_entry, parent_node, level - level_adj) + all_nodes[tag_entry.name] = child_node self._end_tag_section() diff --git a/hed/schema/schema_io/schema2wiki.py b/hed/schema/schema_io/schema2wiki.py index b590cefec..1de5e9c1b 100644 --- a/hed/schema/schema_io/schema2wiki.py +++ b/hed/schema/schema_io/schema2wiki.py @@ -1,6 +1,6 @@ """Allows output of HedSchema objects as .mediawiki format""" -from hed.schema.hed_schema_constants import HedSectionKey +from hed.schema.hed_schema_constants import HedSectionKey, HedKey from hed.schema.schema_io import wiki_constants from hed.schema.schema_io.schema2base import HedSchema2Base @@ -49,6 +49,8 @@ def _end_tag_section(self): def _write_tag_entry(self, tag_entry, parent_node=None, level=0): tag = tag_entry.name if level == 0: + if "/" in tag: + tag = tag_entry.short_tag_name self._add_blank_line() self.current_tag_string += f"'''{tag}'''" else: @@ -121,8 +123,7 @@ def _get_attribs_string_from_schema(header_attributes): final_attrib_string = " ".join(attrib_values) return final_attrib_string - @staticmethod - def _format_tag_props(tag_props): + def _format_tag_props(self, tag_props): """ Takes a dictionary of tag attributes and returns a string with the .mediawiki representation @@ -138,6 +139,9 @@ def _format_tag_props(tag_props): prop_string = "" final_props = [] for prop, value in tag_props.items(): + # Never save InLibrary if saving merged. + if not self._save_merged and prop == HedKey.InLibrary: + continue if value is None or value is False: continue if value is True: diff --git a/hed/schema/schema_io/schema2xml.py b/hed/schema/schema_io/schema2xml.py index 83f4c052e..974480347 100644 --- a/hed/schema/schema_io/schema2xml.py +++ b/hed/schema/schema_io/schema2xml.py @@ -1,7 +1,7 @@ """Allows output of HedSchema objects as .xml format""" from xml.etree.ElementTree import Element, SubElement -from hed.schema.hed_schema_constants import HedSectionKey +from hed.schema.hed_schema_constants import HedSectionKey, HedKey from hed.schema.schema_io import xml_constants from hed.schema.schema_io.schema2base import HedSchema2Base @@ -107,8 +107,7 @@ def _write_entry(self, entry, parent_node=None, include_props=True): # ========================================= # Output helper functions to create nodes # ========================================= - @staticmethod - def _add_tag_node_attributes(tag_node, tag_attributes, attribute_node_name=xml_constants.ATTRIBUTE_ELEMENT): + def _add_tag_node_attributes(self, tag_node, tag_attributes, attribute_node_name=xml_constants.ATTRIBUTE_ELEMENT): """Adds the attributes to a tag. Parameters @@ -125,7 +124,8 @@ def _add_tag_node_attributes(tag_node, tag_attributes, attribute_node_name=xml_c for attribute, value in tag_attributes.items(): if value is False: continue - + if not self._save_merged and attribute == HedKey.InLibrary: + continue node_name = attribute_node_name attribute_node = SubElement(tag_node, node_name) name_node = SubElement(attribute_node, xml_constants.NAME_ELEMENT) diff --git a/hed/schema/schema_io/wiki2schema.py b/hed/schema/schema_io/wiki2schema.py index c4078db66..c09a6803b 100644 --- a/hed/schema/schema_io/wiki2schema.py +++ b/hed/schema/schema_io/wiki2schema.py @@ -76,6 +76,7 @@ def __init__(self, wiki_file_path, schema_as_string): self.fatal_errors = [] self._schema = HedSchema() self._schema.filename = wiki_file_path + self._loading_merged = True try: if wiki_file_path and schema_as_string: @@ -120,10 +121,16 @@ def _read_wiki(self, wiki_lines): if self._schema.with_standard and not self._schema.merged: from hed.schema.hed_schema_io import load_schema_version saved_attr = self._schema.header_attributes - base_version = load_schema_version(self._schema.with_standard) + try: + base_version = load_schema_version(self._schema.with_standard) + except HedFileError as e: + raise HedFileError(HedExceptions.BAD_WITH_STANDARD_VERSION, + message=f"Cannot load withStandard schema '{self._schema.with_standard}'", + filename=e.filename) self._schema = base_version self._schema.filename = self.filename self._schema.header_attributes = saved_attr + self._loading_merged = False wiki_lines_by_section = self._split_lines_into_sections(wiki_lines) parse_order = { @@ -279,23 +286,38 @@ def _read_schema(self, lines): """ self._schema._initialize_attributes(HedSectionKey.AllTags) parent_tags = [] + level_adj = 0 for line_number, line in lines: if line.startswith(wiki_constants.ROOT_TAG): parent_tags = [] else: - level = self._get_tag_level(line) + level = self._get_tag_level(line) + level_adj if level < len(parent_tags): parent_tags = parent_tags[:level] elif level > len(parent_tags): - self._add_fatal_error(line, "Line has too many *'s at the front. You cannot skip a level.") + self._add_fatal_error(line_number, line, "Line has too many *'s at the front. You cannot skip a level.") continue - new_tag_name = self._add_tag_line(parent_tags, line_number, line) - if not new_tag_name: - if new_tag_name != "": - self._add_fatal_error(line_number, line) + # Create the entry + tag_entry = self._add_tag_line(parent_tags, line_number, line) + + if not tag_entry: + # This will have already raised an error + continue + + try: + rooted_entry = schema_validation_util.find_rooted_entry(tag_entry, self._schema, self._loading_merged) + if rooted_entry: + parent_tags = rooted_entry.long_tag_name.split("/") + level_adj = len(parent_tags) + # Create the entry again for rooted tags, to get the full name. + tag_entry = self._add_tag_line(parent_tags, line_number, line) + except HedFileError as e: + self._add_fatal_error(line_number, line, e.message, e.code) continue - parent_tags.append(new_tag_name) + tag_entry = self._add_to_dict(line_number, line, tag_entry, HedSectionKey.AllTags) + + parent_tags.append(tag_entry.short_tag_name) def _read_unit_classes(self, lines): """Adds the unit classes section @@ -316,16 +338,19 @@ def _read_unit_classes(self, lines): level = self._get_tag_level(line) # This is a unit class if level == 1: - unit_class_entry = self._add_single_line(line_number, line, HedSectionKey.UnitClasses) + unit_class_entry = self._create_entry(line_number, line, HedSectionKey.UnitClasses) + unit_class_entry = self._add_to_dict(line_number, line, unit_class_entry, HedSectionKey.UnitClasses) # This is a unit class unit else: - unit_class_unit_entry = self._add_single_line(line_number, line, HedSectionKey.Units) + unit_class_unit_entry = self._create_entry(line_number, line, HedSectionKey.Units) + self._add_to_dict(line_number, line, unit_class_unit_entry, HedSectionKey.Units) unit_class_entry.add_unit(unit_class_unit_entry) def _read_section(self, lines, section_key): self._schema._initialize_attributes(section_key) for line_number, line in lines: - self._add_single_line(line_number, line, section_key) + new_entry = self._create_entry(line_number, line, section_key) + self._add_to_dict(line_number, line, new_entry, section_key) def _read_unit_modifiers(self, lines): """Adds the unit modifiers section @@ -403,6 +428,13 @@ def _get_header_attributes_old(self, version_line): return final_attributes + def _add_to_dict(self, line_number, line, entry, key_class): + if entry.has_attribute(HedKey.InLibrary) and not self._loading_merged: + self._add_fatal_error(line_number, line, + f"Library tag in unmerged schema has InLibrary attribute", + HedExceptions.IN_LIBRARY_IN_UNMERGED) + return self._schema._add_tag_to_dict(entry.name, entry, key_class) + @staticmethod def _get_tag_level(tag_line): """ Get the tag level from a line in a wiki file. @@ -555,11 +587,12 @@ def _add_tag_line(self, parent_tags, line_number, tag_line): long_tag_name = "/".join(parent_tags) + "/" + tag_name else: long_tag_name = tag_name - self._add_single_line(line_number, tag_line, HedSectionKey.AllTags, long_tag_name) + return self._create_entry(line_number, tag_line, HedSectionKey.AllTags, long_tag_name) - return tag_name + self._add_fatal_error(line_number, tag_line) + return None - def _add_single_line(self, line_number, tag_line, key_class, element_name=None): + def _create_entry(self, line_number, tag_line, key_class, element_name=None): node_name, index = self._get_tag_name(tag_line) if node_name is None: self._add_fatal_error(line_number, tag_line) @@ -577,29 +610,22 @@ def _add_single_line(self, line_number, tag_line, key_class, element_name=None): self._add_fatal_error(line_number, tag_line, "Description has mismatched delimiters") return - # todo: improve this check - if key_class == HedSectionKey.UnitClasses and not node_desc and not node_attributes and\ - node_name in self._schema.unit_classes and self._schema.library: - return self._schema.get_tag_entry(node_name, HedSectionKey.UnitClasses) + tag_entry = self._schema._create_tag_entry(node_name, key_class) - tag_entry = self._schema._add_tag_to_dict(node_name, key_class) if node_desc: tag_entry.description = node_desc.strip() for attribute_name, attribute_value in node_attributes.items(): tag_entry.set_attribute_value(attribute_name, attribute_value) - # No reason we can't add this here always - if self._schema.library and not self._schema.merged: - tag_entry.set_attribute_value(HedKey.InLibrary, self._schema.library) - return tag_entry - def _add_fatal_error(self, line_number, line, warning_message="Schema term is empty or the line is malformed"): + def _add_fatal_error(self, line_number, line, warning_message="Schema term is empty or the line is malformed", + error_code=HedExceptions.HED_WIKI_DELIMITERS_INVALID): self.fatal_errors.append( - {'error_code': HedExceptions.HED_WIKI_DELIMITERS_INVALID, + {'code': error_code, ErrorContext.ROW: line_number, ErrorContext.LINE: line, "message": f"ERROR: {warning_message}" } - ) \ No newline at end of file + ) diff --git a/hed/schema/schema_io/xml2schema.py b/hed/schema/schema_io/xml2schema.py index 5f541789c..b6311debe 100644 --- a/hed/schema/schema_io/xml2schema.py +++ b/hed/schema/schema_io/xml2schema.py @@ -5,8 +5,9 @@ from defusedxml import ElementTree import xml from hed.errors.exceptions import HedFileError, HedExceptions -from hed.schema.hed_schema_constants import HedSectionKey +from hed.schema.hed_schema_constants import HedSectionKey, HedKey from hed.schema import HedSchema +from hed.schema import schema_validation_util from hed.schema.schema_io import xml_constants @@ -19,14 +20,20 @@ def __init__(self, hed_xml_file_path, schema_as_string=None): self._schema = HedSchema() self._schema.filename = hed_xml_file_path self._schema.header_attributes = self._get_header_attributes() - + self._loading_merged = True if self._schema.with_standard and not self._schema.merged: from hed.schema.hed_schema_io import load_schema_version saved_attr = self._schema.header_attributes - base_version = load_schema_version(self._schema.with_standard) + try: + base_version = load_schema_version(self._schema.with_standard) + except HedFileError as e: + raise HedFileError(HedExceptions.BAD_WITH_STANDARD_VERSION, + message=f"Cannot load withStandard schema '{self._schema.with_standard}'", + filename=e.filename) self._schema = base_version self._schema.filename = hed_xml_file_path self._schema.header_attributes = saved_attr + self._loading_merged = False self._schema.prologue = self._get_prologue() self._schema.epilogue = self._get_epilogue() @@ -90,7 +97,8 @@ def _populate_section(self, key_class): def_element_name = xml_constants.ELEMENT_NAMES[key_class] attribute_elements = self._get_elements_by_name(def_element_name, section) for element in attribute_elements: - self._parse_node(element, key_class) + new_entry = self._parse_node(element, key_class) + self._add_to_dict(new_entry, key_class) def _populate_tag_dictionaries(self): """Populates a dictionary of dictionaries associated with tags and their attributes. @@ -106,9 +114,23 @@ def _populate_tag_dictionaries(self): """ self._schema._initialize_attributes(HedSectionKey.AllTags) tag_elements = self._get_elements_by_name("node") + loading_from_chain = "" + loading_from_chain_short = "" for tag_element in tag_elements: tag = self._get_tag_path_from_tag_element(tag_element) - self._parse_node(tag_element, HedSectionKey.AllTags, tag) + if loading_from_chain: + tag = tag.replace(loading_from_chain_short, loading_from_chain) + tag_entry = self._parse_node(tag_element, HedSectionKey.AllTags, tag) + + rooted_entry = schema_validation_util.find_rooted_entry(tag_entry, self._schema, self._loading_merged) + if rooted_entry: + loading_from_chain = rooted_entry.name + "/" + tag_entry.short_tag_name + loading_from_chain_short = tag_entry.short_tag_name + + tag = tag.replace(loading_from_chain_short, loading_from_chain) + tag_entry = self._parse_node(tag_element, HedSectionKey.AllTags, tag) + + self._add_to_dict(tag_entry, HedSectionKey.AllTags) def _populate_unit_class_dictionaries(self): """Populates a dictionary of dictionaries associated with all the unit classes, unit class units, and unit @@ -137,11 +159,13 @@ class default units. for unit_class_element in unit_class_elements: unit_class_entry = self._parse_node(unit_class_element, HedSectionKey.UnitClasses) + unit_class_entry = self._add_to_dict(unit_class_entry, HedSectionKey.UnitClasses) element_units = self._get_elements_by_name(xml_constants.UNIT_CLASS_UNIT_ELEMENT, unit_class_element) element_unit_names = [self._get_element_tag_value(element) for element in element_units] for unit, element in zip(element_unit_names, element_units): unit_class_unit_entry = self._parse_node(element, HedSectionKey.Units) + self._add_to_dict(unit_class_unit_entry, HedSectionKey.Units) unit_class_entry.add_unit(unit_class_unit_entry) def _reformat_xsd_attrib(self, attrib_dict): @@ -185,12 +209,9 @@ def _parse_node(self, node_element, key_class, element_name=None): else: node_name = self._get_element_tag_value(node_element) attribute_desc = self._get_element_tag_value(node_element, xml_constants.DESCRIPTION_ELEMENT) - # todo: improve this check - if key_class == HedSectionKey.UnitClasses and not attribute_desc and\ - node_name in self._schema.unit_classes and self._schema.library: - return self._schema.get_tag_entry(node_name, HedSectionKey.UnitClasses) - tag_entry = self._schema._add_tag_to_dict(node_name, key_class) + tag_entry = self._schema._create_tag_entry(node_name, key_class) + if attribute_desc: tag_entry.description = attribute_desc @@ -307,3 +328,10 @@ def _get_elements_by_name(self, element_name='node', parent_element=None): else: elements = parent_element.findall('.//%s' % element_name) return elements + + def _add_to_dict(self, entry, key_class): + if entry.has_attribute(HedKey.InLibrary) and not self._loading_merged: + raise HedFileError(HedExceptions.IN_LIBRARY_IN_UNMERGED, + f"Library tag in unmerged schema has InLibrary attribute", + self._schema.filename) + return self._schema._add_tag_to_dict(entry.name, entry, key_class) \ No newline at end of file diff --git a/hed/schema/schema_validation_util.py b/hed/schema/schema_validation_util.py index e187194bf..e6de68e3d 100644 --- a/hed/schema/schema_validation_util.py +++ b/hed/schema/schema_validation_util.py @@ -14,12 +14,11 @@ def validate_library_name(library_name): bool or str: If not False, string indicates the issue. """ - if library_name.isalpha(): - return False - for i, character in enumerate(library_name): if not character.isalpha(): return f"Non alpha character '{character}' at position {i} in '{library_name}'" + if character.isupper(): + return f"Non lowercase character '{character}' at position {i} in '{library_name}'" def validate_version_string(version_string): @@ -64,6 +63,13 @@ def is_hed3_version_number(version_string): } +def validate_present_attributes(attrib_dict, filename): + if constants.WITH_STANDARD_ATTRIBUTE in attrib_dict and constants.LIBRARY_ATTRIBUTE not in attrib_dict: + raise HedFileError(HedExceptions.BAD_WITH_STANDARD, + "withStandard header attribute found, but no library attribute is present", + filename) + + def validate_attributes(attrib_dict, filename): """ Validate attributes in the dictionary. @@ -78,6 +84,8 @@ def validate_attributes(attrib_dict, filename): HedFileError: if invalid or version not found in the dictionary. """ + validate_present_attributes(attrib_dict, filename) + for attribute_name, attribute_value in attrib_dict.items(): if attribute_name in attribute_validators: validator, error_code = attribute_validators[attribute_name] @@ -88,3 +96,50 @@ def validate_attributes(attrib_dict, filename): if constants.VERSION_ATTRIBUTE not in attrib_dict: raise HedFileError(HedExceptions.HED_SCHEMA_VERSION_INVALID, "No version attribute found in header", filename=filename) + + +# Might move this to a baseclass version if one is ever made for wiki2schema/xml2schema +def find_rooted_entry(tag_entry, schema, loading_merged): + """ This semi-validates rooted tags, raising an exception on major errors + + Parameters: + tag_entry(HedTagEntry): the possibly rooted tag + schema(HedSchema): The schema being loaded + loading_merged(bool): If this schema was already merged before loading + + Returns: + rooted_tag(HedTagEntry or None): The base tag entry from the standard schema + Returns None if this tag isn't rooted + + Raises: + HedValueError: Raises if the tag doesn't exist or similar + + """ + rooted_tag = tag_entry.has_attribute(constants.HedKey.Rooted, return_value=True) + if rooted_tag is not None: + if not schema.with_standard: + raise HedFileError(HedExceptions.ROOTED_TAG_INVALID, + f"Rooted tag attribute found on '{tag_entry.short_tag_name}' in a standard schema.", + schema.filename) + if loading_merged: + raise HedFileError(HedExceptions.ROOTED_TAG_INVALID, + f'Found rooted tag \'{tag_entry.short_tag_name}\' in schema without unmerged="True"', + schema.filename) + + if not isinstance(rooted_tag, str): + raise HedFileError(HedExceptions.ROOTED_TAG_INVALID, + f'Rooted tag \'{tag_entry.short_tag_name}\' is not a string."', + schema.filename) + + if tag_entry.parent_name: + raise HedFileError(HedExceptions.ROOTED_TAG_INVALID, + f'Found rooted tag \'{tag_entry.short_tag_name}\' as a non root node.', + schema.filename) + + rooted_entry = schema.all_tags.get(rooted_tag) + if not rooted_entry or rooted_entry.has_attribute(constants.HedKey.InLibrary): + raise HedFileError(HedExceptions.ROOTED_TAG_DOES_NOT_EXIST, + f"Rooted tag '{tag_entry.short_tag_name}' not found in paired standard schema", + schema.filename) + + return rooted_entry diff --git a/hed/tools/__init__.py b/hed/tools/__init__.py index fd1dfbbce..4cfe71c4c 100644 --- a/hed/tools/__init__.py +++ b/hed/tools/__init__.py @@ -19,7 +19,7 @@ from .remodeling.dispatcher import Dispatcher from .remodeling.backup_manager import BackupManager -from .remodeling.operations.base_context import BaseContext +from .remodeling.operations.base_summary import BaseSummary from .remodeling.operations.base_op import BaseOp from .remodeling.operations.factor_column_op import FactorColumnOp from .remodeling.operations.factor_hed_tags_op import FactorHedTagsOp @@ -40,7 +40,7 @@ from .util.hed_logger import HedLogger from .util.data_util import get_new_dataframe, get_value_dict, replace_values, reorder_columns -from .util.io_util import check_filename, generate_filename, extract_suffix_path, get_file_list, make_path +from .util.io_util import check_filename, clean_filename, extract_suffix_path, get_file_list, make_path from .util.io_util import get_dir_dictionary, get_file_list, get_path_components, parse_bids_filename from .analysis import annotation_util diff --git a/hed/tools/analysis/column_name_summary.py b/hed/tools/analysis/tabular_column_name_summary.py similarity index 95% rename from hed/tools/analysis/column_name_summary.py rename to hed/tools/analysis/tabular_column_name_summary.py index 5c7a710c9..cd42651ae 100644 --- a/hed/tools/analysis/column_name_summary.py +++ b/hed/tools/analysis/tabular_column_name_summary.py @@ -3,7 +3,7 @@ import json -class ColumnNameSummary: +class TabularColumnNameSummary: def __init__(self, name=''): self.name = name self.file_dict = {} diff --git a/hed/tools/analysis/tabular_summary.py b/hed/tools/analysis/tabular_summary.py index 85dc44cd5..d9fd79702 100644 --- a/hed/tools/analysis/tabular_summary.py +++ b/hed/tools/analysis/tabular_summary.py @@ -113,6 +113,7 @@ def update(self, data, name=None): Parameters: data (DataFrame, str, or list): DataFrame containing data to update. + name (str): Name of the summary """ diff --git a/hed/tools/remodeling/backup_manager.py b/hed/tools/remodeling/backup_manager.py index 608f4331b..d98b77c0d 100644 --- a/hed/tools/remodeling/backup_manager.py +++ b/hed/tools/remodeling/backup_manager.py @@ -10,16 +10,16 @@ class BackupManager: DEFAULT_BACKUP_NAME = 'default_back' - RELATIVE_BACKUP_LOCATION = 'derivatives/remodel/backups' + RELATIVE_BACKUP_LOCATION = 'derivatives/remodel' BACKUP_DICTIONARY = 'backup_lock.json' BACKUP_ROOT = 'backup_root' - def __init__(self, data_root): + def __init__(self, data_root, backups_root=None): """ Constructor for the backup manager. Parameters: - data_root (str): full path of the root of the data directory. - + data_root (str): Full path of the root of the data directory. + backups_root (str or None): Full path to the root where backups subdirectory is located. Raises: - HedFileError: - If the data_root does not correspond to a real directory. @@ -28,11 +28,15 @@ def __init__(self, data_root): if not os.path.isdir(data_root): raise HedFileError('NonExistentData', f"{data_root} is not an existing directory", "") self.data_root = data_root - self.backups_root = os.path.join(data_root, self.RELATIVE_BACKUP_LOCATION) - os.makedirs(self.backups_root, exist_ok=True) + if backups_root: + self.backups_path = os.path.join(backups_root, 'backups') + else: + self.backups_path = os.path.join(data_root, self.RELATIVE_BACKUP_LOCATION, 'backups') + self.backups_path = os.path.realpath(self.backups_path) + os.makedirs(self.backups_path, exist_ok=True) self.backups_dict = self._get_backups() - def create_backup(self, file_list, backup_name=None, verbose=True): + def create_backup(self, file_list, backup_name=None, verbose=False): """ Create a new backup from file_list. Parameters: @@ -46,7 +50,7 @@ def create_backup(self, file_list, backup_name=None, verbose=True): Raises: HedFileError - For missing or incorrect files. - + OS-related error - OS-related error when file copying occurs. @@ -59,7 +63,7 @@ def create_backup(self, file_list, backup_name=None, verbose=True): time_stamp = f"{str(datetime.now())}" if verbose: print(f"Creating backup {backup_name}") - backup_dir_path = os.path.realpath(os.path.join(self.backups_root, backup_name, BackupManager.BACKUP_ROOT)) + backup_dir_path = os.path.realpath(os.path.join(self.backups_path, backup_name, BackupManager.BACKUP_ROOT)) os.makedirs(backup_dir_path, exist_ok=True) for file in file_list: backup_file = self.get_backup_path(backup_name, file) @@ -69,7 +73,7 @@ def create_backup(self, file_list, backup_name=None, verbose=True): shutil.copy2(file, backup_file) backup[self.get_file_key(file)] = time_stamp self.backups_dict[backup_name] = backup - backup_dict_path = os.path.realpath(os.path.join(self.backups_root, backup_name, + backup_dict_path = os.path.realpath(os.path.join(self.backups_path, backup_name, self.BACKUP_DICTIONARY)) with open(backup_dict_path, 'w') as fp: json.dump(backup, fp, indent=4) @@ -83,11 +87,11 @@ def get_backup(self, backup_name): Returns: The dictionary with the backup info. - + Notes: - - The dictionary with backup information has keys that are the paths of - the backed up files relative to the backup root. The values in this - dictionary are the dates on which the particular file was backed up. + The dictionary with backup information has keys that are the paths of + the backed up files relative to the backup root. The values in this + dictionary are the dates on which the particular file was backed up. """ if backup_name not in self.backups_dict: @@ -114,7 +118,7 @@ def get_backup_files(self, backup_name, original_paths=False): raise HedFileError("NoBackup", f"{backup_name} is not a valid backup", "") if original_paths: return [os.path.realpath(os.path.join(self.data_root, backup_key)) for backup_key in backup_dict.keys()] - return [os.path.realpath(os.path.join(self.backups_root, backup_name, self.BACKUP_ROOT, backup_key)) + return [os.path.realpath(os.path.join(self.backups_path, backup_name, self.BACKUP_ROOT, backup_key)) for backup_key in backup_dict.keys()] def get_backup_path(self, backup_name, file_name): @@ -128,7 +132,7 @@ def get_backup_path(self, backup_name, file_name): str: Full path of the corresponding file in the backup. """ - return os.path.realpath(os.path.join(self.backups_root, backup_name, self.BACKUP_ROOT, + return os.path.realpath(os.path.join(self.backups_path, backup_name, self.BACKUP_ROOT, self.get_file_key(file_name))) def get_file_key(self, file_name): @@ -163,8 +167,8 @@ def _get_backups(self): HedFileError - if a backup is inconsistent for any reason. """ backups = {} - for backup in os.listdir(self.backups_root): - backup_root = os.path.realpath(os.path.join(self.backups_root, backup)) + for backup in os.listdir(self.backups_path): + backup_root = os.path.realpath(os.path.join(self.backups_path, backup)) if not os.path.isdir(backup_root): raise HedFileError('BadBackupPath', f"{backup_root} is not a backup directory.", "") if len(os.listdir(backup_root)) != 2: @@ -195,12 +199,12 @@ def _check_backup_consistency(self, backup_name): """ - backup_dict_path = os.path.realpath(os.path.join(self.backups_root, backup_name, self.BACKUP_DICTIONARY)) + backup_dict_path = os.path.realpath(os.path.join(self.backups_path, backup_name, self.BACKUP_DICTIONARY)) if not os.path.exists(backup_dict_path): raise HedFileError("BadBackupDictionaryPath", f"Backup dictionary path {backup_dict_path} for backup " f"{backup_name} does not exist so backup invalid", "") - backup_root_path = os.path.realpath(os.path.join(self.backups_root, backup_name, self.BACKUP_ROOT)) + backup_root_path = os.path.realpath(os.path.join(self.backups_path, backup_name, self.BACKUP_ROOT)) if not os.path.isdir(backup_root_path): raise HedFileError("BadBackupRootPath", f"Backup root path {backup_root_path} for {backup_name} " diff --git a/hed/tools/remodeling/cli/run_remodel.py b/hed/tools/remodeling/cli/run_remodel.py index 9e044bb8a..7cb7fc24a 100644 --- a/hed/tools/remodeling/cli/run_remodel.py +++ b/hed/tools/remodeling/cli/run_remodel.py @@ -11,11 +11,11 @@ def get_parser(): - """ Create a parser for the run_remodel command-line arguments. - + """ Create a parser for the run_remodel command-line arguments. + Returns: argparse.ArgumentParser: A parser for parsing the command line arguments. - + """ parser = argparse.ArgumentParser(description="Converts event files based on a json file specifying operations.") parser.add_argument("data_dir", help="Full path of dataset root directory.") @@ -33,31 +33,39 @@ def get_parser(): help="Optional path to JSON sidecar with HED information") parser.add_argument("-n", "--backup-name", default=BackupManager.DEFAULT_BACKUP_NAME, dest="backup_name", help="Name of the default backup for remodeling") + parser.add_argument("-nb", "--no-backup", action='store_true', dest="no_backup", + help="If present, the operations are run directly on the files with no backup.") + parser.add_argument("-ns", "--no-summaries", action='store_true', dest="no_summaries", + help="If present, the summaries are not saved, but rather discarded.") + parser.add_argument("-nu", "--no-update", action='store_true', dest="no_update", + help="If present, the files are not saved, but rather discarded.") parser.add_argument("-r", "--hed-versions", dest="hed_versions", nargs="*", default=[], help="Optional list of HED schema versions used for annotation, include prefixes.") parser.add_argument("-s", "--save-formats", nargs="*", default=['.json', '.txt'], dest="save_formats", - help="Format for saving any summaries, if any. If empty, then no summaries are saved.") + help="Format for saving any summaries, if any. If no summaries are to be written, use the -ns option.") parser.add_argument("-t", "--task-names", dest="task_names", nargs="*", default=[], help="The names of the task.") parser.add_argument("-v", "--verbose", action='store_true', help="If present, output informative messages as computation progresses.") + parser.add_argument("-w", "--work-dir", default="", dest="work_dir", + help="If given, is the path to directory for saving, otherwise derivatives/remodel is used.") parser.add_argument("-x", "--exclude-dirs", nargs="*", default=[], dest="exclude_dirs", help="Directories names to exclude from search for files.") return parser def parse_arguments(arg_list=None): - """ Parse the command line arguments or arg_list if given. - + """ Parse the command line arguments or arg_list if given. + Parameters: arg_list (list): List of command line arguments as a list. - + Returns: Object: Argument object List: A list of parsed operations (each operation is a dictionary). - + Raises: ValueError - If the operations were unable to be correctly parsed. - + """ parser = get_parser() args = parser.parse_args(arg_list) @@ -81,7 +89,7 @@ def parse_arguments(arg_list=None): def run_bids_ops(dispatch, args): """ Run the remodeler on a BIDS dataset. - + Parameters: dispatch (Dispatcher): Manages the execution of the operations. args (Object): The command-line arguments as an object. @@ -105,7 +113,8 @@ def run_bids_ops(dispatch, args): if args.verbose: print(f"Events {events_obj.file_path} sidecar {sidecar}") df = dispatch.run_operations(events_obj.file_path, sidecar=sidecar, verbose=args.verbose) - df.to_csv(events_obj.file_path, sep='\t', index=False, header=True) + if not args.no_update: + df.to_csv(events_obj.file_path, sep='\t', index=False, header=True) def run_direct_ops(dispatch, args): @@ -129,7 +138,8 @@ def run_direct_ops(dispatch, args): if args.task_names and not BackupManager.get_task(args.task_names, file_path): continue df = dispatch.run_operations(file_path, verbose=args.verbose, sidecar=sidecar) - df.to_csv(file_path, sep='\t', index=False, header=True) + if not args.no_update: + df.to_csv(file_path, sep='\t', index=False, header=True) def main(arg_list=None): @@ -148,19 +158,25 @@ def main(arg_list=None): args, operations = parse_arguments(arg_list) if not os.path.isdir(args.data_dir): raise HedFileError("DataDirectoryDoesNotExist", f"The root data directory {args.data_dir} does not exist", "") - if args.backup_name: + if args.no_backup: + backup_name = None + else: backup_man = BackupManager(args.data_dir) if not backup_man.get_backup(args.backup_name): raise HedFileError("BackupDoesNotExist", f"Backup {args.backup_name} does not exist. " f"Please run_remodel_backup first", "") backup_man.restore_backup(args.backup_name, args.task_names, verbose=args.verbose) - dispatch = Dispatcher(operations, data_root=args.data_dir, backup_name=args.backup_name, - hed_versions=args.hed_versions) + backup_name = args.backup_name + dispatch = Dispatcher(operations, data_root=args.data_dir, backup_name=backup_name, hed_versions=args.hed_versions) if args.use_bids: run_bids_ops(dispatch, args) else: run_direct_ops(dispatch, args) - dispatch.save_summaries(args.save_formats, individual_summaries=args.individual_summaries) + save_dir = None + if args.work_dir: + save_dir = os.path.realpath(os.path.join(args.work_dir, Dispatcher.REMODELING_SUMMARY_PATH)) + if not args.no_summaries: + dispatch.save_summaries(args.save_formats, individual_summaries=args.individual_summaries, summary_dir=save_dir) if __name__ == '__main__': diff --git a/hed/tools/remodeling/cli/run_remodel_backup.py b/hed/tools/remodeling/cli/run_remodel_backup.py index c0e3e681a..40664f138 100644 --- a/hed/tools/remodeling/cli/run_remodel_backup.py +++ b/hed/tools/remodeling/cli/run_remodel_backup.py @@ -21,13 +21,19 @@ def get_parser(): help="Filename suffix of files to be backed up. A * indicates all files allowed.") parser.add_argument("-n", "--backup_name", default=BackupManager.DEFAULT_BACKUP_NAME, dest="backup_name", help="Name of the default backup for remodeling") + parser.add_argument("-p", "--path-work", default="", dest="path_work", + help="The root path for remodeling work if given, " + + "otherwise [data_root]/derivatives/remodel is used.") parser.add_argument("-t", "--task-names", dest="task_names", nargs="*", default=[], help="The name of the task.") parser.add_argument("-v", "--verbose", action='store_true', help="If present, output informative messages as computation progresses.") + parser.add_argument("-w", "--work-dir", default="", dest="work_dir", + help="If given, is the path to directory for saving, " + + "otherwise [data_root]derivatives/remodel is used.") parser.add_argument("-x", "--exclude-dirs", nargs="*", default=['derivatives'], dest="exclude_dirs", help="Directories names to exclude from search for files. " + "If omitted, no directories except the backup directory will be excluded." + - "Note data_dir/remodel/backup will always be excluded.") + "Note [data_root]/derivatives/remodel will always be excluded.") return parser @@ -55,7 +61,11 @@ def main(arg_list=None): exclude_dirs=exclude_dirs) if args.task_names: file_list = get_filtered_by_element(file_list, args.task_names) - backup_man = BackupManager(args.data_dir) + if args.work_dir: + backups_root = args.work_dir + else: + backups_root = None + backup_man = BackupManager(args.data_dir, backups_root=backups_root) if backup_man.get_backup(args.backup_name): raise HedFileError("BackupExists", f"Backup {args.backup_name} already exists", "") else: diff --git a/hed/tools/remodeling/cli/run_remodel_restore.py b/hed/tools/remodeling/cli/run_remodel_restore.py index b6da5d9db..79b136805 100644 --- a/hed/tools/remodeling/cli/run_remodel_restore.py +++ b/hed/tools/remodeling/cli/run_remodel_restore.py @@ -16,9 +16,13 @@ def get_parser(): parser.add_argument("data_dir", help="Full path of dataset root directory.") parser.add_argument("-n", "--backup_name", default=BackupManager.DEFAULT_BACKUP_NAME, dest="backup_name", help="Name of the default backup for remodeling") + parser.add_argument("-t", "--task-names", dest="task_names", nargs="*", default=[], help="The names of the task.") parser.add_argument("-v", "--verbose", action='store_true', help="If present, output informative messages as computation progresses.") + parser.add_argument("-w", "--work_dir", default="", dest="work_dir", + help="The root path for remodeling work if given, " + + "otherwise [data_root]/derivatives/remodel is used.") return parser @@ -36,7 +40,11 @@ def main(arg_list=None): """ parser = get_parser() args = parser.parse_args(arg_list) - backup_man = BackupManager(args.data_dir) + if args.work_dir: + backups_root = args.work_dir + else: + backups_root = None + backup_man = BackupManager(args.data_dir, backups_root=backups_root) if not backup_man.get_backup(args.backup_name): raise HedFileError("BackupDoesNotExist", f"{args.backup_name}", "") backup_man.restore_backup(args.backup_name, task_names=args.task_names, verbose=args.verbose) diff --git a/hed/tools/remodeling/dispatcher.py b/hed/tools/remodeling/dispatcher.py index 5371bb2d1..8060fabb5 100644 --- a/hed/tools/remodeling/dispatcher.py +++ b/hed/tools/remodeling/dispatcher.py @@ -8,13 +8,13 @@ from hed.schema.hed_schema_io import get_schema from hed.tools.remodeling.backup_manager import BackupManager from hed.tools.remodeling.operations.valid_operations import valid_operations -from hed.tools.util.io_util import generate_filename, extract_suffix_path, get_timestamp +from hed.tools.util.io_util import clean_filename, extract_suffix_path, get_timestamp class Dispatcher: """ Controller for applying operations to tabular files and saving the results. """ - REMODELING_SUMMARY_PATH = 'derivatives/remodel/summaries' + REMODELING_SUMMARY_PATH = 'remodel/summaries' def __init__(self, operation_list, data_root=None, backup_name=BackupManager.DEFAULT_BACKUP_NAME, hed_versions=None): @@ -47,7 +47,7 @@ def __init__(self, operation_list, data_root=None, raise ValueError("InvalidOperationList", f"{these_errors}") self.parsed_ops = op_list self.hed_schema = get_schema(hed_versions) - self.context_dict = {} + self.summary_dicts = {} def get_summaries(self, file_formats=['.txt', '.json']): """ Return the summaries in a dictionary of strings suitable for saving or archiving. @@ -62,11 +62,11 @@ def get_summaries(self, file_formats=['.txt', '.json']): summary_list = [] time_stamp = '_' + get_timestamp() - for context_name, context_item in self.context_dict.items(): - file_base = context_item.context_filename + for context_name, context_item in self.summary_dicts.items(): + file_base = context_item.op.summary_filename if self.data_root: file_base = extract_suffix_path(self.data_root, file_base) - file_base = generate_filename(file_base) + file_base = clean_filename(file_base) for file_format in file_formats: if file_format == '.txt': summary = context_item.get_text_summary(individual_summaries="consolidated") @@ -128,7 +128,7 @@ def get_summary_save_dir(self): """ if self.data_root: - return os.path.realpath(os.path.join(self.data_root, Dispatcher.REMODELING_SUMMARY_PATH)) + return os.path.realpath(os.path.join(self.data_root, 'derivatives', Dispatcher.REMODELING_SUMMARY_PATH)) raise HedFileError("NoDataRoot", f"Dispatcher must have a data root to produce directories", "") def run_operations(self, file_path, sidecar=None, verbose=False): @@ -160,9 +160,10 @@ def save_summaries(self, save_formats=['.json', '.txt'], individual_summaries="s Parameters: save_formats (list): A list of formats [".txt", ."json"] individual_summaries (str): If True, include summaries of individual files. - summary_dir (str or None): Directory for saving summaries + summary_dir (str or None): Directory for saving summaries. - The summaries are saved in the dataset derivatives/remodeling folder if no save_dir is provided. + Notes: + The summaries are saved in the dataset derivatives/remodeling folder if no save_dir is provided. """ if not save_formats: @@ -170,7 +171,7 @@ def save_summaries(self, save_formats=['.json', '.txt'], individual_summaries="s if not summary_dir: summary_dir = self.get_summary_save_dir() os.makedirs(summary_dir, exist_ok=True) - for context_name, context_item in self.context_dict.items(): + for context_name, context_item in self.summary_dicts.items(): context_item.save(summary_dir, save_formats, individual_summaries=individual_summaries) @staticmethod diff --git a/hed/tools/remodeling/operations/base_context.py b/hed/tools/remodeling/operations/base_summary.py similarity index 76% rename from hed/tools/remodeling/operations/base_context.py rename to hed/tools/remodeling/operations/base_summary.py index 1815ebd0d..aedb0429d 100644 --- a/hed/tools/remodeling/operations/base_context.py +++ b/hed/tools/remodeling/operations/base_summary.py @@ -1,4 +1,4 @@ -""" Abstract base class for the context of summary operations. """ +""" Abstract base class for the contents of summary operations. """ import os from abc import ABC, abstractmethod @@ -6,23 +6,19 @@ from hed.tools.util.io_util import get_timestamp -class BaseContext(ABC): - """ Abstract base class for summary contexts. Should not be instantiated. +class BaseSummary(ABC): + """ Abstract base class for summary contents. Should not be instantiated. Parameters: - context_type (str) Type of summary. - context_name (str) Printable name -- should be unique. - context_filename (str) Base filename for saving the context. + sum_op (BaseOp): Operation corresponding to this summary. """ DISPLAY_INDENT = " " INDIVIDUAL_SUMMARIES_PATH = 'individual_summaries' - def __init__(self, context_type, context_name, context_filename): - self.context_type = context_type - self.context_name = context_name - self.context_filename = context_filename + def __init__(self, sum_op): + self.op = sum_op self.summary_dict = {} def get_summary_details(self, include_individual=True): @@ -39,19 +35,19 @@ def get_summary_details(self, include_individual=True): - The 'Individual files' value is dictionary whose keys are file names and values are their corresponding summaries. - Users are expected to provide _merge_all and _get_details_dict to support this. + Users are expected to provide merge_all_info and get_details_dict to support this. """ - merged_summary = self._merge_all() + merged_summary = self.merge_all_info() if merged_summary: - details = self._get_details_dict(merged_summary) + details = self.get_details_dict(merged_summary) else: details = "Overall summary unavailable" summary_details = {"Dataset": details, "Individual files": {}} if include_individual: for name, count in self.summary_dict.items(): - summary_details["Individual files"][name] = self._get_details_dict(count) + summary_details["Individual files"][name] = self.get_details_dict(count) return summary_details def get_summary(self, individual_summaries="separate"): @@ -62,17 +58,17 @@ def get_summary(self, individual_summaries="separate"): 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. - + """ include_individual = individual_summaries == "separate" or individual_summaries == "consolidated" summary_details = self.get_summary_details(include_individual=include_individual) - dataset_summary = {"Context name": self.context_name, "Context type": self.context_type, - "Context filename": self.context_filename, "Overall summary": summary_details['Dataset']} + dataset_summary = {"Summary name": self.op.summary_name, "Summary type": self.op.SUMMARY_TYPE, + "Summary filename": self.op.summary_filename, "Overall summary": summary_details['Dataset']} summary = {"Dataset": dataset_summary, "Individual files": {}} if summary_details["Individual files"]: summary["Individual files"] = self.get_individual(summary_details["Individual files"], @@ -83,8 +79,8 @@ def get_individual(self, summary_details, separately=True): individual_dict = {} for name, name_summary in summary_details.items(): if separately: - individual_dict[name] = {"Context name": self.context_name, "Context type": self.context_type, - "Context filename": self.context_filename, "File summary": name_summary} + individual_dict[name] = {"Summary name": self.op.summary_name, "summary type": self.op.SUMMARY_TYPE, + "Summary filename": self.op.summary_filename, "File summary": name_summary} else: individual_dict[name] = name_summary return individual_dict @@ -101,14 +97,16 @@ def get_text_summary_details(self, include_individual=True): def get_text_summary(self, individual_summaries="separate"): include_individual = individual_summaries == "separate" or individual_summaries == "consolidated" summary_details = self.get_text_summary_details(include_individual=include_individual) - summary = {"Dataset": f"Context name: {self.context_name}\n" + f"Context type: {self.context_type}\n" + - f"Context filename: {self.context_filename}\n\n" + f"Overall summary:\n{summary_details['Dataset']}"} + summary = {"Dataset": f"Summary name: {self.op.summary_name}\n" + + f"Summary type: {self.op.SUMMARY_TYPE}\n" + + f"Summary filename: {self.op.summary_filename}\n\n" + + f"Overall summary:\n{summary_details['Dataset']}"} if individual_summaries == "separate": summary["Individual files"] = {} for name, name_summary in summary_details["Individual files"].items(): - summary["Individual files"][name] = f"Context name: {self.context_name}\n" + \ - f"Context type: {self.context_type}\n" + \ - f"Context filename: {self.context_filename}\n\n" + \ + summary["Individual files"][name] = f"Summary name: {self.op.summary_name}\n" + \ + f"Summary type: {self.op.SUMMARY_TYPE}\n" + \ + f"Summary filename: {self.op.summary_filename}\n\n" + \ f"Summary for {name}:\n{name_summary}" elif include_individual: ind_list = [] @@ -132,17 +130,17 @@ def save(self, save_dir, file_formats=['.txt'], individual_summaries="separate") def _save_summary_files(self, save_dir, file_format, summary, individual_summaries): """ Save the files in the appropriate format. - + Parameters: save_dir (str): Path to the directory in which the summaries will be saved. file_format (str): string representing the extension (including .), '.txt' or '.json'. summary (dictionary): Dictionary of summaries (has "Dataset" and "Individual files" keys. - + """ time_stamp = '_' + get_timestamp() - this_save = os.path.join(save_dir, self.context_name + '/') + this_save = os.path.join(save_dir, self.op.summary_name + '/') os.makedirs(os.path.realpath(this_save), exist_ok=True) - filename = os.path.realpath(os.path.join(this_save, self.context_filename + time_stamp + file_format)) + filename = os.path.realpath(os.path.join(this_save, self.op.summary_filename + time_stamp + file_format)) individual = summary.get("Individual files", {}) if individual_summaries == "none" or not individual: self.dump_summary(filename, summary["Dataset"]) @@ -159,7 +157,7 @@ def _save_summary_files(self, save_dir, file_format, summary, individual_summari def _get_summary_filepath(self, individual_dir, name, time_stamp, file_format): """ Return the filepath for the summary including the timestamp - + Parameters: individual_dir (str): path of the directory in which the summary should be stored. name (str): Path of the original file from which the summary was extracted. @@ -175,7 +173,7 @@ def _get_summary_filepath(self, individual_dir, name, time_stamp, file_format): match = True filename = None while match: - filename = f"{self.context_filename}_{this_name}_{count}{time_stamp}{file_format}" + filename = f"{self.op.summary_filename}_{this_name}_{count}{time_stamp}{file_format}" filename = os.path.realpath(os.path.join(individual_dir, filename)) if not os.path.isfile(filename): break @@ -207,7 +205,7 @@ def dump_summary(filename, summary): text_file.write(summary) @abstractmethod - def _get_details_dict(self, summary_info): + def get_details_dict(self, summary_info): """ Return the summary-specific information. Parameters: @@ -217,30 +215,30 @@ def _get_details_dict(self, summary_info): dict: dictionary with the results. Notes: - Abstract method be implemented by each individual context summary. + Abstract method be implemented by each individual summary. """ raise NotImplementedError @abstractmethod - def _merge_all(self): + def merge_all_info(self): """ Return merged information. Returns: object: Consolidated summary of information. Notes: - Abstract method be implemented by each individual context summary. + Abstract method be implemented by each individual summary. """ raise NotImplementedError @abstractmethod - def update_context(self, context_dict): + def update_summary(self, summary_dict): """ Method to update summary for a given tabular input. Parameters: - context_dict (dict) A context specific dictionary with the update information. + summary_dict (dict) A summary specific dictionary with the update information. """ raise NotImplementedError diff --git a/hed/tools/remodeling/operations/summarize_column_names_op.py b/hed/tools/remodeling/operations/summarize_column_names_op.py index be2699066..d454bcc16 100644 --- a/hed/tools/remodeling/operations/summarize_column_names_op.py +++ b/hed/tools/remodeling/operations/summarize_column_names_op.py @@ -1,8 +1,8 @@ """ Summarize the column names in a collection of tabular files. """ -from hed.tools.analysis.column_name_summary import ColumnNameSummary +from hed.tools.analysis.tabular_column_name_summary import TabularColumnNameSummary from hed.tools.remodeling.operations.base_op import BaseOp -from hed.tools.remodeling.operations.base_context import BaseContext +from hed.tools.remodeling.operations.base_summary import BaseSummary class SummarizeColumnNamesOp(BaseOp): @@ -60,44 +60,44 @@ def do_op(self, dispatcher, df, name, sidecar=None): DataFrame: A new DataFrame with the factor columns appended. Side-effect: - Updates the context. + Updates the relevant summary. """ - summary = dispatcher.context_dict.get(self.summary_name, None) + summary = dispatcher.summary_dicts.get(self.summary_name, None) if not summary: - summary = ColumnNameSummaryContext(self) - dispatcher.context_dict[self.summary_name] = summary - summary.update_context({"name": name, "column_names": list(df.columns)}) + summary = ColumnNameSummary(self) + dispatcher.summary_dicts[self.summary_name] = summary + summary.update_summary({"name": name, "column_names": list(df.columns)}) return df -class ColumnNameSummaryContext(BaseContext): +class ColumnNameSummary(BaseSummary): def __init__(self, sum_op): - super().__init__(sum_op.SUMMARY_TYPE, sum_op.summary_name, sum_op.summary_filename) + super().__init__(sum_op) - def update_context(self, new_context): + def update_summary(self, new_info): """ Update the summary for a given tabular input file. Parameters: - new_context (dict): A dictionary with the parameters needed to update a summary. + new_info (dict): A dictionary with the parameters needed to update a summary. Notes: - - The summary information is kept in separate ColumnNameSummary objects for each file. + - The summary information is kept in separate TabularColumnNameSummary objects for each file. - The summary needs a "name" str and a "column_names" list. - - The summary uses ColumnNameSummary as the summary object. + - The summary uses TabularColumnNameSummary as the summary object. """ - name = new_context['name'] + name = new_info['name'] if name not in self.summary_dict: - self.summary_dict[name] = ColumnNameSummary(name=name) - self.summary_dict[name].update(name, new_context["column_names"]) + self.summary_dict[name] = TabularColumnNameSummary(name=name) + self.summary_dict[name].update(name, new_info["column_names"]) - def _get_details_dict(self, column_summary): + def get_details_dict(self, column_summary): """ Return the summary dictionary extracted from a ColumnNameSummary. Parameters: - column_summary (ColumnNameSummary): A column name summary for the data file. + column_summary (TabularColumnNameSummary): A column name summary for the data file. Returns: dict - a dictionary with the summary information for column names. @@ -105,20 +105,20 @@ def _get_details_dict(self, column_summary): """ return column_summary.get_summary() - def _merge_all(self): - """ Create a ColumnNameSummary containing the overall dataset summary. + def merge_all_info(self): + """ Create a TabularColumnNameSummary containing the overall dataset summary. Returns: - ColumnNameSummary - the overall summary object for column names. + TabularColumnNameSummary - the overall summary object for column names. """ - all_sum = ColumnNameSummary(name='Dataset') + all_sum = TabularColumnNameSummary(name='Dataset') for key, counts in self.summary_dict.items(): for name, pos in counts.file_dict.items(): all_sum.update(name, counts.unique_headers[pos]) return all_sum - def _get_result_string(self, name, result, indent=BaseContext.DISPLAY_INDENT): + def _get_result_string(self, name, result, indent=BaseSummary.DISPLAY_INDENT): """ Return a formatted string with the summary for the indicated name. Parameters: @@ -139,7 +139,7 @@ def _get_result_string(self, name, result, indent=BaseContext.DISPLAY_INDENT): return f"{indent}{str(columns['Column names'])}" @staticmethod - def _get_dataset_string(result, indent=BaseContext.DISPLAY_INDENT): + def _get_dataset_string(result, indent=BaseSummary.DISPLAY_INDENT): """ Return a string with the overall summary for all of the tabular files. Parameters: diff --git a/hed/tools/remodeling/operations/summarize_column_values_op.py b/hed/tools/remodeling/operations/summarize_column_values_op.py index 000346565..a01dfc856 100644 --- a/hed/tools/remodeling/operations/summarize_column_values_op.py +++ b/hed/tools/remodeling/operations/summarize_column_values_op.py @@ -2,7 +2,7 @@ from hed.tools import TabularSummary from hed.tools.remodeling.operations.base_op import BaseOp -from hed.tools.remodeling.operations.base_context import BaseContext +from hed.tools.remodeling.operations.base_summary import BaseSummary class SummarizeColumnValuesOp(BaseOp): @@ -14,6 +14,9 @@ class SummarizeColumnValuesOp(BaseOp): - **skip_columns** (*list*): Names of columns to skip in the summary. - **value_columns** (*list*): Names of columns to treat as value columns rather than categorical columns. + Optional remodeling parameters: + - **max_categorical** (*int*): Maximum number of unique values to include in summary for a categorical column. + The purpose is to produce a summary of the values in a tabular file. """ @@ -27,10 +30,14 @@ class SummarizeColumnValuesOp(BaseOp): "value_columns": list }, "optional_parameters": { + "values_per_line": int, + "max_categorical": int } } SUMMARY_TYPE = 'column_values' + VALUES_PER_LINE = 5 + MAX_CATEGORICAL = 50 def __init__(self, parameters): """ Constructor for the summarize column values operation. @@ -54,6 +61,8 @@ def __init__(self, parameters): self.summary_filename = parameters['summary_filename'] self.skip_columns = parameters['skip_columns'] self.value_columns = parameters['value_columns'] + self.max_categorical = parameters.get('max_categorical', float('inf')) + self.values_per_line = parameters.get('values_per_line', self.VALUES_PER_LINE) def do_op(self, dispatcher, df, name, sidecar=None): """ Create factor columns corresponding to values in a specified column. @@ -68,43 +77,41 @@ def do_op(self, dispatcher, df, name, sidecar=None): DataFrame: A new DataFrame with the factor columns appended. Side-effect: - Updates the context. + Updates the relevant summary. """ - summary = dispatcher.context_dict.get(self.summary_name, None) + summary = dispatcher.summary_dicts.get(self.summary_name, None) if not summary: - summary = ColumnValueSummaryContext(self) - dispatcher.context_dict[self.summary_name] = summary - summary.update_context({'df': dispatcher.post_proc_data(df), 'name': name}) + summary = ColumnValueSummary(self) + dispatcher.summary_dicts[self.summary_name] = summary + summary.update_summary({'df': dispatcher.post_proc_data(df), 'name': name}) return df -class ColumnValueSummaryContext(BaseContext): +class ColumnValueSummary(BaseSummary): def __init__(self, sum_op): - super().__init__(sum_op.SUMMARY_TYPE, sum_op.summary_name, sum_op.summary_filename) - self.value_columns = sum_op.value_columns - self.skip_columns = sum_op.skip_columns + super().__init__(sum_op) - def update_context(self, new_context): + def update_summary(self, new_info): """ Update the summary for a given tabular input file. Parameters: - new_context (dict): A dictionary with the parameters needed to update a summary. + new_info (dict): A dictionary with the parameters needed to update a summary. Notes: - The summary information is kept in separate TabularSummary objects for each file. - The summary needs a "name" str and a "df" . """ - name = new_context['name'] + name = new_info['name'] if name not in self.summary_dict: self.summary_dict[name] = \ - TabularSummary(value_cols=self.value_columns, skip_cols=self.skip_columns, name=name) - self.summary_dict[name].update(new_context['df']) + TabularSummary(value_cols=self.op.value_columns, skip_cols=self.op.skip_columns, name=name) + self.summary_dict[name].update(new_info['df']) - def _get_details_dict(self, summary): + def get_details_dict(self, summary): """ Return a dictionary with the summary contained in a TabularSummary Parameters: @@ -114,21 +121,27 @@ def _get_details_dict(self, summary): dict: Dictionary with the information suitable for extracting printout. """ - return summary.get_summary(as_json=False) - - def _merge_all(self): + this_summary = summary.get_summary(as_json=False) + unique_counts = [(key, len(count_dict)) for key, count_dict in this_summary['Categorical columns'].items()] + this_summary['Categorical counts'] = dict(unique_counts) + for key, dict_entry in this_summary['Categorical columns'].items(): + num_disp, sorted_tuples = ColumnValueSummary.sort_dict(self, dict_entry, reverse=True) + this_summary['Categorical columns'][key] = dict(sorted_tuples[:min(num_disp, self.op.max_categorical)]) + return this_summary + + def merge_all_info(self): """ Create a TabularSummary containing the overall dataset summary. Returns: TabularSummary - the summary object for column values. """ - all_sum = TabularSummary(value_cols=self.value_columns, skip_cols=self.skip_columns, name='Dataset') + all_sum = TabularSummary(value_cols=self.op.value_columns, skip_cols=self.op.skip_columns, name='Dataset') for key, counts in self.summary_dict.items(): all_sum.update_summary(counts) return all_sum - def _get_result_string(self, name, result, indent=BaseContext.DISPLAY_INDENT): + def _get_result_string(self, name, result, indent=BaseSummary.DISPLAY_INDENT): """ Return a formatted string with the summary for the indicated name. Parameters: @@ -149,8 +162,29 @@ def _get_result_string(self, name, result, indent=BaseContext.DISPLAY_INDENT): return self._get_dataset_string(result, indent=indent) return self._get_individual_string(result, indent=indent) - @staticmethod - def _get_dataset_string(result, indent=BaseContext.DISPLAY_INDENT): + def _get_categorical_string(self, result, offset="", indent=" "): + """ Return a string with the summary for a particular categorical dictionary. + + Parameters: + cat_dict (dict): Dictionary of summary information for a particular tabular file. + offset (str): String of blanks used as offset for every item + indent (str): String of blanks used as the additional amount to indent an item's for readability. + + Returns: + str: Formatted string suitable for saving in a file or printing. + + """ + cat_dict = result.get('Categorical columns', {}) + if not cat_dict: + return "" + count_dict = result['Categorical counts'] + sum_list = [f"{offset}{indent}Categorical column values[Events, Files]:"] + sorted_tuples = sorted(cat_dict.items(), key=lambda x: x[0]) + for entry in sorted_tuples: + sum_list = sum_list + self._get_categorical_col(entry, count_dict, offset="", indent=" ") + return "\n".join(sum_list) + + def _get_dataset_string(self, result, indent=BaseSummary.DISPLAY_INDENT): """ Return a string with the overall summary for all of the tabular files. Parameters: @@ -163,16 +197,16 @@ def _get_dataset_string(result, indent=BaseContext.DISPLAY_INDENT): """ sum_list = [f"Dataset: Total events={result.get('Total events', 0)} " f"Total files={result.get('Total files', 0)}"] - cat_cols = result.get("Categorical columns", {}) - if cat_cols: - sum_list.append(ColumnValueSummaryContext._get_categorical_string(cat_cols, offset="", indent=indent)) + cat_string = self._get_categorical_string(result, offset="", indent=indent) + if cat_string: + sum_list.append(cat_string) val_cols = result.get("Value columns", {}) if val_cols: - sum_list.append(ColumnValueSummaryContext._get_value_string(val_cols, offset="", indent=indent)) + sum_list.append(ColumnValueSummary._get_value_string(val_cols, offset="", indent=indent)) return "\n".join(sum_list) - @staticmethod - def _get_individual_string(result, indent=BaseContext.DISPLAY_INDENT): + def _get_individual_string(self, result, indent=BaseSummary.DISPLAY_INDENT): + """ Return a string with the summary for an individual tabular file. Parameters: @@ -186,22 +220,50 @@ def _get_individual_string(result, indent=BaseContext.DISPLAY_INDENT): sum_list = [f"Total events={result.get('Total events', 0)}"] cat_cols = result.get("Categorical columns", {}) if cat_cols: - sum_list.append(ColumnValueSummaryContext._get_categorical_string(cat_cols, offset=indent, indent=indent)) + sum_list.append(self._get_categorical_string(cat_cols, offset=indent, indent=indent)) val_cols = result.get("Value columns", {}) if val_cols: - sum_list.append(ColumnValueSummaryContext._get_value_string(val_cols, offset=indent, indent=indent)) + sum_list.append(ColumnValueSummary._get_value_string(val_cols, offset=indent, indent=indent)) return "\n".join(sum_list) + def _get_categorical_col(self, entry, count_dict, offset="", indent=" "): + """ Return a string with the summary for a particular categorical column. + + Parameters: + dict_entry(tuple): (Name of the column, summary dict for that column) + offset(str): String of blanks used as offset for all items + indent (str): String of blanks used as the additional amount to indent for this item's readability. + + Returns: + list: Formatted strings, each corresponding to a line in the output. + """ + num_unique = count_dict[entry[0]] + num_disp = min(self.op.max_categorical, num_unique) + col_list = [f"{offset}{indent * 2}{entry[0]}: {num_unique} unique values " + f"(displaying top {num_disp} values)"] + # Create and partition the list of individual entries + value_list = [f"{item[0]}{str(item[1])}" for item in entry[1].items()] + value_list = value_list[:num_disp] + part_list = ColumnValueSummary.partition_list(value_list, self.op.values_per_line) + return col_list + [f"{offset}{indent * 3}{ColumnValueSummary.get_list_str(item)}" for item in part_list] + @staticmethod - def _get_categorical_string(cat_dict, offset="", indent=" "): - sum_list = [f"{offset}{indent}Categorical column values[Events, Files]:"] - for col_name, col_dict in cat_dict.items(): - sum_list.append(f"{offset}{indent*2}{col_name}:") - col_list = [] - for col_value, val_counts in col_dict.items(): - col_list.append(f"{col_value}{str(val_counts)}") - sum_list.append(f"{offset}{indent*3}{' '.join(col_list)}") - return "\n".join(sum_list) + def get_list_str(lst): + return f"{' '.join(str(item) for item in lst)}" + + @staticmethod + def partition_list(lst, n): + """ Partition a list into lists of n items. + + Parameters: + lst (list): List to be partitioned + n (int): Number of items in each sublist + + Returns: + list: list of lists of n elements, the last might have fewer. + + """ + return [lst[i:i + n] for i in range(0, len(lst), n)] @staticmethod def _get_value_string(val_dict, offset="", indent=""): @@ -209,3 +271,8 @@ def _get_value_string(val_dict, offset="", indent=""): for col_name, val_counts in val_dict.items(): sum_list.append(f"{offset}{indent*2}{col_name}{str(val_counts)}") return "\n".join(sum_list) + + @staticmethod + def sort_dict(self, count_dict, reverse=False): + sorted_tuples = sorted(count_dict.items(), key=lambda x: x[1][0], reverse=reverse) + return len(sorted_tuples), sorted_tuples diff --git a/hed/tools/remodeling/operations/summarize_definitions_op.py b/hed/tools/remodeling/operations/summarize_definitions_op.py index 45fda3d82..73c7d5957 100644 --- a/hed/tools/remodeling/operations/summarize_definitions_op.py +++ b/hed/tools/remodeling/operations/summarize_definitions_op.py @@ -1,10 +1,9 @@ """ Summarize the values in the columns of a tabular file. """ -from hed import DefinitionDict, TabularInput, Sidecar -from hed.models.df_util import process_def_expands -from hed.tools.analysis.analysis_util import assemble_hed +from hed import TabularInput from hed.tools.remodeling.operations.base_op import BaseOp -from hed.tools.remodeling.operations.base_context import BaseContext +from hed.tools.remodeling.operations.base_summary import BaseSummary +from hed.models.def_expand_gather import DefExpandGatherer class SummarizeDefinitionsOp(BaseOp): @@ -64,60 +63,84 @@ def do_op(self, dispatcher, df, name, sidecar=None): DataFrame: A new DataFrame with the factor columns appended. Side-effect: - Updates the context. + Updates the relevant summary. """ - - summary = dispatcher.context_dict.get(self.summary_name, None) - if not summary: - summary = DefinitionSummaryContext(self) - dispatcher.context_dict[self.summary_name] = summary - summary.update_context({'df': dispatcher.post_proc_data(df), 'name': name, 'sidecar': sidecar, + summary = dispatcher.summary_dicts.setdefault(self.summary_name, + DefinitionSummary(self, dispatcher.hed_schema)) + summary.update_summary({'df': dispatcher.post_proc_data(df), 'name': name, 'sidecar': sidecar, 'schema': dispatcher.hed_schema}) return df -class DefinitionSummaryContext(BaseContext): - - def __init__(self, sum_op): - super().__init__(sum_op.SUMMARY_TYPE, sum_op.summary_name, sum_op.summary_filename) - self.defs = DefinitionDict() - self.unresolved = {} - self.errors = {} +class DefinitionSummary(BaseSummary): + def __init__(self, sum_op, hed_schema, known_defs=None): + super().__init__(sum_op) + self.def_gatherer = DefExpandGatherer(hed_schema, known_defs=known_defs) - def update_context(self, new_context): + def update_summary(self, new_info): """ Update the summary for a given tabular input file. Parameters: - new_context (dict): A dictionary with the parameters needed to update a summary. + new_info (dict): A dictionary with the parameters needed to update a summary. Notes: - The summary needs a "name" str, a "schema" and a "Sidecar". """ - data_input = TabularInput(new_context['df'], sidecar=new_context['sidecar'], name=new_context['name']) - sidecar = Sidecar(new_context['sidecar']) - df, _ = assemble_hed(data_input, sidecar, new_context['schema'], - columns_included=None, expand_defs=True) - hed_strings = df['HED_assembled'] - self.defs, self.unresolved, errors = process_def_expands(hed_strings, new_context['schema'], - known_defs=self.defs, ambiguous_defs=self.unresolved) - self.errors.update(errors) - - def _get_details_dict(self, summary): - return None - - def _merge_all(self): + data_input = TabularInput(new_info['df'], sidecar=new_info['sidecar'], name=new_info['name']) + series, def_dict = data_input.series_a, data_input.get_def_dict(new_info['schema']) + self.def_gatherer.process_def_expands(series, def_dict) + + def get_details_dict(self, def_gatherer): + """ Return the summary-specific information in a dictionary. + + Parameters: + summary (?): Contains the resolved dictionaries. + + Returns: + dict: dictionary with the summary results. + + """ + def build_summary_dict(items_dict, title, process_func, display_description=False): + summary_dict = {} + items = {} + for key, value in items_dict.items(): + if process_func: + value = process_func(value) + if "#" in str(value): + key = key + "/#" + if display_description: + description, value = DefinitionSummary.remove_description(value) + items[key] = {"description": description, "contents": str(value)} + else: + if isinstance(value, list): + items[key] = [str(x) for x in value] + else: + items[key] = str(value) + summary_dict[title] = items + return summary_dict + + known_defs_summary = build_summary_dict(def_gatherer.def_dict, "Known Definitions", None, + display_description=True) + ambiguous_defs_summary = build_summary_dict(def_gatherer.ambiguous_defs, "Ambiguous Definitions", + def_gatherer.get_ambiguous_group) + errors_summary = build_summary_dict(def_gatherer.errors, "Errors", None) + + known_defs_summary.update(ambiguous_defs_summary) + known_defs_summary.update(errors_summary) + return known_defs_summary + + def merge_all_info(self): """ Create an Object containing the definition summary. Returns: Object - the overall summary object for definitions. """ + return self.def_gatherer - return None - - def _get_result_string(self, name, result, indent=BaseContext.DISPLAY_INDENT): + def _get_result_string(self, name, result, indent=BaseSummary.DISPLAY_INDENT): """ Return a formatted string with the summary for the indicated name. Parameters: @@ -138,21 +161,36 @@ def _get_result_string(self, name, result, indent=BaseContext.DISPLAY_INDENT): return self._get_individual_string(result, indent=indent) @staticmethod - def _get_dataset_string(result, indent=BaseContext.DISPLAY_INDENT): - """ Return a string with the overall summary for all of the tabular files. - - Parameters: - result (dict): Dictionary of merged summary information. - indent (str): String of blanks used as the amount to indent for readability. - - Returns: - str: Formatted string suitable for saving in a file or printing. - - """ - return "" + def _get_dataset_string(summary_dict, indent=BaseSummary.DISPLAY_INDENT): + def nested_dict_to_string(data, level=1): + result = [] + for key, value in data.items(): + if isinstance(value, dict): + result.append(f"{indent * level}{key}: {len(value)} items") + result.append(nested_dict_to_string(value, level + 1)) + elif isinstance(value, list): + result.append(f"{indent * level}{key}:") + for item in value: + result.append(f"{indent * (level + 1)}{item}") + else: + result.append(f"{indent * level}{key}: {value}") + return "\n".join(result) + + return nested_dict_to_string(summary_dict) + + def remove_description(def_entry): + def_group = def_entry.contents.copy() + description = "" + desc_tag = def_group.find_tags({"description"}, include_groups=False) + if desc_tag: + def_group.remove(desc_tag) + desc_tag = desc_tag[0] + description = desc_tag.extension + + return description, def_group @staticmethod - def _get_individual_string(result, indent=BaseContext.DISPLAY_INDENT): + def _get_individual_string(result, indent=BaseSummary.DISPLAY_INDENT): """ Return a string with the summary for an individual tabular file. Parameters: diff --git a/hed/tools/remodeling/operations/summarize_hed_tags_op.py b/hed/tools/remodeling/operations/summarize_hed_tags_op.py index 89e494338..f44c70f21 100644 --- a/hed/tools/remodeling/operations/summarize_hed_tags_op.py +++ b/hed/tools/remodeling/operations/summarize_hed_tags_op.py @@ -4,7 +4,7 @@ from hed.models.sidecar import Sidecar from hed.tools.analysis.hed_tag_counts import HedTagCounts from hed.tools.remodeling.operations.base_op import BaseOp -from hed.tools.remodeling.operations.base_context import BaseContext +from hed.tools.remodeling.operations.base_summary import BaseSummary from hed.models.df_util import get_assembled @@ -77,46 +77,55 @@ def do_op(self, dispatcher, df, name, sidecar=None): Updates the context. """ - summary = dispatcher.context_dict.get(self.summary_name, None) + summary = dispatcher.summary_dicts.get(self.summary_name, None) if not summary: - summary = HedTagSummaryContext(self) - dispatcher.context_dict[self.summary_name] = summary - summary.update_context({'df': dispatcher.post_proc_data(df), 'name': name, + summary = HedTagSummary(self) + dispatcher.summary_dicts[self.summary_name] = summary + summary.update_summary({'df': dispatcher.post_proc_data(df), 'name': name, 'schema': dispatcher.hed_schema, 'sidecar': sidecar}) return df -class HedTagSummaryContext(BaseContext): +class HedTagSummary(BaseSummary): def __init__(self, sum_op): - super().__init__(sum_op.SUMMARY_TYPE, sum_op.summary_name, sum_op.summary_filename) + super().__init__(sum_op) self.tags = sum_op.tags self.expand_context = sum_op.expand_context - def update_context(self, new_context): + def update_summary(self, new_info): """ Update the summary for a given tabular input file. Parameters: - new_context (dict): A dictionary with the parameters needed to update a summary. + 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". """ - counts = HedTagCounts(new_context['name'], total_events=len(new_context['df'])) - sidecar = new_context['sidecar'] + counts = HedTagCounts(new_info['name'], total_events=len(new_info['df'])) + sidecar = new_info['sidecar'] if sidecar and not isinstance(sidecar, Sidecar): sidecar = Sidecar(sidecar) - input_data = TabularInput(new_context['df'], sidecar=sidecar, name=new_context['name']) - hed_strings, definitions = get_assembled(input_data, sidecar, new_context['schema'], + input_data = TabularInput(new_info['df'], sidecar=sidecar, name=new_info['name']) + hed_strings, definitions = get_assembled(input_data, sidecar, new_info['schema'], extra_def_dicts=None, join_columns=True, shrink_defs=False, expand_defs=True) # definitions = input_data.get_definitions().gathered_defs for hed in hed_strings: - counts.update_event_counts(hed, new_context['name']) - self.summary_dict[new_context["name"]] = counts + counts.update_event_counts(hed, new_info['name']) + self.summary_dict[new_info["name"]] = counts - def _get_details_dict(self, merge_counts): + def get_details_dict(self, merge_counts): + """ Return the summary-specific information in a dictionary. + + Parameters: + merge_counts (HedTagCounts): Contains the counts of tags in the dataset. + + Returns: + dict: dictionary with the summary results. + + """ template, unmatched = merge_counts.organize_tags(self.tags) details = {} for key, key_list in self.tags.items(): @@ -126,7 +135,7 @@ def _get_details_dict(self, merge_counts): "files": [name for name in merge_counts.files.keys()], "Main tags": details, "Other tags": leftovers} - def _get_result_string(self, name, result, indent=BaseContext.DISPLAY_INDENT): + def _get_result_string(self, name, result, indent=BaseSummary.DISPLAY_INDENT): """ Return a formatted string with the summary for the indicated name. Parameters: @@ -146,7 +155,7 @@ def _get_result_string(self, name, result, indent=BaseContext.DISPLAY_INDENT): return self._get_dataset_string(result, indent=indent) return self._get_individual_string(result, indent=indent) - def _merge_all(self): + def merge_all_info(self): """ Create a HedTagCounts containing the overall dataset HED tag summary. Returns: @@ -163,7 +172,7 @@ def _merge_all(self): return all_counts @staticmethod - def _get_dataset_string(result, indent=BaseContext.DISPLAY_INDENT): + def _get_dataset_string(result, indent=BaseSummary.DISPLAY_INDENT): """ Return a string with the overall summary for all of the tabular files. Parameters: @@ -176,11 +185,11 @@ def _get_dataset_string(result, indent=BaseContext.DISPLAY_INDENT): """ sum_list = [f"Dataset: Total events={result.get('total_events', 0)} " f"Total files={len(result.get('files', []))}"] - sum_list = sum_list + HedTagSummaryContext._get_tag_list(result, indent=indent) + sum_list = sum_list + HedTagSummary._get_tag_list(result, indent=indent) return "\n".join(sum_list) @staticmethod - def _get_individual_string(result, indent=BaseContext.DISPLAY_INDENT): + def _get_individual_string(result, indent=BaseSummary.DISPLAY_INDENT): """ Return a string with the summary for an individual tabular file. Parameters: @@ -192,7 +201,7 @@ def _get_individual_string(result, indent=BaseContext.DISPLAY_INDENT): """ sum_list = [f"Total events={result.get('total_events', 0)}"] - sum_list = sum_list + HedTagSummaryContext._get_tag_list(result, indent=indent) + sum_list = sum_list + HedTagSummary._get_tag_list(result, indent=indent) return "\n".join(sum_list) @staticmethod @@ -203,15 +212,15 @@ def _tag_details(tags): return tag_list @staticmethod - def _get_tag_list(tag_info, indent=BaseContext.DISPLAY_INDENT): + def _get_tag_list(tag_info, indent=BaseSummary.DISPLAY_INDENT): sum_list = [f"\n{indent}Main tags[events,files]:"] for category, tags in tag_info['Main tags'].items(): sum_list.append(f"{indent}{indent}{category}:") if tags: - sum_list.append(f"{indent}{indent}{indent}{' '.join(HedTagSummaryContext._tag_details(tags))}") + sum_list.append(f"{indent}{indent}{indent}{' '.join(HedTagSummary._tag_details(tags))}") if tag_info['Other tags']: sum_list.append(f"{indent}Other tags[events,files]:") - sum_list.append(f"{indent}{indent}{' '.join(HedTagSummaryContext._tag_details(tag_info['Other tags']))}") + sum_list.append(f"{indent}{indent}{' '.join(HedTagSummary._tag_details(tag_info['Other tags']))}") return sum_list @staticmethod diff --git a/hed/tools/remodeling/operations/summarize_hed_type_op.py b/hed/tools/remodeling/operations/summarize_hed_type_op.py index 7b3993357..4cbb96675 100644 --- a/hed/tools/remodeling/operations/summarize_hed_type_op.py +++ b/hed/tools/remodeling/operations/summarize_hed_type_op.py @@ -7,7 +7,7 @@ from hed.tools.analysis.hed_type_counts import HedTypeCounts from hed.tools.analysis.hed_context_manager import HedContextManager from hed.tools.remodeling.operations.base_op import BaseOp -from hed.tools.remodeling.operations.base_context import BaseContext +from hed.tools.remodeling.operations.base_summary import BaseSummary class SummarizeHedTypeOp(BaseOp): @@ -69,53 +69,62 @@ def do_op(self, dispatcher, df, name, sidecar=None): DataFrame: Input DataFrame, unchanged. Side-effect: - Updates the context. + Updates the relevant summary. """ - summary = dispatcher.context_dict.get(self.summary_name, None) + summary = dispatcher.summary_dicts.get(self.summary_name, None) if not summary: - summary = HedTypeSummaryContext(self) - dispatcher.context_dict[self.summary_name] = summary - summary.update_context({'df': dispatcher.post_proc_data(df), 'name': name, + summary = HedTypeSummary(self) + dispatcher.summary_dicts[self.summary_name] = summary + summary.update_summary({'df': dispatcher.post_proc_data(df), 'name': name, 'schema': dispatcher.hed_schema, 'sidecar': sidecar}) return df -class HedTypeSummaryContext(BaseContext): +class HedTypeSummary(BaseSummary): def __init__(self, sum_op): - super().__init__(sum_op.SUMMARY_TYPE, sum_op.summary_name, sum_op.summary_filename) + super().__init__(sum_op) self.type_tag = sum_op.type_tag - def update_context(self, new_context): + def update_summary(self, new_info): """ Update the summary for a given tabular input file. Parameters: - new_context (dict): A dictionary with the parameters needed to update a summary. + 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". """ - sidecar = new_context['sidecar'] + sidecar = new_info['sidecar'] if sidecar and not isinstance(sidecar, Sidecar): sidecar = Sidecar(sidecar) - input_data = TabularInput(new_context['df'], sidecar=sidecar, name=new_context['name']) - hed_strings, definitions = get_assembled(input_data, sidecar, new_context['schema'], + input_data = TabularInput(new_info['df'], sidecar=sidecar, name=new_info['name']) + hed_strings, definitions = get_assembled(input_data, sidecar, new_info['schema'], extra_def_dicts=None, join_columns=True, expand_defs=False) - context_manager = HedContextManager(hed_strings, new_context['schema']) - type_values = HedTypeValues(context_manager, definitions, new_context['name'], type_tag=self.type_tag) + context_manager = HedContextManager(hed_strings, new_info['schema']) + type_values = HedTypeValues(context_manager, definitions, new_info['name'], type_tag=self.type_tag) - counts = HedTypeCounts(new_context['name'], self.type_tag) - counts.update_summary(type_values.get_summary(), type_values.total_events, new_context['name']) + counts = HedTypeCounts(new_info['name'], self.type_tag) + counts.update_summary(type_values.get_summary(), type_values.total_events, new_info['name']) counts.add_descriptions(type_values.definitions) - self.summary_dict[new_context["name"]] = counts + self.summary_dict[new_info["name"]] = counts - def _get_details_dict(self, counts): + def get_details_dict(self, counts): + """ Return the summary-specific information in a dictionary. + + Parameters: + counts (HedTypeCounts): Contains the counts of the events in which the type occurs. + + Returns: + dict: dictionary with the summary results. + + """ return counts.get_summary() - def _merge_all(self): + def merge_all_info(self): """ Create a HedTypeCounts containing the overall dataset HED type summary. Returns: @@ -127,7 +136,7 @@ def _merge_all(self): all_counts.update(counts) return all_counts - def _get_result_string(self, name, result, indent=BaseContext.DISPLAY_INDENT): + def _get_result_string(self, name, result, indent=BaseSummary.DISPLAY_INDENT): """ Return a formatted string with the summary for the indicated name. Parameters: @@ -148,7 +157,7 @@ def _get_result_string(self, name, result, indent=BaseContext.DISPLAY_INDENT): return self._get_individual_string(result, indent=indent) @staticmethod - def _get_dataset_string(result, indent=BaseContext.DISPLAY_INDENT): + def _get_dataset_string(result, indent=BaseSummary.DISPLAY_INDENT): """ Return a string with the overall summary for all of the tabular files. Parameters: @@ -174,11 +183,11 @@ def _get_dataset_string(result, indent=BaseContext.DISPLAY_INDENT): str1 = str1 + f" Multiple references:{item['events_with_multiple_refs']})" sum_list.append(f"{indent}{key}: {str1}") if item['level_counts']: - sum_list = sum_list + HedTypeSummaryContext._level_details(item['level_counts'], indent=indent) + sum_list = sum_list + HedTypeSummary._level_details(item['level_counts'], indent=indent) return "\n".join(sum_list) @staticmethod - def _get_individual_string(result, indent=BaseContext.DISPLAY_INDENT): + def _get_individual_string(result, indent=BaseSummary.DISPLAY_INDENT): """ Return a string with the summary for an individual tabular file. Parameters: @@ -203,8 +212,8 @@ def _get_individual_string(result, indent=BaseContext.DISPLAY_INDENT): if str1: sum_list.append(f"{indent*3}{str1}") if item['level_counts']: - sum_list = sum_list + HedTypeSummaryContext._level_details(item['level_counts'], - offset=indent, indent=indent) + sum_list = sum_list + HedTypeSummary._level_details(item['level_counts'], + offset=indent, indent=indent) return "\n".join(sum_list) @staticmethod diff --git a/hed/tools/remodeling/operations/summarize_hed_validation_op.py b/hed/tools/remodeling/operations/summarize_hed_validation_op.py index 8120371ad..f395e837e 100644 --- a/hed/tools/remodeling/operations/summarize_hed_validation_op.py +++ b/hed/tools/remodeling/operations/summarize_hed_validation_op.py @@ -5,8 +5,7 @@ from hed.models.sidecar import Sidecar from hed.models.tabular_input import TabularInput from hed.tools.remodeling.operations.base_op import BaseOp -from hed.tools.remodeling.operations.base_context import BaseContext -from hed.validator import HedValidator +from hed.tools.remodeling.operations.base_summary import BaseSummary class SummarizeHedValidationOp(BaseOp): @@ -67,25 +66,25 @@ def do_op(self, dispatcher, df, name, sidecar=None): DataFrame: Input DataFrame, unchanged. Side-effect: - Updates the context. + Updates the relevant summary. """ - summary = dispatcher.context_dict.get(self.summary_name, None) + summary = dispatcher.summary_dicts.get(self.summary_name, None) if not summary: - summary = HedValidationSummaryContext(self) - dispatcher.context_dict[self.summary_name] = summary - summary.update_context({'df': dispatcher.post_proc_data(df), 'name': name, + summary = HedValidationSummary(self) + dispatcher.summary_dicts[self.summary_name] = summary + summary.update_summary({'df': dispatcher.post_proc_data(df), 'name': name, 'schema': dispatcher.hed_schema, 'sidecar': sidecar}) return df -class HedValidationSummaryContext(BaseContext): +class HedValidationSummary(BaseSummary): def __init__(self, sum_op): - super().__init__(sum_op.SUMMARY_TYPE, sum_op.summary_name, sum_op.summary_filename) + super().__init__(sum_op) self.check_for_warnings = sum_op.check_for_warnings - def _get_result_string(self, name, result, indent=BaseContext.DISPLAY_INDENT): + def _get_result_string(self, name, result, indent=BaseSummary.DISPLAY_INDENT): """ Return a formatted string with the summary for the indicated name. Parameters: @@ -115,11 +114,11 @@ def _get_result_string(self, name, result, indent=BaseContext.DISPLAY_INDENT): sum_list = sum_list + [f"{indent*2}Event file validation was incomplete because of sidecar errors"] return "\n".join(sum_list) - def update_context(self, new_context): + def update_summary(self, new_info): """ Update the summary for a given tabular input file. Parameters: - new_context (dict): A dictionary with the parameters needed to update a summary. + 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". @@ -127,15 +126,15 @@ def update_context(self, new_context): results = self.get_empty_results() results["total_event_files"] = 1 - results["event_issues"][new_context["name"]] = [] - self.summary_dict[new_context["name"]] = results - sidecar = new_context.get('sidecar', None) + results["event_issues"][new_info["name"]] = [] + self.summary_dict[new_info["name"]] = results + sidecar = new_info.get('sidecar', None) filtered_issues = [] if sidecar: if not isinstance(sidecar, Sidecar): - sidecar = Sidecar(files=new_context['sidecar'], name=os.path.basename(sidecar)) + sidecar = Sidecar(files=new_info['sidecar'], name=os.path.basename(sidecar)) results["sidecar_issues"][sidecar.name] = [] - sidecar_issues = sidecar.validate(new_context['schema']) + sidecar_issues = sidecar.validate(new_info['schema']) filtered_issues = ErrorHandler.filter_issues_by_severity(sidecar_issues, ErrorSeverity.ERROR) if not self.check_for_warnings: sidecar_issues = filtered_issues @@ -144,14 +143,14 @@ def update_context(self, new_context): results['total_sidecar_files'] = 1 if not filtered_issues: results['validation_completed'] = True - input_data = TabularInput(new_context['df'], sidecar=sidecar) - issues = input_data.validate(new_context['schema']) + input_data = TabularInput(new_info['df'], sidecar=sidecar) + issues = input_data.validate(new_info['schema']) if not self.check_for_warnings: issues = ErrorHandler.filter_issues_by_severity(issues, ErrorSeverity.ERROR) - results['event_issues'][new_context["name"]] = issues + results['event_issues'][new_info["name"]] = issues results['total_event_issues'] = len(issues) - def _get_details_dict(self, summary_info): + def get_details_dict(self, summary_info): """Return the summary details from the summary_info. Parameters: @@ -163,7 +162,7 @@ def _get_details_dict(self, summary_info): """ return summary_info - def _merge_all(self): + def merge_all_info(self): """ Create a dictionary containing all of the errors in the dataset. Returns: @@ -195,7 +194,7 @@ def get_empty_results(): "validation_completed": False} @staticmethod - def get_error_list(error_dict, count_only=False, indent=BaseContext.DISPLAY_INDENT): + def get_error_list(error_dict, count_only=False, indent=BaseSummary.DISPLAY_INDENT): error_list = [] for key, item in error_dict.items(): if count_only and isinstance(item, list): @@ -207,7 +206,7 @@ def get_error_list(error_dict, count_only=False, indent=BaseContext.DISPLAY_INDE else: error_list.append(f"{indent}{key} issues:") for this_item in item: - error_list.append(f"{indent*2}{HedValidationSummaryContext.format_error(this_item)}") + error_list.append(f"{indent*2}{HedValidationSummary.format_error(this_item)}") return error_list @staticmethod @@ -218,11 +217,11 @@ def format_errors(error_list): def format_error(error): error_str = error['code'] error_locations = [] - HedValidationSummaryContext.update_error_location(error_locations, "row", "ec_row", error) - HedValidationSummaryContext.update_error_location(error_locations, "column", "ec_column", error) - HedValidationSummaryContext.update_error_location(error_locations, "sidecar column", + HedValidationSummary.update_error_location(error_locations, "row", "ec_row", error) + HedValidationSummary.update_error_location(error_locations, "column", "ec_column", error) + HedValidationSummary.update_error_location(error_locations, "sidecar column", "ec_sidecarColumnName", error) - HedValidationSummaryContext.update_error_location(error_locations, "sidecar key", "ec_sidecarKeyName", error) + HedValidationSummary.update_error_location(error_locations, "sidecar key", "ec_sidecarKeyName", error) location_str = ",".join(error_locations) if location_str: error_str = error_str + f"[{location_str}]" diff --git a/hed/tools/remodeling/operations/summarize_sidecar_from_events_op.py b/hed/tools/remodeling/operations/summarize_sidecar_from_events_op.py index 0a403ac4b..dc68bb065 100644 --- a/hed/tools/remodeling/operations/summarize_sidecar_from_events_op.py +++ b/hed/tools/remodeling/operations/summarize_sidecar_from_events_op.py @@ -3,7 +3,7 @@ import json from hed.tools import TabularSummary from hed.tools.remodeling.operations.base_op import BaseOp -from hed.tools.remodeling.operations.base_context import BaseContext +from hed.tools.remodeling.operations.base_summary import BaseSummary class SummarizeSidecarFromEventsOp(BaseOp): @@ -68,40 +68,40 @@ def do_op(self, dispatcher, df, name, sidecar=None): DataFrame: A new DataFrame with the factor columns appended. Side-effect: - Updates the context. + Updates the associated summary if applicable. """ - summary = dispatcher.context_dict.get(self.summary_name, None) + summary = dispatcher.summary_dicts.get(self.summary_name, None) if not summary: - summary = EventsToSidecarSummaryContext(self) - dispatcher.context_dict[self.summary_name] = summary - summary.update_context({'df': dispatcher.post_proc_data(df), 'name': name}) + summary = EventsToSidecarSummary(self) + dispatcher.summary_dicts[self.summary_name] = summary + summary.update_summary({'df': dispatcher.post_proc_data(df), 'name': name}) return df -class EventsToSidecarSummaryContext(BaseContext): +class EventsToSidecarSummary(BaseSummary): def __init__(self, sum_op): - super().__init__(sum_op.SUMMARY_TYPE, sum_op.summary_name, sum_op.summary_filename) + super().__init__(sum_op) self.value_cols = sum_op.value_columns self.skip_cols = sum_op.skip_columns - def update_context(self, new_context): + def update_summary(self, new_info): """ Update the summary for a given tabular input file. Parameters: - new_context (dict): A dictionary with the parameters needed to update a summary. + new_info (dict): A dictionary with the parameters needed to update a summary. Notes: - The summary needs a "name" str and a "df". """ - tab_sum = TabularSummary(value_cols=self.value_cols, skip_cols=self.skip_cols, name=new_context["name"]) - tab_sum.update(new_context['df'], new_context['name']) - self.summary_dict[new_context["name"]] = tab_sum + tab_sum = TabularSummary(value_cols=self.value_cols, skip_cols=self.skip_cols, name=new_info["name"]) + tab_sum.update(new_info['df'], new_info['name']) + self.summary_dict[new_info["name"]] = tab_sum - def _get_details_dict(self, summary_info): + def get_details_dict(self, summary_info): """ Return the summary-specific information. Parameters: @@ -116,7 +116,7 @@ def _get_details_dict(self, summary_info): "total_events": summary_info.total_events, "skip_cols": summary_info.skip_cols, "sidecar": summary_info.extract_sidecar_template()} - def _merge_all(self): + def merge_all_info(self): """ Merge summary information from all of the files Returns: @@ -129,7 +129,7 @@ def _merge_all(self): all_sum.update_summary(tab_sum) return all_sum - def _get_result_string(self, name, result, indent=BaseContext.DISPLAY_INDENT): + def _get_result_string(self, name, result, indent=BaseSummary.DISPLAY_INDENT): """ Return a formatted string with the summary for the indicated name. Parameters: @@ -151,7 +151,7 @@ def _get_result_string(self, name, result, indent=BaseContext.DISPLAY_INDENT): return self._get_individual_string(result, indent=indent) @staticmethod - def _get_dataset_string(result, indent=BaseContext.DISPLAY_INDENT): + def _get_dataset_string(result, indent=BaseSummary.DISPLAY_INDENT): """ Return a string with the overall summary for all of the tabular files. Parameters: @@ -170,7 +170,7 @@ def _get_dataset_string(result, indent=BaseContext.DISPLAY_INDENT): return "\n".join(sum_list) @staticmethod - def _get_individual_string(result, indent=BaseContext.DISPLAY_INDENT): + def _get_individual_string(result, indent=BaseSummary.DISPLAY_INDENT): """ Return a string with the summary for an individual tabular file. Parameters: diff --git a/hed/tools/util/io_util.py b/hed/tools/util/io_util.py index 83bd68075..97489ce26 100644 --- a/hed/tools/util/io_util.py +++ b/hed/tools/util/io_util.py @@ -1,8 +1,8 @@ """Utilities for generating and handling file names.""" import os +import re from datetime import datetime -from werkzeug.utils import secure_filename from hed.errors.exceptions import HedFileError TIME_FORMAT = '%Y_%m_%d_T_%H_%M_%S_%f' @@ -92,39 +92,19 @@ def extract_suffix_path(path, prefix_path): return return_path -def generate_filename(base_name, name_prefix=None, name_suffix=None, extension=None, append_datetime=False): - """ Generate a filename for the attachment. +def clean_filename(filename): + """ Replaces invalid characters with under-bars Parameters: - base_name (str): Name of the base, usually the name of the file that the issues were generated from. - name_prefix (str): Prefix prepended to the front of the base name. - name_suffix (str): Suffix appended to the end of the base name. - extension (str): Extension to use. - append_datetime (bool): If True, append the current date-time to the base output filename. + filename (str): source filename Returns: - str: Name of the attachment other containing the issues. - - Notes: - - The form prefix_basename_suffix + extension. - + str: The filename with anything but alphanumeric, period, hyphens, and under-bars removed. """ - - pieces = [] - if name_prefix: - pieces = pieces + [name_prefix] - if base_name: - pieces.append(os.path.splitext(base_name)[0]) - if name_suffix: - pieces = pieces + [name_suffix] - filename = "".join(pieces) - if append_datetime: - now = datetime.now() - filename = filename + '_' + now.strftime(TIME_FORMAT)[:-3] - if filename and extension: - filename = filename + extension - - return secure_filename(filename) + if not filename: + return "" + out_name = re.sub(r'[^a-zA-Z0-9._-]+', '_', filename) + return out_name def get_dir_dictionary(dir_path, name_prefix=None, name_suffix=None, extensions=None, skip_empty=True, diff --git a/hed/validator/def_validator.py b/hed/validator/def_validator.py index 2a362af18..c8b0c23ad 100644 --- a/hed/validator/def_validator.py +++ b/hed/validator/def_validator.py @@ -9,7 +9,6 @@ class DefValidator(DefinitionDict): """ Handles validating Def/ and Def-expand/. """ - def __init__(self, def_dicts=None, hed_schema=None): """ Initialize for definitions in hed strings. @@ -75,17 +74,17 @@ def _validate_def_contents(self, def_tag, def_expand_group, tag_validator): tag=def_tag, actual_def=def_contents, found_def=def_expand_group) if def_entry.takes_value and tag_validator: - placeholder_tag = def_contents.find_placeholder_tag() + placeholder_tag = def_contents.get_first_group().find_placeholder_tag() error_code = ValidationErrors.DEF_INVALID if is_def_expand_tag: error_code = ValidationErrors.DEF_EXPAND_INVALID if placeholder_tag.is_unit_class_tag(): def_issues += tag_validator.check_tag_unit_class_units_are_valid(placeholder_tag, - report_tag_as=def_tag, + report_as=def_tag, error_code=error_code) elif placeholder_tag.is_value_class_tag(): def_issues += tag_validator.check_tag_value_class_valid(placeholder_tag, - report_tag_as=def_tag, + report_as=def_tag, error_code=error_code) elif def_entry.takes_value: diff --git a/hed/validator/hed_validator.py b/hed/validator/hed_validator.py index ac9746fc4..ae2d791d9 100644 --- a/hed/validator/hed_validator.py +++ b/hed/validator/hed_validator.py @@ -5,7 +5,7 @@ """ -from hed.errors.error_types import ValidationErrors +from hed.errors.error_types import ValidationErrors, DefinitionErrors from hed.errors.error_reporter import ErrorHandler, check_for_any_errors from hed.models.hed_string import HedString @@ -18,11 +18,14 @@ class HedValidator: """ Top level validation of HED strings. """ - def __init__(self, hed_schema=None, def_dicts=None, run_full_onset_checks=True): + def __init__(self, hed_schema=None, def_dicts=None, run_full_onset_checks=True, definitions_allowed=False): """ Constructor for the HedValidator class. Parameters: hed_schema (HedSchema or HedSchemaGroup): HedSchema object to use for validation. + def_dicts(DefinitionDict or list or dict): the def dicts to use for validation + run_full_onset_checks(bool): If True, check for matching onset/offset tags + definitions_allowed(bool): If False, flag definitions found as errors """ super().__init__() self._tag_validator = None @@ -32,6 +35,7 @@ def __init__(self, hed_schema=None, def_dicts=None, run_full_onset_checks=True): self._def_validator = DefValidator(def_dicts, hed_schema) self._onset_validator = OnsetValidator(def_dict=self._def_validator, run_full_onset_checks=run_full_onset_checks) + self._definitions_allowed = definitions_allowed def validate(self, hed_string, allow_placeholders, error_handler=None): """ @@ -57,7 +61,7 @@ def validate(self, hed_string, allow_placeholders, error_handler=None): def run_basic_checks(self, hed_string, allow_placeholders): issues = [] - issues += self._tag_validator.run_hed_string_validators(hed_string) + issues += self._tag_validator.run_hed_string_validators(hed_string, allow_placeholders) if check_for_any_errors(issues): return issues if hed_string == "n/a" or not self._hed_schema: @@ -69,24 +73,14 @@ def run_basic_checks(self, hed_string, allow_placeholders): # e.g. checking units when a definition placeholder has units self._def_validator.construct_def_tags(hed_string) issues += self._validate_individual_tags_in_hed_string(hed_string, allow_placeholders=allow_placeholders) - # todo: maybe restore this. Issue is bad def-expand values are caught above, - # so the actual def-expand tag won't be checked if we bail early. - # if check_for_any_errors(issues): - # return issues issues += self._def_validator.validate_def_tags(hed_string, self._tag_validator) - if check_for_any_errors(issues): - return issues - issues += self._onset_validator.validate_onset_offset(hed_string) - if check_for_any_errors(issues): - return issues return issues def run_full_string_checks(self, hed_string): issues = [] issues += self._validate_tags_in_hed_string(hed_string) - if check_for_any_errors(issues): - return issues issues += self._validate_groups_in_hed_string(hed_string) + issues += self._onset_validator.validate_onset_offset(hed_string) return issues def _validate_groups_in_hed_string(self, hed_string_obj): @@ -167,11 +161,15 @@ def _validate_individual_tags_in_hed_string(self, hed_string_obj, allow_placehol """ from hed.models.definition_dict import DefTagNames validation_issues = [] - definition_groups = hed_string_obj.find_top_level_tags(anchor_tags={DefTagNames.DEFINITION_KEY}, include_groups=1) + definition_groups = hed_string_obj.find_top_level_tags(anchor_tags={DefTagNames.DEFINITION_KEY}, + include_groups=1) all_definition_groups = [group for sub_group in definition_groups for group in sub_group.get_all_groups()] for group in hed_string_obj.get_all_groups(): is_definition = group in all_definition_groups for hed_tag in group.tags(): + if not self._definitions_allowed and hed_tag.short_base_tag == DefTagNames.DEFINITION_ORG_KEY: + validation_issues += ErrorHandler.format_error(DefinitionErrors.BAD_DEFINITION_LOCATION, hed_tag) + # todo: unclear if this should be restored at some point # if hed_tag.expandable and not hed_tag.expanded: # for tag in hed_tag.expandable.get_all_tags(): # validation_issues += self._tag_validator. \ diff --git a/hed/validator/onset_validator.py b/hed/validator/onset_validator.py index af5db6bec..8cac74422 100644 --- a/hed/validator/onset_validator.py +++ b/hed/validator/onset_validator.py @@ -44,7 +44,7 @@ def validate_onset_offset(self, hed_string_obj): children = [child for child in found_group.children if def_group is not child and found_onset is not child] max_children = 1 - if found_onset.short_base_tag.lower() == DefTagNames.OFFSET_KEY: + if found_onset.short_base_tag == DefTagNames.OFFSET_ORG_KEY: max_children = 0 if len(children) > max_children: onset_issues += ErrorHandler.format_error(OnsetErrors.ONSET_WRONG_NUMBER_GROUPS, @@ -66,10 +66,10 @@ def validate_onset_offset(self, hed_string_obj): return onset_issues def _find_onset_tags(self, hed_string_obj): - return hed_string_obj.find_top_level_tags(anchor_tags={DefTagNames.ONSET_KEY, DefTagNames.OFFSET_KEY}) + return hed_string_obj.find_top_level_tags(anchor_tags=DefTagNames.TEMPORAL_KEYS) def _handle_onset_or_offset(self, def_tag, onset_offset_tag): - is_onset = onset_offset_tag.short_base_tag.lower() == DefTagNames.ONSET_KEY + is_onset = onset_offset_tag.short_base_tag == DefTagNames.ONSET_ORG_KEY full_def_name = def_name = def_tag.extension placeholder = None found_slash = def_name.find("/") @@ -89,9 +89,13 @@ def _handle_onset_or_offset(self, def_tag, onset_offset_tag): # onset can never fail as it implies an offset self._onsets[full_def_name.lower()] = full_def_name else: + is_offset = onset_offset_tag.short_base_tag == DefTagNames.OFFSET_ORG_KEY if full_def_name.lower() not in self._onsets: - return ErrorHandler.format_error(OnsetErrors.OFFSET_BEFORE_ONSET, tag=def_tag) - else: + if is_offset: + return ErrorHandler.format_error(OnsetErrors.OFFSET_BEFORE_ONSET, tag=def_tag) + else: + return ErrorHandler.format_error(OnsetErrors.INSET_BEFORE_ONSET, tag=def_tag) + elif is_offset: del self._onsets[full_def_name.lower()] return [] diff --git a/hed/validator/sidecar_validator.py b/hed/validator/sidecar_validator.py index 8c68808e8..cd1500d30 100644 --- a/hed/validator/sidecar_validator.py +++ b/hed/validator/sidecar_validator.py @@ -1,12 +1,16 @@ import copy -from hed.errors import ErrorHandler, ErrorContext, SidecarErrors +import re +from hed.errors import ErrorHandler, ErrorContext, SidecarErrors, DefinitionErrors, ColumnErrors from hed.models import ColumnType from hed import HedString from hed import Sidecar from hed.models.column_metadata import ColumnMetadata from hed.errors.error_reporter import sort_issues +from hed.models.model_constants import DefTagNames +from hed.errors.error_reporter import check_for_any_errors +# todo: Add/improve validation for definitions being in known columns(right now it just assumes they aren't) class SidecarValidator: reserved_column_names = ["HED"] reserved_category_values = ["n/a"] @@ -37,31 +41,54 @@ def validate(self, sidecar, extra_def_dicts=None, name=None, error_handler=None) error_handler = ErrorHandler() error_handler.push_error_context(ErrorContext.FILE_NAME, name) + issues += self.validate_structure(sidecar, error_handler=error_handler) + issues += self._validate_refs(sidecar, error_handler) + + # only allowed early out, something is very wrong with structure or refs + if check_for_any_errors(issues): + error_handler.pop_error_context() + return issues sidecar_def_dict = sidecar.get_def_dict(hed_schema=self._schema, extra_def_dicts=extra_def_dicts) hed_validator = HedValidator(self._schema, def_dicts=sidecar_def_dict, - run_full_onset_checks=False) + run_full_onset_checks=False, + definitions_allowed=True) - issues += self.validate_structure(sidecar, error_handler=error_handler) issues += sidecar._extract_definition_issues issues += sidecar_def_dict.issues - # todo: Add the definition validation. - - for hed_string, column_data, position in sidecar.hed_string_iter(error_handler): - hed_string_obj = HedString(hed_string, hed_schema=self._schema, def_dict=sidecar_def_dict) - - error_handler.push_error_context(ErrorContext.HED_STRING, hed_string_obj) - new_issues = hed_validator.run_basic_checks(hed_string_obj, allow_placeholders=True) - if not new_issues: - new_issues = hed_validator.run_full_string_checks(hed_string_obj) - if not new_issues: - new_issues = self._validate_pound_sign_count(hed_string_obj, column_type=column_data.column_type) - error_handler.add_context_and_filter(new_issues) - issues += new_issues - error_handler.pop_error_context() + definition_checks = {} + for column_data in sidecar: + column_name = column_data.column_name + hed_strings = column_data.get_hed_strings() + error_handler.push_error_context(ErrorContext.SIDECAR_COLUMN_NAME, column_name) + for key_name, hed_string in hed_strings.items(): + new_issues = [] + if len(hed_strings) > 1: + error_handler.push_error_context(ErrorContext.SIDECAR_KEY_NAME, key_name) + hed_string_obj = HedString(hed_string, hed_schema=self._schema, def_dict=sidecar_def_dict) + hed_string_obj.remove_refs() + + error_handler.push_error_context(ErrorContext.HED_STRING, hed_string_obj) + new_issues += hed_validator.run_basic_checks(hed_string_obj, allow_placeholders=True) + new_issues += hed_validator.run_full_string_checks(hed_string_obj) + + def_check_list = definition_checks.setdefault(column_name, []) + def_check_list.append(hed_string_obj.find_tags({DefTagNames.DEFINITION_KEY}, recursive=True, + include_groups=0)) + # Might refine this later - for now just skip checking placeholder counts in definition columns. + if not def_check_list[-1]: + new_issues += self._validate_pound_sign_count(hed_string_obj, column_type=column_data.column_type) + + if len(hed_strings) > 1: + error_handler.pop_error_context() + error_handler.add_context_and_filter(new_issues) + issues += new_issues + error_handler.pop_error_context() error_handler.pop_error_context() + issues += self._check_definitions_bad_spot(definition_checks, error_handler) issues = sort_issues(issues) + return issues def validate_structure(self, sidecar, error_handler): @@ -81,6 +108,74 @@ def validate_structure(self, sidecar, error_handler): error_handler.pop_error_context() return all_validation_issues + def _validate_refs(self, sidecar, error_handler): + possible_column_refs = sidecar.all_hed_columns + + issues = [] + found_column_references = {} + for column_data in sidecar: + column_name = column_data.column_name + hed_strings = column_data.get_hed_strings() + error_handler.push_error_context(ErrorContext.SIDECAR_COLUMN_NAME, column_name) + matches = [] + for key_name, hed_string in hed_strings.items(): + new_issues = [] + if len(hed_strings) > 1: + error_handler.push_error_context(ErrorContext.SIDECAR_KEY_NAME, key_name) + + error_handler.push_error_context(ErrorContext.HED_STRING, HedString(hed_string)) + invalid_locations = self._find_non_matching_braces(hed_string) + for loc in invalid_locations: + bad_symbol = hed_string[loc] + new_issues += error_handler.format_error_with_context(ColumnErrors.MALFORMED_COLUMN_REF, + column_name, loc, bad_symbol) + + sub_matches = re.findall(r"\{([a-z_\-0-9]+)\}", hed_string, re.IGNORECASE) + matches.append(sub_matches) + for match in sub_matches: + if match not in possible_column_refs: + new_issues += error_handler.format_error_with_context(ColumnErrors.INVALID_COLUMN_REF, match) + + error_handler.pop_error_context() + if len(hed_strings) > 1: + error_handler.pop_error_context() + error_handler.add_context_and_filter(new_issues) + issues += new_issues + error_handler.pop_error_context() + references = [match for sublist in matches for match in sublist] + if references: + found_column_references[column_name] = references + if column_name in references: + issues += error_handler.format_error_with_context(ColumnErrors.SELF_COLUMN_REF, column_name) + + for column_name, refs in found_column_references.items(): + for ref in refs: + if ref in found_column_references and ref != column_name: + issues += error_handler.format_error_with_context(ColumnErrors.NESTED_COLUMN_REF, column_name, ref) + + return issues + + @staticmethod + def _find_non_matching_braces(hed_string): + issues = [] + open_brace_index = -1 + + for i, char in enumerate(hed_string): + if char == '{': + if open_brace_index >= 0: # Nested brace detected + issues.append(open_brace_index) + open_brace_index = i + elif char == '}': + if open_brace_index >= 0: + open_brace_index = -1 + else: + issues.append(i) + + if open_brace_index >= 0: + issues.append(open_brace_index) + + return issues + @staticmethod def _check_for_key(key, data): if isinstance(data, dict): @@ -113,7 +208,7 @@ def _validate_column_structure(self, column_name, dict_for_entry, error_handler) val_issues += error_handler.format_error_with_context(SidecarErrors.SIDECAR_HED_USED_COLUMN) return val_issues - column_type = Sidecar._detect_column_type(dict_for_entry=dict_for_entry) + column_type = ColumnMetadata._detect_column_type(dict_for_entry=dict_for_entry) if column_type is None: val_issues += error_handler.format_error_with_context(SidecarErrors.UNKNOWN_COLUMN_TYPE, column_name=column_name) @@ -167,3 +262,17 @@ def _validate_pound_sign_count(self, hed_string, column_type): return ErrorHandler.format_error(error_type, pound_sign_count=str(hed_string_copy).count("#")) return [] + + def _check_definitions_bad_spot(self, definition_checks, error_handler): + issues = [] + # This could be simplified now + for col_name, has_def in definition_checks.items(): + error_handler.push_error_context(ErrorContext.SIDECAR_COLUMN_NAME, col_name) + def_check = set(bool(d) for d in has_def) + if len(def_check) != 1: + flat_def_list = [d for defs in has_def for d in defs] + for d in flat_def_list: + issues += error_handler.format_error_with_context(DefinitionErrors.BAD_DEFINITION_LOCATION, d) + error_handler.pop_error_context() + + return issues diff --git a/hed/validator/spreadsheet_validator.py b/hed/validator/spreadsheet_validator.py index 8b8aa9b1f..66cf58f0f 100644 --- a/hed/validator/spreadsheet_validator.py +++ b/hed/validator/spreadsheet_validator.py @@ -1,12 +1,11 @@ import pandas as pd -import re from hed import BaseInput from hed.errors import ErrorHandler, ValidationErrors, ErrorContext from hed.errors.error_types import ColumnErrors from hed.models import ColumnType from hed import HedString from hed.models.hed_string_group import HedStringGroup -from hed.errors.error_reporter import sort_issues +from hed.errors.error_reporter import sort_issues, check_for_any_errors PANDAS_COLUMN_PREFIX_TO_IGNORE = "Unnamed: " @@ -45,7 +44,6 @@ def validate(self, data, def_dicts=None, name=None, error_handler=None): # Check the structure of the input data, if it's a BaseInput if isinstance(data, BaseInput): issues += self._validate_column_structure(data, error_handler) - issues += self._validate_square_brackets(data.assemble(skip_square_brackets=True), error_handler) data = data.dataframe_a # Check the rows of the input data @@ -78,7 +76,7 @@ def _run_checks(self, data, error_handler): error_handler.pop_error_context() issues += new_column_issues - if new_column_issues: + if check_for_any_errors(new_column_issues): continue else: row_string = HedStringGroup(row_strings) @@ -97,11 +95,12 @@ def _validate_column_structure(self, base_input, error_handler): Parameters: base_input (BaseInput): The input data to be validated. + error_handler (ErrorHandler): Holds context Returns: List of issues associated with each invalid value. Each issue is a dictionary. """ issues = [] - col_issues = base_input._mapper.get_column_mapping_issues() + col_issues = base_input._mapper.check_for_mapping_issues(base_input) error_handler.add_context_and_filter(col_issues) issues += col_issues for column in base_input.column_metadata().values(): @@ -111,92 +110,17 @@ def _validate_column_structure(self, base_input, error_handler): for row_number, value in enumerate(base_input.dataframe[column.column_name]): if value != "n/a" and value not in valid_keys: error_handler.push_error_context(ErrorContext.ROW, row_number) - issues += error_handler.format_error_with_context(ValidationErrors.HED_SIDECAR_KEY_MISSING, + issues += error_handler.format_error_with_context(ValidationErrors.SIDECAR_KEY_MISSING, invalid_key=value, category_keys=list(valid_keys)) error_handler.pop_error_context() error_handler.pop_error_context() - return issues - - @staticmethod - def _validate_column_refs(df, error_handler): - possible_column_references = [f"{column_name}" for column_name in df.columns if - isinstance(column_name, str) and column_name.lower() != "hed"] - - issues = [] - found_column_references = {} - for column_name in df: - matches = df[column_name].str.findall("\[([a-z_\-\s0-9]+)(? 127: validation_issues += self._report_invalid_character_error(hed_string, index) return validation_issues @@ -167,7 +176,7 @@ def check_count_tag_group_parentheses(self, hed_string): number_open_parentheses = hed_string.count('(') number_closed_parentheses = hed_string.count(')') if number_open_parentheses != number_closed_parentheses: - validation_issues += ErrorHandler.format_error(ValidationErrors.HED_PARENTHESES_MISMATCH, + validation_issues += ErrorHandler.format_error(ValidationErrors.PARENTHESES_MISMATCH, opening_parentheses_count=number_open_parentheses, closing_parentheses_count=number_closed_parentheses) return validation_issues @@ -192,7 +201,7 @@ def check_delimiter_issues_in_hed_string(self, hed_string): continue if TagValidator._character_is_delimiter(current_character): if current_tag.strip() == current_character: - issues += ErrorHandler.format_error(ValidationErrors.HED_TAG_EMPTY, source_string=hed_string, + issues += ErrorHandler.format_error(ValidationErrors.TAG_EMPTY, source_string=hed_string, char_index=i) current_tag = '' continue @@ -203,7 +212,7 @@ def check_delimiter_issues_in_hed_string(self, hed_string): else: issues += ErrorHandler.format_error(ValidationErrors.COMMA_MISSING, tag=current_tag) elif last_non_empty_valid_character == "," and current_character == self.CLOSING_GROUP_CHARACTER: - issues += ErrorHandler.format_error(ValidationErrors.HED_TAG_EMPTY, source_string=hed_string, + issues += ErrorHandler.format_error(ValidationErrors.TAG_EMPTY, source_string=hed_string, char_index=i) elif TagValidator._comma_is_missing_after_closing_parentheses(last_non_empty_valid_character, current_character): @@ -212,7 +221,7 @@ def check_delimiter_issues_in_hed_string(self, hed_string): last_non_empty_valid_character = current_character last_non_empty_valid_index = i if TagValidator._character_is_delimiter(last_non_empty_valid_character): - issues += ErrorHandler.format_error(ValidationErrors.HED_TAG_EMPTY, + issues += ErrorHandler.format_error(ValidationErrors.TAG_EMPTY, char_index=last_non_empty_valid_index, source_string=hed_string) return issues @@ -230,7 +239,7 @@ def check_tag_formatting(self, original_tag): """ validation_issues = [] for match in self.pattern_doubleslash.finditer(original_tag.org_tag): - validation_issues += ErrorHandler.format_error(ValidationErrors.HED_NODE_NAME_EMPTY, + validation_issues += ErrorHandler.format_error(ValidationErrors.NODE_NAME_EMPTY, tag=original_tag, index_in_tag=match.start(), index_in_tag_end=match.end()) @@ -271,19 +280,23 @@ def check_tag_exists_in_schema(self, original_tag): is_extension_tag = original_tag.is_extension_allowed_tag() if not is_extension_tag: - validation_issues += ErrorHandler.format_error(ValidationErrors.INVALID_EXTENSION, tag=original_tag) + actual_error = None + if "#" in original_tag.extension: + actual_error = ValidationErrors.PLACEHOLDER_INVALID + validation_issues += ErrorHandler.format_error(ValidationErrors.TAG_EXTENSION_INVALID, tag=original_tag, + actual_error=actual_error) else: - validation_issues += ErrorHandler.format_error(ValidationErrors.HED_TAG_EXTENDED, tag=original_tag, + validation_issues += ErrorHandler.format_error(ValidationErrors.TAG_EXTENDED, tag=original_tag, index_in_tag=len(original_tag.org_base_tag), index_in_tag_end=None) return validation_issues - def check_tag_unit_class_units_are_valid(self, original_tag, report_tag_as=None, error_code=None): + def check_tag_unit_class_units_are_valid(self, original_tag, report_as=None, error_code=None): """ Report incorrect unit class or units. Parameters: original_tag (HedTag): The original tag that is used to report the error. - report_tag_as (HedTag): Report errors as coming from this tag, rather than original_tag. + report_as (HedTag): Report errors as coming from this tag, rather than original_tag. error_code (str): Override error codes to this Returns: list: Validation issues. Each issue is a dictionary. @@ -292,40 +305,56 @@ def check_tag_unit_class_units_are_valid(self, original_tag, report_tag_as=None, if original_tag.is_unit_class_tag(): stripped_value, unit = original_tag.get_stripped_unit_value() if not unit: - if self._validate_value_class_portion(original_tag, stripped_value): - # only suggest a unit is missing if this is a valid number - if tag_validator_util.validate_numeric_value_class(stripped_value): - default_unit = original_tag.get_unit_class_default_unit() - validation_issues += ErrorHandler.format_error(ValidationErrors.HED_UNITS_DEFAULT_USED, - tag=report_tag_as if report_tag_as else original_tag, - default_unit=default_unit, + bad_units = " " in original_tag.extension + had_error = False + # Todo: in theory this should separately validate the number and the units, for units + # that are prefixes like $. Right now those are marked as unit invalid AND value_invalid. + if bad_units: + stripped_value = stripped_value.split(" ")[0] + if original_tag.is_takes_value_tag() and\ + not self._validate_value_class_portion(original_tag, stripped_value): + validation_issues += ErrorHandler.format_error(ValidationErrors.VALUE_INVALID, + report_as if report_as else original_tag) + if error_code: + had_error = True + validation_issues += ErrorHandler.format_error(ValidationErrors.VALUE_INVALID, + report_as if report_as else original_tag, actual_error=error_code) - else: + + if bad_units: tag_unit_class_units = original_tag.get_tag_unit_class_units() if tag_unit_class_units: - default_code = ValidationErrors.HED_UNITS_INVALID - if not error_code: - error_code = default_code - validation_issues += ErrorHandler.format_error(ValidationErrors.HED_UNITS_INVALID, - actual_error=error_code, - tag=report_tag_as if report_tag_as else original_tag, + validation_issues += ErrorHandler.format_error(ValidationErrors.UNITS_INVALID, + tag=report_as if report_as else original_tag, units=tag_unit_class_units) + else: + default_unit = original_tag.get_unit_class_default_unit() + validation_issues += ErrorHandler.format_error(ValidationErrors.UNITS_MISSING, + tag=report_as if report_as else original_tag, + default_unit=default_unit) + + # We don't want to give this overall error twice + if error_code and not had_error: + new_issue = validation_issues[0].copy() + new_issue['code'] = error_code + validation_issues += [new_issue] + return validation_issues - def check_tag_value_class_valid(self, original_tag, report_tag_as=None, error_code=None): + def check_tag_value_class_valid(self, original_tag, report_as=None, error_code=None): """ Report an invalid value portion. Parameters: original_tag (HedTag): The original tag that is used to report the error. - report_tag_as (HedTag): Report errors as coming from this tag, rather than original_tag. + report_as (HedTag): Report errors as coming from this tag, rather than original_tag. error_code (str): Override error codes to this Returns: list: Validation issues. """ validation_issues = [] if not self._validate_value_class_portion(original_tag, original_tag.extension): - validation_issues += ErrorHandler.format_error(ValidationErrors.HED_VALUE_INVALID, - report_tag_as if report_tag_as else original_tag, + validation_issues += ErrorHandler.format_error(ValidationErrors.VALUE_INVALID, + report_as if report_as else original_tag, actual_error=error_code) return validation_issues @@ -341,7 +370,7 @@ def check_tag_requires_child(self, original_tag): """ validation_issues = [] if original_tag.has_attribute(HedKey.RequireChild): - validation_issues += ErrorHandler.format_error(ValidationErrors.HED_TAG_REQUIRES_CHILD, + validation_issues += ErrorHandler.format_error(ValidationErrors.TAG_REQUIRES_CHILD, tag=original_tag) return validation_issues @@ -360,7 +389,7 @@ def check_tag_unit_class_units_exist(self, original_tag): tag_unit_values = original_tag.extension if tag_validator_util.validate_numeric_value_class(tag_unit_values): default_unit = original_tag.get_unit_class_default_unit() - validation_issues += ErrorHandler.format_error(ValidationErrors.HED_UNITS_DEFAULT_USED, + validation_issues += ErrorHandler.format_error(ValidationErrors.UNITS_MISSING, tag=original_tag, default_unit=default_unit) return validation_issues @@ -394,7 +423,7 @@ def check_capitalization(self, original_tag): for tag_name in tag_names: correct_tag_name = tag_name.capitalize() if tag_name != correct_tag_name and not re.search(self.CAMEL_CASE_EXPRESSION, tag_name): - validation_issues += ErrorHandler.format_error(ValidationErrors.HED_STYLE_WARNING, + validation_issues += ErrorHandler.format_error(ValidationErrors.STYLE_WARNING, tag=original_tag) break return validation_issues @@ -424,6 +453,16 @@ def check_tag_level_issue(self, original_tag_list, is_top_level, is_group): tag=tag_group_tag) for top_level_tag in top_level_tags: if not is_top_level: + actual_code = None + if top_level_tag.short_base_tag == DefTagNames.DEFINITION_ORG_KEY: + actual_code = ValidationErrors.DEFINITION_INVALID + elif top_level_tag.short_base_tag in {DefTagNames.ONSET_ORG_KEY, DefTagNames.OFFSET_ORG_KEY}: + actual_code = ValidationErrors.ONSET_OFFSET_INSET_ERROR + + if actual_code: + validation_issues += ErrorHandler.format_error(ValidationErrors.HED_TOP_LEVEL_TAG, + tag=top_level_tag, + actual_error=actual_code) validation_issues += ErrorHandler.format_error(ValidationErrors.HED_TOP_LEVEL_TAG, tag=top_level_tag) @@ -448,7 +487,7 @@ def check_for_required_tags(self, tags): required_prefixes = self._hed_schema.get_tags_with_attribute(HedKey.Required) for required_prefix in required_prefixes: if not any(tag.long_tag.lower().startswith(required_prefix.lower()) for tag in tags): - validation_issues += ErrorHandler.format_error(ValidationErrors.HED_REQUIRED_TAG_MISSING, + validation_issues += ErrorHandler.format_error(ValidationErrors.REQUIRED_TAG_MISSING, tag_prefix=required_prefix) return validation_issues @@ -469,7 +508,7 @@ def check_multiple_unique_tags_exist(self, tags): for unique_prefix in unique_prefixes: unique_tag_prefix_bool_mask = [x.long_tag.lower().startswith(unique_prefix.lower()) for x in tags] if sum(unique_tag_prefix_bool_mask) > 1: - validation_issues += ErrorHandler.format_error(ValidationErrors.HED_TAG_NOT_UNIQUE, + validation_issues += ErrorHandler.format_error(ValidationErrors.TAG_NOT_UNIQUE, tag_prefix=unique_prefix) return validation_issues @@ -506,7 +545,7 @@ def _report_invalid_character_error(self, hed_string, index): error_type = ValidationErrors.CHARACTER_INVALID character = hed_string[index] if character == "~": - error_type = ValidationErrors.HED_TILDES_UNSUPPORTED + error_type = ValidationErrors.TILDES_UNSUPPORTED return ErrorHandler.format_error(error_type, char_index=index, source_string=hed_string) @@ -568,7 +607,7 @@ def check_for_placeholder(self, original_tag, is_definition=False): tag=original_tag, index_in_tag=starting_index + i, index_in_tag_end=starting_index + i + 1, - actual_error=ValidationErrors.HED_VALUE_INVALID) + actual_error=ValidationErrors.PLACEHOLDER_INVALID) return validation_issues diff --git a/requirements.txt b/requirements.txt index ff7ce8bb7..443e763d2 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,9 +1,7 @@ defusedxml>=0.7.1 -inflect>=5.5.1 -openpyxl>=3.0.9 +inflect>=6.0.2 +numpy>=1.21.6 +openpyxl>=3.1.0 pandas>=1.3.5 -portalocker>=2.4.0 -semantic_version>=2.9.0 - -# This is just needed for secure_filename and should probably be removed -Werkzeug>=2.1.2 +portalocker>=2.7.0 +semantic_version>=2.10.0 diff --git a/setup.cfg b/setup.cfg index 88199acad..fbd9ad553 100644 --- a/setup.cfg +++ b/setup.cfg @@ -33,7 +33,6 @@ install_requires = pytz semantic-version six - Werkzeug [options.packages.find] diff --git a/spec_tests/hed-specification b/spec_tests/hed-specification index 8772db30c..d7d174fde 160000 --- a/spec_tests/hed-specification +++ b/spec_tests/hed-specification @@ -1 +1 @@ -Subproject commit 8772db30cf7c63a4fc224aac9e7daf504f276a1b +Subproject commit d7d174fde455b42c0c0a0534b3566f76fac53496 diff --git a/spec_tests/test_errors.py b/spec_tests/test_errors.py index c6e52dca1..55fee4863 100644 --- a/spec_tests/test_errors.py +++ b/spec_tests/test_errors.py @@ -3,36 +3,85 @@ from hed.models import DefinitionDict from hed import load_schema_version, HedString +from hed.schema import from_string from hed.validator import HedValidator from hed import Sidecar import io import json from hed import HedFileError from hed.errors import ErrorHandler, get_printable_issue_string +import shutil +from hed import schema +from hed.schema import hed_cache +# To be removed eventually once all errors are being verified. known_errors = [ 'SIDECAR_INVALID', 'CHARACTER_INVALID', 'COMMA_MISSING', "DEF_EXPAND_INVALID", "DEF_INVALID", - "DEFINITION_INVALID" + "DEFINITION_INVALID", + "NODE_NAME_EMPTY", + "ONSET_OFFSET_INSET_ERROR", + "PARENTHESES_MISMATCH", + "PLACEHOLDER_INVALID", + "REQUIRED_TAG_MISSING", + "SIDECAR_INVALID", + "SIDECAR_KEY_MISSING", + "STYLE_WARNING", + "TAG_EMPTY", + "TAG_EXPRESSION_REPEATED", + "TAG_EXTENDED", + "TAG_EXTENSION_INVALID", + "TAG_GROUP_ERROR", + "TAG_INVALID", + "TAG_NOT_UNIQUE", + "TAG_PREFIX_INVALID", + "TAG_REQUIRES_CHILD", + "TILDES_UNSUPPORTED", + "UNITS_INVALID", + "UNITS_MISSING", + "VALUE_INVALID", + + "SIDECAR_BRACES_INVALID", + "SCHEMA_LIBRARY_INVALID", ] -skip_tests = ["VERSION_DEPRECATED", "CHARACTER_INVALID", "STYLE_WARNING"] +skip_tests = { + "VERSION_DEPRECATED": "Not applicable", + "onset-offset-error-duplicated-onset-or-offset": "TBD how we implement this", + "tag-extension-invalid-bad-node-name": "Part of character invalid checking/didn't get to it yet", +} class MyTestCase(unittest.TestCase): @classmethod def setUpClass(cls): test_dir = os.path.realpath(os.path.join(os.path.dirname(os.path.realpath(__file__)), - 'hed-specification/docs/source/_static/data/error_tests')) + 'hed-specification/tests/json_tests')) cls.test_files = [os.path.join(test_dir, f) for f in os.listdir(test_dir) if os.path.isfile(os.path.join(test_dir, f))] cls.fail_count = [] cls.default_sidecar = Sidecar(os.path.realpath(os.path.join(os.path.dirname(os.path.realpath(__file__)), 'test_sidecar.json'))) + # this is just to make sure 8.2.0 is in the cache(as you can't find it online yet) and could be cleaned up + cls.hed_cache_dir = os.path.join(os.path.dirname(os.path.realpath(__file__)), 'test_errors_cache/') + base_schema_dir = '../tests/data/schema_tests/merge_tests/' + cls.saved_cache_folder = hed_cache.HED_CACHE_DIRECTORY + schema.set_cache_directory(cls.hed_cache_dir) + cls.full_base_folder = os.path.join(os.path.dirname(os.path.realpath(__file__)), base_schema_dir) + cls.source_schema_path = os.path.join(cls.full_base_folder, "HED8.2.0.xml") + cls.cache_folder = hed_cache.get_cache_directory() + cls.schema_path_in_cache = os.path.join(cls.cache_folder, "HED8.2.0.xml") + shutil.copy(cls.source_schema_path, cls.schema_path_in_cache) + + @classmethod + def tearDownClass(cls): + shutil.rmtree(cls.hed_cache_dir) + schema.set_cache_directory(cls.saved_cache_folder) + def run_single_test(self, test_file): with open(test_file, "r") as fp: test_info = json.load(fp) @@ -41,24 +90,27 @@ def run_single_test(self, test_file): verify_code = False if error_code in known_errors: verify_code = True - # To be deprecated once we add this to all tests self._verify_code = verify_code if error_code in skip_tests: - print(f"Skipping {error_code} test") + print(f"Skipping {error_code} test because: {skip_tests[error_code]}") continue name = info.get('name', '') + if name in skip_tests: + print(f"Skipping {name} test because: {skip_tests[name]}") + continue + description = info['description'] schema = info['schema'] check_for_warnings = info.get("warning", False) error_handler = ErrorHandler(check_for_warnings) if schema: schema = load_schema_version(schema) + definitions = info['definitions'] + def_dict = DefinitionDict(definitions, schema) + self.assertFalse(def_dict.issues) else: - raise ValueError("Tests always require a schema now") - definitions = info['definitions'] - def_dict = DefinitionDict(definitions, schema) - self.assertFalse(def_dict.issues) + def_dict = DefinitionDict() for section_name, section in info["tests"].items(): if section_name == "string_tests": self._run_single_string_test(section, schema, def_dict, error_code, description, name, error_handler) @@ -68,6 +120,8 @@ def run_single_test(self, test_file): self._run_single_events_test(section, schema, def_dict, error_code, description, name, error_handler) if section_name == "combo_tests": self._run_single_combo_test(section, schema, def_dict, error_code, description, name, error_handler) + if section_name == "schema_tests": + self._run_single_schema_test(section, error_code, description, name, error_handler) def report_result(self, expected_result, issues, error_code, description, name, test, test_type): if expected_result == "fails": @@ -162,6 +216,17 @@ def _run_single_combo_test(self, info, schema, def_dict, error_code, description issues += file.validate(hed_schema=schema, extra_def_dicts=def_dict, error_handler=error_handler) self.report_result(result, issues, error_code, description, name, test, "combo_tests") + def _run_single_schema_test(self, info, error_code, description,name, error_handler): + for result, tests in info.items(): + for test in tests: + schema_string = "\n".join(test) + try: + loaded_schema = from_string(schema_string, file_type=".mediawiki") + issues = loaded_schema.check_compliance() + except HedFileError as e: + issues = e.issues + self.report_result(result, issues, error_code, description, name, test, "schema_tests") + def test_errors(self): for test_file in self.test_files: self.run_single_test(test_file) diff --git a/tests/data/model_tests/ExcelMultipleSheets.xlsx b/tests/data/model_tests/ExcelMultipleSheets.xlsx new file mode 100644 index 000000000..668af693b Binary files /dev/null and b/tests/data/model_tests/ExcelMultipleSheets.xlsx differ diff --git a/tests/data/schema_tests/merge_tests/HED8.2.0.xml b/tests/data/schema_tests/merge_tests/HED8.2.0.xml index ec087b596..cecbd111c 100644 --- a/tests/data/schema_tests/merge_tests/HED8.2.0.xml +++ b/tests/data/schema_tests/merge_tests/HED8.2.0.xml @@ -1,6 +1,10 @@ - This schema includes an xsd and requires unit class, unit modifier, value class, schema attribute and property sections. + The HED standard schema is a hierarchically-organized vocabulary for annotating events and experimental structure. HED annotations consist of comma-separated tags drawn from this vocabulary. This vocabulary can be augmented by terms drawn from specialized library schema. + +Each term in this vocabulary has a human-readable description and may include additional attributes that give additional properties or that specify how tools should treat the tag during analysis. The meaning of these attributes is described in the Additional schema properties section. + +For additional information and tutorials see https://www.hed-resources.org. @@ -932,6 +936,10 @@ Gentalia The external organs of reproduction. + + deprecatedFrom + 8.1.0 + Hip @@ -2131,19 +2139,50 @@ Temporal-marker An indicator placed at a particular time in the data. + + Inset + Marks an intermediate point in an ongoing event of temporal extent. + + topLevelTagGroup + + + reserved + + + relatedTag + Onset + Offset + + Onset - Labels the start or beginning of something, usually an event. + Marks the start of an ongoing event of temporal extent. topLevelTagGroup + + reserved + + + relatedTag + Inset + Offset + Offset - Labels the time at which something stops. + Marks the end of an event of temporal extent. topLevelTagGroup + + reserved + + + relatedTag + Onset + Inset + Pause @@ -3420,7 +3459,17 @@ A characteristic of or relating to time or limited by time. Delay - Time during which some action is awaited. + The time at which an event start time is delayed from the current onset time. This tag defines the start time of an event of temporal extent and may be used with the Duration tag. + + topLevelTagGroup + + + reserved + + + relatedTag + Duration + # @@ -3438,7 +3487,17 @@ Duration - The period of time during which something occurs or continues. + The period of time during which an event occurs. This tag defines the end time of an event of temporal extent and may be used with the Delay tag. + + topLevelTagGroup + + + reserved + + + relatedTag + Delay + # @@ -3937,6 +3996,9 @@ requireChild + + reserved + # Name of the definition. @@ -3955,6 +4017,9 @@ requireChild + + reserved + tagGroup @@ -3975,6 +4040,9 @@ requireChild + + reserved + topLevelTagGroup @@ -3993,6 +4061,9 @@ Event-context A special HED tag inserted as part of a top-level tag group to contain information about the interrelated conditions under which the event occurs. The event context includes information about other events that are ongoing when this event happens. + + reserved + topLevelTagGroup @@ -6227,6 +6298,16 @@ 0.0254 + + meter + + SIUnit + + + conversionFactor + 1.0 + + metre @@ -6973,10 +7054,10 @@ - deprecated - This tag is out of date and should no longer be used. + deprecatedFrom + Indicates that this element is deprecated. The value of the attribute is the latest schema version in which the element appeared in undeprecated form. - boolProperty + elementProperty @@ -6992,10 +7073,16 @@ boolProperty + + nodeProperty + + + isInherited + inLibrary - Indicates this node came from the named library schema, not the standard schema. + Indicates this schema element came from the named library schema, not the standard schema. This attribute is added by tools when a library schema is merged into its partnered standard schema. elementProperty @@ -7006,10 +7093,19 @@ boolProperty + + nodeProperty + relatedTag A schema attribute suggesting HED tags that are closely related to this tag. This attribute is used by tagging tools. + + nodeProperty + + + isInherited + requireChild @@ -7017,6 +7113,9 @@ boolProperty + + nodeProperty + required @@ -7024,6 +7123,26 @@ boolProperty + + nodeProperty + + + + reserved + A schema attribute indicating that this tag has special meaning and requires special handling by tools. + + boolProperty + + + nodeProperty + + + + rooted + Indicates a top-level library schema node is identical to a node of the same name in the partnered standard schema. This attribute can only appear in nodes that have the inLibrary schema attribute. + + nodeProperty + SIUnit @@ -7058,6 +7177,12 @@ suggestedTag A schema attribute that indicates another tag that is often associated with this tag. This attribute is used by tagging tools to provide tagging suggestions. + + nodeProperty + + + isInherited + tagGroup @@ -7065,6 +7190,9 @@ boolProperty + + nodeProperty + takesValue @@ -7072,6 +7200,9 @@ boolProperty + + nodeProperty + topLevelTagGroup @@ -7079,6 +7210,9 @@ boolProperty + + nodeProperty + unique @@ -7086,10 +7220,16 @@ boolProperty + + nodeProperty + unitClass A schema attribute specifying which unit class this value tag belongs to. + + nodeProperty + unitPrefix @@ -7114,6 +7254,9 @@ valueClass A schema attribute specifying which value class this value tag belongs to. + + nodeProperty + @@ -7125,6 +7268,14 @@ elementProperty Indicates this schema attribute can apply to any type of element(tag term, unit class, etc). + + isInherited + Indicates that this attribute is inherited by child nodes. This property only applies to schema attributes for nodes. + + + nodeProperty + Indicates this schema attribute applies to node (tag-term) elements. This was added to allow for an attribute to apply to multiple elements. + unitClassProperty Indicates that the schema attribute is meant to be applied to unit classes. diff --git a/tests/data/schema_tests/merge_tests/HED_score_1.0.0.mediawiki b/tests/data/schema_tests/merge_tests/HED_score_1.0.0.mediawiki index c984f3d6e..3d633fa40 100644 --- a/tests/data/schema_tests/merge_tests/HED_score_1.0.0.mediawiki +++ b/tests/data/schema_tests/merge_tests/HED_score_1.0.0.mediawiki @@ -1,4 +1,4 @@ -HED library="score" version="1.0.0" with-standard="8.2.0" +HED library="score" version="1.0.0" withStandard="8.2.0" unmerged="true" '''Prologue''' This schema is a Hierarchical Event Descriptors (HED) Library Schema implementation of Standardized Computer-based Organized Reporting of EEG (SCORE)[1,2] for describing events occurring during neuroimaging time series recordings. diff --git a/tests/data/schema_tests/merge_tests/HED_score_lib_tags.mediawiki b/tests/data/schema_tests/merge_tests/HED_score_lib_tags.mediawiki index 984cb98e4..b754ef5cf 100644 --- a/tests/data/schema_tests/merge_tests/HED_score_lib_tags.mediawiki +++ b/tests/data/schema_tests/merge_tests/HED_score_lib_tags.mediawiki @@ -1,4 +1,4 @@ -HED version="1.0.0" library="score" with-standard="8.2.0" +HED version="1.0.0" library="score" withStandard="8.2.0" unmerged="True" '''Prologue''' This schema is a Hierarchical Event Descriptors (HED) Library Schema implementation of Standardized Computer-based Organized Reporting of EEG (SCORE)[1,2] for describing events occurring during neuroimaging time series recordings. @@ -10,863 +10,863 @@ For more information see https://hed-schema-library.readthedocs.io/en/latest/ind !# start schema -'''Modulator''' {requireChild, inLibrary=score} [External stimuli / interventions or changes in the alertness level (sleep) that modify: the background activity, or how often a graphoelement is occurring, or change other features of the graphoelement (like intra-burst frequency). For each observed finding, there is an option of specifying how they are influenced by the modulators and procedures that were done during the recording.] -* Sleep-modulator {inLibrary=score} -** Sleep-deprivation {inLibrary=score} -*** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] -** Sleep-following-sleep-deprivation {inLibrary=score} -*** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] -** Natural-sleep {inLibrary=score} -*** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] -** Induced-sleep {inLibrary=score} -*** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] -** Drowsiness {inLibrary=score} -*** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] -** Awakening {inLibrary=score} -*** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] -* Medication-modulator {inLibrary=score} -** Medication-administered-during-recording {inLibrary=score} -*** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] -** Medication-withdrawal-or-reduction-during-recording {inLibrary=score} -*** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] -* Eye-modulator {inLibrary=score} -** Manual-eye-closure {inLibrary=score} -*** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] -** Manual-eye-opening {inLibrary=score} -*** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] -* Stimulation-modulator {inLibrary=score} -** Intermittent-photic-stimulation {requireChild, inLibrary=score} -*** # {takesValue, valueClass=numericClass, unitClass=frequencyUnits, inLibrary=score} -** Auditory-stimulation {inLibrary=score} -*** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] -** Nociceptive-stimulation {inLibrary=score} -*** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] -* Hyperventilation {inLibrary=score} -** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] -* Physical-effort {inLibrary=score} -** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] -* Cognitive-task {inLibrary=score} -** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] -* Other-modulator-or-procedure {requireChild, inLibrary=score} -** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] +'''Modulator''' {requireChild} [External stimuli / interventions or changes in the alertness level (sleep) that modify: the background activity, or how often a graphoelement is occurring, or change other features of the graphoelement (like intra-burst frequency). For each observed finding, there is an option of specifying how they are influenced by the modulators and procedures that were done during the recording.] + * Sleep-modulator + ** Sleep-deprivation + *** # {takesValue, valueClass=textClass} [Free text.] + ** Sleep-following-sleep-deprivation + *** # {takesValue, valueClass=textClass} [Free text.] + ** Natural-sleep + *** # {takesValue, valueClass=textClass} [Free text.] + ** Induced-sleep + *** # {takesValue, valueClass=textClass} [Free text.] + ** Drowsiness + *** # {takesValue, valueClass=textClass} [Free text.] + ** Awakening + *** # {takesValue, valueClass=textClass} [Free text.] + * Medication-modulator + ** Medication-administered-during-recording + *** # {takesValue, valueClass=textClass} [Free text.] + ** Medication-withdrawal-or-reduction-during-recording + *** # {takesValue, valueClass=textClass} [Free text.] + * Eye-modulator + ** Manual-eye-closure + *** # {takesValue, valueClass=textClass} [Free text.] + ** Manual-eye-opening + *** # {takesValue, valueClass=textClass} [Free text.] + * Stimulation-modulator + ** Intermittent-photic-stimulation {requireChild} + *** # {takesValue, valueClass=numericClass, unitClass=frequencyUnits} + ** Auditory-stimulation + *** # {takesValue, valueClass=textClass} [Free text.] + ** Nociceptive-stimulation + *** # {takesValue, valueClass=textClass} [Free text.] + * Hyperventilation + ** # {takesValue, valueClass=textClass} [Free text.] + * Physical-effort + ** # {takesValue, valueClass=textClass} [Free text.] + * Cognitive-task + ** # {takesValue, valueClass=textClass} [Free text.] + * Other-modulator-or-procedure {requireChild} + ** # {takesValue, valueClass=textClass} [Free text.] -'''Background-activity''' {requireChild, inLibrary=score} [An EEG activity representing the setting in which a given normal or abnormal pattern appears and from which such pattern is distinguished.] -* Posterior-dominant-rhythm {suggestedTag=Finding-significance-to-recording, suggestedTag=Finding-frequency, suggestedTag=Posterior-dominant-rhythm-amplitude-range, suggestedTag=Finding-amplitude-asymmetry, suggestedTag=Posterior-dominant-rhythm-frequency-asymmetry, suggestedTag=Posterior-dominant-rhythm-eye-opening-reactivity, suggestedTag=Posterior-dominant-rhythm-organization, suggestedTag=Posterior-dominant-rhythm-caveat, suggestedTag=Absence-of-posterior-dominant-rhythm, inLibrary=score} [Rhythmic activity occurring during wakefulness over the posterior regions of the head, generally with maximum amplitudes over the occipital areas. Amplitude varies. Best seen with eyes closed and during physical relaxation and relative mental inactivity. Blocked or attenuated by attention, especially visual, and mental effort. In adults this is the alpha rhythm, and the frequency is 8 to 13 Hz. However the frequency can be higher or lower than this range (often a supra or sub harmonic of alpha frequency) and is called alpha variant rhythm (fast and slow alpha variant rhythm). In children, the normal range of the frequency of the posterior dominant rhythm is age-dependant.] -* Mu-rhythm {suggestedTag=Finding-frequency, suggestedTag=Finding-significance-to-recording, suggestedTag=Brain-laterality, suggestedTag=Brain-region, suggestedTag=Sensors, inLibrary=score} [EEG rhythm at 7-11 Hz composed of arch-shaped waves occurring over the central or centro-parietal regions of the scalp during wakefulness. Amplitudes varies but is mostly below 50 microV. Blocked or attenuated most clearly by contralateral movement, thought of movement, readiness to move or tactile stimulation.] -* Other-organized-rhythm {requireChild, suggestedTag=Delta-activity-morphology, suggestedTag=Theta-activity-morphology, suggestedTag=Alpha-activity-morphology, suggestedTag=Beta-activity-morphology, suggestedTag=Gamma-activity-morphology, suggestedTag=Finding-significance-to-recording, suggestedTag=Brain-laterality, suggestedTag=Brain-region, suggestedTag=Sensors, suggestedTag=Appearance-mode, suggestedTag=Discharge-pattern, inLibrary=score} [EEG activity that consisting of waves of approximately constant period, which is considered as part of the background (ongoing) activity, but does not fulfill the criteria of the posterior dominant rhythm.] -** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] -* Background-activity-special-feature {requireChild, inLibrary=score} [Special Features. Special features contains scoring options for the background activity of critically ill patients.] -** Continuous-background-activity {suggestedTag=Delta-activity-morphology, suggestedTag=Theta-activity-morphology, suggestedTag=Alpha-activity-morphology, suggestedTag=Beta-activity-morphology, suggestedTag=Gamma-activity-morphology, suggestedTag=Brain-laterality, suggestedTag=Brain-region, suggestedTag=Sensors, suggestedTag=Finding-extent, inLibrary=score} -** Nearly-continuous-background-activity {suggestedTag=Delta-activity-morphology, suggestedTag=Theta-activity-morphology, suggestedTag=Alpha-activity-morphology, suggestedTag=Beta-activity-morphology, suggestedTag=Gamma-activity-morphology, suggestedTag=Brain-laterality, suggestedTag=Brain-region, suggestedTag=Sensors, suggestedTag=Finding-extent, inLibrary=score} -** Discontinuous-background-activity {suggestedTag=Delta-activity-morphology, suggestedTag=Theta-activity-morphology, suggestedTag=Alpha-activity-morphology, suggestedTag=Beta-activity-morphology, suggestedTag=Gamma-activity-morphology, suggestedTag=Brain-laterality, suggestedTag=Brain-region, suggestedTag=Sensors, suggestedTag=Finding-extent, inLibrary=score} -** Background-burst-suppression {suggestedTag=Brain-laterality, suggestedTag=Brain-region, suggestedTag=Sensors, suggestedTag=Finding-extent, inLibrary=score} [EEG pattern consisting of bursts (activity appearing and disappearing abruptly) interrupted by periods of low amplitude (below 20 microV) and which occurs simultaneously over all head regions.] -** Background-burst-attenuation {suggestedTag=Brain-laterality, suggestedTag=Brain-region, suggestedTag=Sensors, suggestedTag=Finding-extent, inLibrary=score} -** Background-activity-suppression {suggestedTag=Brain-laterality, suggestedTag=Brain-region, suggestedTag=Sensors, suggestedTag=Finding-extent, suggestedTag=Appearance-mode, inLibrary=score} [Periods showing activity under 10 microV (referential montage) and interrupting the background (ongoing) activity.] -** Electrocerebral-inactivity {inLibrary=score} [Absence of any ongoing cortical electric activities; in all leads EEG is isoelectric or only contains artifacts. Sensitivity has to be increased up to 2 microV/mm; recording time: at least 30 minutes.] +'''Background-activity''' {requireChild} [An EEG activity representing the setting in which a given normal or abnormal pattern appears and from which such pattern is distinguished.] + * Posterior-dominant-rhythm {suggestedTag=Finding-significance-to-recording, suggestedTag=Finding-frequency, suggestedTag=Posterior-dominant-rhythm-amplitude-range, suggestedTag=Finding-amplitude-asymmetry, suggestedTag=Posterior-dominant-rhythm-frequency-asymmetry, suggestedTag=Posterior-dominant-rhythm-eye-opening-reactivity, suggestedTag=Posterior-dominant-rhythm-organization, suggestedTag=Posterior-dominant-rhythm-caveat, suggestedTag=Absence-of-posterior-dominant-rhythm} [Rhythmic activity occurring during wakefulness over the posterior regions of the head, generally with maximum amplitudes over the occipital areas. Amplitude varies. Best seen with eyes closed and during physical relaxation and relative mental inactivity. Blocked or attenuated by attention, especially visual, and mental effort. In adults this is the alpha rhythm, and the frequency is 8 to 13 Hz. However the frequency can be higher or lower than this range (often a supra or sub harmonic of alpha frequency) and is called alpha variant rhythm (fast and slow alpha variant rhythm). In children, the normal range of the frequency of the posterior dominant rhythm is age-dependant.] + * Mu-rhythm {suggestedTag=Finding-frequency, suggestedTag=Finding-significance-to-recording, suggestedTag=Brain-laterality, suggestedTag=Brain-region, suggestedTag=Sensors} [EEG rhythm at 7-11 Hz composed of arch-shaped waves occurring over the central or centro-parietal regions of the scalp during wakefulness. Amplitudes varies but is mostly below 50 microV. Blocked or attenuated most clearly by contralateral movement, thought of movement, readiness to move or tactile stimulation.] + * Other-organized-rhythm {requireChild, suggestedTag=Delta-activity-morphology, suggestedTag=Theta-activity-morphology, suggestedTag=Alpha-activity-morphology, suggestedTag=Beta-activity-morphology, suggestedTag=Gamma-activity-morphology, suggestedTag=Finding-significance-to-recording, suggestedTag=Brain-laterality, suggestedTag=Brain-region, suggestedTag=Sensors, suggestedTag=Appearance-mode, suggestedTag=Discharge-pattern} [EEG activity that consisting of waves of approximately constant period, which is considered as part of the background (ongoing) activity, but does not fulfill the criteria of the posterior dominant rhythm.] + ** # {takesValue, valueClass=textClass} [Free text.] + * Background-activity-special-feature {requireChild} [Special Features. Special features contains scoring options for the background activity of critically ill patients.] + ** Continuous-background-activity {suggestedTag=Delta-activity-morphology, suggestedTag=Theta-activity-morphology, suggestedTag=Alpha-activity-morphology, suggestedTag=Beta-activity-morphology, suggestedTag=Gamma-activity-morphology, suggestedTag=Brain-laterality, suggestedTag=Brain-region, suggestedTag=Sensors, suggestedTag=Finding-extent} + ** Nearly-continuous-background-activity {suggestedTag=Delta-activity-morphology, suggestedTag=Theta-activity-morphology, suggestedTag=Alpha-activity-morphology, suggestedTag=Beta-activity-morphology, suggestedTag=Gamma-activity-morphology, suggestedTag=Brain-laterality, suggestedTag=Brain-region, suggestedTag=Sensors, suggestedTag=Finding-extent} + ** Discontinuous-background-activity {suggestedTag=Delta-activity-morphology, suggestedTag=Theta-activity-morphology, suggestedTag=Alpha-activity-morphology, suggestedTag=Beta-activity-morphology, suggestedTag=Gamma-activity-morphology, suggestedTag=Brain-laterality, suggestedTag=Brain-region, suggestedTag=Sensors, suggestedTag=Finding-extent} + ** Background-burst-suppression {suggestedTag=Brain-laterality, suggestedTag=Brain-region, suggestedTag=Sensors, suggestedTag=Finding-extent} [EEG pattern consisting of bursts (activity appearing and disappearing abruptly) interrupted by periods of low amplitude (below 20 microV) and which occurs simultaneously over all head regions.] + ** Background-burst-attenuation {suggestedTag=Brain-laterality, suggestedTag=Brain-region, suggestedTag=Sensors, suggestedTag=Finding-extent} + ** Background-activity-suppression {suggestedTag=Brain-laterality, suggestedTag=Brain-region, suggestedTag=Sensors, suggestedTag=Finding-extent, suggestedTag=Appearance-mode} [Periods showing activity under 10 microV (referential montage) and interrupting the background (ongoing) activity.] + ** Electrocerebral-inactivity [Absence of any ongoing cortical electric activities; in all leads EEG is isoelectric or only contains artifacts. Sensitivity has to be increased up to 2 microV/mm; recording time: at least 30 minutes.] -'''Sleep-and-drowsiness''' {requireChild, inLibrary=score} [The features of the ongoing activity during sleep are scored here. If abnormal graphoelements appear, disappear or change their morphology during sleep, that is not scored here but at the entry corresponding to that graphooelement (as a modulator).] -* Sleep-architecture {suggestedTag=Property-not-possible-to-determine, inLibrary=score} [For longer recordings. Only to be scored if whole-night sleep is part of the recording. It is a global descriptor of the structure and pattern of sleep: estimation of the amount of time spent in REM and NREM sleep, sleep duration, NREM-REM cycle.] -** Normal-sleep-architecture {inLibrary=score} -** Abnormal-sleep-architecture {inLibrary=score} -* Sleep-stage-reached {requireChild, suggestedTag=Property-not-possible-to-determine, suggestedTag=Finding-significance-to-recording, inLibrary=score} [For normal sleep patterns the sleep stages reached during the recording can be specified] -** Sleep-stage-N1 {inLibrary=score} [Sleep stage 1.] -*** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] -** Sleep-stage-N2 {inLibrary=score} [Sleep stage 2.] -*** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] -** Sleep-stage-N3 {inLibrary=score} [Sleep stage 3.] -*** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] -** Sleep-stage-REM {inLibrary=score} [Rapid eye movement.] -*** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] -* Sleep-spindles {suggestedTag=Finding-significance-to-recording, suggestedTag=Brain-laterality, suggestedTag=Brain-region, suggestedTag=Sensors, suggestedTag=Finding-amplitude-asymmetry, inLibrary=score} [Burst at 11-15 Hz but mostly at 12-14 Hz generally diffuse but of higher voltage over the central regions of the head, occurring during sleep. Amplitude varies but is mostly below 50 microV in the adult.] -* Arousal-pattern {suggestedTag=Brain-laterality, suggestedTag=Brain-region, suggestedTag=Sensors, suggestedTag=Appearance-mode, suggestedTag=Discharge-pattern, inLibrary=score} [Arousal pattern in children. Prolonged, marked high voltage 4-6/s activity in all leads with some intermixed slower frequencies, in children.] -* Frontal-arousal-rhythm {suggestedTag=Appearance-mode, suggestedTag=Discharge-pattern, inLibrary=score} [Prolonged (up to 20s) rhythmical sharp or spiky activity over the frontal areas (maximum over the frontal midline) seen at arousal from sleep in children with minimal cerebral dysfunction.] -* Vertex-wave {suggestedTag=Finding-significance-to-recording, suggestedTag=Brain-laterality, suggestedTag=Brain-region, suggestedTag=Sensors, suggestedTag=Finding-amplitude-asymmetry, inLibrary=score} [Sharp potential, maximal at the vertex, negative relative to other areas, apparently occurring spontaneously during sleep or in response to a sensory stimulus during sleep or wakefulness. May be single or repetitive. Amplitude varies but rarely exceeds 250 microV. Abbreviation: V wave. Synonym: vertex sharp wave.] -* K-complex {suggestedTag=Finding-significance-to-recording, suggestedTag=Brain-laterality, suggestedTag=Brain-region, suggestedTag=Sensors, suggestedTag=Finding-amplitude-asymmetry, inLibrary=score} [A burst of somewhat variable appearance, consisting most commonly of a high voltage negative slow wave followed by a smaller positive slow wave frequently associated with a sleep spindle. Duration greater than 0.5 s. Amplitude is generally maximal in the frontal vertex. K complexes occur during nonREM sleep, apparently spontaneously, or in response to sudden sensory / auditory stimuli, and are not specific for any individual sensory modality.] -* Saw-tooth-waves {suggestedTag=Finding-significance-to-recording, suggestedTag=Brain-laterality, suggestedTag=Brain-region, suggestedTag=Sensors, suggestedTag=Finding-amplitude-asymmetry, inLibrary=score} [Vertex negative 2-5 Hz waves occuring in series during REM sleep] -* POSTS {suggestedTag=Finding-significance-to-recording, suggestedTag=Brain-laterality, suggestedTag=Brain-region, suggestedTag=Sensors, suggestedTag=Finding-amplitude-asymmetry, inLibrary=score} [Positive occipital sharp transients of sleep. Sharp transient maximal over the occipital regions, positive relative to other areas, apparently occurring spontaneously during sleep. May be single or repetitive. Amplitude varies but is generally bellow 50 microV.] -* Hypnagogic-hypersynchrony {suggestedTag=Finding-significance-to-recording, suggestedTag=Brain-laterality, suggestedTag=Brain-region, suggestedTag=Sensors, suggestedTag=Finding-amplitude-asymmetry, inLibrary=score} [Bursts of bilateral, synchronous delta or theta activity of large amplitude, occasionally with superimposed faster components, occurring during falling asleep or during awakening, in children.] -* Non-reactive-sleep {inLibrary=score} [EEG activity consisting of normal sleep graphoelements, but which cannot be interrupted by external stimuli/ the patient cannot be waken.] +'''Sleep-and-drowsiness''' {requireChild} [The features of the ongoing activity during sleep are scored here. If abnormal graphoelements appear, disappear or change their morphology during sleep, that is not scored here but at the entry corresponding to that graphooelement (as a modulator).] + * Sleep-architecture {suggestedTag=Property-not-possible-to-determine} [For longer recordings. Only to be scored if whole-night sleep is part of the recording. It is a global descriptor of the structure and pattern of sleep: estimation of the amount of time spent in REM and NREM sleep, sleep duration, NREM-REM cycle.] + ** Normal-sleep-architecture + ** Abnormal-sleep-architecture + * Sleep-stage-reached {requireChild, suggestedTag=Property-not-possible-to-determine, suggestedTag=Finding-significance-to-recording} [For normal sleep patterns the sleep stages reached during the recording can be specified] + ** Sleep-stage-N1 [Sleep stage 1.] + *** # {takesValue, valueClass=textClass} [Free text.] + ** Sleep-stage-N2 [Sleep stage 2.] + *** # {takesValue, valueClass=textClass} [Free text.] + ** Sleep-stage-N3 [Sleep stage 3.] + *** # {takesValue, valueClass=textClass} [Free text.] + ** Sleep-stage-REM [Rapid eye movement.] + *** # {takesValue, valueClass=textClass} [Free text.] + * Sleep-spindles {suggestedTag=Finding-significance-to-recording, suggestedTag=Brain-laterality, suggestedTag=Brain-region, suggestedTag=Sensors, suggestedTag=Finding-amplitude-asymmetry} [Burst at 11-15 Hz but mostly at 12-14 Hz generally diffuse but of higher voltage over the central regions of the head, occurring during sleep. Amplitude varies but is mostly below 50 microV in the adult.] + * Arousal-pattern {suggestedTag=Brain-laterality, suggestedTag=Brain-region, suggestedTag=Sensors, suggestedTag=Appearance-mode, suggestedTag=Discharge-pattern} [Arousal pattern in children. Prolonged, marked high voltage 4-6/s activity in all leads with some intermixed slower frequencies, in children.] + * Frontal-arousal-rhythm {suggestedTag=Appearance-mode, suggestedTag=Discharge-pattern} [Prolonged (up to 20s) rhythmical sharp or spiky activity over the frontal areas (maximum over the frontal midline) seen at arousal from sleep in children with minimal cerebral dysfunction.] + * Vertex-wave {suggestedTag=Finding-significance-to-recording, suggestedTag=Brain-laterality, suggestedTag=Brain-region, suggestedTag=Sensors, suggestedTag=Finding-amplitude-asymmetry} [Sharp potential, maximal at the vertex, negative relative to other areas, apparently occurring spontaneously during sleep or in response to a sensory stimulus during sleep or wakefulness. May be single or repetitive. Amplitude varies but rarely exceeds 250 microV. Abbreviation: V wave. Synonym: vertex sharp wave.] + * K-complex {suggestedTag=Finding-significance-to-recording, suggestedTag=Brain-laterality, suggestedTag=Brain-region, suggestedTag=Sensors, suggestedTag=Finding-amplitude-asymmetry} [A burst of somewhat variable appearance, consisting most commonly of a high voltage negative slow wave followed by a smaller positive slow wave frequently associated with a sleep spindle. Duration greater than 0.5 s. Amplitude is generally maximal in the frontal vertex. K complexes occur during nonREM sleep, apparently spontaneously, or in response to sudden sensory / auditory stimuli, and are not specific for any individual sensory modality.] + * Saw-tooth-waves {suggestedTag=Finding-significance-to-recording, suggestedTag=Brain-laterality, suggestedTag=Brain-region, suggestedTag=Sensors, suggestedTag=Finding-amplitude-asymmetry} [Vertex negative 2-5 Hz waves occuring in series during REM sleep] + * POSTS {suggestedTag=Finding-significance-to-recording, suggestedTag=Brain-laterality, suggestedTag=Brain-region, suggestedTag=Sensors, suggestedTag=Finding-amplitude-asymmetry} [Positive occipital sharp transients of sleep. Sharp transient maximal over the occipital regions, positive relative to other areas, apparently occurring spontaneously during sleep. May be single or repetitive. Amplitude varies but is generally bellow 50 microV.] + * Hypnagogic-hypersynchrony {suggestedTag=Finding-significance-to-recording, suggestedTag=Brain-laterality, suggestedTag=Brain-region, suggestedTag=Sensors, suggestedTag=Finding-amplitude-asymmetry} [Bursts of bilateral, synchronous delta or theta activity of large amplitude, occasionally with superimposed faster components, occurring during falling asleep or during awakening, in children.] + * Non-reactive-sleep [EEG activity consisting of normal sleep graphoelements, but which cannot be interrupted by external stimuli/ the patient cannot be waken.] -'''Interictal-finding''' {requireChild, inLibrary=score} [EEG pattern / transient that is distinguished form the background activity, considered abnormal, but is not recorded during ictal period (seizure) or postictal period; the presence of an interictal finding does not necessarily imply that the patient has epilepsy.] -* Epileptiform-interictal-activity {suggestedTag=Spike-morphology, suggestedTag=Spike-and-slow-wave-morphology, suggestedTag=Runs-of-rapid-spikes-morphology, suggestedTag=Polyspikes-morphology, suggestedTag=Polyspike-and-slow-wave-morphology, suggestedTag=Sharp-wave-morphology, suggestedTag=Sharp-and-slow-wave-morphology, suggestedTag=Slow-sharp-wave-morphology, suggestedTag=High-frequency-oscillation-morphology, suggestedTag=Hypsarrhythmia-classic-morphology, suggestedTag=Hypsarrhythmia-modified-morphology, suggestedTag=Brain-laterality, suggestedTag=Brain-region, suggestedTag=Sensors, suggestedTag=Finding-propagation, suggestedTag=Multifocal-finding, suggestedTag=Appearance-mode, suggestedTag=Discharge-pattern, suggestedTag=Finding-incidence, inLibrary=score} -* Abnormal-interictal-rhythmic-activity {suggestedTag=Delta-activity-morphology, suggestedTag=Theta-activity-morphology, suggestedTag=Alpha-activity-morphology, suggestedTag=Beta-activity-morphology, suggestedTag=Gamma-activity-morphology, suggestedTag=Polymorphic-delta-activity-morphology, suggestedTag=Frontal-intermittent-rhythmic-delta-activity-morphology, suggestedTag=Occipital-intermittent-rhythmic-delta-activity-morphology, suggestedTag=Temporal-intermittent-rhythmic-delta-activity-morphology, suggestedTag=Brain-laterality, suggestedTag=Brain-region, suggestedTag=Sensors, suggestedTag=Appearance-mode, suggestedTag=Discharge-pattern, suggestedTag=Finding-incidence, inLibrary=score} -* Interictal-special-patterns {requireChild, inLibrary=score} -** Interictal-periodic-discharges {suggestedTag=Periodic-discharges-superimposed-activity, suggestedTag=Periodic-discharge-sharpness, suggestedTag=Number-of-periodic-discharge-phases, suggestedTag=Periodic-discharge-triphasic-morphology, suggestedTag=Periodic-discharge-absolute-amplitude, suggestedTag=Periodic-discharge-relative-amplitude, suggestedTag=Periodic-discharge-polarity, suggestedTag=Brain-laterality, suggestedTag=Brain-region, suggestedTag=Sensors, suggestedTag=Periodic-discharge-duration, suggestedTag=Periodic-discharge-onset, suggestedTag=Periodic-discharge-dynamics, inLibrary=score} [Periodic discharge not further specified (PDs).] -*** Generalized-periodic-discharges {inLibrary=score} [GPDs.] -*** Lateralized-periodic-discharges {inLibrary=score} [LPDs.] -*** Bilateral-independent-periodic-discharges {inLibrary=score} [BIPDs.] -*** Multifocal-periodic-discharges {inLibrary=score} [MfPDs.] -** Extreme-delta-brush {suggestedTag=Brain-laterality, suggestedTag=Brain-region, suggestedTag=Sensors, suggestedTag=Appearance-mode, suggestedTag=Discharge-pattern, inLibrary=score} +'''Interictal-finding''' {requireChild} [EEG pattern / transient that is distinguished form the background activity, considered abnormal, but is not recorded during ictal period (seizure) or postictal period; the presence of an interictal finding does not necessarily imply that the patient has epilepsy.] + * Epileptiform-interictal-activity {suggestedTag=Spike-morphology, suggestedTag=Spike-and-slow-wave-morphology, suggestedTag=Runs-of-rapid-spikes-morphology, suggestedTag=Polyspikes-morphology, suggestedTag=Polyspike-and-slow-wave-morphology, suggestedTag=Sharp-wave-morphology, suggestedTag=Sharp-and-slow-wave-morphology, suggestedTag=Slow-sharp-wave-morphology, suggestedTag=High-frequency-oscillation-morphology, suggestedTag=Hypsarrhythmia-classic-morphology, suggestedTag=Hypsarrhythmia-modified-morphology, suggestedTag=Brain-laterality, suggestedTag=Brain-region, suggestedTag=Sensors, suggestedTag=Finding-propagation, suggestedTag=Multifocal-finding, suggestedTag=Appearance-mode, suggestedTag=Discharge-pattern, suggestedTag=Finding-incidence} + * Abnormal-interictal-rhythmic-activity {suggestedTag=Delta-activity-morphology, suggestedTag=Theta-activity-morphology, suggestedTag=Alpha-activity-morphology, suggestedTag=Beta-activity-morphology, suggestedTag=Gamma-activity-morphology, suggestedTag=Polymorphic-delta-activity-morphology, suggestedTag=Frontal-intermittent-rhythmic-delta-activity-morphology, suggestedTag=Occipital-intermittent-rhythmic-delta-activity-morphology, suggestedTag=Temporal-intermittent-rhythmic-delta-activity-morphology, suggestedTag=Brain-laterality, suggestedTag=Brain-region, suggestedTag=Sensors, suggestedTag=Appearance-mode, suggestedTag=Discharge-pattern, suggestedTag=Finding-incidence} + * Interictal-special-patterns {requireChild} + ** Interictal-periodic-discharges {suggestedTag=Periodic-discharges-superimposed-activity, suggestedTag=Periodic-discharge-sharpness, suggestedTag=Number-of-periodic-discharge-phases, suggestedTag=Periodic-discharge-triphasic-morphology, suggestedTag=Periodic-discharge-absolute-amplitude, suggestedTag=Periodic-discharge-relative-amplitude, suggestedTag=Periodic-discharge-polarity, suggestedTag=Brain-laterality, suggestedTag=Brain-region, suggestedTag=Sensors, suggestedTag=Periodic-discharge-duration, suggestedTag=Periodic-discharge-onset, suggestedTag=Periodic-discharge-dynamics} [Periodic discharge not further specified (PDs).] + *** Generalized-periodic-discharges [GPDs.] + *** Lateralized-periodic-discharges [LPDs.] + *** Bilateral-independent-periodic-discharges [BIPDs.] + *** Multifocal-periodic-discharges [MfPDs.] + ** Extreme-delta-brush {suggestedTag=Brain-laterality, suggestedTag=Brain-region, suggestedTag=Sensors, suggestedTag=Appearance-mode, suggestedTag=Discharge-pattern} -'''Critically-ill-patients-patterns''' {requireChild, inLibrary=score} [Rhythmic or periodic patterns in critically ill patients (RPPs) are scored according to the 2012 version of the American Clinical Neurophysiology Society Standardized Critical Care EEG Terminology (Hirsch et al., 2013).] -* Critically-ill-patients-periodic-discharges {suggestedTag=Periodic-discharges-superimposed-activity, suggestedTag=Periodic-discharge-sharpness, suggestedTag=Number-of-periodic-discharge-phases, suggestedTag=Periodic-discharge-triphasic-morphology, suggestedTag=Periodic-discharge-absolute-amplitude, suggestedTag=Periodic-discharge-relative-amplitude, suggestedTag=Periodic-discharge-polarity, suggestedTag=Brain-laterality, suggestedTag=Brain-region, suggestedTag=Sensors, suggestedTag=Finding-frequency, suggestedTag=Periodic-discharge-duration, suggestedTag=Periodic-discharge-onset, suggestedTag=Periodic-discharge-dynamics, inLibrary=score} [Periodic discharges (PDs).] -* Rhythmic-delta-activity {suggestedTag=Periodic-discharges-superimposed-activity, suggestedTag=Periodic-discharge-absolute-amplitude, suggestedTag=Brain-laterality, suggestedTag=Brain-region, suggestedTag=Sensors, suggestedTag=Finding-frequency, suggestedTag=Periodic-discharge-duration, suggestedTag=Periodic-discharge-onset, suggestedTag=Periodic-discharge-dynamics, inLibrary=score} [RDA] -* Spike-or-sharp-and-wave {suggestedTag=Periodic-discharge-sharpness, suggestedTag=Number-of-periodic-discharge-phases, suggestedTag=Periodic-discharge-triphasic-morphology, suggestedTag=Periodic-discharge-absolute-amplitude, suggestedTag=Periodic-discharge-relative-amplitude, suggestedTag=Periodic-discharge-polarity, suggestedTag=Brain-laterality, suggestedTag=Brain-region, suggestedTag=Sensors, suggestedTag=Multifocal-finding, suggestedTag=Finding-frequency, suggestedTag=Periodic-discharge-duration, suggestedTag=Periodic-discharge-onset, suggestedTag=Periodic-discharge-dynamics, inLibrary=score} [SW] +'''Critically-ill-patients-patterns''' {requireChild} [Rhythmic or periodic patterns in critically ill patients (RPPs) are scored according to the 2012 version of the American Clinical Neurophysiology Society Standardized Critical Care EEG Terminology (Hirsch et al., 2013).] + * Critically-ill-patients-periodic-discharges {suggestedTag=Periodic-discharges-superimposed-activity, suggestedTag=Periodic-discharge-sharpness, suggestedTag=Number-of-periodic-discharge-phases, suggestedTag=Periodic-discharge-triphasic-morphology, suggestedTag=Periodic-discharge-absolute-amplitude, suggestedTag=Periodic-discharge-relative-amplitude, suggestedTag=Periodic-discharge-polarity, suggestedTag=Brain-laterality, suggestedTag=Brain-region, suggestedTag=Sensors, suggestedTag=Finding-frequency, suggestedTag=Periodic-discharge-duration, suggestedTag=Periodic-discharge-onset, suggestedTag=Periodic-discharge-dynamics} [Periodic discharges (PDs).] + * Rhythmic-delta-activity {suggestedTag=Periodic-discharges-superimposed-activity, suggestedTag=Periodic-discharge-absolute-amplitude, suggestedTag=Brain-laterality, suggestedTag=Brain-region, suggestedTag=Sensors, suggestedTag=Finding-frequency, suggestedTag=Periodic-discharge-duration, suggestedTag=Periodic-discharge-onset, suggestedTag=Periodic-discharge-dynamics} [RDA] + * Spike-or-sharp-and-wave {suggestedTag=Periodic-discharge-sharpness, suggestedTag=Number-of-periodic-discharge-phases, suggestedTag=Periodic-discharge-triphasic-morphology, suggestedTag=Periodic-discharge-absolute-amplitude, suggestedTag=Periodic-discharge-relative-amplitude, suggestedTag=Periodic-discharge-polarity, suggestedTag=Brain-laterality, suggestedTag=Brain-region, suggestedTag=Sensors, suggestedTag=Multifocal-finding, suggestedTag=Finding-frequency, suggestedTag=Periodic-discharge-duration, suggestedTag=Periodic-discharge-onset, suggestedTag=Periodic-discharge-dynamics} [SW] -'''Episode''' {requireChild, inLibrary=score} [Clinical episode or electrographic seizure.] -* Epileptic-seizure {requireChild, inLibrary=score} -** Focal-onset-epileptic-seizure {suggestedTag=Episode-phase, suggestedTag=Seizure-dynamics, suggestedTag=Episode-consciousness, suggestedTag=Episode-awareness, suggestedTag=Clinical-EEG-temporal-relationship, suggestedTag=Episode-event-count, suggestedTag=State-episode-start, suggestedTag=Episode-postictal-phase, suggestedTag=Episode-prodrome, suggestedTag=Episode-tongue-biting, inLibrary=score} -*** Aware-focal-onset-epileptic-seizure {suggestedTag=Episode-phase, suggestedTag=Seizure-classification, suggestedTag=Seizure-dynamics, suggestedTag=Episode-consciousness, suggestedTag=Episode-awareness, suggestedTag=Clinical-EEG-temporal-relationship, suggestedTag=Episode-event-count, suggestedTag=State-episode-start, suggestedTag=Episode-postictal-phase, suggestedTag=Episode-prodrome, suggestedTag=Episode-tongue-biting, inLibrary=score} -*** Impaired-awareness-focal-onset-epileptic-seizure {suggestedTag=Episode-phase, suggestedTag=Seizure-classification, suggestedTag=Seizure-dynamics, suggestedTag=Episode-consciousness, suggestedTag=Episode-awareness, suggestedTag=Clinical-EEG-temporal-relationship, suggestedTag=Episode-event-count, suggestedTag=State-episode-start, suggestedTag=Episode-postictal-phase, suggestedTag=Episode-prodrome, suggestedTag=Episode-tongue-biting, inLibrary=score} -*** Awareness-unknown-focal-onset-epileptic-seizure {suggestedTag=Episode-phase, suggestedTag=Seizure-classification, suggestedTag=Seizure-dynamics, suggestedTag=Episode-consciousness, suggestedTag=Episode-awareness, suggestedTag=Clinical-EEG-temporal-relationship, suggestedTag=Episode-event-count, suggestedTag=State-episode-start, suggestedTag=Episode-postictal-phase, suggestedTag=Episode-prodrome, suggestedTag=Episode-tongue-biting, inLibrary=score} -*** Focal-to-bilateral-tonic-clonic-focal-onset-epileptic-seizure {suggestedTag=Episode-phase, suggestedTag=Seizure-dynamics, suggestedTag=Episode-consciousness, suggestedTag=Episode-awareness, suggestedTag=Clinical-EEG-temporal-relationship, suggestedTag=Episode-event-count, suggestedTag=State-episode-start, suggestedTag=Episode-postictal-phase, suggestedTag=Episode-prodrome, suggestedTag=Episode-tongue-biting, inLibrary=score} -** Generalized-onset-epileptic-seizure {suggestedTag=Episode-phase, suggestedTag=Seizure-classification, suggestedTag=Seizure-dynamics, suggestedTag=Episode-consciousness, suggestedTag=Episode-awareness, suggestedTag=Clinical-EEG-temporal-relationship, suggestedTag=Episode-event-count, suggestedTag=State-episode-start, suggestedTag=Episode-postictal-phase, suggestedTag=Episode-prodrome, suggestedTag=Episode-tongue-biting, inLibrary=score} -** Unknown-onset-epileptic-seizure {suggestedTag=Episode-phase, suggestedTag=Seizure-classification, suggestedTag=Seizure-dynamics, suggestedTag=Episode-consciousness, suggestedTag=Episode-awareness, suggestedTag=Clinical-EEG-temporal-relationship, suggestedTag=Episode-event-count, suggestedTag=State-episode-start, suggestedTag=Episode-postictal-phase, suggestedTag=Episode-prodrome, suggestedTag=Episode-tongue-biting, inLibrary=score} -** Unclassified-epileptic-seizure {suggestedTag=Episode-phase, suggestedTag=Seizure-dynamics, suggestedTag=Episode-consciousness, suggestedTag=Episode-awareness, suggestedTag=Clinical-EEG-temporal-relationship, suggestedTag=Episode-event-count, suggestedTag=State-episode-start, suggestedTag=Episode-postictal-phase, suggestedTag=Episode-prodrome, suggestedTag=Episode-tongue-biting, inLibrary=score} -* Subtle-seizure {suggestedTag=Episode-phase, suggestedTag=Episode-consciousness, suggestedTag=Episode-awareness, suggestedTag=Clinical-EEG-temporal-relationship, suggestedTag=Episode-event-count, suggestedTag=State-episode-start, suggestedTag=Episode-postictal-phase, suggestedTag=Episode-prodrome, suggestedTag=Episode-tongue-biting, inLibrary=score} [Seizure type frequent in neonates, sometimes referred to as motor automatisms; they may include random and roving eye movements, sucking, chewing motions, tongue protrusion, rowing or swimming or boxing movements of the arms, pedaling and bicycling movements of the lower limbs; apneic seizures are relatively common. Although some subtle seizures are associated with rhythmic ictal EEG discharges, and are clearly epileptic, ictal EEG often does not show typical epileptic activity.] -* Electrographic-seizure {suggestedTag=Episode-phase, suggestedTag=Episode-consciousness, suggestedTag=Episode-awareness, suggestedTag=Clinical-EEG-temporal-relationship, suggestedTag=Episode-event-count, suggestedTag=State-episode-start, suggestedTag=Episode-postictal-phase, suggestedTag=Episode-prodrome, suggestedTag=Episode-tongue-biting, inLibrary=score} [Referred usually to non convulsive status. Ictal EEG: rhythmic discharge or spike and wave pattern with definite evolution in frequency, location, or morphology lasting at least 10 s; evolution in amplitude alone did not qualify.] -* Seizure-PNES {suggestedTag=Episode-phase, suggestedTag=Finding-significance-to-recording, suggestedTag=Episode-consciousness, suggestedTag=Episode-awareness, suggestedTag=Clinical-EEG-temporal-relationship, suggestedTag=Episode-event-count, suggestedTag=State-episode-start, suggestedTag=Episode-postictal-phase, suggestedTag=Episode-prodrome, suggestedTag=Episode-tongue-biting, inLibrary=score} [Psychogenic non-epileptic seizure.] -* Sleep-related-episode {requireChild, inLibrary=score} -** Sleep-related-arousal {suggestedTag=Episode-phase, suggestedTag=Finding-significance-to-recording, suggestedTag=Episode-consciousness, suggestedTag=Episode-awareness, suggestedTag=Clinical-EEG-temporal-relationship, suggestedTag=Episode-event-count, suggestedTag=State-episode-start, suggestedTag=Episode-postictal-phase, suggestedTag=Episode-prodrome, suggestedTag=Episode-tongue-biting, inLibrary=score} [Normal.] -** Benign-sleep-myoclonus {suggestedTag=Episode-phase, suggestedTag=Finding-significance-to-recording, suggestedTag=Episode-consciousness, suggestedTag=Episode-awareness, suggestedTag=Clinical-EEG-temporal-relationship, suggestedTag=Episode-event-count, suggestedTag=State-episode-start, suggestedTag=Episode-postictal-phase, suggestedTag=Episode-prodrome, suggestedTag=Episode-tongue-biting, inLibrary=score} [A distinctive disorder of sleep characterized by a) neonatal onset, b) rhythmic myoclonic jerks only during sleep and c) abrupt and consistent cessation with arousal, d) absence of concomitant electrographic changes suggestive of seizures, and e) good outcome.] -** Confusional-awakening {suggestedTag=Episode-phase, suggestedTag=Finding-significance-to-recording, suggestedTag=Episode-consciousness, suggestedTag=Episode-awareness, suggestedTag=Clinical-EEG-temporal-relationship, suggestedTag=Episode-event-count, suggestedTag=State-episode-start, suggestedTag=Episode-postictal-phase, suggestedTag=Episode-prodrome, suggestedTag=Episode-tongue-biting, inLibrary=score} [Episode of non epileptic nature included in NREM parasomnias, characterized by sudden arousal and complex behavior but without full alertness, usually lasting a few minutes and occurring almost in all children at least occasionally. Amnesia of the episode is the rule.] -** Sleep-periodic-limb-movement {suggestedTag=Episode-phase, suggestedTag=Finding-significance-to-recording, suggestedTag=Episode-consciousness, suggestedTag=Episode-awareness, suggestedTag=Clinical-EEG-temporal-relationship, suggestedTag=Episode-event-count, suggestedTag=State-episode-start, suggestedTag=Episode-postictal-phase, suggestedTag=Episode-prodrome, suggestedTag=Episode-tongue-biting, inLibrary=score} [PLMS. Periodic limb movement in sleep. Episodes are characterized by brief (0.5- to 5.0-second) lower-extremity movements during sleep, which typically occur at 20- to 40-second intervals, most commonly during the first 3 hours of sleep. The affected individual is usually not aware of the movements or of the transient partial arousals.] -** REM-sleep-behavioral-disorder {suggestedTag=Episode-phase, suggestedTag=Finding-significance-to-recording, suggestedTag=Episode-consciousness, suggestedTag=Episode-awareness, suggestedTag=Clinical-EEG-temporal-relationship, suggestedTag=Episode-event-count, suggestedTag=State-episode-start, suggestedTag=Episode-postictal-phase, suggestedTag=Episode-prodrome, suggestedTag=Episode-tongue-biting, inLibrary=score} [REM sleep behavioral disorder. Episodes characterized by: a) presence of REM sleep without atonia (RSWA) on polysomnography (PSG); b) presence of at least 1 of the following conditions - (1) Sleep-related behaviors, by history, that have been injurious, potentially injurious, or disruptive (example: dream enactment behavior); (2) abnormal REM sleep behavior documented during PSG monitoring; (3) absence of epileptiform activity on electroencephalogram (EEG) during REM sleep (unless RBD can be clearly distinguished from any concurrent REM sleep-related seizure disorder); (4) sleep disorder not better explained by another sleep disorder, a medical or neurologic disorder, a mental disorder, medication use, or a substance use disorder.] -** Sleep-walking {suggestedTag=Episode-phase, suggestedTag=Finding-significance-to-recording, suggestedTag=Episode-consciousness, suggestedTag=Episode-awareness, suggestedTag=Clinical-EEG-temporal-relationship, suggestedTag=Episode-event-count, suggestedTag=State-episode-start, suggestedTag=Episode-postictal-phase, suggestedTag=Episode-prodrome, suggestedTag=Episode-tongue-biting, inLibrary=score} [Episodes characterized by ambulation during sleep; the patient is difficult to arouse during an episode, and is usually amnesic following the episode. Episodes usually occur in the first third of the night during slow wave sleep. Polysomnographic recordings demonstrate 2 abnormalities during the first sleep cycle: frequent, brief, non-behavioral EEG-defined arousals prior to the somnambulistic episode and abnormally low gamma (0.75-2.0 Hz) EEG power on spectral analysis, correlating with high-voltage (hyper-synchronic gamma) waves lasting 10 to 15 s occurring just prior to the movement. This is followed by stage I NREM sleep, and there is no evidence of complete awakening.] -* Pediatric-episode {requireChild, inLibrary=score} -** Hyperekplexia {suggestedTag=Episode-phase, suggestedTag=Finding-significance-to-recording, suggestedTag=Episode-consciousness, suggestedTag=Episode-awareness, suggestedTag=Clinical-EEG-temporal-relationship, suggestedTag=Episode-event-count, suggestedTag=State-episode-start, suggestedTag=Episode-postictal-phase, suggestedTag=Episode-prodrome, suggestedTag=Episode-tongue-biting, inLibrary=score} [Disorder characterized by exaggerated startle response and hypertonicity that may occur during the first year of life and in severe cases during the neonatal period. Children usually present with marked irritability and recurrent startles in response to handling and sounds. Severely affected infants can have severe jerks and stiffening, sometimes with breath-holding spells.] -** Jactatio-capitis-nocturna {suggestedTag=Episode-phase, suggestedTag=Finding-significance-to-recording, suggestedTag=Episode-consciousness, suggestedTag=Episode-awareness, suggestedTag=Clinical-EEG-temporal-relationship, suggestedTag=Episode-event-count, suggestedTag=State-episode-start, suggestedTag=Episode-postictal-phase, suggestedTag=Episode-prodrome, suggestedTag=Episode-tongue-biting, inLibrary=score} [Relatively common in normal children at the time of going to bed, especially during the first year of life, the rhythmic head movements persist during sleep. Usually, these phenomena disappear before 3 years of age.] -** Pavor-nocturnus {suggestedTag=Episode-phase, suggestedTag=Finding-significance-to-recording, suggestedTag=Episode-consciousness, suggestedTag=Episode-awareness, suggestedTag=Clinical-EEG-temporal-relationship, suggestedTag=Episode-event-count, suggestedTag=State-episode-start, suggestedTag=Episode-postictal-phase, suggestedTag=Episode-prodrome, suggestedTag=Episode-tongue-biting, inLibrary=score} [A nocturnal episode characterized by age of onset of less than five years (mean age 18 months, with peak prevalence at five to seven years), appearance of signs of panic two hours after falling asleep with crying, screams, a fearful expression, inability to recognize other people including parents (for a duration of 5-15 minutes), amnesia upon awakening. Pavor nocturnus occurs in patients almost every night for months or years (but the frequency is highly variable and may be as low as once a month) and is likely to disappear spontaneously at the age of six to eight years.] -** Pediatric-stereotypical-behavior-episode {suggestedTag=Episode-phase, suggestedTag=Finding-significance-to-recording, suggestedTag=Episode-consciousness, suggestedTag=Episode-awareness, suggestedTag=Clinical-EEG-temporal-relationship, suggestedTag=Episode-event-count, suggestedTag=State-episode-start, suggestedTag=Episode-postictal-phase, suggestedTag=Episode-prodrome, suggestedTag=Episode-tongue-biting, inLibrary=score} [Repetitive motor behavior in children, typically rhythmic and persistent; usually not paroxysmal and rarely suggest epilepsy. They include headbanging, head-rolling, jactatio capitis nocturna, body rocking, buccal or lingual movements, hand flapping and related mannerisms, repetitive hand-waving (to self-induce photosensitive seizures).] -* Paroxysmal-motor-event {suggestedTag=Episode-phase, suggestedTag=Finding-significance-to-recording, suggestedTag=Episode-consciousness, suggestedTag=Episode-awareness, suggestedTag=Clinical-EEG-temporal-relationship, suggestedTag=Episode-event-count, suggestedTag=State-episode-start, suggestedTag=Episode-postictal-phase, suggestedTag=Episode-prodrome, suggestedTag=Episode-tongue-biting, inLibrary=score} [Paroxysmal phenomena during neonatal or childhood periods characterized by recurrent motor or behavioral signs or symptoms that must be distinguishes from epileptic disorders.] -* Syncope {suggestedTag=Episode-phase, suggestedTag=Finding-significance-to-recording, suggestedTag=Episode-consciousness, suggestedTag=Episode-awareness, suggestedTag=Clinical-EEG-temporal-relationship, suggestedTag=Episode-event-count, suggestedTag=State-episode-start, suggestedTag=Episode-postictal-phase, suggestedTag=Episode-prodrome, suggestedTag=Episode-tongue-biting, inLibrary=score} [Episode with loss of consciousness and muscle tone that is abrupt in onset, of short duration and followed by rapid recovery; it occurs in response to transient impairment of cerebral perfusion. Typical prodromal symptoms often herald onset of syncope and postictal symptoms are minimal. Syncopal convulsions resulting from cerebral anoxia are common but are not a form of epilepsy, nor are there any accompanying EEG ictal discharges.] -* Cataplexy {suggestedTag=Episode-phase, suggestedTag=Finding-significance-to-recording, suggestedTag=Episode-consciousness, suggestedTag=Episode-awareness, suggestedTag=Clinical-EEG-temporal-relationship, suggestedTag=Episode-event-count, suggestedTag=State-episode-start, suggestedTag=Episode-postictal-phase, suggestedTag=Episode-prodrome, suggestedTag=Episode-tongue-biting, inLibrary=score} [A sudden decrement in muscle tone and loss of deep tendon reflexes, leading to muscle weakness, paralysis, or postural collapse. Cataplexy usually is precipitated by an outburst of emotional expression-notably laughter, anger, or startle. It is one of the tetrad of symptoms of narcolepsy. During cataplexy, respiration and voluntary eye movements are not compromised. Consciousness is preserved.] -* Other-episode {requireChild, inLibrary=score} -** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] +'''Episode''' {requireChild} [Clinical episode or electrographic seizure.] + * Epileptic-seizure {requireChild} + ** Focal-onset-epileptic-seizure {suggestedTag=Episode-phase, suggestedTag=Seizure-dynamics, suggestedTag=Episode-consciousness, suggestedTag=Episode-awareness, suggestedTag=Clinical-EEG-temporal-relationship, suggestedTag=Episode-event-count, suggestedTag=State-episode-start, suggestedTag=Episode-postictal-phase, suggestedTag=Episode-prodrome, suggestedTag=Episode-tongue-biting} + *** Aware-focal-onset-epileptic-seizure {suggestedTag=Episode-phase, suggestedTag=Seizure-classification, suggestedTag=Seizure-dynamics, suggestedTag=Episode-consciousness, suggestedTag=Episode-awareness, suggestedTag=Clinical-EEG-temporal-relationship, suggestedTag=Episode-event-count, suggestedTag=State-episode-start, suggestedTag=Episode-postictal-phase, suggestedTag=Episode-prodrome, suggestedTag=Episode-tongue-biting} + *** Impaired-awareness-focal-onset-epileptic-seizure {suggestedTag=Episode-phase, suggestedTag=Seizure-classification, suggestedTag=Seizure-dynamics, suggestedTag=Episode-consciousness, suggestedTag=Episode-awareness, suggestedTag=Clinical-EEG-temporal-relationship, suggestedTag=Episode-event-count, suggestedTag=State-episode-start, suggestedTag=Episode-postictal-phase, suggestedTag=Episode-prodrome, suggestedTag=Episode-tongue-biting} + *** Awareness-unknown-focal-onset-epileptic-seizure {suggestedTag=Episode-phase, suggestedTag=Seizure-classification, suggestedTag=Seizure-dynamics, suggestedTag=Episode-consciousness, suggestedTag=Episode-awareness, suggestedTag=Clinical-EEG-temporal-relationship, suggestedTag=Episode-event-count, suggestedTag=State-episode-start, suggestedTag=Episode-postictal-phase, suggestedTag=Episode-prodrome, suggestedTag=Episode-tongue-biting} + *** Focal-to-bilateral-tonic-clonic-focal-onset-epileptic-seizure {suggestedTag=Episode-phase, suggestedTag=Seizure-dynamics, suggestedTag=Episode-consciousness, suggestedTag=Episode-awareness, suggestedTag=Clinical-EEG-temporal-relationship, suggestedTag=Episode-event-count, suggestedTag=State-episode-start, suggestedTag=Episode-postictal-phase, suggestedTag=Episode-prodrome, suggestedTag=Episode-tongue-biting} + ** Generalized-onset-epileptic-seizure {suggestedTag=Episode-phase, suggestedTag=Seizure-classification, suggestedTag=Seizure-dynamics, suggestedTag=Episode-consciousness, suggestedTag=Episode-awareness, suggestedTag=Clinical-EEG-temporal-relationship, suggestedTag=Episode-event-count, suggestedTag=State-episode-start, suggestedTag=Episode-postictal-phase, suggestedTag=Episode-prodrome, suggestedTag=Episode-tongue-biting} + ** Unknown-onset-epileptic-seizure {suggestedTag=Episode-phase, suggestedTag=Seizure-classification, suggestedTag=Seizure-dynamics, suggestedTag=Episode-consciousness, suggestedTag=Episode-awareness, suggestedTag=Clinical-EEG-temporal-relationship, suggestedTag=Episode-event-count, suggestedTag=State-episode-start, suggestedTag=Episode-postictal-phase, suggestedTag=Episode-prodrome, suggestedTag=Episode-tongue-biting} + ** Unclassified-epileptic-seizure {suggestedTag=Episode-phase, suggestedTag=Seizure-dynamics, suggestedTag=Episode-consciousness, suggestedTag=Episode-awareness, suggestedTag=Clinical-EEG-temporal-relationship, suggestedTag=Episode-event-count, suggestedTag=State-episode-start, suggestedTag=Episode-postictal-phase, suggestedTag=Episode-prodrome, suggestedTag=Episode-tongue-biting} + * Subtle-seizure {suggestedTag=Episode-phase, suggestedTag=Episode-consciousness, suggestedTag=Episode-awareness, suggestedTag=Clinical-EEG-temporal-relationship, suggestedTag=Episode-event-count, suggestedTag=State-episode-start, suggestedTag=Episode-postictal-phase, suggestedTag=Episode-prodrome, suggestedTag=Episode-tongue-biting} [Seizure type frequent in neonates, sometimes referred to as motor automatisms; they may include random and roving eye movements, sucking, chewing motions, tongue protrusion, rowing or swimming or boxing movements of the arms, pedaling and bicycling movements of the lower limbs; apneic seizures are relatively common. Although some subtle seizures are associated with rhythmic ictal EEG discharges, and are clearly epileptic, ictal EEG often does not show typical epileptic activity.] + * Electrographic-seizure {suggestedTag=Episode-phase, suggestedTag=Episode-consciousness, suggestedTag=Episode-awareness, suggestedTag=Clinical-EEG-temporal-relationship, suggestedTag=Episode-event-count, suggestedTag=State-episode-start, suggestedTag=Episode-postictal-phase, suggestedTag=Episode-prodrome, suggestedTag=Episode-tongue-biting} [Referred usually to non convulsive status. Ictal EEG: rhythmic discharge or spike and wave pattern with definite evolution in frequency, location, or morphology lasting at least 10 s; evolution in amplitude alone did not qualify.] + * Seizure-PNES {suggestedTag=Episode-phase, suggestedTag=Finding-significance-to-recording, suggestedTag=Episode-consciousness, suggestedTag=Episode-awareness, suggestedTag=Clinical-EEG-temporal-relationship, suggestedTag=Episode-event-count, suggestedTag=State-episode-start, suggestedTag=Episode-postictal-phase, suggestedTag=Episode-prodrome, suggestedTag=Episode-tongue-biting} [Psychogenic non-epileptic seizure.] + * Sleep-related-episode {requireChild} + ** Sleep-related-arousal {suggestedTag=Episode-phase, suggestedTag=Finding-significance-to-recording, suggestedTag=Episode-consciousness, suggestedTag=Episode-awareness, suggestedTag=Clinical-EEG-temporal-relationship, suggestedTag=Episode-event-count, suggestedTag=State-episode-start, suggestedTag=Episode-postictal-phase, suggestedTag=Episode-prodrome, suggestedTag=Episode-tongue-biting} [Normal.] + ** Benign-sleep-myoclonus {suggestedTag=Episode-phase, suggestedTag=Finding-significance-to-recording, suggestedTag=Episode-consciousness, suggestedTag=Episode-awareness, suggestedTag=Clinical-EEG-temporal-relationship, suggestedTag=Episode-event-count, suggestedTag=State-episode-start, suggestedTag=Episode-postictal-phase, suggestedTag=Episode-prodrome, suggestedTag=Episode-tongue-biting} [A distinctive disorder of sleep characterized by a) neonatal onset, b) rhythmic myoclonic jerks only during sleep and c) abrupt and consistent cessation with arousal, d) absence of concomitant electrographic changes suggestive of seizures, and e) good outcome.] + ** Confusional-awakening {suggestedTag=Episode-phase, suggestedTag=Finding-significance-to-recording, suggestedTag=Episode-consciousness, suggestedTag=Episode-awareness, suggestedTag=Clinical-EEG-temporal-relationship, suggestedTag=Episode-event-count, suggestedTag=State-episode-start, suggestedTag=Episode-postictal-phase, suggestedTag=Episode-prodrome, suggestedTag=Episode-tongue-biting} [Episode of non epileptic nature included in NREM parasomnias, characterized by sudden arousal and complex behavior but without full alertness, usually lasting a few minutes and occurring almost in all children at least occasionally. Amnesia of the episode is the rule.] + ** Sleep-periodic-limb-movement {suggestedTag=Episode-phase, suggestedTag=Finding-significance-to-recording, suggestedTag=Episode-consciousness, suggestedTag=Episode-awareness, suggestedTag=Clinical-EEG-temporal-relationship, suggestedTag=Episode-event-count, suggestedTag=State-episode-start, suggestedTag=Episode-postictal-phase, suggestedTag=Episode-prodrome, suggestedTag=Episode-tongue-biting} [PLMS. Periodic limb movement in sleep. Episodes are characterized by brief (0.5- to 5.0-second) lower-extremity movements during sleep, which typically occur at 20- to 40-second intervals, most commonly during the first 3 hours of sleep. The affected individual is usually not aware of the movements or of the transient partial arousals.] + ** REM-sleep-behavioral-disorder {suggestedTag=Episode-phase, suggestedTag=Finding-significance-to-recording, suggestedTag=Episode-consciousness, suggestedTag=Episode-awareness, suggestedTag=Clinical-EEG-temporal-relationship, suggestedTag=Episode-event-count, suggestedTag=State-episode-start, suggestedTag=Episode-postictal-phase, suggestedTag=Episode-prodrome, suggestedTag=Episode-tongue-biting} [REM sleep behavioral disorder. Episodes characterized by: a) presence of REM sleep without atonia (RSWA) on polysomnography (PSG); b) presence of at least 1 of the following conditions - (1) Sleep-related behaviors, by history, that have been injurious, potentially injurious, or disruptive (example: dream enactment behavior); (2) abnormal REM sleep behavior documented during PSG monitoring; (3) absence of epileptiform activity on electroencephalogram (EEG) during REM sleep (unless RBD can be clearly distinguished from any concurrent REM sleep-related seizure disorder); (4) sleep disorder not better explained by another sleep disorder, a medical or neurologic disorder, a mental disorder, medication use, or a substance use disorder.] + ** Sleep-walking {suggestedTag=Episode-phase, suggestedTag=Finding-significance-to-recording, suggestedTag=Episode-consciousness, suggestedTag=Episode-awareness, suggestedTag=Clinical-EEG-temporal-relationship, suggestedTag=Episode-event-count, suggestedTag=State-episode-start, suggestedTag=Episode-postictal-phase, suggestedTag=Episode-prodrome, suggestedTag=Episode-tongue-biting} [Episodes characterized by ambulation during sleep; the patient is difficult to arouse during an episode, and is usually amnesic following the episode. Episodes usually occur in the first third of the night during slow wave sleep. Polysomnographic recordings demonstrate 2 abnormalities during the first sleep cycle: frequent, brief, non-behavioral EEG-defined arousals prior to the somnambulistic episode and abnormally low gamma (0.75-2.0 Hz) EEG power on spectral analysis, correlating with high-voltage (hyper-synchronic gamma) waves lasting 10 to 15 s occurring just prior to the movement. This is followed by stage I NREM sleep, and there is no evidence of complete awakening.] + * Pediatric-episode {requireChild} + ** Hyperekplexia {suggestedTag=Episode-phase, suggestedTag=Finding-significance-to-recording, suggestedTag=Episode-consciousness, suggestedTag=Episode-awareness, suggestedTag=Clinical-EEG-temporal-relationship, suggestedTag=Episode-event-count, suggestedTag=State-episode-start, suggestedTag=Episode-postictal-phase, suggestedTag=Episode-prodrome, suggestedTag=Episode-tongue-biting} [Disorder characterized by exaggerated startle response and hypertonicity that may occur during the first year of life and in severe cases during the neonatal period. Children usually present with marked irritability and recurrent startles in response to handling and sounds. Severely affected infants can have severe jerks and stiffening, sometimes with breath-holding spells.] + ** Jactatio-capitis-nocturna {suggestedTag=Episode-phase, suggestedTag=Finding-significance-to-recording, suggestedTag=Episode-consciousness, suggestedTag=Episode-awareness, suggestedTag=Clinical-EEG-temporal-relationship, suggestedTag=Episode-event-count, suggestedTag=State-episode-start, suggestedTag=Episode-postictal-phase, suggestedTag=Episode-prodrome, suggestedTag=Episode-tongue-biting} [Relatively common in normal children at the time of going to bed, especially during the first year of life, the rhythmic head movements persist during sleep. Usually, these phenomena disappear before 3 years of age.] + ** Pavor-nocturnus {suggestedTag=Episode-phase, suggestedTag=Finding-significance-to-recording, suggestedTag=Episode-consciousness, suggestedTag=Episode-awareness, suggestedTag=Clinical-EEG-temporal-relationship, suggestedTag=Episode-event-count, suggestedTag=State-episode-start, suggestedTag=Episode-postictal-phase, suggestedTag=Episode-prodrome, suggestedTag=Episode-tongue-biting} [A nocturnal episode characterized by age of onset of less than five years (mean age 18 months, with peak prevalence at five to seven years), appearance of signs of panic two hours after falling asleep with crying, screams, a fearful expression, inability to recognize other people including parents (for a duration of 5-15 minutes), amnesia upon awakening. Pavor nocturnus occurs in patients almost every night for months or years (but the frequency is highly variable and may be as low as once a month) and is likely to disappear spontaneously at the age of six to eight years.] + ** Pediatric-stereotypical-behavior-episode {suggestedTag=Episode-phase, suggestedTag=Finding-significance-to-recording, suggestedTag=Episode-consciousness, suggestedTag=Episode-awareness, suggestedTag=Clinical-EEG-temporal-relationship, suggestedTag=Episode-event-count, suggestedTag=State-episode-start, suggestedTag=Episode-postictal-phase, suggestedTag=Episode-prodrome, suggestedTag=Episode-tongue-biting} [Repetitive motor behavior in children, typically rhythmic and persistent; usually not paroxysmal and rarely suggest epilepsy. They include headbanging, head-rolling, jactatio capitis nocturna, body rocking, buccal or lingual movements, hand flapping and related mannerisms, repetitive hand-waving (to self-induce photosensitive seizures).] + * Paroxysmal-motor-event {suggestedTag=Episode-phase, suggestedTag=Finding-significance-to-recording, suggestedTag=Episode-consciousness, suggestedTag=Episode-awareness, suggestedTag=Clinical-EEG-temporal-relationship, suggestedTag=Episode-event-count, suggestedTag=State-episode-start, suggestedTag=Episode-postictal-phase, suggestedTag=Episode-prodrome, suggestedTag=Episode-tongue-biting} [Paroxysmal phenomena during neonatal or childhood periods characterized by recurrent motor or behavioral signs or symptoms that must be distinguishes from epileptic disorders.] + * Syncope {suggestedTag=Episode-phase, suggestedTag=Finding-significance-to-recording, suggestedTag=Episode-consciousness, suggestedTag=Episode-awareness, suggestedTag=Clinical-EEG-temporal-relationship, suggestedTag=Episode-event-count, suggestedTag=State-episode-start, suggestedTag=Episode-postictal-phase, suggestedTag=Episode-prodrome, suggestedTag=Episode-tongue-biting} [Episode with loss of consciousness and muscle tone that is abrupt in onset, of short duration and followed by rapid recovery; it occurs in response to transient impairment of cerebral perfusion. Typical prodromal symptoms often herald onset of syncope and postictal symptoms are minimal. Syncopal convulsions resulting from cerebral anoxia are common but are not a form of epilepsy, nor are there any accompanying EEG ictal discharges.] + * Cataplexy {suggestedTag=Episode-phase, suggestedTag=Finding-significance-to-recording, suggestedTag=Episode-consciousness, suggestedTag=Episode-awareness, suggestedTag=Clinical-EEG-temporal-relationship, suggestedTag=Episode-event-count, suggestedTag=State-episode-start, suggestedTag=Episode-postictal-phase, suggestedTag=Episode-prodrome, suggestedTag=Episode-tongue-biting} [A sudden decrement in muscle tone and loss of deep tendon reflexes, leading to muscle weakness, paralysis, or postural collapse. Cataplexy usually is precipitated by an outburst of emotional expression-notably laughter, anger, or startle. It is one of the tetrad of symptoms of narcolepsy. During cataplexy, respiration and voluntary eye movements are not compromised. Consciousness is preserved.] + * Other-episode {requireChild} + ** # {takesValue, valueClass=textClass} [Free text.] -'''Physiologic-pattern''' {requireChild, inLibrary=score} [EEG graphoelements or rhythms that are considered normal. They only should be scored if the physician considers that they have a specific clinical significance for the recording.] -* Rhythmic-activity-pattern {suggestedTag=Delta-activity-morphology, suggestedTag=Theta-activity-morphology, suggestedTag=Alpha-activity-morphology, suggestedTag=Beta-activity-morphology, suggestedTag=Gamma-activity-morphology, suggestedTag=Brain-laterality, suggestedTag=Brain-region, suggestedTag=Sensors, suggestedTag=Appearance-mode, suggestedTag=Discharge-pattern, inLibrary=score} [Not further specified.] -* Slow-alpha-variant-rhythm {suggestedTag=Brain-laterality, suggestedTag=Brain-region, suggestedTag=Sensors, suggestedTag=Appearance-mode, suggestedTag=Discharge-pattern, inLibrary=score} [Characteristic rhythms mostly at 4-5 Hz, recorded most prominently over the posterior regions of the head. Generally alternate, or are intermixed, with alpha rhythm to which they often are harmonically related. Amplitude varies but is frequently close to 50 micro V. Blocked or attenuated by attention, especially visual, and mental effort. Comment: slow alpha variant rhythms should be distinguished from posterior slow waves characteristic of children and adolescents and occasionally seen in young adults.] -* Fast-alpha-variant-rhythm {suggestedTag=Appearance-mode, suggestedTag=Discharge-pattern, inLibrary=score} [Characteristic rhythm at 14-20 Hz, detected most prominently over the posterior regions of the head. May alternate or be intermixed with alpha rhythm. Blocked or attenuated by attention, especially visual, and mental effort.] -* Ciganek-rhythm {suggestedTag=Brain-laterality, suggestedTag=Brain-region, suggestedTag=Sensors, suggestedTag=Appearance-mode, suggestedTag=Discharge-pattern, inLibrary=score} [Midline theta rhythm (Ciganek rhythm) may be observed during wakefulness or drowsiness. The frequency is 4-7 Hz, and the location is midline (ie, vertex). The morphology is rhythmic, smooth, sinusoidal, arciform, spiky, or mu-like.] -* Lambda-wave {suggestedTag=Brain-laterality, suggestedTag=Brain-region, suggestedTag=Sensors, suggestedTag=Appearance-mode, suggestedTag=Discharge-pattern, inLibrary=score} [Diphasic sharp transient occurring over occipital regions of the head of waking subjects during visual exploration. The main component is positive relative to other areas. Time-locked to saccadic eye movement. Amplitude varies but is generally below 50 micro V.] -* Posterior-slow-waves-youth {suggestedTag=Brain-laterality, suggestedTag=Brain-region, suggestedTag=Sensors, suggestedTag=Appearance-mode, suggestedTag=Discharge-pattern, inLibrary=score} [Waves in the delta and theta range, of variable form, lasting 0.35 to 0.5 s or longer without any consistent periodicity, found in the range of 6-12 years (occasionally seen in young adults). Alpha waves are almost always intermingled or superimposed. Reactive similar to alpha activity.] -* Diffuse-slowing-hyperventilation {suggestedTag=Brain-laterality, suggestedTag=Brain-region, suggestedTag=Sensors, suggestedTag=Appearance-mode, suggestedTag=Discharge-pattern, inLibrary=score} [Diffuse slowing induced by hyperventilation. Bilateral, diffuse slowing during hyperventilation. Recorded in 70 percent of normal children (3-5 years) and less then 10 percent of adults. Usually appear in the posterior regions and spread forward in younger age group, whereas they tend to appear in the frontal regions and spread backward in the older age group.] -* Photic-driving {suggestedTag=Brain-laterality, suggestedTag=Brain-region, suggestedTag=Sensors, suggestedTag=Appearance-mode, suggestedTag=Discharge-pattern, inLibrary=score} [Physiologic response consisting of rhythmic activity elicited over the posterior regions of the head by repetitive photic stimulation at frequencies of about 5-30 Hz. Comments: term should be limited to activity time-locked to the stimulus and of frequency identical or harmonically related to the stimulus frequency. Photic driving should be distinguished from the visual evoked potentials elicited by isolated flashes of light or flashes repeated at very low frequency.] -* Photomyogenic-response {suggestedTag=Brain-laterality, suggestedTag=Brain-region, suggestedTag=Sensors, suggestedTag=Appearance-mode, suggestedTag=Discharge-pattern, inLibrary=score} [A response to intermittent photic stimulation characterized by the appearance in the record of brief, repetitive muscular artifacts (spikes) over the anterior regions of the head. These often increase gradually in amplitude as stimuli are continued and cease promptly when the stimulus is withdrawn. Comment: this response is frequently associated with flutter of the eyelids and vertical oscillations of the eyeballs and sometimes with discrete jerking mostly involving the musculature of the face and head. (Preferred to synonym: photo-myoclonic response).] -* Other-physiologic-pattern {requireChild, inLibrary=score} -** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] +'''Physiologic-pattern''' {requireChild} [EEG graphoelements or rhythms that are considered normal. They only should be scored if the physician considers that they have a specific clinical significance for the recording.] + * Rhythmic-activity-pattern {suggestedTag=Delta-activity-morphology, suggestedTag=Theta-activity-morphology, suggestedTag=Alpha-activity-morphology, suggestedTag=Beta-activity-morphology, suggestedTag=Gamma-activity-morphology, suggestedTag=Brain-laterality, suggestedTag=Brain-region, suggestedTag=Sensors, suggestedTag=Appearance-mode, suggestedTag=Discharge-pattern} [Not further specified.] + * Slow-alpha-variant-rhythm {suggestedTag=Brain-laterality, suggestedTag=Brain-region, suggestedTag=Sensors, suggestedTag=Appearance-mode, suggestedTag=Discharge-pattern} [Characteristic rhythms mostly at 4-5 Hz, recorded most prominently over the posterior regions of the head. Generally alternate, or are intermixed, with alpha rhythm to which they often are harmonically related. Amplitude varies but is frequently close to 50 micro V. Blocked or attenuated by attention, especially visual, and mental effort. Comment: slow alpha variant rhythms should be distinguished from posterior slow waves characteristic of children and adolescents and occasionally seen in young adults.] + * Fast-alpha-variant-rhythm {suggestedTag=Appearance-mode, suggestedTag=Discharge-pattern} [Characteristic rhythm at 14-20 Hz, detected most prominently over the posterior regions of the head. May alternate or be intermixed with alpha rhythm. Blocked or attenuated by attention, especially visual, and mental effort.] + * Ciganek-rhythm {suggestedTag=Brain-laterality, suggestedTag=Brain-region, suggestedTag=Sensors, suggestedTag=Appearance-mode, suggestedTag=Discharge-pattern} [Midline theta rhythm (Ciganek rhythm) may be observed during wakefulness or drowsiness. The frequency is 4-7 Hz, and the location is midline (ie, vertex). The morphology is rhythmic, smooth, sinusoidal, arciform, spiky, or mu-like.] + * Lambda-wave {suggestedTag=Brain-laterality, suggestedTag=Brain-region, suggestedTag=Sensors, suggestedTag=Appearance-mode, suggestedTag=Discharge-pattern} [Diphasic sharp transient occurring over occipital regions of the head of waking subjects during visual exploration. The main component is positive relative to other areas. Time-locked to saccadic eye movement. Amplitude varies but is generally below 50 micro V.] + * Posterior-slow-waves-youth {suggestedTag=Brain-laterality, suggestedTag=Brain-region, suggestedTag=Sensors, suggestedTag=Appearance-mode, suggestedTag=Discharge-pattern} [Waves in the delta and theta range, of variable form, lasting 0.35 to 0.5 s or longer without any consistent periodicity, found in the range of 6-12 years (occasionally seen in young adults). Alpha waves are almost always intermingled or superimposed. Reactive similar to alpha activity.] + * Diffuse-slowing-hyperventilation {suggestedTag=Brain-laterality, suggestedTag=Brain-region, suggestedTag=Sensors, suggestedTag=Appearance-mode, suggestedTag=Discharge-pattern} [Diffuse slowing induced by hyperventilation. Bilateral, diffuse slowing during hyperventilation. Recorded in 70 percent of normal children (3-5 years) and less then 10 percent of adults. Usually appear in the posterior regions and spread forward in younger age group, whereas they tend to appear in the frontal regions and spread backward in the older age group.] + * Photic-driving {suggestedTag=Brain-laterality, suggestedTag=Brain-region, suggestedTag=Sensors, suggestedTag=Appearance-mode, suggestedTag=Discharge-pattern} [Physiologic response consisting of rhythmic activity elicited over the posterior regions of the head by repetitive photic stimulation at frequencies of about 5-30 Hz. Comments: term should be limited to activity time-locked to the stimulus and of frequency identical or harmonically related to the stimulus frequency. Photic driving should be distinguished from the visual evoked potentials elicited by isolated flashes of light or flashes repeated at very low frequency.] + * Photomyogenic-response {suggestedTag=Brain-laterality, suggestedTag=Brain-region, suggestedTag=Sensors, suggestedTag=Appearance-mode, suggestedTag=Discharge-pattern} [A response to intermittent photic stimulation characterized by the appearance in the record of brief, repetitive muscular artifacts (spikes) over the anterior regions of the head. These often increase gradually in amplitude as stimuli are continued and cease promptly when the stimulus is withdrawn. Comment: this response is frequently associated with flutter of the eyelids and vertical oscillations of the eyeballs and sometimes with discrete jerking mostly involving the musculature of the face and head. (Preferred to synonym: photo-myoclonic response).] + * Other-physiologic-pattern {requireChild} + ** # {takesValue, valueClass=textClass} [Free text.] -'''Uncertain-significant-pattern''' {requireChild, inLibrary=score} [EEG graphoelements or rhythms that resemble abnormal patterns but that are not necessarily associated with a pathology, and the physician does not consider them abnormal in the context of the scored recording (like normal variants and patterns).] -* Sharp-transient-pattern {suggestedTag=Brain-laterality, suggestedTag=Brain-region, suggestedTag=Sensors, suggestedTag=Appearance-mode, suggestedTag=Discharge-pattern, inLibrary=score} -* Wicket-spikes {inLibrary=score} [Spike-like monophasic negative single waves or trains of waves occurring over the temporal regions during drowsiness that have an arcuate or mu-like appearance. These are mainly seen in older individuals and represent a benign variant that is of little clinical significance.] -* Small-sharp-spikes {suggestedTag=Brain-laterality, suggestedTag=Brain-region, suggestedTag=Sensors, suggestedTag=Appearance-mode, suggestedTag=Discharge-pattern, inLibrary=score} [Benign epileptiform Transients of Sleep (BETS). Small sharp spikes (SSS) of very short duration and low amplitude, often followed by a small theta wave, occurring in the temporal regions during drowsiness and light sleep. They occur on one or both sides (often asynchronously). The main negative and positive components are of about equally spiky character. Rarely seen in children, they are seen most often in adults and the elderly. Two thirds of the patients have a history of epileptic seizures.] -* Fourteen-six-Hz-positive-burst {suggestedTag=Brain-laterality, suggestedTag=Brain-region, suggestedTag=Sensors, suggestedTag=Appearance-mode, suggestedTag=Discharge-pattern, inLibrary=score} [Burst of arch-shaped waves at 13-17 Hz and/or 5-7-Hz but most commonly at 14 and or 6 Hz seen generally over the posterior temporal and adjacent areas of one or both sides of the head during sleep. The sharp peaks of its component waves are positive with respect to other regions. Amplitude varies but is generally below 75 micro V. Comments: (1) best demonstrated by referential recording using contralateral earlobe or other remote, reference electrodes. (2) This pattern has no established clinical significance.] -* Six-Hz-spike-slow-wave {suggestedTag=Brain-laterality, suggestedTag=Brain-region, suggestedTag=Sensors, suggestedTag=Appearance-mode, suggestedTag=Discharge-pattern, inLibrary=score} [Spike and slow wave complexes at 4-7Hz, but mostly at 6 Hz occurring generally in brief bursts bilaterally and synchronously, symmetrically or asymmetrically, and either confined to or of larger amplitude over the posterior or anterior regions of the head. The spike has a strong positive component. Amplitude varies but is generally smaller than that of spike-and slow-wave complexes repeating at slower rates. Comment: this pattern should be distinguished from epileptiform discharges. Synonym: wave and spike phantom.] -* Rudimentary-spike-wave-complex {suggestedTag=Brain-laterality, suggestedTag=Brain-region, suggestedTag=Sensors, suggestedTag=Appearance-mode, suggestedTag=Discharge-pattern, inLibrary=score} [Synonym: Pseudo petit mal discharge. Paroxysmal discharge that consists of generalized or nearly generalized high voltage 3 to 4/sec waves with poorly developed spike in the positive trough between the slow waves, occurring in drowsiness only. It is found only in infancy and early childhood when marked hypnagogic rhythmical theta activity is paramount in the drowsy state.] -* Slow-fused-transient {suggestedTag=Brain-laterality, suggestedTag=Brain-region, suggestedTag=Sensors, suggestedTag=Appearance-mode, suggestedTag=Discharge-pattern, inLibrary=score} [A posterior slow-wave preceded by a sharp-contoured potential that blends together with the ensuing slow wave, in children.] -* Needle-like-occipital-spikes-blind {suggestedTag=Brain-laterality, suggestedTag=Brain-region, suggestedTag=Sensors, suggestedTag=Appearance-mode, suggestedTag=Discharge-pattern, inLibrary=score} [Spike discharges of a particularly fast and needle-like character develop over the occipital region in most congenitally blind children. Completely disappear during childhood or adolescence.] -* Subclinical-rhythmic-EEG-discharge-adults {suggestedTag=Brain-laterality, suggestedTag=Brain-region, suggestedTag=Sensors, suggestedTag=Appearance-mode, suggestedTag=Discharge-pattern, inLibrary=score} [Subclinical rhythmic EEG discharge of adults (SERDA). A rhythmic pattern seen in the adult age group, mainly in the waking state or drowsiness. It consists of a mixture of frequencies, often predominant in the theta range. The onset may be fairly abrupt with widespread sharp rhythmical theta and occasionally with delta activity. As to the spatial distribution, a maximum of this discharge is usually found over the centroparietal region and especially over the vertex. It may resemble a seizure discharge but is not accompanied by any clinical signs or symptoms.] -* Rhythmic-temporal-theta-burst-drowsiness {inLibrary=score} [Rhythmic temporal theta burst of drowsiness (RTTD). Characteristic burst of 4-7 Hz waves frequently notched by faster waves, occurring over the temporal regions of the head during drowsiness. Synonym: psychomotor variant pattern. Comment: this is a pattern of drowsiness that is of no clinical significance.] -* Temporal-slowing-elderly {suggestedTag=Brain-laterality, suggestedTag=Brain-region, suggestedTag=Sensors, suggestedTag=Appearance-mode, suggestedTag=Discharge-pattern, inLibrary=score} [Focal theta and/or delta activity over the temporal regions, especially the left, in persons over the age of 60. Amplitudes are low/similar to the background activity. Comment: focal temporal theta was found in 20 percent of people between the ages of 40-59 years, and 40 percent of people between 60 and 79 years. One third of people older than 60 years had focal temporal delta activity.] -* Breach-rhythm {suggestedTag=Brain-laterality, suggestedTag=Brain-region, suggestedTag=Sensors, suggestedTag=Appearance-mode, suggestedTag=Discharge-pattern, inLibrary=score} [Rhythmical activity recorded over cranial bone defects. Usually it is in the 6 to 11/sec range, does not respond to movements.] -* Other-uncertain-significant-pattern {requireChild, inLibrary=score} -** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] +'''Uncertain-significant-pattern''' {requireChild} [EEG graphoelements or rhythms that resemble abnormal patterns but that are not necessarily associated with a pathology, and the physician does not consider them abnormal in the context of the scored recording (like normal variants and patterns).] + * Sharp-transient-pattern {suggestedTag=Brain-laterality, suggestedTag=Brain-region, suggestedTag=Sensors, suggestedTag=Appearance-mode, suggestedTag=Discharge-pattern} + * Wicket-spikes [Spike-like monophasic negative single waves or trains of waves occurring over the temporal regions during drowsiness that have an arcuate or mu-like appearance. These are mainly seen in older individuals and represent a benign variant that is of little clinical significance.] + * Small-sharp-spikes {suggestedTag=Brain-laterality, suggestedTag=Brain-region, suggestedTag=Sensors, suggestedTag=Appearance-mode, suggestedTag=Discharge-pattern} [Benign epileptiform Transients of Sleep (BETS). Small sharp spikes (SSS) of very short duration and low amplitude, often followed by a small theta wave, occurring in the temporal regions during drowsiness and light sleep. They occur on one or both sides (often asynchronously). The main negative and positive components are of about equally spiky character. Rarely seen in children, they are seen most often in adults and the elderly. Two thirds of the patients have a history of epileptic seizures.] + * Fourteen-six-Hz-positive-burst {suggestedTag=Brain-laterality, suggestedTag=Brain-region, suggestedTag=Sensors, suggestedTag=Appearance-mode, suggestedTag=Discharge-pattern} [Burst of arch-shaped waves at 13-17 Hz and/or 5-7-Hz but most commonly at 14 and or 6 Hz seen generally over the posterior temporal and adjacent areas of one or both sides of the head during sleep. The sharp peaks of its component waves are positive with respect to other regions. Amplitude varies but is generally below 75 micro V. Comments: (1) best demonstrated by referential recording using contralateral earlobe or other remote, reference electrodes. (2) This pattern has no established clinical significance.] + * Six-Hz-spike-slow-wave {suggestedTag=Brain-laterality, suggestedTag=Brain-region, suggestedTag=Sensors, suggestedTag=Appearance-mode, suggestedTag=Discharge-pattern} [Spike and slow wave complexes at 4-7Hz, but mostly at 6 Hz occurring generally in brief bursts bilaterally and synchronously, symmetrically or asymmetrically, and either confined to or of larger amplitude over the posterior or anterior regions of the head. The spike has a strong positive component. Amplitude varies but is generally smaller than that of spike-and slow-wave complexes repeating at slower rates. Comment: this pattern should be distinguished from epileptiform discharges. Synonym: wave and spike phantom.] + * Rudimentary-spike-wave-complex {suggestedTag=Brain-laterality, suggestedTag=Brain-region, suggestedTag=Sensors, suggestedTag=Appearance-mode, suggestedTag=Discharge-pattern} [Synonym: Pseudo petit mal discharge. Paroxysmal discharge that consists of generalized or nearly generalized high voltage 3 to 4/sec waves with poorly developed spike in the positive trough between the slow waves, occurring in drowsiness only. It is found only in infancy and early childhood when marked hypnagogic rhythmical theta activity is paramount in the drowsy state.] + * Slow-fused-transient {suggestedTag=Brain-laterality, suggestedTag=Brain-region, suggestedTag=Sensors, suggestedTag=Appearance-mode, suggestedTag=Discharge-pattern} [A posterior slow-wave preceded by a sharp-contoured potential that blends together with the ensuing slow wave, in children.] + * Needle-like-occipital-spikes-blind {suggestedTag=Brain-laterality, suggestedTag=Brain-region, suggestedTag=Sensors, suggestedTag=Appearance-mode, suggestedTag=Discharge-pattern} [Spike discharges of a particularly fast and needle-like character develop over the occipital region in most congenitally blind children. Completely disappear during childhood or adolescence.] + * Subclinical-rhythmic-EEG-discharge-adults {suggestedTag=Brain-laterality, suggestedTag=Brain-region, suggestedTag=Sensors, suggestedTag=Appearance-mode, suggestedTag=Discharge-pattern} [Subclinical rhythmic EEG discharge of adults (SERDA). A rhythmic pattern seen in the adult age group, mainly in the waking state or drowsiness. It consists of a mixture of frequencies, often predominant in the theta range. The onset may be fairly abrupt with widespread sharp rhythmical theta and occasionally with delta activity. As to the spatial distribution, a maximum of this discharge is usually found over the centroparietal region and especially over the vertex. It may resemble a seizure discharge but is not accompanied by any clinical signs or symptoms.] + * Rhythmic-temporal-theta-burst-drowsiness [Rhythmic temporal theta burst of drowsiness (RTTD). Characteristic burst of 4-7 Hz waves frequently notched by faster waves, occurring over the temporal regions of the head during drowsiness. Synonym: psychomotor variant pattern. Comment: this is a pattern of drowsiness that is of no clinical significance.] + * Temporal-slowing-elderly {suggestedTag=Brain-laterality, suggestedTag=Brain-region, suggestedTag=Sensors, suggestedTag=Appearance-mode, suggestedTag=Discharge-pattern} [Focal theta and/or delta activity over the temporal regions, especially the left, in persons over the age of 60. Amplitudes are low/similar to the background activity. Comment: focal temporal theta was found in 20 percent of people between the ages of 40-59 years, and 40 percent of people between 60 and 79 years. One third of people older than 60 years had focal temporal delta activity.] + * Breach-rhythm {suggestedTag=Brain-laterality, suggestedTag=Brain-region, suggestedTag=Sensors, suggestedTag=Appearance-mode, suggestedTag=Discharge-pattern} [Rhythmical activity recorded over cranial bone defects. Usually it is in the 6 to 11/sec range, does not respond to movements.] + * Other-uncertain-significant-pattern {requireChild} + ** # {takesValue, valueClass=textClass} [Free text.] -'''Artifact''' {requireChild, inLibrary=score} [When relevant for the clinical interpretation, artifacts can be scored by specifying the type and the location.] -* Biological-artifact {requireChild, inLibrary=score} -** Eye-blink-artifact {suggestedTag=Brain-laterality, suggestedTag=Brain-region, suggestedTag=Sensors, suggestedTag=Multifocal-finding, suggestedTag=Artifact-significance-to-recording, inLibrary=score} [Example for EEG: Fp1/Fp2 become electropositive with eye closure because the cornea is positively charged causing a negative deflection in Fp1/Fp2. If the eye blink is unilateral, consider prosthetic eye. If it is in F8 rather than Fp2 then the electrodes are plugged in wrong.] -** Eye-movement-horizontal-artifact {suggestedTag=Brain-laterality, suggestedTag=Brain-region, suggestedTag=Sensors, suggestedTag=Multifocal-finding, suggestedTag=Artifact-significance-to-recording, inLibrary=score} [Example for EEG: There is an upward deflection in the Fp2-F8 derivation, when the eyes move to the right side. In this case F8 becomes more positive and therefore. When the eyes move to the left, F7 becomes more positive and there is an upward deflection in the Fp1-F7 derivation.] -** Eye-movement-vertical-artifact {suggestedTag=Brain-laterality, suggestedTag=Brain-region, suggestedTag=Sensors, suggestedTag=Multifocal-finding, suggestedTag=Artifact-significance-to-recording, inLibrary=score} [Example for EEG: The EEG shows positive potentials (50-100 micro V) with bi-frontal distribution, maximum at Fp1 and Fp2, when the eyeball rotated upward. The downward rotation of the eyeball was associated with the negative deflection. The time course of the deflections was similar to the time course of the eyeball movement.] -** Slow-eye-movement-artifact {suggestedTag=Brain-laterality, suggestedTag=Brain-region, suggestedTag=Sensors, suggestedTag=Multifocal-finding, suggestedTag=Artifact-significance-to-recording, inLibrary=score} [Slow, rolling eye-movements, seen during drowsiness.] -** Nystagmus-artifact {suggestedTag=Artifact-significance-to-recording, inLibrary=score} -** Chewing-artifact {suggestedTag=Brain-laterality, suggestedTag=Brain-region, suggestedTag=Sensors, suggestedTag=Multifocal-finding, suggestedTag=Artifact-significance-to-recording, inLibrary=score} -** Sucking-artifact {suggestedTag=Brain-laterality, suggestedTag=Brain-region, suggestedTag=Sensors, suggestedTag=Multifocal-finding, suggestedTag=Artifact-significance-to-recording, inLibrary=score} -** Glossokinetic-artifact {suggestedTag=Brain-laterality, suggestedTag=Brain-region, suggestedTag=Sensors, suggestedTag=Multifocal-finding, suggestedTag=Artifact-significance-to-recording, inLibrary=score} [The tongue functions as a dipole, with the tip negative with respect to the base. The artifact produced by the tongue has a broad potential field that drops from frontal to occipital areas, although it is less steep than that produced by eye movement artifacts. The amplitude of the potentials is greater inferiorly than in parasagittal regions; the frequency is variable but usually in the delta range. Chewing and sucking can produce similar artifacts.] -** Rocking-patting-artifact {suggestedTag=Brain-laterality, suggestedTag=Brain-region, suggestedTag=Sensors, suggestedTag=Multifocal-finding, suggestedTag=Artifact-significance-to-recording, inLibrary=score} [Quasi-rhythmical artifacts in recordings from infants caused by rocking/patting.] -** Movement-artifact {suggestedTag=Brain-laterality, suggestedTag=Brain-region, suggestedTag=Sensors, suggestedTag=Multifocal-finding, suggestedTag=Artifact-significance-to-recording, inLibrary=score} [Example for EEG: Large amplitude artifact, with irregular morphology (usually resembling a slow-wave or a wave with complex morphology) seen in one or several channels, due to movement. If the causing movement is repetitive, the artifact might resemble a rhythmic EEG activity.] -** Respiration-artifact {suggestedTag=Brain-laterality, suggestedTag=Brain-region, suggestedTag=Sensors, suggestedTag=Multifocal-finding, suggestedTag=Artifact-significance-to-recording, inLibrary=score} [Respiration can produce 2 kinds of artifacts. One type is in the form of slow and rhythmic activity, synchronous with the body movements of respiration and mechanically affecting the impedance of (usually) one electrode. The other type can be slow or sharp waves that occur synchronously with inhalation or exhalation and involve those electrodes on which the patient is lying.] -** Pulse-artifact {suggestedTag=Brain-laterality, suggestedTag=Brain-region, suggestedTag=Sensors, suggestedTag=Multifocal-finding, suggestedTag=Artifact-significance-to-recording, inLibrary=score} [Example for EEG: Occurs when an EEG electrode is placed over a pulsating vessel. The pulsation can cause slow waves that may simulate EEG activity. A direct relationship exists between ECG and the pulse waves (200-300 millisecond delay after ECG equals QRS complex).] -** ECG-artifact {suggestedTag=Brain-laterality, suggestedTag=Brain-region, suggestedTag=Sensors, suggestedTag=Multifocal-finding, suggestedTag=Artifact-significance-to-recording, inLibrary=score} [Example for EEG: Far-field potential generated in the heart. The voltage and apparent surface of the artifact vary from derivation to derivation and, consequently, from montage to montage. The artifact is observed best in referential montages using earlobe electrodes A1 and A2. ECG artifact is recognized easily by its rhythmicity/regularity and coincidence with the ECG tracing.] -** Sweat-artifact {suggestedTag=Brain-laterality, suggestedTag=Brain-region, suggestedTag=Sensors, suggestedTag=Multifocal-finding, suggestedTag=Artifact-significance-to-recording, inLibrary=score} [Is a low amplitude undulating waveform that is usually greater than 2 seconds and may appear to be an unstable baseline.] -** EMG-artifact {suggestedTag=Brain-laterality, suggestedTag=Brain-region, suggestedTag=Sensors, suggestedTag=Multifocal-finding, suggestedTag=Artifact-significance-to-recording, inLibrary=score} [Myogenic potentials are the most common artifacts. Frontalis and temporalis muscles (ex..: clenching of jaw muscles) are common causes. Generally, the potentials generated in the muscles are of shorter duration than those generated in the brain. The frequency components are usually beyond 30-50 Hz, and the bursts are arrhythmic.] -* Non-biological-artifact {requireChild, inLibrary=score} -** Power-supply-artifact {suggestedTag=Artifact-significance-to-recording, inLibrary=score} [50-60 Hz artifact. Monomorphic waveform due to 50 or 60 Hz A/C power supply.] -** Induction-artifact {suggestedTag=Artifact-significance-to-recording, inLibrary=score} [Artifacts (usually of high frequency) induced by nearby equipment (like in the intensive care unit).] -** Dialysis-artifact {suggestedTag=Artifact-significance-to-recording, inLibrary=score} -** Artificial-ventilation-artifact {suggestedTag=Artifact-significance-to-recording, inLibrary=score} -** Electrode-pops-artifact {suggestedTag=Artifact-significance-to-recording, inLibrary=score} [Are brief discharges with a very steep upslope and shallow fall that occur in all leads which include that electrode.] -** Salt-bridge-artifact {suggestedTag=Artifact-significance-to-recording, inLibrary=score} [Typically occurs in 1 channel which may appear isoelectric. Only seen in bipolar montage.] -* Other-artifact {requireChild, suggestedTag=Artifact-significance-to-recording, inLibrary=score} -** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] +'''Artifact''' {requireChild} [When relevant for the clinical interpretation, artifacts can be scored by specifying the type and the location.] + * Biological-artifact {requireChild} + ** Eye-blink-artifact {suggestedTag=Brain-laterality, suggestedTag=Brain-region, suggestedTag=Sensors, suggestedTag=Multifocal-finding, suggestedTag=Artifact-significance-to-recording} [Example for EEG: Fp1/Fp2 become electropositive with eye closure because the cornea is positively charged causing a negative deflection in Fp1/Fp2. If the eye blink is unilateral, consider prosthetic eye. If it is in F8 rather than Fp2 then the electrodes are plugged in wrong.] + ** Eye-movement-horizontal-artifact {suggestedTag=Brain-laterality, suggestedTag=Brain-region, suggestedTag=Sensors, suggestedTag=Multifocal-finding, suggestedTag=Artifact-significance-to-recording} [Example for EEG: There is an upward deflection in the Fp2-F8 derivation, when the eyes move to the right side. In this case F8 becomes more positive and therefore. When the eyes move to the left, F7 becomes more positive and there is an upward deflection in the Fp1-F7 derivation.] + ** Eye-movement-vertical-artifact {suggestedTag=Brain-laterality, suggestedTag=Brain-region, suggestedTag=Sensors, suggestedTag=Multifocal-finding, suggestedTag=Artifact-significance-to-recording} [Example for EEG: The EEG shows positive potentials (50-100 micro V) with bi-frontal distribution, maximum at Fp1 and Fp2, when the eyeball rotated upward. The downward rotation of the eyeball was associated with the negative deflection. The time course of the deflections was similar to the time course of the eyeball movement.] + ** Slow-eye-movement-artifact {suggestedTag=Brain-laterality, suggestedTag=Brain-region, suggestedTag=Sensors, suggestedTag=Multifocal-finding, suggestedTag=Artifact-significance-to-recording} [Slow, rolling eye-movements, seen during drowsiness.] + ** Nystagmus-artifact {suggestedTag=Artifact-significance-to-recording} + ** Chewing-artifact {suggestedTag=Brain-laterality, suggestedTag=Brain-region, suggestedTag=Sensors, suggestedTag=Multifocal-finding, suggestedTag=Artifact-significance-to-recording} + ** Sucking-artifact {suggestedTag=Brain-laterality, suggestedTag=Brain-region, suggestedTag=Sensors, suggestedTag=Multifocal-finding, suggestedTag=Artifact-significance-to-recording} + ** Glossokinetic-artifact {suggestedTag=Brain-laterality, suggestedTag=Brain-region, suggestedTag=Sensors, suggestedTag=Multifocal-finding, suggestedTag=Artifact-significance-to-recording} [The tongue functions as a dipole, with the tip negative with respect to the base. The artifact produced by the tongue has a broad potential field that drops from frontal to occipital areas, although it is less steep than that produced by eye movement artifacts. The amplitude of the potentials is greater inferiorly than in parasagittal regions; the frequency is variable but usually in the delta range. Chewing and sucking can produce similar artifacts.] + ** Rocking-patting-artifact {suggestedTag=Brain-laterality, suggestedTag=Brain-region, suggestedTag=Sensors, suggestedTag=Multifocal-finding, suggestedTag=Artifact-significance-to-recording} [Quasi-rhythmical artifacts in recordings from infants caused by rocking/patting.] + ** Movement-artifact {suggestedTag=Brain-laterality, suggestedTag=Brain-region, suggestedTag=Sensors, suggestedTag=Multifocal-finding, suggestedTag=Artifact-significance-to-recording} [Example for EEG: Large amplitude artifact, with irregular morphology (usually resembling a slow-wave or a wave with complex morphology) seen in one or several channels, due to movement. If the causing movement is repetitive, the artifact might resemble a rhythmic EEG activity.] + ** Respiration-artifact {suggestedTag=Brain-laterality, suggestedTag=Brain-region, suggestedTag=Sensors, suggestedTag=Multifocal-finding, suggestedTag=Artifact-significance-to-recording} [Respiration can produce 2 kinds of artifacts. One type is in the form of slow and rhythmic activity, synchronous with the body movements of respiration and mechanically affecting the impedance of (usually) one electrode. The other type can be slow or sharp waves that occur synchronously with inhalation or exhalation and involve those electrodes on which the patient is lying.] + ** Pulse-artifact {suggestedTag=Brain-laterality, suggestedTag=Brain-region, suggestedTag=Sensors, suggestedTag=Multifocal-finding, suggestedTag=Artifact-significance-to-recording} [Example for EEG: Occurs when an EEG electrode is placed over a pulsating vessel. The pulsation can cause slow waves that may simulate EEG activity. A direct relationship exists between ECG and the pulse waves (200-300 millisecond delay after ECG equals QRS complex).] + ** ECG-artifact {suggestedTag=Brain-laterality, suggestedTag=Brain-region, suggestedTag=Sensors, suggestedTag=Multifocal-finding, suggestedTag=Artifact-significance-to-recording} [Example for EEG: Far-field potential generated in the heart. The voltage and apparent surface of the artifact vary from derivation to derivation and, consequently, from montage to montage. The artifact is observed best in referential montages using earlobe electrodes A1 and A2. ECG artifact is recognized easily by its rhythmicity/regularity and coincidence with the ECG tracing.] + ** Sweat-artifact {suggestedTag=Brain-laterality, suggestedTag=Brain-region, suggestedTag=Sensors, suggestedTag=Multifocal-finding, suggestedTag=Artifact-significance-to-recording} [Is a low amplitude undulating waveform that is usually greater than 2 seconds and may appear to be an unstable baseline.] + ** EMG-artifact {suggestedTag=Brain-laterality, suggestedTag=Brain-region, suggestedTag=Sensors, suggestedTag=Multifocal-finding, suggestedTag=Artifact-significance-to-recording} [Myogenic potentials are the most common artifacts. Frontalis and temporalis muscles (ex..: clenching of jaw muscles) are common causes. Generally, the potentials generated in the muscles are of shorter duration than those generated in the brain. The frequency components are usually beyond 30-50 Hz, and the bursts are arrhythmic.] + * Non-biological-artifact {requireChild} + ** Power-supply-artifact {suggestedTag=Artifact-significance-to-recording} [50-60 Hz artifact. Monomorphic waveform due to 50 or 60 Hz A/C power supply.] + ** Induction-artifact {suggestedTag=Artifact-significance-to-recording} [Artifacts (usually of high frequency) induced by nearby equipment (like in the intensive care unit).] + ** Dialysis-artifact {suggestedTag=Artifact-significance-to-recording} + ** Artificial-ventilation-artifact {suggestedTag=Artifact-significance-to-recording} + ** Electrode-pops-artifact {suggestedTag=Artifact-significance-to-recording} [Are brief discharges with a very steep upslope and shallow fall that occur in all leads which include that electrode.] + ** Salt-bridge-artifact {suggestedTag=Artifact-significance-to-recording} [Typically occurs in 1 channel which may appear isoelectric. Only seen in bipolar montage.] + * Other-artifact {requireChild, suggestedTag=Artifact-significance-to-recording} + ** # {takesValue, valueClass=textClass} [Free text.] -'''Polygraphic-channel-finding''' {requireChild, inLibrary=score} [Changes observed in polygraphic channels can be scored: EOG, Respiration, ECG, EMG, other polygraphic channel (+ free text), and their significance logged (normal, abnormal, no definite abnormality).] -* EOG-channel-finding {suggestedTag=Finding-significance-to-recording, inLibrary=score} [ElectroOculoGraphy.] -** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] -* Respiration-channel-finding {suggestedTag=Finding-significance-to-recording, inLibrary=score} -** Respiration-oxygen-saturation {inLibrary=score} -*** # {takesValue, valueClass=numericClass, inLibrary=score} -** Respiration-feature {inLibrary=score} -*** Apnoe-respiration {inLibrary=score} [Add duration (range in seconds) and comments in free text.] -**** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] -*** Hypopnea-respiration {inLibrary=score} [Add duration (range in seconds) and comments in free text] -**** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] -*** Apnea-hypopnea-index-respiration {requireChild, inLibrary=score} [Events/h. Frequency can be tagged with base schema /Property/Data-property/Data-value/Spatiotemporal-value/Rate-of-change/Frequency] -**** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] -*** Periodic-respiration {inLibrary=score} -**** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] -*** Tachypnea-respiration {requireChild, inLibrary=score} [Cycles/min. Frequency can be tagged with base schema /Property/Data-property/Data-value/Spatiotemporal-value/Rate-of-change/Frequency] -**** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] -*** Other-respiration-feature {requireChild, inLibrary=score} -**** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] -* ECG-channel-finding {suggestedTag=Finding-significance-to-recording, inLibrary=score} [Electrocardiography.] -** ECG-QT-period {inLibrary=score} -*** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] -** ECG-feature {inLibrary=score} -*** ECG-sinus-rhythm {inLibrary=score} [Normal rhythm. Frequency can be tagged with base schema /Property/Data-property/Data-value/Spatiotemporal-value/Rate-of-change/Frequency] -**** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] -*** ECG-arrhythmia {inLibrary=score} -**** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] -*** ECG-asystolia {inLibrary=score} [Add duration (range in seconds) and comments in free text.] -**** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] -*** ECG-bradycardia {inLibrary=score} [Frequency can be tagged with base schema /Property/Data-property/Data-value/Spatiotemporal-value/Rate-of-change/Frequency] -**** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] -*** ECG-extrasystole {inLibrary=score} -**** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] -*** ECG-ventricular-premature-depolarization {inLibrary=score} [Frequency can be tagged with base schema /Property/Data-property/Data-value/Spatiotemporal-value/Rate-of-change/Frequency] -**** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] -*** ECG-tachycardia {inLibrary=score} [Frequency can be tagged with base schema /Property/Data-property/Data-value/Spatiotemporal-value/Rate-of-change/Frequency] -**** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] -*** Other-ECG-feature {requireChild, inLibrary=score} -**** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] -* EMG-channel-finding {suggestedTag=Finding-significance-to-recording, inLibrary=score} [electromyography] -** EMG-muscle-side {inLibrary=score} -*** EMG-left-muscle {inLibrary=score} -**** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] -*** EMG-right-muscle {inLibrary=score} -**** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] -*** EMG-bilateral-muscle {inLibrary=score} -**** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] -** EMG-muscle-name {inLibrary=score} -*** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] -** EMG-feature {inLibrary=score} -*** EMG-myoclonus {inLibrary=score} -**** Negative-myoclonus {inLibrary=score} -***** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] -**** EMG-myoclonus-rhythmic {inLibrary=score} -***** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] -**** EMG-myoclonus-arrhythmic {inLibrary=score} -***** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] -**** EMG-myoclonus-synchronous {inLibrary=score} -***** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] -**** EMG-myoclonus-asynchronous {inLibrary=score} -***** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] -*** EMG-PLMS {inLibrary=score} [Periodic limb movements in sleep.] -*** EMG-spasm {inLibrary=score} -**** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] -*** EMG-tonic-contraction {inLibrary=score} -**** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] -*** EMG-asymmetric-activation {requireChild, inLibrary=score} -**** EMG-asymmetric-activation-left-first {inLibrary=score} -***** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] -**** EMG-asymmetric-activation-right-first {inLibrary=score} -***** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] -*** Other-EMG-features {requireChild, inLibrary=score} -**** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] -* Other-polygraphic-channel {requireChild, inLibrary=score} -** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] +'''Polygraphic-channel-finding''' {requireChild} [Changes observed in polygraphic channels can be scored: EOG, Respiration, ECG, EMG, other polygraphic channel (+ free text), and their significance logged (normal, abnormal, no definite abnormality).] + * EOG-channel-finding {suggestedTag=Finding-significance-to-recording} [ElectroOculoGraphy.] + ** # {takesValue, valueClass=textClass} [Free text.] + * Respiration-channel-finding {suggestedTag=Finding-significance-to-recording} + ** Respiration-oxygen-saturation + *** # {takesValue, valueClass=numericClass} + ** Respiration-feature + *** Apnoe-respiration [Add duration (range in seconds) and comments in free text.] + **** # {takesValue, valueClass=textClass} [Free text.] + *** Hypopnea-respiration [Add duration (range in seconds) and comments in free text] + **** # {takesValue, valueClass=textClass} [Free text.] + *** Apnea-hypopnea-index-respiration {requireChild} [Events/h. Frequency can be tagged with base schema /Property/Data-property/Data-value/Spatiotemporal-value/Rate-of-change/Frequency] + **** # {takesValue, valueClass=textClass} [Free text.] + *** Periodic-respiration + **** # {takesValue, valueClass=textClass} [Free text.] + *** Tachypnea-respiration {requireChild} [Cycles/min. Frequency can be tagged with base schema /Property/Data-property/Data-value/Spatiotemporal-value/Rate-of-change/Frequency] + **** # {takesValue, valueClass=textClass} [Free text.] + *** Other-respiration-feature {requireChild} + **** # {takesValue, valueClass=textClass} [Free text.] + * ECG-channel-finding {suggestedTag=Finding-significance-to-recording} [Electrocardiography.] + ** ECG-QT-period + *** # {takesValue, valueClass=textClass} [Free text.] + ** ECG-feature + *** ECG-sinus-rhythm [Normal rhythm. Frequency can be tagged with base schema /Property/Data-property/Data-value/Spatiotemporal-value/Rate-of-change/Frequency] + **** # {takesValue, valueClass=textClass} [Free text.] + *** ECG-arrhythmia + **** # {takesValue, valueClass=textClass} [Free text.] + *** ECG-asystolia [Add duration (range in seconds) and comments in free text.] + **** # {takesValue, valueClass=textClass} [Free text.] + *** ECG-bradycardia [Frequency can be tagged with base schema /Property/Data-property/Data-value/Spatiotemporal-value/Rate-of-change/Frequency] + **** # {takesValue, valueClass=textClass} [Free text.] + *** ECG-extrasystole + **** # {takesValue, valueClass=textClass} [Free text.] + *** ECG-ventricular-premature-depolarization [Frequency can be tagged with base schema /Property/Data-property/Data-value/Spatiotemporal-value/Rate-of-change/Frequency] + **** # {takesValue, valueClass=textClass} [Free text.] + *** ECG-tachycardia [Frequency can be tagged with base schema /Property/Data-property/Data-value/Spatiotemporal-value/Rate-of-change/Frequency] + **** # {takesValue, valueClass=textClass} [Free text.] + *** Other-ECG-feature {requireChild} + **** # {takesValue, valueClass=textClass} [Free text.] + * EMG-channel-finding {suggestedTag=Finding-significance-to-recording} [electromyography] + ** EMG-muscle-side + *** EMG-left-muscle + **** # {takesValue, valueClass=textClass} [Free text.] + *** EMG-right-muscle + **** # {takesValue, valueClass=textClass} [Free text.] + *** EMG-bilateral-muscle + **** # {takesValue, valueClass=textClass} [Free text.] + ** EMG-muscle-name + *** # {takesValue, valueClass=textClass} [Free text.] + ** EMG-feature + *** EMG-myoclonus + **** Negative-myoclonus + ***** # {takesValue, valueClass=textClass} [Free text.] + **** EMG-myoclonus-rhythmic + ***** # {takesValue, valueClass=textClass} [Free text.] + **** EMG-myoclonus-arrhythmic + ***** # {takesValue, valueClass=textClass} [Free text.] + **** EMG-myoclonus-synchronous + ***** # {takesValue, valueClass=textClass} [Free text.] + **** EMG-myoclonus-asynchronous + ***** # {takesValue, valueClass=textClass} [Free text.] + *** EMG-PLMS [Periodic limb movements in sleep.] + *** EMG-spasm + **** # {takesValue, valueClass=textClass} [Free text.] + *** EMG-tonic-contraction + **** # {takesValue, valueClass=textClass} [Free text.] + *** EMG-asymmetric-activation {requireChild} + **** EMG-asymmetric-activation-left-first + ***** # {takesValue, valueClass=textClass} [Free text.] + **** EMG-asymmetric-activation-right-first + ***** # {takesValue, valueClass=textClass} [Free text.] + *** Other-EMG-features {requireChild} + **** # {takesValue, valueClass=textClass} [Free text.] + * Other-polygraphic-channel {requireChild} + ** # {takesValue, valueClass=textClass} [Free text.] -'''Finding-property''' {requireChild, inLibrary=score} [Descriptive element similar to main HED /Property. Something that pertains to a thing. A characteristic of some entity. A quality or feature regarded as a characteristic or inherent part of someone or something. HED attributes are adjectives or adverbs.] -* Signal-morphology-property {requireChild, inLibrary=score} -** Rhythmic-activity-morphology {inLibrary=score} [EEG activity consisting of a sequence of waves approximately constant period.] -*** Delta-activity-morphology {suggestedTag=Finding-frequency, suggestedTag=Finding-amplitude, inLibrary=score} [EEG rhythm in the delta (under 4 Hz) range that does not belong to the posterior dominant rhythm (scored under other organized rhythms).] -**** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] -*** Theta-activity-morphology {suggestedTag=Finding-frequency, suggestedTag=Finding-amplitude, inLibrary=score} [EEG rhythm in the theta (4-8 Hz) range that does not belong to the posterior dominant rhythm (scored under other organized rhythm).] -**** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] -*** Alpha-activity-morphology {suggestedTag=Finding-frequency, suggestedTag=Finding-amplitude, inLibrary=score} [EEG rhythm in the alpha range (8-13 Hz) which is considered part of the background (ongoing) activity but does not fulfill the criteria of the posterior dominant rhythm (alpha rhythm).] -**** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] -*** Beta-activity-morphology {suggestedTag=Finding-frequency, suggestedTag=Finding-amplitude, inLibrary=score} [EEG rhythm between 14 and 40 Hz, which is considered part of the background (ongoing) activity but does not fulfill the criteria of the posterior dominant rhythm. Most characteristically: a rhythm from 14 to 40 Hz recorded over the fronto-central regions of the head during wakefulness. Amplitude of the beta rhythm varies but is mostly below 30 microV. Other beta rhythms are most prominent in other locations or are diffuse.] -**** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] -*** Gamma-activity-morphology {suggestedTag=Finding-frequency, suggestedTag=Finding-amplitude, inLibrary=score} -**** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] -** Spike-morphology {inLibrary=score} [A transient, clearly distinguished from background activity, with pointed peak at a conventional paper speed or time scale and duration from 20 to under 70 ms, i.e. 1/50-1/15 s approximately. Main component is generally negative relative to other areas. Amplitude varies.] -*** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] -** Spike-and-slow-wave-morphology {inLibrary=score} [A pattern consisting of a spike followed by a slow wave.] -*** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] -** Runs-of-rapid-spikes-morphology {inLibrary=score} [Bursts of spike discharges at a rate from 10 to 25/sec (in most cases somewhat irregular). The bursts last more than 2 seconds (usually 2 to 10 seconds) and it is typically seen in sleep. Synonyms: rhythmic spikes, generalized paroxysmal fast activity, fast paroxysmal rhythms, grand mal discharge, fast beta activity.] -*** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] -** Polyspikes-morphology {inLibrary=score} [Two or more consecutive spikes.] -*** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] -** Polyspike-and-slow-wave-morphology {inLibrary=score} [Two or more consecutive spikes associated with one or more slow waves.] -*** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] -** Sharp-wave-morphology {inLibrary=score} [A transient clearly distinguished from background activity, with pointed peak at a conventional paper speed or time scale, and duration of 70-200 ms, i.e. over 1/4-1/5 s approximately. Main component is generally negative relative to other areas. Amplitude varies.] -*** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] -** Sharp-and-slow-wave-morphology {inLibrary=score} [A sequence of a sharp wave and a slow wave.] -*** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] -** Slow-sharp-wave-morphology {inLibrary=score} [A transient that bears all the characteristics of a sharp-wave, but exceeds 200 ms. Synonym: blunted sharp wave.] -*** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] -** High-frequency-oscillation-morphology {inLibrary=score} [HFO.] -*** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] -** Hypsarrhythmia-classic-morphology {inLibrary=score} [Abnormal interictal high amplitude waves and a background of irregular spikes.] -*** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] -** Hypsarrhythmia-modified-morphology {inLibrary=score} -*** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] -** Fast-spike-activity-morphology {inLibrary=score} [A burst consisting of a sequence of spikes. Duration greater than 1 s. Frequency at least in the alpha range.] -*** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] -** Low-voltage-fast-activity-morphology {inLibrary=score} [Refers to the fast, and often recruiting activity which can be recorded at the onset of an ictal discharge, particularly in invasive EEG recording of a seizure.] -*** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] -** Polysharp-waves-morphology {inLibrary=score} [A sequence of two or more sharp-waves.] -*** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] -** Slow-wave-large-amplitude-morphology {inLibrary=score} -*** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] -** Irregular-delta-or-theta-activity-morphology {inLibrary=score} [EEG activity consisting of repetitive waves of inconsistent wave-duration but in delta and/or theta rang (greater than 125 ms).] -*** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] -** Electrodecremental-change-morphology {inLibrary=score} [Sudden desynchronization of electrical activity.] -*** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] -** DC-shift-morphology {inLibrary=score} [Shift of negative polarity of the direct current recordings, during seizures.] -*** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] -** Disappearance-of-ongoing-activity-morphology {inLibrary=score} [Disappearance of the EEG activity that preceded the ictal event but still remnants of background activity (thus not enough to name it electrodecremental change).] -*** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] -** Polymorphic-delta-activity-morphology {inLibrary=score} [EEG activity consisting of waves in the delta range (over 250 ms duration for each wave) but of different morphology.] -*** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] -** Frontal-intermittent-rhythmic-delta-activity-morphology {inLibrary=score} [Frontal intermittent rhythmic delta activity (FIRDA). Fairly regular or approximately sinusoidal waves, mostly occurring in bursts at 1.5-2.5 Hz over the frontal areas of one or both sides of the head. Comment: most commonly associated with unspecified encephalopathy, in adults.] -*** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] -** Occipital-intermittent-rhythmic-delta-activity-morphology {inLibrary=score} [Occipital intermittent rhythmic delta activity (OIRDA). Fairly regular or approximately sinusoidal waves, mostly occurring in bursts at 2-3 Hz over the occipital or posterior head regions of one or both sides of the head. Frequently blocked or attenuated by opening the eyes. Comment: most commonly associated with unspecified encephalopathy, in children.] -*** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] -** Temporal-intermittent-rhythmic-delta-activity-morphology {inLibrary=score} [Temporal intermittent rhythmic delta activity (TIRDA). Fairly regular or approximately sinusoidal waves, mostly occurring in bursts at over the temporal areas of one side of the head. Comment: most commonly associated with temporal lobe epilepsy.] -*** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] -** Periodic-discharges-morphology {requireChild, inLibrary=score} [Periodic discharges not further specified (PDs).] -*** Periodic-discharges-superimposed-activity {requireChild, suggestedTag=Property-not-possible-to-determine, inLibrary=score} -**** Periodic-discharges-fast-superimposed-activity {suggestedTag=Finding-frequency, inLibrary=score} -***** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] -**** Periodic-discharges-rhythmic-superimposed-activity {suggestedTag=Finding-frequency, inLibrary=score} -***** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] -*** Periodic-discharge-sharpness {requireChild, suggestedTag=Property-not-possible-to-determine, inLibrary=score} -**** Spiky-periodic-discharge-sharpness {inLibrary=score} -***** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] -**** Sharp-periodic-discharge-sharpness {inLibrary=score} -***** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] -**** Sharply-contoured-periodic-discharge-sharpness {inLibrary=score} -***** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] -**** Blunt-periodic-discharge-sharpness {inLibrary=score} -***** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] -*** Number-of-periodic-discharge-phases {requireChild, suggestedTag=Property-not-possible-to-determine, inLibrary=score} -**** 1-periodic-discharge-phase {inLibrary=score} -***** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] -**** 2-periodic-discharge-phases {inLibrary=score} -***** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] -**** 3-periodic-discharge-phases {inLibrary=score} -***** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] -**** Greater-than-3-periodic-discharge-phases {inLibrary=score} -***** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] -*** Periodic-discharge-triphasic-morphology {suggestedTag=Property-not-possible-to-determine, suggestedTag=Property-exists, suggestedTag=Property-absence, inLibrary=score} -**** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] -*** Periodic-discharge-absolute-amplitude {requireChild, suggestedTag=Property-not-possible-to-determine, inLibrary=score} -**** Periodic-discharge-absolute-amplitude-very-low {inLibrary=score} [Lower than 20 microV.] -***** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] -**** Low-periodic-discharge-absolute-amplitude {inLibrary=score} [20 to 49 microV.] -***** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] -**** Medium-periodic-discharge-absolute-amplitude {inLibrary=score} [50 to 199 microV.] -***** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] -**** High-periodic-discharge-absolute-amplitude {inLibrary=score} [Greater than 200 microV.] -***** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] -*** Periodic-discharge-relative-amplitude {requireChild, suggestedTag=Property-not-possible-to-determine, inLibrary=score} -**** Periodic-discharge-relative-amplitude-less-than-equal-2 {inLibrary=score} -***** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] -**** Periodic-discharge-relative-amplitude-greater-than-2 {inLibrary=score} -***** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] -*** Periodic-discharge-polarity {requireChild, inLibrary=score} -**** Periodic-discharge-postitive-polarity {inLibrary=score} -***** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] -**** Periodic-discharge-negative-polarity {inLibrary=score} -***** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] -**** Periodic-discharge-unclear-polarity {inLibrary=score} -***** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] -* Source-analysis-property {requireChild, inLibrary=score} [How the current in the brain reaches the electrode sensors.] -** Source-analysis-laterality {requireChild, suggestedTag=Brain-laterality, inLibrary=score} -** Source-analysis-brain-region {requireChild, inLibrary=score} -*** Source-analysis-frontal-perisylvian-superior-surface {inLibrary=score} -*** Source-analysis-frontal-lateral {inLibrary=score} -*** Source-analysis-frontal-mesial {inLibrary=score} -*** Source-analysis-frontal-polar {inLibrary=score} -*** Source-analysis-frontal-orbitofrontal {inLibrary=score} -*** Source-analysis-temporal-polar {inLibrary=score} -*** Source-analysis-temporal-basal {inLibrary=score} -*** Source-analysis-temporal-lateral-anterior {inLibrary=score} -*** Source-analysis-temporal-lateral-posterior {inLibrary=score} -*** Source-analysis-temporal-perisylvian-inferior-surface {inLibrary=score} -*** Source-analysis-central-lateral-convexity {inLibrary=score} -*** Source-analysis-central-mesial {inLibrary=score} -*** Source-analysis-central-sulcus-anterior-surface {inLibrary=score} -*** Source-analysis-central-sulcus-posterior-surface {inLibrary=score} -*** Source-analysis-central-opercular {inLibrary=score} -*** Source-analysis-parietal-lateral-convexity {inLibrary=score} -*** Source-analysis-parietal-mesial {inLibrary=score} -*** Source-analysis-parietal-opercular {inLibrary=score} -*** Source-analysis-occipital-lateral {inLibrary=score} -*** Source-analysis-occipital-mesial {inLibrary=score} -*** Source-analysis-occipital-basal {inLibrary=score} -*** Source-analysis-insula {inLibrary=score} -* Location-property {requireChild, inLibrary=score} [Location can be scored for findings. Semiologic finding can also be characterized by the somatotopic modifier (i.e. the part of the body where it occurs). In this respect, laterality (left, right, symmetric, asymmetric, left greater than right, right greater than left), body part (eyelid, face, arm, leg, trunk, visceral, hemi-) and centricity (axial, proximal limb, distal limb) can be scored.] -** Brain-laterality {requireChild, inLibrary=score} -*** Brain-laterality-left {inLibrary=score} -**** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] -*** Brain-laterality-left-greater-right {inLibrary=score} -**** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] -*** Brain-laterality-right {inLibrary=score} -**** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] -*** Brain-laterality-right-greater-left {inLibrary=score} -**** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] -*** Brain-laterality-midline {inLibrary=score} -**** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] -*** Brain-laterality-diffuse-asynchronous {inLibrary=score} -**** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] -** Brain-region {requireChild, inLibrary=score} -*** Brain-region-frontal {inLibrary=score} -**** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] -*** Brain-region-temporal {inLibrary=score} -**** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] -*** Brain-region-central {inLibrary=score} -**** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] -*** Brain-region-parietal {inLibrary=score} -**** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] -*** Brain-region-occipital {inLibrary=score} -**** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] -** Body-part-location {requireChild, inLibrary=score} -*** Body-part-eyelid {inLibrary=score} -**** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] -*** Body-part-face {inLibrary=score} -**** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] -*** Body-part-arm {inLibrary=score} -**** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] -*** Body-part-leg {inLibrary=score} -**** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] -*** Body-part-trunk {inLibrary=score} -**** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] -*** Body-part-visceral {inLibrary=score} -**** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] -*** Body-part-hemi {inLibrary=score} -**** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] -** Brain-centricity {requireChild, inLibrary=score} -*** Brain-centricity-axial {inLibrary=score} -**** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] -*** Brain-centricity-proximal-limb {inLibrary=score} -**** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] -*** Brain-centricity-distal-limb {inLibrary=score} -**** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] -** Sensors {requireChild, inLibrary=score} [Lists all corresponding sensors (electrodes/channels in montage). The sensor-group is selected from a list defined in the site-settings for each EEG-lab.] -*** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] -** Finding-propagation {suggestedTag=Property-exists, suggestedTag=Property-absence, suggestedTag=Brain-laterality, suggestedTag=Brain-region, suggestedTag=Sensors, inLibrary=score} [When propagation within the graphoelement is observed, first the location of the onset region is scored. Then, the location of the propagation can be noted.] -*** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] -** Multifocal-finding {suggestedTag=Property-not-possible-to-determine, suggestedTag=Property-exists, suggestedTag=Property-absence, inLibrary=score} [When the same interictal graphoelement is observed bilaterally and at least in three independent locations, can score them using one entry, and choosing multifocal as a descriptor of the locations of the given interictal graphoelements, optionally emphasizing the involved, and the most active sites.] -*** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] -* Modulators-property {requireChild, inLibrary=score} [For each described graphoelement, the influence of the modulators can be scored. Only modulators present in the recording are scored.] -** Modulators-reactivity {requireChild, suggestedTag=Property-exists, suggestedTag=Property-absence, inLibrary=score} [Susceptibility of individual rhythms or the EEG as a whole to change following sensory stimulation or other physiologic actions.] -*** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] -** Eye-closure-sensitivity {suggestedTag=Property-exists, suggestedTag=Property-absence, inLibrary=score} [Eye closure sensitivity.] -*** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] -** Eye-opening-passive {suggestedTag=Property-not-possible-to-determine, suggestedTag=Finding-stopped-by, suggestedTag=Finding-unmodified, suggestedTag=Finding-triggered-by, inLibrary=score} [Passive eye opening. Used with base schema Increasing/Decreasing.] -** Medication-effect-EEG {suggestedTag=Property-not-possible-to-determine, suggestedTag=Finding-stopped-by, suggestedTag=Finding-unmodified, inLibrary=score} [Medications effect on EEG. Used with base schema Increasing/Decreasing.] -** Medication-reduction-effect-EEG {suggestedTag=Property-not-possible-to-determine, suggestedTag=Finding-stopped-by, suggestedTag=Finding-unmodified, inLibrary=score} [Medications reduction or withdrawal effect on EEG. Used with base schema Increasing/Decreasing.] -** Auditive-stimuli-effect {suggestedTag=Property-not-possible-to-determine, suggestedTag=Finding-stopped-by, suggestedTag=Finding-unmodified, inLibrary=score} [Used with base schema Increasing/Decreasing.] -** Nociceptive-stimuli-effect {suggestedTag=Property-not-possible-to-determine, suggestedTag=Finding-stopped-by, suggestedTag=Finding-unmodified, suggestedTag=Finding-triggered-by, inLibrary=score} [Used with base schema Increasing/Decreasing.] -** Physical-effort-effect {suggestedTag=Property-not-possible-to-determine, suggestedTag=Finding-stopped-by, suggestedTag=Finding-unmodified, suggestedTag=Finding-triggered-by, inLibrary=score} [Used with base schema Increasing/Decreasing] -** Cognitive-task-effect {suggestedTag=Property-not-possible-to-determine, suggestedTag=Finding-stopped-by, suggestedTag=Finding-unmodified, suggestedTag=Finding-triggered-by, inLibrary=score} [Used with base schema Increasing/Decreasing.] -** Other-modulators-effect-EEG {requireChild, inLibrary=score} -*** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] -** Facilitating-factor {inLibrary=score} [Facilitating factors are defined as transient and sporadic endogenous or exogenous elements capable of augmenting seizure incidence (increasing the likelihood of seizure occurrence).] -*** Facilitating-factor-alcohol {inLibrary=score} -**** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] -*** Facilitating-factor-awake {inLibrary=score} -**** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] -*** Facilitating-factor-catamenial {inLibrary=score} -**** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] -*** Facilitating-factor-fever {inLibrary=score} -**** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] -*** Facilitating-factor-sleep {inLibrary=score} -**** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] -*** Facilitating-factor-sleep-deprived {inLibrary=score} -**** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] -*** Facilitating-factor-other {requireChild, inLibrary=score} -**** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] -** Provocative-factor {requireChild, inLibrary=score} [Provocative factors are defined as transient and sporadic endogenous or exogenous elements capable of evoking/triggering seizures immediately following the exposure to it.] -*** Hyperventilation-provoked {inLibrary=score} -**** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] -*** Reflex-provoked {inLibrary=score} -**** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] -** Medication-effect-clinical {suggestedTag=Finding-stopped-by, suggestedTag=Finding-unmodified, inLibrary=score} [Medications clinical effect. Used with base schema Increasing/Decreasing.] -** Medication-reduction-effect-clinical {suggestedTag=Finding-stopped-by, suggestedTag=Finding-unmodified, inLibrary=score} [Medications reduction or withdrawal clinical effect. Used with base schema Increasing/Decreasing.] -** Other-modulators-effect-clinical {requireChild, inLibrary=score} -*** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] -** Intermittent-photic-stimulation-effect {requireChild, inLibrary=score} -*** Posterior-stimulus-dependent-intermittent-photic-stimulation-response {suggestedTag=Finding-frequency, inLibrary=score} -**** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] -*** Posterior-stimulus-independent-intermittent-photic-stimulation-response-limited {suggestedTag=Finding-frequency, inLibrary=score} [limited to the stimulus-train] -**** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] -*** Posterior-stimulus-independent-intermittent-photic-stimulation-response-self-sustained {suggestedTag=Finding-frequency, inLibrary=score} -**** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] -*** Generalized-photoparoxysmal-intermittent-photic-stimulation-response-limited {suggestedTag=Finding-frequency, inLibrary=score} [Limited to the stimulus-train.] -**** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] -*** Generalized-photoparoxysmal-intermittent-photic-stimulation-response-self-sustained {suggestedTag=Finding-frequency, inLibrary=score} -**** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] -*** Activation-of-pre-existing-epileptogenic-area-intermittent-photic-stimulation-effect {suggestedTag=Finding-frequency, inLibrary=score} -**** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] -*** Unmodified-intermittent-photic-stimulation-effect {inLibrary=score} -**** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] -** Quality-of-hyperventilation {requireChild, inLibrary=score} -*** Hyperventilation-refused-procedure {inLibrary=score} -**** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] -*** Hyperventilation-poor-effort {inLibrary=score} -**** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] -*** Hyperventilation-good-effort {inLibrary=score} -**** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] -*** Hyperventilation-excellent-effort {inLibrary=score} -**** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] -** Modulators-effect {requireChild, inLibrary=score} [Tags for describing the influence of the modulators] -*** Modulators-effect-continuous-during-NRS {inLibrary=score} [Continuous during non-rapid-eye-movement-sleep (NRS)] -**** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] -*** Modulators-effect-only-during {inLibrary=score} -**** # {takesValue, valueClass=textClass, inLibrary=score} [Only during Sleep/Awakening/Hyperventilation/Physical effort/Cognitive task. Free text.] -*** Modulators-effect-change-of-patterns {inLibrary=score} [Change of patterns during sleep/awakening.] -**** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] -* Time-related-property {requireChild, inLibrary=score} [Important to estimate how often an interictal abnormality is seen in the recording.] -** Appearance-mode {requireChild, suggestedTag=Property-not-possible-to-determine, inLibrary=score} [Describes how the non-ictal EEG pattern/graphoelement is distributed through the recording.] -*** Random-appearance-mode {inLibrary=score} [Occurrence of the non-ictal EEG pattern / graphoelement without any rhythmicity / periodicity.] -**** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] -*** Periodic-appearance-mode {inLibrary=score} [Non-ictal EEG pattern / graphoelement occurring at an approximately regular rate / interval (generally of 1 to several seconds).] -**** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] -*** Variable-appearance-mode {inLibrary=score} [Occurrence of non-ictal EEG pattern / graphoelements, that is sometimes rhythmic or periodic, other times random, throughout the recording.] -**** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] -*** Intermittent-appearance-mode {inLibrary=score} -**** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] -*** Continuous-appearance-mode {inLibrary=score} -**** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] -** Discharge-pattern {requireChild, inLibrary=score} [Describes the organization of the EEG signal within the discharge (distinguish between single and repetitive discharges)] -*** Single-discharge-pattern {suggestedTag=Finding-incidence, inLibrary=score} [Applies to the intra-burst pattern: a graphoelement that is not repetitive; before and after the graphoelement one can distinguish the background activity.] -**** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] -*** Rhythmic-trains-or-bursts-discharge-pattern {suggestedTag=Finding-prevalence, suggestedTag=Finding-frequency, inLibrary=score} [Applies to the intra-burst pattern: a non-ictal graphoelement that repeats itself without returning to the background activity between them. The graphoelements within this repetition occur at approximately constant period.] -**** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] -*** Arrhythmic-trains-or-bursts-discharge-pattern {suggestedTag=Finding-prevalence, inLibrary=score} [Applies to the intra-burst pattern: a non-ictal graphoelement that repeats itself without returning to the background activity between them. The graphoelements within this repetition occur at inconstant period.] -**** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] -*** Fragmented-discharge-pattern {inLibrary=score} -**** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] -** Periodic-discharge-time-related-features {requireChild, inLibrary=score} [Periodic discharges not further specified (PDs) time-relayed features tags.] -*** Periodic-discharge-duration {requireChild, suggestedTag=Property-not-possible-to-determine, inLibrary=score} -**** Very-brief-periodic-discharge-duration {inLibrary=score} [Less than 10 sec.] -***** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] -**** Brief-periodic-discharge-duration {inLibrary=score} [10 to 59 sec.] -***** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] -**** Intermediate-periodic-discharge-duration {inLibrary=score} [1 to 4.9 min.] -***** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] -**** Long-periodic-discharge-duration {inLibrary=score} [5 to 59 min.] -***** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] -**** Very-long-periodic-discharge-duration {inLibrary=score} [Greater than 1 hour.] -***** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] -*** Periodic-discharge-onset {requireChild, suggestedTag=Property-not-possible-to-determine, inLibrary=score} -**** Sudden-periodic-discharge-onset {inLibrary=score} -***** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] -**** Gradual-periodic-discharge-onset {inLibrary=score} -***** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] -*** Periodic-discharge-dynamics {requireChild, suggestedTag=Property-not-possible-to-determine, inLibrary=score} -**** Evolving-periodic-discharge-dynamics {inLibrary=score} -***** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] -**** Fluctuating-periodic-discharge-dynamics {inLibrary=score} -***** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] -**** Static-periodic-discharge-dynamics {inLibrary=score} -***** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] -** Finding-extent {inLibrary=score} [Percentage of occurrence during the recording (background activity and interictal finding).] -*** # {takesValue, valueClass=numericClass, inLibrary=score} -** Finding-incidence {requireChild, inLibrary=score} [How often it occurs/time-epoch.] -*** Only-once-finding-incidence {inLibrary=score} -**** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] -*** Rare-finding-incidence {inLibrary=score} [less than 1/h] -**** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] -*** Uncommon-finding-incidence {inLibrary=score} [1/5 min to 1/h.] -**** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] -*** Occasional-finding-incidence {inLibrary=score} [1/min to 1/5min.] -**** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] -*** Frequent-finding-incidence {inLibrary=score} [1/10 s to 1/min.] -**** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] -*** Abundant-finding-incidence {inLibrary=score} [Greater than 1/10 s).] -**** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] -** Finding-prevalence {requireChild, inLibrary=score} [The percentage of the recording covered by the train/burst.] -*** Rare-finding-prevalence {inLibrary=score} [Less than 1 percent.] -**** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] -*** Occasional-finding-prevalence {inLibrary=score} [1 to 9 percent.] -**** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] -*** Frequent-finding-prevalence {inLibrary=score} [10 to 49 percent.] -**** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] -*** Abundant-finding-prevalence {inLibrary=score} [50 to 89 percent.] -**** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] -*** Continuous-finding-prevalence {inLibrary=score} [Greater than 90 percent.] -**** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] -* Posterior-dominant-rhythm-property {requireChild, inLibrary=score} [Posterior dominant rhythm is the most often scored EEG feature in clinical practice. Therefore, there are specific terms that can be chosen for characterizing the PDR.] -** Posterior-dominant-rhythm-amplitude-range {requireChild, suggestedTag=Property-not-possible-to-determine, inLibrary=score} -*** Low-posterior-dominant-rhythm-amplitude-range {inLibrary=score} [Low (less than 20 microV).] -**** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] -*** Medium-posterior-dominant-rhythm-amplitude-range {inLibrary=score} [Medium (between 20 and 70 microV).] -**** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] -*** High-posterior-dominant-rhythm-amplitude-range {inLibrary=score} [High (more than 70 microV).] -**** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] -** Posterior-dominant-rhythm-frequency-asymmetry {requireChild, inLibrary=score} [When symmetrical could be labeled with base schema Symmetrical tag.] -*** Posterior-dominant-rhythm-frequency-asymmetry-lower-left {inLibrary=score} [Hz lower on the left side.] -**** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] -*** Posterior-dominant-rhythm-frequency-asymmetry-lower-right {inLibrary=score} [Hz lower on the right side.] -**** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] -** Posterior-dominant-rhythm-eye-opening-reactivity {suggestedTag=Property-not-possible-to-determine, inLibrary=score} [Change (disappearance or measurable decrease in amplitude) of a posterior dominant rhythm following eye-opening. Eye closure has the opposite effect.] -*** Posterior-dominant-rhythm-eye-opening-reactivity-reduced-left {inLibrary=score} [Reduced left side reactivity.] -**** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] -*** Posterior-dominant-rhythm-eye-opening-reactivity-reduced-right {inLibrary=score} [Reduced right side reactivity.] -**** # {takesValue, valueClass=textClass, inLibrary=score} [free text] -*** Posterior-dominant-rhythm-eye-opening-reactivity-reduced-both {inLibrary=score} [Reduced reactivity on both sides.] -**** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] -** Posterior-dominant-rhythm-organization {requireChild, inLibrary=score} [When normal could be labeled with base schema Normal tag.] -*** Posterior-dominant-rhythm-organization-poorly-organized {inLibrary=score} [Poorly organized.] -**** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] -*** Posterior-dominant-rhythm-organization-disorganized {inLibrary=score} [Disorganized.] -**** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] -*** Posterior-dominant-rhythm-organization-markedly-disorganized {inLibrary=score} [Markedly disorganized.] -**** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] -** Posterior-dominant-rhythm-caveat {requireChild, inLibrary=score} [Caveat to the annotation of PDR.] -*** No-posterior-dominant-rhythm-caveat {inLibrary=score} -**** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] -*** Posterior-dominant-rhythm-caveat-only-open-eyes-during-the-recording {inLibrary=score} -**** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] -*** Posterior-dominant-rhythm-caveat-sleep-deprived-caveat {inLibrary=score} -**** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] -*** Posterior-dominant-rhythm-caveat-drowsy {inLibrary=score} -**** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] -*** Posterior-dominant-rhythm-caveat-only-following-hyperventilation {inLibrary=score} -** Absence-of-posterior-dominant-rhythm {requireChild, inLibrary=score} [Reason for absence of PDR.] -*** Absence-of-posterior-dominant-rhythm-artifacts {inLibrary=score} -**** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] -*** Absence-of-posterior-dominant-rhythm-extreme-low-voltage {inLibrary=score} -**** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] -*** Absence-of-posterior-dominant-rhythm-eye-closure-could-not-be-achieved {inLibrary=score} -**** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] -*** Absence-of-posterior-dominant-rhythm-lack-of-awake-period {inLibrary=score} -**** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] -*** Absence-of-posterior-dominant-rhythm-lack-of-compliance {inLibrary=score} -**** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] -*** Absence-of-posterior-dominant-rhythm-other-causes {requireChild, inLibrary=score} -**** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] -* Episode-property {requireChild, inLibrary=score} -** Seizure-classification {requireChild, inLibrary=score} [Epileptic seizures are named using the current ILAE seizure classification (Fisher et al., 2017, Beniczky et al., 2017).] -*** Motor-onset-seizure {inLibrary=score} -**** Myoclonic-motor-onset-seizure {inLibrary=score} -**** Negative-myoclonic-motor-onset-seizure {inLibrary=score} -**** Clonic-motor-onset-seizure {inLibrary=score} -**** Tonic-motor-onset-seizure {inLibrary=score} -**** Atonic-motor-onset-seizure {inLibrary=score} -**** Myoclonic-atonic-motor-onset-seizure {inLibrary=score} -**** Myoclonic-tonic-clonic-motor-onset-seizure {inLibrary=score} -**** Tonic-clonic-motor-onset-seizure {inLibrary=score} -**** Automatism-motor-onset-seizure {inLibrary=score} -**** Hyperkinetic-motor-onset-seizure {inLibrary=score} -**** Epileptic-spasm-episode {inLibrary=score} -*** Nonmotor-onset-seizure {inLibrary=score} -**** Behavior-arrest-nonmotor-onset-seizure {inLibrary=score} -**** Sensory-nonmotor-onset-seizure {inLibrary=score} -**** Emotional-nonmotor-onset-seizure {inLibrary=score} -**** Cognitive-nonmotor-onset-seizure {inLibrary=score} -**** Autonomic-nonmotor-onset-seizure {inLibrary=score} -*** Absence-seizure {inLibrary=score} -**** Typical-absence-seizure {inLibrary=score} -**** Atypical-absence-seizure {inLibrary=score} -**** Myoclonic-absence-seizure {inLibrary=score} -**** Eyelid-myoclonia-absence-seizure {inLibrary=score} -** Episode-phase {requireChild, suggestedTag=Seizure-semiology-manifestation, suggestedTag=Postictal-semiology-manifestation, suggestedTag=Ictal-EEG-patterns, inLibrary=score} [The electroclinical findings (i.e., the seizure semiology and the ictal EEG) are divided in three phases: onset, propagation, and postictal.] -*** Episode-phase-initial {inLibrary=score} -*** Episode-phase-subsequent {inLibrary=score} -*** Episode-phase-postictal {inLibrary=score} -** Seizure-semiology-manifestation {requireChild, inLibrary=score} [Semiology is described according to the ILAE Glossary of Descriptive Terminology for Ictal Semiology (Blume et al., 2001). Besides the name, the semiologic finding can also be characterized by the somatotopic modifier, laterality, body part and centricity. Uses Location-property tags.] -*** Semiology-motor-manifestation {inLibrary=score} -**** Semiology-elementary-motor {inLibrary=score} -***** Semiology-motor-tonic {suggestedTag=Brain-laterality, suggestedTag=Body-part, suggestedTag=Brain-centricity, suggestedTag=Episode-event-count, inLibrary=score} [A sustained increase in muscle contraction lasting a few seconds to minutes.] -***** Semiology-motor-dystonic {suggestedTag=Brain-laterality, suggestedTag=Body-part, suggestedTag=Brain-centricity, suggestedTag=Episode-event-count, inLibrary=score} [Sustained contractions of both agonist and antagonist muscles producing athetoid or twisting movements, which, when prolonged, may produce abnormal postures.] -***** Semiology-motor-epileptic-spasm {suggestedTag=Brain-laterality, suggestedTag=Body-part, suggestedTag=Brain-centricity, suggestedTag=Episode-event-count, inLibrary=score} [A sudden flexion, extension, or mixed extension flexion of predominantly proximal and truncal muscles that is usually more sustained than a myoclonic movement but not so sustained as a tonic seizure (i.e., about 1 s). Limited forms may occur: grimacing, head nodding. Frequent occurrence in clusters.] -***** Semiology-motor-postural {suggestedTag=Brain-laterality, suggestedTag=Body-part, suggestedTag=Brain-centricity, suggestedTag=Episode-event-count, inLibrary=score} [Adoption of a posture that may be bilaterally symmetric or asymmetric (as in a fencing posture).] -***** Semiology-motor-versive {suggestedTag=Body-part, suggestedTag=Episode-event-count, inLibrary=score} [A sustained, forced conjugate ocular, cephalic, and/or truncal rotation or lateral deviation from the midline.] -***** Semiology-motor-clonic {suggestedTag=Brain-laterality, suggestedTag=Body-part, suggestedTag=Brain-centricity, suggestedTag=Episode-event-count, inLibrary=score} [Myoclonus that is regularly repetitive, involves the same muscle groups, at a frequency of about 2 to 3 c/s, and is prolonged. Synonym: rhythmic myoclonus .] -***** Semiology-motor-myoclonic {suggestedTag=Brain-laterality, suggestedTag=Body-part, suggestedTag=Brain-centricity, suggestedTag=Episode-event-count, inLibrary=score} [Characterized by myoclonus. MYOCLONUS : sudden, brief (lower than 100 ms) involuntary single or multiple contraction(s) of muscles(s) or muscle groups of variable topography (axial, proximal limb, distal).] -***** Semiology-motor-jacksonian-march {suggestedTag=Brain-laterality, suggestedTag=Body-part, suggestedTag=Brain-centricity, suggestedTag=Episode-event-count, inLibrary=score} [Term indicating spread of clonic movements through contiguous body parts unilaterally.] -***** Semiology-motor-negative-myoclonus {suggestedTag=Brain-laterality, suggestedTag=Body-part, suggestedTag=Brain-centricity, suggestedTag=Episode-event-count, inLibrary=score} [Characterized by negative myoclonus. NEGATIVE MYOCLONUS: interruption of tonic muscular activity for lower than 500 ms without evidence of preceding myoclonia.] -***** Semiology-motor-tonic-clonic {requireChild, inLibrary=score} [A sequence consisting of a tonic followed by a clonic phase. Variants such as clonic-tonic-clonic may be seen. Asymmetry of limb posture during the tonic phase of a GTC: one arm is rigidly extended at the elbow (often with the fist clenched tightly and flexed at the wrist), whereas the opposite arm is flexed at the elbow.] -****** Semiology-motor-tonic-clonic-without-figure-of-four {suggestedTag=Brain-laterality, suggestedTag=Body-part, suggestedTag=Brain-centricity, suggestedTag=Episode-event-count, inLibrary=score} -****** Semiology-motor-tonic-clonic-with-figure-of-four-extension-left-elbow {suggestedTag=Brain-laterality, suggestedTag=Body-part, suggestedTag=Brain-centricity, suggestedTag=Episode-event-count, inLibrary=score} -****** Semiology-motor-tonic-clonic-with-figure-of-four-extension-right-elbow {suggestedTag=Brain-laterality, suggestedTag=Body-part, suggestedTag=Brain-centricity, suggestedTag=Episode-event-count, inLibrary=score} -***** Semiology-motor-astatic {suggestedTag=Brain-laterality, suggestedTag=Body-part, suggestedTag=Brain-centricity, suggestedTag=Episode-event-count, inLibrary=score} [Loss of erect posture that results from an atonic, myoclonic, or tonic mechanism. Synonym: drop attack.] -***** Semiology-motor-atonic {suggestedTag=Brain-laterality, suggestedTag=Body-part, suggestedTag=Brain-centricity, suggestedTag=Episode-event-count, inLibrary=score} [Sudden loss or diminution of muscle tone without apparent preceding myoclonic or tonic event lasting greater or equal to 1 to 2 s, involving head, trunk, jaw, or limb musculature.] -***** Semiology-motor-eye-blinking {suggestedTag=Brain-laterality, suggestedTag=Episode-event-count, inLibrary=score} -***** Semiology-motor-other-elementary-motor {requireChild, inLibrary=score} -****** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] -**** Semiology-motor-automatisms {inLibrary=score} -***** Semiology-motor-automatisms-mimetic {suggestedTag=Episode-responsiveness, suggestedTag=Episode-appearance, suggestedTag=Episode-event-count, inLibrary=score} [Facial expression suggesting an emotional state, often fear.] -***** Semiology-motor-automatisms-oroalimentary {suggestedTag=Episode-responsiveness, suggestedTag=Episode-appearance, suggestedTag=Episode-event-count, inLibrary=score} [Lip smacking, lip pursing, chewing, licking, tooth grinding, or swallowing.] -***** Semiology-motor-automatisms-dacrystic {suggestedTag=Episode-responsiveness, suggestedTag=Episode-appearance, suggestedTag=Episode-event-count, inLibrary=score} [Bursts of crying.] -***** Semiology-motor-automatisms-dyspraxic {suggestedTag=Brain-laterality, suggestedTag=Body-part, suggestedTag=Brain-centricity, suggestedTag=Episode-responsiveness, suggestedTag=Episode-appearance, suggestedTag=Episode-event-count, inLibrary=score} [Inability to perform learned movements spontaneously or on command or imitation despite intact relevant motor and sensory systems and adequate comprehension and cooperation.] -***** Semiology-motor-automatisms-manual {suggestedTag=Brain-laterality, suggestedTag=Brain-centricity, suggestedTag=Episode-responsiveness, suggestedTag=Episode-appearance, suggestedTag=Episode-event-count, inLibrary=score} [1. Indicates principally distal components, bilateral or unilateral. 2. Fumbling, tapping, manipulating movements.] -***** Semiology-motor-automatisms-gestural {suggestedTag=Brain-laterality, suggestedTag=Episode-responsiveness, suggestedTag=Episode-appearance, suggestedTag=Episode-event-count, inLibrary=score} [Semipurposive, asynchronous hand movements. Often unilateral.] -***** Semiology-motor-automatisms-pedal {suggestedTag=Brain-laterality, suggestedTag=Brain-centricity, suggestedTag=Episode-responsiveness, suggestedTag=Episode-appearance, suggestedTag=Episode-event-count, inLibrary=score} [1. Indicates principally distal components, bilateral or unilateral. 2. Fumbling, tapping, manipulating movements.] -***** Semiology-motor-automatisms-hypermotor {suggestedTag=Brain-laterality, suggestedTag=Body-part, suggestedTag=Brain-centricity, suggestedTag=Episode-responsiveness, suggestedTag=Episode-appearance, suggestedTag=Episode-event-count, inLibrary=score} [1. Involves predominantly proximal limb or axial muscles producing irregular sequential ballistic movements, such as pedaling, pelvic thrusting, thrashing, rocking movements. 2. Increase in rate of ongoing movements or inappropriately rapid performance of a movement.] -***** Semiology-motor-automatisms-hypokinetic {suggestedTag=Brain-laterality, suggestedTag=Body-part, suggestedTag=Brain-centricity, suggestedTag=Episode-responsiveness, suggestedTag=Episode-appearance, suggestedTag=Episode-event-count, inLibrary=score} [A decrease in amplitude and/or rate or arrest of ongoing motor activity.] -***** Semiology-motor-automatisms-gelastic {suggestedTag=Episode-responsiveness, suggestedTag=Episode-appearance, suggestedTag=Episode-event-count, inLibrary=score} [Bursts of laughter or giggling, usually without an appropriate affective tone.] -***** Semiology-motor-other-automatisms {requireChild, inLibrary=score} -****** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] -**** Semiology-motor-behavioral-arrest {suggestedTag=Brain-laterality, suggestedTag=Body-part, suggestedTag=Brain-centricity, suggestedTag=Episode-event-count, inLibrary=score} [Interruption of ongoing motor activity or of ongoing behaviors with fixed gaze, without movement of the head or trunk (oro-alimentary and hand automatisms may continue).] -*** Semiology-non-motor-manifestation {inLibrary=score} -**** Semiology-sensory {inLibrary=score} -***** Semiology-sensory-headache {suggestedTag=Brain-laterality, suggestedTag=Episode-event-count, inLibrary=score} [Headache occurring in close temporal proximity to the seizure or as the sole seizure manifestation.] -***** Semiology-sensory-visual {suggestedTag=Brain-laterality, suggestedTag=Episode-event-count, inLibrary=score} [Flashing or flickering lights, spots, simple patterns, scotomata, or amaurosis.] -***** Semiology-sensory-auditory {suggestedTag=Brain-laterality, suggestedTag=Episode-event-count, inLibrary=score} [Buzzing, drumming sounds or single tones.] -***** Semiology-sensory-olfactory {suggestedTag=Body-part, suggestedTag=Episode-event-count, inLibrary=score} -***** Semiology-sensory-gustatory {suggestedTag=Episode-event-count, inLibrary=score} [Taste sensations including acidic, bitter, salty, sweet, or metallic.] -***** Semiology-sensory-epigastric {suggestedTag=Episode-event-count, inLibrary=score} [Abdominal discomfort including nausea, emptiness, tightness, churning, butterflies, malaise, pain, and hunger; sensation may rise to chest or throat. Some phenomena may reflect ictal autonomic dysfunction.] -***** Semiology-sensory-somatosensory {suggestedTag=Brain-laterality, suggestedTag=Body-part, suggestedTag=Brain-centricity, suggestedTag=Episode-event-count, inLibrary=score} [Tingling, numbness, electric-shock sensation, sense of movement or desire to move.] -***** Semiology-sensory-painful {suggestedTag=Brain-laterality, suggestedTag=Body-part, suggestedTag=Brain-centricity, suggestedTag=Episode-event-count, inLibrary=score} [Peripheral (lateralized/bilateral), cephalic, abdominal.] -***** Semiology-sensory-autonomic-sensation {suggestedTag=Episode-event-count, inLibrary=score} [A sensation consistent with involvement of the autonomic nervous system, including cardiovascular, gastrointestinal, sudomotor, vasomotor, and thermoregulatory functions. (Thus autonomic aura; cf. autonomic events 3.0).] -***** Semiology-sensory-other {requireChild, inLibrary=score} -****** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] -**** Semiology-experiential {inLibrary=score} -***** Semiology-experiential-affective-emotional {suggestedTag=Episode-event-count, inLibrary=score} [Components include fear, depression, joy, and (rarely) anger.] -***** Semiology-experiential-hallucinatory {suggestedTag=Episode-event-count, inLibrary=score} [Composite perceptions without corresponding external stimuli involving visual, auditory, somatosensory, olfactory, and/or gustatory phenomena. Example: hearing and seeing people talking.] -***** Semiology-experiential-illusory {suggestedTag=Episode-event-count, inLibrary=score} [An alteration of actual percepts involving the visual, auditory, somatosensory, olfactory, or gustatory systems.] -***** Semiology-experiential-mnemonic {inLibrary=score} [Components that reflect ictal dysmnesia such as feelings of familiarity (deja-vu) and unfamiliarity (jamais-vu).] -****** Semiology-experiential-mnemonic-Deja-vu {suggestedTag=Episode-event-count, inLibrary=score} -****** Semiology-experiential-mnemonic-Jamais-vu {suggestedTag=Episode-event-count, inLibrary=score} -***** Semiology-experiential-other {requireChild, inLibrary=score} -****** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] -**** Semiology-dyscognitive {suggestedTag=Episode-event-count, inLibrary=score} [The term describes events in which (1) disturbance of cognition is the predominant or most apparent feature, and (2a) two or more of the following components are involved, or (2b) involvement of such components remains undetermined. Otherwise, use the more specific term (e.g., mnemonic experiential seizure or hallucinatory experiential seizure). Components of cognition: ++ perception: symbolic conception of sensory information ++ attention: appropriate selection of a principal perception or task ++ emotion: appropriate affective significance of a perception ++ memory: ability to store and retrieve percepts or concepts ++ executive function: anticipation, selection, monitoring of consequences, and initiation of motor activity including praxis, speech.] -**** Semiology-language-related {inLibrary=score} -***** Semiology-language-related-vocalization {suggestedTag=Episode-event-count, inLibrary=score} -***** Semiology-language-related-verbalization {suggestedTag=Episode-event-count, inLibrary=score} -***** Semiology-language-related-dysphasia {suggestedTag=Episode-event-count, inLibrary=score} -***** Semiology-language-related-aphasia {suggestedTag=Episode-event-count, inLibrary=score} -***** Semiology-language-related-other {requireChild, inLibrary=score} -****** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] -**** Semiology-autonomic {inLibrary=score} -***** Semiology-autonomic-pupillary {suggestedTag=Brain-laterality, suggestedTag=Episode-event-count, inLibrary=score} [Mydriasis, miosis (either bilateral or unilateral).] -***** Semiology-autonomic-hypersalivation {suggestedTag=Episode-event-count, inLibrary=score} [Increase in production of saliva leading to uncontrollable drooling] -***** Semiology-autonomic-respiratory-apnoeic {suggestedTag=Episode-event-count, inLibrary=score} [subjective shortness of breath, hyperventilation, stridor, coughing, choking, apnea, oxygen desaturation, neurogenic pulmonary edema.] -***** Semiology-autonomic-cardiovascular {suggestedTag=Episode-event-count, inLibrary=score} [Modifications of heart rate (tachycardia, bradycardia), cardiac arrhythmias (such as sinus arrhythmia, sinus arrest, supraventricular tachycardia, atrial premature depolarizations, ventricular premature depolarizations, atrio-ventricular block, bundle branch block, atrioventricular nodal escape rhythm, asystole).] -***** Semiology-autonomic-gastrointestinal {suggestedTag=Episode-event-count, inLibrary=score} [Nausea, eructation, vomiting, retching, abdominal sensations, abdominal pain, flatulence, spitting, diarrhea.] -***** Semiology-autonomic-urinary-incontinence {suggestedTag=Episode-event-count, inLibrary=score} [urinary urge (intense urinary urge at the beginning of seizures), urinary incontinence, ictal urination (rare symptom of partial seizures without loss of consciousness).] -***** Semiology-autonomic-genital {suggestedTag=Episode-event-count, inLibrary=score} [Sexual auras (erotic thoughts and feelings, sexual arousal and orgasm). Genital auras (unpleasant, sometimes painful, frightening or emotionally neutral somatosensory sensations in the genitals that can be accompanied by ictal orgasm). Sexual automatisms (hypermotor movements consisting of writhing, thrusting, rhythmic movements of the pelvis, arms and legs, sometimes associated with picking and rhythmic manipulation of the groin or genitalia, exhibitionism and masturbation).] -***** Semiology-autonomic-vasomotor {suggestedTag=Episode-event-count, inLibrary=score} [Flushing or pallor (may be accompanied by feelings of warmth, cold and pain).] -***** Semiology-autonomic-sudomotor {suggestedTag=Brain-laterality, suggestedTag=Episode-event-count, inLibrary=score} [Sweating and piloerection (may be accompanied by feelings of warmth, cold and pain).] -***** Semiology-autonomic-thermoregulatory {suggestedTag=Episode-event-count, inLibrary=score} [Hyperthermia, fever.] -***** Semiology-autonomic-other {requireChild, inLibrary=score} -****** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] -*** Semiology-manifestation-other {requireChild, inLibrary=score} -**** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] -** Postictal-semiology-manifestation {requireChild, inLibrary=score} -*** Postictal-semiology-unconscious {suggestedTag=Episode-event-count, inLibrary=score} -*** Postictal-semiology-quick-recovery-of-consciousness {suggestedTag=Episode-event-count, inLibrary=score} [Quick recovery of awareness and responsiveness.] -*** Postictal-semiology-aphasia-or-dysphasia {suggestedTag=Episode-event-count, inLibrary=score} [Impaired communication involving language without dysfunction of relevant primary motor or sensory pathways, manifested as impaired comprehension, anomia, parahasic errors or a combination of these.] -*** Postictal-semiology-behavioral-change {suggestedTag=Episode-event-count, inLibrary=score} [Occurring immediately after a aseizure. Including psychosis, hypomanina, obsessive-compulsive behavior.] -*** Postictal-semiology-hemianopia {suggestedTag=Brain-laterality, suggestedTag=Episode-event-count, inLibrary=score} [Postictal visual loss in a a hemi field.] -*** Postictal-semiology-impaired-cognition {suggestedTag=Episode-event-count, inLibrary=score} [Decreased Cognitive performance involving one or more of perception, attention, emotion, memory, execution, praxis, speech.] -*** Postictal-semiology-dysphoria {suggestedTag=Episode-event-count, inLibrary=score} [Depression, irritability, euphoric mood, fear, anxiety.] -*** Postictal-semiology-headache {suggestedTag=Episode-event-count, inLibrary=score} [Headache with features of tension-type or migraine headache that develops within 3 h following the seizure and resolves within 72 h after seizure.] -*** Postictal-semiology-nose-wiping {suggestedTag=Brain-laterality, suggestedTag=Episode-event-count, inLibrary=score} [Noes-wiping usually within 60 sec of seizure offset, usually with the hand ipsilateral to the seizure onset.] -*** Postictal-semiology-anterograde-amnesia {suggestedTag=Episode-event-count, inLibrary=score} [Impaired ability to remember new material.] -*** Postictal-semiology-retrograde-amnesia {suggestedTag=Episode-event-count, inLibrary=score} [Impaired ability to recall previously remember material.] -*** Postictal-semiology-paresis {suggestedTag=Brain-laterality, suggestedTag=Body-part, suggestedTag=Brain-centricity, suggestedTag=Episode-event-count, inLibrary=score} [Todds palsy. Any unilateral postictal dysfunction relating to motor, language, sensory and/or integrative functions.] -*** Postictal-semiology-sleep {inLibrary=score} [Invincible need to sleep after a seizure.] -*** Postictal-semiology-unilateral-myoclonic-jerks {inLibrary=score} [unilateral motor phenomena, other then specified, occurring in postictal phase.] -*** Postictal-semiology-other-unilateral-motor-phenomena {requireChild, inLibrary=score} -**** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] -** Polygraphic-channel-relation-to-episode {requireChild, suggestedTag=Property-not-possible-to-determine, inLibrary=score} -*** Polygraphic-channel-cause-to-episode {inLibrary=score} -*** Polygraphic-channel-consequence-of-episode {inLibrary=score} -** Ictal-EEG-patterns {inLibrary=score} -*** Ictal-EEG-patterns-obscured-by-artifacts {inLibrary=score} [The interpretation of the EEG is not possible due to artifacts.] -**** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] -*** Ictal-EEG-activity {suggestedTag=Polyspikes-morphology, suggestedTag=Fast-spike-activity-morphology, suggestedTag=Low-voltage-fast-activity-morphology, suggestedTag=Polysharp-waves-morphology, suggestedTag=Spike-and-slow-wave-morphology, suggestedTag=Polyspike-and-slow-wave-morphology, suggestedTag=Sharp-and-slow-wave-morphology, suggestedTag=Rhythmic-activity-morphology, suggestedTag=Slow-wave-large-amplitude-morphology, suggestedTag=Irregular-delta-or-theta-activity-morphology, suggestedTag=Electrodecremental-change-morphology, suggestedTag=DC-shift-morphology, suggestedTag=Disappearance-of-ongoing-activity-morphology, suggestedTag=Brain-laterality, suggestedTag=Brain-region, suggestedTag=Sensors, suggestedTag=Source-analysis-laterality, suggestedTag=Source-analysis-brain-region, suggestedTag=Episode-event-count, inLibrary=score} -*** Postictal-EEG-activity {suggestedTag=Brain-laterality, suggestedTag=Body-part, suggestedTag=Brain-centricity, inLibrary=score} -** Episode-time-context-property {inLibrary=score} [Additional clinically relevant features related to episodes can be scored under timing and context. If needed, episode duration can be tagged with base schema /Property/Data-property/Data-value/Spatiotemporal-value/Temporal-value/Duration.] -*** Episode-consciousness {requireChild, suggestedTag=Property-not-possible-to-determine, inLibrary=score} -**** Episode-consciousness-not-tested {inLibrary=score} -***** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] -**** Episode-consciousness-affected {inLibrary=score} -***** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] -**** Episode-consciousness-mildly-affected {inLibrary=score} -***** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] -**** Episode-consciousness-not-affected {inLibrary=score} -***** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] -*** Episode-awareness {suggestedTag=Property-not-possible-to-determine, suggestedTag=Property-exists, suggestedTag=Property-absence, inLibrary=score} -**** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] -*** Clinical-EEG-temporal-relationship {suggestedTag=Property-not-possible-to-determine, inLibrary=score} -**** Clinical-start-followed-EEG {inLibrary=score} [Clinical start, followed by EEG start by X seconds.] -***** # {takesValue, valueClass=numericClass, unitClass=timeUnits, inLibrary=score} -**** EEG-start-followed-clinical {inLibrary=score} [EEG start, followed by clinical start by X seconds.] -***** # {takesValue, valueClass=numericClass, unitClass=timeUnits, inLibrary=score} -**** Simultaneous-start-clinical-EEG {inLibrary=score} -**** Clinical-EEG-temporal-relationship-notes {inLibrary=score} [Clinical notes to annotate the clinical-EEG temporal relationship.] -***** # {takesValue, valueClass=textClass, inLibrary=score} -*** Episode-event-count {suggestedTag=Property-not-possible-to-determine, inLibrary=score} [Number of stereotypical episodes during the recording.] -**** # {takesValue, valueClass=numericClass, inLibrary=score} -*** State-episode-start {requireChild, suggestedTag=Property-not-possible-to-determine, inLibrary=score} [State at the start of the episode.] -**** Episode-start-from-sleep {inLibrary=score} -***** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] -**** Episode-start-from-awake {inLibrary=score} -***** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] -*** Episode-postictal-phase {suggestedTag=Property-not-possible-to-determine, inLibrary=score} -**** # {takesValue, valueClass=numericClass, unitClass=timeUnits, inLibrary=score} -*** Episode-prodrome {suggestedTag=Property-exists, suggestedTag=Property-absence, inLibrary=score} [Prodrome is a preictal phenomenon, and it is defined as a subjective or objective clinical alteration (e.g., ill-localized sensation or agitation) that heralds the onset of an epileptic seizure but does not form part of it (Blume et al., 2001). Therefore, prodrome should be distinguished from aura (which is an ictal phenomenon).] -**** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] -*** Episode-tongue-biting {suggestedTag=Property-exists, suggestedTag=Property-absence, inLibrary=score} -**** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] -*** Episode-responsiveness {requireChild, suggestedTag=Property-not-possible-to-determine, inLibrary=score} -**** Episode-responsiveness-preserved {inLibrary=score} -***** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] -**** Episode-responsiveness-affected {inLibrary=score} -***** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] -*** Episode-appearance {requireChild, inLibrary=score} -**** Episode-appearance-interactive {inLibrary=score} -***** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] -**** Episode-appearance-spontaneous {inLibrary=score} -***** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] -*** Seizure-dynamics {requireChild, inLibrary=score} [Spatiotemporal dynamics can be scored (evolution in morphology; evolution in frequency; evolution in location).] -**** Seizure-dynamics-evolution-morphology {inLibrary=score} -***** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] -**** Seizure-dynamics-evolution-frequency {inLibrary=score} -***** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] -**** Seizure-dynamics-evolution-location {inLibrary=score} -***** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] -**** Seizure-dynamics-not-possible-to-determine {inLibrary=score} [Not possible to determine.] -***** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] -* Other-finding-property {requireChild, inLibrary=score} -** Artifact-significance-to-recording {requireChild, inLibrary=score} [It is important to score the significance of the described artifacts: recording is not interpretable, recording of reduced diagnostic value, does not interfere with the interpretation of the recording.] -*** Recording-not-interpretable-due-to-artifact {inLibrary=score} -**** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] -*** Recording-of-reduced-diagnostic-value-due-to-artifact {inLibrary=score} -**** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] -*** Artifact-does-not-interfere-recording {inLibrary=score} -**** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] -** Finding-significance-to-recording {requireChild, inLibrary=score} [Significance of finding. When normal/abnormal could be labeled with base schema Normal/Abnormal tags.] -*** Finding-no-definite-abnormality {inLibrary=score} -**** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] -*** Finding-significance-not-possible-to-determine {inLibrary=score} [Not possible to determine.] -**** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] -** Finding-frequency {inLibrary=score} [Value in Hz (number) typed in.] -*** # {takesValue, valueClass=numericClass, unitClass=frequencyUnits, inLibrary=score} -** Finding-amplitude {inLibrary=score} [Value in microvolts (number) typed in.] -*** # {takesValue, valueClass=numericClass, unitClass=electricPotentialUnits, inLibrary=score} -** Finding-amplitude-asymmetry {requireChild, inLibrary=score} [For posterior dominant rhythm: a difference in amplitude between the homologous area on opposite sides of the head that consistently exceeds 50 percent. When symmetrical could be labeled with base schema Symmetrical tag. For sleep: Absence or consistently marked amplitude asymmetry (greater than 50 percent) of a normal sleep graphoelement.] -*** Finding-amplitude-asymmetry-lower-left {inLibrary=score} [Amplitude lower on the left side.] -**** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] -*** Finding-amplitude-asymmetry-lower-right {inLibrary=score} [Amplitude lower on the right side.] -**** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] -*** Finding-amplitude-asymmetry-not-possible-to-determine {inLibrary=score} [Not possible to determine.] -**** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] -** Finding-stopped-by {inLibrary=score} -*** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] -** Finding-triggered-by {inLibrary=score} -*** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] -** Finding-unmodified {inLibrary=score} -*** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] -** Property-not-possible-to-determine {inLibrary=score} [Not possible to determine.] -*** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] -** Property-exists {inLibrary=score} -*** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] -** Property-absence {inLibrary=score} -*** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] +'''Finding-property''' {requireChild} [Descriptive element similar to main HED /Property. Something that pertains to a thing. A characteristic of some entity. A quality or feature regarded as a characteristic or inherent part of someone or something. HED attributes are adjectives or adverbs.] + * Signal-morphology-property {requireChild} + ** Rhythmic-activity-morphology [EEG activity consisting of a sequence of waves approximately constant period.] + *** Delta-activity-morphology {suggestedTag=Finding-frequency, suggestedTag=Finding-amplitude} [EEG rhythm in the delta (under 4 Hz) range that does not belong to the posterior dominant rhythm (scored under other organized rhythms).] + **** # {takesValue, valueClass=textClass} [Free text.] + *** Theta-activity-morphology {suggestedTag=Finding-frequency, suggestedTag=Finding-amplitude} [EEG rhythm in the theta (4-8 Hz) range that does not belong to the posterior dominant rhythm (scored under other organized rhythm).] + **** # {takesValue, valueClass=textClass} [Free text.] + *** Alpha-activity-morphology {suggestedTag=Finding-frequency, suggestedTag=Finding-amplitude} [EEG rhythm in the alpha range (8-13 Hz) which is considered part of the background (ongoing) activity but does not fulfill the criteria of the posterior dominant rhythm (alpha rhythm).] + **** # {takesValue, valueClass=textClass} [Free text.] + *** Beta-activity-morphology {suggestedTag=Finding-frequency, suggestedTag=Finding-amplitude} [EEG rhythm between 14 and 40 Hz, which is considered part of the background (ongoing) activity but does not fulfill the criteria of the posterior dominant rhythm. Most characteristically: a rhythm from 14 to 40 Hz recorded over the fronto-central regions of the head during wakefulness. Amplitude of the beta rhythm varies but is mostly below 30 microV. Other beta rhythms are most prominent in other locations or are diffuse.] + **** # {takesValue, valueClass=textClass} [Free text.] + *** Gamma-activity-morphology {suggestedTag=Finding-frequency, suggestedTag=Finding-amplitude} + **** # {takesValue, valueClass=textClass} [Free text.] + ** Spike-morphology [A transient, clearly distinguished from background activity, with pointed peak at a conventional paper speed or time scale and duration from 20 to under 70 ms, i.e. 1/50-1/15 s approximately. Main component is generally negative relative to other areas. Amplitude varies.] + *** # {takesValue, valueClass=textClass} [Free text.] + ** Spike-and-slow-wave-morphology [A pattern consisting of a spike followed by a slow wave.] + *** # {takesValue, valueClass=textClass} [Free text.] + ** Runs-of-rapid-spikes-morphology [Bursts of spike discharges at a rate from 10 to 25/sec (in most cases somewhat irregular). The bursts last more than 2 seconds (usually 2 to 10 seconds) and it is typically seen in sleep. Synonyms: rhythmic spikes, generalized paroxysmal fast activity, fast paroxysmal rhythms, grand mal discharge, fast beta activity.] + *** # {takesValue, valueClass=textClass} [Free text.] + ** Polyspikes-morphology [Two or more consecutive spikes.] + *** # {takesValue, valueClass=textClass} [Free text.] + ** Polyspike-and-slow-wave-morphology [Two or more consecutive spikes associated with one or more slow waves.] + *** # {takesValue, valueClass=textClass} [Free text.] + ** Sharp-wave-morphology [A transient clearly distinguished from background activity, with pointed peak at a conventional paper speed or time scale, and duration of 70-200 ms, i.e. over 1/4-1/5 s approximately. Main component is generally negative relative to other areas. Amplitude varies.] + *** # {takesValue, valueClass=textClass} [Free text.] + ** Sharp-and-slow-wave-morphology [A sequence of a sharp wave and a slow wave.] + *** # {takesValue, valueClass=textClass} [Free text.] + ** Slow-sharp-wave-morphology [A transient that bears all the characteristics of a sharp-wave, but exceeds 200 ms. Synonym: blunted sharp wave.] + *** # {takesValue, valueClass=textClass} [Free text.] + ** High-frequency-oscillation-morphology [HFO.] + *** # {takesValue, valueClass=textClass} [Free text.] + ** Hypsarrhythmia-classic-morphology [Abnormal interictal high amplitude waves and a background of irregular spikes.] + *** # {takesValue, valueClass=textClass} [Free text.] + ** Hypsarrhythmia-modified-morphology + *** # {takesValue, valueClass=textClass} [Free text.] + ** Fast-spike-activity-morphology [A burst consisting of a sequence of spikes. Duration greater than 1 s. Frequency at least in the alpha range.] + *** # {takesValue, valueClass=textClass} [Free text.] + ** Low-voltage-fast-activity-morphology [Refers to the fast, and often recruiting activity which can be recorded at the onset of an ictal discharge, particularly in invasive EEG recording of a seizure.] + *** # {takesValue, valueClass=textClass} [Free text.] + ** Polysharp-waves-morphology [A sequence of two or more sharp-waves.] + *** # {takesValue, valueClass=textClass} [Free text.] + ** Slow-wave-large-amplitude-morphology + *** # {takesValue, valueClass=textClass} [Free text.] + ** Irregular-delta-or-theta-activity-morphology [EEG activity consisting of repetitive waves of inconsistent wave-duration but in delta and/or theta rang (greater than 125 ms).] + *** # {takesValue, valueClass=textClass} [Free text.] + ** Electrodecremental-change-morphology [Sudden desynchronization of electrical activity.] + *** # {takesValue, valueClass=textClass} [Free text.] + ** DC-shift-morphology [Shift of negative polarity of the direct current recordings, during seizures.] + *** # {takesValue, valueClass=textClass} [Free text.] + ** Disappearance-of-ongoing-activity-morphology [Disappearance of the EEG activity that preceded the ictal event but still remnants of background activity (thus not enough to name it electrodecremental change).] + *** # {takesValue, valueClass=textClass} [Free text.] + ** Polymorphic-delta-activity-morphology [EEG activity consisting of waves in the delta range (over 250 ms duration for each wave) but of different morphology.] + *** # {takesValue, valueClass=textClass} [Free text.] + ** Frontal-intermittent-rhythmic-delta-activity-morphology [Frontal intermittent rhythmic delta activity (FIRDA). Fairly regular or approximately sinusoidal waves, mostly occurring in bursts at 1.5-2.5 Hz over the frontal areas of one or both sides of the head. Comment: most commonly associated with unspecified encephalopathy, in adults.] + *** # {takesValue, valueClass=textClass} [Free text.] + ** Occipital-intermittent-rhythmic-delta-activity-morphology [Occipital intermittent rhythmic delta activity (OIRDA). Fairly regular or approximately sinusoidal waves, mostly occurring in bursts at 2-3 Hz over the occipital or posterior head regions of one or both sides of the head. Frequently blocked or attenuated by opening the eyes. Comment: most commonly associated with unspecified encephalopathy, in children.] + *** # {takesValue, valueClass=textClass} [Free text.] + ** Temporal-intermittent-rhythmic-delta-activity-morphology [Temporal intermittent rhythmic delta activity (TIRDA). Fairly regular or approximately sinusoidal waves, mostly occurring in bursts at over the temporal areas of one side of the head. Comment: most commonly associated with temporal lobe epilepsy.] + *** # {takesValue, valueClass=textClass} [Free text.] + ** Periodic-discharges-morphology {requireChild} [Periodic discharges not further specified (PDs).] + *** Periodic-discharges-superimposed-activity {requireChild, suggestedTag=Property-not-possible-to-determine} + **** Periodic-discharges-fast-superimposed-activity {suggestedTag=Finding-frequency} + ***** # {takesValue, valueClass=textClass} [Free text.] + **** Periodic-discharges-rhythmic-superimposed-activity {suggestedTag=Finding-frequency} + ***** # {takesValue, valueClass=textClass} [Free text.] + *** Periodic-discharge-sharpness {requireChild, suggestedTag=Property-not-possible-to-determine} + **** Spiky-periodic-discharge-sharpness + ***** # {takesValue, valueClass=textClass} [Free text.] + **** Sharp-periodic-discharge-sharpness + ***** # {takesValue, valueClass=textClass} [Free text.] + **** Sharply-contoured-periodic-discharge-sharpness + ***** # {takesValue, valueClass=textClass} [Free text.] + **** Blunt-periodic-discharge-sharpness + ***** # {takesValue, valueClass=textClass} [Free text.] + *** Number-of-periodic-discharge-phases {requireChild, suggestedTag=Property-not-possible-to-determine} + **** 1-periodic-discharge-phase + ***** # {takesValue, valueClass=textClass} [Free text.] + **** 2-periodic-discharge-phases + ***** # {takesValue, valueClass=textClass} [Free text.] + **** 3-periodic-discharge-phases + ***** # {takesValue, valueClass=textClass} [Free text.] + **** Greater-than-3-periodic-discharge-phases + ***** # {takesValue, valueClass=textClass} [Free text.] + *** Periodic-discharge-triphasic-morphology {suggestedTag=Property-not-possible-to-determine, suggestedTag=Property-exists, suggestedTag=Property-absence} + **** # {takesValue, valueClass=textClass} [Free text.] + *** Periodic-discharge-absolute-amplitude {requireChild, suggestedTag=Property-not-possible-to-determine} + **** Periodic-discharge-absolute-amplitude-very-low [Lower than 20 microV.] + ***** # {takesValue, valueClass=textClass} [Free text.] + **** Low-periodic-discharge-absolute-amplitude [20 to 49 microV.] + ***** # {takesValue, valueClass=textClass} [Free text.] + **** Medium-periodic-discharge-absolute-amplitude [50 to 199 microV.] + ***** # {takesValue, valueClass=textClass} [Free text.] + **** High-periodic-discharge-absolute-amplitude [Greater than 200 microV.] + ***** # {takesValue, valueClass=textClass} [Free text.] + *** Periodic-discharge-relative-amplitude {requireChild, suggestedTag=Property-not-possible-to-determine} + **** Periodic-discharge-relative-amplitude-less-than-equal-2 + ***** # {takesValue, valueClass=textClass} [Free text.] + **** Periodic-discharge-relative-amplitude-greater-than-2 + ***** # {takesValue, valueClass=textClass} [Free text.] + *** Periodic-discharge-polarity {requireChild} + **** Periodic-discharge-postitive-polarity + ***** # {takesValue, valueClass=textClass} [Free text.] + **** Periodic-discharge-negative-polarity + ***** # {takesValue, valueClass=textClass} [Free text.] + **** Periodic-discharge-unclear-polarity + ***** # {takesValue, valueClass=textClass} [Free text.] + * Source-analysis-property {requireChild} [How the current in the brain reaches the electrode sensors.] + ** Source-analysis-laterality {requireChild, suggestedTag=Brain-laterality} + ** Source-analysis-brain-region {requireChild} + *** Source-analysis-frontal-perisylvian-superior-surface + *** Source-analysis-frontal-lateral + *** Source-analysis-frontal-mesial + *** Source-analysis-frontal-polar + *** Source-analysis-frontal-orbitofrontal + *** Source-analysis-temporal-polar + *** Source-analysis-temporal-basal + *** Source-analysis-temporal-lateral-anterior + *** Source-analysis-temporal-lateral-posterior + *** Source-analysis-temporal-perisylvian-inferior-surface + *** Source-analysis-central-lateral-convexity + *** Source-analysis-central-mesial + *** Source-analysis-central-sulcus-anterior-surface + *** Source-analysis-central-sulcus-posterior-surface + *** Source-analysis-central-opercular + *** Source-analysis-parietal-lateral-convexity + *** Source-analysis-parietal-mesial + *** Source-analysis-parietal-opercular + *** Source-analysis-occipital-lateral + *** Source-analysis-occipital-mesial + *** Source-analysis-occipital-basal + *** Source-analysis-insula + * Location-property {requireChild} [Location can be scored for findings. Semiologic finding can also be characterized by the somatotopic modifier (i.e. the part of the body where it occurs). In this respect, laterality (left, right, symmetric, asymmetric, left greater than right, right greater than left), body part (eyelid, face, arm, leg, trunk, visceral, hemi-) and centricity (axial, proximal limb, distal limb) can be scored.] + ** Brain-laterality {requireChild} + *** Brain-laterality-left + **** # {takesValue, valueClass=textClass} [Free text.] + *** Brain-laterality-left-greater-right + **** # {takesValue, valueClass=textClass} [Free text.] + *** Brain-laterality-right + **** # {takesValue, valueClass=textClass} [Free text.] + *** Brain-laterality-right-greater-left + **** # {takesValue, valueClass=textClass} [Free text.] + *** Brain-laterality-midline + **** # {takesValue, valueClass=textClass} [Free text.] + *** Brain-laterality-diffuse-asynchronous + **** # {takesValue, valueClass=textClass} [Free text.] + ** Brain-region {requireChild} + *** Brain-region-frontal + **** # {takesValue, valueClass=textClass} [Free text.] + *** Brain-region-temporal + **** # {takesValue, valueClass=textClass} [Free text.] + *** Brain-region-central + **** # {takesValue, valueClass=textClass} [Free text.] + *** Brain-region-parietal + **** # {takesValue, valueClass=textClass} [Free text.] + *** Brain-region-occipital + **** # {takesValue, valueClass=textClass} [Free text.] + ** Body-part-location {requireChild} + *** Body-part-eyelid + **** # {takesValue, valueClass=textClass} [Free text.] + *** Body-part-face + **** # {takesValue, valueClass=textClass} [Free text.] + *** Body-part-arm + **** # {takesValue, valueClass=textClass} [Free text.] + *** Body-part-leg + **** # {takesValue, valueClass=textClass} [Free text.] + *** Body-part-trunk + **** # {takesValue, valueClass=textClass} [Free text.] + *** Body-part-visceral + **** # {takesValue, valueClass=textClass} [Free text.] + *** Body-part-hemi + **** # {takesValue, valueClass=textClass} [Free text.] + ** Brain-centricity {requireChild} + *** Brain-centricity-axial + **** # {takesValue, valueClass=textClass} [Free text.] + *** Brain-centricity-proximal-limb + **** # {takesValue, valueClass=textClass} [Free text.] + *** Brain-centricity-distal-limb + **** # {takesValue, valueClass=textClass} [Free text.] + ** Sensors {requireChild} [Lists all corresponding sensors (electrodes/channels in montage). The sensor-group is selected from a list defined in the site-settings for each EEG-lab.] + *** # {takesValue, valueClass=textClass} [Free text.] + ** Finding-propagation {suggestedTag=Property-exists, suggestedTag=Property-absence, suggestedTag=Brain-laterality, suggestedTag=Brain-region, suggestedTag=Sensors} [When propagation within the graphoelement is observed, first the location of the onset region is scored. Then, the location of the propagation can be noted.] + *** # {takesValue, valueClass=textClass} [Free text.] + ** Multifocal-finding {suggestedTag=Property-not-possible-to-determine, suggestedTag=Property-exists, suggestedTag=Property-absence} [When the same interictal graphoelement is observed bilaterally and at least in three independent locations, can score them using one entry, and choosing multifocal as a descriptor of the locations of the given interictal graphoelements, optionally emphasizing the involved, and the most active sites.] + *** # {takesValue, valueClass=textClass} [Free text.] + * Modulators-property {requireChild} [For each described graphoelement, the influence of the modulators can be scored. Only modulators present in the recording are scored.] + ** Modulators-reactivity {requireChild, suggestedTag=Property-exists, suggestedTag=Property-absence} [Susceptibility of individual rhythms or the EEG as a whole to change following sensory stimulation or other physiologic actions.] + *** # {takesValue, valueClass=textClass} [Free text.] + ** Eye-closure-sensitivity {suggestedTag=Property-exists, suggestedTag=Property-absence} [Eye closure sensitivity.] + *** # {takesValue, valueClass=textClass} [Free text.] + ** Eye-opening-passive {suggestedTag=Property-not-possible-to-determine, suggestedTag=Finding-stopped-by, suggestedTag=Finding-unmodified, suggestedTag=Finding-triggered-by} [Passive eye opening. Used with base schema Increasing/Decreasing.] + ** Medication-effect-EEG {suggestedTag=Property-not-possible-to-determine, suggestedTag=Finding-stopped-by, suggestedTag=Finding-unmodified} [Medications effect on EEG. Used with base schema Increasing/Decreasing.] + ** Medication-reduction-effect-EEG {suggestedTag=Property-not-possible-to-determine, suggestedTag=Finding-stopped-by, suggestedTag=Finding-unmodified} [Medications reduction or withdrawal effect on EEG. Used with base schema Increasing/Decreasing.] + ** Auditive-stimuli-effect {suggestedTag=Property-not-possible-to-determine, suggestedTag=Finding-stopped-by, suggestedTag=Finding-unmodified} [Used with base schema Increasing/Decreasing.] + ** Nociceptive-stimuli-effect {suggestedTag=Property-not-possible-to-determine, suggestedTag=Finding-stopped-by, suggestedTag=Finding-unmodified, suggestedTag=Finding-triggered-by} [Used with base schema Increasing/Decreasing.] + ** Physical-effort-effect {suggestedTag=Property-not-possible-to-determine, suggestedTag=Finding-stopped-by, suggestedTag=Finding-unmodified, suggestedTag=Finding-triggered-by} [Used with base schema Increasing/Decreasing] + ** Cognitive-task-effect {suggestedTag=Property-not-possible-to-determine, suggestedTag=Finding-stopped-by, suggestedTag=Finding-unmodified, suggestedTag=Finding-triggered-by} [Used with base schema Increasing/Decreasing.] + ** Other-modulators-effect-EEG {requireChild} + *** # {takesValue, valueClass=textClass} [Free text.] + ** Facilitating-factor [Facilitating factors are defined as transient and sporadic endogenous or exogenous elements capable of augmenting seizure incidence (increasing the likelihood of seizure occurrence).] + *** Facilitating-factor-alcohol + **** # {takesValue, valueClass=textClass} [Free text.] + *** Facilitating-factor-awake + **** # {takesValue, valueClass=textClass} [Free text.] + *** Facilitating-factor-catamenial + **** # {takesValue, valueClass=textClass} [Free text.] + *** Facilitating-factor-fever + **** # {takesValue, valueClass=textClass} [Free text.] + *** Facilitating-factor-sleep + **** # {takesValue, valueClass=textClass} [Free text.] + *** Facilitating-factor-sleep-deprived + **** # {takesValue, valueClass=textClass} [Free text.] + *** Facilitating-factor-other {requireChild} + **** # {takesValue, valueClass=textClass} [Free text.] + ** Provocative-factor {requireChild} [Provocative factors are defined as transient and sporadic endogenous or exogenous elements capable of evoking/triggering seizures immediately following the exposure to it.] + *** Hyperventilation-provoked + **** # {takesValue, valueClass=textClass} [Free text.] + *** Reflex-provoked + **** # {takesValue, valueClass=textClass} [Free text.] + ** Medication-effect-clinical {suggestedTag=Finding-stopped-by, suggestedTag=Finding-unmodified} [Medications clinical effect. Used with base schema Increasing/Decreasing.] + ** Medication-reduction-effect-clinical {suggestedTag=Finding-stopped-by, suggestedTag=Finding-unmodified} [Medications reduction or withdrawal clinical effect. Used with base schema Increasing/Decreasing.] + ** Other-modulators-effect-clinical {requireChild} + *** # {takesValue, valueClass=textClass} [Free text.] + ** Intermittent-photic-stimulation-effect {requireChild} + *** Posterior-stimulus-dependent-intermittent-photic-stimulation-response {suggestedTag=Finding-frequency} + **** # {takesValue, valueClass=textClass} [Free text.] + *** Posterior-stimulus-independent-intermittent-photic-stimulation-response-limited {suggestedTag=Finding-frequency} [limited to the stimulus-train] + **** # {takesValue, valueClass=textClass} [Free text.] + *** Posterior-stimulus-independent-intermittent-photic-stimulation-response-self-sustained {suggestedTag=Finding-frequency} + **** # {takesValue, valueClass=textClass} [Free text.] + *** Generalized-photoparoxysmal-intermittent-photic-stimulation-response-limited {suggestedTag=Finding-frequency} [Limited to the stimulus-train.] + **** # {takesValue, valueClass=textClass} [Free text.] + *** Generalized-photoparoxysmal-intermittent-photic-stimulation-response-self-sustained {suggestedTag=Finding-frequency} + **** # {takesValue, valueClass=textClass} [Free text.] + *** Activation-of-pre-existing-epileptogenic-area-intermittent-photic-stimulation-effect {suggestedTag=Finding-frequency} + **** # {takesValue, valueClass=textClass} [Free text.] + *** Unmodified-intermittent-photic-stimulation-effect + **** # {takesValue, valueClass=textClass} [Free text.] + ** Quality-of-hyperventilation {requireChild} + *** Hyperventilation-refused-procedure + **** # {takesValue, valueClass=textClass} [Free text.] + *** Hyperventilation-poor-effort + **** # {takesValue, valueClass=textClass} [Free text.] + *** Hyperventilation-good-effort + **** # {takesValue, valueClass=textClass} [Free text.] + *** Hyperventilation-excellent-effort + **** # {takesValue, valueClass=textClass} [Free text.] + ** Modulators-effect {requireChild} [Tags for describing the influence of the modulators] + *** Modulators-effect-continuous-during-NRS [Continuous during non-rapid-eye-movement-sleep (NRS)] + **** # {takesValue, valueClass=textClass} [Free text.] + *** Modulators-effect-only-during + **** # {takesValue, valueClass=textClass} [Only during Sleep/Awakening/Hyperventilation/Physical effort/Cognitive task. Free text.] + *** Modulators-effect-change-of-patterns [Change of patterns during sleep/awakening.] + **** # {takesValue, valueClass=textClass} [Free text.] + * Time-related-property {requireChild} [Important to estimate how often an interictal abnormality is seen in the recording.] + ** Appearance-mode {requireChild, suggestedTag=Property-not-possible-to-determine} [Describes how the non-ictal EEG pattern/graphoelement is distributed through the recording.] + *** Random-appearance-mode [Occurrence of the non-ictal EEG pattern / graphoelement without any rhythmicity / periodicity.] + **** # {takesValue, valueClass=textClass} [Free text.] + *** Periodic-appearance-mode [Non-ictal EEG pattern / graphoelement occurring at an approximately regular rate / interval (generally of 1 to several seconds).] + **** # {takesValue, valueClass=textClass} [Free text.] + *** Variable-appearance-mode [Occurrence of non-ictal EEG pattern / graphoelements, that is sometimes rhythmic or periodic, other times random, throughout the recording.] + **** # {takesValue, valueClass=textClass} [Free text.] + *** Intermittent-appearance-mode + **** # {takesValue, valueClass=textClass} [Free text.] + *** Continuous-appearance-mode + **** # {takesValue, valueClass=textClass} [Free text.] + ** Discharge-pattern {requireChild} [Describes the organization of the EEG signal within the discharge (distinguish between single and repetitive discharges)] + *** Single-discharge-pattern {suggestedTag=Finding-incidence} [Applies to the intra-burst pattern: a graphoelement that is not repetitive; before and after the graphoelement one can distinguish the background activity.] + **** # {takesValue, valueClass=textClass} [Free text.] + *** Rhythmic-trains-or-bursts-discharge-pattern {suggestedTag=Finding-prevalence, suggestedTag=Finding-frequency} [Applies to the intra-burst pattern: a non-ictal graphoelement that repeats itself without returning to the background activity between them. The graphoelements within this repetition occur at approximately constant period.] + **** # {takesValue, valueClass=textClass} [Free text.] + *** Arrhythmic-trains-or-bursts-discharge-pattern {suggestedTag=Finding-prevalence} [Applies to the intra-burst pattern: a non-ictal graphoelement that repeats itself without returning to the background activity between them. The graphoelements within this repetition occur at inconstant period.] + **** # {takesValue, valueClass=textClass} [Free text.] + *** Fragmented-discharge-pattern + **** # {takesValue, valueClass=textClass} [Free text.] + ** Periodic-discharge-time-related-features {requireChild} [Periodic discharges not further specified (PDs) time-relayed features tags.] + *** Periodic-discharge-duration {requireChild, suggestedTag=Property-not-possible-to-determine} + **** Very-brief-periodic-discharge-duration [Less than 10 sec.] + ***** # {takesValue, valueClass=textClass} [Free text.] + **** Brief-periodic-discharge-duration [10 to 59 sec.] + ***** # {takesValue, valueClass=textClass} [Free text.] + **** Intermediate-periodic-discharge-duration [1 to 4.9 min.] + ***** # {takesValue, valueClass=textClass} [Free text.] + **** Long-periodic-discharge-duration [5 to 59 min.] + ***** # {takesValue, valueClass=textClass} [Free text.] + **** Very-long-periodic-discharge-duration [Greater than 1 hour.] + ***** # {takesValue, valueClass=textClass} [Free text.] + *** Periodic-discharge-onset {requireChild, suggestedTag=Property-not-possible-to-determine} + **** Sudden-periodic-discharge-onset + ***** # {takesValue, valueClass=textClass} [Free text.] + **** Gradual-periodic-discharge-onset + ***** # {takesValue, valueClass=textClass} [Free text.] + *** Periodic-discharge-dynamics {requireChild, suggestedTag=Property-not-possible-to-determine} + **** Evolving-periodic-discharge-dynamics + ***** # {takesValue, valueClass=textClass} [Free text.] + **** Fluctuating-periodic-discharge-dynamics + ***** # {takesValue, valueClass=textClass} [Free text.] + **** Static-periodic-discharge-dynamics + ***** # {takesValue, valueClass=textClass} [Free text.] + ** Finding-extent [Percentage of occurrence during the recording (background activity and interictal finding).] + *** # {takesValue, valueClass=numericClass} + ** Finding-incidence {requireChild} [How often it occurs/time-epoch.] + *** Only-once-finding-incidence + **** # {takesValue, valueClass=textClass} [Free text.] + *** Rare-finding-incidence [less than 1/h] + **** # {takesValue, valueClass=textClass} [Free text.] + *** Uncommon-finding-incidence [1/5 min to 1/h.] + **** # {takesValue, valueClass=textClass} [Free text.] + *** Occasional-finding-incidence [1/min to 1/5min.] + **** # {takesValue, valueClass=textClass} [Free text.] + *** Frequent-finding-incidence [1/10 s to 1/min.] + **** # {takesValue, valueClass=textClass} [Free text.] + *** Abundant-finding-incidence [Greater than 1/10 s).] + **** # {takesValue, valueClass=textClass} [Free text.] + ** Finding-prevalence {requireChild} [The percentage of the recording covered by the train/burst.] + *** Rare-finding-prevalence [Less than 1 percent.] + **** # {takesValue, valueClass=textClass} [Free text.] + *** Occasional-finding-prevalence [1 to 9 percent.] + **** # {takesValue, valueClass=textClass} [Free text.] + *** Frequent-finding-prevalence [10 to 49 percent.] + **** # {takesValue, valueClass=textClass} [Free text.] + *** Abundant-finding-prevalence [50 to 89 percent.] + **** # {takesValue, valueClass=textClass} [Free text.] + *** Continuous-finding-prevalence [Greater than 90 percent.] + **** # {takesValue, valueClass=textClass} [Free text.] + * Posterior-dominant-rhythm-property {requireChild} [Posterior dominant rhythm is the most often scored EEG feature in clinical practice. Therefore, there are specific terms that can be chosen for characterizing the PDR.] + ** Posterior-dominant-rhythm-amplitude-range {requireChild, suggestedTag=Property-not-possible-to-determine} + *** Low-posterior-dominant-rhythm-amplitude-range [Low (less than 20 microV).] + **** # {takesValue, valueClass=textClass} [Free text.] + *** Medium-posterior-dominant-rhythm-amplitude-range [Medium (between 20 and 70 microV).] + **** # {takesValue, valueClass=textClass} [Free text.] + *** High-posterior-dominant-rhythm-amplitude-range [High (more than 70 microV).] + **** # {takesValue, valueClass=textClass} [Free text.] + ** Posterior-dominant-rhythm-frequency-asymmetry {requireChild} [When symmetrical could be labeled with base schema Symmetrical tag.] + *** Posterior-dominant-rhythm-frequency-asymmetry-lower-left [Hz lower on the left side.] + **** # {takesValue, valueClass=textClass} [Free text.] + *** Posterior-dominant-rhythm-frequency-asymmetry-lower-right [Hz lower on the right side.] + **** # {takesValue, valueClass=textClass} [Free text.] + ** Posterior-dominant-rhythm-eye-opening-reactivity {suggestedTag=Property-not-possible-to-determine} [Change (disappearance or measurable decrease in amplitude) of a posterior dominant rhythm following eye-opening. Eye closure has the opposite effect.] + *** Posterior-dominant-rhythm-eye-opening-reactivity-reduced-left [Reduced left side reactivity.] + **** # {takesValue, valueClass=textClass} [Free text.] + *** Posterior-dominant-rhythm-eye-opening-reactivity-reduced-right [Reduced right side reactivity.] + **** # {takesValue, valueClass=textClass} [free text] + *** Posterior-dominant-rhythm-eye-opening-reactivity-reduced-both [Reduced reactivity on both sides.] + **** # {takesValue, valueClass=textClass} [Free text.] + ** Posterior-dominant-rhythm-organization {requireChild} [When normal could be labeled with base schema Normal tag.] + *** Posterior-dominant-rhythm-organization-poorly-organized [Poorly organized.] + **** # {takesValue, valueClass=textClass} [Free text.] + *** Posterior-dominant-rhythm-organization-disorganized [Disorganized.] + **** # {takesValue, valueClass=textClass} [Free text.] + *** Posterior-dominant-rhythm-organization-markedly-disorganized [Markedly disorganized.] + **** # {takesValue, valueClass=textClass} [Free text.] + ** Posterior-dominant-rhythm-caveat {requireChild} [Caveat to the annotation of PDR.] + *** No-posterior-dominant-rhythm-caveat + **** # {takesValue, valueClass=textClass} [Free text.] + *** Posterior-dominant-rhythm-caveat-only-open-eyes-during-the-recording + **** # {takesValue, valueClass=textClass} [Free text.] + *** Posterior-dominant-rhythm-caveat-sleep-deprived-caveat + **** # {takesValue, valueClass=textClass} [Free text.] + *** Posterior-dominant-rhythm-caveat-drowsy + **** # {takesValue, valueClass=textClass} [Free text.] + *** Posterior-dominant-rhythm-caveat-only-following-hyperventilation + ** Absence-of-posterior-dominant-rhythm {requireChild} [Reason for absence of PDR.] + *** Absence-of-posterior-dominant-rhythm-artifacts + **** # {takesValue, valueClass=textClass} [Free text.] + *** Absence-of-posterior-dominant-rhythm-extreme-low-voltage + **** # {takesValue, valueClass=textClass} [Free text.] + *** Absence-of-posterior-dominant-rhythm-eye-closure-could-not-be-achieved + **** # {takesValue, valueClass=textClass} [Free text.] + *** Absence-of-posterior-dominant-rhythm-lack-of-awake-period + **** # {takesValue, valueClass=textClass} [Free text.] + *** Absence-of-posterior-dominant-rhythm-lack-of-compliance + **** # {takesValue, valueClass=textClass} [Free text.] + *** Absence-of-posterior-dominant-rhythm-other-causes {requireChild} + **** # {takesValue, valueClass=textClass} [Free text.] + * Episode-property {requireChild} + ** Seizure-classification {requireChild} [Epileptic seizures are named using the current ILAE seizure classification (Fisher et al., 2017, Beniczky et al., 2017).] + *** Motor-onset-seizure + **** Myoclonic-motor-onset-seizure + **** Negative-myoclonic-motor-onset-seizure + **** Clonic-motor-onset-seizure + **** Tonic-motor-onset-seizure + **** Atonic-motor-onset-seizure + **** Myoclonic-atonic-motor-onset-seizure + **** Myoclonic-tonic-clonic-motor-onset-seizure + **** Tonic-clonic-motor-onset-seizure + **** Automatism-motor-onset-seizure + **** Hyperkinetic-motor-onset-seizure + **** Epileptic-spasm-episode + *** Nonmotor-onset-seizure + **** Behavior-arrest-nonmotor-onset-seizure + **** Sensory-nonmotor-onset-seizure + **** Emotional-nonmotor-onset-seizure + **** Cognitive-nonmotor-onset-seizure + **** Autonomic-nonmotor-onset-seizure + *** Absence-seizure + **** Typical-absence-seizure + **** Atypical-absence-seizure + **** Myoclonic-absence-seizure + **** Eyelid-myoclonia-absence-seizure + ** Episode-phase {requireChild, suggestedTag=Seizure-semiology-manifestation, suggestedTag=Postictal-semiology-manifestation, suggestedTag=Ictal-EEG-patterns} [The electroclinical findings (i.e., the seizure semiology and the ictal EEG) are divided in three phases: onset, propagation, and postictal.] + *** Episode-phase-initial + *** Episode-phase-subsequent + *** Episode-phase-postictal + ** Seizure-semiology-manifestation {requireChild} [Semiology is described according to the ILAE Glossary of Descriptive Terminology for Ictal Semiology (Blume et al., 2001). Besides the name, the semiologic finding can also be characterized by the somatotopic modifier, laterality, body part and centricity. Uses Location-property tags.] + *** Semiology-motor-manifestation + **** Semiology-elementary-motor + ***** Semiology-motor-tonic {suggestedTag=Brain-laterality, suggestedTag=Body-part, suggestedTag=Brain-centricity, suggestedTag=Episode-event-count} [A sustained increase in muscle contraction lasting a few seconds to minutes.] + ***** Semiology-motor-dystonic {suggestedTag=Brain-laterality, suggestedTag=Body-part, suggestedTag=Brain-centricity, suggestedTag=Episode-event-count} [Sustained contractions of both agonist and antagonist muscles producing athetoid or twisting movements, which, when prolonged, may produce abnormal postures.] + ***** Semiology-motor-epileptic-spasm {suggestedTag=Brain-laterality, suggestedTag=Body-part, suggestedTag=Brain-centricity, suggestedTag=Episode-event-count} [A sudden flexion, extension, or mixed extension flexion of predominantly proximal and truncal muscles that is usually more sustained than a myoclonic movement but not so sustained as a tonic seizure (i.e., about 1 s). Limited forms may occur: grimacing, head nodding. Frequent occurrence in clusters.] + ***** Semiology-motor-postural {suggestedTag=Brain-laterality, suggestedTag=Body-part, suggestedTag=Brain-centricity, suggestedTag=Episode-event-count} [Adoption of a posture that may be bilaterally symmetric or asymmetric (as in a fencing posture).] + ***** Semiology-motor-versive {suggestedTag=Body-part, suggestedTag=Episode-event-count} [A sustained, forced conjugate ocular, cephalic, and/or truncal rotation or lateral deviation from the midline.] + ***** Semiology-motor-clonic {suggestedTag=Brain-laterality, suggestedTag=Body-part, suggestedTag=Brain-centricity, suggestedTag=Episode-event-count} [Myoclonus that is regularly repetitive, involves the same muscle groups, at a frequency of about 2 to 3 c/s, and is prolonged. Synonym: rhythmic myoclonus .] + ***** Semiology-motor-myoclonic {suggestedTag=Brain-laterality, suggestedTag=Body-part, suggestedTag=Brain-centricity, suggestedTag=Episode-event-count} [Characterized by myoclonus. MYOCLONUS : sudden, brief (lower than 100 ms) involuntary single or multiple contraction(s) of muscles(s) or muscle groups of variable topography (axial, proximal limb, distal).] + ***** Semiology-motor-jacksonian-march {suggestedTag=Brain-laterality, suggestedTag=Body-part, suggestedTag=Brain-centricity, suggestedTag=Episode-event-count} [Term indicating spread of clonic movements through contiguous body parts unilaterally.] + ***** Semiology-motor-negative-myoclonus {suggestedTag=Brain-laterality, suggestedTag=Body-part, suggestedTag=Brain-centricity, suggestedTag=Episode-event-count} [Characterized by negative myoclonus. NEGATIVE MYOCLONUS: interruption of tonic muscular activity for lower than 500 ms without evidence of preceding myoclonia.] + ***** Semiology-motor-tonic-clonic {requireChild} [A sequence consisting of a tonic followed by a clonic phase. Variants such as clonic-tonic-clonic may be seen. Asymmetry of limb posture during the tonic phase of a GTC: one arm is rigidly extended at the elbow (often with the fist clenched tightly and flexed at the wrist), whereas the opposite arm is flexed at the elbow.] + ****** Semiology-motor-tonic-clonic-without-figure-of-four {suggestedTag=Brain-laterality, suggestedTag=Body-part, suggestedTag=Brain-centricity, suggestedTag=Episode-event-count} + ****** Semiology-motor-tonic-clonic-with-figure-of-four-extension-left-elbow {suggestedTag=Brain-laterality, suggestedTag=Body-part, suggestedTag=Brain-centricity, suggestedTag=Episode-event-count} + ****** Semiology-motor-tonic-clonic-with-figure-of-four-extension-right-elbow {suggestedTag=Brain-laterality, suggestedTag=Body-part, suggestedTag=Brain-centricity, suggestedTag=Episode-event-count} + ***** Semiology-motor-astatic {suggestedTag=Brain-laterality, suggestedTag=Body-part, suggestedTag=Brain-centricity, suggestedTag=Episode-event-count} [Loss of erect posture that results from an atonic, myoclonic, or tonic mechanism. Synonym: drop attack.] + ***** Semiology-motor-atonic {suggestedTag=Brain-laterality, suggestedTag=Body-part, suggestedTag=Brain-centricity, suggestedTag=Episode-event-count} [Sudden loss or diminution of muscle tone without apparent preceding myoclonic or tonic event lasting greater or equal to 1 to 2 s, involving head, trunk, jaw, or limb musculature.] + ***** Semiology-motor-eye-blinking {suggestedTag=Brain-laterality, suggestedTag=Episode-event-count} + ***** Semiology-motor-other-elementary-motor {requireChild} + ****** # {takesValue, valueClass=textClass} [Free text.] + **** Semiology-motor-automatisms + ***** Semiology-motor-automatisms-mimetic {suggestedTag=Episode-responsiveness, suggestedTag=Episode-appearance, suggestedTag=Episode-event-count} [Facial expression suggesting an emotional state, often fear.] + ***** Semiology-motor-automatisms-oroalimentary {suggestedTag=Episode-responsiveness, suggestedTag=Episode-appearance, suggestedTag=Episode-event-count} [Lip smacking, lip pursing, chewing, licking, tooth grinding, or swallowing.] + ***** Semiology-motor-automatisms-dacrystic {suggestedTag=Episode-responsiveness, suggestedTag=Episode-appearance, suggestedTag=Episode-event-count} [Bursts of crying.] + ***** Semiology-motor-automatisms-dyspraxic {suggestedTag=Brain-laterality, suggestedTag=Body-part, suggestedTag=Brain-centricity, suggestedTag=Episode-responsiveness, suggestedTag=Episode-appearance, suggestedTag=Episode-event-count} [Inability to perform learned movements spontaneously or on command or imitation despite intact relevant motor and sensory systems and adequate comprehension and cooperation.] + ***** Semiology-motor-automatisms-manual {suggestedTag=Brain-laterality, suggestedTag=Brain-centricity, suggestedTag=Episode-responsiveness, suggestedTag=Episode-appearance, suggestedTag=Episode-event-count} [1. Indicates principally distal components, bilateral or unilateral. 2. Fumbling, tapping, manipulating movements.] + ***** Semiology-motor-automatisms-gestural {suggestedTag=Brain-laterality, suggestedTag=Episode-responsiveness, suggestedTag=Episode-appearance, suggestedTag=Episode-event-count} [Semipurposive, asynchronous hand movements. Often unilateral.] + ***** Semiology-motor-automatisms-pedal {suggestedTag=Brain-laterality, suggestedTag=Brain-centricity, suggestedTag=Episode-responsiveness, suggestedTag=Episode-appearance, suggestedTag=Episode-event-count} [1. Indicates principally distal components, bilateral or unilateral. 2. Fumbling, tapping, manipulating movements.] + ***** Semiology-motor-automatisms-hypermotor {suggestedTag=Brain-laterality, suggestedTag=Body-part, suggestedTag=Brain-centricity, suggestedTag=Episode-responsiveness, suggestedTag=Episode-appearance, suggestedTag=Episode-event-count} [1. Involves predominantly proximal limb or axial muscles producing irregular sequential ballistic movements, such as pedaling, pelvic thrusting, thrashing, rocking movements. 2. Increase in rate of ongoing movements or inappropriately rapid performance of a movement.] + ***** Semiology-motor-automatisms-hypokinetic {suggestedTag=Brain-laterality, suggestedTag=Body-part, suggestedTag=Brain-centricity, suggestedTag=Episode-responsiveness, suggestedTag=Episode-appearance, suggestedTag=Episode-event-count} [A decrease in amplitude and/or rate or arrest of ongoing motor activity.] + ***** Semiology-motor-automatisms-gelastic {suggestedTag=Episode-responsiveness, suggestedTag=Episode-appearance, suggestedTag=Episode-event-count} [Bursts of laughter or giggling, usually without an appropriate affective tone.] + ***** Semiology-motor-other-automatisms {requireChild} + ****** # {takesValue, valueClass=textClass} [Free text.] + **** Semiology-motor-behavioral-arrest {suggestedTag=Brain-laterality, suggestedTag=Body-part, suggestedTag=Brain-centricity, suggestedTag=Episode-event-count} [Interruption of ongoing motor activity or of ongoing behaviors with fixed gaze, without movement of the head or trunk (oro-alimentary and hand automatisms may continue).] + *** Semiology-non-motor-manifestation + **** Semiology-sensory + ***** Semiology-sensory-headache {suggestedTag=Brain-laterality, suggestedTag=Episode-event-count} [Headache occurring in close temporal proximity to the seizure or as the sole seizure manifestation.] + ***** Semiology-sensory-visual {suggestedTag=Brain-laterality, suggestedTag=Episode-event-count} [Flashing or flickering lights, spots, simple patterns, scotomata, or amaurosis.] + ***** Semiology-sensory-auditory {suggestedTag=Brain-laterality, suggestedTag=Episode-event-count} [Buzzing, drumming sounds or single tones.] + ***** Semiology-sensory-olfactory {suggestedTag=Body-part, suggestedTag=Episode-event-count} + ***** Semiology-sensory-gustatory {suggestedTag=Episode-event-count} [Taste sensations including acidic, bitter, salty, sweet, or metallic.] + ***** Semiology-sensory-epigastric {suggestedTag=Episode-event-count} [Abdominal discomfort including nausea, emptiness, tightness, churning, butterflies, malaise, pain, and hunger; sensation may rise to chest or throat. Some phenomena may reflect ictal autonomic dysfunction.] + ***** Semiology-sensory-somatosensory {suggestedTag=Brain-laterality, suggestedTag=Body-part, suggestedTag=Brain-centricity, suggestedTag=Episode-event-count} [Tingling, numbness, electric-shock sensation, sense of movement or desire to move.] + ***** Semiology-sensory-painful {suggestedTag=Brain-laterality, suggestedTag=Body-part, suggestedTag=Brain-centricity, suggestedTag=Episode-event-count} [Peripheral (lateralized/bilateral), cephalic, abdominal.] + ***** Semiology-sensory-autonomic-sensation {suggestedTag=Episode-event-count} [A sensation consistent with involvement of the autonomic nervous system, including cardiovascular, gastrointestinal, sudomotor, vasomotor, and thermoregulatory functions. (Thus autonomic aura; cf. autonomic events 3.0).] + ***** Semiology-sensory-other {requireChild} + ****** # {takesValue, valueClass=textClass} [Free text.] + **** Semiology-experiential + ***** Semiology-experiential-affective-emotional {suggestedTag=Episode-event-count} [Components include fear, depression, joy, and (rarely) anger.] + ***** Semiology-experiential-hallucinatory {suggestedTag=Episode-event-count} [Composite perceptions without corresponding external stimuli involving visual, auditory, somatosensory, olfactory, and/or gustatory phenomena. Example: hearing and seeing people talking.] + ***** Semiology-experiential-illusory {suggestedTag=Episode-event-count} [An alteration of actual percepts involving the visual, auditory, somatosensory, olfactory, or gustatory systems.] + ***** Semiology-experiential-mnemonic [Components that reflect ictal dysmnesia such as feelings of familiarity (deja-vu) and unfamiliarity (jamais-vu).] + ****** Semiology-experiential-mnemonic-Deja-vu {suggestedTag=Episode-event-count} + ****** Semiology-experiential-mnemonic-Jamais-vu {suggestedTag=Episode-event-count} + ***** Semiology-experiential-other {requireChild} + ****** # {takesValue, valueClass=textClass} [Free text.] + **** Semiology-dyscognitive {suggestedTag=Episode-event-count} [The term describes events in which (1) disturbance of cognition is the predominant or most apparent feature, and (2a) two or more of the following components are involved, or (2b) involvement of such components remains undetermined. Otherwise, use the more specific term (e.g., mnemonic experiential seizure or hallucinatory experiential seizure). Components of cognition: ++ perception: symbolic conception of sensory information ++ attention: appropriate selection of a principal perception or task ++ emotion: appropriate affective significance of a perception ++ memory: ability to store and retrieve percepts or concepts ++ executive function: anticipation, selection, monitoring of consequences, and initiation of motor activity including praxis, speech.] + **** Semiology-language-related + ***** Semiology-language-related-vocalization {suggestedTag=Episode-event-count} + ***** Semiology-language-related-verbalization {suggestedTag=Episode-event-count} + ***** Semiology-language-related-dysphasia {suggestedTag=Episode-event-count} + ***** Semiology-language-related-aphasia {suggestedTag=Episode-event-count} + ***** Semiology-language-related-other {requireChild} + ****** # {takesValue, valueClass=textClass} [Free text.] + **** Semiology-autonomic + ***** Semiology-autonomic-pupillary {suggestedTag=Brain-laterality, suggestedTag=Episode-event-count} [Mydriasis, miosis (either bilateral or unilateral).] + ***** Semiology-autonomic-hypersalivation {suggestedTag=Episode-event-count} [Increase in production of saliva leading to uncontrollable drooling] + ***** Semiology-autonomic-respiratory-apnoeic {suggestedTag=Episode-event-count} [subjective shortness of breath, hyperventilation, stridor, coughing, choking, apnea, oxygen desaturation, neurogenic pulmonary edema.] + ***** Semiology-autonomic-cardiovascular {suggestedTag=Episode-event-count} [Modifications of heart rate (tachycardia, bradycardia), cardiac arrhythmias (such as sinus arrhythmia, sinus arrest, supraventricular tachycardia, atrial premature depolarizations, ventricular premature depolarizations, atrio-ventricular block, bundle branch block, atrioventricular nodal escape rhythm, asystole).] + ***** Semiology-autonomic-gastrointestinal {suggestedTag=Episode-event-count} [Nausea, eructation, vomiting, retching, abdominal sensations, abdominal pain, flatulence, spitting, diarrhea.] + ***** Semiology-autonomic-urinary-incontinence {suggestedTag=Episode-event-count} [urinary urge (intense urinary urge at the beginning of seizures), urinary incontinence, ictal urination (rare symptom of partial seizures without loss of consciousness).] + ***** Semiology-autonomic-genital {suggestedTag=Episode-event-count} [Sexual auras (erotic thoughts and feelings, sexual arousal and orgasm). Genital auras (unpleasant, sometimes painful, frightening or emotionally neutral somatosensory sensations in the genitals that can be accompanied by ictal orgasm). Sexual automatisms (hypermotor movements consisting of writhing, thrusting, rhythmic movements of the pelvis, arms and legs, sometimes associated with picking and rhythmic manipulation of the groin or genitalia, exhibitionism and masturbation).] + ***** Semiology-autonomic-vasomotor {suggestedTag=Episode-event-count} [Flushing or pallor (may be accompanied by feelings of warmth, cold and pain).] + ***** Semiology-autonomic-sudomotor {suggestedTag=Brain-laterality, suggestedTag=Episode-event-count} [Sweating and piloerection (may be accompanied by feelings of warmth, cold and pain).] + ***** Semiology-autonomic-thermoregulatory {suggestedTag=Episode-event-count} [Hyperthermia, fever.] + ***** Semiology-autonomic-other {requireChild} + ****** # {takesValue, valueClass=textClass} [Free text.] + *** Semiology-manifestation-other {requireChild} + **** # {takesValue, valueClass=textClass} [Free text.] + ** Postictal-semiology-manifestation {requireChild} + *** Postictal-semiology-unconscious {suggestedTag=Episode-event-count} + *** Postictal-semiology-quick-recovery-of-consciousness {suggestedTag=Episode-event-count} [Quick recovery of awareness and responsiveness.] + *** Postictal-semiology-aphasia-or-dysphasia {suggestedTag=Episode-event-count} [Impaired communication involving language without dysfunction of relevant primary motor or sensory pathways, manifested as impaired comprehension, anomia, parahasic errors or a combination of these.] + *** Postictal-semiology-behavioral-change {suggestedTag=Episode-event-count} [Occurring immediately after a aseizure. Including psychosis, hypomanina, obsessive-compulsive behavior.] + *** Postictal-semiology-hemianopia {suggestedTag=Brain-laterality, suggestedTag=Episode-event-count} [Postictal visual loss in a a hemi field.] + *** Postictal-semiology-impaired-cognition {suggestedTag=Episode-event-count} [Decreased Cognitive performance involving one or more of perception, attention, emotion, memory, execution, praxis, speech.] + *** Postictal-semiology-dysphoria {suggestedTag=Episode-event-count} [Depression, irritability, euphoric mood, fear, anxiety.] + *** Postictal-semiology-headache {suggestedTag=Episode-event-count} [Headache with features of tension-type or migraine headache that develops within 3 h following the seizure and resolves within 72 h after seizure.] + *** Postictal-semiology-nose-wiping {suggestedTag=Brain-laterality, suggestedTag=Episode-event-count} [Noes-wiping usually within 60 sec of seizure offset, usually with the hand ipsilateral to the seizure onset.] + *** Postictal-semiology-anterograde-amnesia {suggestedTag=Episode-event-count} [Impaired ability to remember new material.] + *** Postictal-semiology-retrograde-amnesia {suggestedTag=Episode-event-count} [Impaired ability to recall previously remember material.] + *** Postictal-semiology-paresis {suggestedTag=Brain-laterality, suggestedTag=Body-part, suggestedTag=Brain-centricity, suggestedTag=Episode-event-count} [Todds palsy. Any unilateral postictal dysfunction relating to motor, language, sensory and/or integrative functions.] + *** Postictal-semiology-sleep [Invincible need to sleep after a seizure.] + *** Postictal-semiology-unilateral-myoclonic-jerks [unilateral motor phenomena, other then specified, occurring in postictal phase.] + *** Postictal-semiology-other-unilateral-motor-phenomena {requireChild} + **** # {takesValue, valueClass=textClass} [Free text.] + ** Polygraphic-channel-relation-to-episode {requireChild, suggestedTag=Property-not-possible-to-determine} + *** Polygraphic-channel-cause-to-episode + *** Polygraphic-channel-consequence-of-episode + ** Ictal-EEG-patterns + *** Ictal-EEG-patterns-obscured-by-artifacts [The interpretation of the EEG is not possible due to artifacts.] + **** # {takesValue, valueClass=textClass} [Free text.] + *** Ictal-EEG-activity {suggestedTag=Polyspikes-morphology, suggestedTag=Fast-spike-activity-morphology, suggestedTag=Low-voltage-fast-activity-morphology, suggestedTag=Polysharp-waves-morphology, suggestedTag=Spike-and-slow-wave-morphology, suggestedTag=Polyspike-and-slow-wave-morphology, suggestedTag=Sharp-and-slow-wave-morphology, suggestedTag=Rhythmic-activity-morphology, suggestedTag=Slow-wave-large-amplitude-morphology, suggestedTag=Irregular-delta-or-theta-activity-morphology, suggestedTag=Electrodecremental-change-morphology, suggestedTag=DC-shift-morphology, suggestedTag=Disappearance-of-ongoing-activity-morphology, suggestedTag=Brain-laterality, suggestedTag=Brain-region, suggestedTag=Sensors, suggestedTag=Source-analysis-laterality, suggestedTag=Source-analysis-brain-region, suggestedTag=Episode-event-count} + *** Postictal-EEG-activity {suggestedTag=Brain-laterality, suggestedTag=Body-part, suggestedTag=Brain-centricity} + ** Episode-time-context-property [Additional clinically relevant features related to episodes can be scored under timing and context. If needed, episode duration can be tagged with base schema /Property/Data-property/Data-value/Spatiotemporal-value/Temporal-value/Duration.] + *** Episode-consciousness {requireChild, suggestedTag=Property-not-possible-to-determine} + **** Episode-consciousness-not-tested + ***** # {takesValue, valueClass=textClass} [Free text.] + **** Episode-consciousness-affected + ***** # {takesValue, valueClass=textClass} [Free text.] + **** Episode-consciousness-mildly-affected + ***** # {takesValue, valueClass=textClass} [Free text.] + **** Episode-consciousness-not-affected + ***** # {takesValue, valueClass=textClass} [Free text.] + *** Episode-awareness {suggestedTag=Property-not-possible-to-determine, suggestedTag=Property-exists, suggestedTag=Property-absence} + **** # {takesValue, valueClass=textClass} [Free text.] + *** Clinical-EEG-temporal-relationship {suggestedTag=Property-not-possible-to-determine} + **** Clinical-start-followed-EEG [Clinical start, followed by EEG start by X seconds.] + ***** # {takesValue, valueClass=numericClass, unitClass=timeUnits} + **** EEG-start-followed-clinical [EEG start, followed by clinical start by X seconds.] + ***** # {takesValue, valueClass=numericClass, unitClass=timeUnits} + **** Simultaneous-start-clinical-EEG + **** Clinical-EEG-temporal-relationship-notes [Clinical notes to annotate the clinical-EEG temporal relationship.] + ***** # {takesValue, valueClass=textClass} + *** Episode-event-count {suggestedTag=Property-not-possible-to-determine} [Number of stereotypical episodes during the recording.] + **** # {takesValue, valueClass=numericClass} + *** State-episode-start {requireChild, suggestedTag=Property-not-possible-to-determine} [State at the start of the episode.] + **** Episode-start-from-sleep + ***** # {takesValue, valueClass=textClass} [Free text.] + **** Episode-start-from-awake + ***** # {takesValue, valueClass=textClass} [Free text.] + *** Episode-postictal-phase {suggestedTag=Property-not-possible-to-determine} + **** # {takesValue, valueClass=numericClass, unitClass=timeUnits} + *** Episode-prodrome {suggestedTag=Property-exists, suggestedTag=Property-absence} [Prodrome is a preictal phenomenon, and it is defined as a subjective or objective clinical alteration (e.g., ill-localized sensation or agitation) that heralds the onset of an epileptic seizure but does not form part of it (Blume et al., 2001). Therefore, prodrome should be distinguished from aura (which is an ictal phenomenon).] + **** # {takesValue, valueClass=textClass} [Free text.] + *** Episode-tongue-biting {suggestedTag=Property-exists, suggestedTag=Property-absence} + **** # {takesValue, valueClass=textClass} [Free text.] + *** Episode-responsiveness {requireChild, suggestedTag=Property-not-possible-to-determine} + **** Episode-responsiveness-preserved + ***** # {takesValue, valueClass=textClass} [Free text.] + **** Episode-responsiveness-affected + ***** # {takesValue, valueClass=textClass} [Free text.] + *** Episode-appearance {requireChild} + **** Episode-appearance-interactive + ***** # {takesValue, valueClass=textClass} [Free text.] + **** Episode-appearance-spontaneous + ***** # {takesValue, valueClass=textClass} [Free text.] + *** Seizure-dynamics {requireChild} [Spatiotemporal dynamics can be scored (evolution in morphology; evolution in frequency; evolution in location).] + **** Seizure-dynamics-evolution-morphology + ***** # {takesValue, valueClass=textClass} [Free text.] + **** Seizure-dynamics-evolution-frequency + ***** # {takesValue, valueClass=textClass} [Free text.] + **** Seizure-dynamics-evolution-location + ***** # {takesValue, valueClass=textClass} [Free text.] + **** Seizure-dynamics-not-possible-to-determine [Not possible to determine.] + ***** # {takesValue, valueClass=textClass} [Free text.] + * Other-finding-property {requireChild} + ** Artifact-significance-to-recording {requireChild} [It is important to score the significance of the described artifacts: recording is not interpretable, recording of reduced diagnostic value, does not interfere with the interpretation of the recording.] + *** Recording-not-interpretable-due-to-artifact + **** # {takesValue, valueClass=textClass} [Free text.] + *** Recording-of-reduced-diagnostic-value-due-to-artifact + **** # {takesValue, valueClass=textClass} [Free text.] + *** Artifact-does-not-interfere-recording + **** # {takesValue, valueClass=textClass} [Free text.] + ** Finding-significance-to-recording {requireChild} [Significance of finding. When normal/abnormal could be labeled with base schema Normal/Abnormal tags.] + *** Finding-no-definite-abnormality + **** # {takesValue, valueClass=textClass} [Free text.] + *** Finding-significance-not-possible-to-determine [Not possible to determine.] + **** # {takesValue, valueClass=textClass} [Free text.] + ** Finding-frequency [Value in Hz (number) typed in.] + *** # {takesValue, valueClass=numericClass, unitClass=frequencyUnits} + ** Finding-amplitude [Value in microvolts (number) typed in.] + *** # {takesValue, valueClass=numericClass, unitClass=electricPotentialUnits} + ** Finding-amplitude-asymmetry {requireChild} [For posterior dominant rhythm: a difference in amplitude between the homologous area on opposite sides of the head that consistently exceeds 50 percent. When symmetrical could be labeled with base schema Symmetrical tag. For sleep: Absence or consistently marked amplitude asymmetry (greater than 50 percent) of a normal sleep graphoelement.] + *** Finding-amplitude-asymmetry-lower-left [Amplitude lower on the left side.] + **** # {takesValue, valueClass=textClass} [Free text.] + *** Finding-amplitude-asymmetry-lower-right [Amplitude lower on the right side.] + **** # {takesValue, valueClass=textClass} [Free text.] + *** Finding-amplitude-asymmetry-not-possible-to-determine [Not possible to determine.] + **** # {takesValue, valueClass=textClass} [Free text.] + ** Finding-stopped-by + *** # {takesValue, valueClass=textClass} [Free text.] + ** Finding-triggered-by + *** # {takesValue, valueClass=textClass} [Free text.] + ** Finding-unmodified + *** # {takesValue, valueClass=textClass} [Free text.] + ** Property-not-possible-to-determine [Not possible to determine.] + *** # {takesValue, valueClass=textClass} [Free text.] + ** Property-exists + *** # {takesValue, valueClass=textClass} [Free text.] + ** Property-absence + *** # {takesValue, valueClass=textClass} [Free text.] !# end schema -'''Unit classes''' +'''Unit classes''' '''Unit modifiers''' diff --git a/tests/data/schema_tests/merge_tests/HED_score_lib_tags.xml b/tests/data/schema_tests/merge_tests/HED_score_lib_tags.xml index 05b00eff3..9566f37de 100644 --- a/tests/data/schema_tests/merge_tests/HED_score_lib_tags.xml +++ b/tests/data/schema_tests/merge_tests/HED_score_lib_tags.xml @@ -1,5 +1,5 @@ - + This schema is a Hierarchical Event Descriptors (HED) Library Schema implementation of Standardized Computer-based Organized Reporting of EEG (SCORE)[1,2] for describing events occurring during neuroimaging time series recordings. The HED-SCORE library schema allows neurologists, neurophysiologists, and brain researchers to annotate electrophysiology recordings using terms from an internationally accepted set of defined terms (SCORE) compatible with the HED framework. The resulting annotations are understandable to clinicians and directly usable in computer analysis. @@ -13,22 +13,10 @@ For more information see https://hed-schema-library.readthedocs.io/en/latest/ind requireChild - - inLibrary - score - Sleep-modulator - - inLibrary - score - Sleep-deprivation - - inLibrary - score - # Free text. @@ -39,18 +27,10 @@ For more information see https://hed-schema-library.readthedocs.io/en/latest/ind valueClass textClass - - inLibrary - score - Sleep-following-sleep-deprivation - - inLibrary - score - # Free text. @@ -61,18 +41,10 @@ For more information see https://hed-schema-library.readthedocs.io/en/latest/ind valueClass textClass - - inLibrary - score - Natural-sleep - - inLibrary - score - # Free text. @@ -83,18 +55,10 @@ For more information see https://hed-schema-library.readthedocs.io/en/latest/ind valueClass textClass - - inLibrary - score - Induced-sleep - - inLibrary - score - # Free text. @@ -105,18 +69,10 @@ For more information see https://hed-schema-library.readthedocs.io/en/latest/ind valueClass textClass - - inLibrary - score - Drowsiness - - inLibrary - score - # Free text. @@ -127,18 +83,10 @@ For more information see https://hed-schema-library.readthedocs.io/en/latest/ind valueClass textClass - - inLibrary - score - Awakening - - inLibrary - score - # Free text. @@ -149,25 +97,13 @@ For more information see https://hed-schema-library.readthedocs.io/en/latest/ind valueClass textClass - - inLibrary - score - Medication-modulator - - inLibrary - score - Medication-administered-during-recording - - inLibrary - score - # Free text. @@ -178,18 +114,10 @@ For more information see https://hed-schema-library.readthedocs.io/en/latest/ind valueClass textClass - - inLibrary - score - Medication-withdrawal-or-reduction-during-recording - - inLibrary - score - # Free text. @@ -200,25 +128,13 @@ For more information see https://hed-schema-library.readthedocs.io/en/latest/ind valueClass textClass - - inLibrary - score - Eye-modulator - - inLibrary - score - Manual-eye-closure - - inLibrary - score - # Free text. @@ -229,18 +145,10 @@ For more information see https://hed-schema-library.readthedocs.io/en/latest/ind valueClass textClass - - inLibrary - score - Manual-eye-opening - - inLibrary - score - # Free text. @@ -251,28 +159,16 @@ For more information see https://hed-schema-library.readthedocs.io/en/latest/ind valueClass textClass - - inLibrary - score - Stimulation-modulator - - inLibrary - score - Intermittent-photic-stimulation requireChild - - inLibrary - score - # @@ -286,18 +182,10 @@ For more information see https://hed-schema-library.readthedocs.io/en/latest/ind unitClass frequencyUnits - - inLibrary - score - Auditory-stimulation - - inLibrary - score - # Free text. @@ -308,18 +196,10 @@ For more information see https://hed-schema-library.readthedocs.io/en/latest/ind valueClass textClass - - inLibrary - score - Nociceptive-stimulation - - inLibrary - score - # Free text. @@ -330,19 +210,11 @@ For more information see https://hed-schema-library.readthedocs.io/en/latest/ind valueClass textClass - - inLibrary - score - Hyperventilation - - inLibrary - score - # Free text. @@ -353,18 +225,10 @@ For more information see https://hed-schema-library.readthedocs.io/en/latest/ind valueClass textClass - - inLibrary - score - Physical-effort - - inLibrary - score - # Free text. @@ -375,18 +239,10 @@ For more information see https://hed-schema-library.readthedocs.io/en/latest/ind valueClass textClass - - inLibrary - score - Cognitive-task - - inLibrary - score - # Free text. @@ -397,10 +253,6 @@ For more information see https://hed-schema-library.readthedocs.io/en/latest/ind valueClass textClass - - inLibrary - score - @@ -408,10 +260,6 @@ For more information see https://hed-schema-library.readthedocs.io/en/latest/ind requireChild - - inLibrary - score - # Free text. @@ -422,10 +270,6 @@ For more information see https://hed-schema-library.readthedocs.io/en/latest/ind valueClass textClass - - inLibrary - score - @@ -435,10 +279,6 @@ For more information see https://hed-schema-library.readthedocs.io/en/latest/ind requireChild - - inLibrary - score - Posterior-dominant-rhythm Rhythmic activity occurring during wakefulness over the posterior regions of the head, generally with maximum amplitudes over the occipital areas. Amplitude varies. Best seen with eyes closed and during physical relaxation and relative mental inactivity. Blocked or attenuated by attention, especially visual, and mental effort. In adults this is the alpha rhythm, and the frequency is 8 to 13 Hz. However the frequency can be higher or lower than this range (often a supra or sub harmonic of alpha frequency) and is called alpha variant rhythm (fast and slow alpha variant rhythm). In children, the normal range of the frequency of the posterior dominant rhythm is age-dependant. @@ -454,10 +294,6 @@ For more information see https://hed-schema-library.readthedocs.io/en/latest/ind Posterior-dominant-rhythm-caveat Absence-of-posterior-dominant-rhythm - - inLibrary - score - Mu-rhythm @@ -470,10 +306,6 @@ For more information see https://hed-schema-library.readthedocs.io/en/latest/ind Brain-region Sensors - - inLibrary - score - Other-organized-rhythm @@ -495,10 +327,6 @@ For more information see https://hed-schema-library.readthedocs.io/en/latest/ind Appearance-mode Discharge-pattern - - inLibrary - score - # Free text. @@ -509,10 +337,6 @@ For more information see https://hed-schema-library.readthedocs.io/en/latest/ind valueClass textClass - - inLibrary - score - @@ -521,10 +345,6 @@ For more information see https://hed-schema-library.readthedocs.io/en/latest/ind requireChild - - inLibrary - score - Continuous-background-activity @@ -539,10 +359,6 @@ For more information see https://hed-schema-library.readthedocs.io/en/latest/ind Sensors Finding-extent - - inLibrary - score - Nearly-continuous-background-activity @@ -558,10 +374,6 @@ For more information see https://hed-schema-library.readthedocs.io/en/latest/ind Sensors Finding-extent - - inLibrary - score - Discontinuous-background-activity @@ -577,10 +389,6 @@ For more information see https://hed-schema-library.readthedocs.io/en/latest/ind Sensors Finding-extent - - inLibrary - score - Background-burst-suppression @@ -592,10 +400,6 @@ For more information see https://hed-schema-library.readthedocs.io/en/latest/ind Sensors Finding-extent - - inLibrary - score - Background-burst-attenuation @@ -606,10 +410,6 @@ For more information see https://hed-schema-library.readthedocs.io/en/latest/ind Sensors Finding-extent - - inLibrary - score - Background-activity-suppression @@ -622,18 +422,10 @@ For more information see https://hed-schema-library.readthedocs.io/en/latest/ind Finding-extent Appearance-mode - - inLibrary - score - Electrocerebral-inactivity Absence of any ongoing cortical electric activities; in all leads EEG is isoelectric or only contains artifacts. Sensitivity has to be increased up to 2 microV/mm; recording time: at least 30 minutes. - - inLibrary - score - @@ -643,10 +435,6 @@ For more information see https://hed-schema-library.readthedocs.io/en/latest/ind requireChild - - inLibrary - score - Sleep-architecture For longer recordings. Only to be scored if whole-night sleep is part of the recording. It is a global descriptor of the structure and pattern of sleep: estimation of the amount of time spent in REM and NREM sleep, sleep duration, NREM-REM cycle. @@ -654,23 +442,11 @@ For more information see https://hed-schema-library.readthedocs.io/en/latest/ind suggestedTag Property-not-possible-to-determine - - inLibrary - score - Normal-sleep-architecture - - inLibrary - score - Abnormal-sleep-architecture - - inLibrary - score - @@ -684,17 +460,9 @@ For more information see https://hed-schema-library.readthedocs.io/en/latest/ind Property-not-possible-to-determine Finding-significance-to-recording - - inLibrary - score - Sleep-stage-N1 Sleep stage 1. - - inLibrary - score - # Free text. @@ -705,19 +473,11 @@ For more information see https://hed-schema-library.readthedocs.io/en/latest/ind valueClass textClass - - inLibrary - score - Sleep-stage-N2 Sleep stage 2. - - inLibrary - score - # Free text. @@ -728,19 +488,11 @@ For more information see https://hed-schema-library.readthedocs.io/en/latest/ind valueClass textClass - - inLibrary - score - Sleep-stage-N3 Sleep stage 3. - - inLibrary - score - # Free text. @@ -751,19 +503,11 @@ For more information see https://hed-schema-library.readthedocs.io/en/latest/ind valueClass textClass - - inLibrary - score - Sleep-stage-REM Rapid eye movement. - - inLibrary - score - # Free text. @@ -774,10 +518,6 @@ For more information see https://hed-schema-library.readthedocs.io/en/latest/ind valueClass textClass - - inLibrary - score - @@ -792,10 +532,6 @@ For more information see https://hed-schema-library.readthedocs.io/en/latest/ind Sensors Finding-amplitude-asymmetry - - inLibrary - score - Arousal-pattern @@ -808,10 +544,6 @@ For more information see https://hed-schema-library.readthedocs.io/en/latest/ind Appearance-mode Discharge-pattern - - inLibrary - score - Frontal-arousal-rhythm @@ -821,10 +553,6 @@ For more information see https://hed-schema-library.readthedocs.io/en/latest/ind Appearance-mode Discharge-pattern - - inLibrary - score - Vertex-wave @@ -837,10 +565,6 @@ For more information see https://hed-schema-library.readthedocs.io/en/latest/ind Sensors Finding-amplitude-asymmetry - - inLibrary - score - K-complex @@ -853,10 +577,6 @@ For more information see https://hed-schema-library.readthedocs.io/en/latest/ind Sensors Finding-amplitude-asymmetry - - inLibrary - score - Saw-tooth-waves @@ -869,10 +589,6 @@ For more information see https://hed-schema-library.readthedocs.io/en/latest/ind Sensors Finding-amplitude-asymmetry - - inLibrary - score - POSTS @@ -885,10 +601,6 @@ For more information see https://hed-schema-library.readthedocs.io/en/latest/ind Sensors Finding-amplitude-asymmetry - - inLibrary - score - Hypnagogic-hypersynchrony @@ -901,18 +613,10 @@ For more information see https://hed-schema-library.readthedocs.io/en/latest/ind Sensors Finding-amplitude-asymmetry - - inLibrary - score - Non-reactive-sleep EEG activity consisting of normal sleep graphoelements, but which cannot be interrupted by external stimuli/ the patient cannot be waken. - - inLibrary - score - @@ -921,10 +625,6 @@ For more information see https://hed-schema-library.readthedocs.io/en/latest/ind requireChild - - inLibrary - score - Epileptiform-interictal-activity @@ -949,10 +649,6 @@ For more information see https://hed-schema-library.readthedocs.io/en/latest/ind Discharge-pattern Finding-incidence - - inLibrary - score - Abnormal-interictal-rhythmic-activity @@ -974,20 +670,12 @@ For more information see https://hed-schema-library.readthedocs.io/en/latest/ind Discharge-pattern Finding-incidence - - inLibrary - score - Interictal-special-patterns requireChild - - inLibrary - score - Interictal-periodic-discharges Periodic discharge not further specified (PDs). @@ -1007,41 +695,21 @@ For more information see https://hed-schema-library.readthedocs.io/en/latest/ind Periodic-discharge-onset Periodic-discharge-dynamics - - inLibrary - score - Generalized-periodic-discharges GPDs. - - inLibrary - score - Lateralized-periodic-discharges LPDs. - - inLibrary - score - Bilateral-independent-periodic-discharges BIPDs. - - inLibrary - score - Multifocal-periodic-discharges MfPDs. - - inLibrary - score - @@ -1054,10 +722,6 @@ For more information see https://hed-schema-library.readthedocs.io/en/latest/ind Appearance-mode Discharge-pattern - - inLibrary - score - @@ -1067,10 +731,6 @@ For more information see https://hed-schema-library.readthedocs.io/en/latest/ind requireChild - - inLibrary - score - Critically-ill-patients-periodic-discharges Periodic discharges (PDs). @@ -1091,10 +751,6 @@ For more information see https://hed-schema-library.readthedocs.io/en/latest/ind Periodic-discharge-onset Periodic-discharge-dynamics - - inLibrary - score - Rhythmic-delta-activity @@ -1111,10 +767,6 @@ For more information see https://hed-schema-library.readthedocs.io/en/latest/ind Periodic-discharge-onset Periodic-discharge-dynamics - - inLibrary - score - Spike-or-sharp-and-wave @@ -1136,10 +788,6 @@ For more information see https://hed-schema-library.readthedocs.io/en/latest/ind Periodic-discharge-onset Periodic-discharge-dynamics - - inLibrary - score - @@ -1148,19 +796,11 @@ For more information see https://hed-schema-library.readthedocs.io/en/latest/ind requireChild - - inLibrary - score - Epileptic-seizure requireChild - - inLibrary - score - Focal-onset-epileptic-seizure @@ -1176,10 +816,6 @@ For more information see https://hed-schema-library.readthedocs.io/en/latest/ind Episode-prodrome Episode-tongue-biting - - inLibrary - score - Aware-focal-onset-epileptic-seizure @@ -1196,10 +832,6 @@ For more information see https://hed-schema-library.readthedocs.io/en/latest/ind Episode-prodrome Episode-tongue-biting - - inLibrary - score - Impaired-awareness-focal-onset-epileptic-seizure @@ -1217,10 +849,6 @@ For more information see https://hed-schema-library.readthedocs.io/en/latest/ind Episode-prodrome Episode-tongue-biting - - inLibrary - score - Awareness-unknown-focal-onset-epileptic-seizure @@ -1238,10 +866,6 @@ For more information see https://hed-schema-library.readthedocs.io/en/latest/ind Episode-prodrome Episode-tongue-biting - - inLibrary - score - Focal-to-bilateral-tonic-clonic-focal-onset-epileptic-seizure @@ -1258,10 +882,6 @@ For more information see https://hed-schema-library.readthedocs.io/en/latest/ind Episode-prodrome Episode-tongue-biting - - inLibrary - score - @@ -1280,10 +900,6 @@ For more information see https://hed-schema-library.readthedocs.io/en/latest/ind Episode-prodrome Episode-tongue-biting - - inLibrary - score - Unknown-onset-epileptic-seizure @@ -1301,10 +917,6 @@ For more information see https://hed-schema-library.readthedocs.io/en/latest/ind Episode-prodrome Episode-tongue-biting - - inLibrary - score - Unclassified-epileptic-seizure @@ -1321,10 +933,6 @@ For more information see https://hed-schema-library.readthedocs.io/en/latest/ind Episode-prodrome Episode-tongue-biting - - inLibrary - score - @@ -1342,10 +950,6 @@ For more information see https://hed-schema-library.readthedocs.io/en/latest/ind Episode-prodrome Episode-tongue-biting - - inLibrary - score - Electrographic-seizure @@ -1362,10 +966,6 @@ For more information see https://hed-schema-library.readthedocs.io/en/latest/ind Episode-prodrome Episode-tongue-biting - - inLibrary - score - Seizure-PNES @@ -1383,20 +983,12 @@ For more information see https://hed-schema-library.readthedocs.io/en/latest/ind Episode-prodrome Episode-tongue-biting - - inLibrary - score - Sleep-related-episode requireChild - - inLibrary - score - Sleep-related-arousal Normal. @@ -1413,10 +1005,6 @@ For more information see https://hed-schema-library.readthedocs.io/en/latest/ind Episode-prodrome Episode-tongue-biting - - inLibrary - score - Benign-sleep-myoclonus @@ -1434,10 +1022,6 @@ For more information see https://hed-schema-library.readthedocs.io/en/latest/ind Episode-prodrome Episode-tongue-biting - - inLibrary - score - Confusional-awakening @@ -1455,10 +1039,6 @@ For more information see https://hed-schema-library.readthedocs.io/en/latest/ind Episode-prodrome Episode-tongue-biting - - inLibrary - score - Sleep-periodic-limb-movement @@ -1476,10 +1056,6 @@ For more information see https://hed-schema-library.readthedocs.io/en/latest/ind Episode-prodrome Episode-tongue-biting - - inLibrary - score - REM-sleep-behavioral-disorder @@ -1497,10 +1073,6 @@ For more information see https://hed-schema-library.readthedocs.io/en/latest/ind Episode-prodrome Episode-tongue-biting - - inLibrary - score - Sleep-walking @@ -1518,10 +1090,6 @@ For more information see https://hed-schema-library.readthedocs.io/en/latest/ind Episode-prodrome Episode-tongue-biting - - inLibrary - score - @@ -1529,10 +1097,6 @@ For more information see https://hed-schema-library.readthedocs.io/en/latest/ind requireChild - - inLibrary - score - Hyperekplexia Disorder characterized by exaggerated startle response and hypertonicity that may occur during the first year of life and in severe cases during the neonatal period. Children usually present with marked irritability and recurrent startles in response to handling and sounds. Severely affected infants can have severe jerks and stiffening, sometimes with breath-holding spells. @@ -1549,10 +1113,6 @@ For more information see https://hed-schema-library.readthedocs.io/en/latest/ind Episode-prodrome Episode-tongue-biting - - inLibrary - score - Jactatio-capitis-nocturna @@ -1570,10 +1130,6 @@ For more information see https://hed-schema-library.readthedocs.io/en/latest/ind Episode-prodrome Episode-tongue-biting - - inLibrary - score - Pavor-nocturnus @@ -1591,10 +1147,6 @@ For more information see https://hed-schema-library.readthedocs.io/en/latest/ind Episode-prodrome Episode-tongue-biting - - inLibrary - score - Pediatric-stereotypical-behavior-episode @@ -1612,10 +1164,6 @@ For more information see https://hed-schema-library.readthedocs.io/en/latest/ind Episode-prodrome Episode-tongue-biting - - inLibrary - score - @@ -1634,10 +1182,6 @@ For more information see https://hed-schema-library.readthedocs.io/en/latest/ind Episode-prodrome Episode-tongue-biting - - inLibrary - score - Syncope @@ -1655,10 +1199,6 @@ For more information see https://hed-schema-library.readthedocs.io/en/latest/ind Episode-prodrome Episode-tongue-biting - - inLibrary - score - Cataplexy @@ -1676,20 +1216,12 @@ For more information see https://hed-schema-library.readthedocs.io/en/latest/ind Episode-prodrome Episode-tongue-biting - - inLibrary - score - Other-episode requireChild - - inLibrary - score - # Free text. @@ -1700,10 +1232,6 @@ For more information see https://hed-schema-library.readthedocs.io/en/latest/ind valueClass textClass - - inLibrary - score - @@ -1713,10 +1241,6 @@ For more information see https://hed-schema-library.readthedocs.io/en/latest/ind requireChild - - inLibrary - score - Rhythmic-activity-pattern Not further specified. @@ -1733,10 +1257,6 @@ For more information see https://hed-schema-library.readthedocs.io/en/latest/ind Appearance-mode Discharge-pattern - - inLibrary - score - Slow-alpha-variant-rhythm @@ -1749,10 +1269,6 @@ For more information see https://hed-schema-library.readthedocs.io/en/latest/ind Appearance-mode Discharge-pattern - - inLibrary - score - Fast-alpha-variant-rhythm @@ -1762,10 +1278,6 @@ For more information see https://hed-schema-library.readthedocs.io/en/latest/ind Appearance-mode Discharge-pattern - - inLibrary - score - Ciganek-rhythm @@ -1778,10 +1290,6 @@ For more information see https://hed-schema-library.readthedocs.io/en/latest/ind Appearance-mode Discharge-pattern - - inLibrary - score - Lambda-wave @@ -1794,10 +1302,6 @@ For more information see https://hed-schema-library.readthedocs.io/en/latest/ind Appearance-mode Discharge-pattern - - inLibrary - score - Posterior-slow-waves-youth @@ -1810,10 +1314,6 @@ For more information see https://hed-schema-library.readthedocs.io/en/latest/ind Appearance-mode Discharge-pattern - - inLibrary - score - Diffuse-slowing-hyperventilation @@ -1826,10 +1326,6 @@ For more information see https://hed-schema-library.readthedocs.io/en/latest/ind Appearance-mode Discharge-pattern - - inLibrary - score - Photic-driving @@ -1842,10 +1338,6 @@ For more information see https://hed-schema-library.readthedocs.io/en/latest/ind Appearance-mode Discharge-pattern - - inLibrary - score - Photomyogenic-response @@ -1858,20 +1350,12 @@ For more information see https://hed-schema-library.readthedocs.io/en/latest/ind Appearance-mode Discharge-pattern - - inLibrary - score - Other-physiologic-pattern requireChild - - inLibrary - score - # Free text. @@ -1882,10 +1366,6 @@ For more information see https://hed-schema-library.readthedocs.io/en/latest/ind valueClass textClass - - inLibrary - score - @@ -1895,10 +1375,6 @@ For more information see https://hed-schema-library.readthedocs.io/en/latest/ind requireChild - - inLibrary - score - Sharp-transient-pattern @@ -1909,18 +1385,10 @@ For more information see https://hed-schema-library.readthedocs.io/en/latest/ind Appearance-mode Discharge-pattern - - inLibrary - score - Wicket-spikes Spike-like monophasic negative single waves or trains of waves occurring over the temporal regions during drowsiness that have an arcuate or mu-like appearance. These are mainly seen in older individuals and represent a benign variant that is of little clinical significance. - - inLibrary - score - Small-sharp-spikes @@ -1933,10 +1401,6 @@ For more information see https://hed-schema-library.readthedocs.io/en/latest/ind Appearance-mode Discharge-pattern - - inLibrary - score - Fourteen-six-Hz-positive-burst @@ -1949,10 +1413,6 @@ For more information see https://hed-schema-library.readthedocs.io/en/latest/ind Appearance-mode Discharge-pattern - - inLibrary - score - Six-Hz-spike-slow-wave @@ -1965,10 +1425,6 @@ For more information see https://hed-schema-library.readthedocs.io/en/latest/ind Appearance-mode Discharge-pattern - - inLibrary - score - Rudimentary-spike-wave-complex @@ -1981,10 +1437,6 @@ For more information see https://hed-schema-library.readthedocs.io/en/latest/ind Appearance-mode Discharge-pattern - - inLibrary - score - Slow-fused-transient @@ -1997,10 +1449,6 @@ For more information see https://hed-schema-library.readthedocs.io/en/latest/ind Appearance-mode Discharge-pattern - - inLibrary - score - Needle-like-occipital-spikes-blind @@ -2013,10 +1461,6 @@ For more information see https://hed-schema-library.readthedocs.io/en/latest/ind Appearance-mode Discharge-pattern - - inLibrary - score - Subclinical-rhythmic-EEG-discharge-adults @@ -2029,18 +1473,10 @@ For more information see https://hed-schema-library.readthedocs.io/en/latest/ind Appearance-mode Discharge-pattern - - inLibrary - score - Rhythmic-temporal-theta-burst-drowsiness Rhythmic temporal theta burst of drowsiness (RTTD). Characteristic burst of 4-7 Hz waves frequently notched by faster waves, occurring over the temporal regions of the head during drowsiness. Synonym: psychomotor variant pattern. Comment: this is a pattern of drowsiness that is of no clinical significance. - - inLibrary - score - Temporal-slowing-elderly @@ -2053,10 +1489,6 @@ For more information see https://hed-schema-library.readthedocs.io/en/latest/ind Appearance-mode Discharge-pattern - - inLibrary - score - Breach-rhythm @@ -2069,20 +1501,12 @@ For more information see https://hed-schema-library.readthedocs.io/en/latest/ind Appearance-mode Discharge-pattern - - inLibrary - score - Other-uncertain-significant-pattern requireChild - - inLibrary - score - # Free text. @@ -2093,10 +1517,6 @@ For more information see https://hed-schema-library.readthedocs.io/en/latest/ind valueClass textClass - - inLibrary - score - @@ -2106,19 +1526,11 @@ For more information see https://hed-schema-library.readthedocs.io/en/latest/ind requireChild - - inLibrary - score - Biological-artifact requireChild - - inLibrary - score - Eye-blink-artifact Example for EEG: Fp1/Fp2 become electropositive with eye closure because the cornea is positively charged causing a negative deflection in Fp1/Fp2. If the eye blink is unilateral, consider prosthetic eye. If it is in F8 rather than Fp2 then the electrodes are plugged in wrong. @@ -2130,10 +1542,6 @@ For more information see https://hed-schema-library.readthedocs.io/en/latest/ind Multifocal-finding Artifact-significance-to-recording - - inLibrary - score - Eye-movement-horizontal-artifact @@ -2146,10 +1554,6 @@ For more information see https://hed-schema-library.readthedocs.io/en/latest/ind Multifocal-finding Artifact-significance-to-recording - - inLibrary - score - Eye-movement-vertical-artifact @@ -2162,10 +1566,6 @@ For more information see https://hed-schema-library.readthedocs.io/en/latest/ind Multifocal-finding Artifact-significance-to-recording - - inLibrary - score - Slow-eye-movement-artifact @@ -2178,10 +1578,6 @@ For more information see https://hed-schema-library.readthedocs.io/en/latest/ind Multifocal-finding Artifact-significance-to-recording - - inLibrary - score - Nystagmus-artifact @@ -2189,10 +1585,6 @@ For more information see https://hed-schema-library.readthedocs.io/en/latest/ind suggestedTag Artifact-significance-to-recording - - inLibrary - score - Chewing-artifact @@ -2204,10 +1596,6 @@ For more information see https://hed-schema-library.readthedocs.io/en/latest/ind Multifocal-finding Artifact-significance-to-recording - - inLibrary - score - Sucking-artifact @@ -2219,10 +1607,6 @@ For more information see https://hed-schema-library.readthedocs.io/en/latest/ind Multifocal-finding Artifact-significance-to-recording - - inLibrary - score - Glossokinetic-artifact @@ -2235,10 +1619,6 @@ For more information see https://hed-schema-library.readthedocs.io/en/latest/ind Multifocal-finding Artifact-significance-to-recording - - inLibrary - score - Rocking-patting-artifact @@ -2251,10 +1631,6 @@ For more information see https://hed-schema-library.readthedocs.io/en/latest/ind Multifocal-finding Artifact-significance-to-recording - - inLibrary - score - Movement-artifact @@ -2267,10 +1643,6 @@ For more information see https://hed-schema-library.readthedocs.io/en/latest/ind Multifocal-finding Artifact-significance-to-recording - - inLibrary - score - Respiration-artifact @@ -2283,10 +1655,6 @@ For more information see https://hed-schema-library.readthedocs.io/en/latest/ind Multifocal-finding Artifact-significance-to-recording - - inLibrary - score - Pulse-artifact @@ -2299,10 +1667,6 @@ For more information see https://hed-schema-library.readthedocs.io/en/latest/ind Multifocal-finding Artifact-significance-to-recording - - inLibrary - score - ECG-artifact @@ -2315,10 +1679,6 @@ For more information see https://hed-schema-library.readthedocs.io/en/latest/ind Multifocal-finding Artifact-significance-to-recording - - inLibrary - score - Sweat-artifact @@ -2331,10 +1691,6 @@ For more information see https://hed-schema-library.readthedocs.io/en/latest/ind Multifocal-finding Artifact-significance-to-recording - - inLibrary - score - EMG-artifact @@ -2347,10 +1703,6 @@ For more information see https://hed-schema-library.readthedocs.io/en/latest/ind Multifocal-finding Artifact-significance-to-recording - - inLibrary - score - @@ -2358,10 +1710,6 @@ For more information see https://hed-schema-library.readthedocs.io/en/latest/ind requireChild - - inLibrary - score - Power-supply-artifact 50-60 Hz artifact. Monomorphic waveform due to 50 or 60 Hz A/C power supply. @@ -2369,10 +1717,6 @@ For more information see https://hed-schema-library.readthedocs.io/en/latest/ind suggestedTag Artifact-significance-to-recording - - inLibrary - score - Induction-artifact @@ -2381,10 +1725,6 @@ For more information see https://hed-schema-library.readthedocs.io/en/latest/ind suggestedTag Artifact-significance-to-recording - - inLibrary - score - Dialysis-artifact @@ -2392,10 +1732,6 @@ For more information see https://hed-schema-library.readthedocs.io/en/latest/ind suggestedTag Artifact-significance-to-recording - - inLibrary - score - Artificial-ventilation-artifact @@ -2403,10 +1739,6 @@ For more information see https://hed-schema-library.readthedocs.io/en/latest/ind suggestedTag Artifact-significance-to-recording - - inLibrary - score - Electrode-pops-artifact @@ -2415,10 +1747,6 @@ For more information see https://hed-schema-library.readthedocs.io/en/latest/ind suggestedTag Artifact-significance-to-recording - - inLibrary - score - Salt-bridge-artifact @@ -2427,10 +1755,6 @@ For more information see https://hed-schema-library.readthedocs.io/en/latest/ind suggestedTag Artifact-significance-to-recording - - inLibrary - score - @@ -2442,10 +1766,6 @@ For more information see https://hed-schema-library.readthedocs.io/en/latest/ind suggestedTag Artifact-significance-to-recording - - inLibrary - score - # Free text. @@ -2456,10 +1776,6 @@ For more information see https://hed-schema-library.readthedocs.io/en/latest/ind valueClass textClass - - inLibrary - score - @@ -2469,10 +1785,6 @@ For more information see https://hed-schema-library.readthedocs.io/en/latest/ind requireChild - - inLibrary - score - EOG-channel-finding ElectroOculoGraphy. @@ -2480,10 +1792,6 @@ For more information see https://hed-schema-library.readthedocs.io/en/latest/ind suggestedTag Finding-significance-to-recording - - inLibrary - score - # Free text. @@ -2494,10 +1802,6 @@ For more information see https://hed-schema-library.readthedocs.io/en/latest/ind valueClass textClass - - inLibrary - score - @@ -2506,16 +1810,8 @@ For more information see https://hed-schema-library.readthedocs.io/en/latest/ind suggestedTag Finding-significance-to-recording - - inLibrary - score - Respiration-oxygen-saturation - - inLibrary - score - # @@ -2525,25 +1821,13 @@ For more information see https://hed-schema-library.readthedocs.io/en/latest/ind valueClass numericClass - - inLibrary - score - Respiration-feature - - inLibrary - score - Apnoe-respiration Add duration (range in seconds) and comments in free text. - - inLibrary - score - # Free text. @@ -2554,19 +1838,11 @@ For more information see https://hed-schema-library.readthedocs.io/en/latest/ind valueClass textClass - - inLibrary - score - Hypopnea-respiration Add duration (range in seconds) and comments in free text - - inLibrary - score - # Free text. @@ -2577,10 +1853,6 @@ For more information see https://hed-schema-library.readthedocs.io/en/latest/ind valueClass textClass - - inLibrary - score - @@ -2589,10 +1861,6 @@ For more information see https://hed-schema-library.readthedocs.io/en/latest/ind requireChild - - inLibrary - score - # Free text. @@ -2603,18 +1871,10 @@ For more information see https://hed-schema-library.readthedocs.io/en/latest/ind valueClass textClass - - inLibrary - score - Periodic-respiration - - inLibrary - score - # Free text. @@ -2625,10 +1885,6 @@ For more information see https://hed-schema-library.readthedocs.io/en/latest/ind valueClass textClass - - inLibrary - score - @@ -2637,10 +1893,6 @@ For more information see https://hed-schema-library.readthedocs.io/en/latest/ind requireChild - - inLibrary - score - # Free text. @@ -2651,10 +1903,6 @@ For more information see https://hed-schema-library.readthedocs.io/en/latest/ind valueClass textClass - - inLibrary - score - @@ -2662,10 +1910,6 @@ For more information see https://hed-schema-library.readthedocs.io/en/latest/ind requireChild - - inLibrary - score - # Free text. @@ -2676,10 +1920,6 @@ For more information see https://hed-schema-library.readthedocs.io/en/latest/ind valueClass textClass - - inLibrary - score - @@ -2691,16 +1931,8 @@ For more information see https://hed-schema-library.readthedocs.io/en/latest/ind suggestedTag Finding-significance-to-recording - - inLibrary - score - ECG-QT-period - - inLibrary - score - # Free text. @@ -2711,25 +1943,13 @@ For more information see https://hed-schema-library.readthedocs.io/en/latest/ind valueClass textClass - - inLibrary - score - ECG-feature - - inLibrary - score - ECG-sinus-rhythm Normal rhythm. Frequency can be tagged with base schema /Property/Data-property/Data-value/Spatiotemporal-value/Rate-of-change/Frequency - - inLibrary - score - # Free text. @@ -2740,18 +1960,10 @@ For more information see https://hed-schema-library.readthedocs.io/en/latest/ind valueClass textClass - - inLibrary - score - ECG-arrhythmia - - inLibrary - score - # Free text. @@ -2762,19 +1974,11 @@ For more information see https://hed-schema-library.readthedocs.io/en/latest/ind valueClass textClass - - inLibrary - score - ECG-asystolia Add duration (range in seconds) and comments in free text. - - inLibrary - score - # Free text. @@ -2785,19 +1989,11 @@ For more information see https://hed-schema-library.readthedocs.io/en/latest/ind valueClass textClass - - inLibrary - score - ECG-bradycardia Frequency can be tagged with base schema /Property/Data-property/Data-value/Spatiotemporal-value/Rate-of-change/Frequency - - inLibrary - score - # Free text. @@ -2808,18 +2004,10 @@ For more information see https://hed-schema-library.readthedocs.io/en/latest/ind valueClass textClass - - inLibrary - score - ECG-extrasystole - - inLibrary - score - # Free text. @@ -2830,19 +2018,11 @@ For more information see https://hed-schema-library.readthedocs.io/en/latest/ind valueClass textClass - - inLibrary - score - ECG-ventricular-premature-depolarization Frequency can be tagged with base schema /Property/Data-property/Data-value/Spatiotemporal-value/Rate-of-change/Frequency - - inLibrary - score - # Free text. @@ -2853,19 +2033,11 @@ For more information see https://hed-schema-library.readthedocs.io/en/latest/ind valueClass textClass - - inLibrary - score - ECG-tachycardia Frequency can be tagged with base schema /Property/Data-property/Data-value/Spatiotemporal-value/Rate-of-change/Frequency - - inLibrary - score - # Free text. @@ -2876,10 +2048,6 @@ For more information see https://hed-schema-library.readthedocs.io/en/latest/ind valueClass textClass - - inLibrary - score - @@ -2887,10 +2055,6 @@ For more information see https://hed-schema-library.readthedocs.io/en/latest/ind requireChild - - inLibrary - score - # Free text. @@ -2901,10 +2065,6 @@ For more information see https://hed-schema-library.readthedocs.io/en/latest/ind valueClass textClass - - inLibrary - score - @@ -2916,22 +2076,10 @@ For more information see https://hed-schema-library.readthedocs.io/en/latest/ind suggestedTag Finding-significance-to-recording - - inLibrary - score - EMG-muscle-side - - inLibrary - score - EMG-left-muscle - - inLibrary - score - # Free text. @@ -2942,18 +2090,10 @@ For more information see https://hed-schema-library.readthedocs.io/en/latest/ind valueClass textClass - - inLibrary - score - EMG-right-muscle - - inLibrary - score - # Free text. @@ -2964,18 +2104,10 @@ For more information see https://hed-schema-library.readthedocs.io/en/latest/ind valueClass textClass - - inLibrary - score - EMG-bilateral-muscle - - inLibrary - score - # Free text. @@ -2986,19 +2118,11 @@ For more information see https://hed-schema-library.readthedocs.io/en/latest/ind valueClass textClass - - inLibrary - score - EMG-muscle-name - - inLibrary - score - # Free text. @@ -3009,30 +2133,14 @@ For more information see https://hed-schema-library.readthedocs.io/en/latest/ind valueClass textClass - - inLibrary - score - EMG-feature - - inLibrary - score - EMG-myoclonus - - inLibrary - score - Negative-myoclonus - - inLibrary - score - # Free text. @@ -3043,18 +2151,10 @@ For more information see https://hed-schema-library.readthedocs.io/en/latest/ind valueClass textClass - - inLibrary - score - EMG-myoclonus-rhythmic - - inLibrary - score - # Free text. @@ -3065,18 +2165,10 @@ For more information see https://hed-schema-library.readthedocs.io/en/latest/ind valueClass textClass - - inLibrary - score - EMG-myoclonus-arrhythmic - - inLibrary - score - # Free text. @@ -3087,18 +2179,10 @@ For more information see https://hed-schema-library.readthedocs.io/en/latest/ind valueClass textClass - - inLibrary - score - EMG-myoclonus-synchronous - - inLibrary - score - # Free text. @@ -3109,18 +2193,10 @@ For more information see https://hed-schema-library.readthedocs.io/en/latest/ind valueClass textClass - - inLibrary - score - EMG-myoclonus-asynchronous - - inLibrary - score - # Free text. @@ -3131,27 +2207,15 @@ For more information see https://hed-schema-library.readthedocs.io/en/latest/ind valueClass textClass - - inLibrary - score - EMG-PLMS Periodic limb movements in sleep. - - inLibrary - score - EMG-spasm - - inLibrary - score - # Free text. @@ -3162,18 +2226,10 @@ For more information see https://hed-schema-library.readthedocs.io/en/latest/ind valueClass textClass - - inLibrary - score - EMG-tonic-contraction - - inLibrary - score - # Free text. @@ -3184,10 +2240,6 @@ For more information see https://hed-schema-library.readthedocs.io/en/latest/ind valueClass textClass - - inLibrary - score - @@ -3195,16 +2247,8 @@ For more information see https://hed-schema-library.readthedocs.io/en/latest/ind requireChild - - inLibrary - score - EMG-asymmetric-activation-left-first - - inLibrary - score - # Free text. @@ -3215,18 +2259,10 @@ For more information see https://hed-schema-library.readthedocs.io/en/latest/ind valueClass textClass - - inLibrary - score - EMG-asymmetric-activation-right-first - - inLibrary - score - # Free text. @@ -3237,10 +2273,6 @@ For more information see https://hed-schema-library.readthedocs.io/en/latest/ind valueClass textClass - - inLibrary - score - @@ -3249,10 +2281,6 @@ For more information see https://hed-schema-library.readthedocs.io/en/latest/ind requireChild - - inLibrary - score - # Free text. @@ -3263,10 +2291,6 @@ For more information see https://hed-schema-library.readthedocs.io/en/latest/ind valueClass textClass - - inLibrary - score - @@ -3276,10 +2300,6 @@ For more information see https://hed-schema-library.readthedocs.io/en/latest/ind requireChild - - inLibrary - score - # Free text. @@ -3290,10 +2310,6 @@ For more information see https://hed-schema-library.readthedocs.io/en/latest/ind valueClass textClass - - inLibrary - score - @@ -3303,26 +2319,14 @@ For more information see https://hed-schema-library.readthedocs.io/en/latest/ind requireChild - - inLibrary - score - Signal-morphology-property requireChild - - inLibrary - score - Rhythmic-activity-morphology EEG activity consisting of a sequence of waves approximately constant period. - - inLibrary - score - Delta-activity-morphology EEG rhythm in the delta (under 4 Hz) range that does not belong to the posterior dominant rhythm (scored under other organized rhythms). @@ -3331,10 +2335,6 @@ For more information see https://hed-schema-library.readthedocs.io/en/latest/ind Finding-frequency Finding-amplitude - - inLibrary - score - # Free text. @@ -3345,10 +2345,6 @@ For more information see https://hed-schema-library.readthedocs.io/en/latest/ind valueClass textClass - - inLibrary - score - @@ -3359,10 +2355,6 @@ For more information see https://hed-schema-library.readthedocs.io/en/latest/ind Finding-frequency Finding-amplitude - - inLibrary - score - # Free text. @@ -3373,10 +2365,6 @@ For more information see https://hed-schema-library.readthedocs.io/en/latest/ind valueClass textClass - - inLibrary - score - @@ -3387,10 +2375,6 @@ For more information see https://hed-schema-library.readthedocs.io/en/latest/ind Finding-frequency Finding-amplitude - - inLibrary - score - # Free text. @@ -3401,10 +2385,6 @@ For more information see https://hed-schema-library.readthedocs.io/en/latest/ind valueClass textClass - - inLibrary - score - @@ -3415,10 +2395,6 @@ For more information see https://hed-schema-library.readthedocs.io/en/latest/ind Finding-frequency Finding-amplitude - - inLibrary - score - # Free text. @@ -3429,10 +2405,6 @@ For more information see https://hed-schema-library.readthedocs.io/en/latest/ind valueClass textClass - - inLibrary - score - @@ -3442,10 +2414,6 @@ For more information see https://hed-schema-library.readthedocs.io/en/latest/ind Finding-frequency Finding-amplitude - - inLibrary - score - # Free text. @@ -3456,20 +2424,12 @@ For more information see https://hed-schema-library.readthedocs.io/en/latest/ind valueClass textClass - - inLibrary - score - Spike-morphology A transient, clearly distinguished from background activity, with pointed peak at a conventional paper speed or time scale and duration from 20 to under 70 ms, i.e. 1/50-1/15 s approximately. Main component is generally negative relative to other areas. Amplitude varies. - - inLibrary - score - # Free text. @@ -3480,19 +2440,11 @@ For more information see https://hed-schema-library.readthedocs.io/en/latest/ind valueClass textClass - - inLibrary - score - Spike-and-slow-wave-morphology A pattern consisting of a spike followed by a slow wave. - - inLibrary - score - # Free text. @@ -3503,19 +2455,11 @@ For more information see https://hed-schema-library.readthedocs.io/en/latest/ind valueClass textClass - - inLibrary - score - Runs-of-rapid-spikes-morphology Bursts of spike discharges at a rate from 10 to 25/sec (in most cases somewhat irregular). The bursts last more than 2 seconds (usually 2 to 10 seconds) and it is typically seen in sleep. Synonyms: rhythmic spikes, generalized paroxysmal fast activity, fast paroxysmal rhythms, grand mal discharge, fast beta activity. - - inLibrary - score - # Free text. @@ -3526,19 +2470,11 @@ For more information see https://hed-schema-library.readthedocs.io/en/latest/ind valueClass textClass - - inLibrary - score - Polyspikes-morphology Two or more consecutive spikes. - - inLibrary - score - # Free text. @@ -3549,19 +2485,11 @@ For more information see https://hed-schema-library.readthedocs.io/en/latest/ind valueClass textClass - - inLibrary - score - Polyspike-and-slow-wave-morphology Two or more consecutive spikes associated with one or more slow waves. - - inLibrary - score - # Free text. @@ -3572,19 +2500,11 @@ For more information see https://hed-schema-library.readthedocs.io/en/latest/ind valueClass textClass - - inLibrary - score - Sharp-wave-morphology A transient clearly distinguished from background activity, with pointed peak at a conventional paper speed or time scale, and duration of 70-200 ms, i.e. over 1/4-1/5 s approximately. Main component is generally negative relative to other areas. Amplitude varies. - - inLibrary - score - # Free text. @@ -3595,19 +2515,11 @@ For more information see https://hed-schema-library.readthedocs.io/en/latest/ind valueClass textClass - - inLibrary - score - Sharp-and-slow-wave-morphology A sequence of a sharp wave and a slow wave. - - inLibrary - score - # Free text. @@ -3618,19 +2530,11 @@ For more information see https://hed-schema-library.readthedocs.io/en/latest/ind valueClass textClass - - inLibrary - score - Slow-sharp-wave-morphology A transient that bears all the characteristics of a sharp-wave, but exceeds 200 ms. Synonym: blunted sharp wave. - - inLibrary - score - # Free text. @@ -3641,19 +2545,11 @@ For more information see https://hed-schema-library.readthedocs.io/en/latest/ind valueClass textClass - - inLibrary - score - High-frequency-oscillation-morphology HFO. - - inLibrary - score - # Free text. @@ -3664,19 +2560,11 @@ For more information see https://hed-schema-library.readthedocs.io/en/latest/ind valueClass textClass - - inLibrary - score - Hypsarrhythmia-classic-morphology Abnormal interictal high amplitude waves and a background of irregular spikes. - - inLibrary - score - # Free text. @@ -3687,18 +2575,10 @@ For more information see https://hed-schema-library.readthedocs.io/en/latest/ind valueClass textClass - - inLibrary - score - Hypsarrhythmia-modified-morphology - - inLibrary - score - # Free text. @@ -3709,19 +2589,11 @@ For more information see https://hed-schema-library.readthedocs.io/en/latest/ind valueClass textClass - - inLibrary - score - Fast-spike-activity-morphology A burst consisting of a sequence of spikes. Duration greater than 1 s. Frequency at least in the alpha range. - - inLibrary - score - # Free text. @@ -3732,19 +2604,11 @@ For more information see https://hed-schema-library.readthedocs.io/en/latest/ind valueClass textClass - - inLibrary - score - Low-voltage-fast-activity-morphology Refers to the fast, and often recruiting activity which can be recorded at the onset of an ictal discharge, particularly in invasive EEG recording of a seizure. - - inLibrary - score - # Free text. @@ -3755,19 +2619,11 @@ For more information see https://hed-schema-library.readthedocs.io/en/latest/ind valueClass textClass - - inLibrary - score - Polysharp-waves-morphology A sequence of two or more sharp-waves. - - inLibrary - score - # Free text. @@ -3778,18 +2634,10 @@ For more information see https://hed-schema-library.readthedocs.io/en/latest/ind valueClass textClass - - inLibrary - score - Slow-wave-large-amplitude-morphology - - inLibrary - score - # Free text. @@ -3800,19 +2648,11 @@ For more information see https://hed-schema-library.readthedocs.io/en/latest/ind valueClass textClass - - inLibrary - score - Irregular-delta-or-theta-activity-morphology EEG activity consisting of repetitive waves of inconsistent wave-duration but in delta and/or theta rang (greater than 125 ms). - - inLibrary - score - # Free text. @@ -3823,19 +2663,11 @@ For more information see https://hed-schema-library.readthedocs.io/en/latest/ind valueClass textClass - - inLibrary - score - Electrodecremental-change-morphology Sudden desynchronization of electrical activity. - - inLibrary - score - # Free text. @@ -3846,19 +2678,11 @@ For more information see https://hed-schema-library.readthedocs.io/en/latest/ind valueClass textClass - - inLibrary - score - DC-shift-morphology Shift of negative polarity of the direct current recordings, during seizures. - - inLibrary - score - # Free text. @@ -3869,19 +2693,11 @@ For more information see https://hed-schema-library.readthedocs.io/en/latest/ind valueClass textClass - - inLibrary - score - Disappearance-of-ongoing-activity-morphology Disappearance of the EEG activity that preceded the ictal event but still remnants of background activity (thus not enough to name it electrodecremental change). - - inLibrary - score - # Free text. @@ -3892,19 +2708,11 @@ For more information see https://hed-schema-library.readthedocs.io/en/latest/ind valueClass textClass - - inLibrary - score - Polymorphic-delta-activity-morphology EEG activity consisting of waves in the delta range (over 250 ms duration for each wave) but of different morphology. - - inLibrary - score - # Free text. @@ -3915,19 +2723,11 @@ For more information see https://hed-schema-library.readthedocs.io/en/latest/ind valueClass textClass - - inLibrary - score - Frontal-intermittent-rhythmic-delta-activity-morphology Frontal intermittent rhythmic delta activity (FIRDA). Fairly regular or approximately sinusoidal waves, mostly occurring in bursts at 1.5-2.5 Hz over the frontal areas of one or both sides of the head. Comment: most commonly associated with unspecified encephalopathy, in adults. - - inLibrary - score - # Free text. @@ -3938,19 +2738,11 @@ For more information see https://hed-schema-library.readthedocs.io/en/latest/ind valueClass textClass - - inLibrary - score - Occipital-intermittent-rhythmic-delta-activity-morphology Occipital intermittent rhythmic delta activity (OIRDA). Fairly regular or approximately sinusoidal waves, mostly occurring in bursts at 2-3 Hz over the occipital or posterior head regions of one or both sides of the head. Frequently blocked or attenuated by opening the eyes. Comment: most commonly associated with unspecified encephalopathy, in children. - - inLibrary - score - # Free text. @@ -3961,19 +2753,11 @@ For more information see https://hed-schema-library.readthedocs.io/en/latest/ind valueClass textClass - - inLibrary - score - Temporal-intermittent-rhythmic-delta-activity-morphology Temporal intermittent rhythmic delta activity (TIRDA). Fairly regular or approximately sinusoidal waves, mostly occurring in bursts at over the temporal areas of one side of the head. Comment: most commonly associated with temporal lobe epilepsy. - - inLibrary - score - # Free text. @@ -3984,10 +2768,6 @@ For more information see https://hed-schema-library.readthedocs.io/en/latest/ind valueClass textClass - - inLibrary - score - @@ -3996,10 +2776,6 @@ For more information see https://hed-schema-library.readthedocs.io/en/latest/ind requireChild - - inLibrary - score - Periodic-discharges-superimposed-activity @@ -4009,20 +2785,12 @@ For more information see https://hed-schema-library.readthedocs.io/en/latest/ind suggestedTag Property-not-possible-to-determine - - inLibrary - score - Periodic-discharges-fast-superimposed-activity suggestedTag Finding-frequency - - inLibrary - score - # Free text. @@ -4033,10 +2801,6 @@ For more information see https://hed-schema-library.readthedocs.io/en/latest/ind valueClass textClass - - inLibrary - score - @@ -4045,10 +2809,6 @@ For more information see https://hed-schema-library.readthedocs.io/en/latest/ind suggestedTag Finding-frequency - - inLibrary - score - # Free text. @@ -4059,10 +2819,6 @@ For more information see https://hed-schema-library.readthedocs.io/en/latest/ind valueClass textClass - - inLibrary - score - @@ -4075,16 +2831,8 @@ For more information see https://hed-schema-library.readthedocs.io/en/latest/ind suggestedTag Property-not-possible-to-determine - - inLibrary - score - Spiky-periodic-discharge-sharpness - - inLibrary - score - # Free text. @@ -4095,18 +2843,10 @@ For more information see https://hed-schema-library.readthedocs.io/en/latest/ind valueClass textClass - - inLibrary - score - Sharp-periodic-discharge-sharpness - - inLibrary - score - # Free text. @@ -4117,18 +2857,10 @@ For more information see https://hed-schema-library.readthedocs.io/en/latest/ind valueClass textClass - - inLibrary - score - Sharply-contoured-periodic-discharge-sharpness - - inLibrary - score - # Free text. @@ -4139,18 +2871,10 @@ For more information see https://hed-schema-library.readthedocs.io/en/latest/ind valueClass textClass - - inLibrary - score - Blunt-periodic-discharge-sharpness - - inLibrary - score - # Free text. @@ -4161,10 +2885,6 @@ For more information see https://hed-schema-library.readthedocs.io/en/latest/ind valueClass textClass - - inLibrary - score - @@ -4177,16 +2897,8 @@ For more information see https://hed-schema-library.readthedocs.io/en/latest/ind suggestedTag Property-not-possible-to-determine - - inLibrary - score - 1-periodic-discharge-phase - - inLibrary - score - # Free text. @@ -4197,18 +2909,10 @@ For more information see https://hed-schema-library.readthedocs.io/en/latest/ind valueClass textClass - - inLibrary - score - 2-periodic-discharge-phases - - inLibrary - score - # Free text. @@ -4219,18 +2923,10 @@ For more information see https://hed-schema-library.readthedocs.io/en/latest/ind valueClass textClass - - inLibrary - score - 3-periodic-discharge-phases - - inLibrary - score - # Free text. @@ -4241,18 +2937,10 @@ For more information see https://hed-schema-library.readthedocs.io/en/latest/ind valueClass textClass - - inLibrary - score - Greater-than-3-periodic-discharge-phases - - inLibrary - score - # Free text. @@ -4263,10 +2951,6 @@ For more information see https://hed-schema-library.readthedocs.io/en/latest/ind valueClass textClass - - inLibrary - score - @@ -4278,10 +2962,6 @@ For more information see https://hed-schema-library.readthedocs.io/en/latest/ind Property-exists Property-absence - - inLibrary - score - # Free text. @@ -4292,10 +2972,6 @@ For more information see https://hed-schema-library.readthedocs.io/en/latest/ind valueClass textClass - - inLibrary - score - @@ -4307,17 +2983,9 @@ For more information see https://hed-schema-library.readthedocs.io/en/latest/ind suggestedTag Property-not-possible-to-determine - - inLibrary - score - Periodic-discharge-absolute-amplitude-very-low Lower than 20 microV. - - inLibrary - score - # Free text. @@ -4328,19 +2996,11 @@ For more information see https://hed-schema-library.readthedocs.io/en/latest/ind valueClass textClass - - inLibrary - score - Low-periodic-discharge-absolute-amplitude 20 to 49 microV. - - inLibrary - score - # Free text. @@ -4351,19 +3011,11 @@ For more information see https://hed-schema-library.readthedocs.io/en/latest/ind valueClass textClass - - inLibrary - score - Medium-periodic-discharge-absolute-amplitude 50 to 199 microV. - - inLibrary - score - # Free text. @@ -4374,19 +3026,11 @@ For more information see https://hed-schema-library.readthedocs.io/en/latest/ind valueClass textClass - - inLibrary - score - High-periodic-discharge-absolute-amplitude Greater than 200 microV. - - inLibrary - score - # Free text. @@ -4397,10 +3041,6 @@ For more information see https://hed-schema-library.readthedocs.io/en/latest/ind valueClass textClass - - inLibrary - score - @@ -4413,16 +3053,8 @@ For more information see https://hed-schema-library.readthedocs.io/en/latest/ind suggestedTag Property-not-possible-to-determine - - inLibrary - score - Periodic-discharge-relative-amplitude-less-than-equal-2 - - inLibrary - score - # Free text. @@ -4433,18 +3065,10 @@ For more information see https://hed-schema-library.readthedocs.io/en/latest/ind valueClass textClass - - inLibrary - score - Periodic-discharge-relative-amplitude-greater-than-2 - - inLibrary - score - # Free text. @@ -4455,10 +3079,6 @@ For more information see https://hed-schema-library.readthedocs.io/en/latest/ind valueClass textClass - - inLibrary - score - @@ -4467,16 +3087,8 @@ For more information see https://hed-schema-library.readthedocs.io/en/latest/ind requireChild - - inLibrary - score - Periodic-discharge-postitive-polarity - - inLibrary - score - # Free text. @@ -4487,18 +3099,10 @@ For more information see https://hed-schema-library.readthedocs.io/en/latest/ind valueClass textClass - - inLibrary - score - Periodic-discharge-negative-polarity - - inLibrary - score - # Free text. @@ -4509,18 +3113,10 @@ For more information see https://hed-schema-library.readthedocs.io/en/latest/ind valueClass textClass - - inLibrary - score - Periodic-discharge-unclear-polarity - - inLibrary - score - # Free text. @@ -4531,10 +3127,6 @@ For more information see https://hed-schema-library.readthedocs.io/en/latest/ind valueClass textClass - - inLibrary - score - @@ -4546,10 +3138,6 @@ For more information see https://hed-schema-library.readthedocs.io/en/latest/ind requireChild - - inLibrary - score - Source-analysis-laterality @@ -4559,173 +3147,77 @@ For more information see https://hed-schema-library.readthedocs.io/en/latest/ind suggestedTag Brain-laterality - - inLibrary - score - Source-analysis-brain-region requireChild - - inLibrary - score - Source-analysis-frontal-perisylvian-superior-surface - - inLibrary - score - Source-analysis-frontal-lateral - - inLibrary - score - Source-analysis-frontal-mesial - - inLibrary - score - Source-analysis-frontal-polar - - inLibrary - score - Source-analysis-frontal-orbitofrontal - - inLibrary - score - Source-analysis-temporal-polar - - inLibrary - score - Source-analysis-temporal-basal - - inLibrary - score - Source-analysis-temporal-lateral-anterior - - inLibrary - score - Source-analysis-temporal-lateral-posterior - - inLibrary - score - Source-analysis-temporal-perisylvian-inferior-surface - - inLibrary - score - Source-analysis-central-lateral-convexity - - inLibrary - score - Source-analysis-central-mesial - - inLibrary - score - Source-analysis-central-sulcus-anterior-surface - - inLibrary - score - Source-analysis-central-sulcus-posterior-surface - - inLibrary - score - Source-analysis-central-opercular - - inLibrary - score - Source-analysis-parietal-lateral-convexity - - inLibrary - score - Source-analysis-parietal-mesial - - inLibrary - score - Source-analysis-parietal-opercular - - inLibrary - score - Source-analysis-occipital-lateral - - inLibrary - score - Source-analysis-occipital-mesial - - inLibrary - score - Source-analysis-occipital-basal - - inLibrary - score - Source-analysis-insula - - inLibrary - score - @@ -4735,25 +3227,13 @@ For more information see https://hed-schema-library.readthedocs.io/en/latest/ind requireChild - - inLibrary - score - Brain-laterality requireChild - - inLibrary - score - Brain-laterality-left - - inLibrary - score - # Free text. @@ -4764,18 +3244,10 @@ For more information see https://hed-schema-library.readthedocs.io/en/latest/ind valueClass textClass - - inLibrary - score - Brain-laterality-left-greater-right - - inLibrary - score - # Free text. @@ -4786,18 +3258,10 @@ For more information see https://hed-schema-library.readthedocs.io/en/latest/ind valueClass textClass - - inLibrary - score - Brain-laterality-right - - inLibrary - score - # Free text. @@ -4808,18 +3272,10 @@ For more information see https://hed-schema-library.readthedocs.io/en/latest/ind valueClass textClass - - inLibrary - score - Brain-laterality-right-greater-left - - inLibrary - score - # Free text. @@ -4830,18 +3286,10 @@ For more information see https://hed-schema-library.readthedocs.io/en/latest/ind valueClass textClass - - inLibrary - score - Brain-laterality-midline - - inLibrary - score - # Free text. @@ -4852,18 +3300,10 @@ For more information see https://hed-schema-library.readthedocs.io/en/latest/ind valueClass textClass - - inLibrary - score - Brain-laterality-diffuse-asynchronous - - inLibrary - score - # Free text. @@ -4874,10 +3314,6 @@ For more information see https://hed-schema-library.readthedocs.io/en/latest/ind valueClass textClass - - inLibrary - score - @@ -4886,16 +3322,8 @@ For more information see https://hed-schema-library.readthedocs.io/en/latest/ind requireChild - - inLibrary - score - Brain-region-frontal - - inLibrary - score - # Free text. @@ -4906,18 +3334,10 @@ For more information see https://hed-schema-library.readthedocs.io/en/latest/ind valueClass textClass - - inLibrary - score - Brain-region-temporal - - inLibrary - score - # Free text. @@ -4928,18 +3348,10 @@ For more information see https://hed-schema-library.readthedocs.io/en/latest/ind valueClass textClass - - inLibrary - score - Brain-region-central - - inLibrary - score - # Free text. @@ -4950,18 +3362,10 @@ For more information see https://hed-schema-library.readthedocs.io/en/latest/ind valueClass textClass - - inLibrary - score - Brain-region-parietal - - inLibrary - score - # Free text. @@ -4972,18 +3376,10 @@ For more information see https://hed-schema-library.readthedocs.io/en/latest/ind valueClass textClass - - inLibrary - score - Brain-region-occipital - - inLibrary - score - # Free text. @@ -4994,10 +3390,6 @@ For more information see https://hed-schema-library.readthedocs.io/en/latest/ind valueClass textClass - - inLibrary - score - @@ -5006,16 +3398,8 @@ For more information see https://hed-schema-library.readthedocs.io/en/latest/ind requireChild - - inLibrary - score - Body-part-eyelid - - inLibrary - score - # Free text. @@ -5026,18 +3410,10 @@ For more information see https://hed-schema-library.readthedocs.io/en/latest/ind valueClass textClass - - inLibrary - score - Body-part-face - - inLibrary - score - # Free text. @@ -5048,18 +3424,10 @@ For more information see https://hed-schema-library.readthedocs.io/en/latest/ind valueClass textClass - - inLibrary - score - Body-part-arm - - inLibrary - score - # Free text. @@ -5070,18 +3438,10 @@ For more information see https://hed-schema-library.readthedocs.io/en/latest/ind valueClass textClass - - inLibrary - score - Body-part-leg - - inLibrary - score - # Free text. @@ -5092,18 +3452,10 @@ For more information see https://hed-schema-library.readthedocs.io/en/latest/ind valueClass textClass - - inLibrary - score - Body-part-trunk - - inLibrary - score - # Free text. @@ -5114,18 +3466,10 @@ For more information see https://hed-schema-library.readthedocs.io/en/latest/ind valueClass textClass - - inLibrary - score - Body-part-visceral - - inLibrary - score - # Free text. @@ -5136,18 +3480,10 @@ For more information see https://hed-schema-library.readthedocs.io/en/latest/ind valueClass textClass - - inLibrary - score - Body-part-hemi - - inLibrary - score - # Free text. @@ -5158,10 +3494,6 @@ For more information see https://hed-schema-library.readthedocs.io/en/latest/ind valueClass textClass - - inLibrary - score - @@ -5170,16 +3502,8 @@ For more information see https://hed-schema-library.readthedocs.io/en/latest/ind requireChild - - inLibrary - score - Brain-centricity-axial - - inLibrary - score - # Free text. @@ -5190,18 +3514,10 @@ For more information see https://hed-schema-library.readthedocs.io/en/latest/ind valueClass textClass - - inLibrary - score - Brain-centricity-proximal-limb - - inLibrary - score - # Free text. @@ -5212,18 +3528,10 @@ For more information see https://hed-schema-library.readthedocs.io/en/latest/ind valueClass textClass - - inLibrary - score - Brain-centricity-distal-limb - - inLibrary - score - # Free text. @@ -5234,10 +3542,6 @@ For more information see https://hed-schema-library.readthedocs.io/en/latest/ind valueClass textClass - - inLibrary - score - @@ -5247,10 +3551,6 @@ For more information see https://hed-schema-library.readthedocs.io/en/latest/ind requireChild - - inLibrary - score - # Free text. @@ -5261,10 +3561,6 @@ For more information see https://hed-schema-library.readthedocs.io/en/latest/ind valueClass textClass - - inLibrary - score - @@ -5278,10 +3574,6 @@ For more information see https://hed-schema-library.readthedocs.io/en/latest/ind Brain-region Sensors - - inLibrary - score - # Free text. @@ -5292,10 +3584,6 @@ For more information see https://hed-schema-library.readthedocs.io/en/latest/ind valueClass textClass - - inLibrary - score - @@ -5307,10 +3595,6 @@ For more information see https://hed-schema-library.readthedocs.io/en/latest/ind Property-exists Property-absence - - inLibrary - score - # Free text. @@ -5321,10 +3605,6 @@ For more information see https://hed-schema-library.readthedocs.io/en/latest/ind valueClass textClass - - inLibrary - score - @@ -5334,10 +3614,6 @@ For more information see https://hed-schema-library.readthedocs.io/en/latest/ind requireChild - - inLibrary - score - Modulators-reactivity Susceptibility of individual rhythms or the EEG as a whole to change following sensory stimulation or other physiologic actions. @@ -5349,10 +3625,6 @@ For more information see https://hed-schema-library.readthedocs.io/en/latest/ind Property-exists Property-absence - - inLibrary - score - # Free text. @@ -5363,10 +3635,6 @@ For more information see https://hed-schema-library.readthedocs.io/en/latest/ind valueClass textClass - - inLibrary - score - @@ -5377,10 +3645,6 @@ For more information see https://hed-schema-library.readthedocs.io/en/latest/ind Property-exists Property-absence - - inLibrary - score - # Free text. @@ -5391,10 +3655,6 @@ For more information see https://hed-schema-library.readthedocs.io/en/latest/ind valueClass textClass - - inLibrary - score - @@ -5407,10 +3667,6 @@ For more information see https://hed-schema-library.readthedocs.io/en/latest/ind Finding-unmodified Finding-triggered-by - - inLibrary - score - Medication-effect-EEG @@ -5421,10 +3677,6 @@ For more information see https://hed-schema-library.readthedocs.io/en/latest/ind Finding-stopped-by Finding-unmodified - - inLibrary - score - Medication-reduction-effect-EEG @@ -5435,10 +3687,6 @@ For more information see https://hed-schema-library.readthedocs.io/en/latest/ind Finding-stopped-by Finding-unmodified - - inLibrary - score - Auditive-stimuli-effect @@ -5449,10 +3697,6 @@ For more information see https://hed-schema-library.readthedocs.io/en/latest/ind Finding-stopped-by Finding-unmodified - - inLibrary - score - Nociceptive-stimuli-effect @@ -5464,10 +3708,6 @@ For more information see https://hed-schema-library.readthedocs.io/en/latest/ind Finding-unmodified Finding-triggered-by - - inLibrary - score - Physical-effort-effect @@ -5479,10 +3719,6 @@ For more information see https://hed-schema-library.readthedocs.io/en/latest/ind Finding-unmodified Finding-triggered-by - - inLibrary - score - Cognitive-task-effect @@ -5494,20 +3730,12 @@ For more information see https://hed-schema-library.readthedocs.io/en/latest/ind Finding-unmodified Finding-triggered-by - - inLibrary - score - Other-modulators-effect-EEG requireChild - - inLibrary - score - # Free text. @@ -5518,25 +3746,13 @@ For more information see https://hed-schema-library.readthedocs.io/en/latest/ind valueClass textClass - - inLibrary - score - Facilitating-factor Facilitating factors are defined as transient and sporadic endogenous or exogenous elements capable of augmenting seizure incidence (increasing the likelihood of seizure occurrence). - - inLibrary - score - Facilitating-factor-alcohol - - inLibrary - score - # Free text. @@ -5547,18 +3763,10 @@ For more information see https://hed-schema-library.readthedocs.io/en/latest/ind valueClass textClass - - inLibrary - score - Facilitating-factor-awake - - inLibrary - score - # Free text. @@ -5569,18 +3777,10 @@ For more information see https://hed-schema-library.readthedocs.io/en/latest/ind valueClass textClass - - inLibrary - score - Facilitating-factor-catamenial - - inLibrary - score - # Free text. @@ -5591,18 +3791,10 @@ For more information see https://hed-schema-library.readthedocs.io/en/latest/ind valueClass textClass - - inLibrary - score - Facilitating-factor-fever - - inLibrary - score - # Free text. @@ -5613,18 +3805,10 @@ For more information see https://hed-schema-library.readthedocs.io/en/latest/ind valueClass textClass - - inLibrary - score - Facilitating-factor-sleep - - inLibrary - score - # Free text. @@ -5635,18 +3819,10 @@ For more information see https://hed-schema-library.readthedocs.io/en/latest/ind valueClass textClass - - inLibrary - score - Facilitating-factor-sleep-deprived - - inLibrary - score - # Free text. @@ -5657,10 +3833,6 @@ For more information see https://hed-schema-library.readthedocs.io/en/latest/ind valueClass textClass - - inLibrary - score - @@ -5668,10 +3840,6 @@ For more information see https://hed-schema-library.readthedocs.io/en/latest/ind requireChild - - inLibrary - score - # Free text. @@ -5682,10 +3850,6 @@ For more information see https://hed-schema-library.readthedocs.io/en/latest/ind valueClass textClass - - inLibrary - score - @@ -5695,16 +3859,8 @@ For more information see https://hed-schema-library.readthedocs.io/en/latest/ind requireChild - - inLibrary - score - Hyperventilation-provoked - - inLibrary - score - # Free text. @@ -5715,18 +3871,10 @@ For more information see https://hed-schema-library.readthedocs.io/en/latest/ind valueClass textClass - - inLibrary - score - Reflex-provoked - - inLibrary - score - # Free text. @@ -5737,10 +3885,6 @@ For more information see https://hed-schema-library.readthedocs.io/en/latest/ind valueClass textClass - - inLibrary - score - @@ -5752,10 +3896,6 @@ For more information see https://hed-schema-library.readthedocs.io/en/latest/ind Finding-stopped-by Finding-unmodified - - inLibrary - score - Medication-reduction-effect-clinical @@ -5765,20 +3905,12 @@ For more information see https://hed-schema-library.readthedocs.io/en/latest/ind Finding-stopped-by Finding-unmodified - - inLibrary - score - Other-modulators-effect-clinical requireChild - - inLibrary - score - # Free text. @@ -5789,10 +3921,6 @@ For more information see https://hed-schema-library.readthedocs.io/en/latest/ind valueClass textClass - - inLibrary - score - @@ -5800,20 +3928,12 @@ For more information see https://hed-schema-library.readthedocs.io/en/latest/ind requireChild - - inLibrary - score - Posterior-stimulus-dependent-intermittent-photic-stimulation-response suggestedTag Finding-frequency - - inLibrary - score - # Free text. @@ -5824,10 +3944,6 @@ For more information see https://hed-schema-library.readthedocs.io/en/latest/ind valueClass textClass - - inLibrary - score - @@ -5837,10 +3953,6 @@ For more information see https://hed-schema-library.readthedocs.io/en/latest/ind suggestedTag Finding-frequency - - inLibrary - score - # Free text. @@ -5851,10 +3963,6 @@ For more information see https://hed-schema-library.readthedocs.io/en/latest/ind valueClass textClass - - inLibrary - score - @@ -5863,10 +3971,6 @@ For more information see https://hed-schema-library.readthedocs.io/en/latest/ind suggestedTag Finding-frequency - - inLibrary - score - # Free text. @@ -5877,10 +3981,6 @@ For more information see https://hed-schema-library.readthedocs.io/en/latest/ind valueClass textClass - - inLibrary - score - @@ -5890,10 +3990,6 @@ For more information see https://hed-schema-library.readthedocs.io/en/latest/ind suggestedTag Finding-frequency - - inLibrary - score - # Free text. @@ -5904,10 +4000,6 @@ For more information see https://hed-schema-library.readthedocs.io/en/latest/ind valueClass textClass - - inLibrary - score - @@ -5916,10 +4008,6 @@ For more information see https://hed-schema-library.readthedocs.io/en/latest/ind suggestedTag Finding-frequency - - inLibrary - score - # Free text. @@ -5930,10 +4018,6 @@ For more information see https://hed-schema-library.readthedocs.io/en/latest/ind valueClass textClass - - inLibrary - score - @@ -5942,10 +4026,6 @@ For more information see https://hed-schema-library.readthedocs.io/en/latest/ind suggestedTag Finding-frequency - - inLibrary - score - # Free text. @@ -5956,18 +4036,10 @@ For more information see https://hed-schema-library.readthedocs.io/en/latest/ind valueClass textClass - - inLibrary - score - Unmodified-intermittent-photic-stimulation-effect - - inLibrary - score - # Free text. @@ -5978,10 +4050,6 @@ For more information see https://hed-schema-library.readthedocs.io/en/latest/ind valueClass textClass - - inLibrary - score - @@ -5990,16 +4058,8 @@ For more information see https://hed-schema-library.readthedocs.io/en/latest/ind requireChild - - inLibrary - score - Hyperventilation-refused-procedure - - inLibrary - score - # Free text. @@ -6010,18 +4070,10 @@ For more information see https://hed-schema-library.readthedocs.io/en/latest/ind valueClass textClass - - inLibrary - score - Hyperventilation-poor-effort - - inLibrary - score - # Free text. @@ -6032,18 +4084,10 @@ For more information see https://hed-schema-library.readthedocs.io/en/latest/ind valueClass textClass - - inLibrary - score - Hyperventilation-good-effort - - inLibrary - score - # Free text. @@ -6054,18 +4098,10 @@ For more information see https://hed-schema-library.readthedocs.io/en/latest/ind valueClass textClass - - inLibrary - score - Hyperventilation-excellent-effort - - inLibrary - score - # Free text. @@ -6076,10 +4112,6 @@ For more information see https://hed-schema-library.readthedocs.io/en/latest/ind valueClass textClass - - inLibrary - score - @@ -6089,17 +4121,9 @@ For more information see https://hed-schema-library.readthedocs.io/en/latest/ind requireChild - - inLibrary - score - Modulators-effect-continuous-during-NRS Continuous during non-rapid-eye-movement-sleep (NRS) - - inLibrary - score - # Free text. @@ -6110,18 +4134,10 @@ For more information see https://hed-schema-library.readthedocs.io/en/latest/ind valueClass textClass - - inLibrary - score - Modulators-effect-only-during - - inLibrary - score - # Only during Sleep/Awakening/Hyperventilation/Physical effort/Cognitive task. Free text. @@ -6132,19 +4148,11 @@ For more information see https://hed-schema-library.readthedocs.io/en/latest/ind valueClass textClass - - inLibrary - score - Modulators-effect-change-of-patterns Change of patterns during sleep/awakening. - - inLibrary - score - # Free text. @@ -6155,10 +4163,6 @@ For more information see https://hed-schema-library.readthedocs.io/en/latest/ind valueClass textClass - - inLibrary - score - @@ -6169,10 +4173,6 @@ For more information see https://hed-schema-library.readthedocs.io/en/latest/ind requireChild - - inLibrary - score - Appearance-mode Describes how the non-ictal EEG pattern/graphoelement is distributed through the recording. @@ -6183,17 +4183,9 @@ For more information see https://hed-schema-library.readthedocs.io/en/latest/ind suggestedTag Property-not-possible-to-determine - - inLibrary - score - Random-appearance-mode Occurrence of the non-ictal EEG pattern / graphoelement without any rhythmicity / periodicity. - - inLibrary - score - # Free text. @@ -6204,19 +4196,11 @@ For more information see https://hed-schema-library.readthedocs.io/en/latest/ind valueClass textClass - - inLibrary - score - Periodic-appearance-mode Non-ictal EEG pattern / graphoelement occurring at an approximately regular rate / interval (generally of 1 to several seconds). - - inLibrary - score - # Free text. @@ -6227,19 +4211,11 @@ For more information see https://hed-schema-library.readthedocs.io/en/latest/ind valueClass textClass - - inLibrary - score - Variable-appearance-mode Occurrence of non-ictal EEG pattern / graphoelements, that is sometimes rhythmic or periodic, other times random, throughout the recording. - - inLibrary - score - # Free text. @@ -6250,18 +4226,10 @@ For more information see https://hed-schema-library.readthedocs.io/en/latest/ind valueClass textClass - - inLibrary - score - Intermittent-appearance-mode - - inLibrary - score - # Free text. @@ -6272,18 +4240,10 @@ For more information see https://hed-schema-library.readthedocs.io/en/latest/ind valueClass textClass - - inLibrary - score - Continuous-appearance-mode - - inLibrary - score - # Free text. @@ -6294,10 +4254,6 @@ For more information see https://hed-schema-library.readthedocs.io/en/latest/ind valueClass textClass - - inLibrary - score - @@ -6307,10 +4263,6 @@ For more information see https://hed-schema-library.readthedocs.io/en/latest/ind requireChild - - inLibrary - score - Single-discharge-pattern Applies to the intra-burst pattern: a graphoelement that is not repetitive; before and after the graphoelement one can distinguish the background activity. @@ -6318,10 +4270,6 @@ For more information see https://hed-schema-library.readthedocs.io/en/latest/ind suggestedTag Finding-incidence - - inLibrary - score - # Free text. @@ -6332,10 +4280,6 @@ For more information see https://hed-schema-library.readthedocs.io/en/latest/ind valueClass textClass - - inLibrary - score - @@ -6346,10 +4290,6 @@ For more information see https://hed-schema-library.readthedocs.io/en/latest/ind Finding-prevalence Finding-frequency - - inLibrary - score - # Free text. @@ -6360,10 +4300,6 @@ For more information see https://hed-schema-library.readthedocs.io/en/latest/ind valueClass textClass - - inLibrary - score - @@ -6373,10 +4309,6 @@ For more information see https://hed-schema-library.readthedocs.io/en/latest/ind suggestedTag Finding-prevalence - - inLibrary - score - # Free text. @@ -6387,18 +4319,10 @@ For more information see https://hed-schema-library.readthedocs.io/en/latest/ind valueClass textClass - - inLibrary - score - Fragmented-discharge-pattern - - inLibrary - score - # Free text. @@ -6409,10 +4333,6 @@ For more information see https://hed-schema-library.readthedocs.io/en/latest/ind valueClass textClass - - inLibrary - score - @@ -6422,10 +4342,6 @@ For more information see https://hed-schema-library.readthedocs.io/en/latest/ind requireChild - - inLibrary - score - Periodic-discharge-duration @@ -6435,17 +4351,9 @@ For more information see https://hed-schema-library.readthedocs.io/en/latest/ind suggestedTag Property-not-possible-to-determine - - inLibrary - score - Very-brief-periodic-discharge-duration Less than 10 sec. - - inLibrary - score - # Free text. @@ -6456,19 +4364,11 @@ For more information see https://hed-schema-library.readthedocs.io/en/latest/ind valueClass textClass - - inLibrary - score - Brief-periodic-discharge-duration 10 to 59 sec. - - inLibrary - score - # Free text. @@ -6479,19 +4379,11 @@ For more information see https://hed-schema-library.readthedocs.io/en/latest/ind valueClass textClass - - inLibrary - score - Intermediate-periodic-discharge-duration 1 to 4.9 min. - - inLibrary - score - # Free text. @@ -6502,19 +4394,11 @@ For more information see https://hed-schema-library.readthedocs.io/en/latest/ind valueClass textClass - - inLibrary - score - Long-periodic-discharge-duration 5 to 59 min. - - inLibrary - score - # Free text. @@ -6525,19 +4409,11 @@ For more information see https://hed-schema-library.readthedocs.io/en/latest/ind valueClass textClass - - inLibrary - score - Very-long-periodic-discharge-duration Greater than 1 hour. - - inLibrary - score - # Free text. @@ -6548,10 +4424,6 @@ For more information see https://hed-schema-library.readthedocs.io/en/latest/ind valueClass textClass - - inLibrary - score - @@ -6564,16 +4436,8 @@ For more information see https://hed-schema-library.readthedocs.io/en/latest/ind suggestedTag Property-not-possible-to-determine - - inLibrary - score - Sudden-periodic-discharge-onset - - inLibrary - score - # Free text. @@ -6584,18 +4448,10 @@ For more information see https://hed-schema-library.readthedocs.io/en/latest/ind valueClass textClass - - inLibrary - score - Gradual-periodic-discharge-onset - - inLibrary - score - # Free text. @@ -6606,10 +4462,6 @@ For more information see https://hed-schema-library.readthedocs.io/en/latest/ind valueClass textClass - - inLibrary - score - @@ -6622,16 +4474,8 @@ For more information see https://hed-schema-library.readthedocs.io/en/latest/ind suggestedTag Property-not-possible-to-determine - - inLibrary - score - Evolving-periodic-discharge-dynamics - - inLibrary - score - # Free text. @@ -6642,18 +4486,10 @@ For more information see https://hed-schema-library.readthedocs.io/en/latest/ind valueClass textClass - - inLibrary - score - Fluctuating-periodic-discharge-dynamics - - inLibrary - score - # Free text. @@ -6664,18 +4500,10 @@ For more information see https://hed-schema-library.readthedocs.io/en/latest/ind valueClass textClass - - inLibrary - score - Static-periodic-discharge-dynamics - - inLibrary - score - # Free text. @@ -6686,10 +4514,6 @@ For more information see https://hed-schema-library.readthedocs.io/en/latest/ind valueClass textClass - - inLibrary - score - @@ -6697,10 +4521,6 @@ For more information see https://hed-schema-library.readthedocs.io/en/latest/ind Finding-extent Percentage of occurrence during the recording (background activity and interictal finding). - - inLibrary - score - # @@ -6710,10 +4530,6 @@ For more information see https://hed-schema-library.readthedocs.io/en/latest/ind valueClass numericClass - - inLibrary - score - @@ -6722,16 +4538,8 @@ For more information see https://hed-schema-library.readthedocs.io/en/latest/ind requireChild - - inLibrary - score - Only-once-finding-incidence - - inLibrary - score - # Free text. @@ -6742,19 +4550,11 @@ For more information see https://hed-schema-library.readthedocs.io/en/latest/ind valueClass textClass - - inLibrary - score - Rare-finding-incidence less than 1/h - - inLibrary - score - # Free text. @@ -6765,19 +4565,11 @@ For more information see https://hed-schema-library.readthedocs.io/en/latest/ind valueClass textClass - - inLibrary - score - Uncommon-finding-incidence 1/5 min to 1/h. - - inLibrary - score - # Free text. @@ -6788,19 +4580,11 @@ For more information see https://hed-schema-library.readthedocs.io/en/latest/ind valueClass textClass - - inLibrary - score - Occasional-finding-incidence 1/min to 1/5min. - - inLibrary - score - # Free text. @@ -6811,19 +4595,11 @@ For more information see https://hed-schema-library.readthedocs.io/en/latest/ind valueClass textClass - - inLibrary - score - Frequent-finding-incidence 1/10 s to 1/min. - - inLibrary - score - # Free text. @@ -6834,19 +4610,11 @@ For more information see https://hed-schema-library.readthedocs.io/en/latest/ind valueClass textClass - - inLibrary - score - Abundant-finding-incidence Greater than 1/10 s). - - inLibrary - score - # Free text. @@ -6857,10 +4625,6 @@ For more information see https://hed-schema-library.readthedocs.io/en/latest/ind valueClass textClass - - inLibrary - score - @@ -6870,17 +4634,9 @@ For more information see https://hed-schema-library.readthedocs.io/en/latest/ind requireChild - - inLibrary - score - Rare-finding-prevalence Less than 1 percent. - - inLibrary - score - # Free text. @@ -6891,19 +4647,11 @@ For more information see https://hed-schema-library.readthedocs.io/en/latest/ind valueClass textClass - - inLibrary - score - Occasional-finding-prevalence 1 to 9 percent. - - inLibrary - score - # Free text. @@ -6914,19 +4662,11 @@ For more information see https://hed-schema-library.readthedocs.io/en/latest/ind valueClass textClass - - inLibrary - score - Frequent-finding-prevalence 10 to 49 percent. - - inLibrary - score - # Free text. @@ -6937,19 +4677,11 @@ For more information see https://hed-schema-library.readthedocs.io/en/latest/ind valueClass textClass - - inLibrary - score - Abundant-finding-prevalence 50 to 89 percent. - - inLibrary - score - # Free text. @@ -6960,19 +4692,11 @@ For more information see https://hed-schema-library.readthedocs.io/en/latest/ind valueClass textClass - - inLibrary - score - Continuous-finding-prevalence Greater than 90 percent. - - inLibrary - score - # Free text. @@ -6983,10 +4707,6 @@ For more information see https://hed-schema-library.readthedocs.io/en/latest/ind valueClass textClass - - inLibrary - score - @@ -6997,10 +4717,6 @@ For more information see https://hed-schema-library.readthedocs.io/en/latest/ind requireChild - - inLibrary - score - Posterior-dominant-rhythm-amplitude-range @@ -7010,17 +4726,9 @@ For more information see https://hed-schema-library.readthedocs.io/en/latest/ind suggestedTag Property-not-possible-to-determine - - inLibrary - score - Low-posterior-dominant-rhythm-amplitude-range Low (less than 20 microV). - - inLibrary - score - # Free text. @@ -7031,19 +4739,11 @@ For more information see https://hed-schema-library.readthedocs.io/en/latest/ind valueClass textClass - - inLibrary - score - Medium-posterior-dominant-rhythm-amplitude-range Medium (between 20 and 70 microV). - - inLibrary - score - # Free text. @@ -7054,19 +4754,11 @@ For more information see https://hed-schema-library.readthedocs.io/en/latest/ind valueClass textClass - - inLibrary - score - High-posterior-dominant-rhythm-amplitude-range High (more than 70 microV). - - inLibrary - score - # Free text. @@ -7077,10 +4769,6 @@ For more information see https://hed-schema-library.readthedocs.io/en/latest/ind valueClass textClass - - inLibrary - score - @@ -7090,17 +4778,9 @@ For more information see https://hed-schema-library.readthedocs.io/en/latest/ind requireChild - - inLibrary - score - Posterior-dominant-rhythm-frequency-asymmetry-lower-left Hz lower on the left side. - - inLibrary - score - # Free text. @@ -7111,19 +4791,11 @@ For more information see https://hed-schema-library.readthedocs.io/en/latest/ind valueClass textClass - - inLibrary - score - Posterior-dominant-rhythm-frequency-asymmetry-lower-right Hz lower on the right side. - - inLibrary - score - # Free text. @@ -7134,10 +4806,6 @@ For more information see https://hed-schema-library.readthedocs.io/en/latest/ind valueClass textClass - - inLibrary - score - @@ -7148,17 +4816,9 @@ For more information see https://hed-schema-library.readthedocs.io/en/latest/ind suggestedTag Property-not-possible-to-determine - - inLibrary - score - Posterior-dominant-rhythm-eye-opening-reactivity-reduced-left Reduced left side reactivity. - - inLibrary - score - # Free text. @@ -7169,19 +4829,11 @@ For more information see https://hed-schema-library.readthedocs.io/en/latest/ind valueClass textClass - - inLibrary - score - Posterior-dominant-rhythm-eye-opening-reactivity-reduced-right Reduced right side reactivity. - - inLibrary - score - # free text @@ -7192,19 +4844,11 @@ For more information see https://hed-schema-library.readthedocs.io/en/latest/ind valueClass textClass - - inLibrary - score - Posterior-dominant-rhythm-eye-opening-reactivity-reduced-both Reduced reactivity on both sides. - - inLibrary - score - # Free text. @@ -7215,10 +4859,6 @@ For more information see https://hed-schema-library.readthedocs.io/en/latest/ind valueClass textClass - - inLibrary - score - @@ -7228,17 +4868,9 @@ For more information see https://hed-schema-library.readthedocs.io/en/latest/ind requireChild - - inLibrary - score - Posterior-dominant-rhythm-organization-poorly-organized Poorly organized. - - inLibrary - score - # Free text. @@ -7249,19 +4881,11 @@ For more information see https://hed-schema-library.readthedocs.io/en/latest/ind valueClass textClass - - inLibrary - score - Posterior-dominant-rhythm-organization-disorganized Disorganized. - - inLibrary - score - # Free text. @@ -7272,19 +4896,11 @@ For more information see https://hed-schema-library.readthedocs.io/en/latest/ind valueClass textClass - - inLibrary - score - Posterior-dominant-rhythm-organization-markedly-disorganized Markedly disorganized. - - inLibrary - score - # Free text. @@ -7295,10 +4911,6 @@ For more information see https://hed-schema-library.readthedocs.io/en/latest/ind valueClass textClass - - inLibrary - score - @@ -7308,16 +4920,8 @@ For more information see https://hed-schema-library.readthedocs.io/en/latest/ind requireChild - - inLibrary - score - No-posterior-dominant-rhythm-caveat - - inLibrary - score - # Free text. @@ -7328,18 +4932,10 @@ For more information see https://hed-schema-library.readthedocs.io/en/latest/ind valueClass textClass - - inLibrary - score - Posterior-dominant-rhythm-caveat-only-open-eyes-during-the-recording - - inLibrary - score - # Free text. @@ -7350,18 +4946,10 @@ For more information see https://hed-schema-library.readthedocs.io/en/latest/ind valueClass textClass - - inLibrary - score - Posterior-dominant-rhythm-caveat-sleep-deprived-caveat - - inLibrary - score - # Free text. @@ -7372,18 +4960,10 @@ For more information see https://hed-schema-library.readthedocs.io/en/latest/ind valueClass textClass - - inLibrary - score - Posterior-dominant-rhythm-caveat-drowsy - - inLibrary - score - # Free text. @@ -7394,18 +4974,10 @@ For more information see https://hed-schema-library.readthedocs.io/en/latest/ind valueClass textClass - - inLibrary - score - Posterior-dominant-rhythm-caveat-only-following-hyperventilation - - inLibrary - score - @@ -7414,16 +4986,8 @@ For more information see https://hed-schema-library.readthedocs.io/en/latest/ind requireChild - - inLibrary - score - Absence-of-posterior-dominant-rhythm-artifacts - - inLibrary - score - # Free text. @@ -7434,18 +4998,10 @@ For more information see https://hed-schema-library.readthedocs.io/en/latest/ind valueClass textClass - - inLibrary - score - Absence-of-posterior-dominant-rhythm-extreme-low-voltage - - inLibrary - score - # Free text. @@ -7456,18 +5012,10 @@ For more information see https://hed-schema-library.readthedocs.io/en/latest/ind valueClass textClass - - inLibrary - score - Absence-of-posterior-dominant-rhythm-eye-closure-could-not-be-achieved - - inLibrary - score - # Free text. @@ -7478,18 +5026,10 @@ For more information see https://hed-schema-library.readthedocs.io/en/latest/ind valueClass textClass - - inLibrary - score - Absence-of-posterior-dominant-rhythm-lack-of-awake-period - - inLibrary - score - # Free text. @@ -7500,18 +5040,10 @@ For more information see https://hed-schema-library.readthedocs.io/en/latest/ind valueClass textClass - - inLibrary - score - Absence-of-posterior-dominant-rhythm-lack-of-compliance - - inLibrary - score - # Free text. @@ -7522,10 +5054,6 @@ For more information see https://hed-schema-library.readthedocs.io/en/latest/ind valueClass textClass - - inLibrary - score - @@ -7533,10 +5061,6 @@ For more information see https://hed-schema-library.readthedocs.io/en/latest/ind requireChild - - inLibrary - score - # Free text. @@ -7547,10 +5071,6 @@ For more information see https://hed-schema-library.readthedocs.io/en/latest/ind valueClass textClass - - inLibrary - score - @@ -7560,179 +5080,79 @@ For more information see https://hed-schema-library.readthedocs.io/en/latest/ind requireChild - - inLibrary - score - Seizure-classification Epileptic seizures are named using the current ILAE seizure classification (Fisher et al., 2017, Beniczky et al., 2017). requireChild - - inLibrary - score - Motor-onset-seizure - - inLibrary - score - Myoclonic-motor-onset-seizure - - inLibrary - score - Negative-myoclonic-motor-onset-seizure - - inLibrary - score - Clonic-motor-onset-seizure - - inLibrary - score - Tonic-motor-onset-seizure - - inLibrary - score - Atonic-motor-onset-seizure - - inLibrary - score - Myoclonic-atonic-motor-onset-seizure - - inLibrary - score - Myoclonic-tonic-clonic-motor-onset-seizure - - inLibrary - score - Tonic-clonic-motor-onset-seizure - - inLibrary - score - Automatism-motor-onset-seizure - - inLibrary - score - Hyperkinetic-motor-onset-seizure - - inLibrary - score - Epileptic-spasm-episode - - inLibrary - score - Nonmotor-onset-seizure - - inLibrary - score - Behavior-arrest-nonmotor-onset-seizure - - inLibrary - score - Sensory-nonmotor-onset-seizure - - inLibrary - score - Emotional-nonmotor-onset-seizure - - inLibrary - score - Cognitive-nonmotor-onset-seizure - - inLibrary - score - Autonomic-nonmotor-onset-seizure - - inLibrary - score - Absence-seizure - - inLibrary - score - Typical-absence-seizure - - inLibrary - score - Atypical-absence-seizure - - inLibrary - score - Myoclonic-absence-seizure - - inLibrary - score - Eyelid-myoclonia-absence-seizure - - inLibrary - score - @@ -7748,30 +5168,14 @@ For more information see https://hed-schema-library.readthedocs.io/en/latest/ind Postictal-semiology-manifestation Ictal-EEG-patterns - - inLibrary - score - Episode-phase-initial - - inLibrary - score - Episode-phase-subsequent - - inLibrary - score - Episode-phase-postictal - - inLibrary - score - @@ -7780,22 +5184,10 @@ For more information see https://hed-schema-library.readthedocs.io/en/latest/ind requireChild - - inLibrary - score - Semiology-motor-manifestation - - inLibrary - score - Semiology-elementary-motor - - inLibrary - score - Semiology-motor-tonic A sustained increase in muscle contraction lasting a few seconds to minutes. @@ -7806,10 +5198,6 @@ For more information see https://hed-schema-library.readthedocs.io/en/latest/ind Brain-centricity Episode-event-count - - inLibrary - score - Semiology-motor-dystonic @@ -7821,10 +5209,6 @@ For more information see https://hed-schema-library.readthedocs.io/en/latest/ind Brain-centricity Episode-event-count - - inLibrary - score - Semiology-motor-epileptic-spasm @@ -7836,10 +5220,6 @@ For more information see https://hed-schema-library.readthedocs.io/en/latest/ind Brain-centricity Episode-event-count - - inLibrary - score - Semiology-motor-postural @@ -7851,10 +5231,6 @@ For more information see https://hed-schema-library.readthedocs.io/en/latest/ind Brain-centricity Episode-event-count - - inLibrary - score - Semiology-motor-versive @@ -7864,10 +5240,6 @@ For more information see https://hed-schema-library.readthedocs.io/en/latest/ind Body-part Episode-event-count - - inLibrary - score - Semiology-motor-clonic @@ -7879,10 +5251,6 @@ For more information see https://hed-schema-library.readthedocs.io/en/latest/ind Brain-centricity Episode-event-count - - inLibrary - score - Semiology-motor-myoclonic @@ -7894,10 +5262,6 @@ For more information see https://hed-schema-library.readthedocs.io/en/latest/ind Brain-centricity Episode-event-count - - inLibrary - score - Semiology-motor-jacksonian-march @@ -7909,10 +5273,6 @@ For more information see https://hed-schema-library.readthedocs.io/en/latest/ind Brain-centricity Episode-event-count - - inLibrary - score - Semiology-motor-negative-myoclonus @@ -7924,10 +5284,6 @@ For more information see https://hed-schema-library.readthedocs.io/en/latest/ind Brain-centricity Episode-event-count - - inLibrary - score - Semiology-motor-tonic-clonic @@ -7935,10 +5291,6 @@ For more information see https://hed-schema-library.readthedocs.io/en/latest/ind requireChild - - inLibrary - score - Semiology-motor-tonic-clonic-without-figure-of-four @@ -7948,10 +5300,6 @@ For more information see https://hed-schema-library.readthedocs.io/en/latest/ind Brain-centricity Episode-event-count - - inLibrary - score - Semiology-motor-tonic-clonic-with-figure-of-four-extension-left-elbow @@ -7962,10 +5310,6 @@ For more information see https://hed-schema-library.readthedocs.io/en/latest/ind Brain-centricity Episode-event-count - - inLibrary - score - Semiology-motor-tonic-clonic-with-figure-of-four-extension-right-elbow @@ -7976,10 +5320,6 @@ For more information see https://hed-schema-library.readthedocs.io/en/latest/ind Brain-centricity Episode-event-count - - inLibrary - score - @@ -7992,10 +5332,6 @@ For more information see https://hed-schema-library.readthedocs.io/en/latest/ind Brain-centricity Episode-event-count - - inLibrary - score - Semiology-motor-atonic @@ -8007,10 +5343,6 @@ For more information see https://hed-schema-library.readthedocs.io/en/latest/ind Brain-centricity Episode-event-count - - inLibrary - score - Semiology-motor-eye-blinking @@ -8019,20 +5351,12 @@ For more information see https://hed-schema-library.readthedocs.io/en/latest/ind Brain-laterality Episode-event-count - - inLibrary - score - Semiology-motor-other-elementary-motor requireChild - - inLibrary - score - # Free text. @@ -8043,19 +5367,11 @@ For more information see https://hed-schema-library.readthedocs.io/en/latest/ind valueClass textClass - - inLibrary - score - Semiology-motor-automatisms - - inLibrary - score - Semiology-motor-automatisms-mimetic Facial expression suggesting an emotional state, often fear. @@ -8065,10 +5381,6 @@ For more information see https://hed-schema-library.readthedocs.io/en/latest/ind Episode-appearance Episode-event-count - - inLibrary - score - Semiology-motor-automatisms-oroalimentary @@ -8079,10 +5391,6 @@ For more information see https://hed-schema-library.readthedocs.io/en/latest/ind Episode-appearance Episode-event-count - - inLibrary - score - Semiology-motor-automatisms-dacrystic @@ -8093,10 +5401,6 @@ For more information see https://hed-schema-library.readthedocs.io/en/latest/ind Episode-appearance Episode-event-count - - inLibrary - score - Semiology-motor-automatisms-dyspraxic @@ -8110,10 +5414,6 @@ For more information see https://hed-schema-library.readthedocs.io/en/latest/ind Episode-appearance Episode-event-count - - inLibrary - score - Semiology-motor-automatisms-manual @@ -8126,10 +5426,6 @@ For more information see https://hed-schema-library.readthedocs.io/en/latest/ind Episode-appearance Episode-event-count - - inLibrary - score - Semiology-motor-automatisms-gestural @@ -8141,10 +5437,6 @@ For more information see https://hed-schema-library.readthedocs.io/en/latest/ind Episode-appearance Episode-event-count - - inLibrary - score - Semiology-motor-automatisms-pedal @@ -8157,10 +5449,6 @@ For more information see https://hed-schema-library.readthedocs.io/en/latest/ind Episode-appearance Episode-event-count - - inLibrary - score - Semiology-motor-automatisms-hypermotor @@ -8174,10 +5462,6 @@ For more information see https://hed-schema-library.readthedocs.io/en/latest/ind Episode-appearance Episode-event-count - - inLibrary - score - Semiology-motor-automatisms-hypokinetic @@ -8191,10 +5475,6 @@ For more information see https://hed-schema-library.readthedocs.io/en/latest/ind Episode-appearance Episode-event-count - - inLibrary - score - Semiology-motor-automatisms-gelastic @@ -8205,20 +5485,12 @@ For more information see https://hed-schema-library.readthedocs.io/en/latest/ind Episode-appearance Episode-event-count - - inLibrary - score - Semiology-motor-other-automatisms requireChild - - inLibrary - score - # Free text. @@ -8229,10 +5501,6 @@ For more information see https://hed-schema-library.readthedocs.io/en/latest/ind valueClass textClass - - inLibrary - score - @@ -8246,24 +5514,12 @@ For more information see https://hed-schema-library.readthedocs.io/en/latest/ind Brain-centricity Episode-event-count - - inLibrary - score - Semiology-non-motor-manifestation - - inLibrary - score - Semiology-sensory - - inLibrary - score - Semiology-sensory-headache Headache occurring in close temporal proximity to the seizure or as the sole seizure manifestation. @@ -8272,10 +5528,6 @@ For more information see https://hed-schema-library.readthedocs.io/en/latest/ind Brain-laterality Episode-event-count - - inLibrary - score - Semiology-sensory-visual @@ -8285,10 +5537,6 @@ For more information see https://hed-schema-library.readthedocs.io/en/latest/ind Brain-laterality Episode-event-count - - inLibrary - score - Semiology-sensory-auditory @@ -8298,10 +5546,6 @@ For more information see https://hed-schema-library.readthedocs.io/en/latest/ind Brain-laterality Episode-event-count - - inLibrary - score - Semiology-sensory-olfactory @@ -8310,10 +5554,6 @@ For more information see https://hed-schema-library.readthedocs.io/en/latest/ind Body-part Episode-event-count - - inLibrary - score - Semiology-sensory-gustatory @@ -8322,10 +5562,6 @@ For more information see https://hed-schema-library.readthedocs.io/en/latest/ind suggestedTag Episode-event-count - - inLibrary - score - Semiology-sensory-epigastric @@ -8334,10 +5570,6 @@ For more information see https://hed-schema-library.readthedocs.io/en/latest/ind suggestedTag Episode-event-count - - inLibrary - score - Semiology-sensory-somatosensory @@ -8349,10 +5581,6 @@ For more information see https://hed-schema-library.readthedocs.io/en/latest/ind Brain-centricity Episode-event-count - - inLibrary - score - Semiology-sensory-painful @@ -8364,10 +5592,6 @@ For more information see https://hed-schema-library.readthedocs.io/en/latest/ind Brain-centricity Episode-event-count - - inLibrary - score - Semiology-sensory-autonomic-sensation @@ -8376,20 +5600,12 @@ For more information see https://hed-schema-library.readthedocs.io/en/latest/ind suggestedTag Episode-event-count - - inLibrary - score - Semiology-sensory-other requireChild - - inLibrary - score - # Free text. @@ -8400,19 +5616,11 @@ For more information see https://hed-schema-library.readthedocs.io/en/latest/ind valueClass textClass - - inLibrary - score - Semiology-experiential - - inLibrary - score - Semiology-experiential-affective-emotional Components include fear, depression, joy, and (rarely) anger. @@ -8420,10 +5628,6 @@ For more information see https://hed-schema-library.readthedocs.io/en/latest/ind suggestedTag Episode-event-count - - inLibrary - score - Semiology-experiential-hallucinatory @@ -8432,10 +5636,6 @@ For more information see https://hed-schema-library.readthedocs.io/en/latest/ind suggestedTag Episode-event-count - - inLibrary - score - Semiology-experiential-illusory @@ -8444,28 +5644,16 @@ For more information see https://hed-schema-library.readthedocs.io/en/latest/ind suggestedTag Episode-event-count - - inLibrary - score - Semiology-experiential-mnemonic Components that reflect ictal dysmnesia such as feelings of familiarity (deja-vu) and unfamiliarity (jamais-vu). - - inLibrary - score - Semiology-experiential-mnemonic-Deja-vu suggestedTag Episode-event-count - - inLibrary - score - Semiology-experiential-mnemonic-Jamais-vu @@ -8473,10 +5661,6 @@ For more information see https://hed-schema-library.readthedocs.io/en/latest/ind suggestedTag Episode-event-count - - inLibrary - score - @@ -8484,10 +5668,6 @@ For more information see https://hed-schema-library.readthedocs.io/en/latest/ind requireChild - - inLibrary - score - # Free text. @@ -8498,10 +5678,6 @@ For more information see https://hed-schema-library.readthedocs.io/en/latest/ind valueClass textClass - - inLibrary - score - @@ -8512,27 +5688,15 @@ For more information see https://hed-schema-library.readthedocs.io/en/latest/ind suggestedTag Episode-event-count - - inLibrary - score - Semiology-language-related - - inLibrary - score - Semiology-language-related-vocalization suggestedTag Episode-event-count - - inLibrary - score - Semiology-language-related-verbalization @@ -8540,10 +5704,6 @@ For more information see https://hed-schema-library.readthedocs.io/en/latest/ind suggestedTag Episode-event-count - - inLibrary - score - Semiology-language-related-dysphasia @@ -8551,10 +5711,6 @@ For more information see https://hed-schema-library.readthedocs.io/en/latest/ind suggestedTag Episode-event-count - - inLibrary - score - Semiology-language-related-aphasia @@ -8562,20 +5718,12 @@ For more information see https://hed-schema-library.readthedocs.io/en/latest/ind suggestedTag Episode-event-count - - inLibrary - score - Semiology-language-related-other requireChild - - inLibrary - score - # Free text. @@ -8586,19 +5734,11 @@ For more information see https://hed-schema-library.readthedocs.io/en/latest/ind valueClass textClass - - inLibrary - score - Semiology-autonomic - - inLibrary - score - Semiology-autonomic-pupillary Mydriasis, miosis (either bilateral or unilateral). @@ -8607,10 +5747,6 @@ For more information see https://hed-schema-library.readthedocs.io/en/latest/ind Brain-laterality Episode-event-count - - inLibrary - score - Semiology-autonomic-hypersalivation @@ -8619,10 +5755,6 @@ For more information see https://hed-schema-library.readthedocs.io/en/latest/ind suggestedTag Episode-event-count - - inLibrary - score - Semiology-autonomic-respiratory-apnoeic @@ -8631,10 +5763,6 @@ For more information see https://hed-schema-library.readthedocs.io/en/latest/ind suggestedTag Episode-event-count - - inLibrary - score - Semiology-autonomic-cardiovascular @@ -8643,10 +5771,6 @@ For more information see https://hed-schema-library.readthedocs.io/en/latest/ind suggestedTag Episode-event-count - - inLibrary - score - Semiology-autonomic-gastrointestinal @@ -8655,10 +5779,6 @@ For more information see https://hed-schema-library.readthedocs.io/en/latest/ind suggestedTag Episode-event-count - - inLibrary - score - Semiology-autonomic-urinary-incontinence @@ -8667,10 +5787,6 @@ For more information see https://hed-schema-library.readthedocs.io/en/latest/ind suggestedTag Episode-event-count - - inLibrary - score - Semiology-autonomic-genital @@ -8679,10 +5795,6 @@ For more information see https://hed-schema-library.readthedocs.io/en/latest/ind suggestedTag Episode-event-count - - inLibrary - score - Semiology-autonomic-vasomotor @@ -8691,10 +5803,6 @@ For more information see https://hed-schema-library.readthedocs.io/en/latest/ind suggestedTag Episode-event-count - - inLibrary - score - Semiology-autonomic-sudomotor @@ -8704,10 +5812,6 @@ For more information see https://hed-schema-library.readthedocs.io/en/latest/ind Brain-laterality Episode-event-count - - inLibrary - score - Semiology-autonomic-thermoregulatory @@ -8716,20 +5820,12 @@ For more information see https://hed-schema-library.readthedocs.io/en/latest/ind suggestedTag Episode-event-count - - inLibrary - score - Semiology-autonomic-other requireChild - - inLibrary - score - # Free text. @@ -8740,10 +5836,6 @@ For more information see https://hed-schema-library.readthedocs.io/en/latest/ind valueClass textClass - - inLibrary - score - @@ -8753,10 +5845,6 @@ For more information see https://hed-schema-library.readthedocs.io/en/latest/ind requireChild - - inLibrary - score - # Free text. @@ -8767,10 +5855,6 @@ For more information see https://hed-schema-library.readthedocs.io/en/latest/ind valueClass textClass - - inLibrary - score - @@ -8779,20 +5863,12 @@ For more information see https://hed-schema-library.readthedocs.io/en/latest/ind requireChild - - inLibrary - score - Postictal-semiology-unconscious suggestedTag Episode-event-count - - inLibrary - score - Postictal-semiology-quick-recovery-of-consciousness @@ -8801,10 +5877,6 @@ For more information see https://hed-schema-library.readthedocs.io/en/latest/ind suggestedTag Episode-event-count - - inLibrary - score - Postictal-semiology-aphasia-or-dysphasia @@ -8813,10 +5885,6 @@ For more information see https://hed-schema-library.readthedocs.io/en/latest/ind suggestedTag Episode-event-count - - inLibrary - score - Postictal-semiology-behavioral-change @@ -8825,10 +5893,6 @@ For more information see https://hed-schema-library.readthedocs.io/en/latest/ind suggestedTag Episode-event-count - - inLibrary - score - Postictal-semiology-hemianopia @@ -8838,10 +5902,6 @@ For more information see https://hed-schema-library.readthedocs.io/en/latest/ind Brain-laterality Episode-event-count - - inLibrary - score - Postictal-semiology-impaired-cognition @@ -8850,10 +5910,6 @@ For more information see https://hed-schema-library.readthedocs.io/en/latest/ind suggestedTag Episode-event-count - - inLibrary - score - Postictal-semiology-dysphoria @@ -8862,10 +5918,6 @@ For more information see https://hed-schema-library.readthedocs.io/en/latest/ind suggestedTag Episode-event-count - - inLibrary - score - Postictal-semiology-headache @@ -8874,10 +5926,6 @@ For more information see https://hed-schema-library.readthedocs.io/en/latest/ind suggestedTag Episode-event-count - - inLibrary - score - Postictal-semiology-nose-wiping @@ -8887,10 +5935,6 @@ For more information see https://hed-schema-library.readthedocs.io/en/latest/ind Brain-laterality Episode-event-count - - inLibrary - score - Postictal-semiology-anterograde-amnesia @@ -8899,10 +5943,6 @@ For more information see https://hed-schema-library.readthedocs.io/en/latest/ind suggestedTag Episode-event-count - - inLibrary - score - Postictal-semiology-retrograde-amnesia @@ -8911,10 +5951,6 @@ For more information see https://hed-schema-library.readthedocs.io/en/latest/ind suggestedTag Episode-event-count - - inLibrary - score - Postictal-semiology-paresis @@ -8926,36 +5962,20 @@ For more information see https://hed-schema-library.readthedocs.io/en/latest/ind Brain-centricity Episode-event-count - - inLibrary - score - Postictal-semiology-sleep Invincible need to sleep after a seizure. - - inLibrary - score - Postictal-semiology-unilateral-myoclonic-jerks unilateral motor phenomena, other then specified, occurring in postictal phase. - - inLibrary - score - Postictal-semiology-other-unilateral-motor-phenomena requireChild - - inLibrary - score - # Free text. @@ -8966,10 +5986,6 @@ For more information see https://hed-schema-library.readthedocs.io/en/latest/ind valueClass textClass - - inLibrary - score - @@ -8982,38 +5998,18 @@ For more information see https://hed-schema-library.readthedocs.io/en/latest/ind suggestedTag Property-not-possible-to-determine - - inLibrary - score - Polygraphic-channel-cause-to-episode - - inLibrary - score - Polygraphic-channel-consequence-of-episode - - inLibrary - score - Ictal-EEG-patterns - - inLibrary - score - Ictal-EEG-patterns-obscured-by-artifacts The interpretation of the EEG is not possible due to artifacts. - - inLibrary - score - # Free text. @@ -9024,10 +6020,6 @@ For more information see https://hed-schema-library.readthedocs.io/en/latest/ind valueClass textClass - - inLibrary - score - @@ -9054,10 +6046,6 @@ For more information see https://hed-schema-library.readthedocs.io/en/latest/ind Source-analysis-brain-region Episode-event-count - - inLibrary - score - Postictal-EEG-activity @@ -9067,19 +6055,11 @@ For more information see https://hed-schema-library.readthedocs.io/en/latest/ind Body-part Brain-centricity - - inLibrary - score - Episode-time-context-property Additional clinically relevant features related to episodes can be scored under timing and context. If needed, episode duration can be tagged with base schema /Property/Data-property/Data-value/Spatiotemporal-value/Temporal-value/Duration. - - inLibrary - score - Episode-consciousness @@ -9089,16 +6069,8 @@ For more information see https://hed-schema-library.readthedocs.io/en/latest/ind suggestedTag Property-not-possible-to-determine - - inLibrary - score - Episode-consciousness-not-tested - - inLibrary - score - # Free text. @@ -9109,18 +6081,10 @@ For more information see https://hed-schema-library.readthedocs.io/en/latest/ind valueClass textClass - - inLibrary - score - Episode-consciousness-affected - - inLibrary - score - # Free text. @@ -9131,18 +6095,10 @@ For more information see https://hed-schema-library.readthedocs.io/en/latest/ind valueClass textClass - - inLibrary - score - Episode-consciousness-mildly-affected - - inLibrary - score - # Free text. @@ -9153,18 +6109,10 @@ For more information see https://hed-schema-library.readthedocs.io/en/latest/ind valueClass textClass - - inLibrary - score - Episode-consciousness-not-affected - - inLibrary - score - # Free text. @@ -9175,10 +6123,6 @@ For more information see https://hed-schema-library.readthedocs.io/en/latest/ind valueClass textClass - - inLibrary - score - @@ -9190,10 +6134,6 @@ For more information see https://hed-schema-library.readthedocs.io/en/latest/ind Property-exists Property-absence - - inLibrary - score - # Free text. @@ -9204,10 +6144,6 @@ For more information see https://hed-schema-library.readthedocs.io/en/latest/ind valueClass textClass - - inLibrary - score - @@ -9216,17 +6152,9 @@ For more information see https://hed-schema-library.readthedocs.io/en/latest/ind suggestedTag Property-not-possible-to-determine - - inLibrary - score - Clinical-start-followed-EEG Clinical start, followed by EEG start by X seconds. - - inLibrary - score - # @@ -9240,19 +6168,11 @@ For more information see https://hed-schema-library.readthedocs.io/en/latest/ind unitClass timeUnits - - inLibrary - score - EEG-start-followed-clinical EEG start, followed by clinical start by X seconds. - - inLibrary - score - # @@ -9266,26 +6186,14 @@ For more information see https://hed-schema-library.readthedocs.io/en/latest/ind unitClass timeUnits - - inLibrary - score - Simultaneous-start-clinical-EEG - - inLibrary - score - Clinical-EEG-temporal-relationship-notes Clinical notes to annotate the clinical-EEG temporal relationship. - - inLibrary - score - # @@ -9295,10 +6203,6 @@ For more information see https://hed-schema-library.readthedocs.io/en/latest/ind valueClass textClass - - inLibrary - score - @@ -9309,10 +6213,6 @@ For more information see https://hed-schema-library.readthedocs.io/en/latest/ind suggestedTag Property-not-possible-to-determine - - inLibrary - score - # @@ -9322,10 +6222,6 @@ For more information see https://hed-schema-library.readthedocs.io/en/latest/ind valueClass numericClass - - inLibrary - score - @@ -9338,16 +6234,8 @@ For more information see https://hed-schema-library.readthedocs.io/en/latest/ind suggestedTag Property-not-possible-to-determine - - inLibrary - score - Episode-start-from-sleep - - inLibrary - score - # Free text. @@ -9358,18 +6246,10 @@ For more information see https://hed-schema-library.readthedocs.io/en/latest/ind valueClass textClass - - inLibrary - score - Episode-start-from-awake - - inLibrary - score - # Free text. @@ -9380,10 +6260,6 @@ For more information see https://hed-schema-library.readthedocs.io/en/latest/ind valueClass textClass - - inLibrary - score - @@ -9393,10 +6269,6 @@ For more information see https://hed-schema-library.readthedocs.io/en/latest/ind suggestedTag Property-not-possible-to-determine - - inLibrary - score - # @@ -9410,10 +6282,6 @@ For more information see https://hed-schema-library.readthedocs.io/en/latest/ind unitClass timeUnits - - inLibrary - score - @@ -9424,10 +6292,6 @@ For more information see https://hed-schema-library.readthedocs.io/en/latest/ind Property-exists Property-absence - - inLibrary - score - # Free text. @@ -9438,10 +6302,6 @@ For more information see https://hed-schema-library.readthedocs.io/en/latest/ind valueClass textClass - - inLibrary - score - @@ -9451,10 +6311,6 @@ For more information see https://hed-schema-library.readthedocs.io/en/latest/ind Property-exists Property-absence - - inLibrary - score - # Free text. @@ -9465,10 +6321,6 @@ For more information see https://hed-schema-library.readthedocs.io/en/latest/ind valueClass textClass - - inLibrary - score - @@ -9480,16 +6332,8 @@ For more information see https://hed-schema-library.readthedocs.io/en/latest/ind suggestedTag Property-not-possible-to-determine - - inLibrary - score - Episode-responsiveness-preserved - - inLibrary - score - # Free text. @@ -9500,18 +6344,10 @@ For more information see https://hed-schema-library.readthedocs.io/en/latest/ind valueClass textClass - - inLibrary - score - Episode-responsiveness-affected - - inLibrary - score - # Free text. @@ -9522,10 +6358,6 @@ For more information see https://hed-schema-library.readthedocs.io/en/latest/ind valueClass textClass - - inLibrary - score - @@ -9534,16 +6366,8 @@ For more information see https://hed-schema-library.readthedocs.io/en/latest/ind requireChild - - inLibrary - score - Episode-appearance-interactive - - inLibrary - score - # Free text. @@ -9554,18 +6378,10 @@ For more information see https://hed-schema-library.readthedocs.io/en/latest/ind valueClass textClass - - inLibrary - score - Episode-appearance-spontaneous - - inLibrary - score - # Free text. @@ -9576,10 +6392,6 @@ For more information see https://hed-schema-library.readthedocs.io/en/latest/ind valueClass textClass - - inLibrary - score - @@ -9589,16 +6401,8 @@ For more information see https://hed-schema-library.readthedocs.io/en/latest/ind requireChild - - inLibrary - score - Seizure-dynamics-evolution-morphology - - inLibrary - score - # Free text. @@ -9609,18 +6413,10 @@ For more information see https://hed-schema-library.readthedocs.io/en/latest/ind valueClass textClass - - inLibrary - score - Seizure-dynamics-evolution-frequency - - inLibrary - score - # Free text. @@ -9631,18 +6427,10 @@ For more information see https://hed-schema-library.readthedocs.io/en/latest/ind valueClass textClass - - inLibrary - score - Seizure-dynamics-evolution-location - - inLibrary - score - # Free text. @@ -9653,19 +6441,11 @@ For more information see https://hed-schema-library.readthedocs.io/en/latest/ind valueClass textClass - - inLibrary - score - Seizure-dynamics-not-possible-to-determine Not possible to determine. - - inLibrary - score - # Free text. @@ -9676,10 +6456,6 @@ For more information see https://hed-schema-library.readthedocs.io/en/latest/ind valueClass textClass - - inLibrary - score - @@ -9690,26 +6466,14 @@ For more information see https://hed-schema-library.readthedocs.io/en/latest/ind requireChild - - inLibrary - score - Artifact-significance-to-recording It is important to score the significance of the described artifacts: recording is not interpretable, recording of reduced diagnostic value, does not interfere with the interpretation of the recording. requireChild - - inLibrary - score - Recording-not-interpretable-due-to-artifact - - inLibrary - score - # Free text. @@ -9720,18 +6484,10 @@ For more information see https://hed-schema-library.readthedocs.io/en/latest/ind valueClass textClass - - inLibrary - score - Recording-of-reduced-diagnostic-value-due-to-artifact - - inLibrary - score - # Free text. @@ -9742,18 +6498,10 @@ For more information see https://hed-schema-library.readthedocs.io/en/latest/ind valueClass textClass - - inLibrary - score - Artifact-does-not-interfere-recording - - inLibrary - score - # Free text. @@ -9764,10 +6512,6 @@ For more information see https://hed-schema-library.readthedocs.io/en/latest/ind valueClass textClass - - inLibrary - score - @@ -9777,16 +6521,8 @@ For more information see https://hed-schema-library.readthedocs.io/en/latest/ind requireChild - - inLibrary - score - Finding-no-definite-abnormality - - inLibrary - score - # Free text. @@ -9797,19 +6533,11 @@ For more information see https://hed-schema-library.readthedocs.io/en/latest/ind valueClass textClass - - inLibrary - score - Finding-significance-not-possible-to-determine Not possible to determine. - - inLibrary - score - # Free text. @@ -9820,20 +6548,12 @@ For more information see https://hed-schema-library.readthedocs.io/en/latest/ind valueClass textClass - - inLibrary - score - Finding-frequency Value in Hz (number) typed in. - - inLibrary - score - # @@ -9847,19 +6567,11 @@ For more information see https://hed-schema-library.readthedocs.io/en/latest/ind unitClass frequencyUnits - - inLibrary - score - Finding-amplitude Value in microvolts (number) typed in. - - inLibrary - score - # @@ -9873,10 +6585,6 @@ For more information see https://hed-schema-library.readthedocs.io/en/latest/ind unitClass electricPotentialUnits - - inLibrary - score - @@ -9885,17 +6593,9 @@ For more information see https://hed-schema-library.readthedocs.io/en/latest/ind requireChild - - inLibrary - score - Finding-amplitude-asymmetry-lower-left Amplitude lower on the left side. - - inLibrary - score - # Free text. @@ -9906,19 +6606,11 @@ For more information see https://hed-schema-library.readthedocs.io/en/latest/ind valueClass textClass - - inLibrary - score - Finding-amplitude-asymmetry-lower-right Amplitude lower on the right side. - - inLibrary - score - # Free text. @@ -9929,19 +6621,11 @@ For more information see https://hed-schema-library.readthedocs.io/en/latest/ind valueClass textClass - - inLibrary - score - Finding-amplitude-asymmetry-not-possible-to-determine Not possible to determine. - - inLibrary - score - # Free text. @@ -9952,19 +6636,11 @@ For more information see https://hed-schema-library.readthedocs.io/en/latest/ind valueClass textClass - - inLibrary - score - Finding-stopped-by - - inLibrary - score - # Free text. @@ -9975,18 +6651,10 @@ For more information see https://hed-schema-library.readthedocs.io/en/latest/ind valueClass textClass - - inLibrary - score - Finding-triggered-by - - inLibrary - score - # Free text. @@ -9997,18 +6665,10 @@ For more information see https://hed-schema-library.readthedocs.io/en/latest/ind valueClass textClass - - inLibrary - score - Finding-unmodified - - inLibrary - score - # Free text. @@ -10019,19 +6679,11 @@ For more information see https://hed-schema-library.readthedocs.io/en/latest/ind valueClass textClass - - inLibrary - score - Property-not-possible-to-determine Not possible to determine. - - inLibrary - score - # Free text. @@ -10042,18 +6694,10 @@ For more information see https://hed-schema-library.readthedocs.io/en/latest/ind valueClass textClass - - inLibrary - score - Property-exists - - inLibrary - score - # Free text. @@ -10064,18 +6708,10 @@ For more information see https://hed-schema-library.readthedocs.io/en/latest/ind valueClass textClass - - inLibrary - score - Property-absence - - inLibrary - score - # Free text. @@ -10086,10 +6722,6 @@ For more information see https://hed-schema-library.readthedocs.io/en/latest/ind valueClass textClass - - inLibrary - score - diff --git a/tests/data/schema_tests/merge_tests/HED_score_merged.mediawiki b/tests/data/schema_tests/merge_tests/HED_score_merged.mediawiki index a9d4d2a19..4d341f046 100644 --- a/tests/data/schema_tests/merge_tests/HED_score_merged.mediawiki +++ b/tests/data/schema_tests/merge_tests/HED_score_merged.mediawiki @@ -1,4 +1,4 @@ -HED version="1.0.0" library="score" with-standard="8.2.0" merged="True" +HED version="1.0.0" library="score" withStandard="8.2.0" '''Prologue''' This schema is a Hierarchical Event Descriptors (HED) Library Schema implementation of Standardized Computer-based Organized Reporting of EEG (SCORE)[1,2] for describing events occurring during neuroimaging time series recordings. @@ -11,2001 +11,2003 @@ For more information see https://hed-schema-library.readthedocs.io/en/latest/ind !# start schema '''Event''' {suggestedTag=Task-property} [Something that happens at a given time and (typically) place. Elements of this tag subtree designate the general category in which an event falls.] -* Sensory-event {suggestedTag=Task-event-role, suggestedTag=Sensory-presentation} [Something perceivable by the participant. An event meant to be an experimental stimulus should include the tag Task-property/Task-event-role/Experimental-stimulus.] -* Agent-action {suggestedTag=Task-event-role, suggestedTag=Agent} [Any action engaged in by an agent (see the Agent subtree for agent categories). A participant response to an experiment stimulus should include the tag Agent-property/Agent-task-role/Experiment-participant.] -* Data-feature {suggestedTag=Data-property} [An event marking the occurrence of a data feature such as an interictal spike or alpha burst that is often added post hoc to the data record.] -* Experiment-control [An event pertaining to the physical control of the experiment during its operation.] -* Experiment-procedure [An event indicating an experimental procedure, as in performing a saliva swab during the experiment or administering a survey.] -* Experiment-structure [An event specifying a change-point of the structure of experiment. This event is typically used to indicate a change in experimental conditions or tasks.] -* Measurement-event {suggestedTag=Data-property} [A discrete measure returned by an instrument.] + * Sensory-event {suggestedTag=Task-event-role, suggestedTag=Sensory-presentation} [Something perceivable by the participant. An event meant to be an experimental stimulus should include the tag Task-property/Task-event-role/Experimental-stimulus.] + * Agent-action {suggestedTag=Task-event-role, suggestedTag=Agent} [Any action engaged in by an agent (see the Agent subtree for agent categories). A participant response to an experiment stimulus should include the tag Agent-property/Agent-task-role/Experiment-participant.] + * Data-feature {suggestedTag=Data-property} [An event marking the occurrence of a data feature such as an interictal spike or alpha burst that is often added post hoc to the data record.] + * Experiment-control [An event pertaining to the physical control of the experiment during its operation.] + * Experiment-procedure [An event indicating an experimental procedure, as in performing a saliva swab during the experiment or administering a survey.] + * Experiment-structure [An event specifying a change-point of the structure of experiment. This event is typically used to indicate a change in experimental conditions or tasks.] + * Measurement-event {suggestedTag=Data-property} [A discrete measure returned by an instrument.] '''Agent''' {suggestedTag=Agent-property} [Someone or something that takes an active role or produces a specified effect.The role or effect may be implicit. Being alive or performing an activity such as a computation may qualify something to be an agent. An agent may also be something that simulates something else.] -* Animal-agent [An agent that is an animal.] -* Avatar-agent [An agent associated with an icon or avatar representing another agent.] -* Controller-agent [An agent experiment control software or hardware.] -* Human-agent [A person who takes an active role or produces a specified effect.] -* Robotic-agent [An agent mechanical device capable of performing a variety of often complex tasks on command or by being programmed in advance.] -* Software-agent [An agent computer program.] + * Animal-agent [An agent that is an animal.] + * Avatar-agent [An agent associated with an icon or avatar representing another agent.] + * Controller-agent [An agent experiment control software or hardware.] + * Human-agent [A person who takes an active role or produces a specified effect.] + * Robotic-agent [An agent mechanical device capable of performing a variety of often complex tasks on command or by being programmed in advance.] + * Software-agent [An agent computer program.] '''Action''' {extensionAllowed} [Do something.] -* Communicate [Convey knowledge of or information about something.] -** Communicate-gesturally {relatedTag=Move-face, relatedTag=Move-upper-extremity} [Communicate nonverbally using visible bodily actions, either in place of speech or together and in parallel with spoken words. Gestures include movement of the hands, face, or other parts of the body.] -*** Clap-hands [Strike the palms of against one another resoundingly, and usually repeatedly, especially to express approval.] -*** Clear-throat {relatedTag=Move-face, relatedTag=Move-head} [Cough slightly so as to speak more clearly, attract attention, or to express hesitancy before saying something awkward.] -*** Frown {relatedTag=Move-face} [Express disapproval, displeasure, or concentration, typically by turning down the corners of the mouth.] -*** Grimace {relatedTag=Move-face} [Make a twisted expression, typically expressing disgust, pain, or wry amusement.] -*** Nod-head {relatedTag=Move-head} [Tilt head in alternating up and down arcs along the sagittal plane. It is most commonly, but not universally, used to indicate agreement, acceptance, or acknowledgement.] -*** Pump-fist {relatedTag=Move-upper-extremity} [Raise with fist clenched in triumph or affirmation.] -*** Raise-eyebrows {relatedTag=Move-face, relatedTag=Move-eyes} [Move eyebrows upward.] -*** Shake-fist {relatedTag=Move-upper-extremity} [Clench hand into a fist and shake to demonstrate anger.] -*** Shake-head {relatedTag=Move-head} [Turn head from side to side as a way of showing disagreement or refusal.] -*** Shhh {relatedTag=Move-upper-extremity} [Place finger over lips and possibly uttering the syllable shhh to indicate the need to be quiet.] -*** Shrug {relatedTag=Move-upper-extremity, relatedTag=Move-torso} [Lift shoulders up towards head to indicate a lack of knowledge about a particular topic.] -*** Smile {relatedTag=Move-face} [Form facial features into a pleased, kind, or amused expression, typically with the corners of the mouth turned up and the front teeth exposed.] -*** Spread-hands {relatedTag=Move-upper-extremity} [Spread hands apart to indicate ignorance.] -*** Thumbs-down {relatedTag=Move-upper-extremity} [Extend the thumb downward to indicate disapproval.] -*** Thumb-up {relatedTag=Move-upper-extremity} [Extend the thumb upward to indicate approval.] -*** Wave {relatedTag=Move-upper-extremity} [Raise hand and move left and right, as a greeting or sign of departure.] -*** Widen-eyes {relatedTag=Move-face, relatedTag=Move-eyes} [Open eyes and possibly with eyebrows lifted especially to express surprise or fear.] -*** Wink {relatedTag=Move-face, relatedTag=Move-eyes} [Close and open one eye quickly, typically to indicate that something is a joke or a secret or as a signal of affection or greeting.] -** Communicate-musically [Communicate using music.] -*** Hum [Make a low, steady continuous sound like that of a bee. Sing with the lips closed and without uttering speech.] -*** Play-instrument [Make musical sounds using an instrument.] -*** Sing [Produce musical tones by means of the voice.] -*** Vocalize [Utter vocal sounds.] -*** Whistle [Produce a shrill clear sound by forcing breath out or air in through the puckered lips.] -** Communicate-vocally [Communicate using mouth or vocal cords.] -*** Cry [Shed tears associated with emotions, usually sadness but also joy or frustration.] -*** Groan [Make a deep inarticulate sound in response to pain or despair.] -*** Laugh [Make the spontaneous sounds and movements of the face and body that are the instinctive expressions of lively amusement and sometimes also of contempt or derision.] -*** Scream [Make loud, vociferous cries or yells to express pain, excitement, or fear.] -*** Shout [Say something very loudly.] -*** Sigh [Emit a long, deep, audible breath expressing sadness, relief, tiredness, or a similar feeling.] -*** Speak [Communicate using spoken language.] -*** Whisper [Speak very softly using breath without vocal cords.] -* Move [Move in a specified direction or manner. Change position or posture.] -** Breathe [Inhale or exhale during respiration.] -*** Blow [Expel air through pursed lips.] -*** Cough [Suddenly and audibly expel air from the lungs through a partially closed glottis, preceded by inhalation.] -*** Exhale [Blow out or expel breath.] -*** Hiccup [Involuntarily spasm the diaphragm and respiratory organs, with a sudden closure of the glottis and a characteristic sound like that of a cough.] -*** Hold-breath [Interrupt normal breathing by ceasing to inhale or exhale.] -*** Inhale [Draw in with the breath through the nose or mouth.] -*** Sneeze [Suddenly and violently expel breath through the nose and mouth.] -*** Sniff [Draw in air audibly through the nose to detect a smell, to stop it from running, or to express contempt.] -** Move-body [Move entire body.] -*** Bend [Move body in a bowed or curved manner.] -*** Dance [Perform a purposefully selected sequences of human movement often with aesthetic or symbolic value. Move rhythmically to music, typically following a set sequence of steps.] -*** Fall-down [Lose balance and collapse.] -*** Flex [Cause a muscle to stand out by contracting or tensing it. Bend a limb or joint.] -*** Jerk [Make a quick, sharp, sudden movement.] -*** Lie-down [Move to a horizontal or resting position.] -*** Recover-balance [Return to a stable, upright body position.] -*** Sit-down [Move from a standing to a sitting position.] -*** Sit-up [Move from lying down to a sitting position.] -*** Stand-up [Move from a sitting to a standing position.] -*** Stretch [Straighten or extend body or a part of body to its full length, typically so as to tighten muscles or in order to reach something.] -*** Shudder [Tremble convulsively, sometimes as a result of fear or revulsion.] -*** Stumble [Trip or momentarily lose balance and almost fall.] -*** Turn [Change or cause to change direction.] -** Move-body-part [Move one part of a body.] -*** Move-eyes [Move eyes.] -**** Blink [Shut and open the eyes quickly.] -**** Close-eyes [Lower and keep eyelids in a closed position.] -**** Fixate [Direct eyes to a specific point or target.] -**** Inhibit-blinks [Purposely prevent blinking.] -**** Open-eyes [Raise eyelids to expose pupil.] -**** Saccade [Move eyes rapidly between fixation points.] -**** Squint [Squeeze one or both eyes partly closed in an attempt to see more clearly or as a reaction to strong light.] -**** Stare [Look fixedly or vacantly at someone or something with eyes wide open.] -*** Move-face [Move the face or jaw.] -**** Bite [Seize with teeth or jaws an object or organism so as to grip or break the surface covering.] -**** Burp [Noisily release air from the stomach through the mouth. Belch.] -**** Chew [Repeatedly grinding, tearing, and or crushing with teeth or jaws.] -**** Gurgle [Make a hollow bubbling sound like that made by water running out of a bottle.] -**** Swallow [Cause or allow something, especially food or drink to pass down the throat.] -***** Gulp [Swallow quickly or in large mouthfuls, often audibly, sometimes to indicate apprehension.] -**** Yawn [Take a deep involuntary inhalation with the mouth open often as a sign of drowsiness or boredom.] -*** Move-head [Move head.] -**** Lift-head [Tilt head back lifting chin.] -**** Lower-head [Move head downward so that eyes are in a lower position.] -**** Turn-head [Rotate head horizontally to look in a different direction.] -*** Move-lower-extremity [Move leg and/or foot.] -**** Curl-toes [Bend toes sometimes to grip.] -**** Hop [Jump on one foot.] -**** Jog [Run at a trot to exercise.] -**** Jump [Move off the ground or other surface through sudden muscular effort in the legs.] -**** Kick [Strike out or flail with the foot or feet. Strike using the leg, in unison usually with an area of the knee or lower using the foot.] -**** Pedal [Move by working the pedals of a bicycle or other machine.] -**** Press-foot [Move by pressing foot.] -**** Run [Travel on foot at a fast pace.] -**** Step [Put one leg in front of the other and shift weight onto it.] -***** Heel-strike [Strike the ground with the heel during a step.] -***** Toe-off [Push with toe as part of a stride.] -**** Trot [Run at a moderate pace, typically with short steps.] -**** Walk [Move at a regular pace by lifting and setting down each foot in turn never having both feet off the ground at once.] -*** Move-torso [Move body trunk.] -*** Move-upper-extremity [Move arm, shoulder, and/or hand.] -**** Drop [Let or cause to fall vertically.] -**** Grab [Seize suddenly or quickly. Snatch or clutch.] -**** Grasp [Seize and hold firmly.] -**** Hold-down [Prevent someone or something from moving by holding them firmly.] -**** Lift [Raising something to higher position.] -**** Make-fist [Close hand tightly with the fingers bent against the palm.] -**** Point [Draw attention to something by extending a finger or arm.] -**** Press {relatedTag=Push} [Apply pressure to something to flatten, shape, smooth or depress it. This action tag should be used to indicate key presses and mouse clicks.] -**** Push {relatedTag=Press} [Apply force in order to move something away. Use Press to indicate a key press or mouse click.] -**** Reach [Stretch out your arm in order to get or touch something.] -**** Release [Make available or set free.] -**** Retract [Draw or pull back.] -**** Scratch [Drag claws or nails over a surface or on skin.] -**** Snap-fingers [Make a noise by pushing second finger hard against thumb and then releasing it suddenly so that it hits the base of the thumb.] -**** Touch [Come into or be in contact with.] -* Perceive [Produce an internal, conscious image through stimulating a sensory system.] -** Hear [Give attention to a sound.] -** See [Direct gaze toward someone or something or in a specified direction.] -** Smell [Inhale in order to ascertain an odor or scent.] -** Taste [Sense a flavor in the mouth and throat on contact with a substance.] -** Sense-by-touch [Sense something through receptors in the skin.] -* Perform [Carry out or accomplish an action, task, or function.] -** Close [Act as to blocked against entry or passage.] -** Collide-with [Hit with force when moving.] -** Halt [Bring or come to an abrupt stop.] -** Modify [Change something.] -** Open [Widen an aperture, door, or gap, especially one allowing access to something.] -** Operate [Control the functioning of a machine, process, or system.] -** Play [Engage in activity for enjoyment and recreation rather than a serious or practical purpose.] -** Read [Interpret something that is written or printed.] -** Repeat [Make do or perform again.] -** Rest [Be inactive in order to regain strength, health, or energy.] -** Write [Communicate or express by means of letters or symbols written or imprinted on a surface.] -* Think [Direct the mind toward someone or something or use the mind actively to form connected ideas.] -** Allow [Allow access to something such as allowing a car to pass.] -** Attend-to [Focus mental experience on specific targets.] -** Count [Tally items either silently or aloud.] -** Deny [Refuse to give or grant something requested or desired by someone.] -** Detect [Discover or identify the presence or existence of something.] -** Discriminate [Recognize a distinction.] -** Encode [Convert information or an instruction into a particular form.] -** Evade [Escape or avoid, especially by cleverness or trickery.] -** Generate [Cause something, especially an emotion or situation to arise or come about.] -** Identify [Establish or indicate who or what someone or something is.] -** Imagine [Form a mental image or concept of something.] -** Judge [Evaluate evidence to make a decision or form a belief.] -** Learn [Adaptively change behavior as the result of experience.] -** Memorize [Adaptively change behavior as the result of experience.] -** Plan [Think about the activities required to achieve a desired goal.] -** Predict [Say or estimate that something will happen or will be a consequence of something without having exact informaton.] -** Recognize [Identify someone or something from having encountered them before.] -** Respond [React to something such as a treatment or a stimulus.] -** Recall [Remember information by mental effort.] -** Switch-attention [Transfer attention from one focus to another.] -** Track [Follow a person, animal, or object through space or time.] + * Communicate [Convey knowledge of or information about something.] + ** Communicate-gesturally {relatedTag=Move-face, relatedTag=Move-upper-extremity} [Communicate nonverbally using visible bodily actions, either in place of speech or together and in parallel with spoken words. Gestures include movement of the hands, face, or other parts of the body.] + *** Clap-hands [Strike the palms of against one another resoundingly, and usually repeatedly, especially to express approval.] + *** Clear-throat {relatedTag=Move-face, relatedTag=Move-head} [Cough slightly so as to speak more clearly, attract attention, or to express hesitancy before saying something awkward.] + *** Frown {relatedTag=Move-face} [Express disapproval, displeasure, or concentration, typically by turning down the corners of the mouth.] + *** Grimace {relatedTag=Move-face} [Make a twisted expression, typically expressing disgust, pain, or wry amusement.] + *** Nod-head {relatedTag=Move-head} [Tilt head in alternating up and down arcs along the sagittal plane. It is most commonly, but not universally, used to indicate agreement, acceptance, or acknowledgement.] + *** Pump-fist {relatedTag=Move-upper-extremity} [Raise with fist clenched in triumph or affirmation.] + *** Raise-eyebrows {relatedTag=Move-face, relatedTag=Move-eyes} [Move eyebrows upward.] + *** Shake-fist {relatedTag=Move-upper-extremity} [Clench hand into a fist and shake to demonstrate anger.] + *** Shake-head {relatedTag=Move-head} [Turn head from side to side as a way of showing disagreement or refusal.] + *** Shhh {relatedTag=Move-upper-extremity} [Place finger over lips and possibly uttering the syllable shhh to indicate the need to be quiet.] + *** Shrug {relatedTag=Move-upper-extremity, relatedTag=Move-torso} [Lift shoulders up towards head to indicate a lack of knowledge about a particular topic.] + *** Smile {relatedTag=Move-face} [Form facial features into a pleased, kind, or amused expression, typically with the corners of the mouth turned up and the front teeth exposed.] + *** Spread-hands {relatedTag=Move-upper-extremity} [Spread hands apart to indicate ignorance.] + *** Thumbs-down {relatedTag=Move-upper-extremity} [Extend the thumb downward to indicate disapproval.] + *** Thumb-up {relatedTag=Move-upper-extremity} [Extend the thumb upward to indicate approval.] + *** Wave {relatedTag=Move-upper-extremity} [Raise hand and move left and right, as a greeting or sign of departure.] + *** Widen-eyes {relatedTag=Move-face, relatedTag=Move-eyes} [Open eyes and possibly with eyebrows lifted especially to express surprise or fear.] + *** Wink {relatedTag=Move-face, relatedTag=Move-eyes} [Close and open one eye quickly, typically to indicate that something is a joke or a secret or as a signal of affection or greeting.] + ** Communicate-musically [Communicate using music.] + *** Hum [Make a low, steady continuous sound like that of a bee. Sing with the lips closed and without uttering speech.] + *** Play-instrument [Make musical sounds using an instrument.] + *** Sing [Produce musical tones by means of the voice.] + *** Vocalize [Utter vocal sounds.] + *** Whistle [Produce a shrill clear sound by forcing breath out or air in through the puckered lips.] + ** Communicate-vocally [Communicate using mouth or vocal cords.] + *** Cry [Shed tears associated with emotions, usually sadness but also joy or frustration.] + *** Groan [Make a deep inarticulate sound in response to pain or despair.] + *** Laugh [Make the spontaneous sounds and movements of the face and body that are the instinctive expressions of lively amusement and sometimes also of contempt or derision.] + *** Scream [Make loud, vociferous cries or yells to express pain, excitement, or fear.] + *** Shout [Say something very loudly.] + *** Sigh [Emit a long, deep, audible breath expressing sadness, relief, tiredness, or a similar feeling.] + *** Speak [Communicate using spoken language.] + *** Whisper [Speak very softly using breath without vocal cords.] + * Move [Move in a specified direction or manner. Change position or posture.] + ** Breathe [Inhale or exhale during respiration.] + *** Blow [Expel air through pursed lips.] + *** Cough [Suddenly and audibly expel air from the lungs through a partially closed glottis, preceded by inhalation.] + *** Exhale [Blow out or expel breath.] + *** Hiccup [Involuntarily spasm the diaphragm and respiratory organs, with a sudden closure of the glottis and a characteristic sound like that of a cough.] + *** Hold-breath [Interrupt normal breathing by ceasing to inhale or exhale.] + *** Inhale [Draw in with the breath through the nose or mouth.] + *** Sneeze [Suddenly and violently expel breath through the nose and mouth.] + *** Sniff [Draw in air audibly through the nose to detect a smell, to stop it from running, or to express contempt.] + ** Move-body [Move entire body.] + *** Bend [Move body in a bowed or curved manner.] + *** Dance [Perform a purposefully selected sequences of human movement often with aesthetic or symbolic value. Move rhythmically to music, typically following a set sequence of steps.] + *** Fall-down [Lose balance and collapse.] + *** Flex [Cause a muscle to stand out by contracting or tensing it. Bend a limb or joint.] + *** Jerk [Make a quick, sharp, sudden movement.] + *** Lie-down [Move to a horizontal or resting position.] + *** Recover-balance [Return to a stable, upright body position.] + *** Sit-down [Move from a standing to a sitting position.] + *** Sit-up [Move from lying down to a sitting position.] + *** Stand-up [Move from a sitting to a standing position.] + *** Stretch [Straighten or extend body or a part of body to its full length, typically so as to tighten muscles or in order to reach something.] + *** Shudder [Tremble convulsively, sometimes as a result of fear or revulsion.] + *** Stumble [Trip or momentarily lose balance and almost fall.] + *** Turn [Change or cause to change direction.] + ** Move-body-part [Move one part of a body.] + *** Move-eyes [Move eyes.] + **** Blink [Shut and open the eyes quickly.] + **** Close-eyes [Lower and keep eyelids in a closed position.] + **** Fixate [Direct eyes to a specific point or target.] + **** Inhibit-blinks [Purposely prevent blinking.] + **** Open-eyes [Raise eyelids to expose pupil.] + **** Saccade [Move eyes rapidly between fixation points.] + **** Squint [Squeeze one or both eyes partly closed in an attempt to see more clearly or as a reaction to strong light.] + **** Stare [Look fixedly or vacantly at someone or something with eyes wide open.] + *** Move-face [Move the face or jaw.] + **** Bite [Seize with teeth or jaws an object or organism so as to grip or break the surface covering.] + **** Burp [Noisily release air from the stomach through the mouth. Belch.] + **** Chew [Repeatedly grinding, tearing, and or crushing with teeth or jaws.] + **** Gurgle [Make a hollow bubbling sound like that made by water running out of a bottle.] + **** Swallow [Cause or allow something, especially food or drink to pass down the throat.] + ***** Gulp [Swallow quickly or in large mouthfuls, often audibly, sometimes to indicate apprehension.] + **** Yawn [Take a deep involuntary inhalation with the mouth open often as a sign of drowsiness or boredom.] + *** Move-head [Move head.] + **** Lift-head [Tilt head back lifting chin.] + **** Lower-head [Move head downward so that eyes are in a lower position.] + **** Turn-head [Rotate head horizontally to look in a different direction.] + *** Move-lower-extremity [Move leg and/or foot.] + **** Curl-toes [Bend toes sometimes to grip.] + **** Hop [Jump on one foot.] + **** Jog [Run at a trot to exercise.] + **** Jump [Move off the ground or other surface through sudden muscular effort in the legs.] + **** Kick [Strike out or flail with the foot or feet. Strike using the leg, in unison usually with an area of the knee or lower using the foot.] + **** Pedal [Move by working the pedals of a bicycle or other machine.] + **** Press-foot [Move by pressing foot.] + **** Run [Travel on foot at a fast pace.] + **** Step [Put one leg in front of the other and shift weight onto it.] + ***** Heel-strike [Strike the ground with the heel during a step.] + ***** Toe-off [Push with toe as part of a stride.] + **** Trot [Run at a moderate pace, typically with short steps.] + **** Walk [Move at a regular pace by lifting and setting down each foot in turn never having both feet off the ground at once.] + *** Move-torso [Move body trunk.] + *** Move-upper-extremity [Move arm, shoulder, and/or hand.] + **** Drop [Let or cause to fall vertically.] + **** Grab [Seize suddenly or quickly. Snatch or clutch.] + **** Grasp [Seize and hold firmly.] + **** Hold-down [Prevent someone or something from moving by holding them firmly.] + **** Lift [Raising something to higher position.] + **** Make-fist [Close hand tightly with the fingers bent against the palm.] + **** Point [Draw attention to something by extending a finger or arm.] + **** Press {relatedTag=Push} [Apply pressure to something to flatten, shape, smooth or depress it. This action tag should be used to indicate key presses and mouse clicks.] + **** Push {relatedTag=Press} [Apply force in order to move something away. Use Press to indicate a key press or mouse click.] + **** Reach [Stretch out your arm in order to get or touch something.] + **** Release [Make available or set free.] + **** Retract [Draw or pull back.] + **** Scratch [Drag claws or nails over a surface or on skin.] + **** Snap-fingers [Make a noise by pushing second finger hard against thumb and then releasing it suddenly so that it hits the base of the thumb.] + **** Touch [Come into or be in contact with.] + * Perceive [Produce an internal, conscious image through stimulating a sensory system.] + ** Hear [Give attention to a sound.] + ** See [Direct gaze toward someone or something or in a specified direction.] + ** Smell [Inhale in order to ascertain an odor or scent.] + ** Taste [Sense a flavor in the mouth and throat on contact with a substance.] + ** Sense-by-touch [Sense something through receptors in the skin.] + * Perform [Carry out or accomplish an action, task, or function.] + ** Close [Act as to blocked against entry or passage.] + ** Collide-with [Hit with force when moving.] + ** Halt [Bring or come to an abrupt stop.] + ** Modify [Change something.] + ** Open [Widen an aperture, door, or gap, especially one allowing access to something.] + ** Operate [Control the functioning of a machine, process, or system.] + ** Play [Engage in activity for enjoyment and recreation rather than a serious or practical purpose.] + ** Read [Interpret something that is written or printed.] + ** Repeat [Make do or perform again.] + ** Rest [Be inactive in order to regain strength, health, or energy.] + ** Write [Communicate or express by means of letters or symbols written or imprinted on a surface.] + * Think [Direct the mind toward someone or something or use the mind actively to form connected ideas.] + ** Allow [Allow access to something such as allowing a car to pass.] + ** Attend-to [Focus mental experience on specific targets.] + ** Count [Tally items either silently or aloud.] + ** Deny [Refuse to give or grant something requested or desired by someone.] + ** Detect [Discover or identify the presence or existence of something.] + ** Discriminate [Recognize a distinction.] + ** Encode [Convert information or an instruction into a particular form.] + ** Evade [Escape or avoid, especially by cleverness or trickery.] + ** Generate [Cause something, especially an emotion or situation to arise or come about.] + ** Identify [Establish or indicate who or what someone or something is.] + ** Imagine [Form a mental image or concept of something.] + ** Judge [Evaluate evidence to make a decision or form a belief.] + ** Learn [Adaptively change behavior as the result of experience.] + ** Memorize [Adaptively change behavior as the result of experience.] + ** Plan [Think about the activities required to achieve a desired goal.] + ** Predict [Say or estimate that something will happen or will be a consequence of something without having exact informaton.] + ** Recognize [Identify someone or something from having encountered them before.] + ** Respond [React to something such as a treatment or a stimulus.] + ** Recall [Remember information by mental effort.] + ** Switch-attention [Transfer attention from one focus to another.] + ** Track [Follow a person, animal, or object through space or time.] '''Item''' {extensionAllowed} [An independently existing thing (living or nonliving).] -* Biological-item [An entity that is biological, that is related to living organisms.] -** Anatomical-item [A biological structure, system, fluid or other substance excluding single molecular entities.] -*** Body [The biological structure representing an organism.] -*** Body-part [Any part of an organism.] -**** Head [The upper part of the human body, or the front or upper part of the body of an animal, typically separated from the rest of the body by a neck, and containing the brain, mouth, and sense organs.] -***** Hair [The filamentous outgrowth of the epidermis.] -***** Ear [A sense organ needed for the detection of sound and for establishing balance.] -***** Face [The anterior portion of the head extending from the forehead to the chin and ear to ear. The facial structures contain the eyes, nose and mouth, cheeks and jaws.] -****** Cheek [The fleshy part of the face bounded by the eyes, nose, ear, and jaw line.] -****** Chin [The part of the face below the lower lip and including the protruding part of the lower jaw.] -****** Eye [The organ of sight or vision.] -****** Eyebrow [The arched strip of hair on the bony ridge above each eye socket.] -****** Forehead [The part of the face between the eyebrows and the normal hairline.] -****** Lip [Fleshy fold which surrounds the opening of the mouth.] -****** Nose [A structure of special sense serving as an organ of the sense of smell and as an entrance to the respiratory tract.] -****** Mouth [The proximal portion of the digestive tract, containing the oral cavity and bounded by the oral opening.] -****** Teeth [The hard bonelike structures in the jaws. A collection of teeth arranged in some pattern in the mouth or other part of the body.] -**** Lower-extremity [Refers to the whole inferior limb (leg and/or foot).] -***** Ankle [A gliding joint between the distal ends of the tibia and fibula and the proximal end of the talus.] -***** Calf [The fleshy part at the back of the leg below the knee.] -***** Foot [The structure found below the ankle joint required for locomotion.] -****** Big-toe [The largest toe on the inner side of the foot.] -****** Heel [The back of the foot below the ankle.] -****** Instep [The part of the foot between the ball and the heel on the inner side.] -****** Little-toe [The smallest toe located on the outer side of the foot.] -****** Toes [The terminal digits of the foot.] -***** Knee [A joint connecting the lower part of the femur with the upper part of the tibia.] -***** Shin [Front part of the leg below the knee.] -***** Thigh [Upper part of the leg between hip and knee.] -**** Torso [The body excluding the head and neck and limbs.] -***** Torso-back [The rear surface of the human body from the shoulders to the hips.] -***** Buttocks [The round fleshy parts that form the lower rear area of a human trunk.] -***** Torso-chest [The anterior side of the thorax from the neck to the abdomen.] -***** Gentalia [The external organs of reproduction.] -***** Hip [The lateral prominence of the pelvis from the waist to the thigh.] -***** Waist [The abdominal circumference at the navel.] -**** Upper-extremity [Refers to the whole superior limb (shoulder, arm, elbow, wrist, hand).] -***** Elbow [A type of hinge joint located between the forearm and upper arm.] -***** Forearm [Lower part of the arm between the elbow and wrist.] -***** Hand [The distal portion of the upper extremity. It consists of the carpus, metacarpus, and digits.] -****** Finger [Any of the digits of the hand.] -******* Index-finger [The second finger from the radial side of the hand, next to the thumb.] -******* Little-finger [The fifth and smallest finger from the radial side of the hand.] -******* Middle-finger [The middle or third finger from the radial side of the hand.] -******* Ring-finger [The fourth finger from the radial side of the hand.] -******* Thumb [The thick and short hand digit which is next to the index finger in humans.] -****** Palm [The part of the inner surface of the hand that extends from the wrist to the bases of the fingers.] -****** Knuckles [A part of a finger at a joint where the bone is near the surface, especially where the finger joins the hand.] -***** Shoulder [Joint attaching upper arm to trunk.] -***** Upper-arm [Portion of arm between shoulder and elbow.] -***** Wrist [A joint between the distal end of the radius and the proximal row of carpal bones.] -** Organism [A living entity, more specifically a biological entity that consists of one or more cells and is capable of genomic replication (independently or not).] -*** Animal [A living organism that has membranous cell walls, requires oxygen and organic foods, and is capable of voluntary movement.] -*** Human [The bipedal primate mammal Homo sapiens.] -*** Plant [Any living organism that typically synthesizes its food from inorganic substances and possesses cellulose cell walls.] -* Language-item {suggestedTag=Sensory-presentation} [An entity related to a systematic means of communicating by the use of sounds, symbols, or gestures.] -** Character [A mark or symbol used in writing.] -** Clause [A unit of grammatical organization next below the sentence in rank, usually consisting of a subject and predicate.] -** Glyph [A hieroglyphic character, symbol, or pictograph.] -** Nonword [A group of letters or speech sounds that looks or sounds like a word but that is not accepted as such by native speakers.] -** Paragraph [A distinct section of a piece of writing, usually dealing with a single theme.] -** Phoneme [A speech sound that is distinguished by the speakers of a particular language.] -** Phrase [A phrase is a group of words functioning as a single unit in the syntax of a sentence.] -** Sentence [A set of words that is complete in itself, conveying a statement, question, exclamation, or command and typically containing an explicit or implied subject and a predicate containing a finite verb.] -** Syllable [A unit of spoken language larger than a phoneme.] -** Textblock [A block of text.] -** Word [A word is the smallest free form (an item that may be expressed in isolation with semantic or pragmatic content) in a language.] -* Object {suggestedTag=Sensory-presentation} [Something perceptible by one or more of the senses, especially by vision or touch. A material thing.] -** Geometric-object [An object or a representation that has structure and topology in space.] -*** Pattern [An arrangement of objects, facts, behaviors, or other things which have scientific, mathematical, geometric, statistical, or other meaning.] -**** Dots [A small round mark or spot.] -**** LED-pattern [A pattern created by lighting selected members of a fixed light emitting diode array.] -*** 2D-shape [A planar, two-dimensional shape.] -**** Arrow [A shape with a pointed end indicating direction.] -**** Clockface [The dial face of a clock. A location identifier based on clockface numbering or anatomic subregion.] -**** Cross [A figure or mark formed by two intersecting lines crossing at their midpoints.] -**** Dash [A horizontal stroke in writing or printing to mark a pause or break in sense or to represent omitted letters or words.] -**** Ellipse [A closed plane curve resulting from the intersection of a circular cone and a plane cutting completely through it, especially a plane not parallel to the base.] -***** Circle [A ring-shaped structure with every point equidistant from the center.] -**** Rectangle [A parallelogram with four right angles.] -***** Square [A square is a special rectangle with four equal sides.] -**** Single-point [A point is a geometric entity that is located in a zero-dimensional spatial region and whose position is defined by its coordinates in some coordinate system.] -**** Star [A conventional or stylized representation of a star, typically one having five or more points.] -**** Triangle [A three-sided polygon.] -*** 3D-shape [A geometric three-dimensional shape.] -**** Box [A square or rectangular vessel, usually made of cardboard or plastic.] -***** Cube [A solid or semi-solid in the shape of a three dimensional square.] -**** Cone [A shape whose base is a circle and whose sides taper up to a point.] -**** Cylinder [A surface formed by circles of a given radius that are contained in a plane perpendicular to a given axis, whose centers align on the axis.] -**** Ellipsoid [A closed plane curve resulting from the intersection of a circular cone and a plane cutting completely through it, especially a plane not parallel to the base.] -***** Sphere [A solid or hollow three-dimensional object bounded by a closed surface such that every point on the surface is equidistant from the center.] -**** Pyramid [A polyhedron of which one face is a polygon of any number of sides, and the other faces are triangles with a common vertex.] -** Ingestible-object [Something that can be taken into the body by the mouth for digestion or absorption.] -** Man-made-object [Something constructed by human means.] -*** Building [A structure that has a roof and walls and stands more or less permanently in one place.] -**** Room [An area within a building enclosed by walls and floor and ceiling.] -**** Roof [A roof is the covering on the uppermost part of a building which provides protection from animals and weather, notably rain, but also heat, wind and sunlight.] -**** Entrance [The means or place of entry.] -**** Attic [A room or a space immediately below the roof of a building.] -**** Basement [The part of a building that is wholly or partly below ground level.] -*** Clothing [A covering designed to be worn on the body.] -*** Device [An object contrived for a specific purpose.] -**** Assistive-device [A device that help an individual accomplish a task.] -***** Glasses [Frames with lenses worn in front of the eye for vision correction, eye protection, or protection from UV rays.] -***** Writing-device [A device used for writing.] -****** Pen [A common writing instrument used to apply ink to a surface for writing or drawing.] -****** Pencil [An implement for writing or drawing that is constructed of a narrow solid pigment core in a protective casing that prevents the core from being broken or marking the hand.] -**** Computing-device [An electronic device which take inputs and processes results from the inputs.] -***** Cellphone [A telephone with access to a cellular radio system so it can be used over a wide area, without a physical connection to a network.] -***** Desktop-computer [A computer suitable for use at an ordinary desk.] -***** Laptop-computer [A computer that is portable and suitable for use while traveling.] -***** Tablet-computer [A small portable computer that accepts input directly on to its screen rather than via a keyboard or mouse.] -**** Engine [A motor is a machine designed to convert one or more forms of energy into mechanical energy.] -**** IO-device [Hardware used by a human (or other system) to communicate with a computer.] -***** Input-device [A piece of equipment used to provide data and control signals to an information processing system such as a computer or information appliance.] -****** Computer-mouse [A hand-held pointing device that detects two-dimensional motion relative to a surface.] -******* Mouse-button [An electric switch on a computer mouse which can be pressed or clicked to select or interact with an element of a graphical user interface.] -******* Scroll-wheel [A scroll wheel or mouse wheel is a wheel used for scrolling made of hard plastic with a rubbery surface usually located between the left and right mouse buttons and is positioned perpendicular to the mouse surface.] -****** Joystick [A control device that uses a movable handle to create two-axis input for a computer device.] -****** Keyboard [A device consisting of mechanical keys that are pressed to create input to a computer.] -******* Keyboard-key [A button on a keyboard usually representing letters, numbers, functions, or symbols.] -******** # {takesValue} [Value of a keyboard key.] -****** Keypad [A device consisting of keys, usually in a block arrangement, that provides limited input to a system.] -******* Keypad-key [A key on a separate section of a computer keyboard that groups together numeric keys and those for mathematical or other special functions in an arrangement like that of a calculator.] -******** # {takesValue} [Value of keypad key.] -****** Microphone [A device designed to convert sound to an electrical signal.] -****** Push-button [A switch designed to be operated by pressing a button.] -***** Output-device [Any piece of computer hardware equipment which converts information into human understandable form.] -****** Display-device [An output device for presentation of information in visual or tactile form the latter used for example in tactile electronic displays for blind people.] -******* Head-mounted-display [An instrument that functions as a display device, worn on the head or as part of a helmet, that has a small display optic in front of one (monocular HMD) or each eye (binocular HMD).] -******* LED-display [A LED display is a flat panel display that uses an array of light-emitting diodes as pixels for a video display.] -******* Computer-screen [An electronic device designed as a display or a physical device designed to be a protective meshwork.] -******** Screen-window [A part of a computer screen that contains a display different from the rest of the screen. A window is a graphical control element consisting of a visual area containing some of the graphical user interface of the program it belongs to and is framed by a window decoration.] -****** Auditory-device [A device designed to produce sound.] -******* Headphones [An instrument that consists of a pair of small loudspeakers, or less commonly a single speaker, held close to ears and connected to a signal source such as an audio amplifier, radio, CD player or portable media player.] -******* Loudspeaker [A device designed to convert electrical signals to sounds that can be heard.] -***** Recording-device [A device that copies information in a signal into a persistent information bearer.] -****** EEG-recorder [A device for recording electric currents in the brain using electrodes applied to the scalp, to the surface of the brain, or placed within the substance of the brain.] -****** File-storage [A device for recording digital information to a permanent media.] -****** MEG-recorder [A device for measuring the magnetic fields produced by electrical activity in the brain, usually conducted externally.] -****** Motion-capture [A device for recording the movement of objects or people.] -****** Tape-recorder [A device for recording and reproduction usually using magnetic tape for storage that can be saved and played back.] -***** Touchscreen [A control component that operates an electronic device by pressing the display on the screen.] -**** Machine [A human-made device that uses power to apply forces and control movement to perform an action.] -**** Measurement-device [A device in which a measure function inheres.] -***** Clock [A device designed to indicate the time of day or to measure the time duration of an event or action.] -****** Clock-face [A location identifier based on clockface numbering or anatomic subregion.] -**** Robot [A mechanical device that sometimes resembles a living animal and is capable of performing a variety of often complex human tasks on command or by being programmed in advance.] -**** Tool [A component that is not part of a device but is designed to support its assemby or operation.] -*** Document [A physical object, or electronic counterpart, that is characterized by containing writing which is meant to be human-readable.] -**** Letter [A written message addressed to a person or organization.] -**** Note [A brief written record.] -**** Book [A volume made up of pages fastened along one edge and enclosed between protective covers.] -**** Notebook [A book for notes or memoranda.] -**** Questionnaire [A document consisting of questions and possibly responses, depending on whether it has been filled out.] -*** Furnishing [Furniture, fittings, and other decorative accessories, such as curtains and carpets, for a house or room.] -*** Manufactured-material [Substances created or extracted from raw materials.] -**** Ceramic [A hard, brittle, heat-resistant and corrosion-resistant material made by shaping and then firing a nonmetallic mineral, such as clay, at a high temperature.] -**** Glass [A brittle transparent solid with irregular atomic structure.] -**** Paper [A thin sheet material produced by mechanically or chemically processing cellulose fibres derived from wood, rags, grasses or other vegetable sources in water.] -**** Plastic [Various high-molecular-weight thermoplastic or thermosetting polymers that are capable of being molded, extruded, drawn, or otherwise shaped and then hardened into a form.] -**** Steel [An alloy made up of iron with typically a few tenths of a percent of carbon to improve its strength and fracture resistance compared to iron.] -*** Media [Media are audo/visual/audiovisual modes of communicating information for mass consumption.] -**** Media-clip [A short segment of media.] -***** Audio-clip [A short segment of audio.] -***** Audiovisual-clip [A short media segment containing both audio and video.] -***** Video-clip [A short segment of video.] -**** Visualization [An planned process that creates images, diagrams or animations from the input data.] -***** Animation [A form of graphical illustration that changes with time to give a sense of motion or represent dynamic changes in the portrayal.] -***** Art-installation [A large-scale, mixed-media constructions, often designed for a specific place or for a temporary period of time.] -***** Braille [A display using a system of raised dots that can be read with the fingers by people who are blind.] -***** Image [Any record of an imaging event whether physical or electronic.] -****** Cartoon [A type of illustration, sometimes animated, typically in a non-realistic or semi-realistic style. The specific meaning has evolved over time, but the modern usage usually refers to either an image or series of images intended for satire, caricature, or humor. A motion picture that relies on a sequence of illustrations for its animation.] -****** Drawing [A representation of an object or outlining a figure, plan, or sketch by means of lines.] -****** Icon [A sign (such as a word or graphic symbol) whose form suggests its meaning.] -****** Painting [A work produced through the art of painting.] -****** Photograph [An image recorded by a camera.] -***** Movie [A sequence of images displayed in succession giving the illusion of continuous movement.] -***** Outline-visualization [A visualization consisting of a line or set of lines enclosing or indicating the shape of an object in a sketch or diagram.] -***** Point-light-visualization [A display in which action is depicted using a few points of light, often generated from discrete sensors in motion capture.] -***** Sculpture [A two- or three-dimensional representative or abstract forms, especially by carving stone or wood or by casting metal or plaster.] -***** Stick-figure-visualization [A drawing showing the head of a human being or animal as a circle and all other parts as straight lines.] -*** Navigational-object [An object whose purpose is to assist directed movement from one location to another.] -**** Path [A trodden way. A way or track laid down for walking or made by continual treading.] -**** Road [An open way for the passage of vehicles, persons, or animals on land.] -***** Lane [A defined path with physical dimensions through which an object or substance may traverse.] -**** Runway [A paved strip of ground on a landing field for the landing and takeoff of aircraft.] -*** Vehicle [A mobile machine which transports people or cargo.] -**** Aircraft [A vehicle which is able to travel through air in an atmosphere.] -**** Bicycle [A human-powered, pedal-driven, single-track vehicle, having two wheels attached to a frame, one behind the other.] -**** Boat [A watercraft of any size which is able to float or plane on water.] -**** Car [A wheeled motor vehicle used primarily for the transportation of human passengers.] -**** Cart [A cart is a vehicle which has two wheels and is designed to transport human passengers or cargo.] -**** Tractor [A mobile machine specifically designed to deliver a high tractive effort at slow speeds, and mainly used for the purposes of hauling a trailer or machinery used in agriculture or construction.] -**** Train [A connected line of railroad cars with or without a locomotive.] -**** Truck [A motor vehicle which, as its primary funcion, transports cargo rather than human passangers.] -** Natural-object [Something that exists in or is produced by nature, and is not artificial or man-made.] -*** Mineral [A solid, homogeneous, inorganic substance occurring in nature and having a definite chemical composition.] -*** Natural-feature [A feature that occurs in nature. A prominent or identifiable aspect, region, or site of interest.] -**** Field [An unbroken expanse as of ice or grassland.] -**** Hill [A rounded elevation of limited extent rising above the surrounding land with local relief of less than 300m.] -**** Mountain [A landform that extends above the surrounding terrain in a limited area.] -**** River [A natural freshwater surface stream of considerable volume and a permanent or seasonal flow, moving in a definite channel toward a sea, lake, or another river.] -**** Waterfall [A sudden descent of water over a step or ledge in the bed of a river.] -* Sound [Mechanical vibrations transmitted by an elastic medium. Something that can be heard.] -** Environmental-sound [Sounds occuring in the environment. An accumulation of noise pollution that occurs outside. This noise can be caused by transport, industrial, and recreational activities.] -*** Crowd-sound [Noise produced by a mixture of sounds from a large group of people.] -*** Signal-noise [Any part of a signal that is not the true or original signal but is introduced by the communication mechanism.] -** Musical-sound [Sound produced by continuous and regular vibrations, as opposed to noise.] -*** Tone [A musical note, warble, or other sound used as a particular signal on a telephone or answering machine.] -*** Instrument-sound [Sound produced by a musical instrument.] -*** Vocalized-sound [Musical sound produced by vocal cords in a biological agent.] -** Named-animal-sound [A sound recognizable as being associated with particular animals.] -*** Barking [Sharp explosive cries like sounds made by certain animals, especially a dog, fox, or seal.] -*** Bleating [Wavering cries like sounds made by a sheep, goat, or calf.] -*** Crowing [Loud shrill sounds characteristic of roosters.] -*** Chirping [Short, sharp, high-pitched noises like sounds made by small birds or an insects.] -*** Growling [Low guttural sounds like those that made in the throat by a hostile dog or other animal.] -*** Meowing [Vocalizations like those made by as those cats. These sounds have diverse tones and are sometimes chattered, murmured or whispered. The purpose can be assertive.] -*** Mooing [Deep vocal sounds like those made by a cow.] -*** Purring [Low continuous vibratory sound such as those made by cats. The sound expresses contentment.] -*** Roaring [Loud, deep, or harsh prolonged sounds such as those made by big cats and bears for long-distance communication and intimidation.] -*** Squawking [Loud, harsh noises such as those made by geese.] -** Named-object-sound [A sound identifiable as coming from a particular type of object.] -*** Alarm-sound [A loud signal often loud continuous ringing to alert people to a problem or condition that requires urgent attention.] -*** Beep [A short, single tone, that is typically high-pitched and generally made by a computer or other machine.] -*** Buzz [A persistent vibratory sound often made by a buzzer device and used to indicate something incorrect.] -*** Ka-ching [The sound made by a mechanical cash register, often to designate a reward.] -*** Click [The sound made by a mechanical cash register, often to designate a reward.] -*** Ding [A short ringing sound such as that made by a bell, often to indicate a correct response or the expiration of time.] -*** Horn-blow [A loud sound made by forcing air through a sound device that funnels air to create the sound, often used to sound an alert.] -*** Siren [A loud, continuous sound often varying in frequency designed to indicate an emergency.] + * Biological-item [An entity that is biological, that is related to living organisms.] + ** Anatomical-item [A biological structure, system, fluid or other substance excluding single molecular entities.] + *** Body [The biological structure representing an organism.] + *** Body-part [Any part of an organism.] + **** Head [The upper part of the human body, or the front or upper part of the body of an animal, typically separated from the rest of the body by a neck, and containing the brain, mouth, and sense organs.] + ***** Hair [The filamentous outgrowth of the epidermis.] + ***** Ear [A sense organ needed for the detection of sound and for establishing balance.] + ***** Face [The anterior portion of the head extending from the forehead to the chin and ear to ear. The facial structures contain the eyes, nose and mouth, cheeks and jaws.] + ****** Cheek [The fleshy part of the face bounded by the eyes, nose, ear, and jaw line.] + ****** Chin [The part of the face below the lower lip and including the protruding part of the lower jaw.] + ****** Eye [The organ of sight or vision.] + ****** Eyebrow [The arched strip of hair on the bony ridge above each eye socket.] + ****** Forehead [The part of the face between the eyebrows and the normal hairline.] + ****** Lip [Fleshy fold which surrounds the opening of the mouth.] + ****** Nose [A structure of special sense serving as an organ of the sense of smell and as an entrance to the respiratory tract.] + ****** Mouth [The proximal portion of the digestive tract, containing the oral cavity and bounded by the oral opening.] + ****** Teeth [The hard bonelike structures in the jaws. A collection of teeth arranged in some pattern in the mouth or other part of the body.] + **** Lower-extremity [Refers to the whole inferior limb (leg and/or foot).] + ***** Ankle [A gliding joint between the distal ends of the tibia and fibula and the proximal end of the talus.] + ***** Calf [The fleshy part at the back of the leg below the knee.] + ***** Foot [The structure found below the ankle joint required for locomotion.] + ****** Big-toe [The largest toe on the inner side of the foot.] + ****** Heel [The back of the foot below the ankle.] + ****** Instep [The part of the foot between the ball and the heel on the inner side.] + ****** Little-toe [The smallest toe located on the outer side of the foot.] + ****** Toes [The terminal digits of the foot.] + ***** Knee [A joint connecting the lower part of the femur with the upper part of the tibia.] + ***** Shin [Front part of the leg below the knee.] + ***** Thigh [Upper part of the leg between hip and knee.] + **** Torso [The body excluding the head and neck and limbs.] + ***** Torso-back [The rear surface of the human body from the shoulders to the hips.] + ***** Buttocks [The round fleshy parts that form the lower rear area of a human trunk.] + ***** Torso-chest [The anterior side of the thorax from the neck to the abdomen.] + ***** Gentalia {deprecatedFrom=8.1.0} [The external organs of reproduction.] + ***** Hip [The lateral prominence of the pelvis from the waist to the thigh.] + ***** Waist [The abdominal circumference at the navel.] + **** Upper-extremity [Refers to the whole superior limb (shoulder, arm, elbow, wrist, hand).] + ***** Elbow [A type of hinge joint located between the forearm and upper arm.] + ***** Forearm [Lower part of the arm between the elbow and wrist.] + ***** Hand [The distal portion of the upper extremity. It consists of the carpus, metacarpus, and digits.] + ****** Finger [Any of the digits of the hand.] + ******* Index-finger [The second finger from the radial side of the hand, next to the thumb.] + ******* Little-finger [The fifth and smallest finger from the radial side of the hand.] + ******* Middle-finger [The middle or third finger from the radial side of the hand.] + ******* Ring-finger [The fourth finger from the radial side of the hand.] + ******* Thumb [The thick and short hand digit which is next to the index finger in humans.] + ****** Palm [The part of the inner surface of the hand that extends from the wrist to the bases of the fingers.] + ****** Knuckles [A part of a finger at a joint where the bone is near the surface, especially where the finger joins the hand.] + ***** Shoulder [Joint attaching upper arm to trunk.] + ***** Upper-arm [Portion of arm between shoulder and elbow.] + ***** Wrist [A joint between the distal end of the radius and the proximal row of carpal bones.] + ** Organism [A living entity, more specifically a biological entity that consists of one or more cells and is capable of genomic replication (independently or not).] + *** Animal [A living organism that has membranous cell walls, requires oxygen and organic foods, and is capable of voluntary movement.] + *** Human [The bipedal primate mammal Homo sapiens.] + *** Plant [Any living organism that typically synthesizes its food from inorganic substances and possesses cellulose cell walls.] + * Language-item {suggestedTag=Sensory-presentation} [An entity related to a systematic means of communicating by the use of sounds, symbols, or gestures.] + ** Character [A mark or symbol used in writing.] + ** Clause [A unit of grammatical organization next below the sentence in rank, usually consisting of a subject and predicate.] + ** Glyph [A hieroglyphic character, symbol, or pictograph.] + ** Nonword [A group of letters or speech sounds that looks or sounds like a word but that is not accepted as such by native speakers.] + ** Paragraph [A distinct section of a piece of writing, usually dealing with a single theme.] + ** Phoneme [A speech sound that is distinguished by the speakers of a particular language.] + ** Phrase [A phrase is a group of words functioning as a single unit in the syntax of a sentence.] + ** Sentence [A set of words that is complete in itself, conveying a statement, question, exclamation, or command and typically containing an explicit or implied subject and a predicate containing a finite verb.] + ** Syllable [A unit of spoken language larger than a phoneme.] + ** Textblock [A block of text.] + ** Word [A word is the smallest free form (an item that may be expressed in isolation with semantic or pragmatic content) in a language.] + * Object {suggestedTag=Sensory-presentation} [Something perceptible by one or more of the senses, especially by vision or touch. A material thing.] + ** Geometric-object [An object or a representation that has structure and topology in space.] + *** Pattern [An arrangement of objects, facts, behaviors, or other things which have scientific, mathematical, geometric, statistical, or other meaning.] + **** Dots [A small round mark or spot.] + **** LED-pattern [A pattern created by lighting selected members of a fixed light emitting diode array.] + *** 2D-shape [A planar, two-dimensional shape.] + **** Arrow [A shape with a pointed end indicating direction.] + **** Clockface [The dial face of a clock. A location identifier based on clockface numbering or anatomic subregion.] + **** Cross [A figure or mark formed by two intersecting lines crossing at their midpoints.] + **** Dash [A horizontal stroke in writing or printing to mark a pause or break in sense or to represent omitted letters or words.] + **** Ellipse [A closed plane curve resulting from the intersection of a circular cone and a plane cutting completely through it, especially a plane not parallel to the base.] + ***** Circle [A ring-shaped structure with every point equidistant from the center.] + **** Rectangle [A parallelogram with four right angles.] + ***** Square [A square is a special rectangle with four equal sides.] + **** Single-point [A point is a geometric entity that is located in a zero-dimensional spatial region and whose position is defined by its coordinates in some coordinate system.] + **** Star [A conventional or stylized representation of a star, typically one having five or more points.] + **** Triangle [A three-sided polygon.] + *** 3D-shape [A geometric three-dimensional shape.] + **** Box [A square or rectangular vessel, usually made of cardboard or plastic.] + ***** Cube [A solid or semi-solid in the shape of a three dimensional square.] + **** Cone [A shape whose base is a circle and whose sides taper up to a point.] + **** Cylinder [A surface formed by circles of a given radius that are contained in a plane perpendicular to a given axis, whose centers align on the axis.] + **** Ellipsoid [A closed plane curve resulting from the intersection of a circular cone and a plane cutting completely through it, especially a plane not parallel to the base.] + ***** Sphere [A solid or hollow three-dimensional object bounded by a closed surface such that every point on the surface is equidistant from the center.] + **** Pyramid [A polyhedron of which one face is a polygon of any number of sides, and the other faces are triangles with a common vertex.] + ** Ingestible-object [Something that can be taken into the body by the mouth for digestion or absorption.] + ** Man-made-object [Something constructed by human means.] + *** Building [A structure that has a roof and walls and stands more or less permanently in one place.] + **** Room [An area within a building enclosed by walls and floor and ceiling.] + **** Roof [A roof is the covering on the uppermost part of a building which provides protection from animals and weather, notably rain, but also heat, wind and sunlight.] + **** Entrance [The means or place of entry.] + **** Attic [A room or a space immediately below the roof of a building.] + **** Basement [The part of a building that is wholly or partly below ground level.] + *** Clothing [A covering designed to be worn on the body.] + *** Device [An object contrived for a specific purpose.] + **** Assistive-device [A device that help an individual accomplish a task.] + ***** Glasses [Frames with lenses worn in front of the eye for vision correction, eye protection, or protection from UV rays.] + ***** Writing-device [A device used for writing.] + ****** Pen [A common writing instrument used to apply ink to a surface for writing or drawing.] + ****** Pencil [An implement for writing or drawing that is constructed of a narrow solid pigment core in a protective casing that prevents the core from being broken or marking the hand.] + **** Computing-device [An electronic device which take inputs and processes results from the inputs.] + ***** Cellphone [A telephone with access to a cellular radio system so it can be used over a wide area, without a physical connection to a network.] + ***** Desktop-computer [A computer suitable for use at an ordinary desk.] + ***** Laptop-computer [A computer that is portable and suitable for use while traveling.] + ***** Tablet-computer [A small portable computer that accepts input directly on to its screen rather than via a keyboard or mouse.] + **** Engine [A motor is a machine designed to convert one or more forms of energy into mechanical energy.] + **** IO-device [Hardware used by a human (or other system) to communicate with a computer.] + ***** Input-device [A piece of equipment used to provide data and control signals to an information processing system such as a computer or information appliance.] + ****** Computer-mouse [A hand-held pointing device that detects two-dimensional motion relative to a surface.] + ******* Mouse-button [An electric switch on a computer mouse which can be pressed or clicked to select or interact with an element of a graphical user interface.] + ******* Scroll-wheel [A scroll wheel or mouse wheel is a wheel used for scrolling made of hard plastic with a rubbery surface usually located between the left and right mouse buttons and is positioned perpendicular to the mouse surface.] + ****** Joystick [A control device that uses a movable handle to create two-axis input for a computer device.] + ****** Keyboard [A device consisting of mechanical keys that are pressed to create input to a computer.] + ******* Keyboard-key [A button on a keyboard usually representing letters, numbers, functions, or symbols.] + ******** # {takesValue} [Value of a keyboard key.] + ****** Keypad [A device consisting of keys, usually in a block arrangement, that provides limited input to a system.] + ******* Keypad-key [A key on a separate section of a computer keyboard that groups together numeric keys and those for mathematical or other special functions in an arrangement like that of a calculator.] + ******** # {takesValue} [Value of keypad key.] + ****** Microphone [A device designed to convert sound to an electrical signal.] + ****** Push-button [A switch designed to be operated by pressing a button.] + ***** Output-device [Any piece of computer hardware equipment which converts information into human understandable form.] + ****** Display-device [An output device for presentation of information in visual or tactile form the latter used for example in tactile electronic displays for blind people.] + ******* Head-mounted-display [An instrument that functions as a display device, worn on the head or as part of a helmet, that has a small display optic in front of one (monocular HMD) or each eye (binocular HMD).] + ******* LED-display [A LED display is a flat panel display that uses an array of light-emitting diodes as pixels for a video display.] + ******* Computer-screen [An electronic device designed as a display or a physical device designed to be a protective meshwork.] + ******** Screen-window [A part of a computer screen that contains a display different from the rest of the screen. A window is a graphical control element consisting of a visual area containing some of the graphical user interface of the program it belongs to and is framed by a window decoration.] + ****** Auditory-device [A device designed to produce sound.] + ******* Headphones [An instrument that consists of a pair of small loudspeakers, or less commonly a single speaker, held close to ears and connected to a signal source such as an audio amplifier, radio, CD player or portable media player.] + ******* Loudspeaker [A device designed to convert electrical signals to sounds that can be heard.] + ***** Recording-device [A device that copies information in a signal into a persistent information bearer.] + ****** EEG-recorder [A device for recording electric currents in the brain using electrodes applied to the scalp, to the surface of the brain, or placed within the substance of the brain.] + ****** File-storage [A device for recording digital information to a permanent media.] + ****** MEG-recorder [A device for measuring the magnetic fields produced by electrical activity in the brain, usually conducted externally.] + ****** Motion-capture [A device for recording the movement of objects or people.] + ****** Tape-recorder [A device for recording and reproduction usually using magnetic tape for storage that can be saved and played back.] + ***** Touchscreen [A control component that operates an electronic device by pressing the display on the screen.] + **** Machine [A human-made device that uses power to apply forces and control movement to perform an action.] + **** Measurement-device [A device in which a measure function inheres.] + ***** Clock [A device designed to indicate the time of day or to measure the time duration of an event or action.] + ****** Clock-face [A location identifier based on clockface numbering or anatomic subregion.] + **** Robot [A mechanical device that sometimes resembles a living animal and is capable of performing a variety of often complex human tasks on command or by being programmed in advance.] + **** Tool [A component that is not part of a device but is designed to support its assemby or operation.] + *** Document [A physical object, or electronic counterpart, that is characterized by containing writing which is meant to be human-readable.] + **** Letter [A written message addressed to a person or organization.] + **** Note [A brief written record.] + **** Book [A volume made up of pages fastened along one edge and enclosed between protective covers.] + **** Notebook [A book for notes or memoranda.] + **** Questionnaire [A document consisting of questions and possibly responses, depending on whether it has been filled out.] + *** Furnishing [Furniture, fittings, and other decorative accessories, such as curtains and carpets, for a house or room.] + *** Manufactured-material [Substances created or extracted from raw materials.] + **** Ceramic [A hard, brittle, heat-resistant and corrosion-resistant material made by shaping and then firing a nonmetallic mineral, such as clay, at a high temperature.] + **** Glass [A brittle transparent solid with irregular atomic structure.] + **** Paper [A thin sheet material produced by mechanically or chemically processing cellulose fibres derived from wood, rags, grasses or other vegetable sources in water.] + **** Plastic [Various high-molecular-weight thermoplastic or thermosetting polymers that are capable of being molded, extruded, drawn, or otherwise shaped and then hardened into a form.] + **** Steel [An alloy made up of iron with typically a few tenths of a percent of carbon to improve its strength and fracture resistance compared to iron.] + *** Media [Media are audo/visual/audiovisual modes of communicating information for mass consumption.] + **** Media-clip [A short segment of media.] + ***** Audio-clip [A short segment of audio.] + ***** Audiovisual-clip [A short media segment containing both audio and video.] + ***** Video-clip [A short segment of video.] + **** Visualization [An planned process that creates images, diagrams or animations from the input data.] + ***** Animation [A form of graphical illustration that changes with time to give a sense of motion or represent dynamic changes in the portrayal.] + ***** Art-installation [A large-scale, mixed-media constructions, often designed for a specific place or for a temporary period of time.] + ***** Braille [A display using a system of raised dots that can be read with the fingers by people who are blind.] + ***** Image [Any record of an imaging event whether physical or electronic.] + ****** Cartoon [A type of illustration, sometimes animated, typically in a non-realistic or semi-realistic style. The specific meaning has evolved over time, but the modern usage usually refers to either an image or series of images intended for satire, caricature, or humor. A motion picture that relies on a sequence of illustrations for its animation.] + ****** Drawing [A representation of an object or outlining a figure, plan, or sketch by means of lines.] + ****** Icon [A sign (such as a word or graphic symbol) whose form suggests its meaning.] + ****** Painting [A work produced through the art of painting.] + ****** Photograph [An image recorded by a camera.] + ***** Movie [A sequence of images displayed in succession giving the illusion of continuous movement.] + ***** Outline-visualization [A visualization consisting of a line or set of lines enclosing or indicating the shape of an object in a sketch or diagram.] + ***** Point-light-visualization [A display in which action is depicted using a few points of light, often generated from discrete sensors in motion capture.] + ***** Sculpture [A two- or three-dimensional representative or abstract forms, especially by carving stone or wood or by casting metal or plaster.] + ***** Stick-figure-visualization [A drawing showing the head of a human being or animal as a circle and all other parts as straight lines.] + *** Navigational-object [An object whose purpose is to assist directed movement from one location to another.] + **** Path [A trodden way. A way or track laid down for walking or made by continual treading.] + **** Road [An open way for the passage of vehicles, persons, or animals on land.] + ***** Lane [A defined path with physical dimensions through which an object or substance may traverse.] + **** Runway [A paved strip of ground on a landing field for the landing and takeoff of aircraft.] + *** Vehicle [A mobile machine which transports people or cargo.] + **** Aircraft [A vehicle which is able to travel through air in an atmosphere.] + **** Bicycle [A human-powered, pedal-driven, single-track vehicle, having two wheels attached to a frame, one behind the other.] + **** Boat [A watercraft of any size which is able to float or plane on water.] + **** Car [A wheeled motor vehicle used primarily for the transportation of human passengers.] + **** Cart [A cart is a vehicle which has two wheels and is designed to transport human passengers or cargo.] + **** Tractor [A mobile machine specifically designed to deliver a high tractive effort at slow speeds, and mainly used for the purposes of hauling a trailer or machinery used in agriculture or construction.] + **** Train [A connected line of railroad cars with or without a locomotive.] + **** Truck [A motor vehicle which, as its primary funcion, transports cargo rather than human passangers.] + ** Natural-object [Something that exists in or is produced by nature, and is not artificial or man-made.] + *** Mineral [A solid, homogeneous, inorganic substance occurring in nature and having a definite chemical composition.] + *** Natural-feature [A feature that occurs in nature. A prominent or identifiable aspect, region, or site of interest.] + **** Field [An unbroken expanse as of ice or grassland.] + **** Hill [A rounded elevation of limited extent rising above the surrounding land with local relief of less than 300m.] + **** Mountain [A landform that extends above the surrounding terrain in a limited area.] + **** River [A natural freshwater surface stream of considerable volume and a permanent or seasonal flow, moving in a definite channel toward a sea, lake, or another river.] + **** Waterfall [A sudden descent of water over a step or ledge in the bed of a river.] + * Sound [Mechanical vibrations transmitted by an elastic medium. Something that can be heard.] + ** Environmental-sound [Sounds occuring in the environment. An accumulation of noise pollution that occurs outside. This noise can be caused by transport, industrial, and recreational activities.] + *** Crowd-sound [Noise produced by a mixture of sounds from a large group of people.] + *** Signal-noise [Any part of a signal that is not the true or original signal but is introduced by the communication mechanism.] + ** Musical-sound [Sound produced by continuous and regular vibrations, as opposed to noise.] + *** Tone [A musical note, warble, or other sound used as a particular signal on a telephone or answering machine.] + *** Instrument-sound [Sound produced by a musical instrument.] + *** Vocalized-sound [Musical sound produced by vocal cords in a biological agent.] + ** Named-animal-sound [A sound recognizable as being associated with particular animals.] + *** Barking [Sharp explosive cries like sounds made by certain animals, especially a dog, fox, or seal.] + *** Bleating [Wavering cries like sounds made by a sheep, goat, or calf.] + *** Crowing [Loud shrill sounds characteristic of roosters.] + *** Chirping [Short, sharp, high-pitched noises like sounds made by small birds or an insects.] + *** Growling [Low guttural sounds like those that made in the throat by a hostile dog or other animal.] + *** Meowing [Vocalizations like those made by as those cats. These sounds have diverse tones and are sometimes chattered, murmured or whispered. The purpose can be assertive.] + *** Mooing [Deep vocal sounds like those made by a cow.] + *** Purring [Low continuous vibratory sound such as those made by cats. The sound expresses contentment.] + *** Roaring [Loud, deep, or harsh prolonged sounds such as those made by big cats and bears for long-distance communication and intimidation.] + *** Squawking [Loud, harsh noises such as those made by geese.] + ** Named-object-sound [A sound identifiable as coming from a particular type of object.] + *** Alarm-sound [A loud signal often loud continuous ringing to alert people to a problem or condition that requires urgent attention.] + *** Beep [A short, single tone, that is typically high-pitched and generally made by a computer or other machine.] + *** Buzz [A persistent vibratory sound often made by a buzzer device and used to indicate something incorrect.] + *** Ka-ching [The sound made by a mechanical cash register, often to designate a reward.] + *** Click [The sound made by a mechanical cash register, often to designate a reward.] + *** Ding [A short ringing sound such as that made by a bell, often to indicate a correct response or the expiration of time.] + *** Horn-blow [A loud sound made by forcing air through a sound device that funnels air to create the sound, often used to sound an alert.] + *** Siren [A loud, continuous sound often varying in frequency designed to indicate an emergency.] '''Property''' {extensionAllowed} [Something that pertains to a thing. A characteristic of some entity. A quality or feature regarded as a characteristic or inherent part of someone or something. HED attributes are adjectives or adverbs.] -* Agent-property {extensionAllowed} [Something that pertains to an agent.] -** Agent-state [The state of the agent.] -*** Agent-cognitive-state [The state of the cognitive processes or state of mind of the agent.] -**** Alert [Condition of heightened watchfulness or preparation for action.] -**** Anesthetized [Having lost sensation to pain or having senses dulled due to the effects of an anesthetic.] -**** Asleep [Having entered a periodic, readily reversible state of reduced awareness and metabolic activity, usually accompanied by physical relaxation and brain activity.] -**** Attentive [Concentrating and focusing mental energy on the task or surroundings.] -**** Distracted [Lacking in concentration because of being preoccupied.] -**** Awake [In a non sleeping state.] -**** Brain-dead [Characterized by the irreversible absence of cortical and brain stem functioning.] -**** Comatose [In a state of profound unconsciousness associated with markedly depressed cerebral activity.] -**** Drowsy [In a state of near-sleep, a strong desire for sleep, or sleeping for unusually long periods.] -**** Intoxicated [In a state with disturbed psychophysiological functions and responses as a result of administration or ingestion of a psychoactive substance.] -**** Locked-in [In a state of complete paralysis of all voluntary muscles except for the ones that control the movements of the eyes.] -**** Passive [Not responding or initiating an action in response to a stimulus.] -**** Resting [A state in which the agent is not exhibiting any physical exertion.] -**** Vegetative [A state of wakefulness and conscience, but (in contrast to coma) with involuntary opening of the eyes and movements (such as teeth grinding, yawning, or thrashing of the extremities).] -*** Agent-emotional-state [The status of the general temperament and outlook of an agent.] -**** Angry [Experiencing emotions characterized by marked annoyance or hostility.] -**** Aroused [In a state reactive to stimuli leading to increased heart rate and blood pressure, sensory alertness, mobility and readiness to respond.] -**** Awed [Filled with wonder. Feeling grand, sublime or powerful emotions characterized by a combination of joy, fear, admiration, reverence, and/or respect.] -**** Compassionate [Feeling or showing sympathy and concern for others often evoked for a person who is in distress and associated with altruistic motivation.] -**** Content [Feeling satisfaction with things as they are.] -**** Disgusted [Feeling revulsion or profound disapproval aroused by something unpleasant or offensive.] -**** Emotionally-neutral [Feeling neither satisfied nor dissatisfied.] -**** Empathetic [Understanding and sharing the feelings of another. Being aware of, being sensitive to, and vicariously experiencing the feelings, thoughts, and experience of another.] -**** Excited [Feeling great enthusiasm and eagerness.] -**** Fearful [Feeling apprehension that one may be in danger.] -**** Frustrated [Feeling annoyed as a result of being blocked, thwarted, disappointed or defeated.] -**** Grieving [Feeling sorrow in response to loss, whether physical or abstract.] -**** Happy [Feeling pleased and content.] -**** Jealous [Feeling threatened by a rival in a relationship with another individual, in particular an intimate partner, usually involves feelings of threat, fear, suspicion, distrust, anxiety, anger, betrayal, and rejection.] -**** Joyful [Feeling delight or intense happiness.] -**** Loving [Feeling a strong positive emotion of affection and attraction.] -**** Relieved [No longer feeling pain, distress, anxiety, or reassured.] -**** Sad [Feeling grief or unhappiness.] -**** Stressed [Experiencing mental or emotional strain or tension.] -*** Agent-physiological-state [Having to do with the mechanical, physical, or biochemical function of an agent.] -**** Healthy {relatedTag=Sick} [Having no significant health-related issues.] -**** Hungry {relatedTag=Sated, relatedTag=Thirsty} [Being in a state of craving or desiring food.] -**** Rested {relatedTag=Tired} [Feeling refreshed and relaxed.] -**** Sated {relatedTag=Hungry} [Feeling full.] -**** Sick {relatedTag=Healthy} [Being in a state of ill health, bodily malfunction, or discomfort.] -**** Thirsty {relatedTag=Hungry} [Feeling a need to drink.] -**** Tired {relatedTag=Rested} [Feeling in need of sleep or rest.] -*** Agent-postural-state [Pertaining to the position in which agent holds their body.] -**** Crouching [Adopting a position where the knees are bent and the upper body is brought forward and down, sometimes to avoid detection or to defend oneself.] -**** Eyes-closed [Keeping eyes closed with no blinking.] -**** Eyes-open [Keeping eyes open with occasional blinking.] -**** Kneeling [Positioned where one or both knees are on the ground.] -**** On-treadmill [Ambulation on an exercise apparatus with an endless moving belt to support moving in place.] -**** Prone [Positioned in a recumbent body position whereby the person lies on its stomach and faces downward.] -**** Sitting [In a seated position.] -**** Standing [Assuming or maintaining an erect upright position.] -**** Seated-with-chin-rest [Using a device that supports the chin and head.] -** Agent-task-role [The function or part that is ascribed to an agent in performing the task.] -*** Experiment-actor [An agent who plays a predetermined role to create the experiment scenario.] -*** Experiment-controller [An agent exerting control over some aspect of the experiment.] -*** Experiment-participant [Someone who takes part in an activity related to an experiment.] -*** Experimenter [Person who is the owner of the experiment and has its responsibility.] -** Agent-trait [A genetically, environmentally, or socially determined characteristic of an agent.] -*** Age [Length of time elapsed time since birth of the agent.] -**** # {takesValue, valueClass=numericClass} -*** Agent-experience-level [Amount of skill or knowledge that the agent has as pertains to the task.] -**** Expert-level {relatedTag=Intermediate-experience-level, relatedTag=Novice-level} [Having comprehensive and authoritative knowledge of or skill in a particular area related to the task.] -**** Intermediate-experience-level {relatedTag=Expert-level, relatedTag=Novice-level} [Having a moderate amount of knowledge or skill related to the task.] -**** Novice-level {relatedTag=Expert-level, relatedTag=Intermediate-experience-level} [Being inexperienced in a field or situation related to the task.] -*** Gender [Characteristics that are socially constructed, including norms, behaviors, and roles based on sex.] -*** Sex [Physical properties or qualities by which male is distinguished from female.] -**** Female [Biological sex of an individual with female sexual organs such ova.] -**** Male [Biological sex of an individual with male sexual organs producing sperm.] -**** Intersex [Having genitalia and/or secondary sexual characteristics of indeterminate sex.] -*** Ethnicity [Belong to a social group that has a common national or cultural tradition. Use with Label to avoid extension.] -*** Handedness [Individual preference for use of a hand, known as the dominant hand.] -**** Left-handed [Preference for using the left hand or foot for tasks requiring the use of a single hand or foot.] -**** Right-handed [Preference for using the right hand or foot for tasks requiring the use of a single hand or foot.] -**** Ambidextrous [Having no overall dominance in the use of right or left hand or foot in the performance of tasks that require one hand or foot.] -*** Race [Belonging to a group sharing physical or social qualities as defined within a specified society. Use with Label to avoid extension.] -* Data-property {extensionAllowed} [Something that pertains to data or information.] -** Data-marker [An indicator placed to mark something.] -*** Data-break-marker [An indicator place to indicate a gap in the data.] -*** Temporal-marker [An indicator placed at a particular time in the data.] -**** Onset {topLevelTagGroup} [Labels the start or beginning of something, usually an event.] -**** Offset {topLevelTagGroup} [Labels the time at which something stops.] -**** Pause [Indicates the temporary interruption of the operation a process and subsequently wait for a signal to continue.] -**** Time-out [A cancellation or cessation that automatically occurs when a predefined interval of time has passed without a certain event occurring.] -**** Time-sync [A synchronization signal whose purpose to help synchronize different signals or processes. Often used to indicate a marker inserted into the recorded data to allow post hoc synchronization of concurrently recorded data streams.] -** Data-resolution [Smallest change in a quality being measured by an sensor that causes a perceptible change.] -*** Printer-resolution [Resolution of a printer, usually expressed as the number of dots-per-inch for a printer.] -**** # {takesValue, valueClass=numericClass} -*** Screen-resolution [Resolution of a screen, usually expressed as the of pixels in a dimension for a digital display device.] -**** # {takesValue, valueClass=numericClass} -*** Sensory-resolution [Resolution of measurements by a sensing device.] -**** # {takesValue, valueClass=numericClass} -*** Spatial-resolution [Linear spacing of a spatial measurement.] -**** # {takesValue, valueClass=numericClass} -*** Spectral-resolution [Measures the ability of a sensor to resolve features in the electromagnetic spectrum.] -**** # {takesValue, valueClass=numericClass} -*** Temporal-resolution [Measures the ability of a sensor to resolve features in time.] -**** # {takesValue, valueClass=numericClass} -** Data-source-type [The type of place, person, or thing from which the data comes or can be obtained.] -*** Computed-feature [A feature computed from the data by a tool. This tag should be grouped with a label of the form Toolname_propertyName.] -*** Computed-prediction [A computed extrapolation of known data.] -*** Expert-annotation [An explanatory or critical comment or other in-context information provided by an authority.] -*** Instrument-measurement [Information obtained from a device that is used to measure material properties or make other observations.] -*** Observation [Active acquisition of information from a primary source. Should be grouped with a label of the form AgentID_featureName.] -** Data-value [Designation of the type of a data item.] -*** Categorical-value [Indicates that something can take on a limited and usually fixed number of possible values.] -**** Categorical-class-value [Categorical values that fall into discrete classes such as true or false. The grouping is absolute in the sense that it is the same for all participants.] -***** All {relatedTag=Some, relatedTag=None} [To a complete degree or to the full or entire extent.] -***** Correct {relatedTag=Wrong} [Free from error. Especially conforming to fact or truth.] -***** Explicit {relatedTag=Implicit} [Stated clearly and in detail, leaving no room for confusion or doubt.] -***** False {relatedTag=True} [Not in accordance with facts, reality or definitive criteria.] -***** Implicit {relatedTag=Explicit} [Implied though not plainly expressed.] -***** Invalid {relatedTag=Valid} [Not allowed or not conforming to the correct format or specifications.] -***** None {relatedTag=All, relatedTag=Some} [No person or thing, nobody, not any.] -***** Some {relatedTag=All, relatedTag=None} [At least a small amount or number of, but not a large amount of, or often.] -***** True {relatedTag=False} [Conforming to facts, reality or definitive criteria.] -***** Valid {relatedTag=Invalid} [Allowable, usable, or acceptable.] -***** Wrong {relatedTag=Correct} [Inaccurate or not correct.] -**** Categorical-judgment-value [Categorical values that are based on the judgment or perception of the participant such familiar and famous.] -***** Abnormal {relatedTag=Normal} [Deviating in any way from the state, position, structure, condition, behavior, or rule which is considered a norm.] -***** Asymmetrical {relatedTag=Symmetrical} [Lacking symmetry or having parts that fail to correspond to one another in shape, size, or arrangement.] -***** Audible {relatedTag=Inaudible} [A sound that can be perceived by the participant.] -***** Congruent {relatedTag=Incongruent} [Concordance of multiple evidence lines. In agreement or harmony.] -***** Complex {relatedTag=Simple} [Hard, involved or complicated, elaborate, having many parts.] -***** Constrained {relatedTag=Unconstrained} [Keeping something within particular limits or bounds.] -***** Disordered {relatedTag=Ordered} [Not neatly arranged. Confused and untidy. A structural quality in which the parts of an object are non-rigid.] -***** Familiar {relatedTag=Unfamiliar, relatedTag=Famous} [Recognized, familiar, or within the scope of knowledge.] -***** Famous {relatedTag=Familiar, relatedTag=Unfamiliar} [A person who has a high degree of recognition by the general population for his or her success or accomplishments. A famous person.] -***** Inaudible {relatedTag=Audible} [A sound below the threshold of perception of the participant.] -***** Incongruent {relatedTag=Congruent} [Not in agreement or harmony.] -***** Involuntary {relatedTag=Voluntary} [An action that is not made by choice. In the body, involuntary actions (such as blushing) occur automatically, and cannot be controlled by choice.] -***** Masked {relatedTag=Unmasked} [Information exists but is not provided or is partially obscured due to security, privacy, or other concerns.] -***** Normal {relatedTag=Abnormal} [Being approximately average or within certain limits. Conforming with or constituting a norm or standard or level or type or social norm.] -***** Ordered {relatedTag=Disordered} [Conforming to a logical or comprehensible arrangement of separate elements.] -***** Simple {relatedTag=Complex} [Easily understood or presenting no difficulties.] -***** Symmetrical {relatedTag=Asymmetrical} [Made up of exactly similar parts facing each other or around an axis. Showing aspects of symmetry.] -***** Unconstrained {relatedTag=Constrained} [Moving without restriction.] -***** Unfamiliar {relatedTag=Familiar, relatedTag=Famous} [Not having knowledge or experience of.] -***** Unmasked {relatedTag=Masked} [Information is revealed.] -***** Voluntary {relatedTag=Involuntary} [Using free will or design; not forced or compelled; controlled by individual volition.] -**** Categorical-level-value [Categorical values based on dividing a continuous variable into levels such as high and low.] -***** Cold {relatedTag=Hot} [Having an absence of heat.] -***** Deep {relatedTag=Shallow} [Extending relatively far inward or downward.] -***** High {relatedTag=Low, relatedTag=Medium} [Having a greater than normal degree, intensity, or amount.] -***** Hot {relatedTag=Cold} [Having an excess of heat.] -***** Large {relatedTag=Small} [Having a great extent such as in physical dimensions, period of time, amplitude or frequency.] -***** Liminal {relatedTag=Subliminal, relatedTag=Supraliminal} [Situated at a sensory threshold that is barely perceptible or capable of eliciting a response.] -***** Loud {relatedTag=Quiet} [Having a perceived high intensity of sound.] -***** Low {relatedTag=High} [Less than normal in degree, intensity or amount.] -***** Medium {relatedTag=Low, relatedTag=High} [Mid-way between small and large in number, quantity, magnitude or extent.] -***** Negative {relatedTag=Positive} [Involving disadvantage or harm.] -***** Positive {relatedTag=Negative} [Involving advantage or good.] -***** Quiet {relatedTag=Loud} [Characterizing a perceived low intensity of sound.] -***** Rough {relatedTag=Smooth} [Having a surface with perceptible bumps, ridges, or irregularities.] -***** Shallow {relatedTag=Deep} [Having a depth which is relatively low.] -***** Small {relatedTag=Large} [Having a small extent such as in physical dimensions, period of time, amplitude or frequency.] -***** Smooth {relatedTag=Rough} [Having a surface free from bumps, ridges, or irregularities.] -***** Subliminal {relatedTag=Liminal, relatedTag=Supraliminal} [Situated below a sensory threshold that is imperceptible or not capable of eliciting a response.] -***** Supraliminal {relatedTag=Liminal, relatedTag=Subliminal} [Situated above a sensory threshold that is perceptible or capable of eliciting a response.] -***** Thick {relatedTag=Thin} [Wide in width, extent or cross-section.] -***** Thin {relatedTag=Thick} [Narrow in width, extent or cross-section.] -**** Categorical-orientation-value [Value indicating the orientation or direction of something.] -***** Backward {relatedTag=Forward} [Directed behind or to the rear.] -***** Downward {relatedTag=Leftward, relatedTag=Rightward, relatedTag=Upward} [Moving or leading toward a lower place or level.] -***** Forward {relatedTag=Backward} [At or near or directed toward the front.] -***** Horizontally-oriented {relatedTag=Vertically-oriented} [Oriented parallel to or in the plane of the horizon.] -***** Leftward {relatedTag=Downward, relatedTag=Rightward, relatedTag=Upward} [Going toward or facing the left.] -***** Oblique {relatedTag=Rotated} [Slanting or inclined in direction, course, or position that is neither parallel nor perpendicular nor right-angular.] -***** Rightward {relatedTag=Downward, relatedTag=Leftward, relatedTag=Upward} [Going toward or situated on the right.] -***** Rotated [Positioned offset around an axis or center.] -***** Upward {relatedTag=Downward, relatedTag=Leftward, relatedTag=Rightward} [Moving, pointing, or leading to a higher place, point, or level.] -***** Vertically-oriented {relatedTag=Horizontally-oriented} [Oriented perpendicular to the plane of the horizon.] -*** Physical-value [The value of some physical property of something.] -**** Weight [The relative mass or the quantity of matter contained by something.] -***** # {takesValue, valueClass=numericClass, unitClass=weightUnits} -**** Temperature [A measure of hot or cold based on the average kinetic energy of the atoms or molecules in the system.] -***** # {takesValue, valueClass=numericClass, unitClass=temperatureUnits} -*** Quantitative-value [Something capable of being estimated or expressed with numeric values.] -**** Fraction [A numerical value between 0 and 1.] -***** # {takesValue, valueClass=numericClass} -**** Item-count [The integer count of something which is usually grouped with the entity it is counting. (Item-count/3, A) indicates that 3 of A have occurred up to this point.] -***** # {takesValue, valueClass=numericClass} -**** Item-index [The index of an item in a collection, sequence or other structure. (A (Item-index/3, B)) means that A is item number 3 in B.] -***** # {takesValue, valueClass=numericClass} -**** Item-interval [An integer indicating how many items or entities have passed since the last one of these. An item interval of 0 indicates the current item.] -***** # {takesValue, valueClass=numericClass} -**** Percentage [A fraction or ratio with 100 understood as the denominator.] -***** # {takesValue, valueClass=numericClass} -**** Ratio [A quotient of quantities of the same kind for different components within the same system.] -***** # {takesValue, valueClass=numericClass} -*** Statistical-value {extensionAllowed} [A value based on or employing the principles of statistics.] -**** Data-maximum [The largest possible quantity or degree.] -***** # {takesValue, valueClass=numericClass} -**** Data-mean [The sum of a set of values divided by the number of values in the set.] -***** # {takesValue, valueClass=numericClass} -**** Data-median [The value which has an equal number of values greater and less than it.] -***** # {takesValue, valueClass=numericClass} -**** Data-minimum [The smallest possible quantity.] -***** # {takesValue, valueClass=numericClass} -**** Probability [A measure of the expectation of the occurrence of a particular event.] -***** # {takesValue, valueClass=numericClass} -**** Standard-deviation [A measure of the range of values in a set of numbers. Standard deviation is a statistic used as a measure of the dispersion or variation in a distribution, equal to the square root of the arithmetic mean of the squares of the deviations from the arithmetic mean.] -***** # {takesValue, valueClass=numericClass} -**** Statistical-accuracy [A measure of closeness to true value expressed as a number between 0 and 1.] -***** # {takesValue, valueClass=numericClass} -**** Statistical-precision [A quantitative representation of the degree of accuracy necessary for or associated with a particular action.] -***** # {takesValue, valueClass=numericClass} -**** Statistical-recall [Sensitivity is a measurement datum qualifying a binary classification test and is computed by substracting the false negative rate to the integral numeral 1.] -***** # {takesValue, valueClass=numericClass} -**** Statistical-uncertainty [A measure of the inherent variability of repeated observation measurements of a quantity including quantities evaluated by statistical methods and by other means.] -***** # {takesValue, valueClass=numericClass} -*** Spatiotemporal-value [A property relating to space and/or time.] -**** Rate-of-change [The amount of change accumulated per unit time.] -***** Acceleration [Magnitude of the rate of change in either speed or direction. The direction of change should be given separately.] -****** # {takesValue, valueClass=numericClass, unitClass=accelerationUnits} -***** Frequency [Frequency is the number of occurrences of a repeating event per unit time.] -****** # {takesValue, valueClass=numericClass, unitClass=frequencyUnits} -***** Jerk-rate [Magnitude of the rate at which the acceleration of an object changes with respect to time. The direction of change should be given separately.] -****** # {takesValue, valueClass=numericClass, unitClass=jerkUnits} -***** Sampling-rate [The number of digital samples taken or recorded per unit of time.] -****** # {takesValue, unitClass=frequencyUnits} -***** Refresh-rate [The frequency with which the image on a computer monitor or similar electronic display screen is refreshed, usually expressed in hertz.] -****** # {takesValue, valueClass=numericClass} -***** Speed [A scalar measure of the rate of movement of the object expressed either as the distance travelled divided by the time taken (average speed) or the rate of change of position with respect to time at a particular point (instantaneous speed). The direction of change should be given separately.] -****** # {takesValue, valueClass=numericClass, unitClass=speedUnits} -***** Temporal-rate [The number of items per unit of time.] -****** # {takesValue, valueClass=numericClass, unitClass=frequencyUnits} -**** Spatial-value [Value of an item involving space.] -***** Angle [The amount of inclination of one line to another or the plane of one object to another.] -****** # {takesValue, unitClass=angleUnits, valueClass=numericClass} -***** Distance [A measure of the space separating two objects or points.] -****** # {takesValue, valueClass=numericClass, unitClass=physicalLengthUnits} -***** Position [A reference to the alignment of an object, a particular situation or view of a situation, or the location of an object. Coordinates with respect a specified frame of reference or the default Screen-frame if no frame is given.] -****** X-position [The position along the x-axis of the frame of reference.] -******* # {takesValue, valueClass=numericClass, unitClass=physicalLengthUnits} -****** Y-position [The position along the y-axis of the frame of reference.] -******* # {takesValue, valueClass=numericClass, unitClass=physicalLengthUnits} -****** Z-position [The position along the z-axis of the frame of reference.] -******* # {takesValue, valueClass=numericClass, unitClass=physicalLengthUnits} -***** Size [The physical magnitude of something.] -****** Area [The extent of a 2-dimensional surface enclosed within a boundary.] -******* # {takesValue, valueClass=numericClass, unitClass=areaUnits} -****** Depth [The distance from the surface of something especially from the perspective of looking from the front.] -******* # {takesValue, valueClass=numericClass, unitClass=physicalLengthUnits} -****** Length [The linear extent in space from one end of something to the other end, or the extent of something from beginning to end.] -******* # {takesValue, valueClass=numericClass, unitClass=physicalLengthUnits} -****** Width [The extent or measurement of something from side to side.] -******* # {takesValue, valueClass=numericClass, unitClass=physicalLengthUnits} -****** Height [The vertical measurement or distance from the base to the top of an object.] -******* # {takesValue, valueClass=numericClass, unitClass=physicalLengthUnits} -****** Volume [The amount of three dimensional space occupied by an object or the capacity of a space or container.] -******* # {takesValue, valueClass=numericClass, unitClass=volumeUnits} -**** Temporal-value [A characteristic of or relating to time or limited by time.] -***** Delay [Time during which some action is awaited.] -****** # {takesValue, valueClass=numericClass, unitClass=timeUnits} -***** Duration [The period of time during which something occurs or continues.] -****** # {takesValue, valueClass=numericClass, unitClass=timeUnits} -***** Time-interval [The period of time separating two instances, events, or occurrences.] -****** # {takesValue, valueClass=numericClass, unitClass=timeUnits} -***** Time-value [A value with units of time. Usually grouped with tags identifying what the value represents.] -****** # {takesValue, valueClass=numericClass, unitClass=timeUnits} -** Data-variability-attribute [An attribute describing how something changes or varies.] -*** Abrupt [Marked by sudden change.] -*** Constant [Continually recurring or continuing without interruption. Not changing in time or space.] -*** Continuous {relatedTag=Discrete, relatedTag=Discontinuous} [Uninterrupted in time, sequence, substance, or extent.] -*** Decreasing {relatedTag=Increasing} [Becoming smaller or fewer in size, amount, intensity, or degree.] -*** Deterministic {relatedTag=Random, relatedTag=Stochastic} [No randomness is involved in the development of the future states of the element.] -*** Discontinuous {relatedTag=Continuous} [Having a gap in time, sequence, substance, or extent.] -*** Discrete {relatedTag=Continuous, relatedTag=Discontinuous} [Constituting a separate entities or parts.] -*** Flickering [Moving irregularly or unsteadily or burning or shining fitfully or with a fluctuating light.] -*** Estimated-value [Something that has been calculated or measured approximately.] -*** Exact-value [A value that is viewed to the true value according to some standard.] -*** Fractal [Having extremely irregular curves or shapes for which any suitably chosen part is similar in shape to a given larger or smaller part when magnified or reduced to the same size.] -*** Increasing {relatedTag=Decreasing} [Becoming greater in size, amount, or degree.] -*** Random {relatedTag=Deterministic, relatedTag=Stochastic} [Governed by or depending on chance. Lacking any definite plan or order or purpose.] -*** Repetitive [A recurring action that is often non-purposeful.] -*** Stochastic {relatedTag=Deterministic, relatedTag=Random} [Uses a random probability distribution or pattern that may be analysed statistically but may not be predicted precisely to determine future states.] -*** Varying [Differing in size, amount, degree, or nature.] -* Environmental-property [Relating to or arising from the surroundings of an agent.] -** Indoors [Located inside a building or enclosure.] -** Outdoors [Any area outside a building or shelter.] -** Real-world [Located in a place that exists in real space and time under realistic conditions.] -** Virtual-world [Using technology that creates immersive, computer-generated experiences that a person can interact with and navigate through. The digital content is generally delivered to the user through some type of headset and responds to changes in head position or through interaction with other types of sensors. Existing in a virtual setting such as a simulation or game environment.] -** Augmented-reality [Using technology that enhances real-world experiences with computer-derived digital overlays to change some aspects of perception of the natural environment. The digital content is shown to the user through a smart device or glasses and responds to changes in the environment.] -** Motion-platform [A mechanism that creates the feelings of being in a real motion environment.] -** Urban [Relating to, located in, or characteristic of a city or densely populated area.] -** Rural [Of or pertaining to the country as opposed to the city.] -** Terrain [Characterization of the physical features of a tract of land.] -*** Composite-terrain [Tracts of land characterized by a mixure of physical features.] -*** Dirt-terrain [Tracts of land characterized by a soil surface and lack of vegetation.] -*** Grassy-terrain [Tracts of land covered by grass.] -*** Gravel-terrain [Tracts of land covered by a surface consisting a loose aggregation of small water-worn or pounded stones.] -*** Leaf-covered-terrain [Tracts of land covered by leaves and composited organic material.] -*** Muddy-terrain [Tracts of land covered by a liquid or semi-liquid mixture of water and some combination of soil, silt, and clay.] -*** Paved-terrain [Tracts of land covered with concrete, asphalt, stones, or bricks.] -*** Rocky-terrain [Tracts of land consisting or full of rock or rocks.] -*** Sloped-terrain [Tracts of land arranged in a sloping or inclined position.] -*** Uneven-terrain [Tracts of land that are not level, smooth, or regular.] -* Informational-property {extensionAllowed} [Something that pertains to a task.] -** Description {requireChild} [An explanation of what the tag group it is in means. If the description is at the top-level of an event string, the description applies to the event.] -*** # {takesValue, valueClass=textClass} -** ID {requireChild} [An alphanumeric name that identifies either a unique object or a unique class of objects. Here the object or class may be an idea, physical countable object (or class), or physical uncountable substance (or class).] -*** # {takesValue, valueClass=textClass} -** Label {requireChild} [A string of 20 or fewer characters identifying something. Labels usually refer to general classes of things while IDs refer to specific instances. A term that is associated with some entity. A brief description given for purposes of identification. An identifying or descriptive marker that is attached to an object.] -*** # {takesValue, valueClass=nameClass} -** Metadata [Data about data. Information that describes another set of data.] -*** CogAtlas [The Cognitive Atlas ID number of something.] -**** # {takesValue} -*** CogPo [The CogPO ID number of something.] -**** # {takesValue} -*** Creation-date {requireChild} [The date on which data creation of this element began.] -**** # {takesValue, valueClass=dateTimeClass} -*** Experimental-note [A brief written record about the experiment.] -**** # {takesValue, valueClass=textClass} -*** Library-name [Official name of a HED library.] -**** # {takesValue, valueClass=nameClass} -*** OBO-identifier [The identifier of a term in some Open Biology Ontology (OBO) ontology.] -**** # {takesValue, valueClass=nameClass} -*** Pathname [The specification of a node (file or directory) in a hierarchical file system, usually specified by listing the nodes top-down.] -**** # {takesValue} -*** Subject-identifier [A sequence of characters used to identify, name, or characterize a trial or study subject.] -**** # {takesValue} -*** Version-identifier [An alphanumeric character string that identifies a form or variant of a type or original.] -**** # {takesValue} [Usually is a semantic version.] -** Parameter [Something user-defined for this experiment.] -*** Parameter-label [The name of the parameter.] -**** # {takesValue, valueClass=nameClass} -*** Parameter-value [The value of the parameter.] -**** # {takesValue, valueClass=textClass} -* Organizational-property [Relating to an organization or the action of organizing something.] -** Collection [A tag designating a grouping of items such as in a set or list.] -*** # {takesValue, valueClass=nameClass} [Name of the collection.] -** Condition-variable [An aspect of the experiment or task that is to be varied during the experiment. Task-conditions are sometimes called independent variables or contrasts.] -*** # {takesValue, valueClass=nameClass} [Name of the condition variable.] -** Control-variable [An aspect of the experiment that is fixed throughout the study and usually is explicitly controlled.] -*** # {takesValue, valueClass=nameClass} [Name of the control variable.] -** Def {requireChild} [A HED-specific utility tag used with a defined name to represent the tags associated with that definition.] -*** # {takesValue, valueClass=nameClass} [Name of the definition.] -** Def-expand {requireChild, tagGroup} [A HED specific utility tag that is grouped with an expanded definition. The child value of the Def-expand is the name of the expanded definition.] -*** # {takesValue, valueClass=nameClass} -** Definition {requireChild, topLevelTagGroup} [A HED-specific utility tag whose child value is the name of the concept and the tag group associated with the tag is an English language explanation of a concept.] -*** # {takesValue, valueClass=nameClass} [Name of the definition.] -** Event-context {topLevelTagGroup, unique} [A special HED tag inserted as part of a top-level tag group to contain information about the interrelated conditions under which the event occurs. The event context includes information about other events that are ongoing when this event happens.] -** Event-stream [A special HED tag indicating that this event is a member of an ordered succession of events.] -*** # {takesValue, valueClass=nameClass} [Name of the event stream.] -** Experimental-intertrial [A tag used to indicate a part of the experiment between trials usually where nothing is happening.] -*** # {takesValue, valueClass=nameClass} [Optional label for the intertrial block.] -** Experimental-trial [Designates a run or execution of an activity, for example, one execution of a script. A tag used to indicate a particular organizational part in the experimental design often containing a stimulus-response pair or stimulus-response-feedback triad.] -*** # {takesValue, valueClass=nameClass} [Optional label for the trial (often a numerical string).] -** Indicator-variable [An aspect of the experiment or task that is measured as task conditions are varied during the experiment. Experiment indicators are sometimes called dependent variables.] -*** # {takesValue, valueClass=nameClass} [Name of the indicator variable.] -** Recording [A tag designating the data recording. Recording tags are usually have temporal scope which is the entire recording.] -*** # {takesValue, valueClass=nameClass} [Optional label for the recording.] -** Task [An assigned piece of work, usually with a time allotment. A tag used to indicate a linkage the structured activities performed as part of the experiment.] -*** # {takesValue, valueClass=nameClass} [Optional label for the task block.] -** Time-block [A tag used to indicate a contiguous time block in the experiment during which something is fixed or noted.] -*** # {takesValue, valueClass=nameClass} [Optional label for the task block.] -* Sensory-property [Relating to sensation or the physical senses.] -** Sensory-attribute [A sensory characteristic associated with another entity.] -*** Auditory-attribute [Pertaining to the sense of hearing.] -**** Loudness [Perceived intensity of a sound.] -***** # {takesValue, valueClass=numericClass, valueClass=nameClass} -**** Pitch [A perceptual property that allows the user to order sounds on a frequency scale.] -***** # {takesValue, valueClass=numericClass, unitClass=frequencyUnits} -**** Sound-envelope [Description of how a sound changes over time.] -***** Sound-envelope-attack [The time taken for initial run-up of level from nil to peak usually beginning when the key on a musical instrument is pressed.] -****** # {takesValue, valueClass=numericClass, unitClass=timeUnits} -***** Sound-envelope-decay [The time taken for the subsequent run down from the attack level to the designated sustain level.] -****** # {takesValue, valueClass=numericClass, unitClass=timeUnits} -***** Sound-envelope-release [The time taken for the level to decay from the sustain level to zero after the key is released.] -****** # {takesValue, valueClass=numericClass, unitClass=timeUnits} -***** Sound-envelope-sustain [The time taken for the main sequence of the sound duration, until the key is released.] -****** # {takesValue, valueClass=numericClass, unitClass=timeUnits} -**** Timbre [The perceived sound quality of a singing voice or musical instrument.] -***** # {takesValue, valueClass=nameClass} -**** Sound-volume [The sound pressure level (SPL) usually the ratio to a reference signal estimated as the lower bound of hearing.] -***** # {takesValue, valueClass=numericClass, unitClass=intensityUnits} -*** Gustatory-attribute [Pertaining to the sense of taste.] -**** Bitter [Having a sharp, pungent taste.] -**** Salty [Tasting of or like salt.] -**** Savory [Belonging to a taste that is salty or spicy rather than sweet.] -**** Sour [Having a sharp, acidic taste.] -**** Sweet [Having or resembling the taste of sugar.] -*** Olfactory-attribute [Having a smell.] -*** Somatic-attribute [Pertaining to the feelings in the body or of the nervous system.] -**** Pain [The sensation of discomfort, distress, or agony, resulting from the stimulation of specialized nerve endings.] -**** Stress [The negative mental, emotional, and physical reactions that occur when environmental stressors are perceived as exceeding the adaptive capacities of the individual.] -*** Tactile-attribute [Pertaining to the sense of touch.] -**** Tactile-pressure [Having a feeling of heaviness.] -**** Tactile-temperature [Having a feeling of hotness or coldness.] -**** Tactile-texture [Having a feeling of roughness.] -**** Tactile-vibration [Having a feeling of mechanical oscillation.] -*** Vestibular-attribute [Pertaining to the sense of balance or body position.] -*** Visual-attribute [Pertaining to the sense of sight.] -**** Color [The appearance of objects (or light sources) described in terms of perception of their hue and lightness (or brightness) and saturation.] -***** CSS-color [One of 140 colors supported by all browsers. For more details such as the color RGB or HEX values, check: https://www.w3schools.com/colors/colors_groups.asp.] -****** Blue-color [CSS color group.] -******* CadetBlue [CSS-color 0x5F9EA0.] -******* SteelBlue [CSS-color 0x4682B4.] -******* LightSteelBlue [CSS-color 0xB0C4DE.] -******* LightBlue [CSS-color 0xADD8E6.] -******* PowderBlue [CSS-color 0xB0E0E6.] -******* LightSkyBlue [CSS-color 0x87CEFA.] -******* SkyBlue [CSS-color 0x87CEEB.] -******* CornflowerBlue [CSS-color 0x6495ED.] -******* DeepSkyBlue [CSS-color 0x00BFFF.] -******* DodgerBlue [CSS-color 0x1E90FF.] -******* RoyalBlue [CSS-color 0x4169E1.] -******* Blue [CSS-color 0x0000FF.] -******* MediumBlue [CSS-color 0x0000CD.] -******* DarkBlue [CSS-color 0x00008B.] -******* Navy [CSS-color 0x000080.] -******* MidnightBlue [CSS-color 0x191970.] -****** Brown-color [CSS color group.] -******* Cornsilk [CSS-color 0xFFF8DC.] -******* BlanchedAlmond [CSS-color 0xFFEBCD.] -******* Bisque [CSS-color 0xFFE4C4.] -******* NavajoWhite [CSS-color 0xFFDEAD.] -******* Wheat [CSS-color 0xF5DEB3.] -******* BurlyWood [CSS-color 0xDEB887.] -******* Tan [CSS-color 0xD2B48C.] -******* RosyBrown [CSS-color 0xBC8F8F.] -******* SandyBrown [CSS-color 0xF4A460.] -******* GoldenRod [CSS-color 0xDAA520.] -******* DarkGoldenRod [CSS-color 0xB8860B.] -******* Peru [CSS-color 0xCD853F.] -******* Chocolate [CSS-color 0xD2691E.] -******* Olive [CSS-color 0x808000.] -******* SaddleBrown [CSS-color 0x8B4513.] -******* Sienna [CSS-color 0xA0522D.] -******* Brown [CSS-color 0xA52A2A.] -******* Maroon [CSS-color 0x800000.] -****** Cyan-color [CSS color group.] -******* Aqua [CSS-color 0x00FFFF.] -******* Cyan [CSS-color 0x00FFFF.] -******* LightCyan [CSS-color 0xE0FFFF.] -******* PaleTurquoise [CSS-color 0xAFEEEE.] -******* Aquamarine [CSS-color 0x7FFFD4.] -******* Turquoise [CSS-color 0x40E0D0.] -******* MediumTurquoise [CSS-color 0x48D1CC.] -******* DarkTurquoise [CSS-color 0x00CED1.] -****** Green-color [CSS color group.] -******* GreenYellow [CSS-color 0xADFF2F.] -******* Chartreuse [CSS-color 0x7FFF00.] -******* LawnGreen [CSS-color 0x7CFC00.] -******* Lime [CSS-color 0x00FF00.] -******* LimeGreen [CSS-color 0x32CD32.] -******* PaleGreen [CSS-color 0x98FB98.] -******* LightGreen [CSS-color 0x90EE90.] -******* MediumSpringGreen [CSS-color 0x00FA9A.] -******* SpringGreen [CSS-color 0x00FF7F.] -******* MediumSeaGreen [CSS-color 0x3CB371.] -******* SeaGreen [CSS-color 0x2E8B57.] -******* ForestGreen [CSS-color 0x228B22.] -******* Green [CSS-color 0x008000.] -******* DarkGreen [CSS-color 0x006400.] -******* YellowGreen [CSS-color 0x9ACD32.] -******* OliveDrab [CSS-color 0x6B8E23.] -******* DarkOliveGreen [CSS-color 0x556B2F.] -******* MediumAquaMarine [CSS-color 0x66CDAA.] -******* DarkSeaGreen [CSS-color 0x8FBC8F.] -******* LightSeaGreen [CSS-color 0x20B2AA.] -******* DarkCyan [CSS-color 0x008B8B.] -******* Teal [CSS-color 0x008080.] -****** Gray-color [CSS color group.] -******* Gainsboro [CSS-color 0xDCDCDC.] -******* LightGray [CSS-color 0xD3D3D3.] -******* Silver [CSS-color 0xC0C0C0.] -******* DarkGray [CSS-color 0xA9A9A9.] -******* DimGray [CSS-color 0x696969.] -******* Gray [CSS-color 0x808080.] -******* LightSlateGray [CSS-color 0x778899.] -******* SlateGray [CSS-color 0x708090.] -******* DarkSlateGray [CSS-color 0x2F4F4F.] -******* Black [CSS-color 0x000000.] -****** Orange-color [CSS color group.] -******* Orange [CSS-color 0xFFA500.] -******* DarkOrange [CSS-color 0xFF8C00.] -******* Coral [CSS-color 0xFF7F50.] -******* Tomato [CSS-color 0xFF6347.] -******* OrangeRed [CSS-color 0xFF4500.] -****** Pink-color [CSS color group.] -******* Pink [CSS-color 0xFFC0CB.] -******* LightPink [CSS-color 0xFFB6C1.] -******* HotPink [CSS-color 0xFF69B4.] -******* DeepPink [CSS-color 0xFF1493.] -******* PaleVioletRed [CSS-color 0xDB7093.] -******* MediumVioletRed [CSS-color 0xC71585.] -****** Purple-color [CSS color group.] -******* Lavender [CSS-color 0xE6E6FA.] -******* Thistle [CSS-color 0xD8BFD8.] -******* Plum [CSS-color 0xDDA0DD.] -******* Orchid [CSS-color 0xDA70D6.] -******* Violet [CSS-color 0xEE82EE.] -******* Fuchsia [CSS-color 0xFF00FF.] -******* Magenta [CSS-color 0xFF00FF.] -******* MediumOrchid [CSS-color 0xBA55D3.] -******* DarkOrchid [CSS-color 0x9932CC.] -******* DarkViolet [CSS-color 0x9400D3.] -******* BlueViolet [CSS-color 0x8A2BE2.] -******* DarkMagenta [CSS-color 0x8B008B.] -******* Purple [CSS-color 0x800080.] -******* MediumPurple [CSS-color 0x9370DB.] -******* MediumSlateBlue [CSS-color 0x7B68EE.] -******* SlateBlue [CSS-color 0x6A5ACD.] -******* DarkSlateBlue [CSS-color 0x483D8B.] -******* RebeccaPurple [CSS-color 0x663399.] -******* Indigo [CSS-color 0x4B0082.] -****** Red-color [CSS color group.] -******* LightSalmon [CSS-color 0xFFA07A.] -******* Salmon [CSS-color 0xFA8072.] -******* DarkSalmon [CSS-color 0xE9967A.] -******* LightCoral [CSS-color 0xF08080.] -******* IndianRed [CSS-color 0xCD5C5C.] -******* Crimson [CSS-color 0xDC143C.] -******* Red [CSS-color 0xFF0000.] -******* FireBrick [CSS-color 0xB22222.] -******* DarkRed [CSS-color 0x8B0000.] -****** Yellow-color [CSS color group.] -******* Gold [CSS-color 0xFFD700.] -******* Yellow [CSS-color 0xFFFF00.] -******* LightYellow [CSS-color 0xFFFFE0.] -******* LemonChiffon [CSS-color 0xFFFACD.] -******* LightGoldenRodYellow [CSS-color 0xFAFAD2.] -******* PapayaWhip [CSS-color 0xFFEFD5.] -******* Moccasin [CSS-color 0xFFE4B5.] -******* PeachPuff [CSS-color 0xFFDAB9.] -******* PaleGoldenRod [CSS-color 0xEEE8AA.] -******* Khaki [CSS-color 0xF0E68C.] -******* DarkKhaki [CSS-color 0xBDB76B.] -****** White-color [CSS color group.] -******* White [CSS-color 0xFFFFFF.] -******* Snow [CSS-color 0xFFFAFA.] -******* HoneyDew [CSS-color 0xF0FFF0.] -******* MintCream [CSS-color 0xF5FFFA.] -******* Azure [CSS-color 0xF0FFFF.] -******* AliceBlue [CSS-color 0xF0F8FF.] -******* GhostWhite [CSS-color 0xF8F8FF.] -******* WhiteSmoke [CSS-color 0xF5F5F5.] -******* SeaShell [CSS-color 0xFFF5EE.] -******* Beige [CSS-color 0xF5F5DC.] -******* OldLace [CSS-color 0xFDF5E6.] -******* FloralWhite [CSS-color 0xFFFAF0.] -******* Ivory [CSS-color 0xFFFFF0.] -******* AntiqueWhite [CSS-color 0xFAEBD7.] -******* Linen [CSS-color 0xFAF0E6.] -******* LavenderBlush [CSS-color 0xFFF0F5.] -******* MistyRose [CSS-color 0xFFE4E1.] -***** Color-shade [A slight degree of difference between colors, especially with regard to how light or dark it is or as distinguished from one nearly like it.] -****** Dark-shade [A color tone not reflecting much light.] -****** Light-shade [A color tone reflecting more light.] -***** Grayscale [Using a color map composed of shades of gray, varying from black at the weakest intensity to white at the strongest.] -****** # {takesValue, valueClass=numericClass} [White intensity between 0 and 1.] -***** HSV-color [A color representation that models how colors appear under light.] -****** Hue [Attribute of a visual sensation according to which an area appears to be similar to one of the perceived colors.] -******* # {takesValue, valueClass=numericClass} [Angular value between 0 and 360.] -****** Saturation [Colorfulness of a stimulus relative to its own brightness.] -******* # {takesValue, valueClass=numericClass} [B value of RGB between 0 and 1.] -****** HSV-value [An attribute of a visual sensation according to which an area appears to emit more or less light.] -******* # {takesValue, valueClass=numericClass} -***** RGB-color [A color from the RGB schema.] -****** RGB-red [The red component.] -******* # {takesValue, valueClass=numericClass} [R value of RGB between 0 and 1.] -****** RGB-blue [The blue component.] -******* # {takesValue, valueClass=numericClass} [B value of RGB between 0 and 1.] -****** RGB-green [The green component.] -******* # {takesValue, valueClass=numericClass} [G value of RGB between 0 and 1.] -**** Luminance [A quality that exists by virtue of the luminous intensity per unit area projected in a given direction.] -**** Opacity [A measure of impenetrability to light.] -** Sensory-presentation [The entity has a sensory manifestation.] -*** Auditory-presentation [The sense of hearing is used in the presentation to the user.] -**** Loudspeaker-separation {suggestedTag=Distance} [The distance between two loudspeakers. Grouped with the Distance tag.] -**** Monophonic [Relating to sound transmission, recording, or reproduction involving a single transmission path.] -**** Silent [The absence of ambient audible sound or the state of having ceased to produce sounds.] -**** Stereophonic [Relating to, or constituting sound reproduction involving the use of separated microphones and two transmission channels to achieve the sound separation of a live hearing.] -*** Gustatory-presentation [The sense of taste used in the presentation to the user.] -*** Olfactory-presentation [The sense of smell used in the presentation to the user.] -*** Somatic-presentation [The nervous system is used in the presentation to the user.] -*** Tactile-presentation [The sense of touch used in the presentation to the user.] -*** Vestibular-presentation [The sense balance used in the presentation to the user.] -*** Visual-presentation [The sense of sight used in the presentation to the user.] -**** 2D-view [A view showing only two dimensions.] -**** 3D-view [A view showing three dimensions.] -**** Background-view [Parts of the view that are farthest from the viewer and usually the not part of the visual focus.] -**** Bistable-view [Something having two stable visual forms that have two distinguishable stable forms as in optical illusions.] -**** Foreground-view [Parts of the view that are closest to the viewer and usually the most important part of the visual focus.] -**** Foveal-view [Visual presentation directly on the fovea. A view projected on the small depression in the retina containing only cones and where vision is most acute.] -**** Map-view [A diagrammatic representation of an area of land or sea showing physical features, cities, roads.] -***** Aerial-view [Elevated view of an object from above, with a perspective as though the observer were a bird.] -***** Satellite-view [A representation as captured by technology such as a satellite.] -***** Street-view [A 360-degrees panoramic view from a position on the ground.] -**** Peripheral-view [Indirect vision as it occurs outside the point of fixation.] -* Task-property {extensionAllowed} [Something that pertains to a task.] -** Task-attentional-demand [Strategy for allocating attention toward goal-relevant information.] -*** Bottom-up-attention {relatedTag=Top-down-attention} [Attentional guidance purely by externally driven factors to stimuli that are salient because of their inherent properties relative to the background. Sometimes this is referred to as stimulus driven.] -*** Covert-attention {relatedTag=Overt-attention} [Paying attention without moving the eyes.] -*** Divided-attention {relatedTag=Focused-attention} [Integrating parallel multiple stimuli. Behavior involving responding simultaneously to multiple tasks or multiple task demands.] -*** Focused-attention {relatedTag=Divided-attention} [Responding discretely to specific visual, auditory, or tactile stimuli.] -*** Orienting-attention [Directing attention to a target stimulus.] -*** Overt-attention {relatedTag=Covert-attention} [Selectively processing one location over others by moving the eyes to point at that location.] -*** Selective-attention [Maintaining a behavioral or cognitive set in the face of distracting or competing stimuli. Ability to pay attention to a limited array of all available sensory information.] -*** Sustained-attention [Maintaining a consistent behavioral response during continuous and repetitive activity.] -*** Switched-attention [Having to switch attention between two or more modalities of presentation.] -*** Top-down-attention {relatedTag=Bottom-up-attention} [Voluntary allocation of attention to certain features. Sometimes this is referred to goal-oriented attention.] -** Task-effect-evidence [The evidence supporting the conclusion that the event had the specified effect.] -*** Computational-evidence [A type of evidence in which data are produced, and/or generated, and/or analyzed on a computer.] -*** External-evidence [A phenomenon that follows and is caused by some previous phenomenon.] -*** Intended-effect [A phenomenon that is intended to follow and be caused by some previous phenomenon.] -*** Behavioral-evidence [An indication or conclusion based on the behavior of an agent.] -** Task-event-role [The purpose of an event with respect to the task.] -*** Experimental-stimulus [Part of something designed to elicit a response in the experiment.] -*** Incidental [A sensory or other type of event that is unrelated to the task or experiment.] -*** Instructional [Usually associated with a sensory event intended to give instructions to the participant about the task or behavior.] -*** Mishap [Unplanned disruption such as an equipment or experiment control abnormality or experimenter error.] -*** Participant-response [Something related to a participant actions in performing the task.] -*** Task-activity [Something that is part of the overall task or is necessary to the overall experiment but is not directly part of a stimulus-response cycle. Examples would be taking a survey or provided providing a silva sample.] -*** Warning [Something that should warn the participant that the parameters of the task have been or are about to be exceeded such as a warning message about getting too close to the shoulder of the road in a driving task.] -** Task-action-type [How an agent action should be interpreted in terms of the task specification.] -*** Appropriate-action {relatedTag=Inappropriate-action} [An action suitable or proper in the circumstances.] -*** Correct-action {relatedTag=Incorrect-action, relatedTag=Indeterminate-action} [An action that was a correct response in the context of the task.] -*** Correction [An action offering an improvement to replace a mistake or error.] -*** Done-indication {relatedTag=Ready-indication} [An action that indicates that the participant has completed this step in the task.] -*** Incorrect-action {relatedTag=Correct-action, relatedTag=Indeterminate-action} [An action considered wrong or incorrect in the context of the task.] -*** Imagined-action [Form a mental image or concept of something. This is used to identity something that only happened in the imagination of the participant as in imagined movements in motor imagery paradigms.] -*** Inappropriate-action {relatedTag=Appropriate-action} [An action not in keeping with what is correct or proper for the task.] -*** Indeterminate-action {relatedTag=Correct-action, relatedTag=Incorrect-action, relatedTag=Miss, relatedTag=Near-miss} [An action that cannot be distinguished between two or more possibibities in the current context. This tag might be applied when an outside evaluator or a classification algorithm cannot determine a definitive result.] -*** Omitted-action [An expected response was skipped.] -*** Miss {relatedTag=Near-miss} [An action considered to be a failure in the context of the task. For example, if the agent is supposed to try to hit a target and misses.] -*** Near-miss {relatedTag=Miss} [An action barely satisfied the requirements of the task. In a driving experiment for example this could pertain to a narrowly avoided collision or other accident.] -*** Ready-indication {relatedTag=Done-indication} [An action that indicates that the participant is ready to perform the next step in the task.] -** Task-relationship [Specifying organizational importance of sub-tasks.] -*** Background-subtask [A part of the task which should be performed in the background as for example inhibiting blinks due to instruction while performing the primary task.] -*** Primary-subtask [A part of the task which should be the primary focus of the participant.] -** Task-stimulus-role [The role the stimulus plays in the task.] -*** Cue [A signal for an action, a pattern of stimuli indicating a particular response.] -*** Distractor [A person or thing that distracts or a plausible but incorrect option in a multiple-choice question. In pyschological studies this is sometimes referred to as a foil.] -*** Expected {relatedTag=Unexpected, suggestedTag=Target} [Considered likely, probable or anticipated. Something of low information value as in frequent non-targets in an RSVP paradigm.] -*** Extraneous [Irrelevant or unrelated to the subject being dealt with.] -*** Feedback [An evaluative response to an inquiry, process, event, or activity.] -*** Go-signal {relatedTag=Stop-signal} [An indicator to proceed with a planned action.] -*** Meaningful [Conveying significant or relevant information.] -*** Newly-learned [Representing recently acquired information or understanding.] -*** Non-informative [Something that is not useful in forming an opinion or judging an outcome.] -*** Non-target {relatedTag=Target} [Something other than that done or looked for. Also tag Expected if the Non-target is frequent.] -*** Not-meaningful [Not having a serious, important, or useful quality or purpose.] -*** Novel [Having no previous example or precedent or parallel.] -*** Oddball {relatedTag=Unexpected, suggestedTag=Target} [Something unusual, or infrequent.] -*** Planned {relatedTag=Unplanned} [Something that was decided on or arranged in advance.] -*** Penalty [A disadvantage, loss, or hardship due to some action.] -*** Priming [An implicit memory effect in which exposure to a stimulus influences response to a later stimulus.] -*** Query [A sentence of inquiry that asks for a reply.] -*** Reward [A positive reinforcement for a desired action, behavior or response.] -*** Stop-signal {relatedTag=Go-signal} [An indicator that the agent should stop the current activity.] -*** Target [Something fixed as a goal, destination, or point of examination.] -*** Threat [An indicator that signifies hostility and predicts an increased probability of attack.] -*** Timed [Something planned or scheduled to be done at a particular time or lasting for a specified amount of time.] -*** Unexpected {relatedTag=Expected} [Something that is not anticipated.] -*** Unplanned {relatedTag=Planned} [Something that has not been planned as part of the task.] + * Agent-property {extensionAllowed} [Something that pertains to an agent.] + ** Agent-state [The state of the agent.] + *** Agent-cognitive-state [The state of the cognitive processes or state of mind of the agent.] + **** Alert [Condition of heightened watchfulness or preparation for action.] + **** Anesthetized [Having lost sensation to pain or having senses dulled due to the effects of an anesthetic.] + **** Asleep [Having entered a periodic, readily reversible state of reduced awareness and metabolic activity, usually accompanied by physical relaxation and brain activity.] + **** Attentive [Concentrating and focusing mental energy on the task or surroundings.] + **** Distracted [Lacking in concentration because of being preoccupied.] + **** Awake [In a non sleeping state.] + **** Brain-dead [Characterized by the irreversible absence of cortical and brain stem functioning.] + **** Comatose [In a state of profound unconsciousness associated with markedly depressed cerebral activity.] + **** Drowsy [In a state of near-sleep, a strong desire for sleep, or sleeping for unusually long periods.] + **** Intoxicated [In a state with disturbed psychophysiological functions and responses as a result of administration or ingestion of a psychoactive substance.] + **** Locked-in [In a state of complete paralysis of all voluntary muscles except for the ones that control the movements of the eyes.] + **** Passive [Not responding or initiating an action in response to a stimulus.] + **** Resting [A state in which the agent is not exhibiting any physical exertion.] + **** Vegetative [A state of wakefulness and conscience, but (in contrast to coma) with involuntary opening of the eyes and movements (such as teeth grinding, yawning, or thrashing of the extremities).] + *** Agent-emotional-state [The status of the general temperament and outlook of an agent.] + **** Angry [Experiencing emotions characterized by marked annoyance or hostility.] + **** Aroused [In a state reactive to stimuli leading to increased heart rate and blood pressure, sensory alertness, mobility and readiness to respond.] + **** Awed [Filled with wonder. Feeling grand, sublime or powerful emotions characterized by a combination of joy, fear, admiration, reverence, and/or respect.] + **** Compassionate [Feeling or showing sympathy and concern for others often evoked for a person who is in distress and associated with altruistic motivation.] + **** Content [Feeling satisfaction with things as they are.] + **** Disgusted [Feeling revulsion or profound disapproval aroused by something unpleasant or offensive.] + **** Emotionally-neutral [Feeling neither satisfied nor dissatisfied.] + **** Empathetic [Understanding and sharing the feelings of another. Being aware of, being sensitive to, and vicariously experiencing the feelings, thoughts, and experience of another.] + **** Excited [Feeling great enthusiasm and eagerness.] + **** Fearful [Feeling apprehension that one may be in danger.] + **** Frustrated [Feeling annoyed as a result of being blocked, thwarted, disappointed or defeated.] + **** Grieving [Feeling sorrow in response to loss, whether physical or abstract.] + **** Happy [Feeling pleased and content.] + **** Jealous [Feeling threatened by a rival in a relationship with another individual, in particular an intimate partner, usually involves feelings of threat, fear, suspicion, distrust, anxiety, anger, betrayal, and rejection.] + **** Joyful [Feeling delight or intense happiness.] + **** Loving [Feeling a strong positive emotion of affection and attraction.] + **** Relieved [No longer feeling pain, distress, anxiety, or reassured.] + **** Sad [Feeling grief or unhappiness.] + **** Stressed [Experiencing mental or emotional strain or tension.] + *** Agent-physiological-state [Having to do with the mechanical, physical, or biochemical function of an agent.] + **** Healthy {relatedTag=Sick} [Having no significant health-related issues.] + **** Hungry {relatedTag=Sated, relatedTag=Thirsty} [Being in a state of craving or desiring food.] + **** Rested {relatedTag=Tired} [Feeling refreshed and relaxed.] + **** Sated {relatedTag=Hungry} [Feeling full.] + **** Sick {relatedTag=Healthy} [Being in a state of ill health, bodily malfunction, or discomfort.] + **** Thirsty {relatedTag=Hungry} [Feeling a need to drink.] + **** Tired {relatedTag=Rested} [Feeling in need of sleep or rest.] + *** Agent-postural-state [Pertaining to the position in which agent holds their body.] + **** Crouching [Adopting a position where the knees are bent and the upper body is brought forward and down, sometimes to avoid detection or to defend oneself.] + **** Eyes-closed [Keeping eyes closed with no blinking.] + **** Eyes-open [Keeping eyes open with occasional blinking.] + **** Kneeling [Positioned where one or both knees are on the ground.] + **** On-treadmill [Ambulation on an exercise apparatus with an endless moving belt to support moving in place.] + **** Prone [Positioned in a recumbent body position whereby the person lies on its stomach and faces downward.] + **** Sitting [In a seated position.] + **** Standing [Assuming or maintaining an erect upright position.] + **** Seated-with-chin-rest [Using a device that supports the chin and head.] + ** Agent-task-role [The function or part that is ascribed to an agent in performing the task.] + *** Experiment-actor [An agent who plays a predetermined role to create the experiment scenario.] + *** Experiment-controller [An agent exerting control over some aspect of the experiment.] + *** Experiment-participant [Someone who takes part in an activity related to an experiment.] + *** Experimenter [Person who is the owner of the experiment and has its responsibility.] + ** Agent-trait [A genetically, environmentally, or socially determined characteristic of an agent.] + *** Age [Length of time elapsed time since birth of the agent.] + **** # {takesValue, valueClass=numericClass} + *** Agent-experience-level [Amount of skill or knowledge that the agent has as pertains to the task.] + **** Expert-level {relatedTag=Intermediate-experience-level, relatedTag=Novice-level} [Having comprehensive and authoritative knowledge of or skill in a particular area related to the task.] + **** Intermediate-experience-level {relatedTag=Expert-level, relatedTag=Novice-level} [Having a moderate amount of knowledge or skill related to the task.] + **** Novice-level {relatedTag=Expert-level, relatedTag=Intermediate-experience-level} [Being inexperienced in a field or situation related to the task.] + *** Gender [Characteristics that are socially constructed, including norms, behaviors, and roles based on sex.] + *** Sex [Physical properties or qualities by which male is distinguished from female.] + **** Female [Biological sex of an individual with female sexual organs such ova.] + **** Male [Biological sex of an individual with male sexual organs producing sperm.] + **** Intersex [Having genitalia and/or secondary sexual characteristics of indeterminate sex.] + *** Ethnicity [Belong to a social group that has a common national or cultural tradition. Use with Label to avoid extension.] + *** Handedness [Individual preference for use of a hand, known as the dominant hand.] + **** Left-handed [Preference for using the left hand or foot for tasks requiring the use of a single hand or foot.] + **** Right-handed [Preference for using the right hand or foot for tasks requiring the use of a single hand or foot.] + **** Ambidextrous [Having no overall dominance in the use of right or left hand or foot in the performance of tasks that require one hand or foot.] + *** Race [Belonging to a group sharing physical or social qualities as defined within a specified society. Use with Label to avoid extension.] + * Data-property {extensionAllowed} [Something that pertains to data or information.] + ** Data-marker [An indicator placed to mark something.] + *** Data-break-marker [An indicator place to indicate a gap in the data.] + *** Temporal-marker [An indicator placed at a particular time in the data.] + **** Inset {topLevelTagGroup, reserved, relatedTag=Onset, relatedTag=Offset} [Marks an intermediate point in an ongoing event of temporal extent.] + **** Onset {topLevelTagGroup, reserved, relatedTag=Inset, relatedTag=Offset} [Marks the start of an ongoing event of temporal extent.] + **** Offset {topLevelTagGroup, reserved, relatedTag=Onset, relatedTag=Inset} [Marks the end of an event of temporal extent.] + **** Pause [Indicates the temporary interruption of the operation a process and subsequently wait for a signal to continue.] + **** Time-out [A cancellation or cessation that automatically occurs when a predefined interval of time has passed without a certain event occurring.] + **** Time-sync [A synchronization signal whose purpose to help synchronize different signals or processes. Often used to indicate a marker inserted into the recorded data to allow post hoc synchronization of concurrently recorded data streams.] + ** Data-resolution [Smallest change in a quality being measured by an sensor that causes a perceptible change.] + *** Printer-resolution [Resolution of a printer, usually expressed as the number of dots-per-inch for a printer.] + **** # {takesValue, valueClass=numericClass} + *** Screen-resolution [Resolution of a screen, usually expressed as the of pixels in a dimension for a digital display device.] + **** # {takesValue, valueClass=numericClass} + *** Sensory-resolution [Resolution of measurements by a sensing device.] + **** # {takesValue, valueClass=numericClass} + *** Spatial-resolution [Linear spacing of a spatial measurement.] + **** # {takesValue, valueClass=numericClass} + *** Spectral-resolution [Measures the ability of a sensor to resolve features in the electromagnetic spectrum.] + **** # {takesValue, valueClass=numericClass} + *** Temporal-resolution [Measures the ability of a sensor to resolve features in time.] + **** # {takesValue, valueClass=numericClass} + ** Data-source-type [The type of place, person, or thing from which the data comes or can be obtained.] + *** Computed-feature [A feature computed from the data by a tool. This tag should be grouped with a label of the form Toolname_propertyName.] + *** Computed-prediction [A computed extrapolation of known data.] + *** Expert-annotation [An explanatory or critical comment or other in-context information provided by an authority.] + *** Instrument-measurement [Information obtained from a device that is used to measure material properties or make other observations.] + *** Observation [Active acquisition of information from a primary source. Should be grouped with a label of the form AgentID_featureName.] + ** Data-value [Designation of the type of a data item.] + *** Categorical-value [Indicates that something can take on a limited and usually fixed number of possible values.] + **** Categorical-class-value [Categorical values that fall into discrete classes such as true or false. The grouping is absolute in the sense that it is the same for all participants.] + ***** All {relatedTag=Some, relatedTag=None} [To a complete degree or to the full or entire extent.] + ***** Correct {relatedTag=Wrong} [Free from error. Especially conforming to fact or truth.] + ***** Explicit {relatedTag=Implicit} [Stated clearly and in detail, leaving no room for confusion or doubt.] + ***** False {relatedTag=True} [Not in accordance with facts, reality or definitive criteria.] + ***** Implicit {relatedTag=Explicit} [Implied though not plainly expressed.] + ***** Invalid {relatedTag=Valid} [Not allowed or not conforming to the correct format or specifications.] + ***** None {relatedTag=All, relatedTag=Some} [No person or thing, nobody, not any.] + ***** Some {relatedTag=All, relatedTag=None} [At least a small amount or number of, but not a large amount of, or often.] + ***** True {relatedTag=False} [Conforming to facts, reality or definitive criteria.] + ***** Valid {relatedTag=Invalid} [Allowable, usable, or acceptable.] + ***** Wrong {relatedTag=Correct} [Inaccurate or not correct.] + **** Categorical-judgment-value [Categorical values that are based on the judgment or perception of the participant such familiar and famous.] + ***** Abnormal {relatedTag=Normal} [Deviating in any way from the state, position, structure, condition, behavior, or rule which is considered a norm.] + ***** Asymmetrical {relatedTag=Symmetrical} [Lacking symmetry or having parts that fail to correspond to one another in shape, size, or arrangement.] + ***** Audible {relatedTag=Inaudible} [A sound that can be perceived by the participant.] + ***** Congruent {relatedTag=Incongruent} [Concordance of multiple evidence lines. In agreement or harmony.] + ***** Complex {relatedTag=Simple} [Hard, involved or complicated, elaborate, having many parts.] + ***** Constrained {relatedTag=Unconstrained} [Keeping something within particular limits or bounds.] + ***** Disordered {relatedTag=Ordered} [Not neatly arranged. Confused and untidy. A structural quality in which the parts of an object are non-rigid.] + ***** Familiar {relatedTag=Unfamiliar, relatedTag=Famous} [Recognized, familiar, or within the scope of knowledge.] + ***** Famous {relatedTag=Familiar, relatedTag=Unfamiliar} [A person who has a high degree of recognition by the general population for his or her success or accomplishments. A famous person.] + ***** Inaudible {relatedTag=Audible} [A sound below the threshold of perception of the participant.] + ***** Incongruent {relatedTag=Congruent} [Not in agreement or harmony.] + ***** Involuntary {relatedTag=Voluntary} [An action that is not made by choice. In the body, involuntary actions (such as blushing) occur automatically, and cannot be controlled by choice.] + ***** Masked {relatedTag=Unmasked} [Information exists but is not provided or is partially obscured due to security, privacy, or other concerns.] + ***** Normal {relatedTag=Abnormal} [Being approximately average or within certain limits. Conforming with or constituting a norm or standard or level or type or social norm.] + ***** Ordered {relatedTag=Disordered} [Conforming to a logical or comprehensible arrangement of separate elements.] + ***** Simple {relatedTag=Complex} [Easily understood or presenting no difficulties.] + ***** Symmetrical {relatedTag=Asymmetrical} [Made up of exactly similar parts facing each other or around an axis. Showing aspects of symmetry.] + ***** Unconstrained {relatedTag=Constrained} [Moving without restriction.] + ***** Unfamiliar {relatedTag=Familiar, relatedTag=Famous} [Not having knowledge or experience of.] + ***** Unmasked {relatedTag=Masked} [Information is revealed.] + ***** Voluntary {relatedTag=Involuntary} [Using free will or design; not forced or compelled; controlled by individual volition.] + **** Categorical-level-value [Categorical values based on dividing a continuous variable into levels such as high and low.] + ***** Cold {relatedTag=Hot} [Having an absence of heat.] + ***** Deep {relatedTag=Shallow} [Extending relatively far inward or downward.] + ***** High {relatedTag=Low, relatedTag=Medium} [Having a greater than normal degree, intensity, or amount.] + ***** Hot {relatedTag=Cold} [Having an excess of heat.] + ***** Large {relatedTag=Small} [Having a great extent such as in physical dimensions, period of time, amplitude or frequency.] + ***** Liminal {relatedTag=Subliminal, relatedTag=Supraliminal} [Situated at a sensory threshold that is barely perceptible or capable of eliciting a response.] + ***** Loud {relatedTag=Quiet} [Having a perceived high intensity of sound.] + ***** Low {relatedTag=High} [Less than normal in degree, intensity or amount.] + ***** Medium {relatedTag=Low, relatedTag=High} [Mid-way between small and large in number, quantity, magnitude or extent.] + ***** Negative {relatedTag=Positive} [Involving disadvantage or harm.] + ***** Positive {relatedTag=Negative} [Involving advantage or good.] + ***** Quiet {relatedTag=Loud} [Characterizing a perceived low intensity of sound.] + ***** Rough {relatedTag=Smooth} [Having a surface with perceptible bumps, ridges, or irregularities.] + ***** Shallow {relatedTag=Deep} [Having a depth which is relatively low.] + ***** Small {relatedTag=Large} [Having a small extent such as in physical dimensions, period of time, amplitude or frequency.] + ***** Smooth {relatedTag=Rough} [Having a surface free from bumps, ridges, or irregularities.] + ***** Subliminal {relatedTag=Liminal, relatedTag=Supraliminal} [Situated below a sensory threshold that is imperceptible or not capable of eliciting a response.] + ***** Supraliminal {relatedTag=Liminal, relatedTag=Subliminal} [Situated above a sensory threshold that is perceptible or capable of eliciting a response.] + ***** Thick {relatedTag=Thin} [Wide in width, extent or cross-section.] + ***** Thin {relatedTag=Thick} [Narrow in width, extent or cross-section.] + **** Categorical-orientation-value [Value indicating the orientation or direction of something.] + ***** Backward {relatedTag=Forward} [Directed behind or to the rear.] + ***** Downward {relatedTag=Leftward, relatedTag=Rightward, relatedTag=Upward} [Moving or leading toward a lower place or level.] + ***** Forward {relatedTag=Backward} [At or near or directed toward the front.] + ***** Horizontally-oriented {relatedTag=Vertically-oriented} [Oriented parallel to or in the plane of the horizon.] + ***** Leftward {relatedTag=Downward, relatedTag=Rightward, relatedTag=Upward} [Going toward or facing the left.] + ***** Oblique {relatedTag=Rotated} [Slanting or inclined in direction, course, or position that is neither parallel nor perpendicular nor right-angular.] + ***** Rightward {relatedTag=Downward, relatedTag=Leftward, relatedTag=Upward} [Going toward or situated on the right.] + ***** Rotated [Positioned offset around an axis or center.] + ***** Upward {relatedTag=Downward, relatedTag=Leftward, relatedTag=Rightward} [Moving, pointing, or leading to a higher place, point, or level.] + ***** Vertically-oriented {relatedTag=Horizontally-oriented} [Oriented perpendicular to the plane of the horizon.] + *** Physical-value [The value of some physical property of something.] + **** Weight [The relative mass or the quantity of matter contained by something.] + ***** # {takesValue, valueClass=numericClass, unitClass=weightUnits} + **** Temperature [A measure of hot or cold based on the average kinetic energy of the atoms or molecules in the system.] + ***** # {takesValue, valueClass=numericClass, unitClass=temperatureUnits} + *** Quantitative-value [Something capable of being estimated or expressed with numeric values.] + **** Fraction [A numerical value between 0 and 1.] + ***** # {takesValue, valueClass=numericClass} + **** Item-count [The integer count of something which is usually grouped with the entity it is counting. (Item-count/3, A) indicates that 3 of A have occurred up to this point.] + ***** # {takesValue, valueClass=numericClass} + **** Item-index [The index of an item in a collection, sequence or other structure. (A (Item-index/3, B)) means that A is item number 3 in B.] + ***** # {takesValue, valueClass=numericClass} + **** Item-interval [An integer indicating how many items or entities have passed since the last one of these. An item interval of 0 indicates the current item.] + ***** # {takesValue, valueClass=numericClass} + **** Percentage [A fraction or ratio with 100 understood as the denominator.] + ***** # {takesValue, valueClass=numericClass} + **** Ratio [A quotient of quantities of the same kind for different components within the same system.] + ***** # {takesValue, valueClass=numericClass} + *** Statistical-value {extensionAllowed} [A value based on or employing the principles of statistics.] + **** Data-maximum [The largest possible quantity or degree.] + ***** # {takesValue, valueClass=numericClass} + **** Data-mean [The sum of a set of values divided by the number of values in the set.] + ***** # {takesValue, valueClass=numericClass} + **** Data-median [The value which has an equal number of values greater and less than it.] + ***** # {takesValue, valueClass=numericClass} + **** Data-minimum [The smallest possible quantity.] + ***** # {takesValue, valueClass=numericClass} + **** Probability [A measure of the expectation of the occurrence of a particular event.] + ***** # {takesValue, valueClass=numericClass} + **** Standard-deviation [A measure of the range of values in a set of numbers. Standard deviation is a statistic used as a measure of the dispersion or variation in a distribution, equal to the square root of the arithmetic mean of the squares of the deviations from the arithmetic mean.] + ***** # {takesValue, valueClass=numericClass} + **** Statistical-accuracy [A measure of closeness to true value expressed as a number between 0 and 1.] + ***** # {takesValue, valueClass=numericClass} + **** Statistical-precision [A quantitative representation of the degree of accuracy necessary for or associated with a particular action.] + ***** # {takesValue, valueClass=numericClass} + **** Statistical-recall [Sensitivity is a measurement datum qualifying a binary classification test and is computed by substracting the false negative rate to the integral numeral 1.] + ***** # {takesValue, valueClass=numericClass} + **** Statistical-uncertainty [A measure of the inherent variability of repeated observation measurements of a quantity including quantities evaluated by statistical methods and by other means.] + ***** # {takesValue, valueClass=numericClass} + *** Spatiotemporal-value [A property relating to space and/or time.] + **** Rate-of-change [The amount of change accumulated per unit time.] + ***** Acceleration [Magnitude of the rate of change in either speed or direction. The direction of change should be given separately.] + ****** # {takesValue, valueClass=numericClass, unitClass=accelerationUnits} + ***** Frequency [Frequency is the number of occurrences of a repeating event per unit time.] + ****** # {takesValue, valueClass=numericClass, unitClass=frequencyUnits} + ***** Jerk-rate [Magnitude of the rate at which the acceleration of an object changes with respect to time. The direction of change should be given separately.] + ****** # {takesValue, valueClass=numericClass, unitClass=jerkUnits} + ***** Sampling-rate [The number of digital samples taken or recorded per unit of time.] + ****** # {takesValue, unitClass=frequencyUnits} + ***** Refresh-rate [The frequency with which the image on a computer monitor or similar electronic display screen is refreshed, usually expressed in hertz.] + ****** # {takesValue, valueClass=numericClass} + ***** Speed [A scalar measure of the rate of movement of the object expressed either as the distance travelled divided by the time taken (average speed) or the rate of change of position with respect to time at a particular point (instantaneous speed). The direction of change should be given separately.] + ****** # {takesValue, valueClass=numericClass, unitClass=speedUnits} + ***** Temporal-rate [The number of items per unit of time.] + ****** # {takesValue, valueClass=numericClass, unitClass=frequencyUnits} + **** Spatial-value [Value of an item involving space.] + ***** Angle [The amount of inclination of one line to another or the plane of one object to another.] + ****** # {takesValue, unitClass=angleUnits, valueClass=numericClass} + ***** Distance [A measure of the space separating two objects or points.] + ****** # {takesValue, valueClass=numericClass, unitClass=physicalLengthUnits} + ***** Position [A reference to the alignment of an object, a particular situation or view of a situation, or the location of an object. Coordinates with respect a specified frame of reference or the default Screen-frame if no frame is given.] + ****** X-position [The position along the x-axis of the frame of reference.] + ******* # {takesValue, valueClass=numericClass, unitClass=physicalLengthUnits} + ****** Y-position [The position along the y-axis of the frame of reference.] + ******* # {takesValue, valueClass=numericClass, unitClass=physicalLengthUnits} + ****** Z-position [The position along the z-axis of the frame of reference.] + ******* # {takesValue, valueClass=numericClass, unitClass=physicalLengthUnits} + ***** Size [The physical magnitude of something.] + ****** Area [The extent of a 2-dimensional surface enclosed within a boundary.] + ******* # {takesValue, valueClass=numericClass, unitClass=areaUnits} + ****** Depth [The distance from the surface of something especially from the perspective of looking from the front.] + ******* # {takesValue, valueClass=numericClass, unitClass=physicalLengthUnits} + ****** Length [The linear extent in space from one end of something to the other end, or the extent of something from beginning to end.] + ******* # {takesValue, valueClass=numericClass, unitClass=physicalLengthUnits} + ****** Width [The extent or measurement of something from side to side.] + ******* # {takesValue, valueClass=numericClass, unitClass=physicalLengthUnits} + ****** Height [The vertical measurement or distance from the base to the top of an object.] + ******* # {takesValue, valueClass=numericClass, unitClass=physicalLengthUnits} + ****** Volume [The amount of three dimensional space occupied by an object or the capacity of a space or container.] + ******* # {takesValue, valueClass=numericClass, unitClass=volumeUnits} + **** Temporal-value [A characteristic of or relating to time or limited by time.] + ***** Delay {topLevelTagGroup, reserved, relatedTag=Duration} [The time at which an event start time is delayed from the current onset time. This tag defines the start time of an event of temporal extent and may be used with the Duration tag.] + ****** # {takesValue, valueClass=numericClass, unitClass=timeUnits} + ***** Duration {topLevelTagGroup, reserved, relatedTag=Delay} [The period of time during which an event occurs. This tag defines the end time of an event of temporal extent and may be used with the Delay tag.] + ****** # {takesValue, valueClass=numericClass, unitClass=timeUnits} + ***** Time-interval [The period of time separating two instances, events, or occurrences.] + ****** # {takesValue, valueClass=numericClass, unitClass=timeUnits} + ***** Time-value [A value with units of time. Usually grouped with tags identifying what the value represents.] + ****** # {takesValue, valueClass=numericClass, unitClass=timeUnits} + ** Data-variability-attribute [An attribute describing how something changes or varies.] + *** Abrupt [Marked by sudden change.] + *** Constant [Continually recurring or continuing without interruption. Not changing in time or space.] + *** Continuous {relatedTag=Discrete, relatedTag=Discontinuous} [Uninterrupted in time, sequence, substance, or extent.] + *** Decreasing {relatedTag=Increasing} [Becoming smaller or fewer in size, amount, intensity, or degree.] + *** Deterministic {relatedTag=Random, relatedTag=Stochastic} [No randomness is involved in the development of the future states of the element.] + *** Discontinuous {relatedTag=Continuous} [Having a gap in time, sequence, substance, or extent.] + *** Discrete {relatedTag=Continuous, relatedTag=Discontinuous} [Constituting a separate entities or parts.] + *** Flickering [Moving irregularly or unsteadily or burning or shining fitfully or with a fluctuating light.] + *** Estimated-value [Something that has been calculated or measured approximately.] + *** Exact-value [A value that is viewed to the true value according to some standard.] + *** Fractal [Having extremely irregular curves or shapes for which any suitably chosen part is similar in shape to a given larger or smaller part when magnified or reduced to the same size.] + *** Increasing {relatedTag=Decreasing} [Becoming greater in size, amount, or degree.] + *** Random {relatedTag=Deterministic, relatedTag=Stochastic} [Governed by or depending on chance. Lacking any definite plan or order or purpose.] + *** Repetitive [A recurring action that is often non-purposeful.] + *** Stochastic {relatedTag=Deterministic, relatedTag=Random} [Uses a random probability distribution or pattern that may be analysed statistically but may not be predicted precisely to determine future states.] + *** Varying [Differing in size, amount, degree, or nature.] + * Environmental-property [Relating to or arising from the surroundings of an agent.] + ** Indoors [Located inside a building or enclosure.] + ** Outdoors [Any area outside a building or shelter.] + ** Real-world [Located in a place that exists in real space and time under realistic conditions.] + ** Virtual-world [Using technology that creates immersive, computer-generated experiences that a person can interact with and navigate through. The digital content is generally delivered to the user through some type of headset and responds to changes in head position or through interaction with other types of sensors. Existing in a virtual setting such as a simulation or game environment.] + ** Augmented-reality [Using technology that enhances real-world experiences with computer-derived digital overlays to change some aspects of perception of the natural environment. The digital content is shown to the user through a smart device or glasses and responds to changes in the environment.] + ** Motion-platform [A mechanism that creates the feelings of being in a real motion environment.] + ** Urban [Relating to, located in, or characteristic of a city or densely populated area.] + ** Rural [Of or pertaining to the country as opposed to the city.] + ** Terrain [Characterization of the physical features of a tract of land.] + *** Composite-terrain [Tracts of land characterized by a mixure of physical features.] + *** Dirt-terrain [Tracts of land characterized by a soil surface and lack of vegetation.] + *** Grassy-terrain [Tracts of land covered by grass.] + *** Gravel-terrain [Tracts of land covered by a surface consisting a loose aggregation of small water-worn or pounded stones.] + *** Leaf-covered-terrain [Tracts of land covered by leaves and composited organic material.] + *** Muddy-terrain [Tracts of land covered by a liquid or semi-liquid mixture of water and some combination of soil, silt, and clay.] + *** Paved-terrain [Tracts of land covered with concrete, asphalt, stones, or bricks.] + *** Rocky-terrain [Tracts of land consisting or full of rock or rocks.] + *** Sloped-terrain [Tracts of land arranged in a sloping or inclined position.] + *** Uneven-terrain [Tracts of land that are not level, smooth, or regular.] + * Informational-property {extensionAllowed} [Something that pertains to a task.] + ** Description {requireChild} [An explanation of what the tag group it is in means. If the description is at the top-level of an event string, the description applies to the event.] + *** # {takesValue, valueClass=textClass} + ** ID {requireChild} [An alphanumeric name that identifies either a unique object or a unique class of objects. Here the object or class may be an idea, physical countable object (or class), or physical uncountable substance (or class).] + *** # {takesValue, valueClass=textClass} + ** Label {requireChild} [A string of 20 or fewer characters identifying something. Labels usually refer to general classes of things while IDs refer to specific instances. A term that is associated with some entity. A brief description given for purposes of identification. An identifying or descriptive marker that is attached to an object.] + *** # {takesValue, valueClass=nameClass} + ** Metadata [Data about data. Information that describes another set of data.] + *** CogAtlas [The Cognitive Atlas ID number of something.] + **** # {takesValue} + *** CogPo [The CogPO ID number of something.] + **** # {takesValue} + *** Creation-date {requireChild} [The date on which data creation of this element began.] + **** # {takesValue, valueClass=dateTimeClass} + *** Experimental-note [A brief written record about the experiment.] + **** # {takesValue, valueClass=textClass} + *** Library-name [Official name of a HED library.] + **** # {takesValue, valueClass=nameClass} + *** OBO-identifier [The identifier of a term in some Open Biology Ontology (OBO) ontology.] + **** # {takesValue, valueClass=nameClass} + *** Pathname [The specification of a node (file or directory) in a hierarchical file system, usually specified by listing the nodes top-down.] + **** # {takesValue} + *** Subject-identifier [A sequence of characters used to identify, name, or characterize a trial or study subject.] + **** # {takesValue} + *** Version-identifier [An alphanumeric character string that identifies a form or variant of a type or original.] + **** # {takesValue} [Usually is a semantic version.] + ** Parameter [Something user-defined for this experiment.] + *** Parameter-label [The name of the parameter.] + **** # {takesValue, valueClass=nameClass} + *** Parameter-value [The value of the parameter.] + **** # {takesValue, valueClass=textClass} + * Organizational-property [Relating to an organization or the action of organizing something.] + ** Collection [A tag designating a grouping of items such as in a set or list.] + *** # {takesValue, valueClass=nameClass} [Name of the collection.] + ** Condition-variable [An aspect of the experiment or task that is to be varied during the experiment. Task-conditions are sometimes called independent variables or contrasts.] + *** # {takesValue, valueClass=nameClass} [Name of the condition variable.] + ** Control-variable [An aspect of the experiment that is fixed throughout the study and usually is explicitly controlled.] + *** # {takesValue, valueClass=nameClass} [Name of the control variable.] + ** Def {requireChild, reserved} [A HED-specific utility tag used with a defined name to represent the tags associated with that definition.] + *** # {takesValue, valueClass=nameClass} [Name of the definition.] + ** Def-expand {requireChild, reserved, tagGroup} [A HED specific utility tag that is grouped with an expanded definition. The child value of the Def-expand is the name of the expanded definition.] + *** # {takesValue, valueClass=nameClass} + ** Definition {requireChild, reserved, topLevelTagGroup} [A HED-specific utility tag whose child value is the name of the concept and the tag group associated with the tag is an English language explanation of a concept.] + *** # {takesValue, valueClass=nameClass} [Name of the definition.] + ** Event-context {reserved, topLevelTagGroup, unique} [A special HED tag inserted as part of a top-level tag group to contain information about the interrelated conditions under which the event occurs. The event context includes information about other events that are ongoing when this event happens.] + ** Event-stream [A special HED tag indicating that this event is a member of an ordered succession of events.] + *** # {takesValue, valueClass=nameClass} [Name of the event stream.] + ** Experimental-intertrial [A tag used to indicate a part of the experiment between trials usually where nothing is happening.] + *** # {takesValue, valueClass=nameClass} [Optional label for the intertrial block.] + ** Experimental-trial [Designates a run or execution of an activity, for example, one execution of a script. A tag used to indicate a particular organizational part in the experimental design often containing a stimulus-response pair or stimulus-response-feedback triad.] + *** # {takesValue, valueClass=nameClass} [Optional label for the trial (often a numerical string).] + ** Indicator-variable [An aspect of the experiment or task that is measured as task conditions are varied during the experiment. Experiment indicators are sometimes called dependent variables.] + *** # {takesValue, valueClass=nameClass} [Name of the indicator variable.] + ** Recording [A tag designating the data recording. Recording tags are usually have temporal scope which is the entire recording.] + *** # {takesValue, valueClass=nameClass} [Optional label for the recording.] + ** Task [An assigned piece of work, usually with a time allotment. A tag used to indicate a linkage the structured activities performed as part of the experiment.] + *** # {takesValue, valueClass=nameClass} [Optional label for the task block.] + ** Time-block [A tag used to indicate a contiguous time block in the experiment during which something is fixed or noted.] + *** # {takesValue, valueClass=nameClass} [Optional label for the task block.] + * Sensory-property [Relating to sensation or the physical senses.] + ** Sensory-attribute [A sensory characteristic associated with another entity.] + *** Auditory-attribute [Pertaining to the sense of hearing.] + **** Loudness [Perceived intensity of a sound.] + ***** # {takesValue, valueClass=numericClass, valueClass=nameClass} + **** Pitch [A perceptual property that allows the user to order sounds on a frequency scale.] + ***** # {takesValue, valueClass=numericClass, unitClass=frequencyUnits} + **** Sound-envelope [Description of how a sound changes over time.] + ***** Sound-envelope-attack [The time taken for initial run-up of level from nil to peak usually beginning when the key on a musical instrument is pressed.] + ****** # {takesValue, valueClass=numericClass, unitClass=timeUnits} + ***** Sound-envelope-decay [The time taken for the subsequent run down from the attack level to the designated sustain level.] + ****** # {takesValue, valueClass=numericClass, unitClass=timeUnits} + ***** Sound-envelope-release [The time taken for the level to decay from the sustain level to zero after the key is released.] + ****** # {takesValue, valueClass=numericClass, unitClass=timeUnits} + ***** Sound-envelope-sustain [The time taken for the main sequence of the sound duration, until the key is released.] + ****** # {takesValue, valueClass=numericClass, unitClass=timeUnits} + **** Timbre [The perceived sound quality of a singing voice or musical instrument.] + ***** # {takesValue, valueClass=nameClass} + **** Sound-volume [The sound pressure level (SPL) usually the ratio to a reference signal estimated as the lower bound of hearing.] + ***** # {takesValue, valueClass=numericClass, unitClass=intensityUnits} + *** Gustatory-attribute [Pertaining to the sense of taste.] + **** Bitter [Having a sharp, pungent taste.] + **** Salty [Tasting of or like salt.] + **** Savory [Belonging to a taste that is salty or spicy rather than sweet.] + **** Sour [Having a sharp, acidic taste.] + **** Sweet [Having or resembling the taste of sugar.] + *** Olfactory-attribute [Having a smell.] + *** Somatic-attribute [Pertaining to the feelings in the body or of the nervous system.] + **** Pain [The sensation of discomfort, distress, or agony, resulting from the stimulation of specialized nerve endings.] + **** Stress [The negative mental, emotional, and physical reactions that occur when environmental stressors are perceived as exceeding the adaptive capacities of the individual.] + *** Tactile-attribute [Pertaining to the sense of touch.] + **** Tactile-pressure [Having a feeling of heaviness.] + **** Tactile-temperature [Having a feeling of hotness or coldness.] + **** Tactile-texture [Having a feeling of roughness.] + **** Tactile-vibration [Having a feeling of mechanical oscillation.] + *** Vestibular-attribute [Pertaining to the sense of balance or body position.] + *** Visual-attribute [Pertaining to the sense of sight.] + **** Color [The appearance of objects (or light sources) described in terms of perception of their hue and lightness (or brightness) and saturation.] + ***** CSS-color [One of 140 colors supported by all browsers. For more details such as the color RGB or HEX values, check: https://www.w3schools.com/colors/colors_groups.asp.] + ****** Blue-color [CSS color group.] + ******* CadetBlue [CSS-color 0x5F9EA0.] + ******* SteelBlue [CSS-color 0x4682B4.] + ******* LightSteelBlue [CSS-color 0xB0C4DE.] + ******* LightBlue [CSS-color 0xADD8E6.] + ******* PowderBlue [CSS-color 0xB0E0E6.] + ******* LightSkyBlue [CSS-color 0x87CEFA.] + ******* SkyBlue [CSS-color 0x87CEEB.] + ******* CornflowerBlue [CSS-color 0x6495ED.] + ******* DeepSkyBlue [CSS-color 0x00BFFF.] + ******* DodgerBlue [CSS-color 0x1E90FF.] + ******* RoyalBlue [CSS-color 0x4169E1.] + ******* Blue [CSS-color 0x0000FF.] + ******* MediumBlue [CSS-color 0x0000CD.] + ******* DarkBlue [CSS-color 0x00008B.] + ******* Navy [CSS-color 0x000080.] + ******* MidnightBlue [CSS-color 0x191970.] + ****** Brown-color [CSS color group.] + ******* Cornsilk [CSS-color 0xFFF8DC.] + ******* BlanchedAlmond [CSS-color 0xFFEBCD.] + ******* Bisque [CSS-color 0xFFE4C4.] + ******* NavajoWhite [CSS-color 0xFFDEAD.] + ******* Wheat [CSS-color 0xF5DEB3.] + ******* BurlyWood [CSS-color 0xDEB887.] + ******* Tan [CSS-color 0xD2B48C.] + ******* RosyBrown [CSS-color 0xBC8F8F.] + ******* SandyBrown [CSS-color 0xF4A460.] + ******* GoldenRod [CSS-color 0xDAA520.] + ******* DarkGoldenRod [CSS-color 0xB8860B.] + ******* Peru [CSS-color 0xCD853F.] + ******* Chocolate [CSS-color 0xD2691E.] + ******* Olive [CSS-color 0x808000.] + ******* SaddleBrown [CSS-color 0x8B4513.] + ******* Sienna [CSS-color 0xA0522D.] + ******* Brown [CSS-color 0xA52A2A.] + ******* Maroon [CSS-color 0x800000.] + ****** Cyan-color [CSS color group.] + ******* Aqua [CSS-color 0x00FFFF.] + ******* Cyan [CSS-color 0x00FFFF.] + ******* LightCyan [CSS-color 0xE0FFFF.] + ******* PaleTurquoise [CSS-color 0xAFEEEE.] + ******* Aquamarine [CSS-color 0x7FFFD4.] + ******* Turquoise [CSS-color 0x40E0D0.] + ******* MediumTurquoise [CSS-color 0x48D1CC.] + ******* DarkTurquoise [CSS-color 0x00CED1.] + ****** Green-color [CSS color group.] + ******* GreenYellow [CSS-color 0xADFF2F.] + ******* Chartreuse [CSS-color 0x7FFF00.] + ******* LawnGreen [CSS-color 0x7CFC00.] + ******* Lime [CSS-color 0x00FF00.] + ******* LimeGreen [CSS-color 0x32CD32.] + ******* PaleGreen [CSS-color 0x98FB98.] + ******* LightGreen [CSS-color 0x90EE90.] + ******* MediumSpringGreen [CSS-color 0x00FA9A.] + ******* SpringGreen [CSS-color 0x00FF7F.] + ******* MediumSeaGreen [CSS-color 0x3CB371.] + ******* SeaGreen [CSS-color 0x2E8B57.] + ******* ForestGreen [CSS-color 0x228B22.] + ******* Green [CSS-color 0x008000.] + ******* DarkGreen [CSS-color 0x006400.] + ******* YellowGreen [CSS-color 0x9ACD32.] + ******* OliveDrab [CSS-color 0x6B8E23.] + ******* DarkOliveGreen [CSS-color 0x556B2F.] + ******* MediumAquaMarine [CSS-color 0x66CDAA.] + ******* DarkSeaGreen [CSS-color 0x8FBC8F.] + ******* LightSeaGreen [CSS-color 0x20B2AA.] + ******* DarkCyan [CSS-color 0x008B8B.] + ******* Teal [CSS-color 0x008080.] + ****** Gray-color [CSS color group.] + ******* Gainsboro [CSS-color 0xDCDCDC.] + ******* LightGray [CSS-color 0xD3D3D3.] + ******* Silver [CSS-color 0xC0C0C0.] + ******* DarkGray [CSS-color 0xA9A9A9.] + ******* DimGray [CSS-color 0x696969.] + ******* Gray [CSS-color 0x808080.] + ******* LightSlateGray [CSS-color 0x778899.] + ******* SlateGray [CSS-color 0x708090.] + ******* DarkSlateGray [CSS-color 0x2F4F4F.] + ******* Black [CSS-color 0x000000.] + ****** Orange-color [CSS color group.] + ******* Orange [CSS-color 0xFFA500.] + ******* DarkOrange [CSS-color 0xFF8C00.] + ******* Coral [CSS-color 0xFF7F50.] + ******* Tomato [CSS-color 0xFF6347.] + ******* OrangeRed [CSS-color 0xFF4500.] + ****** Pink-color [CSS color group.] + ******* Pink [CSS-color 0xFFC0CB.] + ******* LightPink [CSS-color 0xFFB6C1.] + ******* HotPink [CSS-color 0xFF69B4.] + ******* DeepPink [CSS-color 0xFF1493.] + ******* PaleVioletRed [CSS-color 0xDB7093.] + ******* MediumVioletRed [CSS-color 0xC71585.] + ****** Purple-color [CSS color group.] + ******* Lavender [CSS-color 0xE6E6FA.] + ******* Thistle [CSS-color 0xD8BFD8.] + ******* Plum [CSS-color 0xDDA0DD.] + ******* Orchid [CSS-color 0xDA70D6.] + ******* Violet [CSS-color 0xEE82EE.] + ******* Fuchsia [CSS-color 0xFF00FF.] + ******* Magenta [CSS-color 0xFF00FF.] + ******* MediumOrchid [CSS-color 0xBA55D3.] + ******* DarkOrchid [CSS-color 0x9932CC.] + ******* DarkViolet [CSS-color 0x9400D3.] + ******* BlueViolet [CSS-color 0x8A2BE2.] + ******* DarkMagenta [CSS-color 0x8B008B.] + ******* Purple [CSS-color 0x800080.] + ******* MediumPurple [CSS-color 0x9370DB.] + ******* MediumSlateBlue [CSS-color 0x7B68EE.] + ******* SlateBlue [CSS-color 0x6A5ACD.] + ******* DarkSlateBlue [CSS-color 0x483D8B.] + ******* RebeccaPurple [CSS-color 0x663399.] + ******* Indigo [CSS-color 0x4B0082.] + ****** Red-color [CSS color group.] + ******* LightSalmon [CSS-color 0xFFA07A.] + ******* Salmon [CSS-color 0xFA8072.] + ******* DarkSalmon [CSS-color 0xE9967A.] + ******* LightCoral [CSS-color 0xF08080.] + ******* IndianRed [CSS-color 0xCD5C5C.] + ******* Crimson [CSS-color 0xDC143C.] + ******* Red [CSS-color 0xFF0000.] + ******* FireBrick [CSS-color 0xB22222.] + ******* DarkRed [CSS-color 0x8B0000.] + ****** Yellow-color [CSS color group.] + ******* Gold [CSS-color 0xFFD700.] + ******* Yellow [CSS-color 0xFFFF00.] + ******* LightYellow [CSS-color 0xFFFFE0.] + ******* LemonChiffon [CSS-color 0xFFFACD.] + ******* LightGoldenRodYellow [CSS-color 0xFAFAD2.] + ******* PapayaWhip [CSS-color 0xFFEFD5.] + ******* Moccasin [CSS-color 0xFFE4B5.] + ******* PeachPuff [CSS-color 0xFFDAB9.] + ******* PaleGoldenRod [CSS-color 0xEEE8AA.] + ******* Khaki [CSS-color 0xF0E68C.] + ******* DarkKhaki [CSS-color 0xBDB76B.] + ****** White-color [CSS color group.] + ******* White [CSS-color 0xFFFFFF.] + ******* Snow [CSS-color 0xFFFAFA.] + ******* HoneyDew [CSS-color 0xF0FFF0.] + ******* MintCream [CSS-color 0xF5FFFA.] + ******* Azure [CSS-color 0xF0FFFF.] + ******* AliceBlue [CSS-color 0xF0F8FF.] + ******* GhostWhite [CSS-color 0xF8F8FF.] + ******* WhiteSmoke [CSS-color 0xF5F5F5.] + ******* SeaShell [CSS-color 0xFFF5EE.] + ******* Beige [CSS-color 0xF5F5DC.] + ******* OldLace [CSS-color 0xFDF5E6.] + ******* FloralWhite [CSS-color 0xFFFAF0.] + ******* Ivory [CSS-color 0xFFFFF0.] + ******* AntiqueWhite [CSS-color 0xFAEBD7.] + ******* Linen [CSS-color 0xFAF0E6.] + ******* LavenderBlush [CSS-color 0xFFF0F5.] + ******* MistyRose [CSS-color 0xFFE4E1.] + ***** Color-shade [A slight degree of difference between colors, especially with regard to how light or dark it is or as distinguished from one nearly like it.] + ****** Dark-shade [A color tone not reflecting much light.] + ****** Light-shade [A color tone reflecting more light.] + ***** Grayscale [Using a color map composed of shades of gray, varying from black at the weakest intensity to white at the strongest.] + ****** # {takesValue, valueClass=numericClass} [White intensity between 0 and 1.] + ***** HSV-color [A color representation that models how colors appear under light.] + ****** Hue [Attribute of a visual sensation according to which an area appears to be similar to one of the perceived colors.] + ******* # {takesValue, valueClass=numericClass} [Angular value between 0 and 360.] + ****** Saturation [Colorfulness of a stimulus relative to its own brightness.] + ******* # {takesValue, valueClass=numericClass} [B value of RGB between 0 and 1.] + ****** HSV-value [An attribute of a visual sensation according to which an area appears to emit more or less light.] + ******* # {takesValue, valueClass=numericClass} + ***** RGB-color [A color from the RGB schema.] + ****** RGB-red [The red component.] + ******* # {takesValue, valueClass=numericClass} [R value of RGB between 0 and 1.] + ****** RGB-blue [The blue component.] + ******* # {takesValue, valueClass=numericClass} [B value of RGB between 0 and 1.] + ****** RGB-green [The green component.] + ******* # {takesValue, valueClass=numericClass} [G value of RGB between 0 and 1.] + **** Luminance [A quality that exists by virtue of the luminous intensity per unit area projected in a given direction.] + **** Opacity [A measure of impenetrability to light.] + ** Sensory-presentation [The entity has a sensory manifestation.] + *** Auditory-presentation [The sense of hearing is used in the presentation to the user.] + **** Loudspeaker-separation {suggestedTag=Distance} [The distance between two loudspeakers. Grouped with the Distance tag.] + **** Monophonic [Relating to sound transmission, recording, or reproduction involving a single transmission path.] + **** Silent [The absence of ambient audible sound or the state of having ceased to produce sounds.] + **** Stereophonic [Relating to, or constituting sound reproduction involving the use of separated microphones and two transmission channels to achieve the sound separation of a live hearing.] + *** Gustatory-presentation [The sense of taste used in the presentation to the user.] + *** Olfactory-presentation [The sense of smell used in the presentation to the user.] + *** Somatic-presentation [The nervous system is used in the presentation to the user.] + *** Tactile-presentation [The sense of touch used in the presentation to the user.] + *** Vestibular-presentation [The sense balance used in the presentation to the user.] + *** Visual-presentation [The sense of sight used in the presentation to the user.] + **** 2D-view [A view showing only two dimensions.] + **** 3D-view [A view showing three dimensions.] + **** Background-view [Parts of the view that are farthest from the viewer and usually the not part of the visual focus.] + **** Bistable-view [Something having two stable visual forms that have two distinguishable stable forms as in optical illusions.] + **** Foreground-view [Parts of the view that are closest to the viewer and usually the most important part of the visual focus.] + **** Foveal-view [Visual presentation directly on the fovea. A view projected on the small depression in the retina containing only cones and where vision is most acute.] + **** Map-view [A diagrammatic representation of an area of land or sea showing physical features, cities, roads.] + ***** Aerial-view [Elevated view of an object from above, with a perspective as though the observer were a bird.] + ***** Satellite-view [A representation as captured by technology such as a satellite.] + ***** Street-view [A 360-degrees panoramic view from a position on the ground.] + **** Peripheral-view [Indirect vision as it occurs outside the point of fixation.] + * Task-property {extensionAllowed} [Something that pertains to a task.] + ** Task-attentional-demand [Strategy for allocating attention toward goal-relevant information.] + *** Bottom-up-attention {relatedTag=Top-down-attention} [Attentional guidance purely by externally driven factors to stimuli that are salient because of their inherent properties relative to the background. Sometimes this is referred to as stimulus driven.] + *** Covert-attention {relatedTag=Overt-attention} [Paying attention without moving the eyes.] + *** Divided-attention {relatedTag=Focused-attention} [Integrating parallel multiple stimuli. Behavior involving responding simultaneously to multiple tasks or multiple task demands.] + *** Focused-attention {relatedTag=Divided-attention} [Responding discretely to specific visual, auditory, or tactile stimuli.] + *** Orienting-attention [Directing attention to a target stimulus.] + *** Overt-attention {relatedTag=Covert-attention} [Selectively processing one location over others by moving the eyes to point at that location.] + *** Selective-attention [Maintaining a behavioral or cognitive set in the face of distracting or competing stimuli. Ability to pay attention to a limited array of all available sensory information.] + *** Sustained-attention [Maintaining a consistent behavioral response during continuous and repetitive activity.] + *** Switched-attention [Having to switch attention between two or more modalities of presentation.] + *** Top-down-attention {relatedTag=Bottom-up-attention} [Voluntary allocation of attention to certain features. Sometimes this is referred to goal-oriented attention.] + ** Task-effect-evidence [The evidence supporting the conclusion that the event had the specified effect.] + *** Computational-evidence [A type of evidence in which data are produced, and/or generated, and/or analyzed on a computer.] + *** External-evidence [A phenomenon that follows and is caused by some previous phenomenon.] + *** Intended-effect [A phenomenon that is intended to follow and be caused by some previous phenomenon.] + *** Behavioral-evidence [An indication or conclusion based on the behavior of an agent.] + ** Task-event-role [The purpose of an event with respect to the task.] + *** Experimental-stimulus [Part of something designed to elicit a response in the experiment.] + *** Incidental [A sensory or other type of event that is unrelated to the task or experiment.] + *** Instructional [Usually associated with a sensory event intended to give instructions to the participant about the task or behavior.] + *** Mishap [Unplanned disruption such as an equipment or experiment control abnormality or experimenter error.] + *** Participant-response [Something related to a participant actions in performing the task.] + *** Task-activity [Something that is part of the overall task or is necessary to the overall experiment but is not directly part of a stimulus-response cycle. Examples would be taking a survey or provided providing a silva sample.] + *** Warning [Something that should warn the participant that the parameters of the task have been or are about to be exceeded such as a warning message about getting too close to the shoulder of the road in a driving task.] + ** Task-action-type [How an agent action should be interpreted in terms of the task specification.] + *** Appropriate-action {relatedTag=Inappropriate-action} [An action suitable or proper in the circumstances.] + *** Correct-action {relatedTag=Incorrect-action, relatedTag=Indeterminate-action} [An action that was a correct response in the context of the task.] + *** Correction [An action offering an improvement to replace a mistake or error.] + *** Done-indication {relatedTag=Ready-indication} [An action that indicates that the participant has completed this step in the task.] + *** Incorrect-action {relatedTag=Correct-action, relatedTag=Indeterminate-action} [An action considered wrong or incorrect in the context of the task.] + *** Imagined-action [Form a mental image or concept of something. This is used to identity something that only happened in the imagination of the participant as in imagined movements in motor imagery paradigms.] + *** Inappropriate-action {relatedTag=Appropriate-action} [An action not in keeping with what is correct or proper for the task.] + *** Indeterminate-action {relatedTag=Correct-action, relatedTag=Incorrect-action, relatedTag=Miss, relatedTag=Near-miss} [An action that cannot be distinguished between two or more possibibities in the current context. This tag might be applied when an outside evaluator or a classification algorithm cannot determine a definitive result.] + *** Omitted-action [An expected response was skipped.] + *** Miss {relatedTag=Near-miss} [An action considered to be a failure in the context of the task. For example, if the agent is supposed to try to hit a target and misses.] + *** Near-miss {relatedTag=Miss} [An action barely satisfied the requirements of the task. In a driving experiment for example this could pertain to a narrowly avoided collision or other accident.] + *** Ready-indication {relatedTag=Done-indication} [An action that indicates that the participant is ready to perform the next step in the task.] + ** Task-relationship [Specifying organizational importance of sub-tasks.] + *** Background-subtask [A part of the task which should be performed in the background as for example inhibiting blinks due to instruction while performing the primary task.] + *** Primary-subtask [A part of the task which should be the primary focus of the participant.] + ** Task-stimulus-role [The role the stimulus plays in the task.] + *** Cue [A signal for an action, a pattern of stimuli indicating a particular response.] + *** Distractor [A person or thing that distracts or a plausible but incorrect option in a multiple-choice question. In pyschological studies this is sometimes referred to as a foil.] + *** Expected {relatedTag=Unexpected, suggestedTag=Target} [Considered likely, probable or anticipated. Something of low information value as in frequent non-targets in an RSVP paradigm.] + *** Extraneous [Irrelevant or unrelated to the subject being dealt with.] + *** Feedback [An evaluative response to an inquiry, process, event, or activity.] + *** Go-signal {relatedTag=Stop-signal} [An indicator to proceed with a planned action.] + *** Meaningful [Conveying significant or relevant information.] + *** Newly-learned [Representing recently acquired information or understanding.] + *** Non-informative [Something that is not useful in forming an opinion or judging an outcome.] + *** Non-target {relatedTag=Target} [Something other than that done or looked for. Also tag Expected if the Non-target is frequent.] + *** Not-meaningful [Not having a serious, important, or useful quality or purpose.] + *** Novel [Having no previous example or precedent or parallel.] + *** Oddball {relatedTag=Unexpected, suggestedTag=Target} [Something unusual, or infrequent.] + *** Planned {relatedTag=Unplanned} [Something that was decided on or arranged in advance.] + *** Penalty [A disadvantage, loss, or hardship due to some action.] + *** Priming [An implicit memory effect in which exposure to a stimulus influences response to a later stimulus.] + *** Query [A sentence of inquiry that asks for a reply.] + *** Reward [A positive reinforcement for a desired action, behavior or response.] + *** Stop-signal {relatedTag=Go-signal} [An indicator that the agent should stop the current activity.] + *** Target [Something fixed as a goal, destination, or point of examination.] + *** Threat [An indicator that signifies hostility and predicts an increased probability of attack.] + *** Timed [Something planned or scheduled to be done at a particular time or lasting for a specified amount of time.] + *** Unexpected {relatedTag=Expected} [Something that is not anticipated.] + *** Unplanned {relatedTag=Planned} [Something that has not been planned as part of the task.] '''Relation''' {extensionAllowed} [Concerns the way in which two or more people or things are connected.] -* Comparative-relation [Something considered in comparison to something else. The first entity is the focus.] -** Approximately-equal-to [(A, (Approximately-equal-to, B)) indicates that A and B have almost the same value. Here A and B could refer to sizes, orders, positions or other quantities.] -** Less-than [(A, (Less-than, B)) indicates that A is smaller than B. Here A and B could refer to sizes, orders, positions or other quantities.] -** Less-than-or-equal-to [(A, (Less-than-or-equal-to, B)) indicates that the relative size or order of A is smaller than or equal to B.] -** Greater-than [(A, (Greater-than, B)) indicates that the relative size or order of A is bigger than that of B.] -** Greater-than-or-equal-to [(A, (Greater-than-or-equal-to, B)) indicates that the relative size or order of A is bigger than or the same as that of B.] -** Equal-to [(A, (Equal-to, B)) indicates that the size or order of A is the same as that of B.] -** Not-equal-to [(A, (Not-equal-to, B)) indicates that the size or order of A is not the same as that of B.] -* Connective-relation [Indicates two entities are related in some way. The first entity is the focus.] -** Belongs-to [(A, (Belongs-to, B)) indicates that A is a member of B.] -** Connected-to [(A, (Connected-to, B)) indicates that A is related to B in some respect, usually through a direct link.] -** Contained-in [(A, (Contained-in, B)) indicates that A is completely inside of B.] -** Described-by [(A, (Described-by, B)) indicates that B provides information about A.] -** From-to [(A, (From-to, B)) indicates a directional relation from A to B. A is considered the source.] -** Group-of [(A, (Group-of, B)) indicates A is a group of items of type B.] -** Implied-by [(A, (Implied-by, B)) indicates B is suggested by A.] -** Includes [(A, (Includes, B)) indicates that A has B as a member or part.] -** Interacts-with [(A, (Interacts-with, B)) indicates A and B interact, possibly reciprocally.] -** Member-of [(A, (Member-of, B)) indicates A is a member of group B.] -** Part-of [(A, (Part-of, B)) indicates A is a part of the whole B.] -** Performed-by [(A, (Performed-by, B)) indicates that the action or procedure A was carried out by agent B.] -** Performed-using [(A, (Performed-using, B)) indicates that the action or procedure A was accomplished using B.] -** Related-to [(A, (Related-to, B)) indicates A has some relationship to B.] -** Unrelated-to [(A, (Unrelated-to, B)) indicates that A is not related to B. For example, A is not related to Task.] -* Directional-relation [A relationship indicating direction of change of one entity relative to another. The first entity is the focus.] -** Away-from [(A, (Away-from, B)) indicates that A is going or has moved away from B. The meaning depends on A and B.] -** Towards [(A, (Towards, B)) indicates that A is going to or has moved to B. The meaning depends on A and B.] -* Logical-relation [Indicating a logical relationship between entities. The first entity is usually the focus.] -** And [(A, (And, B)) means A and B are both in effect.] -** Or [(A, (Or, B)) means at least one of A and B are in effect.] -* Spatial-relation [Indicating a relationship about position between entities.] -** Above [(A, (Above, B)) means A is in a place or position that is higher than B.] -** Across-from [(A, (Across-from, B)) means A is on the opposite side of something from B.] -** Adjacent-to [(A, (Adjacent-to, B)) indicates that A is next to B in time or space.] -** Ahead-of [(A, (Ahead-of, B)) indicates that A is further forward in time or space in B.] -** Around [(A, (Around, B)) means A is in or near the present place or situation of B.] -** Behind [(A, (Behind, B)) means A is at or to the far side of B, typically so as to be hidden by it.] -** Below [(A, (Below, B)) means A is in a place or position that is lower than the position of B.] -** Between [(A, (Between, (B, C))) means A is in the space or interval separating B and C.] -** Bilateral-to [(A, (Bilateral, B)) means A is on both sides of B or affects both sides of B.] -** Bottom-edge-of {relatedTag=Left-edge-of, relatedTag=Right-edge-of, relatedTag=Top-edge-of} [(A, (Bottom-edge-of, B)) means A is on the bottom most part or or near the boundary of B.] -** Boundary-of [(A, (Boundary-of, B)) means A is on or part of the edge or boundary of B.] -** Center-of [(A, (Center-of, B)) means A is at a point or or in an area that is approximately central within B.] -** Close-to [(A, (Close-to, B)) means A is at a small distance from or is located near in space to B.] -** Far-from [(A, (Far-from, B)) means A is at a large distance from or is not located near in space to B.] -** In-front-of [(A, (In-front-of, B)) means A is in a position just ahead or at the front part of B, potentially partially blocking B from view.] -** Left-edge-of {relatedTag=Bottom-edge-of, relatedTag=Right-edge-of, relatedTag=Top-edge-of} [(A, (Left-edge-of, B)) means A is located on the left side of B on or near the boundary of B.] -** Left-side-of {relatedTag=Right-side-of} [(A, (Left-side-of, B)) means A is located on the left side of B usually as part of B.] -** Lower-center-of {relatedTag=Center-of, relatedTag=Lower-left-of, relatedTag=Lower-right-of, relatedTag=Upper-center-of, relatedTag=Upper-right-of} [(A, (Lower-center-of, B)) means A is situated on the lower center part of B (due south). This relation is often used to specify qualitative information about screen position.] -** Lower-left-of {relatedTag=Center-of, relatedTag=Lower-center-of, relatedTag=Lower-right-of, relatedTag=Upper-center-of, relatedTag=Upper-left-of, relatedTag=Upper-right-of} [(A, (Lower-left-of, B)) means A is situated on the lower left part of B. This relation is often used to specify qualitative information about screen position.] -** Lower-right-of {relatedTag=Center-of, relatedTag=Lower-center-of, relatedTag=Lower-left-of, relatedTag=Upper-left-of, relatedTag=Upper-center-of, relatedTag=Upper-left-of, relatedTag=Lower-right-of} [(A, (Lower-right-of, B)) means A is situated on the lower right part of B. This relation is often used to specify qualitative information about screen position.] -** Outside-of [(A, (Outside-of, B)) means A is located in the space around but not including B.] -** Over [(A, (Over, B)) means A above is above B so as to cover or protect or A extends over the a general area as from a from a vantage point.] -** Right-edge-of {relatedTag=Bottom-edge-of, relatedTag=Left-edge-of, relatedTag=Top-edge-of} [(A, (Right-edge-of, B)) means A is located on the right side of B on or near the boundary of B.] -** Right-side-of {relatedTag=Left-side-of} [(A, (Right-side-of, B)) means A is located on the right side of B usually as part of B.] -** To-left-of [(A, (To-left-of, B)) means A is located on or directed toward the side to the west of B when B is facing north. This term is used when A is not part of B.] -** To-right-of [(A, (To-right-of, B)) means A is located on or directed toward the side to the east of B when B is facing north. This term is used when A is not part of B.] -** Top-edge-of {relatedTag=Left-edge-of, relatedTag=Right-edge-of, relatedTag=Bottom-edge-of} [(A, (Top-edge-of, B)) means A is on the uppermost part or or near the boundary of B.] -** Top-of [(A, (Top-of, B)) means A is on the uppermost part, side, or surface of B.] -** Upper-center-of {relatedTag=Center-of, relatedTag=Lower-center-of, relatedTag=Lower-left-of, relatedTag=Lower-right-of, relatedTag=Upper-center-of, relatedTag=Upper-right-of} [(A, (Upper-center-of, B)) means A is situated on the upper center part of B (due north). This relation is often used to specify qualitative information about screen position.] -** Upper-left-of {relatedTag=Center-of, relatedTag=Lower-center-of, relatedTag=Lower-left-of, relatedTag=Lower-right-of, relatedTag=Upper-center-of, relatedTag=Upper-right-of} [(A, (Upper-left-of, B)) means A is situated on the upper left part of B. This relation is often used to specify qualitative information about screen position.] -** Upper-right-of {relatedTag=Center-of, relatedTag=Lower-center-of, relatedTag=Lower-left-of, relatedTag=Upper-left-of, relatedTag=Upper-center-of, relatedTag=Lower-right-of} [(A, (Upper-right-of, B)) means A is situated on the upper right part of B. This relation is often used to specify qualitative information about screen position.] -** Underneath [(A, (Underneath, B)) means A is situated directly below and may be concealed by B.] -** Within [(A, (Within, B)) means A is on the inside of or contained in B.] -* Temporal-relation [A relationship that includes a temporal or time-based component.] -** After [(A, (After B)) means A happens at a time subsequent to a reference time related to B.] -** Asynchronous-with [(A, (Asynchronous-with, B)) means A happens at times not occurring at the same time or having the same period or phase as B.] -** Before [(A, (Before B)) means A happens at a time earlier in time or order than B.] -** During [(A, (During, B)) means A happens at some point in a given period of time in which B is ongoing.] -** Synchronous-with [(A, (Synchronous-with, B)) means A happens at occurs at the same time or rate as B.] -** Waiting-for [(A, (Waiting-for, B)) means A pauses for something to happen in B.] + * Comparative-relation [Something considered in comparison to something else. The first entity is the focus.] + ** Approximately-equal-to [(A, (Approximately-equal-to, B)) indicates that A and B have almost the same value. Here A and B could refer to sizes, orders, positions or other quantities.] + ** Less-than [(A, (Less-than, B)) indicates that A is smaller than B. Here A and B could refer to sizes, orders, positions or other quantities.] + ** Less-than-or-equal-to [(A, (Less-than-or-equal-to, B)) indicates that the relative size or order of A is smaller than or equal to B.] + ** Greater-than [(A, (Greater-than, B)) indicates that the relative size or order of A is bigger than that of B.] + ** Greater-than-or-equal-to [(A, (Greater-than-or-equal-to, B)) indicates that the relative size or order of A is bigger than or the same as that of B.] + ** Equal-to [(A, (Equal-to, B)) indicates that the size or order of A is the same as that of B.] + ** Not-equal-to [(A, (Not-equal-to, B)) indicates that the size or order of A is not the same as that of B.] + * Connective-relation [Indicates two entities are related in some way. The first entity is the focus.] + ** Belongs-to [(A, (Belongs-to, B)) indicates that A is a member of B.] + ** Connected-to [(A, (Connected-to, B)) indicates that A is related to B in some respect, usually through a direct link.] + ** Contained-in [(A, (Contained-in, B)) indicates that A is completely inside of B.] + ** Described-by [(A, (Described-by, B)) indicates that B provides information about A.] + ** From-to [(A, (From-to, B)) indicates a directional relation from A to B. A is considered the source.] + ** Group-of [(A, (Group-of, B)) indicates A is a group of items of type B.] + ** Implied-by [(A, (Implied-by, B)) indicates B is suggested by A.] + ** Includes [(A, (Includes, B)) indicates that A has B as a member or part.] + ** Interacts-with [(A, (Interacts-with, B)) indicates A and B interact, possibly reciprocally.] + ** Member-of [(A, (Member-of, B)) indicates A is a member of group B.] + ** Part-of [(A, (Part-of, B)) indicates A is a part of the whole B.] + ** Performed-by [(A, (Performed-by, B)) indicates that the action or procedure A was carried out by agent B.] + ** Performed-using [(A, (Performed-using, B)) indicates that the action or procedure A was accomplished using B.] + ** Related-to [(A, (Related-to, B)) indicates A has some relationship to B.] + ** Unrelated-to [(A, (Unrelated-to, B)) indicates that A is not related to B. For example, A is not related to Task.] + * Directional-relation [A relationship indicating direction of change of one entity relative to another. The first entity is the focus.] + ** Away-from [(A, (Away-from, B)) indicates that A is going or has moved away from B. The meaning depends on A and B.] + ** Towards [(A, (Towards, B)) indicates that A is going to or has moved to B. The meaning depends on A and B.] + * Logical-relation [Indicating a logical relationship between entities. The first entity is usually the focus.] + ** And [(A, (And, B)) means A and B are both in effect.] + ** Or [(A, (Or, B)) means at least one of A and B are in effect.] + * Spatial-relation [Indicating a relationship about position between entities.] + ** Above [(A, (Above, B)) means A is in a place or position that is higher than B.] + ** Across-from [(A, (Across-from, B)) means A is on the opposite side of something from B.] + ** Adjacent-to [(A, (Adjacent-to, B)) indicates that A is next to B in time or space.] + ** Ahead-of [(A, (Ahead-of, B)) indicates that A is further forward in time or space in B.] + ** Around [(A, (Around, B)) means A is in or near the present place or situation of B.] + ** Behind [(A, (Behind, B)) means A is at or to the far side of B, typically so as to be hidden by it.] + ** Below [(A, (Below, B)) means A is in a place or position that is lower than the position of B.] + ** Between [(A, (Between, (B, C))) means A is in the space or interval separating B and C.] + ** Bilateral-to [(A, (Bilateral, B)) means A is on both sides of B or affects both sides of B.] + ** Bottom-edge-of {relatedTag=Left-edge-of, relatedTag=Right-edge-of, relatedTag=Top-edge-of} [(A, (Bottom-edge-of, B)) means A is on the bottom most part or or near the boundary of B.] + ** Boundary-of [(A, (Boundary-of, B)) means A is on or part of the edge or boundary of B.] + ** Center-of [(A, (Center-of, B)) means A is at a point or or in an area that is approximately central within B.] + ** Close-to [(A, (Close-to, B)) means A is at a small distance from or is located near in space to B.] + ** Far-from [(A, (Far-from, B)) means A is at a large distance from or is not located near in space to B.] + ** In-front-of [(A, (In-front-of, B)) means A is in a position just ahead or at the front part of B, potentially partially blocking B from view.] + ** Left-edge-of {relatedTag=Bottom-edge-of, relatedTag=Right-edge-of, relatedTag=Top-edge-of} [(A, (Left-edge-of, B)) means A is located on the left side of B on or near the boundary of B.] + ** Left-side-of {relatedTag=Right-side-of} [(A, (Left-side-of, B)) means A is located on the left side of B usually as part of B.] + ** Lower-center-of {relatedTag=Center-of, relatedTag=Lower-left-of, relatedTag=Lower-right-of, relatedTag=Upper-center-of, relatedTag=Upper-right-of} [(A, (Lower-center-of, B)) means A is situated on the lower center part of B (due south). This relation is often used to specify qualitative information about screen position.] + ** Lower-left-of {relatedTag=Center-of, relatedTag=Lower-center-of, relatedTag=Lower-right-of, relatedTag=Upper-center-of, relatedTag=Upper-left-of, relatedTag=Upper-right-of} [(A, (Lower-left-of, B)) means A is situated on the lower left part of B. This relation is often used to specify qualitative information about screen position.] + ** Lower-right-of {relatedTag=Center-of, relatedTag=Lower-center-of, relatedTag=Lower-left-of, relatedTag=Upper-left-of, relatedTag=Upper-center-of, relatedTag=Upper-left-of, relatedTag=Lower-right-of} [(A, (Lower-right-of, B)) means A is situated on the lower right part of B. This relation is often used to specify qualitative information about screen position.] + ** Outside-of [(A, (Outside-of, B)) means A is located in the space around but not including B.] + ** Over [(A, (Over, B)) means A above is above B so as to cover or protect or A extends over the a general area as from a from a vantage point.] + ** Right-edge-of {relatedTag=Bottom-edge-of, relatedTag=Left-edge-of, relatedTag=Top-edge-of} [(A, (Right-edge-of, B)) means A is located on the right side of B on or near the boundary of B.] + ** Right-side-of {relatedTag=Left-side-of} [(A, (Right-side-of, B)) means A is located on the right side of B usually as part of B.] + ** To-left-of [(A, (To-left-of, B)) means A is located on or directed toward the side to the west of B when B is facing north. This term is used when A is not part of B.] + ** To-right-of [(A, (To-right-of, B)) means A is located on or directed toward the side to the east of B when B is facing north. This term is used when A is not part of B.] + ** Top-edge-of {relatedTag=Left-edge-of, relatedTag=Right-edge-of, relatedTag=Bottom-edge-of} [(A, (Top-edge-of, B)) means A is on the uppermost part or or near the boundary of B.] + ** Top-of [(A, (Top-of, B)) means A is on the uppermost part, side, or surface of B.] + ** Upper-center-of {relatedTag=Center-of, relatedTag=Lower-center-of, relatedTag=Lower-left-of, relatedTag=Lower-right-of, relatedTag=Upper-center-of, relatedTag=Upper-right-of} [(A, (Upper-center-of, B)) means A is situated on the upper center part of B (due north). This relation is often used to specify qualitative information about screen position.] + ** Upper-left-of {relatedTag=Center-of, relatedTag=Lower-center-of, relatedTag=Lower-left-of, relatedTag=Lower-right-of, relatedTag=Upper-center-of, relatedTag=Upper-right-of} [(A, (Upper-left-of, B)) means A is situated on the upper left part of B. This relation is often used to specify qualitative information about screen position.] + ** Upper-right-of {relatedTag=Center-of, relatedTag=Lower-center-of, relatedTag=Lower-left-of, relatedTag=Upper-left-of, relatedTag=Upper-center-of, relatedTag=Lower-right-of} [(A, (Upper-right-of, B)) means A is situated on the upper right part of B. This relation is often used to specify qualitative information about screen position.] + ** Underneath [(A, (Underneath, B)) means A is situated directly below and may be concealed by B.] + ** Within [(A, (Within, B)) means A is on the inside of or contained in B.] + * Temporal-relation [A relationship that includes a temporal or time-based component.] + ** After [(A, (After B)) means A happens at a time subsequent to a reference time related to B.] + ** Asynchronous-with [(A, (Asynchronous-with, B)) means A happens at times not occurring at the same time or having the same period or phase as B.] + ** Before [(A, (Before B)) means A happens at a time earlier in time or order than B.] + ** During [(A, (During, B)) means A happens at some point in a given period of time in which B is ongoing.] + ** Synchronous-with [(A, (Synchronous-with, B)) means A happens at occurs at the same time or rate as B.] + ** Waiting-for [(A, (Waiting-for, B)) means A pauses for something to happen in B.] '''Modulator''' {requireChild, inLibrary=score} [External stimuli / interventions or changes in the alertness level (sleep) that modify: the background activity, or how often a graphoelement is occurring, or change other features of the graphoelement (like intra-burst frequency). For each observed finding, there is an option of specifying how they are influenced by the modulators and procedures that were done during the recording.] -* Sleep-modulator {inLibrary=score} -** Sleep-deprivation {inLibrary=score} -*** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] -** Sleep-following-sleep-deprivation {inLibrary=score} -*** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] -** Natural-sleep {inLibrary=score} -*** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] -** Induced-sleep {inLibrary=score} -*** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] -** Drowsiness {inLibrary=score} -*** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] -** Awakening {inLibrary=score} -*** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] -* Medication-modulator {inLibrary=score} -** Medication-administered-during-recording {inLibrary=score} -*** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] -** Medication-withdrawal-or-reduction-during-recording {inLibrary=score} -*** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] -* Eye-modulator {inLibrary=score} -** Manual-eye-closure {inLibrary=score} -*** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] -** Manual-eye-opening {inLibrary=score} -*** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] -* Stimulation-modulator {inLibrary=score} -** Intermittent-photic-stimulation {requireChild, inLibrary=score} -*** # {takesValue, valueClass=numericClass, unitClass=frequencyUnits, inLibrary=score} -** Auditory-stimulation {inLibrary=score} -*** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] -** Nociceptive-stimulation {inLibrary=score} -*** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] -* Hyperventilation {inLibrary=score} -** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] -* Physical-effort {inLibrary=score} -** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] -* Cognitive-task {inLibrary=score} -** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] -* Other-modulator-or-procedure {requireChild, inLibrary=score} -** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] + * Sleep-modulator {inLibrary=score} + ** Sleep-deprivation {inLibrary=score} + *** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] + ** Sleep-following-sleep-deprivation {inLibrary=score} + *** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] + ** Natural-sleep {inLibrary=score} + *** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] + ** Induced-sleep {inLibrary=score} + *** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] + ** Drowsiness {inLibrary=score} + *** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] + ** Awakening {inLibrary=score} + *** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] + * Medication-modulator {inLibrary=score} + ** Medication-administered-during-recording {inLibrary=score} + *** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] + ** Medication-withdrawal-or-reduction-during-recording {inLibrary=score} + *** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] + * Eye-modulator {inLibrary=score} + ** Manual-eye-closure {inLibrary=score} + *** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] + ** Manual-eye-opening {inLibrary=score} + *** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] + * Stimulation-modulator {inLibrary=score} + ** Intermittent-photic-stimulation {requireChild, inLibrary=score} + *** # {takesValue, valueClass=numericClass, unitClass=frequencyUnits, inLibrary=score} + ** Auditory-stimulation {inLibrary=score} + *** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] + ** Nociceptive-stimulation {inLibrary=score} + *** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] + * Hyperventilation {inLibrary=score} + ** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] + * Physical-effort {inLibrary=score} + ** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] + * Cognitive-task {inLibrary=score} + ** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] + * Other-modulator-or-procedure {requireChild, inLibrary=score} + ** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] '''Background-activity''' {requireChild, inLibrary=score} [An EEG activity representing the setting in which a given normal or abnormal pattern appears and from which such pattern is distinguished.] -* Posterior-dominant-rhythm {suggestedTag=Finding-significance-to-recording, suggestedTag=Finding-frequency, suggestedTag=Posterior-dominant-rhythm-amplitude-range, suggestedTag=Finding-amplitude-asymmetry, suggestedTag=Posterior-dominant-rhythm-frequency-asymmetry, suggestedTag=Posterior-dominant-rhythm-eye-opening-reactivity, suggestedTag=Posterior-dominant-rhythm-organization, suggestedTag=Posterior-dominant-rhythm-caveat, suggestedTag=Absence-of-posterior-dominant-rhythm, inLibrary=score} [Rhythmic activity occurring during wakefulness over the posterior regions of the head, generally with maximum amplitudes over the occipital areas. Amplitude varies. Best seen with eyes closed and during physical relaxation and relative mental inactivity. Blocked or attenuated by attention, especially visual, and mental effort. In adults this is the alpha rhythm, and the frequency is 8 to 13 Hz. However the frequency can be higher or lower than this range (often a supra or sub harmonic of alpha frequency) and is called alpha variant rhythm (fast and slow alpha variant rhythm). In children, the normal range of the frequency of the posterior dominant rhythm is age-dependant.] -* Mu-rhythm {suggestedTag=Finding-frequency, suggestedTag=Finding-significance-to-recording, suggestedTag=Brain-laterality, suggestedTag=Brain-region, suggestedTag=Sensors, inLibrary=score} [EEG rhythm at 7-11 Hz composed of arch-shaped waves occurring over the central or centro-parietal regions of the scalp during wakefulness. Amplitudes varies but is mostly below 50 microV. Blocked or attenuated most clearly by contralateral movement, thought of movement, readiness to move or tactile stimulation.] -* Other-organized-rhythm {requireChild, suggestedTag=Delta-activity-morphology, suggestedTag=Theta-activity-morphology, suggestedTag=Alpha-activity-morphology, suggestedTag=Beta-activity-morphology, suggestedTag=Gamma-activity-morphology, suggestedTag=Finding-significance-to-recording, suggestedTag=Brain-laterality, suggestedTag=Brain-region, suggestedTag=Sensors, suggestedTag=Appearance-mode, suggestedTag=Discharge-pattern, inLibrary=score} [EEG activity that consisting of waves of approximately constant period, which is considered as part of the background (ongoing) activity, but does not fulfill the criteria of the posterior dominant rhythm.] -** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] -* Background-activity-special-feature {requireChild, inLibrary=score} [Special Features. Special features contains scoring options for the background activity of critically ill patients.] -** Continuous-background-activity {suggestedTag=Delta-activity-morphology, suggestedTag=Theta-activity-morphology, suggestedTag=Alpha-activity-morphology, suggestedTag=Beta-activity-morphology, suggestedTag=Gamma-activity-morphology, suggestedTag=Brain-laterality, suggestedTag=Brain-region, suggestedTag=Sensors, suggestedTag=Finding-extent, inLibrary=score} -** Nearly-continuous-background-activity {suggestedTag=Delta-activity-morphology, suggestedTag=Theta-activity-morphology, suggestedTag=Alpha-activity-morphology, suggestedTag=Beta-activity-morphology, suggestedTag=Gamma-activity-morphology, suggestedTag=Brain-laterality, suggestedTag=Brain-region, suggestedTag=Sensors, suggestedTag=Finding-extent, inLibrary=score} -** Discontinuous-background-activity {suggestedTag=Delta-activity-morphology, suggestedTag=Theta-activity-morphology, suggestedTag=Alpha-activity-morphology, suggestedTag=Beta-activity-morphology, suggestedTag=Gamma-activity-morphology, suggestedTag=Brain-laterality, suggestedTag=Brain-region, suggestedTag=Sensors, suggestedTag=Finding-extent, inLibrary=score} -** Background-burst-suppression {suggestedTag=Brain-laterality, suggestedTag=Brain-region, suggestedTag=Sensors, suggestedTag=Finding-extent, inLibrary=score} [EEG pattern consisting of bursts (activity appearing and disappearing abruptly) interrupted by periods of low amplitude (below 20 microV) and which occurs simultaneously over all head regions.] -** Background-burst-attenuation {suggestedTag=Brain-laterality, suggestedTag=Brain-region, suggestedTag=Sensors, suggestedTag=Finding-extent, inLibrary=score} -** Background-activity-suppression {suggestedTag=Brain-laterality, suggestedTag=Brain-region, suggestedTag=Sensors, suggestedTag=Finding-extent, suggestedTag=Appearance-mode, inLibrary=score} [Periods showing activity under 10 microV (referential montage) and interrupting the background (ongoing) activity.] -** Electrocerebral-inactivity {inLibrary=score} [Absence of any ongoing cortical electric activities; in all leads EEG is isoelectric or only contains artifacts. Sensitivity has to be increased up to 2 microV/mm; recording time: at least 30 minutes.] + * Posterior-dominant-rhythm {suggestedTag=Finding-significance-to-recording, suggestedTag=Finding-frequency, suggestedTag=Posterior-dominant-rhythm-amplitude-range, suggestedTag=Finding-amplitude-asymmetry, suggestedTag=Posterior-dominant-rhythm-frequency-asymmetry, suggestedTag=Posterior-dominant-rhythm-eye-opening-reactivity, suggestedTag=Posterior-dominant-rhythm-organization, suggestedTag=Posterior-dominant-rhythm-caveat, suggestedTag=Absence-of-posterior-dominant-rhythm, inLibrary=score} [Rhythmic activity occurring during wakefulness over the posterior regions of the head, generally with maximum amplitudes over the occipital areas. Amplitude varies. Best seen with eyes closed and during physical relaxation and relative mental inactivity. Blocked or attenuated by attention, especially visual, and mental effort. In adults this is the alpha rhythm, and the frequency is 8 to 13 Hz. However the frequency can be higher or lower than this range (often a supra or sub harmonic of alpha frequency) and is called alpha variant rhythm (fast and slow alpha variant rhythm). In children, the normal range of the frequency of the posterior dominant rhythm is age-dependant.] + * Mu-rhythm {suggestedTag=Finding-frequency, suggestedTag=Finding-significance-to-recording, suggestedTag=Brain-laterality, suggestedTag=Brain-region, suggestedTag=Sensors, inLibrary=score} [EEG rhythm at 7-11 Hz composed of arch-shaped waves occurring over the central or centro-parietal regions of the scalp during wakefulness. Amplitudes varies but is mostly below 50 microV. Blocked or attenuated most clearly by contralateral movement, thought of movement, readiness to move or tactile stimulation.] + * Other-organized-rhythm {requireChild, suggestedTag=Delta-activity-morphology, suggestedTag=Theta-activity-morphology, suggestedTag=Alpha-activity-morphology, suggestedTag=Beta-activity-morphology, suggestedTag=Gamma-activity-morphology, suggestedTag=Finding-significance-to-recording, suggestedTag=Brain-laterality, suggestedTag=Brain-region, suggestedTag=Sensors, suggestedTag=Appearance-mode, suggestedTag=Discharge-pattern, inLibrary=score} [EEG activity that consisting of waves of approximately constant period, which is considered as part of the background (ongoing) activity, but does not fulfill the criteria of the posterior dominant rhythm.] + ** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] + * Background-activity-special-feature {requireChild, inLibrary=score} [Special Features. Special features contains scoring options for the background activity of critically ill patients.] + ** Continuous-background-activity {suggestedTag=Delta-activity-morphology, suggestedTag=Theta-activity-morphology, suggestedTag=Alpha-activity-morphology, suggestedTag=Beta-activity-morphology, suggestedTag=Gamma-activity-morphology, suggestedTag=Brain-laterality, suggestedTag=Brain-region, suggestedTag=Sensors, suggestedTag=Finding-extent, inLibrary=score} + ** Nearly-continuous-background-activity {suggestedTag=Delta-activity-morphology, suggestedTag=Theta-activity-morphology, suggestedTag=Alpha-activity-morphology, suggestedTag=Beta-activity-morphology, suggestedTag=Gamma-activity-morphology, suggestedTag=Brain-laterality, suggestedTag=Brain-region, suggestedTag=Sensors, suggestedTag=Finding-extent, inLibrary=score} + ** Discontinuous-background-activity {suggestedTag=Delta-activity-morphology, suggestedTag=Theta-activity-morphology, suggestedTag=Alpha-activity-morphology, suggestedTag=Beta-activity-morphology, suggestedTag=Gamma-activity-morphology, suggestedTag=Brain-laterality, suggestedTag=Brain-region, suggestedTag=Sensors, suggestedTag=Finding-extent, inLibrary=score} + ** Background-burst-suppression {suggestedTag=Brain-laterality, suggestedTag=Brain-region, suggestedTag=Sensors, suggestedTag=Finding-extent, inLibrary=score} [EEG pattern consisting of bursts (activity appearing and disappearing abruptly) interrupted by periods of low amplitude (below 20 microV) and which occurs simultaneously over all head regions.] + ** Background-burst-attenuation {suggestedTag=Brain-laterality, suggestedTag=Brain-region, suggestedTag=Sensors, suggestedTag=Finding-extent, inLibrary=score} + ** Background-activity-suppression {suggestedTag=Brain-laterality, suggestedTag=Brain-region, suggestedTag=Sensors, suggestedTag=Finding-extent, suggestedTag=Appearance-mode, inLibrary=score} [Periods showing activity under 10 microV (referential montage) and interrupting the background (ongoing) activity.] + ** Electrocerebral-inactivity {inLibrary=score} [Absence of any ongoing cortical electric activities; in all leads EEG is isoelectric or only contains artifacts. Sensitivity has to be increased up to 2 microV/mm; recording time: at least 30 minutes.] '''Sleep-and-drowsiness''' {requireChild, inLibrary=score} [The features of the ongoing activity during sleep are scored here. If abnormal graphoelements appear, disappear or change their morphology during sleep, that is not scored here but at the entry corresponding to that graphooelement (as a modulator).] -* Sleep-architecture {suggestedTag=Property-not-possible-to-determine, inLibrary=score} [For longer recordings. Only to be scored if whole-night sleep is part of the recording. It is a global descriptor of the structure and pattern of sleep: estimation of the amount of time spent in REM and NREM sleep, sleep duration, NREM-REM cycle.] -** Normal-sleep-architecture {inLibrary=score} -** Abnormal-sleep-architecture {inLibrary=score} -* Sleep-stage-reached {requireChild, suggestedTag=Property-not-possible-to-determine, suggestedTag=Finding-significance-to-recording, inLibrary=score} [For normal sleep patterns the sleep stages reached during the recording can be specified] -** Sleep-stage-N1 {inLibrary=score} [Sleep stage 1.] -*** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] -** Sleep-stage-N2 {inLibrary=score} [Sleep stage 2.] -*** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] -** Sleep-stage-N3 {inLibrary=score} [Sleep stage 3.] -*** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] -** Sleep-stage-REM {inLibrary=score} [Rapid eye movement.] -*** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] -* Sleep-spindles {suggestedTag=Finding-significance-to-recording, suggestedTag=Brain-laterality, suggestedTag=Brain-region, suggestedTag=Sensors, suggestedTag=Finding-amplitude-asymmetry, inLibrary=score} [Burst at 11-15 Hz but mostly at 12-14 Hz generally diffuse but of higher voltage over the central regions of the head, occurring during sleep. Amplitude varies but is mostly below 50 microV in the adult.] -* Arousal-pattern {suggestedTag=Brain-laterality, suggestedTag=Brain-region, suggestedTag=Sensors, suggestedTag=Appearance-mode, suggestedTag=Discharge-pattern, inLibrary=score} [Arousal pattern in children. Prolonged, marked high voltage 4-6/s activity in all leads with some intermixed slower frequencies, in children.] -* Frontal-arousal-rhythm {suggestedTag=Appearance-mode, suggestedTag=Discharge-pattern, inLibrary=score} [Prolonged (up to 20s) rhythmical sharp or spiky activity over the frontal areas (maximum over the frontal midline) seen at arousal from sleep in children with minimal cerebral dysfunction.] -* Vertex-wave {suggestedTag=Finding-significance-to-recording, suggestedTag=Brain-laterality, suggestedTag=Brain-region, suggestedTag=Sensors, suggestedTag=Finding-amplitude-asymmetry, inLibrary=score} [Sharp potential, maximal at the vertex, negative relative to other areas, apparently occurring spontaneously during sleep or in response to a sensory stimulus during sleep or wakefulness. May be single or repetitive. Amplitude varies but rarely exceeds 250 microV. Abbreviation: V wave. Synonym: vertex sharp wave.] -* K-complex {suggestedTag=Finding-significance-to-recording, suggestedTag=Brain-laterality, suggestedTag=Brain-region, suggestedTag=Sensors, suggestedTag=Finding-amplitude-asymmetry, inLibrary=score} [A burst of somewhat variable appearance, consisting most commonly of a high voltage negative slow wave followed by a smaller positive slow wave frequently associated with a sleep spindle. Duration greater than 0.5 s. Amplitude is generally maximal in the frontal vertex. K complexes occur during nonREM sleep, apparently spontaneously, or in response to sudden sensory / auditory stimuli, and are not specific for any individual sensory modality.] -* Saw-tooth-waves {suggestedTag=Finding-significance-to-recording, suggestedTag=Brain-laterality, suggestedTag=Brain-region, suggestedTag=Sensors, suggestedTag=Finding-amplitude-asymmetry, inLibrary=score} [Vertex negative 2-5 Hz waves occuring in series during REM sleep] -* POSTS {suggestedTag=Finding-significance-to-recording, suggestedTag=Brain-laterality, suggestedTag=Brain-region, suggestedTag=Sensors, suggestedTag=Finding-amplitude-asymmetry, inLibrary=score} [Positive occipital sharp transients of sleep. Sharp transient maximal over the occipital regions, positive relative to other areas, apparently occurring spontaneously during sleep. May be single or repetitive. Amplitude varies but is generally bellow 50 microV.] -* Hypnagogic-hypersynchrony {suggestedTag=Finding-significance-to-recording, suggestedTag=Brain-laterality, suggestedTag=Brain-region, suggestedTag=Sensors, suggestedTag=Finding-amplitude-asymmetry, inLibrary=score} [Bursts of bilateral, synchronous delta or theta activity of large amplitude, occasionally with superimposed faster components, occurring during falling asleep or during awakening, in children.] -* Non-reactive-sleep {inLibrary=score} [EEG activity consisting of normal sleep graphoelements, but which cannot be interrupted by external stimuli/ the patient cannot be waken.] + * Sleep-architecture {suggestedTag=Property-not-possible-to-determine, inLibrary=score} [For longer recordings. Only to be scored if whole-night sleep is part of the recording. It is a global descriptor of the structure and pattern of sleep: estimation of the amount of time spent in REM and NREM sleep, sleep duration, NREM-REM cycle.] + ** Normal-sleep-architecture {inLibrary=score} + ** Abnormal-sleep-architecture {inLibrary=score} + * Sleep-stage-reached {requireChild, suggestedTag=Property-not-possible-to-determine, suggestedTag=Finding-significance-to-recording, inLibrary=score} [For normal sleep patterns the sleep stages reached during the recording can be specified] + ** Sleep-stage-N1 {inLibrary=score} [Sleep stage 1.] + *** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] + ** Sleep-stage-N2 {inLibrary=score} [Sleep stage 2.] + *** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] + ** Sleep-stage-N3 {inLibrary=score} [Sleep stage 3.] + *** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] + ** Sleep-stage-REM {inLibrary=score} [Rapid eye movement.] + *** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] + * Sleep-spindles {suggestedTag=Finding-significance-to-recording, suggestedTag=Brain-laterality, suggestedTag=Brain-region, suggestedTag=Sensors, suggestedTag=Finding-amplitude-asymmetry, inLibrary=score} [Burst at 11-15 Hz but mostly at 12-14 Hz generally diffuse but of higher voltage over the central regions of the head, occurring during sleep. Amplitude varies but is mostly below 50 microV in the adult.] + * Arousal-pattern {suggestedTag=Brain-laterality, suggestedTag=Brain-region, suggestedTag=Sensors, suggestedTag=Appearance-mode, suggestedTag=Discharge-pattern, inLibrary=score} [Arousal pattern in children. Prolonged, marked high voltage 4-6/s activity in all leads with some intermixed slower frequencies, in children.] + * Frontal-arousal-rhythm {suggestedTag=Appearance-mode, suggestedTag=Discharge-pattern, inLibrary=score} [Prolonged (up to 20s) rhythmical sharp or spiky activity over the frontal areas (maximum over the frontal midline) seen at arousal from sleep in children with minimal cerebral dysfunction.] + * Vertex-wave {suggestedTag=Finding-significance-to-recording, suggestedTag=Brain-laterality, suggestedTag=Brain-region, suggestedTag=Sensors, suggestedTag=Finding-amplitude-asymmetry, inLibrary=score} [Sharp potential, maximal at the vertex, negative relative to other areas, apparently occurring spontaneously during sleep or in response to a sensory stimulus during sleep or wakefulness. May be single or repetitive. Amplitude varies but rarely exceeds 250 microV. Abbreviation: V wave. Synonym: vertex sharp wave.] + * K-complex {suggestedTag=Finding-significance-to-recording, suggestedTag=Brain-laterality, suggestedTag=Brain-region, suggestedTag=Sensors, suggestedTag=Finding-amplitude-asymmetry, inLibrary=score} [A burst of somewhat variable appearance, consisting most commonly of a high voltage negative slow wave followed by a smaller positive slow wave frequently associated with a sleep spindle. Duration greater than 0.5 s. Amplitude is generally maximal in the frontal vertex. K complexes occur during nonREM sleep, apparently spontaneously, or in response to sudden sensory / auditory stimuli, and are not specific for any individual sensory modality.] + * Saw-tooth-waves {suggestedTag=Finding-significance-to-recording, suggestedTag=Brain-laterality, suggestedTag=Brain-region, suggestedTag=Sensors, suggestedTag=Finding-amplitude-asymmetry, inLibrary=score} [Vertex negative 2-5 Hz waves occuring in series during REM sleep] + * POSTS {suggestedTag=Finding-significance-to-recording, suggestedTag=Brain-laterality, suggestedTag=Brain-region, suggestedTag=Sensors, suggestedTag=Finding-amplitude-asymmetry, inLibrary=score} [Positive occipital sharp transients of sleep. Sharp transient maximal over the occipital regions, positive relative to other areas, apparently occurring spontaneously during sleep. May be single or repetitive. Amplitude varies but is generally bellow 50 microV.] + * Hypnagogic-hypersynchrony {suggestedTag=Finding-significance-to-recording, suggestedTag=Brain-laterality, suggestedTag=Brain-region, suggestedTag=Sensors, suggestedTag=Finding-amplitude-asymmetry, inLibrary=score} [Bursts of bilateral, synchronous delta or theta activity of large amplitude, occasionally with superimposed faster components, occurring during falling asleep or during awakening, in children.] + * Non-reactive-sleep {inLibrary=score} [EEG activity consisting of normal sleep graphoelements, but which cannot be interrupted by external stimuli/ the patient cannot be waken.] '''Interictal-finding''' {requireChild, inLibrary=score} [EEG pattern / transient that is distinguished form the background activity, considered abnormal, but is not recorded during ictal period (seizure) or postictal period; the presence of an interictal finding does not necessarily imply that the patient has epilepsy.] -* Epileptiform-interictal-activity {suggestedTag=Spike-morphology, suggestedTag=Spike-and-slow-wave-morphology, suggestedTag=Runs-of-rapid-spikes-morphology, suggestedTag=Polyspikes-morphology, suggestedTag=Polyspike-and-slow-wave-morphology, suggestedTag=Sharp-wave-morphology, suggestedTag=Sharp-and-slow-wave-morphology, suggestedTag=Slow-sharp-wave-morphology, suggestedTag=High-frequency-oscillation-morphology, suggestedTag=Hypsarrhythmia-classic-morphology, suggestedTag=Hypsarrhythmia-modified-morphology, suggestedTag=Brain-laterality, suggestedTag=Brain-region, suggestedTag=Sensors, suggestedTag=Finding-propagation, suggestedTag=Multifocal-finding, suggestedTag=Appearance-mode, suggestedTag=Discharge-pattern, suggestedTag=Finding-incidence, inLibrary=score} -* Abnormal-interictal-rhythmic-activity {suggestedTag=Delta-activity-morphology, suggestedTag=Theta-activity-morphology, suggestedTag=Alpha-activity-morphology, suggestedTag=Beta-activity-morphology, suggestedTag=Gamma-activity-morphology, suggestedTag=Polymorphic-delta-activity-morphology, suggestedTag=Frontal-intermittent-rhythmic-delta-activity-morphology, suggestedTag=Occipital-intermittent-rhythmic-delta-activity-morphology, suggestedTag=Temporal-intermittent-rhythmic-delta-activity-morphology, suggestedTag=Brain-laterality, suggestedTag=Brain-region, suggestedTag=Sensors, suggestedTag=Appearance-mode, suggestedTag=Discharge-pattern, suggestedTag=Finding-incidence, inLibrary=score} -* Interictal-special-patterns {requireChild, inLibrary=score} -** Interictal-periodic-discharges {suggestedTag=Periodic-discharges-superimposed-activity, suggestedTag=Periodic-discharge-sharpness, suggestedTag=Number-of-periodic-discharge-phases, suggestedTag=Periodic-discharge-triphasic-morphology, suggestedTag=Periodic-discharge-absolute-amplitude, suggestedTag=Periodic-discharge-relative-amplitude, suggestedTag=Periodic-discharge-polarity, suggestedTag=Brain-laterality, suggestedTag=Brain-region, suggestedTag=Sensors, suggestedTag=Periodic-discharge-duration, suggestedTag=Periodic-discharge-onset, suggestedTag=Periodic-discharge-dynamics, inLibrary=score} [Periodic discharge not further specified (PDs).] -*** Generalized-periodic-discharges {inLibrary=score} [GPDs.] -*** Lateralized-periodic-discharges {inLibrary=score} [LPDs.] -*** Bilateral-independent-periodic-discharges {inLibrary=score} [BIPDs.] -*** Multifocal-periodic-discharges {inLibrary=score} [MfPDs.] -** Extreme-delta-brush {suggestedTag=Brain-laterality, suggestedTag=Brain-region, suggestedTag=Sensors, suggestedTag=Appearance-mode, suggestedTag=Discharge-pattern, inLibrary=score} + * Epileptiform-interictal-activity {suggestedTag=Spike-morphology, suggestedTag=Spike-and-slow-wave-morphology, suggestedTag=Runs-of-rapid-spikes-morphology, suggestedTag=Polyspikes-morphology, suggestedTag=Polyspike-and-slow-wave-morphology, suggestedTag=Sharp-wave-morphology, suggestedTag=Sharp-and-slow-wave-morphology, suggestedTag=Slow-sharp-wave-morphology, suggestedTag=High-frequency-oscillation-morphology, suggestedTag=Hypsarrhythmia-classic-morphology, suggestedTag=Hypsarrhythmia-modified-morphology, suggestedTag=Brain-laterality, suggestedTag=Brain-region, suggestedTag=Sensors, suggestedTag=Finding-propagation, suggestedTag=Multifocal-finding, suggestedTag=Appearance-mode, suggestedTag=Discharge-pattern, suggestedTag=Finding-incidence, inLibrary=score} + * Abnormal-interictal-rhythmic-activity {suggestedTag=Delta-activity-morphology, suggestedTag=Theta-activity-morphology, suggestedTag=Alpha-activity-morphology, suggestedTag=Beta-activity-morphology, suggestedTag=Gamma-activity-morphology, suggestedTag=Polymorphic-delta-activity-morphology, suggestedTag=Frontal-intermittent-rhythmic-delta-activity-morphology, suggestedTag=Occipital-intermittent-rhythmic-delta-activity-morphology, suggestedTag=Temporal-intermittent-rhythmic-delta-activity-morphology, suggestedTag=Brain-laterality, suggestedTag=Brain-region, suggestedTag=Sensors, suggestedTag=Appearance-mode, suggestedTag=Discharge-pattern, suggestedTag=Finding-incidence, inLibrary=score} + * Interictal-special-patterns {requireChild, inLibrary=score} + ** Interictal-periodic-discharges {suggestedTag=Periodic-discharges-superimposed-activity, suggestedTag=Periodic-discharge-sharpness, suggestedTag=Number-of-periodic-discharge-phases, suggestedTag=Periodic-discharge-triphasic-morphology, suggestedTag=Periodic-discharge-absolute-amplitude, suggestedTag=Periodic-discharge-relative-amplitude, suggestedTag=Periodic-discharge-polarity, suggestedTag=Brain-laterality, suggestedTag=Brain-region, suggestedTag=Sensors, suggestedTag=Periodic-discharge-duration, suggestedTag=Periodic-discharge-onset, suggestedTag=Periodic-discharge-dynamics, inLibrary=score} [Periodic discharge not further specified (PDs).] + *** Generalized-periodic-discharges {inLibrary=score} [GPDs.] + *** Lateralized-periodic-discharges {inLibrary=score} [LPDs.] + *** Bilateral-independent-periodic-discharges {inLibrary=score} [BIPDs.] + *** Multifocal-periodic-discharges {inLibrary=score} [MfPDs.] + ** Extreme-delta-brush {suggestedTag=Brain-laterality, suggestedTag=Brain-region, suggestedTag=Sensors, suggestedTag=Appearance-mode, suggestedTag=Discharge-pattern, inLibrary=score} '''Critically-ill-patients-patterns''' {requireChild, inLibrary=score} [Rhythmic or periodic patterns in critically ill patients (RPPs) are scored according to the 2012 version of the American Clinical Neurophysiology Society Standardized Critical Care EEG Terminology (Hirsch et al., 2013).] -* Critically-ill-patients-periodic-discharges {suggestedTag=Periodic-discharges-superimposed-activity, suggestedTag=Periodic-discharge-sharpness, suggestedTag=Number-of-periodic-discharge-phases, suggestedTag=Periodic-discharge-triphasic-morphology, suggestedTag=Periodic-discharge-absolute-amplitude, suggestedTag=Periodic-discharge-relative-amplitude, suggestedTag=Periodic-discharge-polarity, suggestedTag=Brain-laterality, suggestedTag=Brain-region, suggestedTag=Sensors, suggestedTag=Finding-frequency, suggestedTag=Periodic-discharge-duration, suggestedTag=Periodic-discharge-onset, suggestedTag=Periodic-discharge-dynamics, inLibrary=score} [Periodic discharges (PDs).] -* Rhythmic-delta-activity {suggestedTag=Periodic-discharges-superimposed-activity, suggestedTag=Periodic-discharge-absolute-amplitude, suggestedTag=Brain-laterality, suggestedTag=Brain-region, suggestedTag=Sensors, suggestedTag=Finding-frequency, suggestedTag=Periodic-discharge-duration, suggestedTag=Periodic-discharge-onset, suggestedTag=Periodic-discharge-dynamics, inLibrary=score} [RDA] -* Spike-or-sharp-and-wave {suggestedTag=Periodic-discharge-sharpness, suggestedTag=Number-of-periodic-discharge-phases, suggestedTag=Periodic-discharge-triphasic-morphology, suggestedTag=Periodic-discharge-absolute-amplitude, suggestedTag=Periodic-discharge-relative-amplitude, suggestedTag=Periodic-discharge-polarity, suggestedTag=Brain-laterality, suggestedTag=Brain-region, suggestedTag=Sensors, suggestedTag=Multifocal-finding, suggestedTag=Finding-frequency, suggestedTag=Periodic-discharge-duration, suggestedTag=Periodic-discharge-onset, suggestedTag=Periodic-discharge-dynamics, inLibrary=score} [SW] + * Critically-ill-patients-periodic-discharges {suggestedTag=Periodic-discharges-superimposed-activity, suggestedTag=Periodic-discharge-sharpness, suggestedTag=Number-of-periodic-discharge-phases, suggestedTag=Periodic-discharge-triphasic-morphology, suggestedTag=Periodic-discharge-absolute-amplitude, suggestedTag=Periodic-discharge-relative-amplitude, suggestedTag=Periodic-discharge-polarity, suggestedTag=Brain-laterality, suggestedTag=Brain-region, suggestedTag=Sensors, suggestedTag=Finding-frequency, suggestedTag=Periodic-discharge-duration, suggestedTag=Periodic-discharge-onset, suggestedTag=Periodic-discharge-dynamics, inLibrary=score} [Periodic discharges (PDs).] + * Rhythmic-delta-activity {suggestedTag=Periodic-discharges-superimposed-activity, suggestedTag=Periodic-discharge-absolute-amplitude, suggestedTag=Brain-laterality, suggestedTag=Brain-region, suggestedTag=Sensors, suggestedTag=Finding-frequency, suggestedTag=Periodic-discharge-duration, suggestedTag=Periodic-discharge-onset, suggestedTag=Periodic-discharge-dynamics, inLibrary=score} [RDA] + * Spike-or-sharp-and-wave {suggestedTag=Periodic-discharge-sharpness, suggestedTag=Number-of-periodic-discharge-phases, suggestedTag=Periodic-discharge-triphasic-morphology, suggestedTag=Periodic-discharge-absolute-amplitude, suggestedTag=Periodic-discharge-relative-amplitude, suggestedTag=Periodic-discharge-polarity, suggestedTag=Brain-laterality, suggestedTag=Brain-region, suggestedTag=Sensors, suggestedTag=Multifocal-finding, suggestedTag=Finding-frequency, suggestedTag=Periodic-discharge-duration, suggestedTag=Periodic-discharge-onset, suggestedTag=Periodic-discharge-dynamics, inLibrary=score} [SW] '''Episode''' {requireChild, inLibrary=score} [Clinical episode or electrographic seizure.] -* Epileptic-seizure {requireChild, inLibrary=score} -** Focal-onset-epileptic-seizure {suggestedTag=Episode-phase, suggestedTag=Seizure-dynamics, suggestedTag=Episode-consciousness, suggestedTag=Episode-awareness, suggestedTag=Clinical-EEG-temporal-relationship, suggestedTag=Episode-event-count, suggestedTag=State-episode-start, suggestedTag=Episode-postictal-phase, suggestedTag=Episode-prodrome, suggestedTag=Episode-tongue-biting, inLibrary=score} -*** Aware-focal-onset-epileptic-seizure {suggestedTag=Episode-phase, suggestedTag=Seizure-classification, suggestedTag=Seizure-dynamics, suggestedTag=Episode-consciousness, suggestedTag=Episode-awareness, suggestedTag=Clinical-EEG-temporal-relationship, suggestedTag=Episode-event-count, suggestedTag=State-episode-start, suggestedTag=Episode-postictal-phase, suggestedTag=Episode-prodrome, suggestedTag=Episode-tongue-biting, inLibrary=score} -*** Impaired-awareness-focal-onset-epileptic-seizure {suggestedTag=Episode-phase, suggestedTag=Seizure-classification, suggestedTag=Seizure-dynamics, suggestedTag=Episode-consciousness, suggestedTag=Episode-awareness, suggestedTag=Clinical-EEG-temporal-relationship, suggestedTag=Episode-event-count, suggestedTag=State-episode-start, suggestedTag=Episode-postictal-phase, suggestedTag=Episode-prodrome, suggestedTag=Episode-tongue-biting, inLibrary=score} -*** Awareness-unknown-focal-onset-epileptic-seizure {suggestedTag=Episode-phase, suggestedTag=Seizure-classification, suggestedTag=Seizure-dynamics, suggestedTag=Episode-consciousness, suggestedTag=Episode-awareness, suggestedTag=Clinical-EEG-temporal-relationship, suggestedTag=Episode-event-count, suggestedTag=State-episode-start, suggestedTag=Episode-postictal-phase, suggestedTag=Episode-prodrome, suggestedTag=Episode-tongue-biting, inLibrary=score} -*** Focal-to-bilateral-tonic-clonic-focal-onset-epileptic-seizure {suggestedTag=Episode-phase, suggestedTag=Seizure-dynamics, suggestedTag=Episode-consciousness, suggestedTag=Episode-awareness, suggestedTag=Clinical-EEG-temporal-relationship, suggestedTag=Episode-event-count, suggestedTag=State-episode-start, suggestedTag=Episode-postictal-phase, suggestedTag=Episode-prodrome, suggestedTag=Episode-tongue-biting, inLibrary=score} -** Generalized-onset-epileptic-seizure {suggestedTag=Episode-phase, suggestedTag=Seizure-classification, suggestedTag=Seizure-dynamics, suggestedTag=Episode-consciousness, suggestedTag=Episode-awareness, suggestedTag=Clinical-EEG-temporal-relationship, suggestedTag=Episode-event-count, suggestedTag=State-episode-start, suggestedTag=Episode-postictal-phase, suggestedTag=Episode-prodrome, suggestedTag=Episode-tongue-biting, inLibrary=score} -** Unknown-onset-epileptic-seizure {suggestedTag=Episode-phase, suggestedTag=Seizure-classification, suggestedTag=Seizure-dynamics, suggestedTag=Episode-consciousness, suggestedTag=Episode-awareness, suggestedTag=Clinical-EEG-temporal-relationship, suggestedTag=Episode-event-count, suggestedTag=State-episode-start, suggestedTag=Episode-postictal-phase, suggestedTag=Episode-prodrome, suggestedTag=Episode-tongue-biting, inLibrary=score} -** Unclassified-epileptic-seizure {suggestedTag=Episode-phase, suggestedTag=Seizure-dynamics, suggestedTag=Episode-consciousness, suggestedTag=Episode-awareness, suggestedTag=Clinical-EEG-temporal-relationship, suggestedTag=Episode-event-count, suggestedTag=State-episode-start, suggestedTag=Episode-postictal-phase, suggestedTag=Episode-prodrome, suggestedTag=Episode-tongue-biting, inLibrary=score} -* Subtle-seizure {suggestedTag=Episode-phase, suggestedTag=Episode-consciousness, suggestedTag=Episode-awareness, suggestedTag=Clinical-EEG-temporal-relationship, suggestedTag=Episode-event-count, suggestedTag=State-episode-start, suggestedTag=Episode-postictal-phase, suggestedTag=Episode-prodrome, suggestedTag=Episode-tongue-biting, inLibrary=score} [Seizure type frequent in neonates, sometimes referred to as motor automatisms; they may include random and roving eye movements, sucking, chewing motions, tongue protrusion, rowing or swimming or boxing movements of the arms, pedaling and bicycling movements of the lower limbs; apneic seizures are relatively common. Although some subtle seizures are associated with rhythmic ictal EEG discharges, and are clearly epileptic, ictal EEG often does not show typical epileptic activity.] -* Electrographic-seizure {suggestedTag=Episode-phase, suggestedTag=Episode-consciousness, suggestedTag=Episode-awareness, suggestedTag=Clinical-EEG-temporal-relationship, suggestedTag=Episode-event-count, suggestedTag=State-episode-start, suggestedTag=Episode-postictal-phase, suggestedTag=Episode-prodrome, suggestedTag=Episode-tongue-biting, inLibrary=score} [Referred usually to non convulsive status. Ictal EEG: rhythmic discharge or spike and wave pattern with definite evolution in frequency, location, or morphology lasting at least 10 s; evolution in amplitude alone did not qualify.] -* Seizure-PNES {suggestedTag=Episode-phase, suggestedTag=Finding-significance-to-recording, suggestedTag=Episode-consciousness, suggestedTag=Episode-awareness, suggestedTag=Clinical-EEG-temporal-relationship, suggestedTag=Episode-event-count, suggestedTag=State-episode-start, suggestedTag=Episode-postictal-phase, suggestedTag=Episode-prodrome, suggestedTag=Episode-tongue-biting, inLibrary=score} [Psychogenic non-epileptic seizure.] -* Sleep-related-episode {requireChild, inLibrary=score} -** Sleep-related-arousal {suggestedTag=Episode-phase, suggestedTag=Finding-significance-to-recording, suggestedTag=Episode-consciousness, suggestedTag=Episode-awareness, suggestedTag=Clinical-EEG-temporal-relationship, suggestedTag=Episode-event-count, suggestedTag=State-episode-start, suggestedTag=Episode-postictal-phase, suggestedTag=Episode-prodrome, suggestedTag=Episode-tongue-biting, inLibrary=score} [Normal.] -** Benign-sleep-myoclonus {suggestedTag=Episode-phase, suggestedTag=Finding-significance-to-recording, suggestedTag=Episode-consciousness, suggestedTag=Episode-awareness, suggestedTag=Clinical-EEG-temporal-relationship, suggestedTag=Episode-event-count, suggestedTag=State-episode-start, suggestedTag=Episode-postictal-phase, suggestedTag=Episode-prodrome, suggestedTag=Episode-tongue-biting, inLibrary=score} [A distinctive disorder of sleep characterized by a) neonatal onset, b) rhythmic myoclonic jerks only during sleep and c) abrupt and consistent cessation with arousal, d) absence of concomitant electrographic changes suggestive of seizures, and e) good outcome.] -** Confusional-awakening {suggestedTag=Episode-phase, suggestedTag=Finding-significance-to-recording, suggestedTag=Episode-consciousness, suggestedTag=Episode-awareness, suggestedTag=Clinical-EEG-temporal-relationship, suggestedTag=Episode-event-count, suggestedTag=State-episode-start, suggestedTag=Episode-postictal-phase, suggestedTag=Episode-prodrome, suggestedTag=Episode-tongue-biting, inLibrary=score} [Episode of non epileptic nature included in NREM parasomnias, characterized by sudden arousal and complex behavior but without full alertness, usually lasting a few minutes and occurring almost in all children at least occasionally. Amnesia of the episode is the rule.] -** Sleep-periodic-limb-movement {suggestedTag=Episode-phase, suggestedTag=Finding-significance-to-recording, suggestedTag=Episode-consciousness, suggestedTag=Episode-awareness, suggestedTag=Clinical-EEG-temporal-relationship, suggestedTag=Episode-event-count, suggestedTag=State-episode-start, suggestedTag=Episode-postictal-phase, suggestedTag=Episode-prodrome, suggestedTag=Episode-tongue-biting, inLibrary=score} [PLMS. Periodic limb movement in sleep. Episodes are characterized by brief (0.5- to 5.0-second) lower-extremity movements during sleep, which typically occur at 20- to 40-second intervals, most commonly during the first 3 hours of sleep. The affected individual is usually not aware of the movements or of the transient partial arousals.] -** REM-sleep-behavioral-disorder {suggestedTag=Episode-phase, suggestedTag=Finding-significance-to-recording, suggestedTag=Episode-consciousness, suggestedTag=Episode-awareness, suggestedTag=Clinical-EEG-temporal-relationship, suggestedTag=Episode-event-count, suggestedTag=State-episode-start, suggestedTag=Episode-postictal-phase, suggestedTag=Episode-prodrome, suggestedTag=Episode-tongue-biting, inLibrary=score} [REM sleep behavioral disorder. Episodes characterized by: a) presence of REM sleep without atonia (RSWA) on polysomnography (PSG); b) presence of at least 1 of the following conditions - (1) Sleep-related behaviors, by history, that have been injurious, potentially injurious, or disruptive (example: dream enactment behavior); (2) abnormal REM sleep behavior documented during PSG monitoring; (3) absence of epileptiform activity on electroencephalogram (EEG) during REM sleep (unless RBD can be clearly distinguished from any concurrent REM sleep-related seizure disorder); (4) sleep disorder not better explained by another sleep disorder, a medical or neurologic disorder, a mental disorder, medication use, or a substance use disorder.] -** Sleep-walking {suggestedTag=Episode-phase, suggestedTag=Finding-significance-to-recording, suggestedTag=Episode-consciousness, suggestedTag=Episode-awareness, suggestedTag=Clinical-EEG-temporal-relationship, suggestedTag=Episode-event-count, suggestedTag=State-episode-start, suggestedTag=Episode-postictal-phase, suggestedTag=Episode-prodrome, suggestedTag=Episode-tongue-biting, inLibrary=score} [Episodes characterized by ambulation during sleep; the patient is difficult to arouse during an episode, and is usually amnesic following the episode. Episodes usually occur in the first third of the night during slow wave sleep. Polysomnographic recordings demonstrate 2 abnormalities during the first sleep cycle: frequent, brief, non-behavioral EEG-defined arousals prior to the somnambulistic episode and abnormally low gamma (0.75-2.0 Hz) EEG power on spectral analysis, correlating with high-voltage (hyper-synchronic gamma) waves lasting 10 to 15 s occurring just prior to the movement. This is followed by stage I NREM sleep, and there is no evidence of complete awakening.] -* Pediatric-episode {requireChild, inLibrary=score} -** Hyperekplexia {suggestedTag=Episode-phase, suggestedTag=Finding-significance-to-recording, suggestedTag=Episode-consciousness, suggestedTag=Episode-awareness, suggestedTag=Clinical-EEG-temporal-relationship, suggestedTag=Episode-event-count, suggestedTag=State-episode-start, suggestedTag=Episode-postictal-phase, suggestedTag=Episode-prodrome, suggestedTag=Episode-tongue-biting, inLibrary=score} [Disorder characterized by exaggerated startle response and hypertonicity that may occur during the first year of life and in severe cases during the neonatal period. Children usually present with marked irritability and recurrent startles in response to handling and sounds. Severely affected infants can have severe jerks and stiffening, sometimes with breath-holding spells.] -** Jactatio-capitis-nocturna {suggestedTag=Episode-phase, suggestedTag=Finding-significance-to-recording, suggestedTag=Episode-consciousness, suggestedTag=Episode-awareness, suggestedTag=Clinical-EEG-temporal-relationship, suggestedTag=Episode-event-count, suggestedTag=State-episode-start, suggestedTag=Episode-postictal-phase, suggestedTag=Episode-prodrome, suggestedTag=Episode-tongue-biting, inLibrary=score} [Relatively common in normal children at the time of going to bed, especially during the first year of life, the rhythmic head movements persist during sleep. Usually, these phenomena disappear before 3 years of age.] -** Pavor-nocturnus {suggestedTag=Episode-phase, suggestedTag=Finding-significance-to-recording, suggestedTag=Episode-consciousness, suggestedTag=Episode-awareness, suggestedTag=Clinical-EEG-temporal-relationship, suggestedTag=Episode-event-count, suggestedTag=State-episode-start, suggestedTag=Episode-postictal-phase, suggestedTag=Episode-prodrome, suggestedTag=Episode-tongue-biting, inLibrary=score} [A nocturnal episode characterized by age of onset of less than five years (mean age 18 months, with peak prevalence at five to seven years), appearance of signs of panic two hours after falling asleep with crying, screams, a fearful expression, inability to recognize other people including parents (for a duration of 5-15 minutes), amnesia upon awakening. Pavor nocturnus occurs in patients almost every night for months or years (but the frequency is highly variable and may be as low as once a month) and is likely to disappear spontaneously at the age of six to eight years.] -** Pediatric-stereotypical-behavior-episode {suggestedTag=Episode-phase, suggestedTag=Finding-significance-to-recording, suggestedTag=Episode-consciousness, suggestedTag=Episode-awareness, suggestedTag=Clinical-EEG-temporal-relationship, suggestedTag=Episode-event-count, suggestedTag=State-episode-start, suggestedTag=Episode-postictal-phase, suggestedTag=Episode-prodrome, suggestedTag=Episode-tongue-biting, inLibrary=score} [Repetitive motor behavior in children, typically rhythmic and persistent; usually not paroxysmal and rarely suggest epilepsy. They include headbanging, head-rolling, jactatio capitis nocturna, body rocking, buccal or lingual movements, hand flapping and related mannerisms, repetitive hand-waving (to self-induce photosensitive seizures).] -* Paroxysmal-motor-event {suggestedTag=Episode-phase, suggestedTag=Finding-significance-to-recording, suggestedTag=Episode-consciousness, suggestedTag=Episode-awareness, suggestedTag=Clinical-EEG-temporal-relationship, suggestedTag=Episode-event-count, suggestedTag=State-episode-start, suggestedTag=Episode-postictal-phase, suggestedTag=Episode-prodrome, suggestedTag=Episode-tongue-biting, inLibrary=score} [Paroxysmal phenomena during neonatal or childhood periods characterized by recurrent motor or behavioral signs or symptoms that must be distinguishes from epileptic disorders.] -* Syncope {suggestedTag=Episode-phase, suggestedTag=Finding-significance-to-recording, suggestedTag=Episode-consciousness, suggestedTag=Episode-awareness, suggestedTag=Clinical-EEG-temporal-relationship, suggestedTag=Episode-event-count, suggestedTag=State-episode-start, suggestedTag=Episode-postictal-phase, suggestedTag=Episode-prodrome, suggestedTag=Episode-tongue-biting, inLibrary=score} [Episode with loss of consciousness and muscle tone that is abrupt in onset, of short duration and followed by rapid recovery; it occurs in response to transient impairment of cerebral perfusion. Typical prodromal symptoms often herald onset of syncope and postictal symptoms are minimal. Syncopal convulsions resulting from cerebral anoxia are common but are not a form of epilepsy, nor are there any accompanying EEG ictal discharges.] -* Cataplexy {suggestedTag=Episode-phase, suggestedTag=Finding-significance-to-recording, suggestedTag=Episode-consciousness, suggestedTag=Episode-awareness, suggestedTag=Clinical-EEG-temporal-relationship, suggestedTag=Episode-event-count, suggestedTag=State-episode-start, suggestedTag=Episode-postictal-phase, suggestedTag=Episode-prodrome, suggestedTag=Episode-tongue-biting, inLibrary=score} [A sudden decrement in muscle tone and loss of deep tendon reflexes, leading to muscle weakness, paralysis, or postural collapse. Cataplexy usually is precipitated by an outburst of emotional expression-notably laughter, anger, or startle. It is one of the tetrad of symptoms of narcolepsy. During cataplexy, respiration and voluntary eye movements are not compromised. Consciousness is preserved.] -* Other-episode {requireChild, inLibrary=score} -** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] + * Epileptic-seizure {requireChild, inLibrary=score} + ** Focal-onset-epileptic-seizure {suggestedTag=Episode-phase, suggestedTag=Seizure-dynamics, suggestedTag=Episode-consciousness, suggestedTag=Episode-awareness, suggestedTag=Clinical-EEG-temporal-relationship, suggestedTag=Episode-event-count, suggestedTag=State-episode-start, suggestedTag=Episode-postictal-phase, suggestedTag=Episode-prodrome, suggestedTag=Episode-tongue-biting, inLibrary=score} + *** Aware-focal-onset-epileptic-seizure {suggestedTag=Episode-phase, suggestedTag=Seizure-classification, suggestedTag=Seizure-dynamics, suggestedTag=Episode-consciousness, suggestedTag=Episode-awareness, suggestedTag=Clinical-EEG-temporal-relationship, suggestedTag=Episode-event-count, suggestedTag=State-episode-start, suggestedTag=Episode-postictal-phase, suggestedTag=Episode-prodrome, suggestedTag=Episode-tongue-biting, inLibrary=score} + *** Impaired-awareness-focal-onset-epileptic-seizure {suggestedTag=Episode-phase, suggestedTag=Seizure-classification, suggestedTag=Seizure-dynamics, suggestedTag=Episode-consciousness, suggestedTag=Episode-awareness, suggestedTag=Clinical-EEG-temporal-relationship, suggestedTag=Episode-event-count, suggestedTag=State-episode-start, suggestedTag=Episode-postictal-phase, suggestedTag=Episode-prodrome, suggestedTag=Episode-tongue-biting, inLibrary=score} + *** Awareness-unknown-focal-onset-epileptic-seizure {suggestedTag=Episode-phase, suggestedTag=Seizure-classification, suggestedTag=Seizure-dynamics, suggestedTag=Episode-consciousness, suggestedTag=Episode-awareness, suggestedTag=Clinical-EEG-temporal-relationship, suggestedTag=Episode-event-count, suggestedTag=State-episode-start, suggestedTag=Episode-postictal-phase, suggestedTag=Episode-prodrome, suggestedTag=Episode-tongue-biting, inLibrary=score} + *** Focal-to-bilateral-tonic-clonic-focal-onset-epileptic-seizure {suggestedTag=Episode-phase, suggestedTag=Seizure-dynamics, suggestedTag=Episode-consciousness, suggestedTag=Episode-awareness, suggestedTag=Clinical-EEG-temporal-relationship, suggestedTag=Episode-event-count, suggestedTag=State-episode-start, suggestedTag=Episode-postictal-phase, suggestedTag=Episode-prodrome, suggestedTag=Episode-tongue-biting, inLibrary=score} + ** Generalized-onset-epileptic-seizure {suggestedTag=Episode-phase, suggestedTag=Seizure-classification, suggestedTag=Seizure-dynamics, suggestedTag=Episode-consciousness, suggestedTag=Episode-awareness, suggestedTag=Clinical-EEG-temporal-relationship, suggestedTag=Episode-event-count, suggestedTag=State-episode-start, suggestedTag=Episode-postictal-phase, suggestedTag=Episode-prodrome, suggestedTag=Episode-tongue-biting, inLibrary=score} + ** Unknown-onset-epileptic-seizure {suggestedTag=Episode-phase, suggestedTag=Seizure-classification, suggestedTag=Seizure-dynamics, suggestedTag=Episode-consciousness, suggestedTag=Episode-awareness, suggestedTag=Clinical-EEG-temporal-relationship, suggestedTag=Episode-event-count, suggestedTag=State-episode-start, suggestedTag=Episode-postictal-phase, suggestedTag=Episode-prodrome, suggestedTag=Episode-tongue-biting, inLibrary=score} + ** Unclassified-epileptic-seizure {suggestedTag=Episode-phase, suggestedTag=Seizure-dynamics, suggestedTag=Episode-consciousness, suggestedTag=Episode-awareness, suggestedTag=Clinical-EEG-temporal-relationship, suggestedTag=Episode-event-count, suggestedTag=State-episode-start, suggestedTag=Episode-postictal-phase, suggestedTag=Episode-prodrome, suggestedTag=Episode-tongue-biting, inLibrary=score} + * Subtle-seizure {suggestedTag=Episode-phase, suggestedTag=Episode-consciousness, suggestedTag=Episode-awareness, suggestedTag=Clinical-EEG-temporal-relationship, suggestedTag=Episode-event-count, suggestedTag=State-episode-start, suggestedTag=Episode-postictal-phase, suggestedTag=Episode-prodrome, suggestedTag=Episode-tongue-biting, inLibrary=score} [Seizure type frequent in neonates, sometimes referred to as motor automatisms; they may include random and roving eye movements, sucking, chewing motions, tongue protrusion, rowing or swimming or boxing movements of the arms, pedaling and bicycling movements of the lower limbs; apneic seizures are relatively common. Although some subtle seizures are associated with rhythmic ictal EEG discharges, and are clearly epileptic, ictal EEG often does not show typical epileptic activity.] + * Electrographic-seizure {suggestedTag=Episode-phase, suggestedTag=Episode-consciousness, suggestedTag=Episode-awareness, suggestedTag=Clinical-EEG-temporal-relationship, suggestedTag=Episode-event-count, suggestedTag=State-episode-start, suggestedTag=Episode-postictal-phase, suggestedTag=Episode-prodrome, suggestedTag=Episode-tongue-biting, inLibrary=score} [Referred usually to non convulsive status. Ictal EEG: rhythmic discharge or spike and wave pattern with definite evolution in frequency, location, or morphology lasting at least 10 s; evolution in amplitude alone did not qualify.] + * Seizure-PNES {suggestedTag=Episode-phase, suggestedTag=Finding-significance-to-recording, suggestedTag=Episode-consciousness, suggestedTag=Episode-awareness, suggestedTag=Clinical-EEG-temporal-relationship, suggestedTag=Episode-event-count, suggestedTag=State-episode-start, suggestedTag=Episode-postictal-phase, suggestedTag=Episode-prodrome, suggestedTag=Episode-tongue-biting, inLibrary=score} [Psychogenic non-epileptic seizure.] + * Sleep-related-episode {requireChild, inLibrary=score} + ** Sleep-related-arousal {suggestedTag=Episode-phase, suggestedTag=Finding-significance-to-recording, suggestedTag=Episode-consciousness, suggestedTag=Episode-awareness, suggestedTag=Clinical-EEG-temporal-relationship, suggestedTag=Episode-event-count, suggestedTag=State-episode-start, suggestedTag=Episode-postictal-phase, suggestedTag=Episode-prodrome, suggestedTag=Episode-tongue-biting, inLibrary=score} [Normal.] + ** Benign-sleep-myoclonus {suggestedTag=Episode-phase, suggestedTag=Finding-significance-to-recording, suggestedTag=Episode-consciousness, suggestedTag=Episode-awareness, suggestedTag=Clinical-EEG-temporal-relationship, suggestedTag=Episode-event-count, suggestedTag=State-episode-start, suggestedTag=Episode-postictal-phase, suggestedTag=Episode-prodrome, suggestedTag=Episode-tongue-biting, inLibrary=score} [A distinctive disorder of sleep characterized by a) neonatal onset, b) rhythmic myoclonic jerks only during sleep and c) abrupt and consistent cessation with arousal, d) absence of concomitant electrographic changes suggestive of seizures, and e) good outcome.] + ** Confusional-awakening {suggestedTag=Episode-phase, suggestedTag=Finding-significance-to-recording, suggestedTag=Episode-consciousness, suggestedTag=Episode-awareness, suggestedTag=Clinical-EEG-temporal-relationship, suggestedTag=Episode-event-count, suggestedTag=State-episode-start, suggestedTag=Episode-postictal-phase, suggestedTag=Episode-prodrome, suggestedTag=Episode-tongue-biting, inLibrary=score} [Episode of non epileptic nature included in NREM parasomnias, characterized by sudden arousal and complex behavior but without full alertness, usually lasting a few minutes and occurring almost in all children at least occasionally. Amnesia of the episode is the rule.] + ** Sleep-periodic-limb-movement {suggestedTag=Episode-phase, suggestedTag=Finding-significance-to-recording, suggestedTag=Episode-consciousness, suggestedTag=Episode-awareness, suggestedTag=Clinical-EEG-temporal-relationship, suggestedTag=Episode-event-count, suggestedTag=State-episode-start, suggestedTag=Episode-postictal-phase, suggestedTag=Episode-prodrome, suggestedTag=Episode-tongue-biting, inLibrary=score} [PLMS. Periodic limb movement in sleep. Episodes are characterized by brief (0.5- to 5.0-second) lower-extremity movements during sleep, which typically occur at 20- to 40-second intervals, most commonly during the first 3 hours of sleep. The affected individual is usually not aware of the movements or of the transient partial arousals.] + ** REM-sleep-behavioral-disorder {suggestedTag=Episode-phase, suggestedTag=Finding-significance-to-recording, suggestedTag=Episode-consciousness, suggestedTag=Episode-awareness, suggestedTag=Clinical-EEG-temporal-relationship, suggestedTag=Episode-event-count, suggestedTag=State-episode-start, suggestedTag=Episode-postictal-phase, suggestedTag=Episode-prodrome, suggestedTag=Episode-tongue-biting, inLibrary=score} [REM sleep behavioral disorder. Episodes characterized by: a) presence of REM sleep without atonia (RSWA) on polysomnography (PSG); b) presence of at least 1 of the following conditions - (1) Sleep-related behaviors, by history, that have been injurious, potentially injurious, or disruptive (example: dream enactment behavior); (2) abnormal REM sleep behavior documented during PSG monitoring; (3) absence of epileptiform activity on electroencephalogram (EEG) during REM sleep (unless RBD can be clearly distinguished from any concurrent REM sleep-related seizure disorder); (4) sleep disorder not better explained by another sleep disorder, a medical or neurologic disorder, a mental disorder, medication use, or a substance use disorder.] + ** Sleep-walking {suggestedTag=Episode-phase, suggestedTag=Finding-significance-to-recording, suggestedTag=Episode-consciousness, suggestedTag=Episode-awareness, suggestedTag=Clinical-EEG-temporal-relationship, suggestedTag=Episode-event-count, suggestedTag=State-episode-start, suggestedTag=Episode-postictal-phase, suggestedTag=Episode-prodrome, suggestedTag=Episode-tongue-biting, inLibrary=score} [Episodes characterized by ambulation during sleep; the patient is difficult to arouse during an episode, and is usually amnesic following the episode. Episodes usually occur in the first third of the night during slow wave sleep. Polysomnographic recordings demonstrate 2 abnormalities during the first sleep cycle: frequent, brief, non-behavioral EEG-defined arousals prior to the somnambulistic episode and abnormally low gamma (0.75-2.0 Hz) EEG power on spectral analysis, correlating with high-voltage (hyper-synchronic gamma) waves lasting 10 to 15 s occurring just prior to the movement. This is followed by stage I NREM sleep, and there is no evidence of complete awakening.] + * Pediatric-episode {requireChild, inLibrary=score} + ** Hyperekplexia {suggestedTag=Episode-phase, suggestedTag=Finding-significance-to-recording, suggestedTag=Episode-consciousness, suggestedTag=Episode-awareness, suggestedTag=Clinical-EEG-temporal-relationship, suggestedTag=Episode-event-count, suggestedTag=State-episode-start, suggestedTag=Episode-postictal-phase, suggestedTag=Episode-prodrome, suggestedTag=Episode-tongue-biting, inLibrary=score} [Disorder characterized by exaggerated startle response and hypertonicity that may occur during the first year of life and in severe cases during the neonatal period. Children usually present with marked irritability and recurrent startles in response to handling and sounds. Severely affected infants can have severe jerks and stiffening, sometimes with breath-holding spells.] + ** Jactatio-capitis-nocturna {suggestedTag=Episode-phase, suggestedTag=Finding-significance-to-recording, suggestedTag=Episode-consciousness, suggestedTag=Episode-awareness, suggestedTag=Clinical-EEG-temporal-relationship, suggestedTag=Episode-event-count, suggestedTag=State-episode-start, suggestedTag=Episode-postictal-phase, suggestedTag=Episode-prodrome, suggestedTag=Episode-tongue-biting, inLibrary=score} [Relatively common in normal children at the time of going to bed, especially during the first year of life, the rhythmic head movements persist during sleep. Usually, these phenomena disappear before 3 years of age.] + ** Pavor-nocturnus {suggestedTag=Episode-phase, suggestedTag=Finding-significance-to-recording, suggestedTag=Episode-consciousness, suggestedTag=Episode-awareness, suggestedTag=Clinical-EEG-temporal-relationship, suggestedTag=Episode-event-count, suggestedTag=State-episode-start, suggestedTag=Episode-postictal-phase, suggestedTag=Episode-prodrome, suggestedTag=Episode-tongue-biting, inLibrary=score} [A nocturnal episode characterized by age of onset of less than five years (mean age 18 months, with peak prevalence at five to seven years), appearance of signs of panic two hours after falling asleep with crying, screams, a fearful expression, inability to recognize other people including parents (for a duration of 5-15 minutes), amnesia upon awakening. Pavor nocturnus occurs in patients almost every night for months or years (but the frequency is highly variable and may be as low as once a month) and is likely to disappear spontaneously at the age of six to eight years.] + ** Pediatric-stereotypical-behavior-episode {suggestedTag=Episode-phase, suggestedTag=Finding-significance-to-recording, suggestedTag=Episode-consciousness, suggestedTag=Episode-awareness, suggestedTag=Clinical-EEG-temporal-relationship, suggestedTag=Episode-event-count, suggestedTag=State-episode-start, suggestedTag=Episode-postictal-phase, suggestedTag=Episode-prodrome, suggestedTag=Episode-tongue-biting, inLibrary=score} [Repetitive motor behavior in children, typically rhythmic and persistent; usually not paroxysmal and rarely suggest epilepsy. They include headbanging, head-rolling, jactatio capitis nocturna, body rocking, buccal or lingual movements, hand flapping and related mannerisms, repetitive hand-waving (to self-induce photosensitive seizures).] + * Paroxysmal-motor-event {suggestedTag=Episode-phase, suggestedTag=Finding-significance-to-recording, suggestedTag=Episode-consciousness, suggestedTag=Episode-awareness, suggestedTag=Clinical-EEG-temporal-relationship, suggestedTag=Episode-event-count, suggestedTag=State-episode-start, suggestedTag=Episode-postictal-phase, suggestedTag=Episode-prodrome, suggestedTag=Episode-tongue-biting, inLibrary=score} [Paroxysmal phenomena during neonatal or childhood periods characterized by recurrent motor or behavioral signs or symptoms that must be distinguishes from epileptic disorders.] + * Syncope {suggestedTag=Episode-phase, suggestedTag=Finding-significance-to-recording, suggestedTag=Episode-consciousness, suggestedTag=Episode-awareness, suggestedTag=Clinical-EEG-temporal-relationship, suggestedTag=Episode-event-count, suggestedTag=State-episode-start, suggestedTag=Episode-postictal-phase, suggestedTag=Episode-prodrome, suggestedTag=Episode-tongue-biting, inLibrary=score} [Episode with loss of consciousness and muscle tone that is abrupt in onset, of short duration and followed by rapid recovery; it occurs in response to transient impairment of cerebral perfusion. Typical prodromal symptoms often herald onset of syncope and postictal symptoms are minimal. Syncopal convulsions resulting from cerebral anoxia are common but are not a form of epilepsy, nor are there any accompanying EEG ictal discharges.] + * Cataplexy {suggestedTag=Episode-phase, suggestedTag=Finding-significance-to-recording, suggestedTag=Episode-consciousness, suggestedTag=Episode-awareness, suggestedTag=Clinical-EEG-temporal-relationship, suggestedTag=Episode-event-count, suggestedTag=State-episode-start, suggestedTag=Episode-postictal-phase, suggestedTag=Episode-prodrome, suggestedTag=Episode-tongue-biting, inLibrary=score} [A sudden decrement in muscle tone and loss of deep tendon reflexes, leading to muscle weakness, paralysis, or postural collapse. Cataplexy usually is precipitated by an outburst of emotional expression-notably laughter, anger, or startle. It is one of the tetrad of symptoms of narcolepsy. During cataplexy, respiration and voluntary eye movements are not compromised. Consciousness is preserved.] + * Other-episode {requireChild, inLibrary=score} + ** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] '''Physiologic-pattern''' {requireChild, inLibrary=score} [EEG graphoelements or rhythms that are considered normal. They only should be scored if the physician considers that they have a specific clinical significance for the recording.] -* Rhythmic-activity-pattern {suggestedTag=Delta-activity-morphology, suggestedTag=Theta-activity-morphology, suggestedTag=Alpha-activity-morphology, suggestedTag=Beta-activity-morphology, suggestedTag=Gamma-activity-morphology, suggestedTag=Brain-laterality, suggestedTag=Brain-region, suggestedTag=Sensors, suggestedTag=Appearance-mode, suggestedTag=Discharge-pattern, inLibrary=score} [Not further specified.] -* Slow-alpha-variant-rhythm {suggestedTag=Brain-laterality, suggestedTag=Brain-region, suggestedTag=Sensors, suggestedTag=Appearance-mode, suggestedTag=Discharge-pattern, inLibrary=score} [Characteristic rhythms mostly at 4-5 Hz, recorded most prominently over the posterior regions of the head. Generally alternate, or are intermixed, with alpha rhythm to which they often are harmonically related. Amplitude varies but is frequently close to 50 micro V. Blocked or attenuated by attention, especially visual, and mental effort. Comment: slow alpha variant rhythms should be distinguished from posterior slow waves characteristic of children and adolescents and occasionally seen in young adults.] -* Fast-alpha-variant-rhythm {suggestedTag=Appearance-mode, suggestedTag=Discharge-pattern, inLibrary=score} [Characteristic rhythm at 14-20 Hz, detected most prominently over the posterior regions of the head. May alternate or be intermixed with alpha rhythm. Blocked or attenuated by attention, especially visual, and mental effort.] -* Ciganek-rhythm {suggestedTag=Brain-laterality, suggestedTag=Brain-region, suggestedTag=Sensors, suggestedTag=Appearance-mode, suggestedTag=Discharge-pattern, inLibrary=score} [Midline theta rhythm (Ciganek rhythm) may be observed during wakefulness or drowsiness. The frequency is 4-7 Hz, and the location is midline (ie, vertex). The morphology is rhythmic, smooth, sinusoidal, arciform, spiky, or mu-like.] -* Lambda-wave {suggestedTag=Brain-laterality, suggestedTag=Brain-region, suggestedTag=Sensors, suggestedTag=Appearance-mode, suggestedTag=Discharge-pattern, inLibrary=score} [Diphasic sharp transient occurring over occipital regions of the head of waking subjects during visual exploration. The main component is positive relative to other areas. Time-locked to saccadic eye movement. Amplitude varies but is generally below 50 micro V.] -* Posterior-slow-waves-youth {suggestedTag=Brain-laterality, suggestedTag=Brain-region, suggestedTag=Sensors, suggestedTag=Appearance-mode, suggestedTag=Discharge-pattern, inLibrary=score} [Waves in the delta and theta range, of variable form, lasting 0.35 to 0.5 s or longer without any consistent periodicity, found in the range of 6-12 years (occasionally seen in young adults). Alpha waves are almost always intermingled or superimposed. Reactive similar to alpha activity.] -* Diffuse-slowing-hyperventilation {suggestedTag=Brain-laterality, suggestedTag=Brain-region, suggestedTag=Sensors, suggestedTag=Appearance-mode, suggestedTag=Discharge-pattern, inLibrary=score} [Diffuse slowing induced by hyperventilation. Bilateral, diffuse slowing during hyperventilation. Recorded in 70 percent of normal children (3-5 years) and less then 10 percent of adults. Usually appear in the posterior regions and spread forward in younger age group, whereas they tend to appear in the frontal regions and spread backward in the older age group.] -* Photic-driving {suggestedTag=Brain-laterality, suggestedTag=Brain-region, suggestedTag=Sensors, suggestedTag=Appearance-mode, suggestedTag=Discharge-pattern, inLibrary=score} [Physiologic response consisting of rhythmic activity elicited over the posterior regions of the head by repetitive photic stimulation at frequencies of about 5-30 Hz. Comments: term should be limited to activity time-locked to the stimulus and of frequency identical or harmonically related to the stimulus frequency. Photic driving should be distinguished from the visual evoked potentials elicited by isolated flashes of light or flashes repeated at very low frequency.] -* Photomyogenic-response {suggestedTag=Brain-laterality, suggestedTag=Brain-region, suggestedTag=Sensors, suggestedTag=Appearance-mode, suggestedTag=Discharge-pattern, inLibrary=score} [A response to intermittent photic stimulation characterized by the appearance in the record of brief, repetitive muscular artifacts (spikes) over the anterior regions of the head. These often increase gradually in amplitude as stimuli are continued and cease promptly when the stimulus is withdrawn. Comment: this response is frequently associated with flutter of the eyelids and vertical oscillations of the eyeballs and sometimes with discrete jerking mostly involving the musculature of the face and head. (Preferred to synonym: photo-myoclonic response).] -* Other-physiologic-pattern {requireChild, inLibrary=score} -** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] + * Rhythmic-activity-pattern {suggestedTag=Delta-activity-morphology, suggestedTag=Theta-activity-morphology, suggestedTag=Alpha-activity-morphology, suggestedTag=Beta-activity-morphology, suggestedTag=Gamma-activity-morphology, suggestedTag=Brain-laterality, suggestedTag=Brain-region, suggestedTag=Sensors, suggestedTag=Appearance-mode, suggestedTag=Discharge-pattern, inLibrary=score} [Not further specified.] + * Slow-alpha-variant-rhythm {suggestedTag=Brain-laterality, suggestedTag=Brain-region, suggestedTag=Sensors, suggestedTag=Appearance-mode, suggestedTag=Discharge-pattern, inLibrary=score} [Characteristic rhythms mostly at 4-5 Hz, recorded most prominently over the posterior regions of the head. Generally alternate, or are intermixed, with alpha rhythm to which they often are harmonically related. Amplitude varies but is frequently close to 50 micro V. Blocked or attenuated by attention, especially visual, and mental effort. Comment: slow alpha variant rhythms should be distinguished from posterior slow waves characteristic of children and adolescents and occasionally seen in young adults.] + * Fast-alpha-variant-rhythm {suggestedTag=Appearance-mode, suggestedTag=Discharge-pattern, inLibrary=score} [Characteristic rhythm at 14-20 Hz, detected most prominently over the posterior regions of the head. May alternate or be intermixed with alpha rhythm. Blocked or attenuated by attention, especially visual, and mental effort.] + * Ciganek-rhythm {suggestedTag=Brain-laterality, suggestedTag=Brain-region, suggestedTag=Sensors, suggestedTag=Appearance-mode, suggestedTag=Discharge-pattern, inLibrary=score} [Midline theta rhythm (Ciganek rhythm) may be observed during wakefulness or drowsiness. The frequency is 4-7 Hz, and the location is midline (ie, vertex). The morphology is rhythmic, smooth, sinusoidal, arciform, spiky, or mu-like.] + * Lambda-wave {suggestedTag=Brain-laterality, suggestedTag=Brain-region, suggestedTag=Sensors, suggestedTag=Appearance-mode, suggestedTag=Discharge-pattern, inLibrary=score} [Diphasic sharp transient occurring over occipital regions of the head of waking subjects during visual exploration. The main component is positive relative to other areas. Time-locked to saccadic eye movement. Amplitude varies but is generally below 50 micro V.] + * Posterior-slow-waves-youth {suggestedTag=Brain-laterality, suggestedTag=Brain-region, suggestedTag=Sensors, suggestedTag=Appearance-mode, suggestedTag=Discharge-pattern, inLibrary=score} [Waves in the delta and theta range, of variable form, lasting 0.35 to 0.5 s or longer without any consistent periodicity, found in the range of 6-12 years (occasionally seen in young adults). Alpha waves are almost always intermingled or superimposed. Reactive similar to alpha activity.] + * Diffuse-slowing-hyperventilation {suggestedTag=Brain-laterality, suggestedTag=Brain-region, suggestedTag=Sensors, suggestedTag=Appearance-mode, suggestedTag=Discharge-pattern, inLibrary=score} [Diffuse slowing induced by hyperventilation. Bilateral, diffuse slowing during hyperventilation. Recorded in 70 percent of normal children (3-5 years) and less then 10 percent of adults. Usually appear in the posterior regions and spread forward in younger age group, whereas they tend to appear in the frontal regions and spread backward in the older age group.] + * Photic-driving {suggestedTag=Brain-laterality, suggestedTag=Brain-region, suggestedTag=Sensors, suggestedTag=Appearance-mode, suggestedTag=Discharge-pattern, inLibrary=score} [Physiologic response consisting of rhythmic activity elicited over the posterior regions of the head by repetitive photic stimulation at frequencies of about 5-30 Hz. Comments: term should be limited to activity time-locked to the stimulus and of frequency identical or harmonically related to the stimulus frequency. Photic driving should be distinguished from the visual evoked potentials elicited by isolated flashes of light or flashes repeated at very low frequency.] + * Photomyogenic-response {suggestedTag=Brain-laterality, suggestedTag=Brain-region, suggestedTag=Sensors, suggestedTag=Appearance-mode, suggestedTag=Discharge-pattern, inLibrary=score} [A response to intermittent photic stimulation characterized by the appearance in the record of brief, repetitive muscular artifacts (spikes) over the anterior regions of the head. These often increase gradually in amplitude as stimuli are continued and cease promptly when the stimulus is withdrawn. Comment: this response is frequently associated with flutter of the eyelids and vertical oscillations of the eyeballs and sometimes with discrete jerking mostly involving the musculature of the face and head. (Preferred to synonym: photo-myoclonic response).] + * Other-physiologic-pattern {requireChild, inLibrary=score} + ** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] '''Uncertain-significant-pattern''' {requireChild, inLibrary=score} [EEG graphoelements or rhythms that resemble abnormal patterns but that are not necessarily associated with a pathology, and the physician does not consider them abnormal in the context of the scored recording (like normal variants and patterns).] -* Sharp-transient-pattern {suggestedTag=Brain-laterality, suggestedTag=Brain-region, suggestedTag=Sensors, suggestedTag=Appearance-mode, suggestedTag=Discharge-pattern, inLibrary=score} -* Wicket-spikes {inLibrary=score} [Spike-like monophasic negative single waves or trains of waves occurring over the temporal regions during drowsiness that have an arcuate or mu-like appearance. These are mainly seen in older individuals and represent a benign variant that is of little clinical significance.] -* Small-sharp-spikes {suggestedTag=Brain-laterality, suggestedTag=Brain-region, suggestedTag=Sensors, suggestedTag=Appearance-mode, suggestedTag=Discharge-pattern, inLibrary=score} [Benign epileptiform Transients of Sleep (BETS). Small sharp spikes (SSS) of very short duration and low amplitude, often followed by a small theta wave, occurring in the temporal regions during drowsiness and light sleep. They occur on one or both sides (often asynchronously). The main negative and positive components are of about equally spiky character. Rarely seen in children, they are seen most often in adults and the elderly. Two thirds of the patients have a history of epileptic seizures.] -* Fourteen-six-Hz-positive-burst {suggestedTag=Brain-laterality, suggestedTag=Brain-region, suggestedTag=Sensors, suggestedTag=Appearance-mode, suggestedTag=Discharge-pattern, inLibrary=score} [Burst of arch-shaped waves at 13-17 Hz and/or 5-7-Hz but most commonly at 14 and or 6 Hz seen generally over the posterior temporal and adjacent areas of one or both sides of the head during sleep. The sharp peaks of its component waves are positive with respect to other regions. Amplitude varies but is generally below 75 micro V. Comments: (1) best demonstrated by referential recording using contralateral earlobe or other remote, reference electrodes. (2) This pattern has no established clinical significance.] -* Six-Hz-spike-slow-wave {suggestedTag=Brain-laterality, suggestedTag=Brain-region, suggestedTag=Sensors, suggestedTag=Appearance-mode, suggestedTag=Discharge-pattern, inLibrary=score} [Spike and slow wave complexes at 4-7Hz, but mostly at 6 Hz occurring generally in brief bursts bilaterally and synchronously, symmetrically or asymmetrically, and either confined to or of larger amplitude over the posterior or anterior regions of the head. The spike has a strong positive component. Amplitude varies but is generally smaller than that of spike-and slow-wave complexes repeating at slower rates. Comment: this pattern should be distinguished from epileptiform discharges. Synonym: wave and spike phantom.] -* Rudimentary-spike-wave-complex {suggestedTag=Brain-laterality, suggestedTag=Brain-region, suggestedTag=Sensors, suggestedTag=Appearance-mode, suggestedTag=Discharge-pattern, inLibrary=score} [Synonym: Pseudo petit mal discharge. Paroxysmal discharge that consists of generalized or nearly generalized high voltage 3 to 4/sec waves with poorly developed spike in the positive trough between the slow waves, occurring in drowsiness only. It is found only in infancy and early childhood when marked hypnagogic rhythmical theta activity is paramount in the drowsy state.] -* Slow-fused-transient {suggestedTag=Brain-laterality, suggestedTag=Brain-region, suggestedTag=Sensors, suggestedTag=Appearance-mode, suggestedTag=Discharge-pattern, inLibrary=score} [A posterior slow-wave preceded by a sharp-contoured potential that blends together with the ensuing slow wave, in children.] -* Needle-like-occipital-spikes-blind {suggestedTag=Brain-laterality, suggestedTag=Brain-region, suggestedTag=Sensors, suggestedTag=Appearance-mode, suggestedTag=Discharge-pattern, inLibrary=score} [Spike discharges of a particularly fast and needle-like character develop over the occipital region in most congenitally blind children. Completely disappear during childhood or adolescence.] -* Subclinical-rhythmic-EEG-discharge-adults {suggestedTag=Brain-laterality, suggestedTag=Brain-region, suggestedTag=Sensors, suggestedTag=Appearance-mode, suggestedTag=Discharge-pattern, inLibrary=score} [Subclinical rhythmic EEG discharge of adults (SERDA). A rhythmic pattern seen in the adult age group, mainly in the waking state or drowsiness. It consists of a mixture of frequencies, often predominant in the theta range. The onset may be fairly abrupt with widespread sharp rhythmical theta and occasionally with delta activity. As to the spatial distribution, a maximum of this discharge is usually found over the centroparietal region and especially over the vertex. It may resemble a seizure discharge but is not accompanied by any clinical signs or symptoms.] -* Rhythmic-temporal-theta-burst-drowsiness {inLibrary=score} [Rhythmic temporal theta burst of drowsiness (RTTD). Characteristic burst of 4-7 Hz waves frequently notched by faster waves, occurring over the temporal regions of the head during drowsiness. Synonym: psychomotor variant pattern. Comment: this is a pattern of drowsiness that is of no clinical significance.] -* Temporal-slowing-elderly {suggestedTag=Brain-laterality, suggestedTag=Brain-region, suggestedTag=Sensors, suggestedTag=Appearance-mode, suggestedTag=Discharge-pattern, inLibrary=score} [Focal theta and/or delta activity over the temporal regions, especially the left, in persons over the age of 60. Amplitudes are low/similar to the background activity. Comment: focal temporal theta was found in 20 percent of people between the ages of 40-59 years, and 40 percent of people between 60 and 79 years. One third of people older than 60 years had focal temporal delta activity.] -* Breach-rhythm {suggestedTag=Brain-laterality, suggestedTag=Brain-region, suggestedTag=Sensors, suggestedTag=Appearance-mode, suggestedTag=Discharge-pattern, inLibrary=score} [Rhythmical activity recorded over cranial bone defects. Usually it is in the 6 to 11/sec range, does not respond to movements.] -* Other-uncertain-significant-pattern {requireChild, inLibrary=score} -** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] + * Sharp-transient-pattern {suggestedTag=Brain-laterality, suggestedTag=Brain-region, suggestedTag=Sensors, suggestedTag=Appearance-mode, suggestedTag=Discharge-pattern, inLibrary=score} + * Wicket-spikes {inLibrary=score} [Spike-like monophasic negative single waves or trains of waves occurring over the temporal regions during drowsiness that have an arcuate or mu-like appearance. These are mainly seen in older individuals and represent a benign variant that is of little clinical significance.] + * Small-sharp-spikes {suggestedTag=Brain-laterality, suggestedTag=Brain-region, suggestedTag=Sensors, suggestedTag=Appearance-mode, suggestedTag=Discharge-pattern, inLibrary=score} [Benign epileptiform Transients of Sleep (BETS). Small sharp spikes (SSS) of very short duration and low amplitude, often followed by a small theta wave, occurring in the temporal regions during drowsiness and light sleep. They occur on one or both sides (often asynchronously). The main negative and positive components are of about equally spiky character. Rarely seen in children, they are seen most often in adults and the elderly. Two thirds of the patients have a history of epileptic seizures.] + * Fourteen-six-Hz-positive-burst {suggestedTag=Brain-laterality, suggestedTag=Brain-region, suggestedTag=Sensors, suggestedTag=Appearance-mode, suggestedTag=Discharge-pattern, inLibrary=score} [Burst of arch-shaped waves at 13-17 Hz and/or 5-7-Hz but most commonly at 14 and or 6 Hz seen generally over the posterior temporal and adjacent areas of one or both sides of the head during sleep. The sharp peaks of its component waves are positive with respect to other regions. Amplitude varies but is generally below 75 micro V. Comments: (1) best demonstrated by referential recording using contralateral earlobe or other remote, reference electrodes. (2) This pattern has no established clinical significance.] + * Six-Hz-spike-slow-wave {suggestedTag=Brain-laterality, suggestedTag=Brain-region, suggestedTag=Sensors, suggestedTag=Appearance-mode, suggestedTag=Discharge-pattern, inLibrary=score} [Spike and slow wave complexes at 4-7Hz, but mostly at 6 Hz occurring generally in brief bursts bilaterally and synchronously, symmetrically or asymmetrically, and either confined to or of larger amplitude over the posterior or anterior regions of the head. The spike has a strong positive component. Amplitude varies but is generally smaller than that of spike-and slow-wave complexes repeating at slower rates. Comment: this pattern should be distinguished from epileptiform discharges. Synonym: wave and spike phantom.] + * Rudimentary-spike-wave-complex {suggestedTag=Brain-laterality, suggestedTag=Brain-region, suggestedTag=Sensors, suggestedTag=Appearance-mode, suggestedTag=Discharge-pattern, inLibrary=score} [Synonym: Pseudo petit mal discharge. Paroxysmal discharge that consists of generalized or nearly generalized high voltage 3 to 4/sec waves with poorly developed spike in the positive trough between the slow waves, occurring in drowsiness only. It is found only in infancy and early childhood when marked hypnagogic rhythmical theta activity is paramount in the drowsy state.] + * Slow-fused-transient {suggestedTag=Brain-laterality, suggestedTag=Brain-region, suggestedTag=Sensors, suggestedTag=Appearance-mode, suggestedTag=Discharge-pattern, inLibrary=score} [A posterior slow-wave preceded by a sharp-contoured potential that blends together with the ensuing slow wave, in children.] + * Needle-like-occipital-spikes-blind {suggestedTag=Brain-laterality, suggestedTag=Brain-region, suggestedTag=Sensors, suggestedTag=Appearance-mode, suggestedTag=Discharge-pattern, inLibrary=score} [Spike discharges of a particularly fast and needle-like character develop over the occipital region in most congenitally blind children. Completely disappear during childhood or adolescence.] + * Subclinical-rhythmic-EEG-discharge-adults {suggestedTag=Brain-laterality, suggestedTag=Brain-region, suggestedTag=Sensors, suggestedTag=Appearance-mode, suggestedTag=Discharge-pattern, inLibrary=score} [Subclinical rhythmic EEG discharge of adults (SERDA). A rhythmic pattern seen in the adult age group, mainly in the waking state or drowsiness. It consists of a mixture of frequencies, often predominant in the theta range. The onset may be fairly abrupt with widespread sharp rhythmical theta and occasionally with delta activity. As to the spatial distribution, a maximum of this discharge is usually found over the centroparietal region and especially over the vertex. It may resemble a seizure discharge but is not accompanied by any clinical signs or symptoms.] + * Rhythmic-temporal-theta-burst-drowsiness {inLibrary=score} [Rhythmic temporal theta burst of drowsiness (RTTD). Characteristic burst of 4-7 Hz waves frequently notched by faster waves, occurring over the temporal regions of the head during drowsiness. Synonym: psychomotor variant pattern. Comment: this is a pattern of drowsiness that is of no clinical significance.] + * Temporal-slowing-elderly {suggestedTag=Brain-laterality, suggestedTag=Brain-region, suggestedTag=Sensors, suggestedTag=Appearance-mode, suggestedTag=Discharge-pattern, inLibrary=score} [Focal theta and/or delta activity over the temporal regions, especially the left, in persons over the age of 60. Amplitudes are low/similar to the background activity. Comment: focal temporal theta was found in 20 percent of people between the ages of 40-59 years, and 40 percent of people between 60 and 79 years. One third of people older than 60 years had focal temporal delta activity.] + * Breach-rhythm {suggestedTag=Brain-laterality, suggestedTag=Brain-region, suggestedTag=Sensors, suggestedTag=Appearance-mode, suggestedTag=Discharge-pattern, inLibrary=score} [Rhythmical activity recorded over cranial bone defects. Usually it is in the 6 to 11/sec range, does not respond to movements.] + * Other-uncertain-significant-pattern {requireChild, inLibrary=score} + ** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] '''Artifact''' {requireChild, inLibrary=score} [When relevant for the clinical interpretation, artifacts can be scored by specifying the type and the location.] -* Biological-artifact {requireChild, inLibrary=score} -** Eye-blink-artifact {suggestedTag=Brain-laterality, suggestedTag=Brain-region, suggestedTag=Sensors, suggestedTag=Multifocal-finding, suggestedTag=Artifact-significance-to-recording, inLibrary=score} [Example for EEG: Fp1/Fp2 become electropositive with eye closure because the cornea is positively charged causing a negative deflection in Fp1/Fp2. If the eye blink is unilateral, consider prosthetic eye. If it is in F8 rather than Fp2 then the electrodes are plugged in wrong.] -** Eye-movement-horizontal-artifact {suggestedTag=Brain-laterality, suggestedTag=Brain-region, suggestedTag=Sensors, suggestedTag=Multifocal-finding, suggestedTag=Artifact-significance-to-recording, inLibrary=score} [Example for EEG: There is an upward deflection in the Fp2-F8 derivation, when the eyes move to the right side. In this case F8 becomes more positive and therefore. When the eyes move to the left, F7 becomes more positive and there is an upward deflection in the Fp1-F7 derivation.] -** Eye-movement-vertical-artifact {suggestedTag=Brain-laterality, suggestedTag=Brain-region, suggestedTag=Sensors, suggestedTag=Multifocal-finding, suggestedTag=Artifact-significance-to-recording, inLibrary=score} [Example for EEG: The EEG shows positive potentials (50-100 micro V) with bi-frontal distribution, maximum at Fp1 and Fp2, when the eyeball rotated upward. The downward rotation of the eyeball was associated with the negative deflection. The time course of the deflections was similar to the time course of the eyeball movement.] -** Slow-eye-movement-artifact {suggestedTag=Brain-laterality, suggestedTag=Brain-region, suggestedTag=Sensors, suggestedTag=Multifocal-finding, suggestedTag=Artifact-significance-to-recording, inLibrary=score} [Slow, rolling eye-movements, seen during drowsiness.] -** Nystagmus-artifact {suggestedTag=Artifact-significance-to-recording, inLibrary=score} -** Chewing-artifact {suggestedTag=Brain-laterality, suggestedTag=Brain-region, suggestedTag=Sensors, suggestedTag=Multifocal-finding, suggestedTag=Artifact-significance-to-recording, inLibrary=score} -** Sucking-artifact {suggestedTag=Brain-laterality, suggestedTag=Brain-region, suggestedTag=Sensors, suggestedTag=Multifocal-finding, suggestedTag=Artifact-significance-to-recording, inLibrary=score} -** Glossokinetic-artifact {suggestedTag=Brain-laterality, suggestedTag=Brain-region, suggestedTag=Sensors, suggestedTag=Multifocal-finding, suggestedTag=Artifact-significance-to-recording, inLibrary=score} [The tongue functions as a dipole, with the tip negative with respect to the base. The artifact produced by the tongue has a broad potential field that drops from frontal to occipital areas, although it is less steep than that produced by eye movement artifacts. The amplitude of the potentials is greater inferiorly than in parasagittal regions; the frequency is variable but usually in the delta range. Chewing and sucking can produce similar artifacts.] -** Rocking-patting-artifact {suggestedTag=Brain-laterality, suggestedTag=Brain-region, suggestedTag=Sensors, suggestedTag=Multifocal-finding, suggestedTag=Artifact-significance-to-recording, inLibrary=score} [Quasi-rhythmical artifacts in recordings from infants caused by rocking/patting.] -** Movement-artifact {suggestedTag=Brain-laterality, suggestedTag=Brain-region, suggestedTag=Sensors, suggestedTag=Multifocal-finding, suggestedTag=Artifact-significance-to-recording, inLibrary=score} [Example for EEG: Large amplitude artifact, with irregular morphology (usually resembling a slow-wave or a wave with complex morphology) seen in one or several channels, due to movement. If the causing movement is repetitive, the artifact might resemble a rhythmic EEG activity.] -** Respiration-artifact {suggestedTag=Brain-laterality, suggestedTag=Brain-region, suggestedTag=Sensors, suggestedTag=Multifocal-finding, suggestedTag=Artifact-significance-to-recording, inLibrary=score} [Respiration can produce 2 kinds of artifacts. One type is in the form of slow and rhythmic activity, synchronous with the body movements of respiration and mechanically affecting the impedance of (usually) one electrode. The other type can be slow or sharp waves that occur synchronously with inhalation or exhalation and involve those electrodes on which the patient is lying.] -** Pulse-artifact {suggestedTag=Brain-laterality, suggestedTag=Brain-region, suggestedTag=Sensors, suggestedTag=Multifocal-finding, suggestedTag=Artifact-significance-to-recording, inLibrary=score} [Example for EEG: Occurs when an EEG electrode is placed over a pulsating vessel. The pulsation can cause slow waves that may simulate EEG activity. A direct relationship exists between ECG and the pulse waves (200-300 millisecond delay after ECG equals QRS complex).] -** ECG-artifact {suggestedTag=Brain-laterality, suggestedTag=Brain-region, suggestedTag=Sensors, suggestedTag=Multifocal-finding, suggestedTag=Artifact-significance-to-recording, inLibrary=score} [Example for EEG: Far-field potential generated in the heart. The voltage and apparent surface of the artifact vary from derivation to derivation and, consequently, from montage to montage. The artifact is observed best in referential montages using earlobe electrodes A1 and A2. ECG artifact is recognized easily by its rhythmicity/regularity and coincidence with the ECG tracing.] -** Sweat-artifact {suggestedTag=Brain-laterality, suggestedTag=Brain-region, suggestedTag=Sensors, suggestedTag=Multifocal-finding, suggestedTag=Artifact-significance-to-recording, inLibrary=score} [Is a low amplitude undulating waveform that is usually greater than 2 seconds and may appear to be an unstable baseline.] -** EMG-artifact {suggestedTag=Brain-laterality, suggestedTag=Brain-region, suggestedTag=Sensors, suggestedTag=Multifocal-finding, suggestedTag=Artifact-significance-to-recording, inLibrary=score} [Myogenic potentials are the most common artifacts. Frontalis and temporalis muscles (ex..: clenching of jaw muscles) are common causes. Generally, the potentials generated in the muscles are of shorter duration than those generated in the brain. The frequency components are usually beyond 30-50 Hz, and the bursts are arrhythmic.] -* Non-biological-artifact {requireChild, inLibrary=score} -** Power-supply-artifact {suggestedTag=Artifact-significance-to-recording, inLibrary=score} [50-60 Hz artifact. Monomorphic waveform due to 50 or 60 Hz A/C power supply.] -** Induction-artifact {suggestedTag=Artifact-significance-to-recording, inLibrary=score} [Artifacts (usually of high frequency) induced by nearby equipment (like in the intensive care unit).] -** Dialysis-artifact {suggestedTag=Artifact-significance-to-recording, inLibrary=score} -** Artificial-ventilation-artifact {suggestedTag=Artifact-significance-to-recording, inLibrary=score} -** Electrode-pops-artifact {suggestedTag=Artifact-significance-to-recording, inLibrary=score} [Are brief discharges with a very steep upslope and shallow fall that occur in all leads which include that electrode.] -** Salt-bridge-artifact {suggestedTag=Artifact-significance-to-recording, inLibrary=score} [Typically occurs in 1 channel which may appear isoelectric. Only seen in bipolar montage.] -* Other-artifact {requireChild, suggestedTag=Artifact-significance-to-recording, inLibrary=score} -** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] + * Biological-artifact {requireChild, inLibrary=score} + ** Eye-blink-artifact {suggestedTag=Brain-laterality, suggestedTag=Brain-region, suggestedTag=Sensors, suggestedTag=Multifocal-finding, suggestedTag=Artifact-significance-to-recording, inLibrary=score} [Example for EEG: Fp1/Fp2 become electropositive with eye closure because the cornea is positively charged causing a negative deflection in Fp1/Fp2. If the eye blink is unilateral, consider prosthetic eye. If it is in F8 rather than Fp2 then the electrodes are plugged in wrong.] + ** Eye-movement-horizontal-artifact {suggestedTag=Brain-laterality, suggestedTag=Brain-region, suggestedTag=Sensors, suggestedTag=Multifocal-finding, suggestedTag=Artifact-significance-to-recording, inLibrary=score} [Example for EEG: There is an upward deflection in the Fp2-F8 derivation, when the eyes move to the right side. In this case F8 becomes more positive and therefore. When the eyes move to the left, F7 becomes more positive and there is an upward deflection in the Fp1-F7 derivation.] + ** Eye-movement-vertical-artifact {suggestedTag=Brain-laterality, suggestedTag=Brain-region, suggestedTag=Sensors, suggestedTag=Multifocal-finding, suggestedTag=Artifact-significance-to-recording, inLibrary=score} [Example for EEG: The EEG shows positive potentials (50-100 micro V) with bi-frontal distribution, maximum at Fp1 and Fp2, when the eyeball rotated upward. The downward rotation of the eyeball was associated with the negative deflection. The time course of the deflections was similar to the time course of the eyeball movement.] + ** Slow-eye-movement-artifact {suggestedTag=Brain-laterality, suggestedTag=Brain-region, suggestedTag=Sensors, suggestedTag=Multifocal-finding, suggestedTag=Artifact-significance-to-recording, inLibrary=score} [Slow, rolling eye-movements, seen during drowsiness.] + ** Nystagmus-artifact {suggestedTag=Artifact-significance-to-recording, inLibrary=score} + ** Chewing-artifact {suggestedTag=Brain-laterality, suggestedTag=Brain-region, suggestedTag=Sensors, suggestedTag=Multifocal-finding, suggestedTag=Artifact-significance-to-recording, inLibrary=score} + ** Sucking-artifact {suggestedTag=Brain-laterality, suggestedTag=Brain-region, suggestedTag=Sensors, suggestedTag=Multifocal-finding, suggestedTag=Artifact-significance-to-recording, inLibrary=score} + ** Glossokinetic-artifact {suggestedTag=Brain-laterality, suggestedTag=Brain-region, suggestedTag=Sensors, suggestedTag=Multifocal-finding, suggestedTag=Artifact-significance-to-recording, inLibrary=score} [The tongue functions as a dipole, with the tip negative with respect to the base. The artifact produced by the tongue has a broad potential field that drops from frontal to occipital areas, although it is less steep than that produced by eye movement artifacts. The amplitude of the potentials is greater inferiorly than in parasagittal regions; the frequency is variable but usually in the delta range. Chewing and sucking can produce similar artifacts.] + ** Rocking-patting-artifact {suggestedTag=Brain-laterality, suggestedTag=Brain-region, suggestedTag=Sensors, suggestedTag=Multifocal-finding, suggestedTag=Artifact-significance-to-recording, inLibrary=score} [Quasi-rhythmical artifacts in recordings from infants caused by rocking/patting.] + ** Movement-artifact {suggestedTag=Brain-laterality, suggestedTag=Brain-region, suggestedTag=Sensors, suggestedTag=Multifocal-finding, suggestedTag=Artifact-significance-to-recording, inLibrary=score} [Example for EEG: Large amplitude artifact, with irregular morphology (usually resembling a slow-wave or a wave with complex morphology) seen in one or several channels, due to movement. If the causing movement is repetitive, the artifact might resemble a rhythmic EEG activity.] + ** Respiration-artifact {suggestedTag=Brain-laterality, suggestedTag=Brain-region, suggestedTag=Sensors, suggestedTag=Multifocal-finding, suggestedTag=Artifact-significance-to-recording, inLibrary=score} [Respiration can produce 2 kinds of artifacts. One type is in the form of slow and rhythmic activity, synchronous with the body movements of respiration and mechanically affecting the impedance of (usually) one electrode. The other type can be slow or sharp waves that occur synchronously with inhalation or exhalation and involve those electrodes on which the patient is lying.] + ** Pulse-artifact {suggestedTag=Brain-laterality, suggestedTag=Brain-region, suggestedTag=Sensors, suggestedTag=Multifocal-finding, suggestedTag=Artifact-significance-to-recording, inLibrary=score} [Example for EEG: Occurs when an EEG electrode is placed over a pulsating vessel. The pulsation can cause slow waves that may simulate EEG activity. A direct relationship exists between ECG and the pulse waves (200-300 millisecond delay after ECG equals QRS complex).] + ** ECG-artifact {suggestedTag=Brain-laterality, suggestedTag=Brain-region, suggestedTag=Sensors, suggestedTag=Multifocal-finding, suggestedTag=Artifact-significance-to-recording, inLibrary=score} [Example for EEG: Far-field potential generated in the heart. The voltage and apparent surface of the artifact vary from derivation to derivation and, consequently, from montage to montage. The artifact is observed best in referential montages using earlobe electrodes A1 and A2. ECG artifact is recognized easily by its rhythmicity/regularity and coincidence with the ECG tracing.] + ** Sweat-artifact {suggestedTag=Brain-laterality, suggestedTag=Brain-region, suggestedTag=Sensors, suggestedTag=Multifocal-finding, suggestedTag=Artifact-significance-to-recording, inLibrary=score} [Is a low amplitude undulating waveform that is usually greater than 2 seconds and may appear to be an unstable baseline.] + ** EMG-artifact {suggestedTag=Brain-laterality, suggestedTag=Brain-region, suggestedTag=Sensors, suggestedTag=Multifocal-finding, suggestedTag=Artifact-significance-to-recording, inLibrary=score} [Myogenic potentials are the most common artifacts. Frontalis and temporalis muscles (ex..: clenching of jaw muscles) are common causes. Generally, the potentials generated in the muscles are of shorter duration than those generated in the brain. The frequency components are usually beyond 30-50 Hz, and the bursts are arrhythmic.] + * Non-biological-artifact {requireChild, inLibrary=score} + ** Power-supply-artifact {suggestedTag=Artifact-significance-to-recording, inLibrary=score} [50-60 Hz artifact. Monomorphic waveform due to 50 or 60 Hz A/C power supply.] + ** Induction-artifact {suggestedTag=Artifact-significance-to-recording, inLibrary=score} [Artifacts (usually of high frequency) induced by nearby equipment (like in the intensive care unit).] + ** Dialysis-artifact {suggestedTag=Artifact-significance-to-recording, inLibrary=score} + ** Artificial-ventilation-artifact {suggestedTag=Artifact-significance-to-recording, inLibrary=score} + ** Electrode-pops-artifact {suggestedTag=Artifact-significance-to-recording, inLibrary=score} [Are brief discharges with a very steep upslope and shallow fall that occur in all leads which include that electrode.] + ** Salt-bridge-artifact {suggestedTag=Artifact-significance-to-recording, inLibrary=score} [Typically occurs in 1 channel which may appear isoelectric. Only seen in bipolar montage.] + * Other-artifact {requireChild, suggestedTag=Artifact-significance-to-recording, inLibrary=score} + ** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] '''Polygraphic-channel-finding''' {requireChild, inLibrary=score} [Changes observed in polygraphic channels can be scored: EOG, Respiration, ECG, EMG, other polygraphic channel (+ free text), and their significance logged (normal, abnormal, no definite abnormality).] -* EOG-channel-finding {suggestedTag=Finding-significance-to-recording, inLibrary=score} [ElectroOculoGraphy.] -** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] -* Respiration-channel-finding {suggestedTag=Finding-significance-to-recording, inLibrary=score} -** Respiration-oxygen-saturation {inLibrary=score} -*** # {takesValue, valueClass=numericClass, inLibrary=score} -** Respiration-feature {inLibrary=score} -*** Apnoe-respiration {inLibrary=score} [Add duration (range in seconds) and comments in free text.] -**** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] -*** Hypopnea-respiration {inLibrary=score} [Add duration (range in seconds) and comments in free text] -**** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] -*** Apnea-hypopnea-index-respiration {requireChild, inLibrary=score} [Events/h. Frequency can be tagged with base schema /Property/Data-property/Data-value/Spatiotemporal-value/Rate-of-change/Frequency] -**** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] -*** Periodic-respiration {inLibrary=score} -**** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] -*** Tachypnea-respiration {requireChild, inLibrary=score} [Cycles/min. Frequency can be tagged with base schema /Property/Data-property/Data-value/Spatiotemporal-value/Rate-of-change/Frequency] -**** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] -*** Other-respiration-feature {requireChild, inLibrary=score} -**** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] -* ECG-channel-finding {suggestedTag=Finding-significance-to-recording, inLibrary=score} [Electrocardiography.] -** ECG-QT-period {inLibrary=score} -*** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] -** ECG-feature {inLibrary=score} -*** ECG-sinus-rhythm {inLibrary=score} [Normal rhythm. Frequency can be tagged with base schema /Property/Data-property/Data-value/Spatiotemporal-value/Rate-of-change/Frequency] -**** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] -*** ECG-arrhythmia {inLibrary=score} -**** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] -*** ECG-asystolia {inLibrary=score} [Add duration (range in seconds) and comments in free text.] -**** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] -*** ECG-bradycardia {inLibrary=score} [Frequency can be tagged with base schema /Property/Data-property/Data-value/Spatiotemporal-value/Rate-of-change/Frequency] -**** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] -*** ECG-extrasystole {inLibrary=score} -**** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] -*** ECG-ventricular-premature-depolarization {inLibrary=score} [Frequency can be tagged with base schema /Property/Data-property/Data-value/Spatiotemporal-value/Rate-of-change/Frequency] -**** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] -*** ECG-tachycardia {inLibrary=score} [Frequency can be tagged with base schema /Property/Data-property/Data-value/Spatiotemporal-value/Rate-of-change/Frequency] -**** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] -*** Other-ECG-feature {requireChild, inLibrary=score} -**** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] -* EMG-channel-finding {suggestedTag=Finding-significance-to-recording, inLibrary=score} [electromyography] -** EMG-muscle-side {inLibrary=score} -*** EMG-left-muscle {inLibrary=score} -**** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] -*** EMG-right-muscle {inLibrary=score} -**** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] -*** EMG-bilateral-muscle {inLibrary=score} -**** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] -** EMG-muscle-name {inLibrary=score} -*** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] -** EMG-feature {inLibrary=score} -*** EMG-myoclonus {inLibrary=score} -**** Negative-myoclonus {inLibrary=score} -***** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] -**** EMG-myoclonus-rhythmic {inLibrary=score} -***** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] -**** EMG-myoclonus-arrhythmic {inLibrary=score} -***** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] -**** EMG-myoclonus-synchronous {inLibrary=score} -***** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] -**** EMG-myoclonus-asynchronous {inLibrary=score} -***** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] -*** EMG-PLMS {inLibrary=score} [Periodic limb movements in sleep.] -*** EMG-spasm {inLibrary=score} -**** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] -*** EMG-tonic-contraction {inLibrary=score} -**** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] -*** EMG-asymmetric-activation {requireChild, inLibrary=score} -**** EMG-asymmetric-activation-left-first {inLibrary=score} -***** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] -**** EMG-asymmetric-activation-right-first {inLibrary=score} -***** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] -*** Other-EMG-features {requireChild, inLibrary=score} -**** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] -* Other-polygraphic-channel {requireChild, inLibrary=score} -** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] + * EOG-channel-finding {suggestedTag=Finding-significance-to-recording, inLibrary=score} [ElectroOculoGraphy.] + ** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] + * Respiration-channel-finding {suggestedTag=Finding-significance-to-recording, inLibrary=score} + ** Respiration-oxygen-saturation {inLibrary=score} + *** # {takesValue, valueClass=numericClass, inLibrary=score} + ** Respiration-feature {inLibrary=score} + *** Apnoe-respiration {inLibrary=score} [Add duration (range in seconds) and comments in free text.] + **** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] + *** Hypopnea-respiration {inLibrary=score} [Add duration (range in seconds) and comments in free text] + **** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] + *** Apnea-hypopnea-index-respiration {requireChild, inLibrary=score} [Events/h. Frequency can be tagged with base schema /Property/Data-property/Data-value/Spatiotemporal-value/Rate-of-change/Frequency] + **** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] + *** Periodic-respiration {inLibrary=score} + **** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] + *** Tachypnea-respiration {requireChild, inLibrary=score} [Cycles/min. Frequency can be tagged with base schema /Property/Data-property/Data-value/Spatiotemporal-value/Rate-of-change/Frequency] + **** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] + *** Other-respiration-feature {requireChild, inLibrary=score} + **** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] + * ECG-channel-finding {suggestedTag=Finding-significance-to-recording, inLibrary=score} [Electrocardiography.] + ** ECG-QT-period {inLibrary=score} + *** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] + ** ECG-feature {inLibrary=score} + *** ECG-sinus-rhythm {inLibrary=score} [Normal rhythm. Frequency can be tagged with base schema /Property/Data-property/Data-value/Spatiotemporal-value/Rate-of-change/Frequency] + **** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] + *** ECG-arrhythmia {inLibrary=score} + **** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] + *** ECG-asystolia {inLibrary=score} [Add duration (range in seconds) and comments in free text.] + **** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] + *** ECG-bradycardia {inLibrary=score} [Frequency can be tagged with base schema /Property/Data-property/Data-value/Spatiotemporal-value/Rate-of-change/Frequency] + **** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] + *** ECG-extrasystole {inLibrary=score} + **** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] + *** ECG-ventricular-premature-depolarization {inLibrary=score} [Frequency can be tagged with base schema /Property/Data-property/Data-value/Spatiotemporal-value/Rate-of-change/Frequency] + **** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] + *** ECG-tachycardia {inLibrary=score} [Frequency can be tagged with base schema /Property/Data-property/Data-value/Spatiotemporal-value/Rate-of-change/Frequency] + **** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] + *** Other-ECG-feature {requireChild, inLibrary=score} + **** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] + * EMG-channel-finding {suggestedTag=Finding-significance-to-recording, inLibrary=score} [electromyography] + ** EMG-muscle-side {inLibrary=score} + *** EMG-left-muscle {inLibrary=score} + **** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] + *** EMG-right-muscle {inLibrary=score} + **** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] + *** EMG-bilateral-muscle {inLibrary=score} + **** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] + ** EMG-muscle-name {inLibrary=score} + *** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] + ** EMG-feature {inLibrary=score} + *** EMG-myoclonus {inLibrary=score} + **** Negative-myoclonus {inLibrary=score} + ***** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] + **** EMG-myoclonus-rhythmic {inLibrary=score} + ***** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] + **** EMG-myoclonus-arrhythmic {inLibrary=score} + ***** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] + **** EMG-myoclonus-synchronous {inLibrary=score} + ***** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] + **** EMG-myoclonus-asynchronous {inLibrary=score} + ***** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] + *** EMG-PLMS {inLibrary=score} [Periodic limb movements in sleep.] + *** EMG-spasm {inLibrary=score} + **** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] + *** EMG-tonic-contraction {inLibrary=score} + **** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] + *** EMG-asymmetric-activation {requireChild, inLibrary=score} + **** EMG-asymmetric-activation-left-first {inLibrary=score} + ***** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] + **** EMG-asymmetric-activation-right-first {inLibrary=score} + ***** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] + *** Other-EMG-features {requireChild, inLibrary=score} + **** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] + * Other-polygraphic-channel {requireChild, inLibrary=score} + ** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] '''Finding-property''' {requireChild, inLibrary=score} [Descriptive element similar to main HED /Property. Something that pertains to a thing. A characteristic of some entity. A quality or feature regarded as a characteristic or inherent part of someone or something. HED attributes are adjectives or adverbs.] -* Signal-morphology-property {requireChild, inLibrary=score} -** Rhythmic-activity-morphology {inLibrary=score} [EEG activity consisting of a sequence of waves approximately constant period.] -*** Delta-activity-morphology {suggestedTag=Finding-frequency, suggestedTag=Finding-amplitude, inLibrary=score} [EEG rhythm in the delta (under 4 Hz) range that does not belong to the posterior dominant rhythm (scored under other organized rhythms).] -**** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] -*** Theta-activity-morphology {suggestedTag=Finding-frequency, suggestedTag=Finding-amplitude, inLibrary=score} [EEG rhythm in the theta (4-8 Hz) range that does not belong to the posterior dominant rhythm (scored under other organized rhythm).] -**** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] -*** Alpha-activity-morphology {suggestedTag=Finding-frequency, suggestedTag=Finding-amplitude, inLibrary=score} [EEG rhythm in the alpha range (8-13 Hz) which is considered part of the background (ongoing) activity but does not fulfill the criteria of the posterior dominant rhythm (alpha rhythm).] -**** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] -*** Beta-activity-morphology {suggestedTag=Finding-frequency, suggestedTag=Finding-amplitude, inLibrary=score} [EEG rhythm between 14 and 40 Hz, which is considered part of the background (ongoing) activity but does not fulfill the criteria of the posterior dominant rhythm. Most characteristically: a rhythm from 14 to 40 Hz recorded over the fronto-central regions of the head during wakefulness. Amplitude of the beta rhythm varies but is mostly below 30 microV. Other beta rhythms are most prominent in other locations or are diffuse.] -**** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] -*** Gamma-activity-morphology {suggestedTag=Finding-frequency, suggestedTag=Finding-amplitude, inLibrary=score} -**** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] -** Spike-morphology {inLibrary=score} [A transient, clearly distinguished from background activity, with pointed peak at a conventional paper speed or time scale and duration from 20 to under 70 ms, i.e. 1/50-1/15 s approximately. Main component is generally negative relative to other areas. Amplitude varies.] -*** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] -** Spike-and-slow-wave-morphology {inLibrary=score} [A pattern consisting of a spike followed by a slow wave.] -*** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] -** Runs-of-rapid-spikes-morphology {inLibrary=score} [Bursts of spike discharges at a rate from 10 to 25/sec (in most cases somewhat irregular). The bursts last more than 2 seconds (usually 2 to 10 seconds) and it is typically seen in sleep. Synonyms: rhythmic spikes, generalized paroxysmal fast activity, fast paroxysmal rhythms, grand mal discharge, fast beta activity.] -*** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] -** Polyspikes-morphology {inLibrary=score} [Two or more consecutive spikes.] -*** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] -** Polyspike-and-slow-wave-morphology {inLibrary=score} [Two or more consecutive spikes associated with one or more slow waves.] -*** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] -** Sharp-wave-morphology {inLibrary=score} [A transient clearly distinguished from background activity, with pointed peak at a conventional paper speed or time scale, and duration of 70-200 ms, i.e. over 1/4-1/5 s approximately. Main component is generally negative relative to other areas. Amplitude varies.] -*** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] -** Sharp-and-slow-wave-morphology {inLibrary=score} [A sequence of a sharp wave and a slow wave.] -*** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] -** Slow-sharp-wave-morphology {inLibrary=score} [A transient that bears all the characteristics of a sharp-wave, but exceeds 200 ms. Synonym: blunted sharp wave.] -*** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] -** High-frequency-oscillation-morphology {inLibrary=score} [HFO.] -*** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] -** Hypsarrhythmia-classic-morphology {inLibrary=score} [Abnormal interictal high amplitude waves and a background of irregular spikes.] -*** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] -** Hypsarrhythmia-modified-morphology {inLibrary=score} -*** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] -** Fast-spike-activity-morphology {inLibrary=score} [A burst consisting of a sequence of spikes. Duration greater than 1 s. Frequency at least in the alpha range.] -*** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] -** Low-voltage-fast-activity-morphology {inLibrary=score} [Refers to the fast, and often recruiting activity which can be recorded at the onset of an ictal discharge, particularly in invasive EEG recording of a seizure.] -*** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] -** Polysharp-waves-morphology {inLibrary=score} [A sequence of two or more sharp-waves.] -*** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] -** Slow-wave-large-amplitude-morphology {inLibrary=score} -*** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] -** Irregular-delta-or-theta-activity-morphology {inLibrary=score} [EEG activity consisting of repetitive waves of inconsistent wave-duration but in delta and/or theta rang (greater than 125 ms).] -*** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] -** Electrodecremental-change-morphology {inLibrary=score} [Sudden desynchronization of electrical activity.] -*** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] -** DC-shift-morphology {inLibrary=score} [Shift of negative polarity of the direct current recordings, during seizures.] -*** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] -** Disappearance-of-ongoing-activity-morphology {inLibrary=score} [Disappearance of the EEG activity that preceded the ictal event but still remnants of background activity (thus not enough to name it electrodecremental change).] -*** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] -** Polymorphic-delta-activity-morphology {inLibrary=score} [EEG activity consisting of waves in the delta range (over 250 ms duration for each wave) but of different morphology.] -*** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] -** Frontal-intermittent-rhythmic-delta-activity-morphology {inLibrary=score} [Frontal intermittent rhythmic delta activity (FIRDA). Fairly regular or approximately sinusoidal waves, mostly occurring in bursts at 1.5-2.5 Hz over the frontal areas of one or both sides of the head. Comment: most commonly associated with unspecified encephalopathy, in adults.] -*** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] -** Occipital-intermittent-rhythmic-delta-activity-morphology {inLibrary=score} [Occipital intermittent rhythmic delta activity (OIRDA). Fairly regular or approximately sinusoidal waves, mostly occurring in bursts at 2-3 Hz over the occipital or posterior head regions of one or both sides of the head. Frequently blocked or attenuated by opening the eyes. Comment: most commonly associated with unspecified encephalopathy, in children.] -*** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] -** Temporal-intermittent-rhythmic-delta-activity-morphology {inLibrary=score} [Temporal intermittent rhythmic delta activity (TIRDA). Fairly regular or approximately sinusoidal waves, mostly occurring in bursts at over the temporal areas of one side of the head. Comment: most commonly associated with temporal lobe epilepsy.] -*** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] -** Periodic-discharges-morphology {requireChild, inLibrary=score} [Periodic discharges not further specified (PDs).] -*** Periodic-discharges-superimposed-activity {requireChild, suggestedTag=Property-not-possible-to-determine, inLibrary=score} -**** Periodic-discharges-fast-superimposed-activity {suggestedTag=Finding-frequency, inLibrary=score} -***** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] -**** Periodic-discharges-rhythmic-superimposed-activity {suggestedTag=Finding-frequency, inLibrary=score} -***** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] -*** Periodic-discharge-sharpness {requireChild, suggestedTag=Property-not-possible-to-determine, inLibrary=score} -**** Spiky-periodic-discharge-sharpness {inLibrary=score} -***** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] -**** Sharp-periodic-discharge-sharpness {inLibrary=score} -***** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] -**** Sharply-contoured-periodic-discharge-sharpness {inLibrary=score} -***** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] -**** Blunt-periodic-discharge-sharpness {inLibrary=score} -***** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] -*** Number-of-periodic-discharge-phases {requireChild, suggestedTag=Property-not-possible-to-determine, inLibrary=score} -**** 1-periodic-discharge-phase {inLibrary=score} -***** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] -**** 2-periodic-discharge-phases {inLibrary=score} -***** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] -**** 3-periodic-discharge-phases {inLibrary=score} -***** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] -**** Greater-than-3-periodic-discharge-phases {inLibrary=score} -***** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] -*** Periodic-discharge-triphasic-morphology {suggestedTag=Property-not-possible-to-determine, suggestedTag=Property-exists, suggestedTag=Property-absence, inLibrary=score} -**** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] -*** Periodic-discharge-absolute-amplitude {requireChild, suggestedTag=Property-not-possible-to-determine, inLibrary=score} -**** Periodic-discharge-absolute-amplitude-very-low {inLibrary=score} [Lower than 20 microV.] -***** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] -**** Low-periodic-discharge-absolute-amplitude {inLibrary=score} [20 to 49 microV.] -***** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] -**** Medium-periodic-discharge-absolute-amplitude {inLibrary=score} [50 to 199 microV.] -***** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] -**** High-periodic-discharge-absolute-amplitude {inLibrary=score} [Greater than 200 microV.] -***** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] -*** Periodic-discharge-relative-amplitude {requireChild, suggestedTag=Property-not-possible-to-determine, inLibrary=score} -**** Periodic-discharge-relative-amplitude-less-than-equal-2 {inLibrary=score} -***** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] -**** Periodic-discharge-relative-amplitude-greater-than-2 {inLibrary=score} -***** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] -*** Periodic-discharge-polarity {requireChild, inLibrary=score} -**** Periodic-discharge-postitive-polarity {inLibrary=score} -***** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] -**** Periodic-discharge-negative-polarity {inLibrary=score} -***** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] -**** Periodic-discharge-unclear-polarity {inLibrary=score} -***** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] -* Source-analysis-property {requireChild, inLibrary=score} [How the current in the brain reaches the electrode sensors.] -** Source-analysis-laterality {requireChild, suggestedTag=Brain-laterality, inLibrary=score} -** Source-analysis-brain-region {requireChild, inLibrary=score} -*** Source-analysis-frontal-perisylvian-superior-surface {inLibrary=score} -*** Source-analysis-frontal-lateral {inLibrary=score} -*** Source-analysis-frontal-mesial {inLibrary=score} -*** Source-analysis-frontal-polar {inLibrary=score} -*** Source-analysis-frontal-orbitofrontal {inLibrary=score} -*** Source-analysis-temporal-polar {inLibrary=score} -*** Source-analysis-temporal-basal {inLibrary=score} -*** Source-analysis-temporal-lateral-anterior {inLibrary=score} -*** Source-analysis-temporal-lateral-posterior {inLibrary=score} -*** Source-analysis-temporal-perisylvian-inferior-surface {inLibrary=score} -*** Source-analysis-central-lateral-convexity {inLibrary=score} -*** Source-analysis-central-mesial {inLibrary=score} -*** Source-analysis-central-sulcus-anterior-surface {inLibrary=score} -*** Source-analysis-central-sulcus-posterior-surface {inLibrary=score} -*** Source-analysis-central-opercular {inLibrary=score} -*** Source-analysis-parietal-lateral-convexity {inLibrary=score} -*** Source-analysis-parietal-mesial {inLibrary=score} -*** Source-analysis-parietal-opercular {inLibrary=score} -*** Source-analysis-occipital-lateral {inLibrary=score} -*** Source-analysis-occipital-mesial {inLibrary=score} -*** Source-analysis-occipital-basal {inLibrary=score} -*** Source-analysis-insula {inLibrary=score} -* Location-property {requireChild, inLibrary=score} [Location can be scored for findings. Semiologic finding can also be characterized by the somatotopic modifier (i.e. the part of the body where it occurs). In this respect, laterality (left, right, symmetric, asymmetric, left greater than right, right greater than left), body part (eyelid, face, arm, leg, trunk, visceral, hemi-) and centricity (axial, proximal limb, distal limb) can be scored.] -** Brain-laterality {requireChild, inLibrary=score} -*** Brain-laterality-left {inLibrary=score} -**** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] -*** Brain-laterality-left-greater-right {inLibrary=score} -**** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] -*** Brain-laterality-right {inLibrary=score} -**** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] -*** Brain-laterality-right-greater-left {inLibrary=score} -**** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] -*** Brain-laterality-midline {inLibrary=score} -**** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] -*** Brain-laterality-diffuse-asynchronous {inLibrary=score} -**** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] -** Brain-region {requireChild, inLibrary=score} -*** Brain-region-frontal {inLibrary=score} -**** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] -*** Brain-region-temporal {inLibrary=score} -**** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] -*** Brain-region-central {inLibrary=score} -**** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] -*** Brain-region-parietal {inLibrary=score} -**** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] -*** Brain-region-occipital {inLibrary=score} -**** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] -** Body-part-location {requireChild, inLibrary=score} -*** Body-part-eyelid {inLibrary=score} -**** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] -*** Body-part-face {inLibrary=score} -**** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] -*** Body-part-arm {inLibrary=score} -**** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] -*** Body-part-leg {inLibrary=score} -**** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] -*** Body-part-trunk {inLibrary=score} -**** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] -*** Body-part-visceral {inLibrary=score} -**** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] -*** Body-part-hemi {inLibrary=score} -**** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] -** Brain-centricity {requireChild, inLibrary=score} -*** Brain-centricity-axial {inLibrary=score} -**** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] -*** Brain-centricity-proximal-limb {inLibrary=score} -**** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] -*** Brain-centricity-distal-limb {inLibrary=score} -**** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] -** Sensors {requireChild, inLibrary=score} [Lists all corresponding sensors (electrodes/channels in montage). The sensor-group is selected from a list defined in the site-settings for each EEG-lab.] -*** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] -** Finding-propagation {suggestedTag=Property-exists, suggestedTag=Property-absence, suggestedTag=Brain-laterality, suggestedTag=Brain-region, suggestedTag=Sensors, inLibrary=score} [When propagation within the graphoelement is observed, first the location of the onset region is scored. Then, the location of the propagation can be noted.] -*** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] -** Multifocal-finding {suggestedTag=Property-not-possible-to-determine, suggestedTag=Property-exists, suggestedTag=Property-absence, inLibrary=score} [When the same interictal graphoelement is observed bilaterally and at least in three independent locations, can score them using one entry, and choosing multifocal as a descriptor of the locations of the given interictal graphoelements, optionally emphasizing the involved, and the most active sites.] -*** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] -* Modulators-property {requireChild, inLibrary=score} [For each described graphoelement, the influence of the modulators can be scored. Only modulators present in the recording are scored.] -** Modulators-reactivity {requireChild, suggestedTag=Property-exists, suggestedTag=Property-absence, inLibrary=score} [Susceptibility of individual rhythms or the EEG as a whole to change following sensory stimulation or other physiologic actions.] -*** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] -** Eye-closure-sensitivity {suggestedTag=Property-exists, suggestedTag=Property-absence, inLibrary=score} [Eye closure sensitivity.] -*** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] -** Eye-opening-passive {suggestedTag=Property-not-possible-to-determine, suggestedTag=Finding-stopped-by, suggestedTag=Finding-unmodified, suggestedTag=Finding-triggered-by, inLibrary=score} [Passive eye opening. Used with base schema Increasing/Decreasing.] -** Medication-effect-EEG {suggestedTag=Property-not-possible-to-determine, suggestedTag=Finding-stopped-by, suggestedTag=Finding-unmodified, inLibrary=score} [Medications effect on EEG. Used with base schema Increasing/Decreasing.] -** Medication-reduction-effect-EEG {suggestedTag=Property-not-possible-to-determine, suggestedTag=Finding-stopped-by, suggestedTag=Finding-unmodified, inLibrary=score} [Medications reduction or withdrawal effect on EEG. Used with base schema Increasing/Decreasing.] -** Auditive-stimuli-effect {suggestedTag=Property-not-possible-to-determine, suggestedTag=Finding-stopped-by, suggestedTag=Finding-unmodified, inLibrary=score} [Used with base schema Increasing/Decreasing.] -** Nociceptive-stimuli-effect {suggestedTag=Property-not-possible-to-determine, suggestedTag=Finding-stopped-by, suggestedTag=Finding-unmodified, suggestedTag=Finding-triggered-by, inLibrary=score} [Used with base schema Increasing/Decreasing.] -** Physical-effort-effect {suggestedTag=Property-not-possible-to-determine, suggestedTag=Finding-stopped-by, suggestedTag=Finding-unmodified, suggestedTag=Finding-triggered-by, inLibrary=score} [Used with base schema Increasing/Decreasing] -** Cognitive-task-effect {suggestedTag=Property-not-possible-to-determine, suggestedTag=Finding-stopped-by, suggestedTag=Finding-unmodified, suggestedTag=Finding-triggered-by, inLibrary=score} [Used with base schema Increasing/Decreasing.] -** Other-modulators-effect-EEG {requireChild, inLibrary=score} -*** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] -** Facilitating-factor {inLibrary=score} [Facilitating factors are defined as transient and sporadic endogenous or exogenous elements capable of augmenting seizure incidence (increasing the likelihood of seizure occurrence).] -*** Facilitating-factor-alcohol {inLibrary=score} -**** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] -*** Facilitating-factor-awake {inLibrary=score} -**** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] -*** Facilitating-factor-catamenial {inLibrary=score} -**** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] -*** Facilitating-factor-fever {inLibrary=score} -**** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] -*** Facilitating-factor-sleep {inLibrary=score} -**** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] -*** Facilitating-factor-sleep-deprived {inLibrary=score} -**** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] -*** Facilitating-factor-other {requireChild, inLibrary=score} -**** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] -** Provocative-factor {requireChild, inLibrary=score} [Provocative factors are defined as transient and sporadic endogenous or exogenous elements capable of evoking/triggering seizures immediately following the exposure to it.] -*** Hyperventilation-provoked {inLibrary=score} -**** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] -*** Reflex-provoked {inLibrary=score} -**** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] -** Medication-effect-clinical {suggestedTag=Finding-stopped-by, suggestedTag=Finding-unmodified, inLibrary=score} [Medications clinical effect. Used with base schema Increasing/Decreasing.] -** Medication-reduction-effect-clinical {suggestedTag=Finding-stopped-by, suggestedTag=Finding-unmodified, inLibrary=score} [Medications reduction or withdrawal clinical effect. Used with base schema Increasing/Decreasing.] -** Other-modulators-effect-clinical {requireChild, inLibrary=score} -*** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] -** Intermittent-photic-stimulation-effect {requireChild, inLibrary=score} -*** Posterior-stimulus-dependent-intermittent-photic-stimulation-response {suggestedTag=Finding-frequency, inLibrary=score} -**** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] -*** Posterior-stimulus-independent-intermittent-photic-stimulation-response-limited {suggestedTag=Finding-frequency, inLibrary=score} [limited to the stimulus-train] -**** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] -*** Posterior-stimulus-independent-intermittent-photic-stimulation-response-self-sustained {suggestedTag=Finding-frequency, inLibrary=score} -**** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] -*** Generalized-photoparoxysmal-intermittent-photic-stimulation-response-limited {suggestedTag=Finding-frequency, inLibrary=score} [Limited to the stimulus-train.] -**** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] -*** Generalized-photoparoxysmal-intermittent-photic-stimulation-response-self-sustained {suggestedTag=Finding-frequency, inLibrary=score} -**** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] -*** Activation-of-pre-existing-epileptogenic-area-intermittent-photic-stimulation-effect {suggestedTag=Finding-frequency, inLibrary=score} -**** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] -*** Unmodified-intermittent-photic-stimulation-effect {inLibrary=score} -**** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] -** Quality-of-hyperventilation {requireChild, inLibrary=score} -*** Hyperventilation-refused-procedure {inLibrary=score} -**** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] -*** Hyperventilation-poor-effort {inLibrary=score} -**** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] -*** Hyperventilation-good-effort {inLibrary=score} -**** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] -*** Hyperventilation-excellent-effort {inLibrary=score} -**** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] -** Modulators-effect {requireChild, inLibrary=score} [Tags for describing the influence of the modulators] -*** Modulators-effect-continuous-during-NRS {inLibrary=score} [Continuous during non-rapid-eye-movement-sleep (NRS)] -**** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] -*** Modulators-effect-only-during {inLibrary=score} -**** # {takesValue, valueClass=textClass, inLibrary=score} [Only during Sleep/Awakening/Hyperventilation/Physical effort/Cognitive task. Free text.] -*** Modulators-effect-change-of-patterns {inLibrary=score} [Change of patterns during sleep/awakening.] -**** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] -* Time-related-property {requireChild, inLibrary=score} [Important to estimate how often an interictal abnormality is seen in the recording.] -** Appearance-mode {requireChild, suggestedTag=Property-not-possible-to-determine, inLibrary=score} [Describes how the non-ictal EEG pattern/graphoelement is distributed through the recording.] -*** Random-appearance-mode {inLibrary=score} [Occurrence of the non-ictal EEG pattern / graphoelement without any rhythmicity / periodicity.] -**** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] -*** Periodic-appearance-mode {inLibrary=score} [Non-ictal EEG pattern / graphoelement occurring at an approximately regular rate / interval (generally of 1 to several seconds).] -**** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] -*** Variable-appearance-mode {inLibrary=score} [Occurrence of non-ictal EEG pattern / graphoelements, that is sometimes rhythmic or periodic, other times random, throughout the recording.] -**** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] -*** Intermittent-appearance-mode {inLibrary=score} -**** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] -*** Continuous-appearance-mode {inLibrary=score} -**** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] -** Discharge-pattern {requireChild, inLibrary=score} [Describes the organization of the EEG signal within the discharge (distinguish between single and repetitive discharges)] -*** Single-discharge-pattern {suggestedTag=Finding-incidence, inLibrary=score} [Applies to the intra-burst pattern: a graphoelement that is not repetitive; before and after the graphoelement one can distinguish the background activity.] -**** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] -*** Rhythmic-trains-or-bursts-discharge-pattern {suggestedTag=Finding-prevalence, suggestedTag=Finding-frequency, inLibrary=score} [Applies to the intra-burst pattern: a non-ictal graphoelement that repeats itself without returning to the background activity between them. The graphoelements within this repetition occur at approximately constant period.] -**** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] -*** Arrhythmic-trains-or-bursts-discharge-pattern {suggestedTag=Finding-prevalence, inLibrary=score} [Applies to the intra-burst pattern: a non-ictal graphoelement that repeats itself without returning to the background activity between them. The graphoelements within this repetition occur at inconstant period.] -**** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] -*** Fragmented-discharge-pattern {inLibrary=score} -**** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] -** Periodic-discharge-time-related-features {requireChild, inLibrary=score} [Periodic discharges not further specified (PDs) time-relayed features tags.] -*** Periodic-discharge-duration {requireChild, suggestedTag=Property-not-possible-to-determine, inLibrary=score} -**** Very-brief-periodic-discharge-duration {inLibrary=score} [Less than 10 sec.] -***** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] -**** Brief-periodic-discharge-duration {inLibrary=score} [10 to 59 sec.] -***** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] -**** Intermediate-periodic-discharge-duration {inLibrary=score} [1 to 4.9 min.] -***** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] -**** Long-periodic-discharge-duration {inLibrary=score} [5 to 59 min.] -***** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] -**** Very-long-periodic-discharge-duration {inLibrary=score} [Greater than 1 hour.] -***** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] -*** Periodic-discharge-onset {requireChild, suggestedTag=Property-not-possible-to-determine, inLibrary=score} -**** Sudden-periodic-discharge-onset {inLibrary=score} -***** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] -**** Gradual-periodic-discharge-onset {inLibrary=score} -***** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] -*** Periodic-discharge-dynamics {requireChild, suggestedTag=Property-not-possible-to-determine, inLibrary=score} -**** Evolving-periodic-discharge-dynamics {inLibrary=score} -***** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] -**** Fluctuating-periodic-discharge-dynamics {inLibrary=score} -***** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] -**** Static-periodic-discharge-dynamics {inLibrary=score} -***** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] -** Finding-extent {inLibrary=score} [Percentage of occurrence during the recording (background activity and interictal finding).] -*** # {takesValue, valueClass=numericClass, inLibrary=score} -** Finding-incidence {requireChild, inLibrary=score} [How often it occurs/time-epoch.] -*** Only-once-finding-incidence {inLibrary=score} -**** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] -*** Rare-finding-incidence {inLibrary=score} [less than 1/h] -**** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] -*** Uncommon-finding-incidence {inLibrary=score} [1/5 min to 1/h.] -**** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] -*** Occasional-finding-incidence {inLibrary=score} [1/min to 1/5min.] -**** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] -*** Frequent-finding-incidence {inLibrary=score} [1/10 s to 1/min.] -**** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] -*** Abundant-finding-incidence {inLibrary=score} [Greater than 1/10 s).] -**** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] -** Finding-prevalence {requireChild, inLibrary=score} [The percentage of the recording covered by the train/burst.] -*** Rare-finding-prevalence {inLibrary=score} [Less than 1 percent.] -**** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] -*** Occasional-finding-prevalence {inLibrary=score} [1 to 9 percent.] -**** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] -*** Frequent-finding-prevalence {inLibrary=score} [10 to 49 percent.] -**** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] -*** Abundant-finding-prevalence {inLibrary=score} [50 to 89 percent.] -**** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] -*** Continuous-finding-prevalence {inLibrary=score} [Greater than 90 percent.] -**** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] -* Posterior-dominant-rhythm-property {requireChild, inLibrary=score} [Posterior dominant rhythm is the most often scored EEG feature in clinical practice. Therefore, there are specific terms that can be chosen for characterizing the PDR.] -** Posterior-dominant-rhythm-amplitude-range {requireChild, suggestedTag=Property-not-possible-to-determine, inLibrary=score} -*** Low-posterior-dominant-rhythm-amplitude-range {inLibrary=score} [Low (less than 20 microV).] -**** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] -*** Medium-posterior-dominant-rhythm-amplitude-range {inLibrary=score} [Medium (between 20 and 70 microV).] -**** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] -*** High-posterior-dominant-rhythm-amplitude-range {inLibrary=score} [High (more than 70 microV).] -**** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] -** Posterior-dominant-rhythm-frequency-asymmetry {requireChild, inLibrary=score} [When symmetrical could be labeled with base schema Symmetrical tag.] -*** Posterior-dominant-rhythm-frequency-asymmetry-lower-left {inLibrary=score} [Hz lower on the left side.] -**** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] -*** Posterior-dominant-rhythm-frequency-asymmetry-lower-right {inLibrary=score} [Hz lower on the right side.] -**** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] -** Posterior-dominant-rhythm-eye-opening-reactivity {suggestedTag=Property-not-possible-to-determine, inLibrary=score} [Change (disappearance or measurable decrease in amplitude) of a posterior dominant rhythm following eye-opening. Eye closure has the opposite effect.] -*** Posterior-dominant-rhythm-eye-opening-reactivity-reduced-left {inLibrary=score} [Reduced left side reactivity.] -**** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] -*** Posterior-dominant-rhythm-eye-opening-reactivity-reduced-right {inLibrary=score} [Reduced right side reactivity.] -**** # {takesValue, valueClass=textClass, inLibrary=score} [free text] -*** Posterior-dominant-rhythm-eye-opening-reactivity-reduced-both {inLibrary=score} [Reduced reactivity on both sides.] -**** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] -** Posterior-dominant-rhythm-organization {requireChild, inLibrary=score} [When normal could be labeled with base schema Normal tag.] -*** Posterior-dominant-rhythm-organization-poorly-organized {inLibrary=score} [Poorly organized.] -**** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] -*** Posterior-dominant-rhythm-organization-disorganized {inLibrary=score} [Disorganized.] -**** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] -*** Posterior-dominant-rhythm-organization-markedly-disorganized {inLibrary=score} [Markedly disorganized.] -**** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] -** Posterior-dominant-rhythm-caveat {requireChild, inLibrary=score} [Caveat to the annotation of PDR.] -*** No-posterior-dominant-rhythm-caveat {inLibrary=score} -**** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] -*** Posterior-dominant-rhythm-caveat-only-open-eyes-during-the-recording {inLibrary=score} -**** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] -*** Posterior-dominant-rhythm-caveat-sleep-deprived-caveat {inLibrary=score} -**** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] -*** Posterior-dominant-rhythm-caveat-drowsy {inLibrary=score} -**** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] -*** Posterior-dominant-rhythm-caveat-only-following-hyperventilation {inLibrary=score} -** Absence-of-posterior-dominant-rhythm {requireChild, inLibrary=score} [Reason for absence of PDR.] -*** Absence-of-posterior-dominant-rhythm-artifacts {inLibrary=score} -**** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] -*** Absence-of-posterior-dominant-rhythm-extreme-low-voltage {inLibrary=score} -**** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] -*** Absence-of-posterior-dominant-rhythm-eye-closure-could-not-be-achieved {inLibrary=score} -**** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] -*** Absence-of-posterior-dominant-rhythm-lack-of-awake-period {inLibrary=score} -**** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] -*** Absence-of-posterior-dominant-rhythm-lack-of-compliance {inLibrary=score} -**** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] -*** Absence-of-posterior-dominant-rhythm-other-causes {requireChild, inLibrary=score} -**** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] -* Episode-property {requireChild, inLibrary=score} -** Seizure-classification {requireChild, inLibrary=score} [Epileptic seizures are named using the current ILAE seizure classification (Fisher et al., 2017, Beniczky et al., 2017).] -*** Motor-onset-seizure {inLibrary=score} -**** Myoclonic-motor-onset-seizure {inLibrary=score} -**** Negative-myoclonic-motor-onset-seizure {inLibrary=score} -**** Clonic-motor-onset-seizure {inLibrary=score} -**** Tonic-motor-onset-seizure {inLibrary=score} -**** Atonic-motor-onset-seizure {inLibrary=score} -**** Myoclonic-atonic-motor-onset-seizure {inLibrary=score} -**** Myoclonic-tonic-clonic-motor-onset-seizure {inLibrary=score} -**** Tonic-clonic-motor-onset-seizure {inLibrary=score} -**** Automatism-motor-onset-seizure {inLibrary=score} -**** Hyperkinetic-motor-onset-seizure {inLibrary=score} -**** Epileptic-spasm-episode {inLibrary=score} -*** Nonmotor-onset-seizure {inLibrary=score} -**** Behavior-arrest-nonmotor-onset-seizure {inLibrary=score} -**** Sensory-nonmotor-onset-seizure {inLibrary=score} -**** Emotional-nonmotor-onset-seizure {inLibrary=score} -**** Cognitive-nonmotor-onset-seizure {inLibrary=score} -**** Autonomic-nonmotor-onset-seizure {inLibrary=score} -*** Absence-seizure {inLibrary=score} -**** Typical-absence-seizure {inLibrary=score} -**** Atypical-absence-seizure {inLibrary=score} -**** Myoclonic-absence-seizure {inLibrary=score} -**** Eyelid-myoclonia-absence-seizure {inLibrary=score} -** Episode-phase {requireChild, suggestedTag=Seizure-semiology-manifestation, suggestedTag=Postictal-semiology-manifestation, suggestedTag=Ictal-EEG-patterns, inLibrary=score} [The electroclinical findings (i.e., the seizure semiology and the ictal EEG) are divided in three phases: onset, propagation, and postictal.] -*** Episode-phase-initial {inLibrary=score} -*** Episode-phase-subsequent {inLibrary=score} -*** Episode-phase-postictal {inLibrary=score} -** Seizure-semiology-manifestation {requireChild, inLibrary=score} [Semiology is described according to the ILAE Glossary of Descriptive Terminology for Ictal Semiology (Blume et al., 2001). Besides the name, the semiologic finding can also be characterized by the somatotopic modifier, laterality, body part and centricity. Uses Location-property tags.] -*** Semiology-motor-manifestation {inLibrary=score} -**** Semiology-elementary-motor {inLibrary=score} -***** Semiology-motor-tonic {suggestedTag=Brain-laterality, suggestedTag=Body-part, suggestedTag=Brain-centricity, suggestedTag=Episode-event-count, inLibrary=score} [A sustained increase in muscle contraction lasting a few seconds to minutes.] -***** Semiology-motor-dystonic {suggestedTag=Brain-laterality, suggestedTag=Body-part, suggestedTag=Brain-centricity, suggestedTag=Episode-event-count, inLibrary=score} [Sustained contractions of both agonist and antagonist muscles producing athetoid or twisting movements, which, when prolonged, may produce abnormal postures.] -***** Semiology-motor-epileptic-spasm {suggestedTag=Brain-laterality, suggestedTag=Body-part, suggestedTag=Brain-centricity, suggestedTag=Episode-event-count, inLibrary=score} [A sudden flexion, extension, or mixed extension flexion of predominantly proximal and truncal muscles that is usually more sustained than a myoclonic movement but not so sustained as a tonic seizure (i.e., about 1 s). Limited forms may occur: grimacing, head nodding. Frequent occurrence in clusters.] -***** Semiology-motor-postural {suggestedTag=Brain-laterality, suggestedTag=Body-part, suggestedTag=Brain-centricity, suggestedTag=Episode-event-count, inLibrary=score} [Adoption of a posture that may be bilaterally symmetric or asymmetric (as in a fencing posture).] -***** Semiology-motor-versive {suggestedTag=Body-part, suggestedTag=Episode-event-count, inLibrary=score} [A sustained, forced conjugate ocular, cephalic, and/or truncal rotation or lateral deviation from the midline.] -***** Semiology-motor-clonic {suggestedTag=Brain-laterality, suggestedTag=Body-part, suggestedTag=Brain-centricity, suggestedTag=Episode-event-count, inLibrary=score} [Myoclonus that is regularly repetitive, involves the same muscle groups, at a frequency of about 2 to 3 c/s, and is prolonged. Synonym: rhythmic myoclonus .] -***** Semiology-motor-myoclonic {suggestedTag=Brain-laterality, suggestedTag=Body-part, suggestedTag=Brain-centricity, suggestedTag=Episode-event-count, inLibrary=score} [Characterized by myoclonus. MYOCLONUS : sudden, brief (lower than 100 ms) involuntary single or multiple contraction(s) of muscles(s) or muscle groups of variable topography (axial, proximal limb, distal).] -***** Semiology-motor-jacksonian-march {suggestedTag=Brain-laterality, suggestedTag=Body-part, suggestedTag=Brain-centricity, suggestedTag=Episode-event-count, inLibrary=score} [Term indicating spread of clonic movements through contiguous body parts unilaterally.] -***** Semiology-motor-negative-myoclonus {suggestedTag=Brain-laterality, suggestedTag=Body-part, suggestedTag=Brain-centricity, suggestedTag=Episode-event-count, inLibrary=score} [Characterized by negative myoclonus. NEGATIVE MYOCLONUS: interruption of tonic muscular activity for lower than 500 ms without evidence of preceding myoclonia.] -***** Semiology-motor-tonic-clonic {requireChild, inLibrary=score} [A sequence consisting of a tonic followed by a clonic phase. Variants such as clonic-tonic-clonic may be seen. Asymmetry of limb posture during the tonic phase of a GTC: one arm is rigidly extended at the elbow (often with the fist clenched tightly and flexed at the wrist), whereas the opposite arm is flexed at the elbow.] -****** Semiology-motor-tonic-clonic-without-figure-of-four {suggestedTag=Brain-laterality, suggestedTag=Body-part, suggestedTag=Brain-centricity, suggestedTag=Episode-event-count, inLibrary=score} -****** Semiology-motor-tonic-clonic-with-figure-of-four-extension-left-elbow {suggestedTag=Brain-laterality, suggestedTag=Body-part, suggestedTag=Brain-centricity, suggestedTag=Episode-event-count, inLibrary=score} -****** Semiology-motor-tonic-clonic-with-figure-of-four-extension-right-elbow {suggestedTag=Brain-laterality, suggestedTag=Body-part, suggestedTag=Brain-centricity, suggestedTag=Episode-event-count, inLibrary=score} -***** Semiology-motor-astatic {suggestedTag=Brain-laterality, suggestedTag=Body-part, suggestedTag=Brain-centricity, suggestedTag=Episode-event-count, inLibrary=score} [Loss of erect posture that results from an atonic, myoclonic, or tonic mechanism. Synonym: drop attack.] -***** Semiology-motor-atonic {suggestedTag=Brain-laterality, suggestedTag=Body-part, suggestedTag=Brain-centricity, suggestedTag=Episode-event-count, inLibrary=score} [Sudden loss or diminution of muscle tone without apparent preceding myoclonic or tonic event lasting greater or equal to 1 to 2 s, involving head, trunk, jaw, or limb musculature.] -***** Semiology-motor-eye-blinking {suggestedTag=Brain-laterality, suggestedTag=Episode-event-count, inLibrary=score} -***** Semiology-motor-other-elementary-motor {requireChild, inLibrary=score} -****** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] -**** Semiology-motor-automatisms {inLibrary=score} -***** Semiology-motor-automatisms-mimetic {suggestedTag=Episode-responsiveness, suggestedTag=Episode-appearance, suggestedTag=Episode-event-count, inLibrary=score} [Facial expression suggesting an emotional state, often fear.] -***** Semiology-motor-automatisms-oroalimentary {suggestedTag=Episode-responsiveness, suggestedTag=Episode-appearance, suggestedTag=Episode-event-count, inLibrary=score} [Lip smacking, lip pursing, chewing, licking, tooth grinding, or swallowing.] -***** Semiology-motor-automatisms-dacrystic {suggestedTag=Episode-responsiveness, suggestedTag=Episode-appearance, suggestedTag=Episode-event-count, inLibrary=score} [Bursts of crying.] -***** Semiology-motor-automatisms-dyspraxic {suggestedTag=Brain-laterality, suggestedTag=Body-part, suggestedTag=Brain-centricity, suggestedTag=Episode-responsiveness, suggestedTag=Episode-appearance, suggestedTag=Episode-event-count, inLibrary=score} [Inability to perform learned movements spontaneously or on command or imitation despite intact relevant motor and sensory systems and adequate comprehension and cooperation.] -***** Semiology-motor-automatisms-manual {suggestedTag=Brain-laterality, suggestedTag=Brain-centricity, suggestedTag=Episode-responsiveness, suggestedTag=Episode-appearance, suggestedTag=Episode-event-count, inLibrary=score} [1. Indicates principally distal components, bilateral or unilateral. 2. Fumbling, tapping, manipulating movements.] -***** Semiology-motor-automatisms-gestural {suggestedTag=Brain-laterality, suggestedTag=Episode-responsiveness, suggestedTag=Episode-appearance, suggestedTag=Episode-event-count, inLibrary=score} [Semipurposive, asynchronous hand movements. Often unilateral.] -***** Semiology-motor-automatisms-pedal {suggestedTag=Brain-laterality, suggestedTag=Brain-centricity, suggestedTag=Episode-responsiveness, suggestedTag=Episode-appearance, suggestedTag=Episode-event-count, inLibrary=score} [1. Indicates principally distal components, bilateral or unilateral. 2. Fumbling, tapping, manipulating movements.] -***** Semiology-motor-automatisms-hypermotor {suggestedTag=Brain-laterality, suggestedTag=Body-part, suggestedTag=Brain-centricity, suggestedTag=Episode-responsiveness, suggestedTag=Episode-appearance, suggestedTag=Episode-event-count, inLibrary=score} [1. Involves predominantly proximal limb or axial muscles producing irregular sequential ballistic movements, such as pedaling, pelvic thrusting, thrashing, rocking movements. 2. Increase in rate of ongoing movements or inappropriately rapid performance of a movement.] -***** Semiology-motor-automatisms-hypokinetic {suggestedTag=Brain-laterality, suggestedTag=Body-part, suggestedTag=Brain-centricity, suggestedTag=Episode-responsiveness, suggestedTag=Episode-appearance, suggestedTag=Episode-event-count, inLibrary=score} [A decrease in amplitude and/or rate or arrest of ongoing motor activity.] -***** Semiology-motor-automatisms-gelastic {suggestedTag=Episode-responsiveness, suggestedTag=Episode-appearance, suggestedTag=Episode-event-count, inLibrary=score} [Bursts of laughter or giggling, usually without an appropriate affective tone.] -***** Semiology-motor-other-automatisms {requireChild, inLibrary=score} -****** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] -**** Semiology-motor-behavioral-arrest {suggestedTag=Brain-laterality, suggestedTag=Body-part, suggestedTag=Brain-centricity, suggestedTag=Episode-event-count, inLibrary=score} [Interruption of ongoing motor activity or of ongoing behaviors with fixed gaze, without movement of the head or trunk (oro-alimentary and hand automatisms may continue).] -*** Semiology-non-motor-manifestation {inLibrary=score} -**** Semiology-sensory {inLibrary=score} -***** Semiology-sensory-headache {suggestedTag=Brain-laterality, suggestedTag=Episode-event-count, inLibrary=score} [Headache occurring in close temporal proximity to the seizure or as the sole seizure manifestation.] -***** Semiology-sensory-visual {suggestedTag=Brain-laterality, suggestedTag=Episode-event-count, inLibrary=score} [Flashing or flickering lights, spots, simple patterns, scotomata, or amaurosis.] -***** Semiology-sensory-auditory {suggestedTag=Brain-laterality, suggestedTag=Episode-event-count, inLibrary=score} [Buzzing, drumming sounds or single tones.] -***** Semiology-sensory-olfactory {suggestedTag=Body-part, suggestedTag=Episode-event-count, inLibrary=score} -***** Semiology-sensory-gustatory {suggestedTag=Episode-event-count, inLibrary=score} [Taste sensations including acidic, bitter, salty, sweet, or metallic.] -***** Semiology-sensory-epigastric {suggestedTag=Episode-event-count, inLibrary=score} [Abdominal discomfort including nausea, emptiness, tightness, churning, butterflies, malaise, pain, and hunger; sensation may rise to chest or throat. Some phenomena may reflect ictal autonomic dysfunction.] -***** Semiology-sensory-somatosensory {suggestedTag=Brain-laterality, suggestedTag=Body-part, suggestedTag=Brain-centricity, suggestedTag=Episode-event-count, inLibrary=score} [Tingling, numbness, electric-shock sensation, sense of movement or desire to move.] -***** Semiology-sensory-painful {suggestedTag=Brain-laterality, suggestedTag=Body-part, suggestedTag=Brain-centricity, suggestedTag=Episode-event-count, inLibrary=score} [Peripheral (lateralized/bilateral), cephalic, abdominal.] -***** Semiology-sensory-autonomic-sensation {suggestedTag=Episode-event-count, inLibrary=score} [A sensation consistent with involvement of the autonomic nervous system, including cardiovascular, gastrointestinal, sudomotor, vasomotor, and thermoregulatory functions. (Thus autonomic aura; cf. autonomic events 3.0).] -***** Semiology-sensory-other {requireChild, inLibrary=score} -****** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] -**** Semiology-experiential {inLibrary=score} -***** Semiology-experiential-affective-emotional {suggestedTag=Episode-event-count, inLibrary=score} [Components include fear, depression, joy, and (rarely) anger.] -***** Semiology-experiential-hallucinatory {suggestedTag=Episode-event-count, inLibrary=score} [Composite perceptions without corresponding external stimuli involving visual, auditory, somatosensory, olfactory, and/or gustatory phenomena. Example: hearing and seeing people talking.] -***** Semiology-experiential-illusory {suggestedTag=Episode-event-count, inLibrary=score} [An alteration of actual percepts involving the visual, auditory, somatosensory, olfactory, or gustatory systems.] -***** Semiology-experiential-mnemonic {inLibrary=score} [Components that reflect ictal dysmnesia such as feelings of familiarity (deja-vu) and unfamiliarity (jamais-vu).] -****** Semiology-experiential-mnemonic-Deja-vu {suggestedTag=Episode-event-count, inLibrary=score} -****** Semiology-experiential-mnemonic-Jamais-vu {suggestedTag=Episode-event-count, inLibrary=score} -***** Semiology-experiential-other {requireChild, inLibrary=score} -****** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] -**** Semiology-dyscognitive {suggestedTag=Episode-event-count, inLibrary=score} [The term describes events in which (1) disturbance of cognition is the predominant or most apparent feature, and (2a) two or more of the following components are involved, or (2b) involvement of such components remains undetermined. Otherwise, use the more specific term (e.g., mnemonic experiential seizure or hallucinatory experiential seizure). Components of cognition: ++ perception: symbolic conception of sensory information ++ attention: appropriate selection of a principal perception or task ++ emotion: appropriate affective significance of a perception ++ memory: ability to store and retrieve percepts or concepts ++ executive function: anticipation, selection, monitoring of consequences, and initiation of motor activity including praxis, speech.] -**** Semiology-language-related {inLibrary=score} -***** Semiology-language-related-vocalization {suggestedTag=Episode-event-count, inLibrary=score} -***** Semiology-language-related-verbalization {suggestedTag=Episode-event-count, inLibrary=score} -***** Semiology-language-related-dysphasia {suggestedTag=Episode-event-count, inLibrary=score} -***** Semiology-language-related-aphasia {suggestedTag=Episode-event-count, inLibrary=score} -***** Semiology-language-related-other {requireChild, inLibrary=score} -****** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] -**** Semiology-autonomic {inLibrary=score} -***** Semiology-autonomic-pupillary {suggestedTag=Brain-laterality, suggestedTag=Episode-event-count, inLibrary=score} [Mydriasis, miosis (either bilateral or unilateral).] -***** Semiology-autonomic-hypersalivation {suggestedTag=Episode-event-count, inLibrary=score} [Increase in production of saliva leading to uncontrollable drooling] -***** Semiology-autonomic-respiratory-apnoeic {suggestedTag=Episode-event-count, inLibrary=score} [subjective shortness of breath, hyperventilation, stridor, coughing, choking, apnea, oxygen desaturation, neurogenic pulmonary edema.] -***** Semiology-autonomic-cardiovascular {suggestedTag=Episode-event-count, inLibrary=score} [Modifications of heart rate (tachycardia, bradycardia), cardiac arrhythmias (such as sinus arrhythmia, sinus arrest, supraventricular tachycardia, atrial premature depolarizations, ventricular premature depolarizations, atrio-ventricular block, bundle branch block, atrioventricular nodal escape rhythm, asystole).] -***** Semiology-autonomic-gastrointestinal {suggestedTag=Episode-event-count, inLibrary=score} [Nausea, eructation, vomiting, retching, abdominal sensations, abdominal pain, flatulence, spitting, diarrhea.] -***** Semiology-autonomic-urinary-incontinence {suggestedTag=Episode-event-count, inLibrary=score} [urinary urge (intense urinary urge at the beginning of seizures), urinary incontinence, ictal urination (rare symptom of partial seizures without loss of consciousness).] -***** Semiology-autonomic-genital {suggestedTag=Episode-event-count, inLibrary=score} [Sexual auras (erotic thoughts and feelings, sexual arousal and orgasm). Genital auras (unpleasant, sometimes painful, frightening or emotionally neutral somatosensory sensations in the genitals that can be accompanied by ictal orgasm). Sexual automatisms (hypermotor movements consisting of writhing, thrusting, rhythmic movements of the pelvis, arms and legs, sometimes associated with picking and rhythmic manipulation of the groin or genitalia, exhibitionism and masturbation).] -***** Semiology-autonomic-vasomotor {suggestedTag=Episode-event-count, inLibrary=score} [Flushing or pallor (may be accompanied by feelings of warmth, cold and pain).] -***** Semiology-autonomic-sudomotor {suggestedTag=Brain-laterality, suggestedTag=Episode-event-count, inLibrary=score} [Sweating and piloerection (may be accompanied by feelings of warmth, cold and pain).] -***** Semiology-autonomic-thermoregulatory {suggestedTag=Episode-event-count, inLibrary=score} [Hyperthermia, fever.] -***** Semiology-autonomic-other {requireChild, inLibrary=score} -****** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] -*** Semiology-manifestation-other {requireChild, inLibrary=score} -**** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] -** Postictal-semiology-manifestation {requireChild, inLibrary=score} -*** Postictal-semiology-unconscious {suggestedTag=Episode-event-count, inLibrary=score} -*** Postictal-semiology-quick-recovery-of-consciousness {suggestedTag=Episode-event-count, inLibrary=score} [Quick recovery of awareness and responsiveness.] -*** Postictal-semiology-aphasia-or-dysphasia {suggestedTag=Episode-event-count, inLibrary=score} [Impaired communication involving language without dysfunction of relevant primary motor or sensory pathways, manifested as impaired comprehension, anomia, parahasic errors or a combination of these.] -*** Postictal-semiology-behavioral-change {suggestedTag=Episode-event-count, inLibrary=score} [Occurring immediately after a aseizure. Including psychosis, hypomanina, obsessive-compulsive behavior.] -*** Postictal-semiology-hemianopia {suggestedTag=Brain-laterality, suggestedTag=Episode-event-count, inLibrary=score} [Postictal visual loss in a a hemi field.] -*** Postictal-semiology-impaired-cognition {suggestedTag=Episode-event-count, inLibrary=score} [Decreased Cognitive performance involving one or more of perception, attention, emotion, memory, execution, praxis, speech.] -*** Postictal-semiology-dysphoria {suggestedTag=Episode-event-count, inLibrary=score} [Depression, irritability, euphoric mood, fear, anxiety.] -*** Postictal-semiology-headache {suggestedTag=Episode-event-count, inLibrary=score} [Headache with features of tension-type or migraine headache that develops within 3 h following the seizure and resolves within 72 h after seizure.] -*** Postictal-semiology-nose-wiping {suggestedTag=Brain-laterality, suggestedTag=Episode-event-count, inLibrary=score} [Noes-wiping usually within 60 sec of seizure offset, usually with the hand ipsilateral to the seizure onset.] -*** Postictal-semiology-anterograde-amnesia {suggestedTag=Episode-event-count, inLibrary=score} [Impaired ability to remember new material.] -*** Postictal-semiology-retrograde-amnesia {suggestedTag=Episode-event-count, inLibrary=score} [Impaired ability to recall previously remember material.] -*** Postictal-semiology-paresis {suggestedTag=Brain-laterality, suggestedTag=Body-part, suggestedTag=Brain-centricity, suggestedTag=Episode-event-count, inLibrary=score} [Todds palsy. Any unilateral postictal dysfunction relating to motor, language, sensory and/or integrative functions.] -*** Postictal-semiology-sleep {inLibrary=score} [Invincible need to sleep after a seizure.] -*** Postictal-semiology-unilateral-myoclonic-jerks {inLibrary=score} [unilateral motor phenomena, other then specified, occurring in postictal phase.] -*** Postictal-semiology-other-unilateral-motor-phenomena {requireChild, inLibrary=score} -**** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] -** Polygraphic-channel-relation-to-episode {requireChild, suggestedTag=Property-not-possible-to-determine, inLibrary=score} -*** Polygraphic-channel-cause-to-episode {inLibrary=score} -*** Polygraphic-channel-consequence-of-episode {inLibrary=score} -** Ictal-EEG-patterns {inLibrary=score} -*** Ictal-EEG-patterns-obscured-by-artifacts {inLibrary=score} [The interpretation of the EEG is not possible due to artifacts.] -**** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] -*** Ictal-EEG-activity {suggestedTag=Polyspikes-morphology, suggestedTag=Fast-spike-activity-morphology, suggestedTag=Low-voltage-fast-activity-morphology, suggestedTag=Polysharp-waves-morphology, suggestedTag=Spike-and-slow-wave-morphology, suggestedTag=Polyspike-and-slow-wave-morphology, suggestedTag=Sharp-and-slow-wave-morphology, suggestedTag=Rhythmic-activity-morphology, suggestedTag=Slow-wave-large-amplitude-morphology, suggestedTag=Irregular-delta-or-theta-activity-morphology, suggestedTag=Electrodecremental-change-morphology, suggestedTag=DC-shift-morphology, suggestedTag=Disappearance-of-ongoing-activity-morphology, suggestedTag=Brain-laterality, suggestedTag=Brain-region, suggestedTag=Sensors, suggestedTag=Source-analysis-laterality, suggestedTag=Source-analysis-brain-region, suggestedTag=Episode-event-count, inLibrary=score} -*** Postictal-EEG-activity {suggestedTag=Brain-laterality, suggestedTag=Body-part, suggestedTag=Brain-centricity, inLibrary=score} -** Episode-time-context-property {inLibrary=score} [Additional clinically relevant features related to episodes can be scored under timing and context. If needed, episode duration can be tagged with base schema /Property/Data-property/Data-value/Spatiotemporal-value/Temporal-value/Duration.] -*** Episode-consciousness {requireChild, suggestedTag=Property-not-possible-to-determine, inLibrary=score} -**** Episode-consciousness-not-tested {inLibrary=score} -***** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] -**** Episode-consciousness-affected {inLibrary=score} -***** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] -**** Episode-consciousness-mildly-affected {inLibrary=score} -***** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] -**** Episode-consciousness-not-affected {inLibrary=score} -***** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] -*** Episode-awareness {suggestedTag=Property-not-possible-to-determine, suggestedTag=Property-exists, suggestedTag=Property-absence, inLibrary=score} -**** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] -*** Clinical-EEG-temporal-relationship {suggestedTag=Property-not-possible-to-determine, inLibrary=score} -**** Clinical-start-followed-EEG {inLibrary=score} [Clinical start, followed by EEG start by X seconds.] -***** # {takesValue, valueClass=numericClass, unitClass=timeUnits, inLibrary=score} -**** EEG-start-followed-clinical {inLibrary=score} [EEG start, followed by clinical start by X seconds.] -***** # {takesValue, valueClass=numericClass, unitClass=timeUnits, inLibrary=score} -**** Simultaneous-start-clinical-EEG {inLibrary=score} -**** Clinical-EEG-temporal-relationship-notes {inLibrary=score} [Clinical notes to annotate the clinical-EEG temporal relationship.] -***** # {takesValue, valueClass=textClass, inLibrary=score} -*** Episode-event-count {suggestedTag=Property-not-possible-to-determine, inLibrary=score} [Number of stereotypical episodes during the recording.] -**** # {takesValue, valueClass=numericClass, inLibrary=score} -*** State-episode-start {requireChild, suggestedTag=Property-not-possible-to-determine, inLibrary=score} [State at the start of the episode.] -**** Episode-start-from-sleep {inLibrary=score} -***** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] -**** Episode-start-from-awake {inLibrary=score} -***** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] -*** Episode-postictal-phase {suggestedTag=Property-not-possible-to-determine, inLibrary=score} -**** # {takesValue, valueClass=numericClass, unitClass=timeUnits, inLibrary=score} -*** Episode-prodrome {suggestedTag=Property-exists, suggestedTag=Property-absence, inLibrary=score} [Prodrome is a preictal phenomenon, and it is defined as a subjective or objective clinical alteration (e.g., ill-localized sensation or agitation) that heralds the onset of an epileptic seizure but does not form part of it (Blume et al., 2001). Therefore, prodrome should be distinguished from aura (which is an ictal phenomenon).] -**** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] -*** Episode-tongue-biting {suggestedTag=Property-exists, suggestedTag=Property-absence, inLibrary=score} -**** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] -*** Episode-responsiveness {requireChild, suggestedTag=Property-not-possible-to-determine, inLibrary=score} -**** Episode-responsiveness-preserved {inLibrary=score} -***** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] -**** Episode-responsiveness-affected {inLibrary=score} -***** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] -*** Episode-appearance {requireChild, inLibrary=score} -**** Episode-appearance-interactive {inLibrary=score} -***** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] -**** Episode-appearance-spontaneous {inLibrary=score} -***** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] -*** Seizure-dynamics {requireChild, inLibrary=score} [Spatiotemporal dynamics can be scored (evolution in morphology; evolution in frequency; evolution in location).] -**** Seizure-dynamics-evolution-morphology {inLibrary=score} -***** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] -**** Seizure-dynamics-evolution-frequency {inLibrary=score} -***** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] -**** Seizure-dynamics-evolution-location {inLibrary=score} -***** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] -**** Seizure-dynamics-not-possible-to-determine {inLibrary=score} [Not possible to determine.] -***** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] -* Other-finding-property {requireChild, inLibrary=score} -** Artifact-significance-to-recording {requireChild, inLibrary=score} [It is important to score the significance of the described artifacts: recording is not interpretable, recording of reduced diagnostic value, does not interfere with the interpretation of the recording.] -*** Recording-not-interpretable-due-to-artifact {inLibrary=score} -**** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] -*** Recording-of-reduced-diagnostic-value-due-to-artifact {inLibrary=score} -**** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] -*** Artifact-does-not-interfere-recording {inLibrary=score} -**** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] -** Finding-significance-to-recording {requireChild, inLibrary=score} [Significance of finding. When normal/abnormal could be labeled with base schema Normal/Abnormal tags.] -*** Finding-no-definite-abnormality {inLibrary=score} -**** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] -*** Finding-significance-not-possible-to-determine {inLibrary=score} [Not possible to determine.] -**** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] -** Finding-frequency {inLibrary=score} [Value in Hz (number) typed in.] -*** # {takesValue, valueClass=numericClass, unitClass=frequencyUnits, inLibrary=score} -** Finding-amplitude {inLibrary=score} [Value in microvolts (number) typed in.] -*** # {takesValue, valueClass=numericClass, unitClass=electricPotentialUnits, inLibrary=score} -** Finding-amplitude-asymmetry {requireChild, inLibrary=score} [For posterior dominant rhythm: a difference in amplitude between the homologous area on opposite sides of the head that consistently exceeds 50 percent. When symmetrical could be labeled with base schema Symmetrical tag. For sleep: Absence or consistently marked amplitude asymmetry (greater than 50 percent) of a normal sleep graphoelement.] -*** Finding-amplitude-asymmetry-lower-left {inLibrary=score} [Amplitude lower on the left side.] -**** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] -*** Finding-amplitude-asymmetry-lower-right {inLibrary=score} [Amplitude lower on the right side.] -**** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] -*** Finding-amplitude-asymmetry-not-possible-to-determine {inLibrary=score} [Not possible to determine.] -**** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] -** Finding-stopped-by {inLibrary=score} -*** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] -** Finding-triggered-by {inLibrary=score} -*** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] -** Finding-unmodified {inLibrary=score} -*** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] -** Property-not-possible-to-determine {inLibrary=score} [Not possible to determine.] -*** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] -** Property-exists {inLibrary=score} -*** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] -** Property-absence {inLibrary=score} -*** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] + * Signal-morphology-property {requireChild, inLibrary=score} + ** Rhythmic-activity-morphology {inLibrary=score} [EEG activity consisting of a sequence of waves approximately constant period.] + *** Delta-activity-morphology {suggestedTag=Finding-frequency, suggestedTag=Finding-amplitude, inLibrary=score} [EEG rhythm in the delta (under 4 Hz) range that does not belong to the posterior dominant rhythm (scored under other organized rhythms).] + **** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] + *** Theta-activity-morphology {suggestedTag=Finding-frequency, suggestedTag=Finding-amplitude, inLibrary=score} [EEG rhythm in the theta (4-8 Hz) range that does not belong to the posterior dominant rhythm (scored under other organized rhythm).] + **** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] + *** Alpha-activity-morphology {suggestedTag=Finding-frequency, suggestedTag=Finding-amplitude, inLibrary=score} [EEG rhythm in the alpha range (8-13 Hz) which is considered part of the background (ongoing) activity but does not fulfill the criteria of the posterior dominant rhythm (alpha rhythm).] + **** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] + *** Beta-activity-morphology {suggestedTag=Finding-frequency, suggestedTag=Finding-amplitude, inLibrary=score} [EEG rhythm between 14 and 40 Hz, which is considered part of the background (ongoing) activity but does not fulfill the criteria of the posterior dominant rhythm. Most characteristically: a rhythm from 14 to 40 Hz recorded over the fronto-central regions of the head during wakefulness. Amplitude of the beta rhythm varies but is mostly below 30 microV. Other beta rhythms are most prominent in other locations or are diffuse.] + **** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] + *** Gamma-activity-morphology {suggestedTag=Finding-frequency, suggestedTag=Finding-amplitude, inLibrary=score} + **** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] + ** Spike-morphology {inLibrary=score} [A transient, clearly distinguished from background activity, with pointed peak at a conventional paper speed or time scale and duration from 20 to under 70 ms, i.e. 1/50-1/15 s approximately. Main component is generally negative relative to other areas. Amplitude varies.] + *** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] + ** Spike-and-slow-wave-morphology {inLibrary=score} [A pattern consisting of a spike followed by a slow wave.] + *** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] + ** Runs-of-rapid-spikes-morphology {inLibrary=score} [Bursts of spike discharges at a rate from 10 to 25/sec (in most cases somewhat irregular). The bursts last more than 2 seconds (usually 2 to 10 seconds) and it is typically seen in sleep. Synonyms: rhythmic spikes, generalized paroxysmal fast activity, fast paroxysmal rhythms, grand mal discharge, fast beta activity.] + *** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] + ** Polyspikes-morphology {inLibrary=score} [Two or more consecutive spikes.] + *** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] + ** Polyspike-and-slow-wave-morphology {inLibrary=score} [Two or more consecutive spikes associated with one or more slow waves.] + *** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] + ** Sharp-wave-morphology {inLibrary=score} [A transient clearly distinguished from background activity, with pointed peak at a conventional paper speed or time scale, and duration of 70-200 ms, i.e. over 1/4-1/5 s approximately. Main component is generally negative relative to other areas. Amplitude varies.] + *** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] + ** Sharp-and-slow-wave-morphology {inLibrary=score} [A sequence of a sharp wave and a slow wave.] + *** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] + ** Slow-sharp-wave-morphology {inLibrary=score} [A transient that bears all the characteristics of a sharp-wave, but exceeds 200 ms. Synonym: blunted sharp wave.] + *** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] + ** High-frequency-oscillation-morphology {inLibrary=score} [HFO.] + *** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] + ** Hypsarrhythmia-classic-morphology {inLibrary=score} [Abnormal interictal high amplitude waves and a background of irregular spikes.] + *** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] + ** Hypsarrhythmia-modified-morphology {inLibrary=score} + *** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] + ** Fast-spike-activity-morphology {inLibrary=score} [A burst consisting of a sequence of spikes. Duration greater than 1 s. Frequency at least in the alpha range.] + *** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] + ** Low-voltage-fast-activity-morphology {inLibrary=score} [Refers to the fast, and often recruiting activity which can be recorded at the onset of an ictal discharge, particularly in invasive EEG recording of a seizure.] + *** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] + ** Polysharp-waves-morphology {inLibrary=score} [A sequence of two or more sharp-waves.] + *** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] + ** Slow-wave-large-amplitude-morphology {inLibrary=score} + *** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] + ** Irregular-delta-or-theta-activity-morphology {inLibrary=score} [EEG activity consisting of repetitive waves of inconsistent wave-duration but in delta and/or theta rang (greater than 125 ms).] + *** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] + ** Electrodecremental-change-morphology {inLibrary=score} [Sudden desynchronization of electrical activity.] + *** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] + ** DC-shift-morphology {inLibrary=score} [Shift of negative polarity of the direct current recordings, during seizures.] + *** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] + ** Disappearance-of-ongoing-activity-morphology {inLibrary=score} [Disappearance of the EEG activity that preceded the ictal event but still remnants of background activity (thus not enough to name it electrodecremental change).] + *** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] + ** Polymorphic-delta-activity-morphology {inLibrary=score} [EEG activity consisting of waves in the delta range (over 250 ms duration for each wave) but of different morphology.] + *** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] + ** Frontal-intermittent-rhythmic-delta-activity-morphology {inLibrary=score} [Frontal intermittent rhythmic delta activity (FIRDA). Fairly regular or approximately sinusoidal waves, mostly occurring in bursts at 1.5-2.5 Hz over the frontal areas of one or both sides of the head. Comment: most commonly associated with unspecified encephalopathy, in adults.] + *** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] + ** Occipital-intermittent-rhythmic-delta-activity-morphology {inLibrary=score} [Occipital intermittent rhythmic delta activity (OIRDA). Fairly regular or approximately sinusoidal waves, mostly occurring in bursts at 2-3 Hz over the occipital or posterior head regions of one or both sides of the head. Frequently blocked or attenuated by opening the eyes. Comment: most commonly associated with unspecified encephalopathy, in children.] + *** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] + ** Temporal-intermittent-rhythmic-delta-activity-morphology {inLibrary=score} [Temporal intermittent rhythmic delta activity (TIRDA). Fairly regular or approximately sinusoidal waves, mostly occurring in bursts at over the temporal areas of one side of the head. Comment: most commonly associated with temporal lobe epilepsy.] + *** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] + ** Periodic-discharges-morphology {requireChild, inLibrary=score} [Periodic discharges not further specified (PDs).] + *** Periodic-discharges-superimposed-activity {requireChild, suggestedTag=Property-not-possible-to-determine, inLibrary=score} + **** Periodic-discharges-fast-superimposed-activity {suggestedTag=Finding-frequency, inLibrary=score} + ***** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] + **** Periodic-discharges-rhythmic-superimposed-activity {suggestedTag=Finding-frequency, inLibrary=score} + ***** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] + *** Periodic-discharge-sharpness {requireChild, suggestedTag=Property-not-possible-to-determine, inLibrary=score} + **** Spiky-periodic-discharge-sharpness {inLibrary=score} + ***** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] + **** Sharp-periodic-discharge-sharpness {inLibrary=score} + ***** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] + **** Sharply-contoured-periodic-discharge-sharpness {inLibrary=score} + ***** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] + **** Blunt-periodic-discharge-sharpness {inLibrary=score} + ***** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] + *** Number-of-periodic-discharge-phases {requireChild, suggestedTag=Property-not-possible-to-determine, inLibrary=score} + **** 1-periodic-discharge-phase {inLibrary=score} + ***** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] + **** 2-periodic-discharge-phases {inLibrary=score} + ***** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] + **** 3-periodic-discharge-phases {inLibrary=score} + ***** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] + **** Greater-than-3-periodic-discharge-phases {inLibrary=score} + ***** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] + *** Periodic-discharge-triphasic-morphology {suggestedTag=Property-not-possible-to-determine, suggestedTag=Property-exists, suggestedTag=Property-absence, inLibrary=score} + **** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] + *** Periodic-discharge-absolute-amplitude {requireChild, suggestedTag=Property-not-possible-to-determine, inLibrary=score} + **** Periodic-discharge-absolute-amplitude-very-low {inLibrary=score} [Lower than 20 microV.] + ***** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] + **** Low-periodic-discharge-absolute-amplitude {inLibrary=score} [20 to 49 microV.] + ***** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] + **** Medium-periodic-discharge-absolute-amplitude {inLibrary=score} [50 to 199 microV.] + ***** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] + **** High-periodic-discharge-absolute-amplitude {inLibrary=score} [Greater than 200 microV.] + ***** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] + *** Periodic-discharge-relative-amplitude {requireChild, suggestedTag=Property-not-possible-to-determine, inLibrary=score} + **** Periodic-discharge-relative-amplitude-less-than-equal-2 {inLibrary=score} + ***** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] + **** Periodic-discharge-relative-amplitude-greater-than-2 {inLibrary=score} + ***** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] + *** Periodic-discharge-polarity {requireChild, inLibrary=score} + **** Periodic-discharge-postitive-polarity {inLibrary=score} + ***** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] + **** Periodic-discharge-negative-polarity {inLibrary=score} + ***** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] + **** Periodic-discharge-unclear-polarity {inLibrary=score} + ***** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] + * Source-analysis-property {requireChild, inLibrary=score} [How the current in the brain reaches the electrode sensors.] + ** Source-analysis-laterality {requireChild, suggestedTag=Brain-laterality, inLibrary=score} + ** Source-analysis-brain-region {requireChild, inLibrary=score} + *** Source-analysis-frontal-perisylvian-superior-surface {inLibrary=score} + *** Source-analysis-frontal-lateral {inLibrary=score} + *** Source-analysis-frontal-mesial {inLibrary=score} + *** Source-analysis-frontal-polar {inLibrary=score} + *** Source-analysis-frontal-orbitofrontal {inLibrary=score} + *** Source-analysis-temporal-polar {inLibrary=score} + *** Source-analysis-temporal-basal {inLibrary=score} + *** Source-analysis-temporal-lateral-anterior {inLibrary=score} + *** Source-analysis-temporal-lateral-posterior {inLibrary=score} + *** Source-analysis-temporal-perisylvian-inferior-surface {inLibrary=score} + *** Source-analysis-central-lateral-convexity {inLibrary=score} + *** Source-analysis-central-mesial {inLibrary=score} + *** Source-analysis-central-sulcus-anterior-surface {inLibrary=score} + *** Source-analysis-central-sulcus-posterior-surface {inLibrary=score} + *** Source-analysis-central-opercular {inLibrary=score} + *** Source-analysis-parietal-lateral-convexity {inLibrary=score} + *** Source-analysis-parietal-mesial {inLibrary=score} + *** Source-analysis-parietal-opercular {inLibrary=score} + *** Source-analysis-occipital-lateral {inLibrary=score} + *** Source-analysis-occipital-mesial {inLibrary=score} + *** Source-analysis-occipital-basal {inLibrary=score} + *** Source-analysis-insula {inLibrary=score} + * Location-property {requireChild, inLibrary=score} [Location can be scored for findings. Semiologic finding can also be characterized by the somatotopic modifier (i.e. the part of the body where it occurs). In this respect, laterality (left, right, symmetric, asymmetric, left greater than right, right greater than left), body part (eyelid, face, arm, leg, trunk, visceral, hemi-) and centricity (axial, proximal limb, distal limb) can be scored.] + ** Brain-laterality {requireChild, inLibrary=score} + *** Brain-laterality-left {inLibrary=score} + **** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] + *** Brain-laterality-left-greater-right {inLibrary=score} + **** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] + *** Brain-laterality-right {inLibrary=score} + **** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] + *** Brain-laterality-right-greater-left {inLibrary=score} + **** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] + *** Brain-laterality-midline {inLibrary=score} + **** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] + *** Brain-laterality-diffuse-asynchronous {inLibrary=score} + **** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] + ** Brain-region {requireChild, inLibrary=score} + *** Brain-region-frontal {inLibrary=score} + **** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] + *** Brain-region-temporal {inLibrary=score} + **** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] + *** Brain-region-central {inLibrary=score} + **** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] + *** Brain-region-parietal {inLibrary=score} + **** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] + *** Brain-region-occipital {inLibrary=score} + **** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] + ** Body-part-location {requireChild, inLibrary=score} + *** Body-part-eyelid {inLibrary=score} + **** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] + *** Body-part-face {inLibrary=score} + **** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] + *** Body-part-arm {inLibrary=score} + **** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] + *** Body-part-leg {inLibrary=score} + **** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] + *** Body-part-trunk {inLibrary=score} + **** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] + *** Body-part-visceral {inLibrary=score} + **** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] + *** Body-part-hemi {inLibrary=score} + **** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] + ** Brain-centricity {requireChild, inLibrary=score} + *** Brain-centricity-axial {inLibrary=score} + **** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] + *** Brain-centricity-proximal-limb {inLibrary=score} + **** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] + *** Brain-centricity-distal-limb {inLibrary=score} + **** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] + ** Sensors {requireChild, inLibrary=score} [Lists all corresponding sensors (electrodes/channels in montage). The sensor-group is selected from a list defined in the site-settings for each EEG-lab.] + *** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] + ** Finding-propagation {suggestedTag=Property-exists, suggestedTag=Property-absence, suggestedTag=Brain-laterality, suggestedTag=Brain-region, suggestedTag=Sensors, inLibrary=score} [When propagation within the graphoelement is observed, first the location of the onset region is scored. Then, the location of the propagation can be noted.] + *** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] + ** Multifocal-finding {suggestedTag=Property-not-possible-to-determine, suggestedTag=Property-exists, suggestedTag=Property-absence, inLibrary=score} [When the same interictal graphoelement is observed bilaterally and at least in three independent locations, can score them using one entry, and choosing multifocal as a descriptor of the locations of the given interictal graphoelements, optionally emphasizing the involved, and the most active sites.] + *** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] + * Modulators-property {requireChild, inLibrary=score} [For each described graphoelement, the influence of the modulators can be scored. Only modulators present in the recording are scored.] + ** Modulators-reactivity {requireChild, suggestedTag=Property-exists, suggestedTag=Property-absence, inLibrary=score} [Susceptibility of individual rhythms or the EEG as a whole to change following sensory stimulation or other physiologic actions.] + *** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] + ** Eye-closure-sensitivity {suggestedTag=Property-exists, suggestedTag=Property-absence, inLibrary=score} [Eye closure sensitivity.] + *** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] + ** Eye-opening-passive {suggestedTag=Property-not-possible-to-determine, suggestedTag=Finding-stopped-by, suggestedTag=Finding-unmodified, suggestedTag=Finding-triggered-by, inLibrary=score} [Passive eye opening. Used with base schema Increasing/Decreasing.] + ** Medication-effect-EEG {suggestedTag=Property-not-possible-to-determine, suggestedTag=Finding-stopped-by, suggestedTag=Finding-unmodified, inLibrary=score} [Medications effect on EEG. Used with base schema Increasing/Decreasing.] + ** Medication-reduction-effect-EEG {suggestedTag=Property-not-possible-to-determine, suggestedTag=Finding-stopped-by, suggestedTag=Finding-unmodified, inLibrary=score} [Medications reduction or withdrawal effect on EEG. Used with base schema Increasing/Decreasing.] + ** Auditive-stimuli-effect {suggestedTag=Property-not-possible-to-determine, suggestedTag=Finding-stopped-by, suggestedTag=Finding-unmodified, inLibrary=score} [Used with base schema Increasing/Decreasing.] + ** Nociceptive-stimuli-effect {suggestedTag=Property-not-possible-to-determine, suggestedTag=Finding-stopped-by, suggestedTag=Finding-unmodified, suggestedTag=Finding-triggered-by, inLibrary=score} [Used with base schema Increasing/Decreasing.] + ** Physical-effort-effect {suggestedTag=Property-not-possible-to-determine, suggestedTag=Finding-stopped-by, suggestedTag=Finding-unmodified, suggestedTag=Finding-triggered-by, inLibrary=score} [Used with base schema Increasing/Decreasing] + ** Cognitive-task-effect {suggestedTag=Property-not-possible-to-determine, suggestedTag=Finding-stopped-by, suggestedTag=Finding-unmodified, suggestedTag=Finding-triggered-by, inLibrary=score} [Used with base schema Increasing/Decreasing.] + ** Other-modulators-effect-EEG {requireChild, inLibrary=score} + *** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] + ** Facilitating-factor {inLibrary=score} [Facilitating factors are defined as transient and sporadic endogenous or exogenous elements capable of augmenting seizure incidence (increasing the likelihood of seizure occurrence).] + *** Facilitating-factor-alcohol {inLibrary=score} + **** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] + *** Facilitating-factor-awake {inLibrary=score} + **** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] + *** Facilitating-factor-catamenial {inLibrary=score} + **** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] + *** Facilitating-factor-fever {inLibrary=score} + **** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] + *** Facilitating-factor-sleep {inLibrary=score} + **** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] + *** Facilitating-factor-sleep-deprived {inLibrary=score} + **** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] + *** Facilitating-factor-other {requireChild, inLibrary=score} + **** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] + ** Provocative-factor {requireChild, inLibrary=score} [Provocative factors are defined as transient and sporadic endogenous or exogenous elements capable of evoking/triggering seizures immediately following the exposure to it.] + *** Hyperventilation-provoked {inLibrary=score} + **** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] + *** Reflex-provoked {inLibrary=score} + **** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] + ** Medication-effect-clinical {suggestedTag=Finding-stopped-by, suggestedTag=Finding-unmodified, inLibrary=score} [Medications clinical effect. Used with base schema Increasing/Decreasing.] + ** Medication-reduction-effect-clinical {suggestedTag=Finding-stopped-by, suggestedTag=Finding-unmodified, inLibrary=score} [Medications reduction or withdrawal clinical effect. Used with base schema Increasing/Decreasing.] + ** Other-modulators-effect-clinical {requireChild, inLibrary=score} + *** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] + ** Intermittent-photic-stimulation-effect {requireChild, inLibrary=score} + *** Posterior-stimulus-dependent-intermittent-photic-stimulation-response {suggestedTag=Finding-frequency, inLibrary=score} + **** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] + *** Posterior-stimulus-independent-intermittent-photic-stimulation-response-limited {suggestedTag=Finding-frequency, inLibrary=score} [limited to the stimulus-train] + **** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] + *** Posterior-stimulus-independent-intermittent-photic-stimulation-response-self-sustained {suggestedTag=Finding-frequency, inLibrary=score} + **** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] + *** Generalized-photoparoxysmal-intermittent-photic-stimulation-response-limited {suggestedTag=Finding-frequency, inLibrary=score} [Limited to the stimulus-train.] + **** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] + *** Generalized-photoparoxysmal-intermittent-photic-stimulation-response-self-sustained {suggestedTag=Finding-frequency, inLibrary=score} + **** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] + *** Activation-of-pre-existing-epileptogenic-area-intermittent-photic-stimulation-effect {suggestedTag=Finding-frequency, inLibrary=score} + **** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] + *** Unmodified-intermittent-photic-stimulation-effect {inLibrary=score} + **** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] + ** Quality-of-hyperventilation {requireChild, inLibrary=score} + *** Hyperventilation-refused-procedure {inLibrary=score} + **** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] + *** Hyperventilation-poor-effort {inLibrary=score} + **** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] + *** Hyperventilation-good-effort {inLibrary=score} + **** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] + *** Hyperventilation-excellent-effort {inLibrary=score} + **** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] + ** Modulators-effect {requireChild, inLibrary=score} [Tags for describing the influence of the modulators] + *** Modulators-effect-continuous-during-NRS {inLibrary=score} [Continuous during non-rapid-eye-movement-sleep (NRS)] + **** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] + *** Modulators-effect-only-during {inLibrary=score} + **** # {takesValue, valueClass=textClass, inLibrary=score} [Only during Sleep/Awakening/Hyperventilation/Physical effort/Cognitive task. Free text.] + *** Modulators-effect-change-of-patterns {inLibrary=score} [Change of patterns during sleep/awakening.] + **** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] + * Time-related-property {requireChild, inLibrary=score} [Important to estimate how often an interictal abnormality is seen in the recording.] + ** Appearance-mode {requireChild, suggestedTag=Property-not-possible-to-determine, inLibrary=score} [Describes how the non-ictal EEG pattern/graphoelement is distributed through the recording.] + *** Random-appearance-mode {inLibrary=score} [Occurrence of the non-ictal EEG pattern / graphoelement without any rhythmicity / periodicity.] + **** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] + *** Periodic-appearance-mode {inLibrary=score} [Non-ictal EEG pattern / graphoelement occurring at an approximately regular rate / interval (generally of 1 to several seconds).] + **** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] + *** Variable-appearance-mode {inLibrary=score} [Occurrence of non-ictal EEG pattern / graphoelements, that is sometimes rhythmic or periodic, other times random, throughout the recording.] + **** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] + *** Intermittent-appearance-mode {inLibrary=score} + **** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] + *** Continuous-appearance-mode {inLibrary=score} + **** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] + ** Discharge-pattern {requireChild, inLibrary=score} [Describes the organization of the EEG signal within the discharge (distinguish between single and repetitive discharges)] + *** Single-discharge-pattern {suggestedTag=Finding-incidence, inLibrary=score} [Applies to the intra-burst pattern: a graphoelement that is not repetitive; before and after the graphoelement one can distinguish the background activity.] + **** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] + *** Rhythmic-trains-or-bursts-discharge-pattern {suggestedTag=Finding-prevalence, suggestedTag=Finding-frequency, inLibrary=score} [Applies to the intra-burst pattern: a non-ictal graphoelement that repeats itself without returning to the background activity between them. The graphoelements within this repetition occur at approximately constant period.] + **** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] + *** Arrhythmic-trains-or-bursts-discharge-pattern {suggestedTag=Finding-prevalence, inLibrary=score} [Applies to the intra-burst pattern: a non-ictal graphoelement that repeats itself without returning to the background activity between them. The graphoelements within this repetition occur at inconstant period.] + **** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] + *** Fragmented-discharge-pattern {inLibrary=score} + **** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] + ** Periodic-discharge-time-related-features {requireChild, inLibrary=score} [Periodic discharges not further specified (PDs) time-relayed features tags.] + *** Periodic-discharge-duration {requireChild, suggestedTag=Property-not-possible-to-determine, inLibrary=score} + **** Very-brief-periodic-discharge-duration {inLibrary=score} [Less than 10 sec.] + ***** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] + **** Brief-periodic-discharge-duration {inLibrary=score} [10 to 59 sec.] + ***** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] + **** Intermediate-periodic-discharge-duration {inLibrary=score} [1 to 4.9 min.] + ***** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] + **** Long-periodic-discharge-duration {inLibrary=score} [5 to 59 min.] + ***** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] + **** Very-long-periodic-discharge-duration {inLibrary=score} [Greater than 1 hour.] + ***** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] + *** Periodic-discharge-onset {requireChild, suggestedTag=Property-not-possible-to-determine, inLibrary=score} + **** Sudden-periodic-discharge-onset {inLibrary=score} + ***** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] + **** Gradual-periodic-discharge-onset {inLibrary=score} + ***** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] + *** Periodic-discharge-dynamics {requireChild, suggestedTag=Property-not-possible-to-determine, inLibrary=score} + **** Evolving-periodic-discharge-dynamics {inLibrary=score} + ***** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] + **** Fluctuating-periodic-discharge-dynamics {inLibrary=score} + ***** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] + **** Static-periodic-discharge-dynamics {inLibrary=score} + ***** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] + ** Finding-extent {inLibrary=score} [Percentage of occurrence during the recording (background activity and interictal finding).] + *** # {takesValue, valueClass=numericClass, inLibrary=score} + ** Finding-incidence {requireChild, inLibrary=score} [How often it occurs/time-epoch.] + *** Only-once-finding-incidence {inLibrary=score} + **** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] + *** Rare-finding-incidence {inLibrary=score} [less than 1/h] + **** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] + *** Uncommon-finding-incidence {inLibrary=score} [1/5 min to 1/h.] + **** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] + *** Occasional-finding-incidence {inLibrary=score} [1/min to 1/5min.] + **** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] + *** Frequent-finding-incidence {inLibrary=score} [1/10 s to 1/min.] + **** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] + *** Abundant-finding-incidence {inLibrary=score} [Greater than 1/10 s).] + **** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] + ** Finding-prevalence {requireChild, inLibrary=score} [The percentage of the recording covered by the train/burst.] + *** Rare-finding-prevalence {inLibrary=score} [Less than 1 percent.] + **** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] + *** Occasional-finding-prevalence {inLibrary=score} [1 to 9 percent.] + **** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] + *** Frequent-finding-prevalence {inLibrary=score} [10 to 49 percent.] + **** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] + *** Abundant-finding-prevalence {inLibrary=score} [50 to 89 percent.] + **** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] + *** Continuous-finding-prevalence {inLibrary=score} [Greater than 90 percent.] + **** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] + * Posterior-dominant-rhythm-property {requireChild, inLibrary=score} [Posterior dominant rhythm is the most often scored EEG feature in clinical practice. Therefore, there are specific terms that can be chosen for characterizing the PDR.] + ** Posterior-dominant-rhythm-amplitude-range {requireChild, suggestedTag=Property-not-possible-to-determine, inLibrary=score} + *** Low-posterior-dominant-rhythm-amplitude-range {inLibrary=score} [Low (less than 20 microV).] + **** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] + *** Medium-posterior-dominant-rhythm-amplitude-range {inLibrary=score} [Medium (between 20 and 70 microV).] + **** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] + *** High-posterior-dominant-rhythm-amplitude-range {inLibrary=score} [High (more than 70 microV).] + **** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] + ** Posterior-dominant-rhythm-frequency-asymmetry {requireChild, inLibrary=score} [When symmetrical could be labeled with base schema Symmetrical tag.] + *** Posterior-dominant-rhythm-frequency-asymmetry-lower-left {inLibrary=score} [Hz lower on the left side.] + **** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] + *** Posterior-dominant-rhythm-frequency-asymmetry-lower-right {inLibrary=score} [Hz lower on the right side.] + **** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] + ** Posterior-dominant-rhythm-eye-opening-reactivity {suggestedTag=Property-not-possible-to-determine, inLibrary=score} [Change (disappearance or measurable decrease in amplitude) of a posterior dominant rhythm following eye-opening. Eye closure has the opposite effect.] + *** Posterior-dominant-rhythm-eye-opening-reactivity-reduced-left {inLibrary=score} [Reduced left side reactivity.] + **** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] + *** Posterior-dominant-rhythm-eye-opening-reactivity-reduced-right {inLibrary=score} [Reduced right side reactivity.] + **** # {takesValue, valueClass=textClass, inLibrary=score} [free text] + *** Posterior-dominant-rhythm-eye-opening-reactivity-reduced-both {inLibrary=score} [Reduced reactivity on both sides.] + **** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] + ** Posterior-dominant-rhythm-organization {requireChild, inLibrary=score} [When normal could be labeled with base schema Normal tag.] + *** Posterior-dominant-rhythm-organization-poorly-organized {inLibrary=score} [Poorly organized.] + **** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] + *** Posterior-dominant-rhythm-organization-disorganized {inLibrary=score} [Disorganized.] + **** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] + *** Posterior-dominant-rhythm-organization-markedly-disorganized {inLibrary=score} [Markedly disorganized.] + **** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] + ** Posterior-dominant-rhythm-caveat {requireChild, inLibrary=score} [Caveat to the annotation of PDR.] + *** No-posterior-dominant-rhythm-caveat {inLibrary=score} + **** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] + *** Posterior-dominant-rhythm-caveat-only-open-eyes-during-the-recording {inLibrary=score} + **** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] + *** Posterior-dominant-rhythm-caveat-sleep-deprived-caveat {inLibrary=score} + **** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] + *** Posterior-dominant-rhythm-caveat-drowsy {inLibrary=score} + **** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] + *** Posterior-dominant-rhythm-caveat-only-following-hyperventilation {inLibrary=score} + ** Absence-of-posterior-dominant-rhythm {requireChild, inLibrary=score} [Reason for absence of PDR.] + *** Absence-of-posterior-dominant-rhythm-artifacts {inLibrary=score} + **** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] + *** Absence-of-posterior-dominant-rhythm-extreme-low-voltage {inLibrary=score} + **** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] + *** Absence-of-posterior-dominant-rhythm-eye-closure-could-not-be-achieved {inLibrary=score} + **** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] + *** Absence-of-posterior-dominant-rhythm-lack-of-awake-period {inLibrary=score} + **** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] + *** Absence-of-posterior-dominant-rhythm-lack-of-compliance {inLibrary=score} + **** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] + *** Absence-of-posterior-dominant-rhythm-other-causes {requireChild, inLibrary=score} + **** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] + * Episode-property {requireChild, inLibrary=score} + ** Seizure-classification {requireChild, inLibrary=score} [Epileptic seizures are named using the current ILAE seizure classification (Fisher et al., 2017, Beniczky et al., 2017).] + *** Motor-onset-seizure {inLibrary=score} + **** Myoclonic-motor-onset-seizure {inLibrary=score} + **** Negative-myoclonic-motor-onset-seizure {inLibrary=score} + **** Clonic-motor-onset-seizure {inLibrary=score} + **** Tonic-motor-onset-seizure {inLibrary=score} + **** Atonic-motor-onset-seizure {inLibrary=score} + **** Myoclonic-atonic-motor-onset-seizure {inLibrary=score} + **** Myoclonic-tonic-clonic-motor-onset-seizure {inLibrary=score} + **** Tonic-clonic-motor-onset-seizure {inLibrary=score} + **** Automatism-motor-onset-seizure {inLibrary=score} + **** Hyperkinetic-motor-onset-seizure {inLibrary=score} + **** Epileptic-spasm-episode {inLibrary=score} + *** Nonmotor-onset-seizure {inLibrary=score} + **** Behavior-arrest-nonmotor-onset-seizure {inLibrary=score} + **** Sensory-nonmotor-onset-seizure {inLibrary=score} + **** Emotional-nonmotor-onset-seizure {inLibrary=score} + **** Cognitive-nonmotor-onset-seizure {inLibrary=score} + **** Autonomic-nonmotor-onset-seizure {inLibrary=score} + *** Absence-seizure {inLibrary=score} + **** Typical-absence-seizure {inLibrary=score} + **** Atypical-absence-seizure {inLibrary=score} + **** Myoclonic-absence-seizure {inLibrary=score} + **** Eyelid-myoclonia-absence-seizure {inLibrary=score} + ** Episode-phase {requireChild, suggestedTag=Seizure-semiology-manifestation, suggestedTag=Postictal-semiology-manifestation, suggestedTag=Ictal-EEG-patterns, inLibrary=score} [The electroclinical findings (i.e., the seizure semiology and the ictal EEG) are divided in three phases: onset, propagation, and postictal.] + *** Episode-phase-initial {inLibrary=score} + *** Episode-phase-subsequent {inLibrary=score} + *** Episode-phase-postictal {inLibrary=score} + ** Seizure-semiology-manifestation {requireChild, inLibrary=score} [Semiology is described according to the ILAE Glossary of Descriptive Terminology for Ictal Semiology (Blume et al., 2001). Besides the name, the semiologic finding can also be characterized by the somatotopic modifier, laterality, body part and centricity. Uses Location-property tags.] + *** Semiology-motor-manifestation {inLibrary=score} + **** Semiology-elementary-motor {inLibrary=score} + ***** Semiology-motor-tonic {suggestedTag=Brain-laterality, suggestedTag=Body-part, suggestedTag=Brain-centricity, suggestedTag=Episode-event-count, inLibrary=score} [A sustained increase in muscle contraction lasting a few seconds to minutes.] + ***** Semiology-motor-dystonic {suggestedTag=Brain-laterality, suggestedTag=Body-part, suggestedTag=Brain-centricity, suggestedTag=Episode-event-count, inLibrary=score} [Sustained contractions of both agonist and antagonist muscles producing athetoid or twisting movements, which, when prolonged, may produce abnormal postures.] + ***** Semiology-motor-epileptic-spasm {suggestedTag=Brain-laterality, suggestedTag=Body-part, suggestedTag=Brain-centricity, suggestedTag=Episode-event-count, inLibrary=score} [A sudden flexion, extension, or mixed extension flexion of predominantly proximal and truncal muscles that is usually more sustained than a myoclonic movement but not so sustained as a tonic seizure (i.e., about 1 s). Limited forms may occur: grimacing, head nodding. Frequent occurrence in clusters.] + ***** Semiology-motor-postural {suggestedTag=Brain-laterality, suggestedTag=Body-part, suggestedTag=Brain-centricity, suggestedTag=Episode-event-count, inLibrary=score} [Adoption of a posture that may be bilaterally symmetric or asymmetric (as in a fencing posture).] + ***** Semiology-motor-versive {suggestedTag=Body-part, suggestedTag=Episode-event-count, inLibrary=score} [A sustained, forced conjugate ocular, cephalic, and/or truncal rotation or lateral deviation from the midline.] + ***** Semiology-motor-clonic {suggestedTag=Brain-laterality, suggestedTag=Body-part, suggestedTag=Brain-centricity, suggestedTag=Episode-event-count, inLibrary=score} [Myoclonus that is regularly repetitive, involves the same muscle groups, at a frequency of about 2 to 3 c/s, and is prolonged. Synonym: rhythmic myoclonus .] + ***** Semiology-motor-myoclonic {suggestedTag=Brain-laterality, suggestedTag=Body-part, suggestedTag=Brain-centricity, suggestedTag=Episode-event-count, inLibrary=score} [Characterized by myoclonus. MYOCLONUS : sudden, brief (lower than 100 ms) involuntary single or multiple contraction(s) of muscles(s) or muscle groups of variable topography (axial, proximal limb, distal).] + ***** Semiology-motor-jacksonian-march {suggestedTag=Brain-laterality, suggestedTag=Body-part, suggestedTag=Brain-centricity, suggestedTag=Episode-event-count, inLibrary=score} [Term indicating spread of clonic movements through contiguous body parts unilaterally.] + ***** Semiology-motor-negative-myoclonus {suggestedTag=Brain-laterality, suggestedTag=Body-part, suggestedTag=Brain-centricity, suggestedTag=Episode-event-count, inLibrary=score} [Characterized by negative myoclonus. NEGATIVE MYOCLONUS: interruption of tonic muscular activity for lower than 500 ms without evidence of preceding myoclonia.] + ***** Semiology-motor-tonic-clonic {requireChild, inLibrary=score} [A sequence consisting of a tonic followed by a clonic phase. Variants such as clonic-tonic-clonic may be seen. Asymmetry of limb posture during the tonic phase of a GTC: one arm is rigidly extended at the elbow (often with the fist clenched tightly and flexed at the wrist), whereas the opposite arm is flexed at the elbow.] + ****** Semiology-motor-tonic-clonic-without-figure-of-four {suggestedTag=Brain-laterality, suggestedTag=Body-part, suggestedTag=Brain-centricity, suggestedTag=Episode-event-count, inLibrary=score} + ****** Semiology-motor-tonic-clonic-with-figure-of-four-extension-left-elbow {suggestedTag=Brain-laterality, suggestedTag=Body-part, suggestedTag=Brain-centricity, suggestedTag=Episode-event-count, inLibrary=score} + ****** Semiology-motor-tonic-clonic-with-figure-of-four-extension-right-elbow {suggestedTag=Brain-laterality, suggestedTag=Body-part, suggestedTag=Brain-centricity, suggestedTag=Episode-event-count, inLibrary=score} + ***** Semiology-motor-astatic {suggestedTag=Brain-laterality, suggestedTag=Body-part, suggestedTag=Brain-centricity, suggestedTag=Episode-event-count, inLibrary=score} [Loss of erect posture that results from an atonic, myoclonic, or tonic mechanism. Synonym: drop attack.] + ***** Semiology-motor-atonic {suggestedTag=Brain-laterality, suggestedTag=Body-part, suggestedTag=Brain-centricity, suggestedTag=Episode-event-count, inLibrary=score} [Sudden loss or diminution of muscle tone without apparent preceding myoclonic or tonic event lasting greater or equal to 1 to 2 s, involving head, trunk, jaw, or limb musculature.] + ***** Semiology-motor-eye-blinking {suggestedTag=Brain-laterality, suggestedTag=Episode-event-count, inLibrary=score} + ***** Semiology-motor-other-elementary-motor {requireChild, inLibrary=score} + ****** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] + **** Semiology-motor-automatisms {inLibrary=score} + ***** Semiology-motor-automatisms-mimetic {suggestedTag=Episode-responsiveness, suggestedTag=Episode-appearance, suggestedTag=Episode-event-count, inLibrary=score} [Facial expression suggesting an emotional state, often fear.] + ***** Semiology-motor-automatisms-oroalimentary {suggestedTag=Episode-responsiveness, suggestedTag=Episode-appearance, suggestedTag=Episode-event-count, inLibrary=score} [Lip smacking, lip pursing, chewing, licking, tooth grinding, or swallowing.] + ***** Semiology-motor-automatisms-dacrystic {suggestedTag=Episode-responsiveness, suggestedTag=Episode-appearance, suggestedTag=Episode-event-count, inLibrary=score} [Bursts of crying.] + ***** Semiology-motor-automatisms-dyspraxic {suggestedTag=Brain-laterality, suggestedTag=Body-part, suggestedTag=Brain-centricity, suggestedTag=Episode-responsiveness, suggestedTag=Episode-appearance, suggestedTag=Episode-event-count, inLibrary=score} [Inability to perform learned movements spontaneously or on command or imitation despite intact relevant motor and sensory systems and adequate comprehension and cooperation.] + ***** Semiology-motor-automatisms-manual {suggestedTag=Brain-laterality, suggestedTag=Brain-centricity, suggestedTag=Episode-responsiveness, suggestedTag=Episode-appearance, suggestedTag=Episode-event-count, inLibrary=score} [1. Indicates principally distal components, bilateral or unilateral. 2. Fumbling, tapping, manipulating movements.] + ***** Semiology-motor-automatisms-gestural {suggestedTag=Brain-laterality, suggestedTag=Episode-responsiveness, suggestedTag=Episode-appearance, suggestedTag=Episode-event-count, inLibrary=score} [Semipurposive, asynchronous hand movements. Often unilateral.] + ***** Semiology-motor-automatisms-pedal {suggestedTag=Brain-laterality, suggestedTag=Brain-centricity, suggestedTag=Episode-responsiveness, suggestedTag=Episode-appearance, suggestedTag=Episode-event-count, inLibrary=score} [1. Indicates principally distal components, bilateral or unilateral. 2. Fumbling, tapping, manipulating movements.] + ***** Semiology-motor-automatisms-hypermotor {suggestedTag=Brain-laterality, suggestedTag=Body-part, suggestedTag=Brain-centricity, suggestedTag=Episode-responsiveness, suggestedTag=Episode-appearance, suggestedTag=Episode-event-count, inLibrary=score} [1. Involves predominantly proximal limb or axial muscles producing irregular sequential ballistic movements, such as pedaling, pelvic thrusting, thrashing, rocking movements. 2. Increase in rate of ongoing movements or inappropriately rapid performance of a movement.] + ***** Semiology-motor-automatisms-hypokinetic {suggestedTag=Brain-laterality, suggestedTag=Body-part, suggestedTag=Brain-centricity, suggestedTag=Episode-responsiveness, suggestedTag=Episode-appearance, suggestedTag=Episode-event-count, inLibrary=score} [A decrease in amplitude and/or rate or arrest of ongoing motor activity.] + ***** Semiology-motor-automatisms-gelastic {suggestedTag=Episode-responsiveness, suggestedTag=Episode-appearance, suggestedTag=Episode-event-count, inLibrary=score} [Bursts of laughter or giggling, usually without an appropriate affective tone.] + ***** Semiology-motor-other-automatisms {requireChild, inLibrary=score} + ****** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] + **** Semiology-motor-behavioral-arrest {suggestedTag=Brain-laterality, suggestedTag=Body-part, suggestedTag=Brain-centricity, suggestedTag=Episode-event-count, inLibrary=score} [Interruption of ongoing motor activity or of ongoing behaviors with fixed gaze, without movement of the head or trunk (oro-alimentary and hand automatisms may continue).] + *** Semiology-non-motor-manifestation {inLibrary=score} + **** Semiology-sensory {inLibrary=score} + ***** Semiology-sensory-headache {suggestedTag=Brain-laterality, suggestedTag=Episode-event-count, inLibrary=score} [Headache occurring in close temporal proximity to the seizure or as the sole seizure manifestation.] + ***** Semiology-sensory-visual {suggestedTag=Brain-laterality, suggestedTag=Episode-event-count, inLibrary=score} [Flashing or flickering lights, spots, simple patterns, scotomata, or amaurosis.] + ***** Semiology-sensory-auditory {suggestedTag=Brain-laterality, suggestedTag=Episode-event-count, inLibrary=score} [Buzzing, drumming sounds or single tones.] + ***** Semiology-sensory-olfactory {suggestedTag=Body-part, suggestedTag=Episode-event-count, inLibrary=score} + ***** Semiology-sensory-gustatory {suggestedTag=Episode-event-count, inLibrary=score} [Taste sensations including acidic, bitter, salty, sweet, or metallic.] + ***** Semiology-sensory-epigastric {suggestedTag=Episode-event-count, inLibrary=score} [Abdominal discomfort including nausea, emptiness, tightness, churning, butterflies, malaise, pain, and hunger; sensation may rise to chest or throat. Some phenomena may reflect ictal autonomic dysfunction.] + ***** Semiology-sensory-somatosensory {suggestedTag=Brain-laterality, suggestedTag=Body-part, suggestedTag=Brain-centricity, suggestedTag=Episode-event-count, inLibrary=score} [Tingling, numbness, electric-shock sensation, sense of movement or desire to move.] + ***** Semiology-sensory-painful {suggestedTag=Brain-laterality, suggestedTag=Body-part, suggestedTag=Brain-centricity, suggestedTag=Episode-event-count, inLibrary=score} [Peripheral (lateralized/bilateral), cephalic, abdominal.] + ***** Semiology-sensory-autonomic-sensation {suggestedTag=Episode-event-count, inLibrary=score} [A sensation consistent with involvement of the autonomic nervous system, including cardiovascular, gastrointestinal, sudomotor, vasomotor, and thermoregulatory functions. (Thus autonomic aura; cf. autonomic events 3.0).] + ***** Semiology-sensory-other {requireChild, inLibrary=score} + ****** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] + **** Semiology-experiential {inLibrary=score} + ***** Semiology-experiential-affective-emotional {suggestedTag=Episode-event-count, inLibrary=score} [Components include fear, depression, joy, and (rarely) anger.] + ***** Semiology-experiential-hallucinatory {suggestedTag=Episode-event-count, inLibrary=score} [Composite perceptions without corresponding external stimuli involving visual, auditory, somatosensory, olfactory, and/or gustatory phenomena. Example: hearing and seeing people talking.] + ***** Semiology-experiential-illusory {suggestedTag=Episode-event-count, inLibrary=score} [An alteration of actual percepts involving the visual, auditory, somatosensory, olfactory, or gustatory systems.] + ***** Semiology-experiential-mnemonic {inLibrary=score} [Components that reflect ictal dysmnesia such as feelings of familiarity (deja-vu) and unfamiliarity (jamais-vu).] + ****** Semiology-experiential-mnemonic-Deja-vu {suggestedTag=Episode-event-count, inLibrary=score} + ****** Semiology-experiential-mnemonic-Jamais-vu {suggestedTag=Episode-event-count, inLibrary=score} + ***** Semiology-experiential-other {requireChild, inLibrary=score} + ****** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] + **** Semiology-dyscognitive {suggestedTag=Episode-event-count, inLibrary=score} [The term describes events in which (1) disturbance of cognition is the predominant or most apparent feature, and (2a) two or more of the following components are involved, or (2b) involvement of such components remains undetermined. Otherwise, use the more specific term (e.g., mnemonic experiential seizure or hallucinatory experiential seizure). Components of cognition: ++ perception: symbolic conception of sensory information ++ attention: appropriate selection of a principal perception or task ++ emotion: appropriate affective significance of a perception ++ memory: ability to store and retrieve percepts or concepts ++ executive function: anticipation, selection, monitoring of consequences, and initiation of motor activity including praxis, speech.] + **** Semiology-language-related {inLibrary=score} + ***** Semiology-language-related-vocalization {suggestedTag=Episode-event-count, inLibrary=score} + ***** Semiology-language-related-verbalization {suggestedTag=Episode-event-count, inLibrary=score} + ***** Semiology-language-related-dysphasia {suggestedTag=Episode-event-count, inLibrary=score} + ***** Semiology-language-related-aphasia {suggestedTag=Episode-event-count, inLibrary=score} + ***** Semiology-language-related-other {requireChild, inLibrary=score} + ****** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] + **** Semiology-autonomic {inLibrary=score} + ***** Semiology-autonomic-pupillary {suggestedTag=Brain-laterality, suggestedTag=Episode-event-count, inLibrary=score} [Mydriasis, miosis (either bilateral or unilateral).] + ***** Semiology-autonomic-hypersalivation {suggestedTag=Episode-event-count, inLibrary=score} [Increase in production of saliva leading to uncontrollable drooling] + ***** Semiology-autonomic-respiratory-apnoeic {suggestedTag=Episode-event-count, inLibrary=score} [subjective shortness of breath, hyperventilation, stridor, coughing, choking, apnea, oxygen desaturation, neurogenic pulmonary edema.] + ***** Semiology-autonomic-cardiovascular {suggestedTag=Episode-event-count, inLibrary=score} [Modifications of heart rate (tachycardia, bradycardia), cardiac arrhythmias (such as sinus arrhythmia, sinus arrest, supraventricular tachycardia, atrial premature depolarizations, ventricular premature depolarizations, atrio-ventricular block, bundle branch block, atrioventricular nodal escape rhythm, asystole).] + ***** Semiology-autonomic-gastrointestinal {suggestedTag=Episode-event-count, inLibrary=score} [Nausea, eructation, vomiting, retching, abdominal sensations, abdominal pain, flatulence, spitting, diarrhea.] + ***** Semiology-autonomic-urinary-incontinence {suggestedTag=Episode-event-count, inLibrary=score} [urinary urge (intense urinary urge at the beginning of seizures), urinary incontinence, ictal urination (rare symptom of partial seizures without loss of consciousness).] + ***** Semiology-autonomic-genital {suggestedTag=Episode-event-count, inLibrary=score} [Sexual auras (erotic thoughts and feelings, sexual arousal and orgasm). Genital auras (unpleasant, sometimes painful, frightening or emotionally neutral somatosensory sensations in the genitals that can be accompanied by ictal orgasm). Sexual automatisms (hypermotor movements consisting of writhing, thrusting, rhythmic movements of the pelvis, arms and legs, sometimes associated with picking and rhythmic manipulation of the groin or genitalia, exhibitionism and masturbation).] + ***** Semiology-autonomic-vasomotor {suggestedTag=Episode-event-count, inLibrary=score} [Flushing or pallor (may be accompanied by feelings of warmth, cold and pain).] + ***** Semiology-autonomic-sudomotor {suggestedTag=Brain-laterality, suggestedTag=Episode-event-count, inLibrary=score} [Sweating and piloerection (may be accompanied by feelings of warmth, cold and pain).] + ***** Semiology-autonomic-thermoregulatory {suggestedTag=Episode-event-count, inLibrary=score} [Hyperthermia, fever.] + ***** Semiology-autonomic-other {requireChild, inLibrary=score} + ****** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] + *** Semiology-manifestation-other {requireChild, inLibrary=score} + **** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] + ** Postictal-semiology-manifestation {requireChild, inLibrary=score} + *** Postictal-semiology-unconscious {suggestedTag=Episode-event-count, inLibrary=score} + *** Postictal-semiology-quick-recovery-of-consciousness {suggestedTag=Episode-event-count, inLibrary=score} [Quick recovery of awareness and responsiveness.] + *** Postictal-semiology-aphasia-or-dysphasia {suggestedTag=Episode-event-count, inLibrary=score} [Impaired communication involving language without dysfunction of relevant primary motor or sensory pathways, manifested as impaired comprehension, anomia, parahasic errors or a combination of these.] + *** Postictal-semiology-behavioral-change {suggestedTag=Episode-event-count, inLibrary=score} [Occurring immediately after a aseizure. Including psychosis, hypomanina, obsessive-compulsive behavior.] + *** Postictal-semiology-hemianopia {suggestedTag=Brain-laterality, suggestedTag=Episode-event-count, inLibrary=score} [Postictal visual loss in a a hemi field.] + *** Postictal-semiology-impaired-cognition {suggestedTag=Episode-event-count, inLibrary=score} [Decreased Cognitive performance involving one or more of perception, attention, emotion, memory, execution, praxis, speech.] + *** Postictal-semiology-dysphoria {suggestedTag=Episode-event-count, inLibrary=score} [Depression, irritability, euphoric mood, fear, anxiety.] + *** Postictal-semiology-headache {suggestedTag=Episode-event-count, inLibrary=score} [Headache with features of tension-type or migraine headache that develops within 3 h following the seizure and resolves within 72 h after seizure.] + *** Postictal-semiology-nose-wiping {suggestedTag=Brain-laterality, suggestedTag=Episode-event-count, inLibrary=score} [Noes-wiping usually within 60 sec of seizure offset, usually with the hand ipsilateral to the seizure onset.] + *** Postictal-semiology-anterograde-amnesia {suggestedTag=Episode-event-count, inLibrary=score} [Impaired ability to remember new material.] + *** Postictal-semiology-retrograde-amnesia {suggestedTag=Episode-event-count, inLibrary=score} [Impaired ability to recall previously remember material.] + *** Postictal-semiology-paresis {suggestedTag=Brain-laterality, suggestedTag=Body-part, suggestedTag=Brain-centricity, suggestedTag=Episode-event-count, inLibrary=score} [Todds palsy. Any unilateral postictal dysfunction relating to motor, language, sensory and/or integrative functions.] + *** Postictal-semiology-sleep {inLibrary=score} [Invincible need to sleep after a seizure.] + *** Postictal-semiology-unilateral-myoclonic-jerks {inLibrary=score} [unilateral motor phenomena, other then specified, occurring in postictal phase.] + *** Postictal-semiology-other-unilateral-motor-phenomena {requireChild, inLibrary=score} + **** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] + ** Polygraphic-channel-relation-to-episode {requireChild, suggestedTag=Property-not-possible-to-determine, inLibrary=score} + *** Polygraphic-channel-cause-to-episode {inLibrary=score} + *** Polygraphic-channel-consequence-of-episode {inLibrary=score} + ** Ictal-EEG-patterns {inLibrary=score} + *** Ictal-EEG-patterns-obscured-by-artifacts {inLibrary=score} [The interpretation of the EEG is not possible due to artifacts.] + **** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] + *** Ictal-EEG-activity {suggestedTag=Polyspikes-morphology, suggestedTag=Fast-spike-activity-morphology, suggestedTag=Low-voltage-fast-activity-morphology, suggestedTag=Polysharp-waves-morphology, suggestedTag=Spike-and-slow-wave-morphology, suggestedTag=Polyspike-and-slow-wave-morphology, suggestedTag=Sharp-and-slow-wave-morphology, suggestedTag=Rhythmic-activity-morphology, suggestedTag=Slow-wave-large-amplitude-morphology, suggestedTag=Irregular-delta-or-theta-activity-morphology, suggestedTag=Electrodecremental-change-morphology, suggestedTag=DC-shift-morphology, suggestedTag=Disappearance-of-ongoing-activity-morphology, suggestedTag=Brain-laterality, suggestedTag=Brain-region, suggestedTag=Sensors, suggestedTag=Source-analysis-laterality, suggestedTag=Source-analysis-brain-region, suggestedTag=Episode-event-count, inLibrary=score} + *** Postictal-EEG-activity {suggestedTag=Brain-laterality, suggestedTag=Body-part, suggestedTag=Brain-centricity, inLibrary=score} + ** Episode-time-context-property {inLibrary=score} [Additional clinically relevant features related to episodes can be scored under timing and context. If needed, episode duration can be tagged with base schema /Property/Data-property/Data-value/Spatiotemporal-value/Temporal-value/Duration.] + *** Episode-consciousness {requireChild, suggestedTag=Property-not-possible-to-determine, inLibrary=score} + **** Episode-consciousness-not-tested {inLibrary=score} + ***** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] + **** Episode-consciousness-affected {inLibrary=score} + ***** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] + **** Episode-consciousness-mildly-affected {inLibrary=score} + ***** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] + **** Episode-consciousness-not-affected {inLibrary=score} + ***** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] + *** Episode-awareness {suggestedTag=Property-not-possible-to-determine, suggestedTag=Property-exists, suggestedTag=Property-absence, inLibrary=score} + **** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] + *** Clinical-EEG-temporal-relationship {suggestedTag=Property-not-possible-to-determine, inLibrary=score} + **** Clinical-start-followed-EEG {inLibrary=score} [Clinical start, followed by EEG start by X seconds.] + ***** # {takesValue, valueClass=numericClass, unitClass=timeUnits, inLibrary=score} + **** EEG-start-followed-clinical {inLibrary=score} [EEG start, followed by clinical start by X seconds.] + ***** # {takesValue, valueClass=numericClass, unitClass=timeUnits, inLibrary=score} + **** Simultaneous-start-clinical-EEG {inLibrary=score} + **** Clinical-EEG-temporal-relationship-notes {inLibrary=score} [Clinical notes to annotate the clinical-EEG temporal relationship.] + ***** # {takesValue, valueClass=textClass, inLibrary=score} + *** Episode-event-count {suggestedTag=Property-not-possible-to-determine, inLibrary=score} [Number of stereotypical episodes during the recording.] + **** # {takesValue, valueClass=numericClass, inLibrary=score} + *** State-episode-start {requireChild, suggestedTag=Property-not-possible-to-determine, inLibrary=score} [State at the start of the episode.] + **** Episode-start-from-sleep {inLibrary=score} + ***** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] + **** Episode-start-from-awake {inLibrary=score} + ***** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] + *** Episode-postictal-phase {suggestedTag=Property-not-possible-to-determine, inLibrary=score} + **** # {takesValue, valueClass=numericClass, unitClass=timeUnits, inLibrary=score} + *** Episode-prodrome {suggestedTag=Property-exists, suggestedTag=Property-absence, inLibrary=score} [Prodrome is a preictal phenomenon, and it is defined as a subjective or objective clinical alteration (e.g., ill-localized sensation or agitation) that heralds the onset of an epileptic seizure but does not form part of it (Blume et al., 2001). Therefore, prodrome should be distinguished from aura (which is an ictal phenomenon).] + **** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] + *** Episode-tongue-biting {suggestedTag=Property-exists, suggestedTag=Property-absence, inLibrary=score} + **** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] + *** Episode-responsiveness {requireChild, suggestedTag=Property-not-possible-to-determine, inLibrary=score} + **** Episode-responsiveness-preserved {inLibrary=score} + ***** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] + **** Episode-responsiveness-affected {inLibrary=score} + ***** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] + *** Episode-appearance {requireChild, inLibrary=score} + **** Episode-appearance-interactive {inLibrary=score} + ***** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] + **** Episode-appearance-spontaneous {inLibrary=score} + ***** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] + *** Seizure-dynamics {requireChild, inLibrary=score} [Spatiotemporal dynamics can be scored (evolution in morphology; evolution in frequency; evolution in location).] + **** Seizure-dynamics-evolution-morphology {inLibrary=score} + ***** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] + **** Seizure-dynamics-evolution-frequency {inLibrary=score} + ***** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] + **** Seizure-dynamics-evolution-location {inLibrary=score} + ***** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] + **** Seizure-dynamics-not-possible-to-determine {inLibrary=score} [Not possible to determine.] + ***** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] + * Other-finding-property {requireChild, inLibrary=score} + ** Artifact-significance-to-recording {requireChild, inLibrary=score} [It is important to score the significance of the described artifacts: recording is not interpretable, recording of reduced diagnostic value, does not interfere with the interpretation of the recording.] + *** Recording-not-interpretable-due-to-artifact {inLibrary=score} + **** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] + *** Recording-of-reduced-diagnostic-value-due-to-artifact {inLibrary=score} + **** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] + *** Artifact-does-not-interfere-recording {inLibrary=score} + **** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] + ** Finding-significance-to-recording {requireChild, inLibrary=score} [Significance of finding. When normal/abnormal could be labeled with base schema Normal/Abnormal tags.] + *** Finding-no-definite-abnormality {inLibrary=score} + **** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] + *** Finding-significance-not-possible-to-determine {inLibrary=score} [Not possible to determine.] + **** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] + ** Finding-frequency {inLibrary=score} [Value in Hz (number) typed in.] + *** # {takesValue, valueClass=numericClass, unitClass=frequencyUnits, inLibrary=score} + ** Finding-amplitude {inLibrary=score} [Value in microvolts (number) typed in.] + *** # {takesValue, valueClass=numericClass, unitClass=electricPotentialUnits, inLibrary=score} + ** Finding-amplitude-asymmetry {requireChild, inLibrary=score} [For posterior dominant rhythm: a difference in amplitude between the homologous area on opposite sides of the head that consistently exceeds 50 percent. When symmetrical could be labeled with base schema Symmetrical tag. For sleep: Absence or consistently marked amplitude asymmetry (greater than 50 percent) of a normal sleep graphoelement.] + *** Finding-amplitude-asymmetry-lower-left {inLibrary=score} [Amplitude lower on the left side.] + **** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] + *** Finding-amplitude-asymmetry-lower-right {inLibrary=score} [Amplitude lower on the right side.] + **** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] + *** Finding-amplitude-asymmetry-not-possible-to-determine {inLibrary=score} [Not possible to determine.] + **** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] + ** Finding-stopped-by {inLibrary=score} + *** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] + ** Finding-triggered-by {inLibrary=score} + *** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] + ** Finding-unmodified {inLibrary=score} + *** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] + ** Property-not-possible-to-determine {inLibrary=score} [Not possible to determine.] + *** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] + ** Property-exists {inLibrary=score} + *** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] + ** Property-absence {inLibrary=score} + *** # {takesValue, valueClass=textClass, inLibrary=score} [Free text.] !# end schema + '''Unit classes''' * accelerationUnits {defaultUnits=m-per-s^2} ** m-per-s^2 {SIUnit, unitSymbol, conversionFactor=1.0} @@ -2041,6 +2043,7 @@ For more information see https://hed-schema-library.readthedocs.io/en/latest/ind * physicalLengthUnits {defaultUnits=m} ** foot {conversionFactor=0.3048} ** inch {conversionFactor=0.0254} +** meter {SIUnit, conversionFactor=1.0} ** metre {SIUnit, conversionFactor=1.0} ** m {SIUnit, unitSymbol, conversionFactor=1.0} ** mile {conversionFactor=1609.34} @@ -2065,7 +2068,6 @@ For more information see https://hed-schema-library.readthedocs.io/en/latest/ind ** pound {conversionFactor=453.592} ** lb {conversionFactor=453.592} - '''Unit modifiers''' * deca {SIUnitModifier, conversionFactor=10.0} [SI unit multiple representing 10^1.] * da {SIUnitSymbolModifier, conversionFactor=10.0} [SI unit multiple representing 10^1.] @@ -2118,30 +2120,34 @@ For more information see https://hed-schema-library.readthedocs.io/en/latest/ind '''Schema attributes''' * allowedCharacter {valueClassProperty} [A schema attribute of value classes specifying a special character that is allowed in expressing the value of a placeholder. Normally the allowed characters are listed individually. However, the word letters designates the upper and lower case alphabetic characters and the word digits designates the digits 0-9. The word blank designates the blank character.] * conversionFactor {unitProperty, unitModifierProperty} [The multiplicative factor to multiply these units to convert to default units.] -* deprecated {boolProperty} [This tag is out of date and should no longer be used.] +* deprecatedFrom {elementProperty} [Indicates that this element is deprecated. The value of the attribute is the latest schema version in which the element appeared in undeprecated form.] * defaultUnits {unitClassProperty} [A schema attribute of unit classes specifying the default units to use if the placeholder has a unit class but the substituted value has no units.] -* extensionAllowed {boolProperty} [A schema attribute indicating that users can add unlimited levels of child nodes under this tag. This tag is propagated to child nodes with the exception of the hashtag placeholders.] -* inLibrary {elementProperty} [Indicates this node came from the named library schema, not the standard schema.] -* recommended {boolProperty} [A schema attribute indicating that the event-level HED string should include this tag.] -* relatedTag [A schema attribute suggesting HED tags that are closely related to this tag. This attribute is used by tagging tools.] -* requireChild {boolProperty} [A schema attribute indicating that one of the node elements descendants must be included when using this tag.] -* required {boolProperty} [A schema attribute indicating that every event-level HED string should include this tag.] +* extensionAllowed {boolProperty, nodeProperty, isInherited} [A schema attribute indicating that users can add unlimited levels of child nodes under this tag. This tag is propagated to child nodes with the exception of the hashtag placeholders.] +* inLibrary {elementProperty} [Indicates this schema element came from the named library schema, not the standard schema. This attribute is added by tools when a library schema is merged into its partnered standard schema.] +* recommended {boolProperty, nodeProperty} [A schema attribute indicating that the event-level HED string should include this tag.] +* relatedTag {nodeProperty, isInherited} [A schema attribute suggesting HED tags that are closely related to this tag. This attribute is used by tagging tools.] +* requireChild {boolProperty, nodeProperty} [A schema attribute indicating that one of the node elements descendants must be included when using this tag.] +* required {boolProperty, nodeProperty} [A schema attribute indicating that every event-level HED string should include this tag.] +* reserved {boolProperty, nodeProperty} [A schema attribute indicating that this tag has special meaning and requires special handling by tools.] +* rooted {nodeProperty} [Indicates a top-level library schema node is identical to a node of the same name in the partnered standard schema. This attribute can only appear in nodes that have the inLibrary schema attribute.] * SIUnit {boolProperty, unitProperty} [A schema attribute indicating that this unit element is an SI unit and can be modified by multiple and submultiple names. Note that some units such as byte are designated as SI units although they are not part of the standard.] * SIUnitModifier {boolProperty, unitModifierProperty} [A schema attribute indicating that this SI unit modifier represents a multiple or submultiple of a base unit rather than a unit symbol.] * SIUnitSymbolModifier {boolProperty, unitModifierProperty} [A schema attribute indicating that this SI unit modifier represents a multiple or submultiple of a unit symbol rather than a base symbol.] -* suggestedTag [A schema attribute that indicates another tag that is often associated with this tag. This attribute is used by tagging tools to provide tagging suggestions.] -* tagGroup {boolProperty} [A schema attribute indicating the tag can only appear inside a tag group.] -* takesValue {boolProperty} [A schema attribute indicating the tag is a hashtag placeholder that is expected to be replaced with a user-defined value.] -* topLevelTagGroup {boolProperty} [A schema attribute indicating that this tag (or its descendants) can only appear in a top-level tag group. A tag group can have at most one tag with this attribute.] -* unique {boolProperty} [A schema attribute indicating that only one of this tag or its descendants can be used in the event-level HED string.] -* unitClass [A schema attribute specifying which unit class this value tag belongs to.] +* suggestedTag {nodeProperty, isInherited} [A schema attribute that indicates another tag that is often associated with this tag. This attribute is used by tagging tools to provide tagging suggestions.] +* tagGroup {boolProperty, nodeProperty} [A schema attribute indicating the tag can only appear inside a tag group.] +* takesValue {boolProperty, nodeProperty} [A schema attribute indicating the tag is a hashtag placeholder that is expected to be replaced with a user-defined value.] +* topLevelTagGroup {boolProperty, nodeProperty} [A schema attribute indicating that this tag (or its descendants) can only appear in a top-level tag group. A tag group can have at most one tag with this attribute.] +* unique {boolProperty, nodeProperty} [A schema attribute indicating that only one of this tag or its descendants can be used in the event-level HED string.] +* unitClass {nodeProperty} [A schema attribute specifying which unit class this value tag belongs to.] * unitPrefix {boolProperty, unitProperty} [A schema attribute applied specifically to unit elements to designate that the unit indicator is a prefix (e.g., dollar sign in the currency units).] * unitSymbol {boolProperty, unitProperty} [A schema attribute indicating this tag is an abbreviation or symbol representing a type of unit. Unit symbols represent both the singular and the plural and thus cannot be pluralized.] -* valueClass [A schema attribute specifying which value class this value tag belongs to.] +* valueClass {nodeProperty} [A schema attribute specifying which value class this value tag belongs to.] '''Properties''' * boolProperty [Indicates that the schema attribute represents something that is either true or false and does not have a value. Attributes without this value are assumed to have string values.] * elementProperty [Indicates this schema attribute can apply to any type of element(tag term, unit class, etc).] +* isInherited [Indicates that this attribute is inherited by child nodes. This property only applies to schema attributes for nodes.] +* nodeProperty [Indicates this schema attribute applies to node (tag-term) elements. This was added to allow for an attribute to apply to multiple elements.] * unitClassProperty [Indicates that the schema attribute is meant to be applied to unit classes.] * unitModifierProperty [Indicates that the schema attribute is meant to be applied to unit modifier classes.] * unitProperty [Indicates that the schema attribute is meant to be applied to units within a unit class.] diff --git a/tests/data/schema_tests/merge_tests/HED_score_merged.xml b/tests/data/schema_tests/merge_tests/HED_score_merged.xml index de6381d61..149841e13 100644 --- a/tests/data/schema_tests/merge_tests/HED_score_merged.xml +++ b/tests/data/schema_tests/merge_tests/HED_score_merged.xml @@ -1,5 +1,5 @@ - + This schema is a Hierarchical Event Descriptors (HED) Library Schema implementation of Standardized Computer-based Organized Reporting of EEG (SCORE)[1,2] for describing events occurring during neuroimaging time series recordings. The HED-SCORE library schema allows neurologists, neurophysiologists, and brain researchers to annotate electrophysiology recordings using terms from an internationally accepted set of defined terms (SCORE) compatible with the HED framework. The resulting annotations are understandable to clinicians and directly usable in computer analysis. @@ -935,6 +935,10 @@ For more information see https://hed-schema-library.readthedocs.io/en/latest/ind Gentalia The external organs of reproduction. + + deprecatedFrom + 8.1.0 + Hip @@ -2134,19 +2138,50 @@ For more information see https://hed-schema-library.readthedocs.io/en/latest/ind Temporal-marker An indicator placed at a particular time in the data. + + Inset + Marks an intermediate point in an ongoing event of temporal extent. + + topLevelTagGroup + + + reserved + + + relatedTag + Onset + Offset + + Onset - Labels the start or beginning of something, usually an event. + Marks the start of an ongoing event of temporal extent. topLevelTagGroup + + reserved + + + relatedTag + Inset + Offset + Offset - Labels the time at which something stops. + Marks the end of an event of temporal extent. topLevelTagGroup + + reserved + + + relatedTag + Onset + Inset + Pause @@ -3423,7 +3458,17 @@ For more information see https://hed-schema-library.readthedocs.io/en/latest/ind A characteristic of or relating to time or limited by time. Delay - Time during which some action is awaited. + The time at which an event start time is delayed from the current onset time. This tag defines the start time of an event of temporal extent and may be used with the Duration tag. + + topLevelTagGroup + + + reserved + + + relatedTag + Duration + # @@ -3441,7 +3486,17 @@ For more information see https://hed-schema-library.readthedocs.io/en/latest/ind Duration - The period of time during which something occurs or continues. + The period of time during which an event occurs. This tag defines the end time of an event of temporal extent and may be used with the Delay tag. + + topLevelTagGroup + + + reserved + + + relatedTag + Delay + # @@ -3940,6 +3995,9 @@ For more information see https://hed-schema-library.readthedocs.io/en/latest/ind requireChild + + reserved + # Name of the definition. @@ -3958,6 +4016,9 @@ For more information see https://hed-schema-library.readthedocs.io/en/latest/ind requireChild + + reserved + tagGroup @@ -3978,6 +4039,9 @@ For more information see https://hed-schema-library.readthedocs.io/en/latest/ind requireChild + + reserved + topLevelTagGroup @@ -3996,6 +4060,9 @@ For more information see https://hed-schema-library.readthedocs.io/en/latest/ind Event-context A special HED tag inserted as part of a top-level tag group to contain information about the interrelated conditions under which the event occurs. The event context includes information about other events that are ongoing when this event happens. + + reserved + topLevelTagGroup @@ -16317,6 +16384,16 @@ For more information see https://hed-schema-library.readthedocs.io/en/latest/ind 0.0254 + + meter + + SIUnit + + + conversionFactor + 1.0 + + metre @@ -17063,10 +17140,10 @@ For more information see https://hed-schema-library.readthedocs.io/en/latest/ind - deprecated - This tag is out of date and should no longer be used. + deprecatedFrom + Indicates that this element is deprecated. The value of the attribute is the latest schema version in which the element appeared in undeprecated form. - boolProperty + elementProperty @@ -17082,10 +17159,16 @@ For more information see https://hed-schema-library.readthedocs.io/en/latest/ind boolProperty + + nodeProperty + + + isInherited + inLibrary - Indicates this node came from the named library schema, not the standard schema. + Indicates this schema element came from the named library schema, not the standard schema. This attribute is added by tools when a library schema is merged into its partnered standard schema. elementProperty @@ -17096,10 +17179,19 @@ For more information see https://hed-schema-library.readthedocs.io/en/latest/ind boolProperty + + nodeProperty + relatedTag A schema attribute suggesting HED tags that are closely related to this tag. This attribute is used by tagging tools. + + nodeProperty + + + isInherited + requireChild @@ -17107,6 +17199,9 @@ For more information see https://hed-schema-library.readthedocs.io/en/latest/ind boolProperty + + nodeProperty + required @@ -17114,6 +17209,26 @@ For more information see https://hed-schema-library.readthedocs.io/en/latest/ind boolProperty + + nodeProperty + + + + reserved + A schema attribute indicating that this tag has special meaning and requires special handling by tools. + + boolProperty + + + nodeProperty + + + + rooted + Indicates a top-level library schema node is identical to a node of the same name in the partnered standard schema. This attribute can only appear in nodes that have the inLibrary schema attribute. + + nodeProperty + SIUnit @@ -17148,6 +17263,12 @@ For more information see https://hed-schema-library.readthedocs.io/en/latest/ind suggestedTag A schema attribute that indicates another tag that is often associated with this tag. This attribute is used by tagging tools to provide tagging suggestions. + + nodeProperty + + + isInherited + tagGroup @@ -17155,6 +17276,9 @@ For more information see https://hed-schema-library.readthedocs.io/en/latest/ind boolProperty + + nodeProperty + takesValue @@ -17162,6 +17286,9 @@ For more information see https://hed-schema-library.readthedocs.io/en/latest/ind boolProperty + + nodeProperty + topLevelTagGroup @@ -17169,6 +17296,9 @@ For more information see https://hed-schema-library.readthedocs.io/en/latest/ind boolProperty + + nodeProperty + unique @@ -17176,10 +17306,16 @@ For more information see https://hed-schema-library.readthedocs.io/en/latest/ind boolProperty + + nodeProperty + unitClass A schema attribute specifying which unit class this value tag belongs to. + + nodeProperty + unitPrefix @@ -17204,6 +17340,9 @@ For more information see https://hed-schema-library.readthedocs.io/en/latest/ind valueClass A schema attribute specifying which value class this value tag belongs to. + + nodeProperty + @@ -17215,6 +17354,14 @@ For more information see https://hed-schema-library.readthedocs.io/en/latest/ind elementProperty Indicates this schema attribute can apply to any type of element(tag term, unit class, etc). + + isInherited + Indicates that this attribute is inherited by child nodes. This property only applies to schema attributes for nodes. + + + nodeProperty + Indicates this schema attribute applies to node (tag-term) elements. This was added to allow for an attribute to apply to multiple elements. + unitClassProperty Indicates that the schema attribute is meant to be applied to unit classes. diff --git a/tests/data/schema_tests/merge_tests/add_all_types.mediawiki b/tests/data/schema_tests/merge_tests/add_all_types.mediawiki index be049b4d9..f6d90bd4c 100644 --- a/tests/data/schema_tests/merge_tests/add_all_types.mediawiki +++ b/tests/data/schema_tests/merge_tests/add_all_types.mediawiki @@ -1,4 +1,4 @@ -HED library="score" version="1.0.0" with-standard="8.2.0" +HED library="score" version="1.0.0" withStandard="8.2.0" unmerged="true" '''Prologue''' This schema is a Hierarchical Event Descriptors (HED) Library Schema implementation of Standardized Computer-based Organized Reporting of EEG (SCORE)[1,2] for describing events occurring during neuroimaging time series recordings. @@ -45,7 +45,7 @@ For more information see https://hed-schema-library.readthedocs.io/en/latest/ind * customElementAttribute {elementProperty, boolProperty} [A custom test element attribute] '''Properties''' -* customProperty {inLibrary=score, customElementAttribute} [A custom test property] +* customProperty {customElementAttribute} [A custom test property] '''Epilogue''' The Standardized Computer-based Organized Reporting of EEG (SCORE) is a standard terminology for scalp EEG data assessment designed for use in clinical practice that may also be used for research purposes. diff --git a/tests/data/schema_tests/merge_tests/basic_root.mediawiki b/tests/data/schema_tests/merge_tests/basic_root.mediawiki new file mode 100644 index 000000000..5b5f7a0e5 --- /dev/null +++ b/tests/data/schema_tests/merge_tests/basic_root.mediawiki @@ -0,0 +1,29 @@ +HED version="1.0.2" library="testlib" withStandard="8.2.0" unmerged="True" + +'''Prologue''' +This schema is the first official release that includes an xsd and requires unit class, unit modifier, value class, schema attribute and property sections. + +!# start schema + +'''Oboe-sound''' {rooted=Instrument-sound} + * Oboe-subsound + +'''Violin-sound''' {rooted=Instrument-sound} + * Violin-subsound + * Violin-subsound2 + + +!# end schema + +'''Unit classes''' + +'''Unit modifiers''' + +'''Value classes''' + +'''Schema attributes''' + +'''Properties''' +'''Epilogue''' + +!# end hed diff --git a/tests/data/schema_tests/merge_tests/basic_root.xml b/tests/data/schema_tests/merge_tests/basic_root.xml new file mode 100644 index 000000000..3f7f38dec --- /dev/null +++ b/tests/data/schema_tests/merge_tests/basic_root.xml @@ -0,0 +1,34 @@ + + + This schema is the first official release that includes an xsd and requires unit class, unit modifier, value class, schema attribute and property sections. + + + Oboe-sound + + rooted + Instrument-sound + + + Oboe-subsound + + + + Violin-sound + + rooted + Instrument-sound + + + Violin-subsound + + + Violin-subsound2 + + + + + + + + + diff --git a/tests/data/schema_tests/merge_tests/issues_tests/HED_badroot_0.0.1.mediawiki b/tests/data/schema_tests/merge_tests/issues_tests/HED_badroot_0.0.1.mediawiki new file mode 100644 index 000000000..a596775c1 --- /dev/null +++ b/tests/data/schema_tests/merge_tests/issues_tests/HED_badroot_0.0.1.mediawiki @@ -0,0 +1,16 @@ +HED library="testlib" version="1.0.2" withStandard="8.2.0" unmerged="true" + +'''Prologue''' +This schema is the first official release that includes an xsd and requires unit class, unit modifier, value class, schema attribute and property sections. + +!# start schema + +'''NotRealTag'''{rooted=AlsoNotRealTag} +* Oboe-sound + + +!# end schema + +'''Epilogue''' + +!# end hed \ No newline at end of file diff --git a/tests/data/schema_tests/merge_tests/issues_tests/HED_dupesubroot_0.0.1.mediawiki b/tests/data/schema_tests/merge_tests/issues_tests/HED_dupesubroot_0.0.1.mediawiki new file mode 100644 index 000000000..672792aa8 --- /dev/null +++ b/tests/data/schema_tests/merge_tests/issues_tests/HED_dupesubroot_0.0.1.mediawiki @@ -0,0 +1,22 @@ +HED library="testlib" version="1.0.2" withStandard="8.2.0" unmerged="true" + +'''Prologue''' +This schema is the first official release that includes an xsd and requires unit class, unit modifier, value class, schema attribute and property sections. + +!# start schema + +'''Oboe-sound''' {rooted=Instrument-sound} +* Oboe-subsound + +'''Violin-sound''' {rooted=Instrument-sound} +* Violin-subsound +* Violin-subsound2 + + +'''Oboe-sound''' {rooted=Instrument-sound} + +!# end schema + +'''Epilogue''' + +!# end hed \ No newline at end of file diff --git a/tests/data/schema_tests/merge_tests/issues_tests/HED_root_invalid1.mediawiki b/tests/data/schema_tests/merge_tests/issues_tests/HED_root_invalid1.mediawiki new file mode 100644 index 000000000..d5e6cf444 --- /dev/null +++ b/tests/data/schema_tests/merge_tests/issues_tests/HED_root_invalid1.mediawiki @@ -0,0 +1,18 @@ +HED library="testlib" version="1.0.2" + +'''Prologue''' +This schema is the first official release that includes an xsd and requires unit class, unit modifier, value class, schema attribute and property sections. + +!# start schema + +'''DummyTagToAvoidIssue''' + +'''Instrument-sound'''{rooted=DummyTagToAvoidIssue} +* Oboe-sound + + +!# end schema + +'''Epilogue''' + +!# end hed \ No newline at end of file diff --git a/tests/data/schema_tests/merge_tests/issues_tests/HED_root_invalid2.mediawiki b/tests/data/schema_tests/merge_tests/issues_tests/HED_root_invalid2.mediawiki new file mode 100644 index 000000000..979f72bde --- /dev/null +++ b/tests/data/schema_tests/merge_tests/issues_tests/HED_root_invalid2.mediawiki @@ -0,0 +1,18 @@ +HED library="testlib" version="1.0.2" withStandard="8.2.0" + +'''Prologue''' +This schema is the first official release that includes an xsd and requires unit class, unit modifier, value class, schema attribute and property sections. + +!# start schema + +'''DummyTagToAvoidIssue''' + +'''Instrument-sound'''{rooted=DummyTagToAvoidIssue} +* Oboe-sound + + +!# end schema + +'''Epilogue''' + +!# end hed \ No newline at end of file diff --git a/tests/data/schema_tests/merge_tests/issues_tests/HED_root_invalid3.mediawiki b/tests/data/schema_tests/merge_tests/issues_tests/HED_root_invalid3.mediawiki new file mode 100644 index 000000000..3438be07c --- /dev/null +++ b/tests/data/schema_tests/merge_tests/issues_tests/HED_root_invalid3.mediawiki @@ -0,0 +1,16 @@ +HED library="testlib" version="1.0.2" withStandard="8.2.0" unmerged="true" + +'''Prologue''' +This schema is the first official release that includes an xsd and requires unit class, unit modifier, value class, schema attribute and property sections. + +!# start schema + +'''Instrument-sound'''{rooted} +* Oboe-sound + + +!# end schema + +'''Epilogue''' + +!# end hed \ No newline at end of file diff --git a/tests/data/schema_tests/merge_tests/issues_tests/HED_root_wrong_place_0.0.1.mediawiki b/tests/data/schema_tests/merge_tests/issues_tests/HED_root_wrong_place_0.0.1.mediawiki new file mode 100644 index 000000000..267a214e6 --- /dev/null +++ b/tests/data/schema_tests/merge_tests/issues_tests/HED_root_wrong_place_0.0.1.mediawiki @@ -0,0 +1,16 @@ +HED library="testlib" version="1.0.2" withStandard="8.2.0" unmerged="true" + +'''Prologue''' +This schema is the first official release that includes an xsd and requires unit class, unit modifier, value class, schema attribute and property sections. + +!# start schema + +'''Instrument-sound''' +* Oboe-sound {rooted=Instrument-sound} + + +!# end schema + +'''Epilogue''' + +!# end hed \ No newline at end of file diff --git a/tests/data/schema_tests/merge_tests/issues_tests/overlapping_tags1.mediawiki b/tests/data/schema_tests/merge_tests/issues_tests/overlapping_tags1.mediawiki index 1bbee6685..ee20104a2 100644 --- a/tests/data/schema_tests/merge_tests/issues_tests/overlapping_tags1.mediawiki +++ b/tests/data/schema_tests/merge_tests/issues_tests/overlapping_tags1.mediawiki @@ -1,4 +1,4 @@ -HED library="score" version="1.0.0" with-standard="8.2.0" +HED library="score" version="1.0.0" withStandard="8.2.0" unmerged="true" '''Prologue''' This schema is a Hierarchical Event Descriptors (HED) Library Schema implementation of Standardized Computer-based Organized Reporting of EEG (SCORE)[1,2] for describing events occurring during neuroimaging time series recordings. diff --git a/tests/data/schema_tests/merge_tests/issues_tests/overlapping_tags2.mediawiki b/tests/data/schema_tests/merge_tests/issues_tests/overlapping_tags2.mediawiki index 74f7507af..8b3a3a864 100644 --- a/tests/data/schema_tests/merge_tests/issues_tests/overlapping_tags2.mediawiki +++ b/tests/data/schema_tests/merge_tests/issues_tests/overlapping_tags2.mediawiki @@ -1,4 +1,4 @@ -HED library="score" version="1.0.0" with-standard="8.2.0" +HED library="score" version="1.0.0" withStandard="8.2.0" unmerged="true" '''Prologue''' This schema is a Hierarchical Event Descriptors (HED) Library Schema implementation of Standardized Computer-based Organized Reporting of EEG (SCORE)[1,2] for describing events occurring during neuroimaging time series recordings. diff --git a/tests/data/schema_tests/merge_tests/issues_tests/overlapping_tags3.mediawiki b/tests/data/schema_tests/merge_tests/issues_tests/overlapping_tags3.mediawiki index e12c49acb..7939dfd95 100644 --- a/tests/data/schema_tests/merge_tests/issues_tests/overlapping_tags3.mediawiki +++ b/tests/data/schema_tests/merge_tests/issues_tests/overlapping_tags3.mediawiki @@ -1,4 +1,4 @@ -HED library="score" version="1.0.0" with-standard="8.2.0" +HED library="score" version="1.0.0" withStandard="8.2.0" unmerged="true" '''Prologue''' This schema is a Hierarchical Event Descriptors (HED) Library Schema implementation of Standardized Computer-based Organized Reporting of EEG (SCORE)[1,2] for describing events occurring during neuroimaging time series recordings. diff --git a/tests/data/schema_tests/merge_tests/issues_tests/overlapping_tags4.mediawiki b/tests/data/schema_tests/merge_tests/issues_tests/overlapping_tags4.mediawiki index b1670b263..4a084ebd2 100644 --- a/tests/data/schema_tests/merge_tests/issues_tests/overlapping_tags4.mediawiki +++ b/tests/data/schema_tests/merge_tests/issues_tests/overlapping_tags4.mediawiki @@ -1,4 +1,4 @@ -HED library="score" version="1.0.0" with-standard="8.2.0" +HED library="score" version="1.0.0" withStandard="8.2.0" unmerged="true" '''Prologue''' This schema is a Hierarchical Event Descriptors (HED) Library Schema implementation of Standardized Computer-based Organized Reporting of EEG (SCORE)[1,2] for describing events occurring during neuroimaging time series recordings. diff --git a/tests/data/schema_tests/merge_tests/issues_tests/overlapping_unit_classes.mediawiki b/tests/data/schema_tests/merge_tests/issues_tests/overlapping_unit_classes.mediawiki index 6e968b3bd..f282aabba 100644 --- a/tests/data/schema_tests/merge_tests/issues_tests/overlapping_unit_classes.mediawiki +++ b/tests/data/schema_tests/merge_tests/issues_tests/overlapping_unit_classes.mediawiki @@ -1,4 +1,4 @@ -HED library="score" version="1.0.0" with-standard="8.2.0" +HED library="score" version="1.0.0" withStandard="8.2.0" unmerged="true" '''Prologue''' This schema is a Hierarchical Event Descriptors (HED) Library Schema implementation of Standardized Computer-based Organized Reporting of EEG (SCORE)[1,2] for describing events occurring during neuroimaging time series recordings. diff --git a/tests/data/schema_tests/merge_tests/issues_tests/overlapping_units.mediawiki b/tests/data/schema_tests/merge_tests/issues_tests/overlapping_units.mediawiki index 6ff484c57..8f98fc80b 100644 --- a/tests/data/schema_tests/merge_tests/issues_tests/overlapping_units.mediawiki +++ b/tests/data/schema_tests/merge_tests/issues_tests/overlapping_units.mediawiki @@ -1,4 +1,4 @@ -HED library="score" version="1.0.0" with-standard="8.2.0" +HED library="score" version="1.0.0" withStandard="8.2.0" unmerged="true" '''Prologue''' This schema is a Hierarchical Event Descriptors (HED) Library Schema implementation of Standardized Computer-based Organized Reporting of EEG (SCORE)[1,2] for describing events occurring during neuroimaging time series recordings. diff --git a/tests/data/sidecar_tests/bad_refs_test2.json b/tests/data/sidecar_tests/bad_refs_test2.json new file mode 100644 index 000000000..4a847963f --- /dev/null +++ b/tests/data/sidecar_tests/bad_refs_test2.json @@ -0,0 +1,5 @@ +{ + "column3": { + "HED": "{column1}, {column2}, Time-interval/# s" + } +} \ No newline at end of file diff --git a/tests/data/sidecar_tests/basic_refs_test.json b/tests/data/sidecar_tests/basic_refs_test.json new file mode 100644 index 000000000..cd3011ac1 --- /dev/null +++ b/tests/data/sidecar_tests/basic_refs_test.json @@ -0,0 +1,28 @@ +{ + "trial_type": { + "LongName": "Event category", + "Description": "Indicator of type of action that is expected", + "Levels": { + "go": "A red square is displayed to indicate starting", + "stop": "A blue square is displayed to indicate stopping" + }, + "HED": { + "go": "Property/Sensory-property/Sensory-attribute/Visual-attribute/Color/CSS-color/White-color/Azure,Action/Perceive/See", + "stop": "Property/Sensory-property/Sensory-attribute/Visual-attribute/Color/CSS-color/White-color/Azure" + } + }, + "response_time": { + "LongName": "Response time after stimulus", + "Description": "Time from stimulus presentation until subject presses button", + "Units": "ms", + "HED": "({stim_file}, Event), Visual-attribute/Color/CSS-color/White-color/Azure,Action/Perceive/See, Time-value/# s, {trial_type}" + }, + "stim_file": { + "LongName": "Stimulus file name", + "Description": "Relative path of the stimulus image file", + "HED": "Time-value/# s" + }, + "other_file": { + "HED": "{stim_file}, Keyboard-key/#" + } +} \ No newline at end of file diff --git a/tests/data/sidecar_tests/both_types_events_with_defs.json b/tests/data/sidecar_tests/both_types_events_with_defs.json index 7047a1fdd..b41106a44 100644 --- a/tests/data/sidecar_tests/both_types_events_with_defs.json +++ b/tests/data/sidecar_tests/both_types_events_with_defs.json @@ -7,7 +7,7 @@ "stop": "A blue square is displayed to indicate stopping" }, "HED": { - "go": "Item/ItemTag1, (Definition/JsonFileDef/#, (Item/JsonDef1/#,Item/JsonDef1))", + "go": "Item/ItemTag1", "stop": "Item/ItemTag2" } }, @@ -20,7 +20,7 @@ "stim_file": { "LongName": "Stimulus file name", "Description": "Relative path of the stimulus image file", - "HED": "Age/#, (Definition/JsonFileDef2/#, (Item/JsonDef2/#,Item/JsonDef2)), (Definition/JsonFileDef3/#, (Item/JsonDef3/#))" + "HED": "Age/#, (Definition/JsonFileDef2/#, (Age/#,Item/JsonDef2)), (Definition/JsonFileDef3/#, (Age/#))" }, "takes_value_def": { "LongName": "Def with a takes value tag", @@ -31,5 +31,8 @@ "LongName": "Def with a value class", "Description": "Relative path of the stimulus image file", "HED": "Age/#, (Definition/ValueClassDef/#, (Acceleration/#))" - } + }, + "Defs": { + "HED": "(Definition/JsonFileDef/#, (Acceleration/#,Item/JsonDef1))" + } } \ No newline at end of file diff --git a/tests/data/sidecar_tests/both_types_events_without_definitions.json b/tests/data/sidecar_tests/both_types_events_without_definitions.json index fcf9dc90b..6129f7405 100644 --- a/tests/data/sidecar_tests/both_types_events_without_definitions.json +++ b/tests/data/sidecar_tests/both_types_events_without_definitions.json @@ -20,16 +20,16 @@ "stim_file": { "LongName": "Stimulus file name", "Description": "Relative path of the stimulus image file", - "HED": "Attribute/File/#, (Definition/JsonFileDef2/#, (Item/JsonDef2/#,Item/JsonDef2)), (Definition/JsonFileDef3/#, (Item/JsonDef3/#,InvalidTag))" + "HED": "Attribute/File/#" }, "takes_value_def": { "LongName": "Def with a takes value tag", "Description": "Relative path of the stimulus image file", - "HED": "Attribute/File/#, (Definition/TakesValueDef/#, (Age/#))" + "HED": "Attribute/File/#" }, "unit_class_def": { "LongName": "Def with a value class", "Description": "Relative path of the stimulus image file", - "HED": "Attribute/File/#, (Definition/ValueClassDef/#, (Acceleration/#))" + "HED": "Attribute/File/#" } } \ No newline at end of file diff --git a/tests/data/sidecar_tests/long_tag_test.json b/tests/data/sidecar_tests/long_tag_test.json new file mode 100644 index 000000000..9fe583a21 --- /dev/null +++ b/tests/data/sidecar_tests/long_tag_test.json @@ -0,0 +1,25 @@ +{ + "trial_type": { + "LongName": "Event category", + "Description": "Indicator of type of action that is expected", + "Levels": { + "go": "A red square is displayed to indicate starting", + "stop": "A blue square is displayed to indicate stopping" + }, + "HED": { + "go": "Property/Sensory-property/Sensory-attribute/Visual-attribute/Color/CSS-color/White-color/Azure,Action/Perceive/See,{response_time}", + "stop": "{response_time},Property/Sensory-property/Sensory-attribute/Visual-attribute/Color/CSS-color/White-color/Azure" + } + }, + "response_time": { + "LongName": "Response time after stimulus", + "Description": "Time from stimulus presentation until subject presses button", + "Units": "ms", + "HED": "Property/Sensory-property/Sensory-attribute/Visual-attribute/Color/CSS-color/White-color/Azure,Action/Perceive/See,Property/Data-property/Data-value/Spatiotemporal-value/Temporal-value/Time-value/#" + }, + "stim_file": { + "LongName": "Stimulus file name", + "Description": "Relative path of the stimulus image file", + "HED": "Property/Data-property/Data-value/Spatiotemporal-value/Temporal-value/Time-value/#" + } +} \ No newline at end of file diff --git a/tests/data/sidecar_tests/malformed_refs_test.json b/tests/data/sidecar_tests/malformed_refs_test.json new file mode 100644 index 000000000..ccf9aae3e --- /dev/null +++ b/tests/data/sidecar_tests/malformed_refs_test.json @@ -0,0 +1,20 @@ +{ + "column1": { + "HED": { + "go": "Property/Sensory-property/Sensory-attribute/Visual-attribute/Color/CSS-color/White-color/Azure,Action/Perceive/See", + "stop": "{Property/Sensory-property/Sensory-attribute/Visual-attribute/Color/CSS-color/White-color/Azure}" + } + }, + "column2": { + "HED": "{column1}}, Time-interval/# s" + }, + "column3": { + "HED": "{column1, Time-interval/# s" + }, + "column4": { + "HED": "{{column1}, Time-interval/# s" + }, + "column5": { + "HED": "column1}, Time-interval/# s" + } +} \ No newline at end of file diff --git a/tests/data/sidecar_tests/short_tag_test.json b/tests/data/sidecar_tests/short_tag_test.json new file mode 100644 index 000000000..ab02702bc --- /dev/null +++ b/tests/data/sidecar_tests/short_tag_test.json @@ -0,0 +1,25 @@ +{ + "trial_type": { + "LongName": "Event category", + "Description": "Indicator of type of action that is expected", + "Levels": { + "go": "A red square is displayed to indicate starting", + "stop": "A blue square is displayed to indicate stopping" + }, + "HED": { + "go": "Azure,See,{response_time}", + "stop": "{response_time},Azure" + } + }, + "response_time": { + "LongName": "Response time after stimulus", + "Description": "Time from stimulus presentation until subject presses button", + "Units": "ms", + "HED": "Azure,See,Time-value/#" + }, + "stim_file": { + "LongName": "Stimulus file name", + "Description": "Relative path of the stimulus image file", + "HED": "Time-value/#" + } +} \ No newline at end of file diff --git a/tests/data/spreadsheet_validator_tests/ExcelMultipleSheets.xlsx b/tests/data/spreadsheet_validator_tests/ExcelMultipleSheets.xlsx new file mode 100644 index 000000000..668af693b Binary files /dev/null and b/tests/data/spreadsheet_validator_tests/ExcelMultipleSheets.xlsx differ diff --git a/tests/data/validator_tests/bids_events.json b/tests/data/validator_tests/bids_events.json index 7d840ebee..893e8038b 100644 --- a/tests/data/validator_tests/bids_events.json +++ b/tests/data/validator_tests/bids_events.json @@ -41,9 +41,9 @@ "3": "Stage 3. BCI was trained on data from stages 1 and 2." }, "HED": { - "1": "Description/BCI acts randomly, (Definition/Random-selection, (Condition-variable, (Random, Predict))), Def/Random-selection", - "2": "Description/BCI was trained on data from stage 1., (Definition/Trained-on-random, (Condition-variable)), Def/Trained-on-random", - "3": "Description/BCI was trained on data from stages 1 and 2., (Definition/Trained-on-all, (Condition-variable)), Def/Trained-on-all" + "1": "Description/BCI acts randomly.", + "2": "Description/BCI was trained on data from stage 1.", + "3": "Description/BCI was trained on data from stages 1 and 2." } }, "trial": { @@ -78,5 +78,12 @@ }, "n_repeated": { "Description": "Number of trials that had to be repeated until the present trial because of invalid participant behavior (within this stage)." + }, + "defs": { + "HED": { + "1": "Description/BCI acts randomly, (Definition/Random-selection, (Condition-variable, (Random, Predict))), Def/Random-selection", + "2": "Description/BCI was trained on data from stage 1., (Definition/Trained-on-random, (Condition-variable)), Def/Trained-on-random", + "3": "Description/BCI was trained on data from stages 1 and 2., (Definition/Trained-on-all, (Condition-variable)), Def/Trained-on-all" + } } } \ No newline at end of file diff --git a/tests/errors/test_error_reporter.py b/tests/errors/test_error_reporter.py index 40765f51b..6cff88a25 100644 --- a/tests/errors/test_error_reporter.py +++ b/tests/errors/test_error_reporter.py @@ -10,21 +10,21 @@ def setUpClass(cls): pass def test_push_error_context(self): - error_list = self.error_handler.format_error_with_context(ValidationErrors.HED_TAG_NOT_UNIQUE, "") + error_list = self.error_handler.format_error_with_context(ValidationErrors.TAG_NOT_UNIQUE, "") self.assertTrue(len(error_list) == 1) name = "DummyFileName.txt" self.error_handler.push_error_context(ErrorContext.FILE_NAME, name) - error_list = self.error_handler.format_error_with_context(ValidationErrors.HED_TAG_NOT_UNIQUE, "") + error_list = self.error_handler.format_error_with_context(ValidationErrors.TAG_NOT_UNIQUE, "") self.assertTrue(name in error_list[0][ErrorContext.FILE_NAME]) column_name = "DummyColumnName" self.error_handler.push_error_context(ErrorContext.SIDECAR_COLUMN_NAME, column_name) - error_list = self.error_handler.format_error_with_context(ValidationErrors.HED_TAG_NOT_UNIQUE, "") + error_list = self.error_handler.format_error_with_context(ValidationErrors.TAG_NOT_UNIQUE, "") self.assertTrue(column_name in error_list[0][ErrorContext.SIDECAR_COLUMN_NAME]) self.error_handler.reset_error_context() self.error_handler.push_error_context(ErrorContext.FILE_NAME, name) self.error_handler.push_error_context(ErrorContext.SIDECAR_COLUMN_NAME, column_name) self.error_handler.push_error_context(ErrorContext.COLUMN, column_name) - error_list = self.error_handler.format_error_with_context(ValidationErrors.HED_TAG_NOT_UNIQUE, "") + error_list = self.error_handler.format_error_with_context(ValidationErrors.TAG_NOT_UNIQUE, "") self.assertTrue(name in error_list[0][ErrorContext.FILE_NAME]) self.assertTrue(column_name in error_list[0][ErrorContext.SIDECAR_COLUMN_NAME]) self.assertTrue(column_name == error_list[0][ErrorContext.COLUMN]) @@ -32,24 +32,24 @@ def test_push_error_context(self): self.error_handler.reset_error_context() def test_pop_error_context(self): - error_list = self.error_handler.format_error_with_context(ValidationErrors.HED_TAG_NOT_UNIQUE, "") + error_list = self.error_handler.format_error_with_context(ValidationErrors.TAG_NOT_UNIQUE, "") self.assertTrue(len(error_list) == 1) name = "DummyFileName.txt" self.error_handler.push_error_context(ErrorContext.FILE_NAME, name) - error_list = self.error_handler.format_error_with_context(ValidationErrors.HED_TAG_NOT_UNIQUE, "") + error_list = self.error_handler.format_error_with_context(ValidationErrors.TAG_NOT_UNIQUE, "") self.assertTrue(len(error_list) == 1) self.assertTrue(name in error_list[0][ErrorContext.FILE_NAME]) self.error_handler.pop_error_context() - error_list = self.error_handler.format_error_with_context(ValidationErrors.HED_TAG_NOT_UNIQUE, "") + error_list = self.error_handler.format_error_with_context(ValidationErrors.TAG_NOT_UNIQUE, "") self.assertTrue(len(error_list) == 1) column_name = "DummyColumnName" self.error_handler.push_error_context(ErrorContext.SIDECAR_COLUMN_NAME, column_name) - error_list = self.error_handler.format_error_with_context(ValidationErrors.HED_TAG_NOT_UNIQUE, "") + error_list = self.error_handler.format_error_with_context(ValidationErrors.TAG_NOT_UNIQUE, "") self.assertTrue(len(error_list) == 1) self.error_handler.push_error_context(ErrorContext.FILE_NAME, name) self.error_handler.push_error_context(ErrorContext.SIDECAR_COLUMN_NAME, column_name) self.error_handler.push_error_context(ErrorContext.COLUMN, column_name) - error_list = self.error_handler.format_error_with_context(ValidationErrors.HED_TAG_NOT_UNIQUE, "") + error_list = self.error_handler.format_error_with_context(ValidationErrors.TAG_NOT_UNIQUE, "") self.assertTrue(len(error_list) == 1) self.assertTrue(name in error_list[0][ErrorContext.FILE_NAME]) self.assertTrue(column_name in error_list[0][ErrorContext.SIDECAR_COLUMN_NAME]) @@ -57,16 +57,16 @@ def test_pop_error_context(self): self.error_handler.pop_error_context() self.error_handler.pop_error_context() self.error_handler.pop_error_context() - error_list = self.error_handler.format_error_with_context(ValidationErrors.HED_TAG_NOT_UNIQUE, "") + error_list = self.error_handler.format_error_with_context(ValidationErrors.TAG_NOT_UNIQUE, "") self.assertTrue(len(error_list) == 1) self.assertTrue(ErrorContext.COLUMN not in error_list[0]) self.error_handler.pop_error_context() - error_list = self.error_handler.format_error_with_context(ValidationErrors.HED_TAG_NOT_UNIQUE, "") + error_list = self.error_handler.format_error_with_context(ValidationErrors.TAG_NOT_UNIQUE, "") self.assertTrue(len(error_list) == 1) self.error_handler.reset_error_context() def test_filter_issues_by_severity(self): - error_list = self.error_handler.format_error_with_context(ValidationErrors.HED_TAG_NOT_UNIQUE, "") + error_list = self.error_handler.format_error_with_context(ValidationErrors.TAG_NOT_UNIQUE, "") error_list += self.error_handler.format_error_with_context(SchemaWarnings.INVALID_CAPITALIZATION, "dummy", problem_char="#", char_index=0) self.assertTrue(len(error_list) == 2) @@ -76,7 +76,7 @@ def test_filter_issues_by_severity(self): def test_printable_issue_string(self): self.error_handler.push_error_context(ErrorContext.CUSTOM_TITLE, "Default Custom Title") - error_list = self.error_handler.format_error_with_context(ValidationErrors.HED_TAG_NOT_UNIQUE, "") + error_list = self.error_handler.format_error_with_context(ValidationErrors.TAG_NOT_UNIQUE, "") error_list += self.error_handler.format_error_with_context(SchemaWarnings.INVALID_CAPITALIZATION, "dummy", problem_char="#", char_index=0) @@ -96,7 +96,7 @@ def test_printable_issue_string_with_filenames(self): myfile = 'my_file.txt' self.error_handler.push_error_context(ErrorContext.CUSTOM_TITLE, "Default Custom Title") self.error_handler.push_error_context(ErrorContext.FILE_NAME, myfile) - error_list = self.error_handler.format_error_with_context(ValidationErrors.HED_TAG_NOT_UNIQUE, "") + error_list = self.error_handler.format_error_with_context(ValidationErrors.TAG_NOT_UNIQUE, "") error_list += self.error_handler.format_error_with_context(SchemaWarnings.INVALID_CAPITALIZATION, "dummy", problem_char="#", char_index=0) diff --git a/tests/models/test_base_input.py b/tests/models/test_base_input.py index 32615fb76..bda6e1259 100644 --- a/tests/models/test_base_input.py +++ b/tests/models/test_base_input.py @@ -48,97 +48,58 @@ def tearDownClass(cls): shutil.rmtree(cls.base_output_folder) def test_gathered_defs(self): + # todo: probably remove this test? # todo: add unit tests for definitions in tsv file defs = DefinitionDict.get_as_strings(self.tabular_file._sidecar.extract_definitions(hed_schema=self.hed_schema)) expected_defs = { - 'jsonfiledef': '(Item/JsonDef1,Item/JsonDef1/#)', - 'jsonfiledef2': '(Item/JsonDef2,Item/JsonDef2/#)', - 'jsonfiledef3': '(Item/JsonDef3/#)', + 'jsonfiledef': '(Acceleration/#,Item/JsonDef1)', + 'jsonfiledef2': '(Age/#,Item/JsonDef2)', + 'jsonfiledef3': '(Age/#)', 'takesvaluedef': '(Age/#)', 'valueclassdef': '(Acceleration/#)' } self.assertEqual(defs, expected_defs) - # def test_missing_column_name_issue(self): - # schema_path = os.path.join(os.path.dirname(os.path.abspath(__file__)), - # '../data/validator_tests/bids_schema.mediawiki') - # events_path = os.path.join(os.path.dirname(os.path.abspath(__file__)), - # '../data/validator_tests/bids_events_bad_column_name.tsv') - # - # hed_schema = schema.load_schema(schema_path) - # json_path = os.path.join(os.path.dirname(os.path.abspath(__file__)), - # "../data/validator_tests/bids_events.json") - # validator = HedValidator(hed_schema=hed_schema) - # sidecar = Sidecar(json_path) - # issues = sidecar.validate_entries(validator) - # self.assertEqual(len(issues), 0) - # input_file = TabularInput(events_path, sidecars=sidecar) - # - # validation_issues = input_file.validate_sidecar(validator) - # self.assertEqual(len(validation_issues), 0) - # validation_issues = input_file.validate_file(validator, check_for_warnings=True) - # self.assertEqual(len(validation_issues), 1) - # - # def test_expand_column_issues(self): - # schema_path = os.path.join(os.path.dirname(os.path.abspath(__file__)), - # '../data/validator_tests/bids_schema.mediawiki') - # events_path = os.path.join(os.path.dirname(os.path.abspath(__file__)), - # '../data/validator_tests/bids_events_bad_category_key.tsv') - # - # hed_schema = schema.load_schema(schema_path) - # json_path = os.path.join(os.path.dirname(os.path.abspath(__file__)), - # "../data/validator_tests/bids_events.json") - # validator = HedValidator(hed_schema=hed_schema) - # sidecar = Sidecar(json_path) - # issues = sidecar.validate_entries(validator) - # self.assertEqual(len(issues), 0) - # input_file = TabularInput(events_path, sidecars=sidecar) - # - # validation_issues = input_file.validate_sidecar(validator) - # self.assertEqual(len(validation_issues), 0) - # validation_issues = input_file.validate_file(validator, check_for_warnings=True) - # self.assertEqual(len(validation_issues), 1) - class TestInsertColumns(unittest.TestCase): def test_insert_columns_simple(self): df = pd.DataFrame({ - "column1": ["[column2], Event, Action"], + "column1": ["{column2}, Event, Action"], "column2": ["Item"] }) expected_df = pd.DataFrame({ "column1": ["Item, Event, Action"] }) - result = BaseInput._handle_square_brackets(df) + result = BaseInput._handle_curly_braces_refs(df, refs=["column2"], column_names=df.columns) pd.testing.assert_frame_equal(result, expected_df) def test_insert_columns_multiple_rows(self): df = pd.DataFrame({ - "column1": ["[column2], Event, Action", "Event, Action"], + "column1": ["{column2}, Event, Action", "Event, Action"], "column2": ["Item", "Subject"] }) expected_df = pd.DataFrame({ "column1": ["Item, Event, Action", "Event, Action"] }) - result = BaseInput._handle_square_brackets(df) + result = BaseInput._handle_curly_braces_refs(df, refs=["column2"], column_names=df.columns) pd.testing.assert_frame_equal(result, expected_df) def test_insert_columns_multiple_columns(self): df = pd.DataFrame({ - "column1": ["[column2], Event, [column3], Action"], + "column1": ["{column2}, Event, {column3}, Action"], "column2": ["Item"], "column3": ["Subject"] }) expected_df = pd.DataFrame({ "column1": ["Item, Event, Subject, Action"] }) - result = BaseInput._handle_square_brackets(df) + result = BaseInput._handle_curly_braces_refs(df, refs=["column2", "column3"], column_names=df.columns) pd.testing.assert_frame_equal(result, expected_df) def test_insert_columns_four_columns(self): df = pd.DataFrame({ - "column1": ["[column2], Event, [column3], Action"], + "column1": ["{column2}, Event, {column3}, Action"], "column2": ["Item"], "column3": ["Subject"], "column4": ["Data"] @@ -147,7 +108,96 @@ def test_insert_columns_four_columns(self): "column1": ["Item, Event, Subject, Action"], "column4": ["Data"] }) - result = BaseInput._handle_square_brackets(df) + result = BaseInput._handle_curly_braces_refs(df, refs=["column2", "column3"], column_names=df.columns) + pd.testing.assert_frame_equal(result, expected_df) + + def test_insert_columns_with_nested_parentheses(self): + df = pd.DataFrame({ + "column1": ["({column2}, ({column3}, {column4})), Event, Action"], + "column2": ["Item"], + "column3": ["Subject"], + "column4": ["Data"] + }) + expected_df = pd.DataFrame({ + "column1": ["(Item, (Subject, Data)), Event, Action"] + }) + result = BaseInput._handle_curly_braces_refs(df, refs=["column2", "column3", "column4"], column_names=df.columns) + pd.testing.assert_frame_equal(result, expected_df) + + def test_insert_columns_with_nested_parentheses_na_values(self): + df = pd.DataFrame({ + "column1": ["({column2}, ({column3}, {column4})), Event, Action"], + "column2": ["Data"], + "column3": ["n/a"], + "column4": ["n/a"] + }) + expected_df = pd.DataFrame({ + "column1": ["(Data), Event, Action"] + }) + result = BaseInput._handle_curly_braces_refs(df, refs=["column2", "column3", "column4"], column_names=df.columns) + pd.testing.assert_frame_equal(result, expected_df) + + def test_insert_columns_with_nested_parentheses_na_values2(self): + df = pd.DataFrame({ + "column1": ["({column2}, ({column3}, {column4})), Event, Action"], + "column2": ["n/a"], + "column3": ["n/a"], + "column4": ["Data"] + }) + expected_df = pd.DataFrame({ + "column1": ["((Data)), Event, Action"] + }) + result = BaseInput._handle_curly_braces_refs(df, refs=["column2", "column3", "column4"], column_names=df.columns) + pd.testing.assert_frame_equal(result, expected_df) + + def test_insert_columns_with_nested_parentheses_mixed_na_values(self): + df = pd.DataFrame({ + "column1": ["({column2}, ({column3}, {column4})), Event, Action"], + "column2": ["n/a"], + "column3": ["Subject"], + "column4": ["n/a"] + }) + expected_df = pd.DataFrame({ + "column1": ["((Subject)), Event, Action"] + }) + result = BaseInput._handle_curly_braces_refs(df, refs=["column2", "column3", "column4"], column_names=df.columns) + pd.testing.assert_frame_equal(result, expected_df) + + def test_insert_columns_with_nested_parentheses_all_na_values(self): + df = pd.DataFrame({ + "column1": ["({column2}, ({column3}, {column4})), Event, Action"], + "column2": ["n/a"], + "column3": ["n/a"], + "column4": ["n/a"] + }) + expected_df = pd.DataFrame({ + "column1": ["Event, Action"] + }) + result = BaseInput._handle_curly_braces_refs(df, refs=["column2", "column3", "column4"], column_names=df.columns) + pd.testing.assert_frame_equal(result, expected_df) + + def test_insert_columns_with_parentheses(self): + df = pd.DataFrame({ + "column1": ["({column2}), Event, Action"], + "column2": ["Item"] + }) + expected_df = pd.DataFrame({ + "column1": ["(Item), Event, Action"] + }) + result = BaseInput._handle_curly_braces_refs(df, refs=["column2"], column_names=df.columns) + pd.testing.assert_frame_equal(result, expected_df) + + def test_insert_columns_with_parentheses_na_values(self): + df = pd.DataFrame({ + "column1": ["({column2}), Event, Action"], + "column2": ["n/a"], + "column3": ["n/a"] + }) + expected_df = pd.DataFrame({ + "column1": ["Event, Action"], + "column3": ["n/a"] + }) + result = BaseInput._handle_curly_braces_refs(df, refs=["column2"], column_names=df.columns) pd.testing.assert_frame_equal(result, expected_df) @@ -208,43 +258,3 @@ def test_combine_dataframe_with_mixed_values(self): expected = pd.Series(['apple, guitar', 'elephant, harmonica', 'cherry, fox', '', '']) self.assertTrue(result.equals(expected)) - -class TestColumnRefs(unittest.TestCase): - def test_simple_column_refs(self): - data1 = { - 'A': ['[col1], [col2]', 'tag1, tag2'], - 'B': ['tag3, tag4', '[col3]'], - } - df1 = pd.DataFrame(data1) - result1 = BaseInput._find_column_refs(df1, df1.columns) - expected1 = ['col1', 'col2', 'col3'] - self.assertEqual(result1, expected1) - - def test_mixed_cases_and_patterns(self): - data2 = { - 'A': ['[Col1], [col2]', 'tag1, [Col3]', 'tag3, [COL4]', '[col5], [col6]'], - } - df2 = pd.DataFrame(data2) - result2 = BaseInput._find_column_refs(df2, df2.columns) - expected2 = ['Col1', 'col2', 'Col3', 'COL4', 'col5', 'col6'] - self.assertEqual(result2, expected2) - - def test_no_column_references(self): - data3 = { - 'A': ['tag1, tag2', 'tag3, tag4'], - 'B': ['tag5, tag6', 'tag7, tag8'], - } - df3 = pd.DataFrame(data3) - result3 = BaseInput._find_column_refs(df3, df3.columns) - expected3 = [] - self.assertEqual(result3, expected3) - - def test_incomplete_square_brackets(self): - data4 = { - 'A': ['[col1, [col2]', 'tag1, [Col3'], - 'B': ['tag3, [COL4', '[col5, col6]'], - } - df4 = pd.DataFrame(data4) - result4 = BaseInput._find_column_refs(df4, df4.columns) - expected4 = ['col2'] - self.assertEqual(result4, expected4) \ No newline at end of file diff --git a/tests/models/test_column_mapper.py b/tests/models/test_column_mapper.py index 78a6b99a9..7f399f0dd 100644 --- a/tests/models/test_column_mapper.py +++ b/tests/models/test_column_mapper.py @@ -3,6 +3,7 @@ from hed.models import ColumnMapper, ColumnType, HedString from hed.models.sidecar import Sidecar +from hed.errors import ValidationErrors class Test(unittest.TestCase): @@ -11,7 +12,6 @@ class Test(unittest.TestCase): @classmethod def setUpClass(cls): cls.integer_key_dictionary = {0: 'one', 1: 'two', 2: 'three'} - cls.zero_based_tag_columns = [0, 1, 2] cls.zero_based_row_column_count = 3 cls.column_prefix_dictionary = {2: 'Event/Description/', 3: 'Event/Label/', 4: 'Event/Category/'} cls.category_key = 'Event/Category/' @@ -45,20 +45,133 @@ def setUpClass(cls): def test_set_tag_columns(self): mapper = ColumnMapper() - mapper.set_tag_columns(self.zero_based_tag_columns, finalize_mapping=True) - self.assertTrue(len(mapper._final_column_map) >= 2) + zero_based_tag_columns = [0, 1, 2] + mapper.set_tag_columns(zero_based_tag_columns, finalize_mapping=True) + self.assertTrue(len(mapper._final_column_map) == 3) + self.assertTrue(len(mapper.check_for_mapping_issues()) == 0) + + def test_set_tag_columns_named(self): + mapper = ColumnMapper(warn_on_missing_column=True) + named_columns = ["Col1", "Col2", "Col3"] + mapper.set_tag_columns(named_columns) + mapper.set_column_map(named_columns) + self.assertTrue(len(mapper._final_column_map) == 3) + self.assertTrue(len(mapper.check_for_mapping_issues()) == 0) + + def test_set_tag_columns_named_unknown(self): + mapper = ColumnMapper(warn_on_missing_column=True) + two_columns = ["Col1", "Col2"] + named_columns = ["Col1", "Col2", "Col3"] + mapper.set_tag_columns(two_columns) + mapper.set_column_map(named_columns) + self.assertTrue(len(mapper._final_column_map) == 2) + self.assertTrue(len(mapper.check_for_mapping_issues()) == 1) + self.assertTrue(mapper.check_for_mapping_issues()[0]['code'] == ValidationErrors.HED_UNKNOWN_COLUMN) + + def test_set_tag_columns_mixed(self): + mapper = ColumnMapper() + mixed_columns = ["Col1", "Col2", 2] + column_map = ["Col1", "Col2", "Col3"] + mapper.set_tag_columns(mixed_columns) + mapper.set_column_map(column_map) + self.assertTrue(len(mapper._final_column_map) == 3) + self.assertTrue(len(mapper.check_for_mapping_issues()) == 0) + + def test_set_tag_column_missing(self): + mapper = ColumnMapper() + column_map = ["Col1", "Col2", "Col3"] + mapper.set_tag_columns(["Col1", "Col4"]) + mapper.set_column_map(column_map) + self.assertTrue(len(mapper._final_column_map) == 1) + self.assertTrue(len(mapper.check_for_mapping_issues()) == 1) + self.assertTrue(mapper.check_for_mapping_issues()[0]['code'] == ValidationErrors.HED_MISSING_REQUIRED_COLUMN) - def test_optional_column(self): + column_map = ["Col1", "Col2", "Col3"] + mapper.set_tag_columns(optional_tag_columns=["Col1", "Col4"]) + mapper.set_column_map(column_map) + self.assertTrue(len(mapper._final_column_map) == 1) + self.assertTrue(len(mapper.check_for_mapping_issues()) == 0) + + + def test_sidecar_and_columns(self): + mapper = ColumnMapper(Sidecar(self.basic_events_json)) + mapper.set_tag_columns(["Invalid", "Invalid2"]) + mapper.set_column_map(["Invalid", "Invalid2"]) + self.assertTrue(len(mapper._final_column_map) == 2) + self.assertTrue(len(mapper.check_for_mapping_issues()) == 1) + self.assertTrue(mapper.check_for_mapping_issues()[0]['code'] == ValidationErrors.SIDECAR_AND_OTHER_COLUMNS) + + def test_duplicate_list(self): mapper = ColumnMapper() - mapper.set_tag_columns(tag_columns=["HED"]) - mapper.set_column_map({1: "HED"}) + mapper.set_tag_columns(["Invalid", "Invalid"]) + self.assertTrue(len(mapper._final_column_map) == 0) + self.assertTrue(len(mapper.check_for_mapping_issues()) == 3) + self.assertTrue(mapper.check_for_mapping_issues()[-1]['code'] == ValidationErrors.DUPLICATE_COLUMN_IN_LIST) + + mapper.set_tag_columns([0, 0]) + self.assertTrue(len(mapper._final_column_map) == 1) + self.assertTrue(len(mapper.check_for_mapping_issues()) == 1) + self.assertTrue(mapper.check_for_mapping_issues()[-1]['code'] == ValidationErrors.DUPLICATE_COLUMN_IN_LIST) + + mapper.set_tag_columns([0, "Column1"]) + mapper.set_column_map(["Column1"]) + self.assertTrue(len(mapper._final_column_map) == 1) + self.assertTrue(len(mapper.check_for_mapping_issues()) == 1) + self.assertTrue(mapper.check_for_mapping_issues()[-1]['code'] == ValidationErrors.DUPLICATE_COLUMN_IN_LIST) + + def test_duplicate_prefix(self): + mapper = ColumnMapper() + prefix_dict = { + 0: "Label/", + "Column1": "Description" + } + mapper.set_column_prefix_dictionary(prefix_dict) + mapper.set_column_map(["Column1"]) self.assertTrue(len(mapper._final_column_map) == 1) + self.assertTrue(len(mapper.check_for_mapping_issues()) == 1) + self.assertTrue(mapper.check_for_mapping_issues()[-1]['code'] == ValidationErrors.DUPLICATE_COLUMN_IN_LIST) + def test_duplicate_cross_lists(self): mapper = ColumnMapper() - mapper.set_requested_columns(requested_columns=["HED"]) + prefix_dict = { + 0: "Label/" + } + mapper.set_tag_columns([0]) + mapper.set_column_prefix_dictionary(prefix_dict) + mapper.set_column_map(["Column1"]) + self.assertTrue(len(mapper._final_column_map) == 1) + self.assertTrue(len(mapper.check_for_mapping_issues()) == 1) + self.assertTrue(mapper.check_for_mapping_issues()[-1]['code'] == ValidationErrors.DUPLICATE_COLUMN_BETWEEN_SOURCES) + + mapper = ColumnMapper() + prefix_dict = { + "Column1": "Label/" + } + mapper.set_tag_columns([0]) + mapper.set_column_prefix_dictionary(prefix_dict) + mapper.set_column_map(["Column1"]) + self.assertTrue(len(mapper._final_column_map) == 1) + self.assertTrue(len(mapper.check_for_mapping_issues()) == 1) + self.assertTrue(mapper.check_for_mapping_issues()[-1]['code'] == ValidationErrors.DUPLICATE_COLUMN_BETWEEN_SOURCES) + + + mapper.set_tag_columns(["Column1"]) + self.assertTrue(len(mapper._final_column_map) == 1) + self.assertTrue(len(mapper.check_for_mapping_issues()) == 1) + self.assertTrue(mapper.check_for_mapping_issues()[-1]['code'] == ValidationErrors.DUPLICATE_COLUMN_BETWEEN_SOURCES) + + def test_blank_column(self): + mapper = ColumnMapper() + mapper.set_column_map(["", None]) + self.assertTrue(len(mapper.check_for_mapping_issues()) == 2) + self.assertTrue(mapper.check_for_mapping_issues(allow_blank_names=False)[1]['code'] == ValidationErrors.HED_BLANK_COLUMN) + self.assertTrue(mapper.check_for_mapping_issues(allow_blank_names=False)[1]['code'] == ValidationErrors.HED_BLANK_COLUMN) + + def test_optional_column(self): + mapper = ColumnMapper() + mapper.set_tag_columns(tag_columns=["HED"]) mapper.set_column_map({1: "HED"}) self.assertTrue(len(mapper._final_column_map) == 1) - self.assertTrue(len(mapper._finalize_mapping_issues) == 0) mapper = ColumnMapper() mapper.set_tag_columns(optional_tag_columns=["HED"]) @@ -68,49 +181,33 @@ def test_optional_column(self): mapper = ColumnMapper() mapper.set_tag_columns(tag_columns=["HED"]) self.assertTrue(len(mapper._final_column_map) == 0) - self.assertTrue(len(mapper._finalize_mapping_issues) == 1) - - mapper = ColumnMapper() - mapper.set_requested_columns(requested_columns=["HED"]) - self.assertTrue(len(mapper._final_column_map) == 0) - self.assertTrue(len(mapper._finalize_mapping_issues) == 1) + self.assertTrue(len(mapper.get_column_mapping_issues()) == 1) mapper = ColumnMapper() mapper.set_tag_columns(optional_tag_columns=["HED"]) self.assertTrue(len(mapper._final_column_map) == 0) - self.assertTrue(len(mapper._finalize_mapping_issues) == 0) + self.assertTrue(len(mapper.get_column_mapping_issues()) == 0) def test_add_json_file_events(self): mapper = ColumnMapper() mapper._set_sidecar(Sidecar(self.basic_events_json)) - self.assertTrue(len(mapper.column_data) >= 2) + self.assertTrue(len(mapper.sidecar_column_data) >= 2) def test__detect_event_type(self): mapper = ColumnMapper() mapper._set_sidecar(Sidecar(self.basic_events_json)) - self.assertTrue(mapper.column_data[self.basic_event_name].column_type == self.basic_event_type) - - def test_add_hed_tags_columns(self): - mapper = ColumnMapper() - mapper.add_columns([self.add_column_name], ColumnType.HEDTags) - self.assertTrue(len(mapper.column_data) >= 1) - - def test__add_single_event_type(self): - mapper = ColumnMapper() - mapper.add_columns([self.add_column_name], ColumnType.Value) - self.assertTrue(len(mapper.column_data) >= 1) - - def test_set_column_map(self): - mapper = ColumnMapper() - mapper.add_columns([self.add_column_name], ColumnType.Value) - mapper.set_column_map(self.test_column_map) - self.assertTrue(len(mapper._final_column_map) >= 1) - - def test__finalize_mapping(self): - mapper = ColumnMapper() - mapper.add_columns([self.add_column_number], ColumnType.Value) - mapper._finalize_mapping() - self.assertTrue(len(mapper._final_column_map) >= 1) + self.assertTrue(mapper.sidecar_column_data[self.basic_event_name].column_type == self.basic_event_type) + + def test_tag_mapping_complex(self): + tag_columns = [0] + column_prefix_dictionary = {1: "Label/"} + optional_tag_columns = [2] + mapper = ColumnMapper(tag_columns=tag_columns, column_prefix_dictionary=column_prefix_dictionary, optional_tag_columns=optional_tag_columns) + self.assertEqual(list(mapper._final_column_map), [0, 1, 2]) + self.assertEqual(mapper._final_column_map[0].column_type, ColumnType.HEDTags) + self.assertEqual(mapper._final_column_map[1].column_type, ColumnType.Value) + self.assertEqual(mapper._final_column_map[1].hed_dict, "Label/#") + self.assertEqual(mapper._final_column_map[2].column_type, ColumnType.HEDTags) diff --git a/tests/models/test_definition_dict.py b/tests/models/test_definition_dict.py index ee03122aa..eb5490529 100644 --- a/tests/models/test_definition_dict.py +++ b/tests/models/test_definition_dict.py @@ -4,9 +4,10 @@ from hed.models.hed_string import HedString from hed import HedTag from hed import load_schema_version +from tests.validator.test_tag_validator_base import TestHedBase -class TestDefBase(unittest.TestCase): +class TestDefBase(TestHedBase): @classmethod def setUpClass(cls): cls.hed_schema = load_schema_version("8.0.0") @@ -16,7 +17,10 @@ def check_def_base(self, test_strings, expected_issues): def_dict = DefinitionDict() hed_string_obj = HedString(test_strings[test_key], self.hed_schema) test_issues = def_dict.check_for_definitions(hed_string_obj) - expected_issue = expected_issues[test_key] + expected_params = expected_issues[test_key] + expected_issue = self.format_errors_fully(ErrorHandler(), hed_string=hed_string_obj, + params=expected_params) + # print(test_key) # print(test_issues) # print(expected_issue) self.assertCountEqual(test_issues, expected_issue, HedString(test_strings[test_key])) @@ -31,7 +35,7 @@ class TestDefinitionDict(TestDefBase): basic_hed_string = "Item/BasicTestTag1,Item/BasicTestTag2" basic_hed_string_with_def = f"Item/BasicTestTag1,Item/BasicTestTag2,{label_def_string}" - placeholder_def_contents = "(Item/TestDef1/#,Item/TestDef2)" + placeholder_def_contents = "(Age/#,Event)" placeholder_def_string = f"(Definition/TestDefPlaceholder/#,{placeholder_def_contents})" def test_check_for_definitions(self): @@ -50,55 +54,61 @@ def test_check_for_definitions_placeholder(self): new_def_count = len(def_dict.defs) self.assertGreater(new_def_count, original_def_count) - placeholder_invalid_def_contents = "(Item/TestDef1/#,Item/TestDef2/#)" + placeholder_invalid_def_contents = "(Age/#,Item/TestDef2/#)" placeholder_invalid_def_string = f"(Definition/TestDefPlaceholder/#,{placeholder_invalid_def_contents})" def test_definitions(self): test_strings = { - 'noGroupTag': "(Definition/ValidDef1)", + 'noGroupTag': "(Definition/InvalidDef0)", 'placeholderNoGroupTag': "(Definition/InvalidDef1/#)", 'placeholderWrongSpot': "(Definition/InvalidDef1#)", 'twoDefTags': f"(Definition/ValidDef1,Definition/InvalidDef2,{self.def_contents_string})", 'twoGroupTags': f"(Definition/InvalidDef1,{self.def_contents_string},{self.def_contents_string2})", 'extraOtherTags': "(Definition/InvalidDef1, InvalidContents)", - 'duplicateDef': f"(Definition/Def1), (Definition/Def1, {self.def_contents_string})", - 'duplicateDef2': f"(Definition/Def1), (Definition/Def1/#, {self.placeholder_def_contents})", - 'defAlreadyTagInSchema': "(Definition/Item)", + 'duplicateDef': f"(Definition/Def1, {self.def_contents_string}), (Definition/Def1, {self.def_contents_string})", + 'duplicateDef2': f"(Definition/Def1, {self.def_contents_string}), (Definition/Def1/#, {self.placeholder_def_contents})", 'defTooManyPlaceholders': self.placeholder_invalid_def_string, - 'invalidPlaceholder': "(Definition/InvalidDef1/InvalidPlaceholder)", - 'invalidPlaceholderExtension': "(Definition/InvalidDef1/this-part-is-not-allowed/#)", + 'invalidPlaceholder': f"(Definition/InvalidDef1/InvalidPlaceholder, {self.def_contents_string})", + 'invalidPlaceholderExtension': f"(Definition/InvalidDef1/this-part-is-not-allowed/#, {self.def_contents_string})", 'defInGroup': "(Definition/ValidDefName, (Def/ImproperlyPlacedDef))", - 'defExpandInGroup': "(Definition/ValidDefName, (Def-expand/ImproperlyPlacedDef, (ImproperContents)))" + 'defExpandInGroup': "(Definition/ValidDefName, (Def-expand/ImproperlyPlacedDef, (ImproperContents)))", + 'doublePoundSignPlaceholder': f"(Definition/InvalidDef/##, {self.placeholder_def_contents})", + 'doublePoundSignDiffPlaceholder': f"(Definition/InvalidDef/#, (Age/##,Item/TestDef2))", + 'placeholdersWrongSpot': f"(Definition/InvalidDef/#, (Age/#,Item/TestDef2))", } expected_results = { - 'noGroupTag': [], - 'placeholderNoGroupTag': ErrorHandler.format_error(DefinitionErrors.WRONG_NUMBER_PLACEHOLDER_TAGS, - "InvalidDef1", expected_count=1, tag_list=[]), - 'placeholderWrongSpot': ErrorHandler.format_error(DefinitionErrors.INVALID_DEFINITION_EXTENSION, - "InvalidDef1#"), - 'twoDefTags': ErrorHandler.format_error(DefinitionErrors.WRONG_NUMBER_GROUP_TAGS, + 'noGroupTag': self.format_error(DefinitionErrors.NO_DEFINITION_CONTENTS, + "InvalidDef0"), + 'placeholderNoGroupTag': self.format_error(DefinitionErrors.NO_DEFINITION_CONTENTS,"InvalidDef1/#"), + 'placeholderWrongSpot': self.format_error(DefinitionErrors.NO_DEFINITION_CONTENTS,"InvalidDef1#") + self.format_error(DefinitionErrors.INVALID_DEFINITION_EXTENSION, + tag=0, def_name="InvalidDef1#"), + 'twoDefTags': self.format_error(DefinitionErrors.WRONG_NUMBER_TAGS, "ValidDef1", ["Definition/InvalidDef2"]), - 'twoGroupTags': ErrorHandler.format_error(DefinitionErrors.WRONG_NUMBER_GROUP_TAGS, + 'twoGroupTags': self.format_error(DefinitionErrors.WRONG_NUMBER_GROUPS, "InvalidDef1", [self.def_contents_string, self.def_contents_string2]), - 'extraOtherTags': ErrorHandler.format_error(DefinitionErrors.WRONG_NUMBER_GROUP_TAGS, "InvalidDef1", - ['InvalidContents']), - 'duplicateDef': ErrorHandler.format_error(DefinitionErrors.DUPLICATE_DEFINITION, "Def1"), - 'duplicateDef2': ErrorHandler.format_error(DefinitionErrors.DUPLICATE_DEFINITION, "Def1"), - # This is not an error since re-used terms are checked elsewhere. - 'defAlreadyTagInSchema': [], - 'defTooManyPlaceholders': ErrorHandler.format_error(DefinitionErrors.WRONG_NUMBER_PLACEHOLDER_TAGS, + 'extraOtherTags': self.format_error(DefinitionErrors.NO_DEFINITION_CONTENTS, "InvalidDef1") + + self.format_error(DefinitionErrors.WRONG_NUMBER_TAGS, "InvalidDef1", ['InvalidContents']), + 'duplicateDef': self.format_error(DefinitionErrors.DUPLICATE_DEFINITION, "Def1"), + 'duplicateDef2': self.format_error(DefinitionErrors.DUPLICATE_DEFINITION, "Def1"), + + 'defTooManyPlaceholders': self.format_error(DefinitionErrors.WRONG_NUMBER_PLACEHOLDER_TAGS, "TestDefPlaceholder", expected_count=1, - tag_list=["Item/TestDef1/#", "Item/TestDef2/#"]), - 'invalidPlaceholderExtension': ErrorHandler.format_error(DefinitionErrors.INVALID_DEFINITION_EXTENSION, - "InvalidDef1/this-part-is-not-allowed"), - 'invalidPlaceholder': ErrorHandler.format_error(DefinitionErrors.INVALID_DEFINITION_EXTENSION, - "InvalidDef1/InvalidPlaceholder"), - 'defInGroup': ErrorHandler.format_error(DefinitionErrors.DEF_TAG_IN_DEFINITION, + tag_list=["Age/#", "Item/TestDef2/#"]), + 'invalidPlaceholderExtension': self.format_error(DefinitionErrors.INVALID_DEFINITION_EXTENSION, + tag=0, def_name="InvalidDef1/this-part-is-not-allowed"), + 'invalidPlaceholder': self.format_error(DefinitionErrors.INVALID_DEFINITION_EXTENSION, + tag=0, def_name="InvalidDef1/InvalidPlaceholder"), + 'defInGroup': self.format_error(DefinitionErrors.DEF_TAG_IN_DEFINITION, tag=HedTag("Def/ImproperlyPlacedDef"), def_name="ValidDefName"), - 'defExpandInGroup': ErrorHandler.format_error(DefinitionErrors.DEF_TAG_IN_DEFINITION, + 'defExpandInGroup': self.format_error(DefinitionErrors.DEF_TAG_IN_DEFINITION, tag=HedTag("Def-expand/ImproperlyPlacedDef"), - def_name="ValidDefName") + def_name="ValidDefName"), + 'doublePoundSignPlaceholder': self.format_error(DefinitionErrors.INVALID_DEFINITION_EXTENSION, + tag=0, def_name="InvalidDef/##"), + 'doublePoundSignDiffPlaceholder': self.format_error(DefinitionErrors.WRONG_NUMBER_PLACEHOLDER_TAGS, + "InvalidDef", expected_count=1, tag_list=['Age/##']), + 'placeholdersWrongSpot': [] } self.check_def_base(test_strings, expected_results) @@ -107,17 +117,17 @@ def test_expand_defs(self): test_strings = { 1: "Def/TestDefPlaceholder/2471,Event", 2: "Event,(Def/TestDefPlaceholder/2471,Event)", - 3: "Def-expand/TestDefPlaceholder/2471,(Item/TestDef1/2471,Item/TestDef2),Event", + 3: "Def-expand/TestDefPlaceholder/2471,(Age/2471,Item/TestDef2),Event", } expected_results = { - 1: "(Def-expand/TestDefPlaceholder/2471,(Item/TestDef1/2471,Item/TestDef2)),Event", - 2: "Event,((Def-expand/TestDefPlaceholder/2471,(Item/TestDef1/2471,Item/TestDef2)),Event)", + 1: "(Def-expand/TestDefPlaceholder/2471,(Age/2471,Item/TestDef2)),Event", + 2: "Event,((Def-expand/TestDefPlaceholder/2471,(Age/2471,Item/TestDef2)),Event)", # this one shouldn't change as it doesn't have a parent - 3: "Def-expand/TestDefPlaceholder/2471,(Item/TestDef1/2471,Item/TestDef2),Event", + 3: "Def-expand/TestDefPlaceholder/2471,(Age/2471,Item/TestDef2),Event", } def_dict = DefinitionDict() - definition_string = "(Definition/TestDefPlaceholder/#,(Item/TestDef1/#,Item/TestDef2))" + definition_string = "(Definition/TestDefPlaceholder/#,(Age/#,Item/TestDef2))" def_dict.check_for_definitions(HedString(definition_string, hed_schema=self.hed_schema)) for key, test_string in test_strings.items(): hed_string = HedString(test_string, hed_schema=self.hed_schema) diff --git a/tests/models/test_definition_entry.py b/tests/models/test_definition_entry.py index 9ff70bc42..8407342f1 100644 --- a/tests/models/test_definition_entry.py +++ b/tests/models/test_definition_entry.py @@ -72,7 +72,7 @@ def test_get_definition(self): # new_def_count = len(def_dict.defs) # self.assertGreater(new_def_count, original_def_count) # - # placeholder_invalid_def_contents = "(Item/TestDef1/#,Item/TestDef2/#)" + # placeholder_invalid_def_contents = "(Age/#,Item/TestDef2/#)" # placeholder_invalid_def_string = f"(Definition/TestDefPlaceholder/#,{placeholder_invalid_def_contents})" # # def test_definitions(self): @@ -98,12 +98,12 @@ def test_get_definition(self): # "InvalidDef1", expected_count=1, tag_list=[]), # 'placeholderWrongSpot': ErrorHandler.format_error(DefinitionErrors.INVALID_DEFINITION_EXTENSION, # "InvalidDef1#"), - # 'twoDefTags': ErrorHandler.format_error(DefinitionErrors.WRONG_NUMBER_GROUP_TAGS, + # 'twoDefTags': ErrorHandler.format_error(DefinitionErrors.WRONG_NUMBER_GROUPS, # "ValidDef1", ["Definition/InvalidDef2"]), - # 'twoGroupTags': ErrorHandler.format_error(DefinitionErrors.WRONG_NUMBER_GROUP_TAGS, + # 'twoGroupTags': ErrorHandler.format_error(DefinitionErrors.WRONG_NUMBER_GROUPS, # "InvalidDef1", # [self.def_contents_string, self.def_contents_string2]), - # 'extraOtherTags': ErrorHandler.format_error(DefinitionErrors.WRONG_NUMBER_GROUP_TAGS, "InvalidDef1", + # 'extraOtherTags': ErrorHandler.format_error(DefinitionErrors.WRONG_NUMBER_GROUPS, "InvalidDef1", # ['InvalidContents']), # 'duplicateDef': ErrorHandler.format_error(DefinitionErrors.DUPLICATE_DEFINITION, "Def1"), # 'duplicateDef2': ErrorHandler.format_error(DefinitionErrors.DUPLICATE_DEFINITION, "Def1"), @@ -111,7 +111,7 @@ def test_get_definition(self): # 'defAlreadyTagInSchema': [], # 'defTooManyPlaceholders': ErrorHandler.format_error(DefinitionErrors.WRONG_NUMBER_PLACEHOLDER_TAGS, # "TestDefPlaceholder", expected_count=1, - # tag_list=["Item/TestDef1/#", "Item/TestDef2/#"]), + # tag_list=["Age/#", "Item/TestDef2/#"]), # 'invalidPlaceholderExtension': ErrorHandler.format_error(DefinitionErrors.INVALID_DEFINITION_EXTENSION, # "InvalidDef1/this-part-is-not-allowed"), # 'invalidPlaceholder': ErrorHandler.format_error(DefinitionErrors.INVALID_DEFINITION_EXTENSION, diff --git a/tests/models/test_df_util.py b/tests/models/test_df_util.py index ff58e35b2..c88446956 100644 --- a/tests/models/test_df_util.py +++ b/tests/models/test_df_util.py @@ -12,53 +12,53 @@ def setUp(self): self.schema = load_schema_version() def test_shrink_defs_normal(self): - df = pd.DataFrame({"column1": ["(Def-expand/TestDefNormal,(Action/TestDef1/2471,Action/TestDef2)),Event/SomeEvent"]}) + df = pd.DataFrame({"column1": ["(Def-expand/TestDefNormal,(Acceleration/2471,Action/TestDef2)),Event/SomeEvent"]}) expected_df = pd.DataFrame({"column1": ["Def/TestDefNormal,Event/SomeEvent"]}) result = shrink_defs(df, self.schema, ['column1']) pd.testing.assert_frame_equal(result, expected_df) def test_shrink_defs_placeholder(self): - df = pd.DataFrame({"column1": ["(Def-expand/TestDefPlaceholder/123,(Action/TestDef1/123,Action/TestDef2)),Item/SomeItem"]}) + df = pd.DataFrame({"column1": ["(Def-expand/TestDefPlaceholder/123,(Acceleration/123,Action/TestDef2)),Item/SomeItem"]}) expected_df = pd.DataFrame({"column1": ["Def/TestDefPlaceholder/123,Item/SomeItem"]}) result = shrink_defs(df, self.schema, ['column1']) pd.testing.assert_frame_equal(result, expected_df) def test_shrink_defs_no_matching_tags(self): - df = pd.DataFrame({"column1": ["(Event/SomeEvent, Item/SomeItem,Age/25)"]}) - expected_df = pd.DataFrame({"column1": ["(Event/SomeEvent, Item/SomeItem,Age/25)"]}) + df = pd.DataFrame({"column1": ["(Event/SomeEvent, Item/SomeItem,Acceleration/25)"]}) + expected_df = pd.DataFrame({"column1": ["(Event/SomeEvent, Item/SomeItem,Acceleration/25)"]}) result = shrink_defs(df, self.schema, ['column1']) pd.testing.assert_frame_equal(result, expected_df) def test_shrink_defs_multiple_columns(self): - df = pd.DataFrame({"column1": ["(Def-expand/TestDefNormal,(Action/TestDef1/2471,Action/TestDef2)),Event/SomeEvent"], - "column2": ["(Def-expand/TestDefPlaceholder/123,(Action/TestDef1/123,Action/TestDef2)),Item/SomeItem"]}) + df = pd.DataFrame({"column1": ["(Def-expand/TestDefNormal,(Acceleration/2471,Action/TestDef2)),Event/SomeEvent"], + "column2": ["(Def-expand/TestDefPlaceholder/123,(Acceleration/123,Action/TestDef2)),Item/SomeItem"]}) expected_df = pd.DataFrame({"column1": ["Def/TestDefNormal,Event/SomeEvent"], "column2": ["Def/TestDefPlaceholder/123,Item/SomeItem"]}) result = shrink_defs(df, self.schema, ['column1', 'column2']) pd.testing.assert_frame_equal(result, expected_df) def test_shrink_defs_multiple_defs_same_line(self): - df = pd.DataFrame({"column1": ["(Def-expand/TestDefNormal,(Action/TestDef1/2471,Action/TestDef2)),(Def-expand/TestDefPlaceholder/123,(Action/TestDef1/123,Action/TestDef2)),Age/30"]}) - expected_df = pd.DataFrame({"column1": ["Def/TestDefNormal,Def/TestDefPlaceholder/123,Age/30"]}) + df = pd.DataFrame({"column1": ["(Def-expand/TestDefNormal,(Acceleration/2471,Action/TestDef2)),(Def-expand/TestDefPlaceholder/123,(Acceleration/123,Action/TestDef2)),Acceleration/30"]}) + expected_df = pd.DataFrame({"column1": ["Def/TestDefNormal,Def/TestDefPlaceholder/123,Acceleration/30"]}) result = shrink_defs(df, self.schema, ['column1']) pd.testing.assert_frame_equal(result, expected_df) def test_shrink_defs_mixed_tags(self): df = pd.DataFrame({"column1": [ - "(Def-expand/TestDefNormal,(Action/TestDef1/2471,Action/TestDef2)),Event/SomeEvent,(Def-expand/TestDefPlaceholder/123,(Action/TestDef1/123,Action/TestDef2)),Item/SomeItem,Age/25"]}) + "(Def-expand/TestDefNormal,(Acceleration/2471,Action/TestDef2)),Event/SomeEvent,(Def-expand/TestDefPlaceholder/123,(Acceleration/123,Action/TestDef2)),Item/SomeItem,Acceleration/25"]}) expected_df = pd.DataFrame( - {"column1": ["Def/TestDefNormal,Event/SomeEvent,Def/TestDefPlaceholder/123,Item/SomeItem,Age/25"]}) + {"column1": ["Def/TestDefNormal,Event/SomeEvent,Def/TestDefPlaceholder/123,Item/SomeItem,Acceleration/25"]}) result = shrink_defs(df, self.schema, ['column1']) pd.testing.assert_frame_equal(result, expected_df) def test_shrink_defs_series_normal(self): - series = pd.Series(["(Def-expand/TestDefNormal,(Action/TestDef1/2471,Action/TestDef2)),Event/SomeEvent"]) + series = pd.Series(["(Def-expand/TestDefNormal,(Acceleration/2471,Action/TestDef2)),Event/SomeEvent"]) expected_series = pd.Series(["Def/TestDefNormal,Event/SomeEvent"]) result = shrink_defs(series, self.schema, None) pd.testing.assert_series_equal(result, expected_series) def test_shrink_defs_series_placeholder(self): - series = pd.Series(["(Def-expand/TestDefPlaceholder/123,(Action/TestDef1/123,Action/TestDef2)),Item/SomeItem"]) + series = pd.Series(["(Def-expand/TestDefPlaceholder/123,(Acceleration/123,Action/TestDef2)),Item/SomeItem"]) expected_series = pd.Series(["Def/TestDefPlaceholder/123,Item/SomeItem"]) result = shrink_defs(series, self.schema, None) pd.testing.assert_series_equal(result, expected_series) @@ -67,27 +67,27 @@ def test_shrink_defs_series_placeholder(self): class TestExpandDefs(unittest.TestCase): def setUp(self): self.schema = load_schema_version() - self.def_dict = DefinitionDict(["(Definition/TestDefNormal,(Action/TestDef1/2471,Action/TestDef2))", - "(Definition/TestDefPlaceholder/#,(Action/TestDef1/#,Action/TestDef2))"], + self.def_dict = DefinitionDict(["(Definition/TestDefNormal,(Acceleration/2471,Action/TestDef2))", + "(Definition/TestDefPlaceholder/#,(Acceleration/#,Action/TestDef2))"], hed_schema=self.schema) def test_expand_defs_normal(self): df = pd.DataFrame({"column1": ["Def/TestDefNormal,Event/SomeEvent"]}) expected_df = pd.DataFrame( - {"column1": ["(Def-expand/TestDefNormal,(Action/TestDef1/2471,Action/TestDef2)),Event/SomeEvent"]}) + {"column1": ["(Def-expand/TestDefNormal,(Acceleration/2471,Action/TestDef2)),Event/SomeEvent"]}) result = expand_defs(df, self.schema, self.def_dict, ['column1']) pd.testing.assert_frame_equal(result, expected_df) def test_expand_defs_placeholder(self): df = pd.DataFrame({"column1": ["Def/TestDefPlaceholder/123,Item/SomeItem"]}) expected_df = pd.DataFrame({"column1": [ - "(Def-expand/TestDefPlaceholder/123,(Action/TestDef1/123,Action/TestDef2)),Item/SomeItem"]}) + "(Def-expand/TestDefPlaceholder/123,(Acceleration/123,Action/TestDef2)),Item/SomeItem"]}) result = expand_defs(df, self.schema, self.def_dict, ['column1']) pd.testing.assert_frame_equal(result, expected_df) def test_expand_defs_no_matching_tags(self): - df = pd.DataFrame({"column1": ["(Event/SomeEvent,Item/SomeItem,Age/25)"]}) - expected_df = pd.DataFrame({"column1": ["(Event/SomeEvent,Item/SomeItem,Age/25)"]}) + df = pd.DataFrame({"column1": ["(Event/SomeEvent,Item/SomeItem,Acceleration/25)"]}) + expected_df = pd.DataFrame({"column1": ["(Event/SomeEvent,Item/SomeItem,Acceleration/25)"]}) result = expand_defs(df, self.schema, self.def_dict, ['column1']) pd.testing.assert_frame_equal(result, expected_df) @@ -95,21 +95,21 @@ def test_expand_defs_multiple_columns(self): df = pd.DataFrame({"column1": ["Def/TestDefNormal,Event/SomeEvent"], "column2": ["Def/TestDefPlaceholder/123,Item/SomeItem"]}) expected_df = pd.DataFrame( - {"column1": ["(Def-expand/TestDefNormal,(Action/TestDef1/2471,Action/TestDef2)),Event/SomeEvent"], + {"column1": ["(Def-expand/TestDefNormal,(Acceleration/2471,Action/TestDef2)),Event/SomeEvent"], "column2": [ - "(Def-expand/TestDefPlaceholder/123,(Action/TestDef1/123,Action/TestDef2)),Item/SomeItem"]}) + "(Def-expand/TestDefPlaceholder/123,(Acceleration/123,Action/TestDef2)),Item/SomeItem"]}) result = expand_defs(df, self.schema, self.def_dict, ['column1', 'column2']) pd.testing.assert_frame_equal(result, expected_df) def test_expand_defs_series_normal(self): series = pd.Series(["Def/TestDefNormal,Event/SomeEvent"]) - expected_series = pd.Series(["(Def-expand/TestDefNormal,(Action/TestDef1/2471,Action/TestDef2)),Event/SomeEvent"]) + expected_series = pd.Series(["(Def-expand/TestDefNormal,(Acceleration/2471,Action/TestDef2)),Event/SomeEvent"]) result = expand_defs(series, self.schema, self.def_dict, None) pd.testing.assert_series_equal(result, expected_series) def test_expand_defs_series_placeholder(self): series = pd.Series(["Def/TestDefPlaceholder/123,Item/SomeItem"]) - expected_series = pd.Series(["(Def-expand/TestDefPlaceholder/123,(Action/TestDef1/123,Action/TestDef2)),Item/SomeItem"]) + expected_series = pd.Series(["(Def-expand/TestDefPlaceholder/123,(Acceleration/123,Action/TestDef2)),Item/SomeItem"]) result = expand_defs(series, self.schema, self.def_dict, None) pd.testing.assert_series_equal(result, expected_series) @@ -157,8 +157,8 @@ def test_convert_to_form_multiple_tags_long(self): def test_basic_expand_detection(self): # all simple cases with no duplicates test_strings = [ - "(Def-expand/A1/1, (Action/1, Age/5, Item-count/3))", - "(Def-expand/A1/2, (Action/2, Age/5, Item-count/3))", + "(Def-expand/A1/1, (Action/1, Acceleration/5, Item-count/3))", + "(Def-expand/A1/2, (Action/2, Acceleration/5, Item-count/3))", "(Def-expand/B2/3, (Action/3, Collection/animals, Alert))", "(Def-expand/B2/4, (Action/4, Collection/animals, Alert))", "(Def-expand/C3/5, (Action/5, Joyful, Event))", @@ -170,20 +170,20 @@ def test_mixed_detection(self): # Cases where you can only retroactively identify the first def-expand test_strings = [ # Basic example first just to verify - "(Def-expand/A1/1, (Action/1, Age/5, Item-count/2))", - "(Def-expand/A1/2, (Action/2, Age/5, Item-count/2))", + "(Def-expand/A1/1, (Action/1, Acceleration/5, Item-count/2))", + "(Def-expand/A1/2, (Action/2, Acceleration/5, Item-count/2))", # Out of order ambiguous - "(Def-expand/B2/3, (Action/3, Collection/animals, Age/3))", - "(Def-expand/B2/4, (Action/4, Collection/animals, Age/3))", + "(Def-expand/B2/3, (Action/3, Collection/animals, Acceleration/3))", + "(Def-expand/B2/4, (Action/4, Collection/animals, Acceleration/3))", # Multiple tags - "(Def-expand/C3/5, (Action/5, Age/5, Item-count/5))", - "(Def-expand/C3/6, (Action/6, Age/5, Item-count/5))", + "(Def-expand/C3/5, (Action/5, Acceleration/5, Item-count/5))", + "(Def-expand/C3/6, (Action/6, Acceleration/5, Item-count/5))", # Multiple tags2 - "(Def-expand/D4/7, (Action/7, Age/7, Item-count/8))", - "(Def-expand/D4/8, (Action/8, Age/7, Item-count/8))" + "(Def-expand/D4/7, (Action/7, Acceleration/7, Item-count/8))", + "(Def-expand/D4/8, (Action/8, Acceleration/7, Item-count/8))" # Multiple tags3 - "(Def-expand/D5/7, (Action/7, Age/7, Item-count/8, Event))", - "(Def-expand/D5/8, (Action/8, Age/7, Item-count/8, Event))" + "(Def-expand/D5/7, (Action/7, Acceleration/7, Item-count/8, Event))", + "(Def-expand/D5/8, (Action/8, Acceleration/7, Item-count/8, Event))" ] def_dict, ambiguous_defs, _ = process_def_expands(test_strings, self.schema) self.assertEqual(len(def_dict), 5) @@ -191,11 +191,11 @@ def test_mixed_detection(self): def test_ambiguous_defs(self): # Cases that can't be identified test_strings = [ - "(Def-expand/A1/2, (Action/2, Age/5, Item-count/2))", - "(Def-expand/B2/3, (Action/3, Collection/animals, Age/3))", - "(Def-expand/C3/5, (Action/5, Age/5, Item-count/5))", - "(Def-expand/D4/7, (Action/7, Age/7, Item-count/8))", - "(Def-expand/D5/7, (Action/7, Age/7, Item-count/8, Event))", + "(Def-expand/A1/2, (Action/2, Acceleration/5, Item-count/2))", + "(Def-expand/B2/3, (Action/3, Collection/animals, Acceleration/3))", + "(Def-expand/C3/5, (Action/5, Acceleration/5, Item-count/5))", + "(Def-expand/D4/7, (Action/7, Acceleration/7, Item-count/8))", + "(Def-expand/D5/7, (Action/7, Acceleration/7, Item-count/8, Event))", ] _, ambiguous_defs, _ = process_def_expands(test_strings, self.schema) self.assertEqual(len(ambiguous_defs), 5) @@ -224,25 +224,46 @@ def test_errors(self): _, _, errors = process_def_expands(test_strings, self.schema) self.assertEqual(len(errors), 1) + def test_errors_ambiguous(self): + # Verify we recognize errors when we had a def that can't be resolved. + test_strings = [ + "(Def-expand/A1/1, (Action/1, Age/5, Item-count/1))", + "(Def-expand/A1/2, (Action/2, Age/5, Item-count/3))", + "(Def-expand/A1/3, (Action/3, Age/5, Item-count/3))", + ] + known, ambiguous, errors = process_def_expands(test_strings, self.schema) + self.assertEqual(len(errors), 1) + self.assertEqual(len(errors["a1"]), 3) + + def test_errors_unresolved(self): + # Verify we recognize errors when we had a def that can't be resolved. + test_strings = [ + "(Def-expand/A1/1, (Action/1, Age/5, Item-count/1))", + "(Def-expand/A1/2, (Action/2, Age/5, Item-count/3))", + ] + known, ambiguous, errors = process_def_expands(test_strings, self.schema) + self.assertEqual(len(errors), 1) + self.assertEqual(len(errors["a1"]), 2) + def test_def_expand_detection(self): test_strings = [ - "(Def-expand/A1/1, (Action/1, Age/5, Item-Count/2))", - "(Def-expand/A1/2, (Action/2, Age/5, Item-Count/2))", + "(Def-expand/A1/1, (Action/1, Acceleration/5, Item-Count/2))", + "(Def-expand/A1/2, (Action/2, Acceleration/5, Item-Count/2))", "(Def-expand/B2/3, (Action/3, Collection/animals, Alert))", "(Def-expand/B2/4, (Action/4, Collection/animals, Alert))", "(Def-expand/C3/5, (Action/5, Joyful, Event))", "(Def-expand/C3/6, (Action/6, Joyful, Event))", - "((Def-expand/A1/7, (Action/7, Age/5, Item-Count/2)), Event, Age/10)", - "((Def-expand/A1/8, (Action/8, Age/5, Item-Count/2)), Collection/toys, Item-Count/5)", + "((Def-expand/A1/7, (Action/7, Acceleration/5, Item-Count/2)), Event, Acceleration/10)", + "((Def-expand/A1/8, (Action/8, Acceleration/5, Item-Count/2)), Collection/toys, Item-Count/5)", "((Def-expand/B2/9, (Action/9, Collection/animals, Alert)), Event, Collection/plants)", "((Def-expand/B2/10, (Action/10, Collection/animals, Alert)), Joyful, Item-Count/3)", - "((Def-expand/C3/11, (Action/11, Joyful, Event)), Collection/vehicles, Age/20)", + "((Def-expand/C3/11, (Action/11, Joyful, Event)), Collection/vehicles, Acceleration/20)", "((Def-expand/C3/12, (Action/12, Joyful, Event)), Alert, Item-Count/8)", - "((Def-expand/A1/13, (Action/13, Age/5, Item-Count/2)), (Def-expand/B2/13, (Action/13, Collection/animals, Alert)), Event)", - "((Def-expand/A1/14, (Action/14, Age/5, Item-Count/2)), Joyful, (Def-expand/C3/14, (Action/14, Joyful, Event)))", - "(Def-expand/B2/15, (Action/15, Collection/animals, Alert)), (Def-expand/C3/15, (Action/15, Joyful, Event)), Age/30", - "((Def-expand/A1/16, (Action/16, Age/5, Item-Count/2)), (Def-expand/B2/16, (Action/16, Collection/animals, Alert)), Collection/food)", - "(Def-expand/C3/17, (Action/17, Joyful, Event)), (Def-expand/A1/17, (Action/17, Age/5, Item-Count/2)), Item-Count/6", + "((Def-expand/A1/13, (Action/13, Acceleration/5, Item-Count/2)), (Def-expand/B2/13, (Action/13, Collection/animals, Alert)), Event)", + "((Def-expand/A1/14, (Action/14, Acceleration/5, Item-Count/2)), Joyful, (Def-expand/C3/14, (Action/14, Joyful, Event)))", + "(Def-expand/B2/15, (Action/15, Collection/animals, Alert)), (Def-expand/C3/15, (Action/15, Joyful, Event)), Acceleration/30", + "((Def-expand/A1/16, (Action/16, Acceleration/5, Item-Count/2)), (Def-expand/B2/16, (Action/16, Collection/animals, Alert)), Collection/food)", + "(Def-expand/C3/17, (Action/17, Joyful, Event)), (Def-expand/A1/17, (Action/17, Acceleration/5, Item-Count/2)), Item-Count/6", "((Def-expand/B2/18, (Action/18, Collection/animals, Alert)), (Def-expand/C3/18, (Action/18, Joyful, Event)), Alert)", "(Def-expand/D1/Apple, (Task/Apple, Collection/cars, Attribute/color))", "(Def-expand/D1/Banana, (Task/Banana, Collection/cars, Attribute/color))", @@ -250,7 +271,7 @@ def test_def_expand_detection(self): "(Def-expand/E2/Dog, (Collection/Dog, Collection/plants, Attribute/type))", "((Def-expand/D1/Elephant, (Task/Elephant, Collection/cars, Attribute/color)), (Def-expand/E2/Fox, (Collection/Fox, Collection/plants, Attribute/type)), Event)", "((Def-expand/D1/Giraffe, (Task/Giraffe, Collection/cars, Attribute/color)), Joyful, (Def-expand/E2/Horse, (Collection/Horse, Collection/plants, Attribute/type)))", - "(Def-expand/D1/Iguana, (Task/Iguana, Collection/cars, Attribute/color)), (Def-expand/E2/Jaguar, (Collection/Jaguar, Collection/plants, Attribute/type)), Age/30", + "(Def-expand/D1/Iguana, (Task/Iguana, Collection/cars, Attribute/color)), (Def-expand/E2/Jaguar, (Collection/Jaguar, Collection/plants, Attribute/type)), Acceleration/30", "(Def-expand/F1/Lion, (Task/Lion, Collection/boats, Attribute/length))", "(Def-expand/F1/Monkey, (Task/Monkey, Collection/boats, Attribute/length))", "(Def-expand/G2/Nest, (Collection/Nest, Collection/instruments, Attribute/material))", diff --git a/tests/models/test_hed_string.py b/tests/models/test_hed_string.py index af17878bb..46f7c750c 100644 --- a/tests/models/test_hed_string.py +++ b/tests/models/test_hed_string.py @@ -69,13 +69,20 @@ def test_group_tags(self): hed_string = '/Action/Reach/To touch,(/Attribute/Object side/Left,/Participant/Effect/Body part/Arm),' \ '/Attribute/Location/Screen/Top/70 px,/Attribute/Location/Screen/Left/23 px ' string_obj = HedString(hed_string) - # result = HedString.split_into_groups(hed_string) tags_as_strings = [str(tag) for tag in string_obj.children] self.assertCountEqual(tags_as_strings, ['/Action/Reach/To touch', '(/Attribute/Object side/Left,/Participant/Effect/Body part/Arm)', '/Attribute/Location/Screen/Top/70 px', '/Attribute/Location/Screen/Left/23 px']) + def test_square_brackets_in_string(self): + # just verifying this parses, square brackets do not validate + hed_string = '[test_ref], Event/Sensory-event, Participant, ([test_ref2], Event)' + string_obj = HedString(hed_string) + tags_as_strings = [str(tag) for tag in string_obj.children] + self.assertCountEqual(tags_as_strings, + ['[test_ref]', 'Event/Sensory-event', 'Participant', '([test_ref2],Event)']) + # Potentially restore some similar behavior later if desired. # We no longer automatically remove things like quotes. # def test_double_quotes(self): diff --git a/tests/models/test_sidecar.py b/tests/models/test_sidecar.py index 182a15a3b..4fdacb31f 100644 --- a/tests/models/test_sidecar.py +++ b/tests/models/test_sidecar.py @@ -82,13 +82,13 @@ def test__iter__(self): def test_validate_column_group(self): validation_issues = self.errors_sidecar.validate(self.hed_schema) - self.assertEqual(len(validation_issues), 22) + self.assertEqual(len(validation_issues), 5) validation_issues2 = self.errors_sidecar_minor.validate(self.hed_schema) - self.assertEqual(len(validation_issues2), 18) + self.assertEqual(len(validation_issues2), 1) validation_issues = self.json_without_definitions_sidecar.validate(self.hed_schema) - self.assertEqual(len(validation_issues), 8) + self.assertEqual(len(validation_issues), 7) hed_string = HedString("(Definition/JsonFileDef/#, (Item/JsonDef1/#,Item/JsonDef1))", self.hed_schema) extra_def_dict = DefinitionDict() @@ -113,8 +113,8 @@ def test_save_load(self): reloaded_sidecar = Sidecar(save_filename) - for str1, str2 in zip(sidecar.hed_string_iter(), reloaded_sidecar.hed_string_iter()): - self.assertEqual(str1[0], str2[0]) + for data1, data2 in zip(sidecar, reloaded_sidecar): + self.assertEqual(data1.source_dict, data2.source_dict) def test_save_load2(self): sidecar = Sidecar(self.json_def_filename) @@ -122,8 +122,8 @@ def test_save_load2(self): reloaded_sidecar = Sidecar(io.StringIO(json_string)) - for str1, str2 in zip(sidecar.hed_string_iter(), reloaded_sidecar.hed_string_iter()): - self.assertEqual(str1[0], str2[0]) + for data1, data2 in zip(sidecar, reloaded_sidecar): + self.assertEqual(data1.source_dict, data2.source_dict) def test_merged_sidecar(self): base_folder = self.base_data_dir + "sidecar_tests/" @@ -136,6 +136,26 @@ def test_merged_sidecar(self): self.assertEqual(sidecar.loaded_dict, sidecar2.loaded_dict) + def test_set_hed_strings(self): + from hed.models import df_util + sidecar = Sidecar(os.path.join(self.base_data_dir, "sidecar_tests/short_tag_test.json")) + + for column_data in sidecar: + hed_strings = column_data.get_hed_strings() + hed_strings = df_util.convert_to_form(hed_strings, self.hed_schema, "long_tag") + column_data.set_hed_strings(hed_strings) + sidecar_long = Sidecar(os.path.join(self.base_data_dir, "sidecar_tests/long_tag_test.json")) + self.assertEqual(sidecar.loaded_dict, sidecar_long.loaded_dict) + + sidecar = Sidecar(os.path.join(self.base_data_dir, "sidecar_tests/long_tag_test.json")) + + for column_data in sidecar: + hed_strings = column_data.get_hed_strings() + hed_strings = df_util.convert_to_form(hed_strings, self.hed_schema, "short_tag") + column_data.set_hed_strings(hed_strings) + sidecar_short = Sidecar(os.path.join(self.base_data_dir, "sidecar_tests/short_tag_test.json")) + self.assertEqual(sidecar.loaded_dict, sidecar_short.loaded_dict) + if __name__ == '__main__': unittest.main() diff --git a/tests/models/test_spreadsheet_input.py b/tests/models/test_spreadsheet_input.py index 9fc8f5827..0a1d83a2e 100644 --- a/tests/models/test_spreadsheet_input.py +++ b/tests/models/test_spreadsheet_input.py @@ -3,15 +3,12 @@ import io from hed.errors import HedFileError -from hed.models import TabularInput, SpreadsheetInput, model_constants, Sidecar +from hed.models import TabularInput, SpreadsheetInput, Sidecar import shutil from hed import schema import pandas as pd -# TODO: Add tests about correct handling of 'n/a' - - class Test(unittest.TestCase): @classmethod def setUpClass(cls): @@ -20,19 +17,9 @@ def setUpClass(cls): hed_xml_file = os.path.join(base, "schema_tests/HED8.0.0t.xml") cls.hed_schema = schema.load_schema(hed_xml_file) default = os.path.join(os.path.dirname(os.path.realpath(__file__)), - "../data/validator_tests/ExcelMultipleSheets.xlsx") + "../data/spreadsheet_validator_tests/ExcelMultipleSheets.xlsx") cls.default_test_file_name = default cls.generic_file_input = SpreadsheetInput(default) - cls.integer_key_dictionary = {1: 'one', 2: 'two', 3: 'three'} - cls.one_based_tag_columns = [1, 2, 3] - cls.zero_based_tag_columns = [0, 1, 2, 3, 4] - cls.zero_based_row_column_count = 3 - cls.zero_based_tag_columns_less_than_row_column_count = [0, 1, 2] - cls.column_prefix_dictionary = {3: 'Event/Description/', 4: 'Event/Label/', 5: 'Event/Category/'} - cls.category_key = 'Event/Category/' - cls.category_participant_and_stimulus_tags = 'Event/Category/Participant response,Event/Category/Stimulus' - cls.category_tags = 'Participant response, Stimulus' - cls.row_with_hed_tags = ['event1', 'tag1', 'tag2'] base_output = os.path.join(os.path.dirname(os.path.realpath(__file__)), "../data/tests_output/") cls.base_output_folder = base_output os.makedirs(base_output, exist_ok=True) @@ -44,7 +31,7 @@ def tearDownClass(cls): def test_all(self): hed_input = self.default_test_file_name has_column_names = True - column_prefix_dictionary = {2: 'Label', 3: 'Description'} + column_prefix_dictionary = {1: 'Label/', 2: 'Description'} tag_columns = [4] worksheet_name = 'LKT Events' @@ -54,9 +41,23 @@ def test_all(self): self.assertTrue(isinstance(file_input.dataframe_a, pd.DataFrame)) self.assertTrue(isinstance(file_input.series_a, pd.Series)) self.assertTrue(file_input.dataframe_a.size) + self.assertEqual(len(file_input._mapper.get_column_mapping_issues()), 0) + + def test_all2(self): + # This should work, but raise an issue as Short label and column 1 overlap. + hed_input = self.default_test_file_name + has_column_names = True + column_prefix_dictionary = {1: 'Label/', "Short label": 'Description'} + tag_columns = [4] + worksheet_name = 'LKT Events' + + file_input = SpreadsheetInput(hed_input, has_column_names=has_column_names, worksheet_name=worksheet_name, + tag_columns=tag_columns, column_prefix_dictionary=column_prefix_dictionary) - # Just make sure this didn't crash for now - self.assertTrue(True) + self.assertTrue(isinstance(file_input.dataframe_a, pd.DataFrame)) + self.assertTrue(isinstance(file_input.series_a, pd.Series)) + self.assertTrue(file_input.dataframe_a.size) + self.assertEqual(len(file_input._mapper.get_column_mapping_issues()), 1) def test_file_as_string(self): events_path = os.path.join(os.path.dirname(os.path.realpath(__file__)), @@ -103,11 +104,11 @@ def test_to_excel(self): def test_to_excel_should_work(self): spreadsheet = SpreadsheetInput(file=self.default_test_file_name, file_type='.xlsx', - tag_columns=[4], has_column_names=True, - column_prefix_dictionary={1: 'Label/', 3: 'Description/'}, + tag_columns=[3], has_column_names=True, + column_prefix_dictionary={1: 'Label/', 2: 'Description/'}, name='ExcelOneSheet.xlsx') buffer = io.BytesIO() - spreadsheet.to_excel(buffer, output_assembled=True) + spreadsheet.to_excel(buffer) buffer.seek(0) v = buffer.getvalue() self.assertGreater(len(v), 0, "It should have a length greater than 0") @@ -148,51 +149,50 @@ def test_loading_and_reset_mapper(self): def test_no_column_header_and_convert(self): events_path = os.path.join(os.path.dirname(os.path.realpath(__file__)), '../data/model_tests/no_column_header.tsv') - hed_input = SpreadsheetInput(events_path, has_column_names=False, tag_columns=[1, 2]) + hed_input = SpreadsheetInput(events_path, has_column_names=False, tag_columns=[0, 1]) hed_input.convert_to_long(self.hed_schema) events_path_long = os.path.join(os.path.dirname(os.path.realpath(__file__)), '../data/model_tests/no_column_header_long.tsv') - hed_input_long = SpreadsheetInput(events_path_long, has_column_names=False, tag_columns=[1, 2]) + hed_input_long = SpreadsheetInput(events_path_long, has_column_names=False, tag_columns=[0, 1]) self.assertTrue(hed_input._dataframe.equals(hed_input_long._dataframe)) def test_convert_short_long_with_definitions(self): # Verify behavior works as expected even if definitions are present events_path = os.path.join(os.path.dirname(os.path.realpath(__file__)), '../data/model_tests/no_column_header_definition.tsv') - hed_input = SpreadsheetInput(events_path, has_column_names=False, tag_columns=[1, 2]) + hed_input = SpreadsheetInput(events_path, has_column_names=False, tag_columns=[0, 1]) hed_input.convert_to_long(self.hed_schema) events_path_long = os.path.join(os.path.dirname(os.path.realpath(__file__)), '../data/model_tests/no_column_header_definition_long.tsv') - hed_input_long = SpreadsheetInput(events_path_long, has_column_names=False, tag_columns=[1, 2]) + hed_input_long = SpreadsheetInput(events_path_long, has_column_names=False, tag_columns=[0, 1]) self.assertTrue(hed_input._dataframe.equals(hed_input_long._dataframe)) def test_definitions_identified(self): - # Todo ian: this test is no longer relevant + # Todo: this test is no longer relevant events_path = os.path.join(os.path.dirname(os.path.realpath(__file__)), '../data/model_tests/no_column_header_definition.tsv') - hed_input = SpreadsheetInput(events_path, has_column_names=False, tag_columns=[1, 2]) + hed_input = SpreadsheetInput(events_path, has_column_names=False, tag_columns=[0, 1]) events_path = os.path.join(os.path.dirname(os.path.realpath(__file__)), '../data/model_tests/no_column_header_definition.tsv') - hed_input = SpreadsheetInput(events_path, has_column_names=False, tag_columns=[1, 2]) - + hed_input = SpreadsheetInput(events_path, has_column_names=False, tag_columns=[0, 1]) def test_loading_dataframe_directly(self): ds_path = os.path.join(os.path.dirname(os.path.realpath(__file__)), '../data/model_tests/no_column_header_definition.tsv') ds = pd.read_csv(ds_path, delimiter="\t", header=None) - hed_input = SpreadsheetInput(ds, has_column_names=False, tag_columns=[1, 2]) + hed_input = SpreadsheetInput(ds, has_column_names=False, tag_columns=[0, 1]) events_path = os.path.join(os.path.dirname(os.path.realpath(__file__)), '../data/model_tests/no_column_header_definition.tsv') - hed_input2 = SpreadsheetInput(events_path, has_column_names=False, tag_columns=[1, 2]) + hed_input2 = SpreadsheetInput(events_path, has_column_names=False, tag_columns=[0, 1]) self.assertTrue(hed_input._dataframe.equals(hed_input2._dataframe)) def test_ignoring_na_column(self): events_path = os.path.join(os.path.dirname(os.path.realpath(__file__)), '../data/model_tests/na_tag_column.tsv') - hed_input = SpreadsheetInput(events_path, has_column_names=False, tag_columns=[1, 2]) + hed_input = SpreadsheetInput(events_path, has_column_names=False, tag_columns=[0, 1]) self.assertTrue(hed_input.dataframe_a.loc[1, 1] == 'n/a') def test_ignoring_na_value_column(self): @@ -200,9 +200,30 @@ def test_ignoring_na_value_column(self): events_path = os.path.join(os.path.dirname(os.path.realpath(__file__)), '../data/model_tests/na_value_column.tsv') sidecar_path = os.path.join(os.path.dirname(os.path.realpath(__file__)), - '../data/model_tests/na_value_column.json') + '../data/model_tests/na_value_column.json') hed_input = TabularInput(events_path, sidecar=sidecar_path) self.assertTrue(hed_input.dataframe_a.loc[1, 'Value'] == 'n/a') + def test_to_excel_workbook(self): + excel_book = SpreadsheetInput(self.default_test_file_name, worksheet_name="LKT 8HED3", + tag_columns=["HED tags"]) + test_output_name = self.base_output_folder + "ExcelMultipleSheets_resave_assembled.xlsx" + excel_book.convert_to_long(self.hed_schema) + excel_book.to_excel(test_output_name) + reloaded_df = SpreadsheetInput(test_output_name, worksheet_name="LKT 8HED3") + + self.assertTrue(excel_book.dataframe.equals(reloaded_df.dataframe)) + + def test_to_excel_workbook_no_col_names(self): + excel_book = SpreadsheetInput(self.default_test_file_name, worksheet_name="LKT 8HED3", + tag_columns=[4], has_column_names=False) + test_output_name = self.base_output_folder + "ExcelMultipleSheets_resave_assembled_no_col_names.xlsx" + excel_book.convert_to_long(self.hed_schema) + excel_book.to_excel(test_output_name) + reloaded_df = SpreadsheetInput(test_output_name, worksheet_name="LKT 8HED3", tag_columns=[4], + has_column_names=False) + self.assertTrue(excel_book.dataframe.equals(reloaded_df.dataframe)) + + if __name__ == '__main__': unittest.main() diff --git a/tests/models/test_tabular_input.py b/tests/models/test_tabular_input.py index d306582fb..c3c01f2b7 100644 --- a/tests/models/test_tabular_input.py +++ b/tests/models/test_tabular_input.py @@ -82,5 +82,6 @@ def test_validate_file_warnings(self): issues2a = input_file2.validate(hed_schema=self.hed_schema, error_handler=ErrorHandler(False)) breakHere = 3 + if __name__ == '__main__': unittest.main() diff --git a/tests/schema/test_hed_cache.py b/tests/schema/test_hed_cache.py index a3192e2f8..8b122fdf0 100644 --- a/tests/schema/test_hed_cache.py +++ b/tests/schema/test_hed_cache.py @@ -116,7 +116,10 @@ def test_find_hed_expression(self): class TestLocal(unittest.TestCase): @classmethod def setUpClass(cls): - cls.hed_cache_dir = os.path.join(os.path.dirname(os.path.realpath(__file__)), '../schema_cache_test_local/') + hed_cache_dir = os.path.join(os.path.dirname(os.path.realpath(__file__)), '../schema_cache_test_local/') + if os.path.exists(hed_cache_dir) and os.path.isdir(hed_cache_dir): + shutil.rmtree(hed_cache_dir) + cls.hed_cache_dir = hed_cache_dir cls.saved_cache_folder = hed_cache.HED_CACHE_DIRECTORY schema.set_cache_directory(cls.hed_cache_dir) diff --git a/tests/schema/test_hed_schema_io.py b/tests/schema/test_hed_schema_io.py index 4154e4ae6..5511c7cd3 100644 --- a/tests/schema/test_hed_schema_io.py +++ b/tests/schema/test_hed_schema_io.py @@ -7,8 +7,10 @@ import os from hed.schema import hed_cache import shutil +from hed.errors import HedExceptions +# todo: speed up these tests class TestHedSchema(unittest.TestCase): def test_load_invalid_schema(self): @@ -176,7 +178,12 @@ def _base_merging_test(self, files): path1 = s1.save_as_xml(save_merged=save_merged) path2 = s2.save_as_xml(save_merged=save_merged) result = filecmp.cmp(path1, path2) + # print(s1.filename) + # print(s2.filename) self.assertTrue(result) + reload1 = load_schema(path1) + reload2 = load_schema(path2) + self.assertEqual(reload1, reload2) finally: os.remove(path1) os.remove(path2) @@ -186,6 +193,10 @@ def _base_merging_test(self, files): path2 = s2.save_as_mediawiki(save_merged=save_merged) result = filecmp.cmp(path1, path2) self.assertTrue(result) + + reload1 = load_schema(path1) + reload2 = load_schema(path2) + self.assertEqual(reload1, reload2) finally: os.remove(path1) os.remove(path2) @@ -209,6 +220,14 @@ def test_saving_merged(self): self._base_merging_test(files) + def test_saving_merged_rooted(self): + files = [ + load_schema(os.path.join(self.full_base_folder, "basic_root.mediawiki")), + load_schema(os.path.join(self.full_base_folder, "basic_root.xml")), + ] + + self._base_merging_test(files) + def _base_added_class_tests(self, schema): tag_entry = schema.all_tags["Modulator"] self.assertEqual(tag_entry.attributes["suggestedTag"], "Event") @@ -272,8 +291,34 @@ def test_bad_schemas(self): load_schema(os.path.join(self.full_base_folder, "issues_tests/overlapping_tags4.mediawiki")), load_schema(os.path.join(self.full_base_folder, "issues_tests/overlapping_unit_classes.mediawiki")), load_schema(os.path.join(self.full_base_folder, "issues_tests/overlapping_units.mediawiki")), + load_schema(os.path.join(self.full_base_folder, "issues_tests/HED_dupesubroot_0.0.1.mediawiki")) ] - for schema in files: + expected_code = [ + HedExceptions.SCHEMA_LIBRARY_INVALID, + HedExceptions.SCHEMA_LIBRARY_INVALID, + HedExceptions.SCHEMA_LIBRARY_INVALID, + HedExceptions.SCHEMA_LIBRARY_INVALID, + HedExceptions.SCHEMA_LIBRARY_INVALID, + HedExceptions.SCHEMA_LIBRARY_INVALID, + SchemaErrors.HED_SCHEMA_DUPLICATE_NODE, + ] + for schema, expected_code in zip(files, expected_code): + # print(schema.filename) issues = schema.check_compliance() + # for issue in issues: + # print(str(issue)) self.assertEqual(len(issues), 1) - self.assertEqual(issues[0]["code"], SchemaErrors.HED_SCHEMA_DUPLICATE_NODE) \ No newline at end of file + self.assertEqual(issues[0]["code"], expected_code) + + def test_cannot_load_schemas(self): + files = [ + os.path.join(self.full_base_folder, "issues_tests/HED_badroot_0.0.1.mediawiki"), + os.path.join(self.full_base_folder, "issues_tests/HED_root_wrong_place_0.0.1.mediawiki"), + os.path.join(self.full_base_folder, "issues_tests/HED_root_invalid1.mediawiki"), + os.path.join(self.full_base_folder, "issues_tests/HED_root_invalid2.mediawiki"), + os.path.join(self.full_base_folder, "issues_tests/HED_root_invalid3.mediawiki"), + + ] + for file in files: + with self.assertRaises(HedFileError): + load_schema(file) diff --git a/tests/tools/analysis/test_column_name_summary.py b/tests/tools/analysis/test_tabular_column_name_summary.py similarity index 78% rename from tests/tools/analysis/test_column_name_summary.py rename to tests/tools/analysis/test_tabular_column_name_summary.py index 31cb551c0..d2825fcb8 100644 --- a/tests/tools/analysis/test_column_name_summary.py +++ b/tests/tools/analysis/test_tabular_column_name_summary.py @@ -1,6 +1,6 @@ import json import unittest -from hed.tools.analysis.column_name_summary import ColumnNameSummary +from hed.tools.analysis.tabular_column_name_summary import TabularColumnNameSummary class Test(unittest.TestCase): @@ -17,16 +17,16 @@ def tearDownClass(cls): pass def test_constructor(self): - column_summary1 = ColumnNameSummary(name='Dataset') - self.assertIsInstance(column_summary1, ColumnNameSummary) + column_summary1 = TabularColumnNameSummary(name='Dataset') + self.assertIsInstance(column_summary1, TabularColumnNameSummary) self.assertEqual(column_summary1.name, 'Dataset') self.assertFalse(column_summary1.file_dict) self.assertFalse(column_summary1.unique_headers) - column_summary2 = ColumnNameSummary() - self.assertIsInstance(column_summary2, ColumnNameSummary) + column_summary2 = TabularColumnNameSummary() + self.assertIsInstance(column_summary2, TabularColumnNameSummary) def test_update(self): - column_summary = ColumnNameSummary() + column_summary = TabularColumnNameSummary() column_summary.update('run-01', self.columns1) column_summary.update('run-02', self.columns1) self.assertEqual(len(column_summary.unique_headers), 1) @@ -41,7 +41,7 @@ def test_update(self): self.assertEqual(context.exception.args[0], "FileHasChangedColumnNames") def test_update_headers(self): - column_summary = ColumnNameSummary() + column_summary = TabularColumnNameSummary() pos1 = column_summary.update_headers(self.columns1) self.assertEqual(pos1, 0) pos2 = column_summary.update_headers(self.columns1) @@ -50,7 +50,7 @@ def test_update_headers(self): self.assertEqual(pos3, 1) def test_get_summary(self): - column_summary = ColumnNameSummary('Dataset') + column_summary = TabularColumnNameSummary('Dataset') column_summary.update('run-01', self.columns1) column_summary.update('run-02', self.columns1) summary1 = column_summary.get_summary() diff --git a/tests/tools/analysis/test_temporal_event.py b/tests/tools/analysis/test_temporal_event.py index 8a057871e..ed3523a59 100644 --- a/tests/tools/analysis/test_temporal_event.py +++ b/tests/tools/analysis/test_temporal_event.py @@ -2,8 +2,7 @@ import unittest from hed import schema as hedschema -from hed.models import Sidecar, TabularInput, HedString, HedTag, HedGroup -from hed.tools import assemble_hed +from hed.models import HedString, HedGroup from hed.tools.analysis.temporal_event import TemporalEvent diff --git a/tests/tools/bids/test_bids_tabular_dictionary.py b/tests/tools/bids/test_bids_tabular_dictionary.py index 088fcf6ac..0c604ea75 100644 --- a/tests/tools/bids/test_bids_tabular_dictionary.py +++ b/tests/tools/bids/test_bids_tabular_dictionary.py @@ -76,7 +76,7 @@ def test_correct_file_bad_file(self): input_data = TabularInput(self.file_list[0]) with self.assertRaises(HedFileError) as context: BidsTabularDictionary._correct_file(input_data) - self.assertEqual(context.exception.error_type, 'BadArgument') + self.assertEqual(context.exception.code, 'BadArgument') def test_correct_file_bids_file(self): bids_file = BidsFile(self.file_list[0]) diff --git a/tests/tools/remodeling/cli/test_run_remodel.py b/tests/tools/remodeling/cli/test_run_remodel.py index fac00f06b..893794e45 100644 --- a/tests/tools/remodeling/cli/test_run_remodel.py +++ b/tests/tools/remodeling/cli/test_run_remodel.py @@ -36,6 +36,9 @@ def setUp(self): def tearDown(self): shutil.rmtree(self.data_root) + work_path = os.path.realpath(os.path.join(self.extract_path, 'temp')) + if os.path.exists(work_path): + shutil.rmtree(work_path) @classmethod def tearDownClass(cls): @@ -73,6 +76,15 @@ def test_main_bids(self): main(arg_list) self.assertFalse(fp.getvalue()) + def test_main_bids_alt_path(self): + work_path = os.path.realpath(os.path.join(self.extract_path, 'temp')) + arg_list = [self.data_root, self.summary_model_path, '-x', 'derivatives', 'stimuli', '-r', '8.1.0', + '-j', self.sidecar_path, '-w', work_path] + + with patch('sys.stdout', new=io.StringIO()) as fp: + main(arg_list) + self.assertFalse(fp.getvalue()) + def test_main_bids_verbose_bad_task(self): arg_list = [self.data_root, self.model_path, '-x', 'derivatives', 'stimuli', '-b', '-t', 'junk', '-v'] with patch('sys.stdout', new=io.StringIO()) as fp: diff --git a/tests/tools/remodeling/cli/test_run_remodel_backup.py b/tests/tools/remodeling/cli/test_run_remodel_backup.py index a5a32e7ed..65f2391b6 100644 --- a/tests/tools/remodeling/cli/test_run_remodel_backup.py +++ b/tests/tools/remodeling/cli/test_run_remodel_backup.py @@ -47,7 +47,7 @@ def test_main_events(self): '-f', 'events', '-e', '.tsv'] main(arg_list) self.assertTrue(os.path.exists(self.derv_path), 'backup directory exists before creation') - json_path = os.path.realpath(os.path.join(self.derv_path, BackupManager.DEFAULT_BACKUP_NAME, + json_path = os.path.realpath(os.path.join(self.derv_path, 'backups', BackupManager.DEFAULT_BACKUP_NAME, BackupManager.BACKUP_DICTIONARY)) with open(json_path, 'r') as fp: key_dict = json.load(fp) @@ -62,12 +62,13 @@ def test_main_all(self): self.assertFalse(os.path.exists(self.derv_path), 'backup directory does not exist before creation') main(arg_list) self.assertTrue(os.path.exists(self.derv_path), 'backup directory exists before creation') - json_path = os.path.realpath(os.path.join(self.derv_path, BackupManager.DEFAULT_BACKUP_NAME, + json_path = os.path.realpath(os.path.join(self.derv_path, 'backups', BackupManager.DEFAULT_BACKUP_NAME, BackupManager.BACKUP_DICTIONARY)) with open(json_path, 'r') as fp: key_dict = json.load(fp) self.assertEqual(len(key_dict), 4, "The backup of events.tsv does not include top_level.tsv") - back_path = os.path.realpath(os.path.join(self.derv_path, BackupManager.DEFAULT_BACKUP_NAME, 'backup_root')) + back_path = os.path.realpath(os.path.join(self.derv_path, 'backups', + BackupManager.DEFAULT_BACKUP_NAME, 'backup_root')) file_list1 = get_file_list(back_path) self.assertIsInstance(file_list1, list) self.assertEqual(len(file_list1), 4) @@ -81,7 +82,7 @@ def test_main_task(self): '-f', 'events', '-e', '.tsv', '-t', 'FacePerception'] main(arg_list) self.assertTrue(os.path.exists(der_path)) - back_path = os.path.realpath(os.path.join(self.data_root, BackupManager.RELATIVE_BACKUP_LOCATION, + back_path = os.path.realpath(os.path.join(self.data_root, BackupManager.RELATIVE_BACKUP_LOCATION, 'backups', BackupManager.DEFAULT_BACKUP_NAME, 'backup_root')) self.assertTrue(os.path.exists(back_path)) backed_files = get_file_list(back_path) @@ -96,12 +97,29 @@ def test_main_bad_task(self): '-f', 'events', '-e', '.tsv', '-t', 'Baloney'] main(arg_list) self.assertTrue(os.path.exists(der_path)) - back_path = os.path.realpath(os.path.join(self.data_root, BackupManager.RELATIVE_BACKUP_LOCATION, + back_path = os.path.realpath(os.path.join(self.data_root, BackupManager.RELATIVE_BACKUP_LOCATION, 'backups', BackupManager.DEFAULT_BACKUP_NAME, 'backup_root')) self.assertTrue(os.path.exists(back_path)) backed_files = get_file_list(back_path) self.assertEqual(len(backed_files), 0) + def test_alt_loc(self): + alt_path = os.path.realpath(os.path.join(self.extract_path, 'temp')) + if os.path.exists(alt_path): + shutil.rmtree(alt_path) + self.assertFalse(os.path.exists(alt_path)) + arg_list = [self.data_root, '-n', BackupManager.DEFAULT_BACKUP_NAME, '-x', 'derivatives', '-w', alt_path, + '-f', 'events', '-e', '.tsv', ] + main(arg_list) + self.assertTrue(os.path.exists(alt_path)) + back_path = os.path.realpath(os.path.join(alt_path, 'backups', 'default_back', 'backup_root')) + self.assertTrue(os.path.exists(back_path)) + self.assertTrue(os.path.exists(back_path)) + backed_files = get_file_list(back_path) + self.assertEqual(len(backed_files), 6) + if os.path.exists(alt_path): + shutil.rmtree(alt_path) + def test_main_backup_exists(self): der_path = os.path.realpath(os.path.join(self.data_root, 'derivatives')) self.assertTrue(os.path.exists(der_path)) diff --git a/tests/tools/remodeling/cli/test_run_remodel_restore.py b/tests/tools/remodeling/cli/test_run_remodel_restore.py index e0a29dad2..c18dcbcfd 100644 --- a/tests/tools/remodeling/cli/test_run_remodel_restore.py +++ b/tests/tools/remodeling/cli/test_run_remodel_restore.py @@ -3,7 +3,9 @@ import unittest import zipfile from hed.errors import HedFileError +from hed.tools.remodeling.cli.run_remodel_backup import main as back_main from hed.tools.remodeling.cli.run_remodel_restore import main +from hed.tools.remodeling.backup_manager import BackupManager from hed.tools.util.io_util import get_file_list @@ -37,8 +39,7 @@ def test_main_restore(self): arg_list = [self.test_root_back1, '-n', 'back1'] main(arg_list) files3 = get_file_list(self.test_root_back1, exclude_dirs=['derivatives']) - overlap = set(files1).intersection(set(files3)) - self.assertEqual(len(overlap), len(files1), "run_restore restores all the files after") + self.assertEqual(len(files3), len(files1), "run_restore restores all the files after") def test_no_backup(self): # Test bad data directory @@ -47,6 +48,29 @@ def test_no_backup(self): main(arg_list=arg_list) self.assertEqual(context.exception.args[0], "BackupDoesNotExist") + def test_restore_alt_loc(self): + alt_path = os.path.realpath(os.path.join(self.extract_path, 'temp')) + if os.path.exists(alt_path): + shutil.rmtree(alt_path) + self.assertFalse(os.path.exists(alt_path)) + arg_list = [self.test_root_back1, '-n', 'back1', '-x', 'derivatives', '-w', alt_path, + '-f', 'events', '-e', '.tsv'] + back_main(arg_list) + files1 = get_file_list(self.test_root_back1, exclude_dirs=['derivatives']) + self.assertEqual(len(files1), 4, "run_restore starts with the right number of files.") + shutil.rmtree(os.path.realpath(os.path.join(self.test_root_back1, 'sub1'))) + shutil.rmtree(os.path.realpath(os.path.join(self.test_root_back1, 'sub2'))) + os.remove(os.path.realpath(os.path.join(self.test_root_back1, 'top_level.tsv'))) + files2 = get_file_list(self.test_root_back1, exclude_dirs=['derivatives']) + self.assertFalse(files2, "run_restore starts with the right number of files.") + arg_list = [self.test_root_back1, '-n', 'back1', '-w', alt_path,] + main(arg_list) + files3 = get_file_list(self.test_root_back1, exclude_dirs=['derivatives']) + self.assertEqual(len(files3)+1, len(files1), "run_restore restores all the files after") + + if os.path.exists(alt_path): + shutil.rmtree(alt_path) + if __name__ == '__main__': unittest.main() diff --git a/tests/tools/remodeling/operations/test_base_context.py b/tests/tools/remodeling/operations/test_base_summary.py similarity index 67% rename from tests/tools/remodeling/operations/test_base_context.py rename to tests/tools/remodeling/operations/test_base_summary.py index 68e8ddc0f..3dc2d10fc 100644 --- a/tests/tools/remodeling/operations/test_base_context.py +++ b/tests/tools/remodeling/operations/test_base_summary.py @@ -1,26 +1,46 @@ import os import shutil import unittest -from hed.tools.remodeling.operations.base_context import BaseContext +from hed.tools.remodeling.operations.base_summary import BaseSummary +from hed.tools.remodeling.operations.base_op import BaseOp -class TestContext(BaseContext): +class TestOp(BaseOp): + PARAMS = { + "operation": "test_summary_op", + "required_parameters": { + "summary_name": str, + "summary_filename": str + }, + "optional_parameters": {} + } - def __init__(self): - super().__init__("TestContext", "test", "test_context") + SUMMARY_TYPE = "test_sum" + + def __init__(self, parameters): + super().__init__(self.PARAMS, parameters) + self.summary_name = parameters['summary_name'] + self.summary_filename = parameters['summary_filename'] + + +class TestSummary(BaseSummary): + + def __init__(self, op): + + super().__init__(op) self.summary_dict["data1"] = "test data 1" self.summary_dict["data2"] = "test data 2" - def _get_details_dict(self, include_individual=True): - summary = {"name": self.context_name} + def get_details_dict(self, include_individual=True): + summary = {"name": self.op.summary_name} if include_individual: summary["more"] = "more stuff" return summary - def _merge_all(self): - return {"merged": self.context_name} + def merge_all_info(self): + return {"merged": self.op.summary_name} - def update_context(self, context_dict): + def update_summary(self, info_dict): pass @@ -29,19 +49,17 @@ class Test(unittest.TestCase): @classmethod def setUpClass(cls): summary_dir = os.path.realpath(os.path.join(os.path.dirname(os.path.realpath(__file__)), - '../../../data/remodel_tests/temp')) + '../../../data/remodel_tests/temp')) cls.summary_dir = summary_dir def test_constructor(self): - with self.assertRaises(TypeError) as context: - BaseContext('apple', 'banana', 'pear') - self.assertTrue(context.exception.args[0]) - - test = TestContext() - self.assertIsInstance(test, TestContext) + op2 = TestOp({"summary_name": "test", "summary_filename": "test_context"}) + test = TestSummary(op2) + self.assertIsInstance(test, TestSummary) def test_get_text_summary(self): - test = TestContext() + op = TestOp({"summary_name": "test", "summary_filename": "test_context"}) + test = TestSummary(op) out1 = test.get_text_summary(individual_summaries="none") self.assertIsInstance(out1, dict) self.assertTrue(out1["Dataset"]) @@ -62,11 +80,12 @@ def test_save_no_ind(self): if os.path.isdir(self.summary_dir): shutil.rmtree(self.summary_dir) os.makedirs(self.summary_dir) - test1 = TestContext() + op = TestOp({"summary_name": "test", "summary_filename": "test_context"}) + test1 = TestSummary(op) file_list1 = os.listdir(self.summary_dir) self.assertFalse(file_list1) test1.save(self.summary_dir, individual_summaries="none") - dir_full = os.path.realpath(os.path.join(self.summary_dir, test1.context_name + '/')) + dir_full = os.path.realpath(os.path.join(self.summary_dir, test1.op.summary_name + '/')) file_list2 = os.listdir(dir_full) self.assertEqual(len(file_list2), 1) basename = os.path.basename(file_list2[0]) @@ -78,32 +97,34 @@ def test_save_consolidated(self): if os.path.isdir(self.summary_dir): shutil.rmtree(self.summary_dir) os.makedirs(self.summary_dir) - test1 = TestContext() + op = TestOp({"summary_name": "test", "summary_filename": "test_context"}) + test1 = TestSummary(op) file_list1 = os.listdir(self.summary_dir) self.assertFalse(file_list1) - dir_ind = os.path.realpath(os.path.join(self.summary_dir, test1.context_name + '/', + dir_ind = os.path.realpath(os.path.join(self.summary_dir, test1.op.summary_name + '/', "individual_summaries/")) self.assertFalse(os.path.isdir(dir_ind)) test1.save(self.summary_dir, file_formats=['.json', '.tsv'], individual_summaries="consolidated") - dir_full = os.path.realpath(os.path.join(self.summary_dir, test1.context_name + '/')) + dir_full = os.path.realpath(os.path.join(self.summary_dir, test1.op.summary_name + '/')) file_list2 = os.listdir(dir_full) self.assertEqual(len(file_list2), 1) basename = os.path.basename(file_list2[0]) self.assertTrue(basename.startswith('test_context')) self.assertEqual(os.path.splitext(basename)[1], '.json') shutil.rmtree(self.summary_dir) - + def test_save_separate(self): if os.path.isdir(self.summary_dir): shutil.rmtree(self.summary_dir) os.makedirs(self.summary_dir) - test1 = TestContext() + op = TestOp({"summary_name": "test", "summary_filename": "test_context"}) + test1 = TestSummary(op) file_list1 = os.listdir(self.summary_dir) self.assertFalse(file_list1) test1.save(self.summary_dir, file_formats=['.json', '.tsv'], individual_summaries="separate") - dir_ind = os.path.realpath(os.path.join(self.summary_dir, test1.context_name + '/', + dir_ind = os.path.realpath(os.path.join(self.summary_dir, test1.op.summary_name + '/', "individual_summaries/")) - dir_full = os.path.realpath(os.path.join(self.summary_dir, test1.context_name + '/')) + dir_full = os.path.realpath(os.path.join(self.summary_dir, test1.op.summary_name + '/')) self.assertTrue(os.path.isdir(dir_ind)) file_list4 = os.listdir(dir_full) self.assertEqual(len(file_list4), 2) diff --git a/tests/tools/remodeling/operations/test_summarize_column_names_op.py b/tests/tools/remodeling/operations/test_summarize_column_names_op.py index 4593a8aed..ddd5a8658 100644 --- a/tests/tools/remodeling/operations/test_summarize_column_names_op.py +++ b/tests/tools/remodeling/operations/test_summarize_column_names_op.py @@ -2,9 +2,9 @@ import os import pandas as pd import unittest -from hed.tools.analysis.column_name_summary import ColumnNameSummary +from hed.tools.analysis.tabular_column_name_summary import TabularColumnNameSummary from hed.tools.remodeling.dispatcher import Dispatcher -from hed.tools.remodeling.operations.summarize_column_names_op import ColumnNameSummaryContext, SummarizeColumnNamesOp +from hed.tools.remodeling.operations.summarize_column_names_op import ColumnNameSummary, SummarizeColumnNamesOp class Test(unittest.TestCase): @@ -68,7 +68,7 @@ def test_summary_op(self): self.assertEqual(len(df), old_len) df1 = df.drop(labels='onset', axis=1) sum_op.do_op(dispatch, df1, 'run-03') - this_context = dispatch.context_dict[sum_op.summary_name] + this_context = dispatch.summary_dicts[sum_op.summary_name] for key, item in this_context.summary_dict.items(): summary = item.get_summary() self.assertIsInstance(summary, dict) @@ -76,8 +76,8 @@ def test_summary_op(self): self.assertIsInstance(json_value, str) new_summary = json.loads(json_value) self.assertIsInstance(new_summary, dict) - merged1 = this_context._merge_all() - self.assertIsInstance(merged1, ColumnNameSummary) + merged1 = this_context.merge_all_info() + self.assertIsInstance(merged1, TabularColumnNameSummary) self.assertEqual(len(merged1.file_dict), 3) self.assertEqual(len(merged1.unique_headers), 2) with self.assertRaises(ValueError) as except_context: @@ -90,10 +90,10 @@ def test_summary(self): op = SummarizeColumnNamesOp(parms) df, df_new = self.get_dfs(op, 'run-01', dispatch) self.assertEqual(len(df), len(df_new)) - context_dict = dispatch.context_dict + context_dict = dispatch.summary_dicts self.assertIsInstance(context_dict, dict) self.get_dfs(op, 'run-02', dispatch) - context = dispatch.context_dict['columns'] + context = dispatch.summary_dicts['columns'] summary = context.get_summary() dataset_sum = summary['Dataset'] json_str = json.dumps(dataset_sum) @@ -110,8 +110,8 @@ def test_text_summary(self): op = SummarizeColumnNamesOp(parms) self.get_dfs(op, 'run-01', dispatch) self.get_dfs(op, 'run-02', dispatch) - context = dispatch.context_dict['columns'] - self.assertIsInstance(context, ColumnNameSummaryContext) + context = dispatch.summary_dicts['columns'] + self.assertIsInstance(context, ColumnNameSummary) text_summary1 = context.get_text_summary() self.assertIsInstance(text_summary1, dict) @@ -126,7 +126,7 @@ def test_multiple(self): op.do_op(dispatch, dispatch.prep_data(df1), 'run-03') df2 = pd.DataFrame(self.data1, columns=self.sample_columns2) op.do_op(dispatch, dispatch.prep_data(df2), 'run-05') - context = dispatch.context_dict['columns'] + context = dispatch.summary_dicts['columns'] summary = context.get_summary() text_summary1 = context.get_text_summary() self.assertEqual(len(summary), 2) diff --git a/tests/tools/remodeling/operations/test_summarize_column_values_op.py b/tests/tools/remodeling/operations/test_summarize_column_values_op.py index b6b305a4c..2d69655c0 100644 --- a/tests/tools/remodeling/operations/test_summarize_column_values_op.py +++ b/tests/tools/remodeling/operations/test_summarize_column_values_op.py @@ -4,7 +4,7 @@ import unittest from hed.tools.remodeling.dispatcher import Dispatcher from hed.tools.remodeling.operations.summarize_column_values_op import \ - ColumnValueSummaryContext, SummarizeColumnValuesOp + ColumnValueSummary, SummarizeColumnValuesOp from hed.tools.util.io_util import get_file_list @@ -50,7 +50,7 @@ def test_do_ops(self): sum_op = SummarizeColumnValuesOp(parms) dispatch = Dispatcher([], data_root=None, backup_name=None, hed_versions='8.1.0') self.get_dfs(sum_op, 'name1', dispatch) - context1 = dispatch.context_dict.get(parms['summary_name'], None) + context1 = dispatch.summary_dicts.get(parms['summary_name'], None) summary1 = context1.summary_dict['name1'] cat_len = len(summary1.categorical_info) self.assertEqual(cat_len, len(self.sample_columns) - 2, @@ -58,7 +58,7 @@ def test_do_ops(self): self.get_dfs(sum_op, 'name2', dispatch) self.assertEqual(cat_len, len(self.sample_columns) - 2, "do_ops updating does not change number of categorical columns.") - context = dispatch.context_dict['test summary'] + context = dispatch.summary_dicts['test summary'] self.assertEqual(len(context.summary_dict), 2) def test_get_summary(self): @@ -67,9 +67,9 @@ def test_get_summary(self): dispatch = Dispatcher([], data_root=None, backup_name=None, hed_versions='8.1.0') self.get_dfs(sum_op, 'name1', dispatch) - cont = dispatch.context_dict + cont = dispatch.summary_dicts context1 = cont.get("test summary", None) - self.assertIsInstance(context1, ColumnValueSummaryContext, "get_summary testing ColumnValueSummary") + self.assertIsInstance(context1, ColumnValueSummary, "get_summary testing ColumnValueSummary") # summary1 = context1.get_summary() # self.assertIsInstance(summary1, dict, "get_summary returns a dictionary") # self.assertIsInstance(summary1["Dataset"], dict) @@ -81,7 +81,7 @@ def test_get_summary(self): self.assertIsInstance(text_summary["Dataset"], str) self.get_dfs(sum_op, 'name2', dispatch) self.get_dfs(sum_op, 'name3', dispatch) - context2 = dispatch.context_dict.get(parms['summary_name'], None) + context2 = dispatch.summary_dicts.get(parms['summary_name'], None) summary2 = context2.get_summary() self.assertIsInstance(summary2, dict) text_summary2 = context2.get_text_summary(individual_summaries="consolidated") @@ -101,7 +101,7 @@ def test_summary_op(self): sum_op = parsed_commands[1] df = sum_op.do_op(dispatch, dispatch.prep_data(df), os.path.basename(events)) self.assertEqual(len(df), old_len) - context_dict = dispatch.context_dict + context_dict = dispatch.summary_dicts for key, item in context_dict.items(): text_value = item.get_text_summary() self.assertTrue(text_value) diff --git a/tests/tools/remodeling/operations/test_summarize_definitions_op.py b/tests/tools/remodeling/operations/test_summarize_definitions_op.py index b5100a652..c01e949be 100644 --- a/tests/tools/remodeling/operations/test_summarize_definitions_op.py +++ b/tests/tools/remodeling/operations/test_summarize_definitions_op.py @@ -2,9 +2,8 @@ import os import unittest import pandas as pd -from hed.models.df_util import get_assembled from hed.tools.remodeling.dispatcher import Dispatcher -from hed.tools.remodeling.operations.summarize_definitions_op import SummarizeDefinitionsOp, DefinitionSummaryContext +from hed.tools.remodeling.operations.summarize_definitions_op import SummarizeDefinitionsOp, DefinitionSummary class Test(unittest.TestCase): @@ -27,8 +26,6 @@ def tearDownClass(cls): def test_constructor(self): parms = json.loads(self.json_parms) - sum_op1 = SummarizeDefinitionsOp(parms) - self.assertIsInstance(sum_op1, SummarizeDefinitionsOp, "constructor creates an object of the correct type") parms["expand_context"] = "" with self.assertRaises(KeyError) as context: SummarizeDefinitionsOp(parms) @@ -43,18 +40,45 @@ def test_do_op(self): dispatch = Dispatcher([], data_root=None, backup_name=None, hed_versions=['8.1.0']) parms = json.loads(self.json_parms) sum_op = SummarizeDefinitionsOp(parms) - self.assertIsInstance(sum_op, SummarizeDefinitionsOp, "constructor creates an object of the correct type") df = pd.read_csv(self.data_path, delimiter='\t', header=0, keep_default_na=False, na_values=",null") df_new = sum_op.do_op(dispatch, dispatch.prep_data(df), 'subj2_run1', sidecar=self.json_path) - self.assertEqual(200, len(df_new), "summarize_hed_type_op dataframe length is correct") - self.assertEqual(10, len(df_new.columns), "summarize_hed_type_op has correct number of columns") - self.assertIn(sum_op.summary_name, dispatch.context_dict) - self.assertIsInstance(dispatch.context_dict[sum_op.summary_name], DefinitionSummaryContext) - # x = dispatch.context_dict[sum_op.summary_name].summary_dict['subj2_run1'] - # self.assertEqual(len(dispatch.context_dict[sum_op.summary_name].summary_dict['subj2_run1'].tag_dict), 47) - # df_new = sum_op.do_op(dispatch, dispatch.prep_data(df), 'subj2_run2', sidecar=self.json_path) - # self.assertEqual(len(dispatch.context_dict[sum_op.summary_name].summary_dict['subj2_run2'].tag_dict), 47) + self.assertEqual(200, len(df_new), " dataframe length is correct") + self.assertEqual(10, len(df_new.columns), " has correct number of columns") + self.assertIn(sum_op.summary_name, dispatch.summary_dicts) + self.assertIsInstance(dispatch.summary_dicts[sum_op.summary_name], DefinitionSummary) + def test_summary(self): + dispatch = Dispatcher([], data_root=None, backup_name=None, hed_versions=['8.1.0']) + parms = json.loads(self.json_parms) + sum_op = SummarizeDefinitionsOp(parms) + df = pd.read_csv(self.data_path, delimiter='\t', header=0, keep_default_na=False, na_values=",null") + df_new = sum_op.do_op(dispatch, dispatch.prep_data(df), 'subj2_run1', sidecar=self.json_path) + self.assertEqual(200, len(df_new), " dataframe length is correct") + self.assertEqual(10, len(df_new.columns), " has correct number of columns") + self.assertIn(sum_op.summary_name, dispatch.summary_dicts) + self.assertIsInstance(dispatch.summary_dicts[sum_op.summary_name], DefinitionSummary) + # print(str(dispatch.summary_dicts[sum_op.summary_name].get_text_summary()['Dataset'])) + + def test_summary_errors(self): + dispatch = Dispatcher([], data_root=None, backup_name=None, hed_versions=['8.1.0']) + parms = json.loads(self.json_parms) + sum_op = SummarizeDefinitionsOp(parms) + df = pd.DataFrame({"HED": [ + "(Def-expand/A1/1, (Action/1, Acceleration/5, Item-count/2))", + "(Def-expand/B2/3, (Action/3, Collection/animals, Acceleration/3))", + "(Def-expand/C3/5, (Action/5, Acceleration/5, Item-count/5))", + "(Def-expand/D4/7, (Action/7, Acceleration/7, Item-count/8))", + "(Def-expand/D5/7, (Action/7, Acceleration/7, Item-count/8, Event))", + "(Def-expand/A1/2, (Action/2, Age/5, Item-count/2))", + "(Def-expand/A1/3, (Action/3, Age/4, Item-count/3))", + + # This could be identified, but fails due to the above raising errors + "(Def-expand/A1/4, (Action/4, Age/5, Item-count/2))", + ]}) + df_new = sum_op.do_op(dispatch, dispatch.prep_data(df), 'subj2_run1', sidecar=self.json_path) + self.assertIn(sum_op.summary_name, dispatch.summary_dicts) + self.assertIsInstance(dispatch.summary_dicts[sum_op.summary_name], DefinitionSummary) + #print(str(dispatch.summary_dicts[sum_op.summary_name].get_text_summary()['Dataset'])) if __name__ == '__main__': unittest.main() diff --git a/tests/tools/remodeling/operations/test_summarize_hed_tags_op.py b/tests/tools/remodeling/operations/test_summarize_hed_tags_op.py index d5a298202..f6f88fe5e 100644 --- a/tests/tools/remodeling/operations/test_summarize_hed_tags_op.py +++ b/tests/tools/remodeling/operations/test_summarize_hed_tags_op.py @@ -4,7 +4,7 @@ import pandas as pd from hed.models.df_util import get_assembled from hed.tools.remodeling.dispatcher import Dispatcher -from hed.tools.remodeling.operations.summarize_hed_tags_op import SummarizeHedTagsOp, HedTagSummaryContext +from hed.tools.remodeling.operations.summarize_hed_tags_op import SummarizeHedTagsOp, HedTagSummary class Test(unittest.TestCase): @@ -58,12 +58,12 @@ def test_do_op(self): df_new = sum_op.do_op(dispatch, dispatch.prep_data(df), 'subj2_run1', sidecar=self.json_path) self.assertEqual(200, len(df_new), "summarize_hed_type_op dataframe length is correct") self.assertEqual(10, len(df_new.columns), "summarize_hed_type_op has correct number of columns") - self.assertIn(sum_op.summary_name, dispatch.context_dict) - self.assertIsInstance(dispatch.context_dict[sum_op.summary_name], HedTagSummaryContext) - x = dispatch.context_dict[sum_op.summary_name].summary_dict['subj2_run1'] - self.assertEqual(len(dispatch.context_dict[sum_op.summary_name].summary_dict['subj2_run1'].tag_dict), 47) + self.assertIn(sum_op.summary_name, dispatch.summary_dicts) + self.assertIsInstance(dispatch.summary_dicts[sum_op.summary_name], HedTagSummary) + x = dispatch.summary_dicts[sum_op.summary_name].summary_dict['subj2_run1'] + self.assertEqual(len(dispatch.summary_dicts[sum_op.summary_name].summary_dict['subj2_run1'].tag_dict), 47) df_new = sum_op.do_op(dispatch, dispatch.prep_data(df), 'subj2_run2', sidecar=self.json_path) - self.assertEqual(len(dispatch.context_dict[sum_op.summary_name].summary_dict['subj2_run2'].tag_dict), 47) + self.assertEqual(len(dispatch.summary_dicts[sum_op.summary_name].summary_dict['subj2_run2'].tag_dict), 47) def test_quick3(self): from hed.models import TabularInput, Sidecar @@ -125,9 +125,9 @@ def test_get_summary_details(self): self.assertIsInstance(sum_op, SummarizeHedTagsOp, "constructor creates an object of the correct type") df = pd.read_csv(self.data_path, delimiter='\t', header=0, keep_default_na=False, na_values=",null") sum_op.do_op(dispatch, dispatch.prep_data(df), 'subj2_run1', sidecar=self.json_path) - self.assertIn(sum_op.summary_name, dispatch.context_dict) - sum_context = dispatch.context_dict[sum_op.summary_name] - self.assertIsInstance(sum_context, HedTagSummaryContext) + self.assertIn(sum_op.summary_name, dispatch.summary_dicts) + sum_context = dispatch.summary_dicts[sum_op.summary_name] + self.assertIsInstance(sum_context, HedTagSummary) sum_obj1 = sum_context.get_summary_details() self.assertIsInstance(sum_obj1, dict) json_str1 = json.dumps(sum_obj1, indent=4) @@ -135,7 +135,7 @@ def test_get_summary_details(self): json_obj1 = json.loads(json_str1) self.assertIsInstance(json_obj1, dict) sum_op.do_op(dispatch, dispatch.prep_data(df), 'subj2_run2', sidecar=self.json_path) - sum_context2 = dispatch.context_dict[sum_op.summary_name] + sum_context2 = dispatch.summary_dicts[sum_op.summary_name] sum_obj2 = sum_context2.get_summary_details() json_str2 = json.dumps(sum_obj2, indent=4) self.assertIsInstance(json_str2, str) @@ -150,7 +150,7 @@ def test_get_summary_text_summary(self): df = dispatch.prep_data(df) sum_op.do_op(dispatch, df, 'subj2_run1', sidecar=self.json_path) sum_op.do_op(dispatch, df, 'subj2_run2', sidecar=self.json_path) - sum_context1 = dispatch.context_dict[sum_op.summary_name] + sum_context1 = dispatch.summary_dicts[sum_op.summary_name] text_sum_none = sum_context1.get_text_summary(individual_summaries="none") self.assertIn('Dataset', text_sum_none) self.assertIsInstance(text_sum_none['Dataset'], str) @@ -203,7 +203,7 @@ def test_sample_example(self): df = dispatch.prep_data(df) for operation in dispatch.parsed_ops: df = operation.do_op(dispatch, df, "sample", sidecar=sidecar_path) - context_dict = dispatch.context_dict.get("summarize_hed_tags") + context_dict = dispatch.summary_dicts.get("summarize_hed_tags") text_summary = context_dict.get_text_summary() self.assertIsInstance(text_summary["Dataset"], str) diff --git a/tests/tools/remodeling/operations/test_summarize_hed_type_op.py b/tests/tools/remodeling/operations/test_summarize_hed_type_op.py index c7b18ad90..faa3b79bd 100644 --- a/tests/tools/remodeling/operations/test_summarize_hed_type_op.py +++ b/tests/tools/remodeling/operations/test_summarize_hed_type_op.py @@ -5,7 +5,7 @@ from hed.models import Sidecar from hed.schema import load_schema_version from hed.tools.remodeling.dispatcher import Dispatcher -from hed.tools.remodeling.operations.summarize_hed_type_op import SummarizeHedTypeOp, HedTypeSummaryContext +from hed.tools.remodeling.operations.summarize_hed_type_op import SummarizeHedTypeOp, HedTypeSummary class Test(unittest.TestCase): @@ -66,14 +66,14 @@ def test_summary(self): parsed_commands, errors = Dispatcher.parse_operations(parms) sum_op = parsed_commands[2] sum_op.do_op(dispatch, dispatch.prep_data(df), 'run-01', sidecar=self.sidecar_path) - context1 = dispatch.context_dict['AOMIC_condition_variables'] + context1 = dispatch.summary_dicts['AOMIC_condition_variables'] summary1 = context1.get_summary() self.assertIn('run-01', summary1['Individual files']) self.assertEqual(len(summary1['Individual files']), 1) summary1a = context1.get_summary() self.assertIsInstance(summary1a['Dataset'], dict) sum_op.do_op(dispatch, dispatch.prep_data(df), 'run-02', sidecar=self.sidecar_path) - context2 = dispatch.context_dict['AOMIC_condition_variables'] + context2 = dispatch.summary_dicts['AOMIC_condition_variables'] summary2 = context2.get_summary(individual_summaries="separate") self.assertEqual(summary2['Dataset']['Overall summary']['files'][0], 'run-01') self.assertEqual(len(summary2['Dataset']['Overall summary']['files']), 2) @@ -88,7 +88,7 @@ def test_text_summary_with_levels(self): parsed_commands, errors = Dispatcher.parse_operations(parms) sum_op = parsed_commands[2] sum_op.do_op(dispatch, dispatch.prep_data(df), 'run-01', sidecar=self.sidecar_path_wh) - context1 = dispatch.context_dict['AOMIC_condition_variables'] + context1 = dispatch.summary_dicts['AOMIC_condition_variables'] text_summary1 = context1.get_text_summary() self.assertIsInstance(text_summary1, dict) @@ -105,14 +105,14 @@ def test_text_summary(self): sum_op = parsed_commands[2] df = sum_op.do_op(dispatch, dispatch.prep_data(df), os.path.basename(self.events), sidecar=sidecar) self.assertEqual(len(df), old_len) - context_dict = dispatch.context_dict + context_dict = dispatch.summary_dicts self.assertIsInstance(context_dict, dict) - context1 = dispatch.context_dict['AOMIC_condition_variables'] - self.assertIsInstance(context1, HedTypeSummaryContext) + context1 = dispatch.summary_dicts['AOMIC_condition_variables'] + self.assertIsInstance(context1, HedTypeSummary) text_summary1 = context1.get_text_summary() self.assertIsInstance(text_summary1, dict) sum_op.do_op(dispatch, dispatch.prep_data(df), 'new_events', sidecar=sidecar) - context2 = dispatch.context_dict['AOMIC_condition_variables'] + context2 = dispatch.summary_dicts['AOMIC_condition_variables'] text_summary2 = context2.get_text_summary() self.assertIsInstance(text_summary2, dict) self.assertEqual(len(text_summary1["Individual files"]), 1) diff --git a/tests/tools/remodeling/operations/test_summarize_hed_validation_op.py b/tests/tools/remodeling/operations/test_summarize_hed_validation_op.py index 0136c205e..7b76e7c1c 100644 --- a/tests/tools/remodeling/operations/test_summarize_hed_validation_op.py +++ b/tests/tools/remodeling/operations/test_summarize_hed_validation_op.py @@ -4,7 +4,7 @@ import pandas as pd from hed.tools.remodeling.dispatcher import Dispatcher from hed.tools.remodeling.operations.summarize_hed_validation_op import SummarizeHedValidationOp, \ - HedValidationSummaryContext + HedValidationSummary class Test(unittest.TestCase): @@ -54,16 +54,16 @@ def test_do_op(self): self.assertIsInstance(sum_op, SummarizeHedValidationOp, "constructor creates an object of the correct type") df = pd.read_csv(self.data_path, delimiter='\t', header=0, keep_default_na=False, na_values=",null") sum_op.do_op(dispatch, dispatch.prep_data(df), 'subj2_run1', sidecar=self.json_path) - self.assertIn(sum_op.summary_name, dispatch.context_dict) - self.assertIsInstance(dispatch.context_dict[sum_op.summary_name], HedValidationSummaryContext) - sub1 = dispatch.context_dict[sum_op.summary_name].summary_dict['subj2_run1'] + self.assertIn(sum_op.summary_name, dispatch.summary_dicts) + self.assertIsInstance(dispatch.summary_dicts[sum_op.summary_name], HedValidationSummary) + sub1 = dispatch.summary_dicts[sum_op.summary_name].summary_dict['subj2_run1'] self.assertEqual(len(sub1['event_issues']), 1) sum_op.do_op(dispatch, dispatch.prep_data(df), 'subj2_run2', sidecar=self.json_path) self.assertEqual(len(sub1['event_issues']), 1) sum_op.do_op(dispatch, dispatch.prep_data(df), 'subj2_run3', sidecar=self.bad_json_path) - self.assertEqual(len(dispatch.context_dict[sum_op.summary_name].summary_dict), 3) - run3 = dispatch.context_dict[sum_op.summary_name].summary_dict['subj2_run3'] - self.assertEqual(run3["total_sidecar_issues"], 2) + self.assertEqual(len(dispatch.summary_dicts[sum_op.summary_name].summary_dict), 3) + run3 = dispatch.summary_dicts[sum_op.summary_name].summary_dict['subj2_run3'] + self.assertEqual(run3["total_sidecar_issues"], 4) def test_get_summary_details(self): dispatch = Dispatcher([], data_root=None, backup_name=None, hed_versions=['8.1.0']) @@ -71,7 +71,7 @@ def test_get_summary_details(self): sum_op = SummarizeHedValidationOp(parms) df = pd.read_csv(self.data_path, delimiter='\t', header=0, keep_default_na=False, na_values=",null") sum_op.do_op(dispatch, dispatch.prep_data(df), 'subj2_run1', sidecar=self.json_path) - sum_context = dispatch.context_dict[sum_op.summary_name] + sum_context = dispatch.summary_dicts[sum_op.summary_name] sum_obj1 = sum_context.get_summary_details() self.assertIsInstance(sum_obj1, dict) json_str1 = json.dumps(sum_obj1, indent=4) @@ -79,7 +79,7 @@ def test_get_summary_details(self): json_obj1 = json.loads(json_str1) self.assertIsInstance(json_obj1, dict) sum_op.do_op(dispatch, dispatch.prep_data(df), 'subj2_run2', sidecar=self.json_path) - sum_context2 = dispatch.context_dict[sum_op.summary_name] + sum_context2 = dispatch.summary_dicts[sum_op.summary_name] sum_obj2 = sum_context2.get_summary_details() json_str2 = json.dumps(sum_obj2, indent=4) self.assertIsInstance(json_str2, str) @@ -97,7 +97,7 @@ def test_get_summary_text_summary(self): df = dispatch.prep_data(df) sum_op.do_op(dispatch, df, 'subj2_run1', sidecar=self.bad_json_path) - sum_context1 = dispatch.context_dict[sum_op.summary_name] + sum_context1 = dispatch.summary_dicts[sum_op.summary_name] text_sum1 = sum_context1.get_text_summary(individual_summaries="separate") sum_op.do_op(dispatch, df, 'subj2_run2', sidecar=self.json_path) sum_op.do_op(dispatch, df, 'subj2_run3', sidecar=self.bad_json_path) @@ -112,7 +112,7 @@ def test_with_sample_data(self): parms = json.loads(self.json_parms) sum_op = SummarizeHedValidationOp(parms) sum_op.do_op(dispatch, df, 'sub-0013_task-stopsignal_acq-seq_events.tsv', sidecar=self.sample_sidecar_path) - sum_context1 = dispatch.context_dict[sum_op.summary_name] + sum_context1 = dispatch.summary_dicts[sum_op.summary_name] if __name__ == '__main__': diff --git a/tests/tools/remodeling/operations/test_summarize_sidecar_from_events_op.py b/tests/tools/remodeling/operations/test_summarize_sidecar_from_events_op.py index cd02b4962..7f4fc6cdb 100644 --- a/tests/tools/remodeling/operations/test_summarize_sidecar_from_events_op.py +++ b/tests/tools/remodeling/operations/test_summarize_sidecar_from_events_op.py @@ -2,7 +2,7 @@ import pandas as pd import unittest from hed.tools.remodeling.dispatcher import Dispatcher -from hed.tools.remodeling.operations.summarize_sidecar_from_events_op import EventsToSidecarSummaryContext, \ +from hed.tools.remodeling.operations.summarize_sidecar_from_events_op import EventsToSidecarSummary, \ SummarizeSidecarFromEventsOp @@ -42,7 +42,7 @@ def test_do_ops(self): df1 = pd.DataFrame(self.sample_data, columns=self.sample_columns) df1a = pd.DataFrame(self.sample_data, columns=self.sample_columns) sum_op.do_op(dispatch, dispatch.prep_data(df1), 'name1') - context1 = dispatch.context_dict.get(self.base_parameters['summary_name'], None) + context1 = dispatch.summary_dicts.get(self.base_parameters['summary_name'], None) summary = context1.summary_dict["name1"] cat_len = len(summary.categorical_info) cat_base = len(self.sample_columns) - len(self.base_parameters["skip_columns"]) - \ @@ -57,8 +57,8 @@ def test_get_summary(self): dispatch = Dispatcher([], data_root=None, backup_name=None, hed_versions=['8.1.0']) df1 = pd.DataFrame(self.sample_data, columns=self.sample_columns) sum_op.do_op(dispatch, dispatch.prep_data(df1), 'name1') - context1 = dispatch.context_dict.get(self.base_parameters['summary_name'], None) - self.assertIsInstance(context1, EventsToSidecarSummaryContext, "get_summary testing EventsToSidecarSummary") + context1 = dispatch.summary_dicts.get(self.base_parameters['summary_name'], None) + self.assertIsInstance(context1, EventsToSidecarSummary, "get_summary testing EventsToSidecarSummary") summary1 = context1.get_summary() self.assertIsInstance(summary1, dict, "get_summary returns a dictionary by default") self.assertIsInstance(summary1["Dataset"], dict) @@ -76,8 +76,8 @@ def test_get_summary(self): self.assertIsInstance(summary_text5, dict) self.assertGreater(len(summary_text4['Dataset']), len(summary_text5['Dataset'])) sum_op.do_op(dispatch, dispatch.prep_data(df1), 'name2') - context2 = dispatch.context_dict.get(self.base_parameters['summary_name'], None) - self.assertIsInstance(context1, EventsToSidecarSummaryContext, "get_summary testing EventsToSidecarSummary") + context2 = dispatch.summary_dicts.get(self.base_parameters['summary_name'], None) + self.assertIsInstance(context1, EventsToSidecarSummary, "get_summary testing EventsToSidecarSummary") summary_text6 = context2.get_text_summary(individual_summaries="separate") self.assertIsInstance(summary_text6, dict) diff --git a/tests/tools/remodeling/test_backup_manager.py b/tests/tools/remodeling/test_backup_manager.py index 7b885d8a1..53c297cf2 100644 --- a/tests/tools/remodeling/test_backup_manager.py +++ b/tests/tools/remodeling/test_backup_manager.py @@ -32,7 +32,7 @@ def setUpClass(cls): test_root_bad = os.path.realpath(os.path.join(os.path.dirname(__file__), '../../data/remodel_tests/test_root_bad')) cls.test_root_bad = test_root_bad - cls.test_root_bad_backups = os.path.join(test_root_bad, BackupManager.RELATIVE_BACKUP_LOCATION) + cls.test_root_bad_backups = os.path.join(test_root_bad, BackupManager.RELATIVE_BACKUP_LOCATION, 'backups') cls.test_paths_bad = [os.path.join(test_root_bad, file) for file in file_list] cls.test_zip_bad = os.path.realpath(os.path.join(os.path.dirname(__file__), '../../data/remodel_tests/test_root_bad.zip')) @@ -59,6 +59,21 @@ def test_constructor(self): self.assertIsInstance(back1_man, BackupManager, "constructor creates a BackupManager if no backups") self.assertTrue(back1_man.backups_dict) + def test_constructor_alternative_location(self): + alt_path = os.path.realpath(os.path.join(self.extract_path, 'temp_backs')) + back1_man = BackupManager(self.test_root_back1, backups_root=alt_path) + self.assertIsInstance(back1_man, BackupManager, "constructor creates a BackupManager if no backups") + self.assertFalse(back1_man.backups_dict) + file_list = get_file_list(self.test_root_back1, name_suffix='events', exclude_dirs=['derivatives'], + extensions=['.tsv']) + self.assertEqual(len(file_list), 3) + back1_man.create_backup(file_list, backup_name='my_back') + self.assertTrue(back1_man.backups_dict) + backup = back1_man.backups_dict['my_back'] + self.assertEqual(len(backup), len(file_list)) + if os.path.exists(alt_path): + shutil.rmtree(alt_path) + def test_bad_data_root(self): with self.assertRaises(HedFileError) as context: BackupManager('/baloney/Junk') @@ -71,7 +86,7 @@ def test_constructor_missing_backup(self): shutil.rmtree(remove_dir) with self.assertRaises(HedFileError) as context: BackupManager(self.test_root_bad) - self.assertEqual(context.exception.error_type, "MissingBackupFile") + self.assertEqual(context.exception.code, "MissingBackupFile") def test_constructor_missing_json(self): remove_list = ['back1_extra', 'back3_miss_back', 'back4_miss_file'] @@ -80,7 +95,7 @@ def test_constructor_missing_json(self): shutil.rmtree(remove_dir) with self.assertRaises(HedFileError) as context: BackupManager(self.test_root_bad) - self.assertEqual(context.exception.error_type, "BadBackupFormat") + self.assertEqual(context.exception.code, "BadBackupFormat") def test_constructor_extra_backup_file(self): remove_list = ['back1_extra', 'back2_miss_json', 'back4_miss_file'] @@ -89,7 +104,7 @@ def test_constructor_extra_backup_file(self): shutil.rmtree(remove_dir) with self.assertRaises(HedFileError) as context: BackupManager(self.test_root_bad) - self.assertEqual(context.exception.error_type, "BadBackupFormat") + self.assertEqual(context.exception.code, "BadBackupFormat") def test_create_backup(self): test_man = BackupManager(self.test_root) @@ -126,5 +141,6 @@ def test_get_task(self): task3 = BackupManager.get_task(['abc', 'def'], 'temp/alpha_key_task_abc.txt') self.assertEqual(task3, 'abc') + if __name__ == '__main__': unittest.main() diff --git a/tests/tools/remodeling/test_dispatcher.py b/tests/tools/remodeling/test_dispatcher.py index 8fdd0ceaf..e2ff311a9 100644 --- a/tests/tools/remodeling/test_dispatcher.py +++ b/tests/tools/remodeling/test_dispatcher.py @@ -76,7 +76,7 @@ def test_get_data_file(self): dispatch = Dispatcher(model1) with self.assertRaises(HedFileError) as context: dispatch.get_data_file(sidecar_file) - self.assertEqual(context.exception.error_type, 'BadDataFile') + self.assertEqual(context.exception.code, 'BadDataFile') def test_get_summary_save_dir(self): model_path1 = os.path.join(self.data_path, 'simple_reorder_rmdl.json') @@ -85,11 +85,12 @@ def test_get_summary_save_dir(self): dispatch1 = Dispatcher(model1, data_root=self.test_root_back1, backup_name='back1') summary_path = dispatch1.get_summary_save_dir() self.assertEqual(summary_path, - os.path.realpath(os.path.join(self.test_root_back1, Dispatcher.REMODELING_SUMMARY_PATH))) + os.path.realpath(os.path.join(self.test_root_back1, 'derivatives', + Dispatcher.REMODELING_SUMMARY_PATH))) dispatch2 = Dispatcher(model1) with self.assertRaises(HedFileError) as context: dispatch2.get_summary_save_dir() - self.assertEqual(context.exception.error_type, 'NoDataRoot') + self.assertEqual(context.exception.code, 'NoDataRoot') def test_parse_operations_errors(self): test = [{"operation": "remove_rows", "parameters": {"column_name": "response_time", "remove_values": ["n/a"]}}, diff --git a/tests/tools/util/test_io_util.py b/tests/tools/util/test_io_util.py index 5b05c2fd1..46373ad72 100644 --- a/tests/tools/util/test_io_util.py +++ b/tests/tools/util/test_io_util.py @@ -1,7 +1,7 @@ import os import unittest from hed.errors.exceptions import HedFileError -from hed.tools.util.io_util import check_filename, extract_suffix_path, generate_filename, \ +from hed.tools.util.io_util import check_filename, extract_suffix_path, clean_filename, \ get_dir_dictionary, get_file_list, get_path_components, parse_bids_filename, \ _split_entity, get_allowed, get_filtered_by_element @@ -46,77 +46,39 @@ def test_extract_suffix_path(self): suffix_path = extract_suffix_path('c:/myroot/temp.tsv', 'c:') self.assertTrue(suffix_path.endswith('temp.tsv'), "extract_suffix_path has the right path") - def test_generate_file_name(self): - file1 = generate_filename('mybase') + def test_clean_file_name(self): + file1 = clean_filename('mybase') self.assertEqual(file1, "mybase", "generate_file_name should return the base when other arguments not set") - file2 = generate_filename('mybase', name_prefix="prefix") - self.assertEqual(file2, "prefixmybase", "generate_file_name should return correct name when prefix set") - file3 = generate_filename('mybase', name_prefix="prefix", extension=".json") - self.assertEqual(file3, "prefixmybase.json", "generate_file_name should return correct name for extension") - file4 = generate_filename('mybase', name_suffix="suffix") - self.assertEqual(file4, "mybasesuffix", "generate_file_name should return correct name when suffix set") - file5 = generate_filename('mybase', name_suffix="suffix", extension=".json") - self.assertEqual(file5, "mybasesuffix.json", "generate_file_name should return correct name for extension") - file6 = generate_filename('mybase', name_prefix="prefix", name_suffix="suffix", extension=".json") - self.assertEqual(file6, "prefixmybasesuffix.json", - "generate_file_name should return correct name for all set") - filename = generate_filename(None, name_prefix=None, name_suffix=None, extension=None) - self.assertEqual('', filename, "Return empty when all arguments are none") - filename = generate_filename(None, name_prefix=None, name_suffix=None, extension='.txt') - self.assertEqual('', filename, - "Return empty when base_name, prefix, and suffix are None, but extension is not") - filename = generate_filename('c:/temp.json', name_prefix=None, name_suffix=None, extension='.txt') - self.assertEqual('c_temp.txt', filename, - "Returns stripped base_name + extension when prefix, and suffix are None") - filename = generate_filename('temp.json', name_prefix='prefix_', name_suffix='_suffix', extension='.txt') - self.assertEqual('prefix_temp_suffix.txt', filename, - "Return stripped base_name + extension when prefix, and suffix are None") - filename = generate_filename(None, name_prefix='prefix_', name_suffix='suffix', extension='.txt') - self.assertEqual('prefix_suffix.txt', filename, - "Returns correct string when no base_name") - filename = generate_filename('event-strategy-v3_task-matchingpennies_events.json', - name_suffix='_blech', extension='.txt') - self.assertEqual('event-strategy-v3_task-matchingpennies_events_blech.txt', filename, - "Returns correct string when base_name with hyphens") - filename = generate_filename('HED7.2.0.xml', name_suffix='_blech', extension='.txt') - self.assertEqual('HED7.2.0_blech.txt', filename, "Returns correct string when base_name has periods") - - def test_generate_file_name_with_date(self): - file1 = generate_filename('mybase') - file1t = generate_filename('mybase', append_datetime=True) - self.assertGreater(len(file1t), len(file1), "generate_file_name generates a longer file when datetime is used.") - # TODO convert more of these tests. - # self.assertEqual(file1, "mybase", "generate_file_name should return the base when other arguments not set") - # file2 = generate_filename('mybase', name_prefix="prefix") + # file2 = clean_filename('mybase', name_prefix="prefix") # self.assertEqual(file2, "prefixmybase", "generate_file_name should return correct name when prefix set") - # file3 = generate_filename('mybase', name_prefix="prefix", extension=".json") + # file3 = clean_filename('mybase', name_prefix="prefix", extension=".json") # self.assertEqual(file3, "prefixmybase.json", "generate_file_name should return correct name for extension") - # file4 = generate_filename('mybase', name_suffix="suffix") + # file4 = clean_filename('mybase', name_suffix="suffix") # self.assertEqual(file4, "mybasesuffix", "generate_file_name should return correct name when suffix set") - # file5 = generate_filename('mybase', name_suffix="suffix", extension=".json") + # file5 = clean_filename('mybase', name_suffix="suffix", extension=".json") # self.assertEqual(file5, "mybasesuffix.json", "generate_file_name should return correct name for extension") - # file6 = generate_filename('mybase', name_prefix="prefix", name_suffix="suffix", extension=".json") + # file6 = clean_filename('mybase', name_prefix="prefix", name_suffix="suffix", extension=".json") # self.assertEqual(file6, "prefixmybasesuffix.json", # "generate_file_name should return correct name for all set") - # filename = generate_filename(None, name_prefix=None, name_suffix=None, extension=None) - # self.assertEqual('', filename, "Return empty when all arguments are none") - # filename = generate_filename(None, name_prefix=None, name_suffix=None, extension='.txt') - # self.assertEqual('', filename, - # "Return empty when base_name, prefix, and suffix are None, but extension is not") - # filename = generate_filename('c:/temp.json', name_prefix=None, name_suffix=None, extension='.txt') - # self.assertEqual('c_temp.txt', filename, - # "Returns stripped base_name + extension when prefix, and suffix are None") - # filename = generate_filename('temp.json', name_prefix='prefix_', name_suffix='_suffix', extension='.txt') + filename = clean_filename("") + self.assertEqual('', filename, "Return empty when all arguments are none") + filename = clean_filename(None) + self.assertEqual('', filename, + "Return empty when base_name, prefix, and suffix are None, but extension is not") + filename = clean_filename('c:/temp.json') + self.assertEqual('c_temp.json', filename, + "Returns stripped base_name + extension when prefix, and suffix are None") + # filename = clean_filename('temp.json', name_prefix='prefix_', name_suffix='_suffix', extension='.txt') # self.assertEqual('prefix_temp_suffix.txt', filename, # "Return stripped base_name + extension when prefix, and suffix are None") - # filename = generate_filename(None, name_prefix='prefix_', name_suffix='suffix', extension='.txt') + # filename = clean_filename(None, name_prefix='prefix_', name_suffix='suffix', extension='.txt') # self.assertEqual('prefix_suffix.txt', filename, # "Returns correct string when no base_name") - # filename = generate_filename('event-strategy-v3_task-matchingpennies_events.json', - # name_suffix='_blech', extension='.txt') + # filename = clean_filename('event-strategy-v3_task-matchingpennies_events.json', + # name_suffix='_blech', extension='.txt') # self.assertEqual('event-strategy-v3_task-matchingpennies_events_blech.txt', filename, # "Returns correct string when base_name with hyphens") - # filename = generate_filename('HED7.2.0.xml', name_suffix='_blech', extension='.txt') + # filename = clean_filename('HED7.2.0.xml', name_suffix='_blech', extension='.txt') # self.assertEqual('HED7.2.0_blech.txt', filename, "Returns correct string when base_name has periods") def test_get_dir_dictionary(self): diff --git a/tests/validator/test_def_validator.py b/tests/validator/test_def_validator.py index 6bef321a7..7464e985d 100644 --- a/tests/validator/test_def_validator.py +++ b/tests/validator/test_def_validator.py @@ -19,7 +19,7 @@ def setUpClass(cls): cls.basic_definition_string = f"(Definition/TestDef,{cls.def_contents_string})" cls.basic_definition_string_no_paren = f"Definition/TestDef,{cls.def_contents_string}" - cls.placeholder_definition_contents = "(Item/TestDef1/#,Item/TestDef2)" + cls.placeholder_definition_contents = "(Acceleration/#,Item/TestDef2)" cls.placeholder_definition_string = f"(Definition/TestDefPlaceholder/#,{cls.placeholder_definition_contents})" cls.placeholder_definition_string_no_paren = \ f"Definition/TestDefPlaceholder/#,{cls.placeholder_definition_contents}" @@ -34,7 +34,7 @@ def setUpClass(cls): cls.basic_hed_string_with_def_first_paren = f"({cls.label_def_string},{cls.basic_hed_string})" cls.placeholder_label_def_string = "Def/TestDefPlaceholder/2471" - cls.placeholder_expanded_def_string = "(Def-expand/TestDefPlaceholder/2471,(Item/TestDef1/2471,Item/TestDef2))" + cls.placeholder_expanded_def_string = "(Def-expand/TestDefPlaceholder/2471,(Acceleration/2471,Item/TestDef2))" cls.placeholder_hed_string_with_def = f"{cls.basic_hed_string},{cls.placeholder_label_def_string}" cls.placeholder_hed_string_with_def_first = f"{cls.placeholder_label_def_string},{cls.basic_hed_string}" @@ -80,27 +80,11 @@ def test_bad_def_expand(self): def_issues = def_validator.validate_def_tags(valid_placeholder) self.assertFalse(def_issues) - invalid_placeholder = HedString("(Def-expand/TestDefPlaceholder/2471,(Item/TestDef1/21,Item/TestDef2))", self.hed_schema) + invalid_placeholder = HedString("(Def-expand/TestDefPlaceholder/2471,(Acceleration/21,Item/TestDef2))", self.hed_schema) def_issues = def_validator.validate_def_tags(invalid_placeholder) self.assertTrue(bool(def_issues)) - def test_def_no_content(self): - - def_validator = DefValidator() - def_string = HedString("(Definition/EmptyDef)", self.hed_schema) - def_validator.check_for_definitions(def_string) - - valid_empty = HedString("Def/EmptyDef", self.hed_schema) - def_issues = def_validator.validate_def_tags(valid_empty) - def_issues += def_validator.expand_def_tags(valid_empty) - self.assertEqual(str(valid_empty), "(Def-expand/EmptyDef)") - self.assertFalse(def_issues) - - valid_empty = HedString("Def/EmptyDef", self.hed_schema) - def_issues = def_validator.validate_def_tags(valid_empty) - self.assertFalse(def_issues) - def test_duplicate_def(self): def_dict = DefinitionDict() def_string = HedString(self.placeholder_definition_string, self.hed_schema) @@ -137,11 +121,11 @@ def setUpClass(cls): cls.basic_hed_string_with_def_first = f"{cls.label_def_string},{cls.basic_hed_string}" cls.basic_hed_string_with_def_first_paren = f"({cls.label_def_string},{cls.basic_hed_string})" cls.placeholder_label_def_string = "Def/TestDefPlaceholder/2471" - cls.placeholder_definition_contents = "(Item/TestDef1/#,Item/TestDef2)" + cls.placeholder_definition_contents = "(Acceleration/#,Item/TestDef2)" cls.placeholder_definition_string = f"(Definition/TestDefPlaceholder/#,{cls.placeholder_definition_contents})" cls.placeholder_definition_string_no_paren = \ f"Definition/TestDefPlaceholder/#,{cls.placeholder_definition_contents}" - cls.placeholder_expanded_def_string = "(Def-expand/TestDefPlaceholder/2471,(Item/TestDef1/2471,Item/TestDef2))" + cls.placeholder_expanded_def_string = "(Def-expand/TestDefPlaceholder/2471,(Acceleration/2471,Item/TestDef2))" cls.placeholder_hed_string_with_def = f"{cls.basic_hed_string},{cls.placeholder_label_def_string}" cls.placeholder_hed_string_with_def_first = f"{cls.placeholder_label_def_string},{cls.basic_hed_string}" @@ -266,7 +250,7 @@ def test_expand_def_tags_placeholder(self): remove_definitions=True, basic_definition_string=self.placeholder_definition_string) - # todo ian: finish updating these + # todo: finish updating these # # special case test # def test_changing_tag_then_def_mapping(self): # def_dict = DefinitionDict() diff --git a/tests/validator/test_hed_validator.py b/tests/validator/test_hed_validator.py index a523e33c3..451241377 100644 --- a/tests/validator/test_hed_validator.py +++ b/tests/validator/test_hed_validator.py @@ -88,6 +88,7 @@ def test_complex_file_validation_with_index(self): self.assertEqual(len(validation_issues), 0) def test_complex_file_validation_invalid(self): + # todo: Update or remove schema_path = os.path.realpath(os.path.join(os.path.dirname(__file__), '../data/validator_tests/bids_schema.mediawiki')) events_path = os.path.realpath(os.path.join(os.path.dirname(__file__), @@ -98,13 +99,14 @@ def test_complex_file_validation_invalid(self): '../data/validator_tests/bids_events_bad_defs.json')) sidecar = Sidecar(json_path) issues = sidecar.validate(hed_schema) - self.assertEqual(len(issues), 4) + self.assertEqual(len(issues), 8) input_file = TabularInput(events_path, sidecar=sidecar) validation_issues = input_file.validate(hed_schema) - self.assertEqual(len(validation_issues), 63) + self.assertEqual(len(validation_issues), 105) def test_complex_file_validation_invalid_definitions_removed(self): + # todo: update this/remove # This verifies definitions are being removed from sidecar strings before being added, or it will produce # extra errors. schema_path = os.path.realpath(os.path.join(os.path.dirname(__file__), @@ -117,11 +119,11 @@ def test_complex_file_validation_invalid_definitions_removed(self): '../data/validator_tests/bids_events_bad_defs2.json')) sidecar = Sidecar(json_path) issues = sidecar.validate(hed_schema) - self.assertEqual(len(issues), 4) + self.assertEqual(len(issues), 7) input_file = TabularInput(events_path, sidecar=sidecar) validation_issues = input_file.validate(hed_schema) - self.assertEqual(len(validation_issues), 42) + self.assertEqual(len(validation_issues), 63) def test_file_bad_defs_in_spreadsheet(self): schema_path = os.path.join(os.path.dirname(os.path.realpath(__file__)), @@ -137,7 +139,7 @@ def test_file_bad_defs_in_spreadsheet(self): worksheet_name='LKT Events') validation_issues = loaded_file.validate(hed_schema=hed_schema) - self.assertEqual(len(validation_issues), 2) + self.assertEqual(len(validation_issues), 5) def test_tabular_input_with_HED_col_in_json(self): schema_path = os.path.realpath(os.path.join(os.path.dirname(__file__), diff --git a/tests/validator/test_onset_validator.py b/tests/validator/test_onset_validator.py index ef7e3aa54..b1acb3962 100644 --- a/tests/validator/test_onset_validator.py +++ b/tests/validator/test_onset_validator.py @@ -18,19 +18,19 @@ def setUpClass(cls): hed_xml_file = os.path.join(cls.base_data_dir, "schema_tests/HED8.0.0.mediawiki") cls.hed_schema = schema.load_schema(hed_xml_file) cls.placeholder_label_def_string = "Def/TestDefPlaceholder/2471" - cls.placeholder_def_contents = "(Action/TestDef1/#,Action/TestDef2)" + cls.placeholder_def_contents = "(Acceleration/#,Action/TestDef2)" cls.placeholder_definition_string = f"(Definition/TestDefPlaceholder/#,{cls.placeholder_def_contents})" - cls.placeholder_expanded_def_string = "(Def-expand/TestDefPlaceholder/2471,(Action/TestDef1/2471,Action/TestDef2))" + cls.placeholder_expanded_def_string = "(Def-expand/TestDefPlaceholder/2471,(Acceleration/2471,Action/TestDef2))" cls.label_def_string = "Def/TestDefNormal" cls.def_contents = "(Action/TestDef1,Action/TestDef2)" cls.definition_string = f"(Definition/TestDefNormal,{cls.def_contents})" - cls.expanded_def_string = "(Def-expand/TestDefNormal,(Action/TestDef1/2471,Action/TestDef2))" + cls.expanded_def_string = "(Def-expand/TestDefNormal,(Acceleration/2471,Action/TestDef2))" cls.placeholder_label_def_string2 = "Def/TestDefPlaceholder/123" - cls.placeholder_def_contents2 = "(Action/TestDef1/#,Action/TestDef2)" + cls.placeholder_def_contents2 = "(Acceleration/#,Action/TestDef2)" cls.placeholder_definition_string2 = f"(Definition/TestDefPlaceholder/#,{cls.placeholder_def_contents2})" - cls.placeholder_expanded_def_string2 = "(Def-expand/TestDefPlaceholder/123,(Action/TestDef1/123,Action/TestDef2))" + cls.placeholder_expanded_def_string2 = "(Def-expand/TestDefPlaceholder/123,(Acceleration/123,Action/TestDef2))" cls.def_dict_placeholder = DefinitionDict() def_string = HedString(cls.placeholder_definition_string, hed_schema=cls.hed_schema) @@ -263,9 +263,13 @@ def test_onset_multiple_or_misplaced_errors(self): f"({self.placeholder_label_def_string},Onset, Offset)", ] test_issues = [ - self.format_error(ValidationErrors.HED_TOP_LEVEL_TAG, tag=1), - self.format_error(OnsetErrors.ONSET_TAG_OUTSIDE_OF_GROUP, tag=2, def_tag="Def/TestDefPlaceholder/2471"), - self.format_error(OnsetErrors.ONSET_TAG_OUTSIDE_OF_GROUP, tag=2, def_tag="Def/TestDefPlaceholder/2471"), + self.format_error(ValidationErrors.HED_TOP_LEVEL_TAG, tag=1, actual_error=ValidationErrors.ONSET_OFFSET_INSET_ERROR) + + self.format_error(ValidationErrors.HED_TOP_LEVEL_TAG, tag=1), + self.format_error(ValidationErrors.HED_MULTIPLE_TOP_TAGS, tag=1, multiple_tags=["Onset"]) + + self.format_error(ValidationErrors.HED_TAG_REPEATED, tag=2) + + self.format_error(OnsetErrors.ONSET_TAG_OUTSIDE_OF_GROUP, tag=2, def_tag="Def/TestDefPlaceholder/2471"), + self.format_error(ValidationErrors.HED_MULTIPLE_TOP_TAGS, tag=1, multiple_tags=["Offset"]) + + self.format_error(OnsetErrors.ONSET_TAG_OUTSIDE_OF_GROUP, tag=2, def_tag="Def/TestDefPlaceholder/2471"), ] self._test_issues_no_context(test_strings, test_issues) diff --git a/tests/validator/test_sidecar_validator.py b/tests/validator/test_sidecar_validator.py new file mode 100644 index 000000000..84ae8a2f0 --- /dev/null +++ b/tests/validator/test_sidecar_validator.py @@ -0,0 +1,66 @@ +import unittest +import os +import io +import shutil + +from hed.errors import HedFileError, ValidationErrors +from hed.models import ColumnMetadata, HedString, Sidecar +from hed.validator import HedValidator +from hed import schema +from hed.models import DefinitionDict +from hed.errors import ErrorHandler +from hed.validator.sidecar_validator import SidecarValidator + + +class Test(unittest.TestCase): + @classmethod + def setUpClass(cls): + base_data_dir = os.path.join(os.path.dirname(os.path.realpath(__file__)), '../data/') + cls.base_data_dir = base_data_dir + hed_xml_file = os.path.join(base_data_dir, "schema_tests/HED8.0.0t.xml") + cls.hed_schema = schema.load_schema(hed_xml_file) + cls._refs_json_filename = os.path.join(base_data_dir, "sidecar_tests/basic_refs_test.json") + cls._bad_refs_json_filename = os.path.join(base_data_dir, "sidecar_tests/bad_refs_test2.json") + cls._malformed_refs_json_filename = os.path.join(base_data_dir, "sidecar_tests/malformed_refs_test.json") + + def test_basic_refs(self): + sidecar = Sidecar(self._refs_json_filename) + issues = sidecar.validate(self.hed_schema) + + self.assertEqual(len(issues), 0) + refs = sidecar.get_column_refs() + self.assertEqual(len(refs), 2) + + def test_bad_refs(self): + sidecar = Sidecar(self._bad_refs_json_filename) + issues = sidecar.validate(self.hed_schema) + + self.assertEqual(len(issues), 2) + + def test_malformed_refs(self): + sidecar = Sidecar(self._malformed_refs_json_filename) + issues = sidecar.validate(self.hed_schema) + + self.assertEqual(len(issues), 4) + + def test_malformed_braces(self): + hed_strings = [ + "column2}, Event, Action", + "{column, Event, Action", + "This is a {malformed {input string}} with extra {opening brackets", + "{Event{Action}}", + "Event, Action}" + ] + error_counts = [ + 1, + 1, + 3, + 2, + 1 + ] + + for string, error_count in zip(hed_strings, error_counts): + issues = SidecarValidator._find_non_matching_braces(string) + + self.assertEqual(len(issues), error_count) + diff --git a/tests/validator/test_spreadsheet_validator.py b/tests/validator/test_spreadsheet_validator.py index ef43f9bf3..1b1f57eb8 100644 --- a/tests/validator/test_spreadsheet_validator.py +++ b/tests/validator/test_spreadsheet_validator.py @@ -1,57 +1,47 @@ import pandas as pd +import os +import shutil + import unittest -from hed import BaseInput, load_schema_version +from hed import load_schema_version, load_schema from hed.validator import SpreadsheetValidator -from hed.errors import ErrorHandler, sort_issues -from hed.errors.error_types import ColumnErrors - - +from hed import SpreadsheetInput -class TestInsertColumns(unittest.TestCase): +class TestSpreadsheetValidation(unittest.TestCase): @classmethod def setUpClass(cls): cls.schema = load_schema_version("8.1.0") cls.validator = SpreadsheetValidator(cls.schema) + base = os.path.join(os.path.dirname(os.path.realpath(__file__)), '../data/') + cls.base_data_dir = base + hed_xml_file = os.path.join(base, "schema_tests/HED8.0.0t.xml") + cls.hed_schema = load_schema(hed_xml_file) + default = os.path.join(os.path.dirname(os.path.realpath(__file__)), + "../data/spreadsheet_validator_tests/ExcelMultipleSheets.xlsx") + cls.default_test_file_name = default + cls.generic_file_input = SpreadsheetInput(default) + base_output = os.path.join(os.path.dirname(os.path.realpath(__file__)), "../data/tests_output/") + cls.base_output_folder = base_output + os.makedirs(base_output, exist_ok=True) + + @classmethod + def tearDownClass(cls): + shutil.rmtree(cls.base_output_folder) + + def test_basic_validate(self): + hed_input = self.default_test_file_name + has_column_names = True + column_prefix_dictionary = {1: 'Label/', 3: 'Description'} + tag_columns = [4] + worksheet_name = 'LKT 8HED3' + + file_input = SpreadsheetInput(hed_input, has_column_names=has_column_names, worksheet_name=worksheet_name, + tag_columns=tag_columns, column_prefix_dictionary=column_prefix_dictionary) + + self.assertTrue(isinstance(file_input.dataframe_a, pd.DataFrame)) + self.assertTrue(isinstance(file_input.series_a, pd.Series)) + self.assertTrue(file_input.dataframe_a.size) + + issues = file_input.validate(self.schema) + self.assertTrue(len(issues), 1) - def test_insert_columns_no_nested_or_circular_reference(self): - df = pd.DataFrame({ - "column1": ["[column2], Event, Action"], - "column2": ["[column1], Item"] - }) - issues = self.validator._validate_square_brackets(df, error_handler=ErrorHandler(True)) - self.assertEqual(issues[0]['code'], ColumnErrors.NESTED_COLUMN_REF) - - def test_insert_columns_invalid_column_name(self): - df = pd.DataFrame({ - "column1": ["[invalid_column], Event, Action"], - "column2": ["Item"] - }) - issues = self.validator._validate_square_brackets(df, error_handler=ErrorHandler(True)) - self.assertEqual(issues[0]['code'], ColumnErrors.INVALID_COLUMN_REF) - - def test_insert_columns_invalid_syntax(self): - df = pd.DataFrame({ - "column1": ["column2], Event, Action"], - "column2": ["Item"] - }) - issues = self.validator._validate_square_brackets(df, error_handler=ErrorHandler(True)) - self.assertEqual(issues[0]['code'], ColumnErrors.MALFORMED_COLUMN_REF) - - def test_insert_columns_invalid_syntax2(self): - df = pd.DataFrame({ - "column1": ["column2], Event, Action", "[column, Event, Action"], - "column2": ["Item", "Action"], - "column3": ["This is a [malformed [input string]] with extra [opening brackets", "[Event[Action]]"], - }) - issues = self.validator._validate_square_brackets(df, error_handler=ErrorHandler(True)) - issues = sort_issues(issues) - self.assertEqual(issues[0]['code'], ColumnErrors.MALFORMED_COLUMN_REF) - self.assertEqual(len(issues), 6) - - def test_insert_columns_no_self_reference(self): - df = pd.DataFrame({ - "column1": ["[column1], Event, Action"], - "column2": ["Item"] - }) - issues = self.validator._validate_square_brackets(df, error_handler=ErrorHandler(True)) - self.assertEqual(issues[0]['code'], ColumnErrors.SELF_COLUMN_REF) diff --git a/tests/validator/test_tag_validator.py b/tests/validator/test_tag_validator.py index 939423638..5f453f806 100644 --- a/tests/validator/test_tag_validator.py +++ b/tests/validator/test_tag_validator.py @@ -1,6 +1,6 @@ import unittest -from hed.errors.error_types import ValidationErrors +from hed.errors.error_types import ValidationErrors, DefinitionErrors from tests.validator.test_tag_validator_base import TestValidatorBase from functools import partial @@ -26,7 +26,7 @@ def test_exist_in_schema(self): 'usedToBeIllegalComma': 'Label/This is a label,This/Is/A/Tag', 'legalDef': 'Def/Item', 'legalDefExpand': 'Def-expand/Item', - 'legalDefinition': 'Definition/Item', + 'illegalDefinition': 'Definition/Item', } expected_results = { 'takesValue': True, @@ -39,14 +39,14 @@ def test_exist_in_schema(self): 'usedToBeIllegalComma': False, 'legalDef': True, 'legalDefExpand': True, - 'legalDefinition': True, + 'illegalDefinition': False, } expected_issues = { 'takesValue': [], 'full': [], 'extensionsAllowed': [], - 'leafExtension': self.format_error(ValidationErrors.INVALID_EXTENSION, tag=0), - 'nonExtensionsAllowed': self.format_error(ValidationErrors.INVALID_EXTENSION, tag=0), + 'leafExtension': self.format_error(ValidationErrors.TAG_EXTENSION_INVALID, tag=0), + 'nonExtensionsAllowed': self.format_error(ValidationErrors.TAG_EXTENSION_INVALID, tag=0), 'invalidExtension': self.format_error( ValidationErrors.INVALID_PARENT_NODE, tag=0, index_in_tag=6, index_in_tag_end=9, expected_parent_tag="Property/Sensory-property/Sensory-attribute/Visual-attribute" + @@ -59,7 +59,7 @@ def test_exist_in_schema(self): index_in_tag=0, index_in_tag_end=4), 'legalDef': [], 'legalDefExpand': [], - 'legalDefinition': [] + 'illegalDefinition': self.format_error(DefinitionErrors.BAD_DEFINITION_LOCATION, tag=0) } self.validator_semantic(test_strings, expected_results, expected_issues, False) @@ -83,7 +83,7 @@ def test_proper_capitalization(self): 'camelCase': [], 'takesValue': [], 'numeric': [], - 'lowercase': self.format_error(ValidationErrors.HED_STYLE_WARNING, tag=0) + 'lowercase': self.format_error(ValidationErrors.STYLE_WARNING, tag=0) } self.validator_semantic(test_strings, expected_results, expected_issues, True) @@ -106,11 +106,11 @@ def test_proper_capitalization(self): # } # expected_issues = { # 'proper': [], - # 'camelCase': self.format_error(ValidationErrors.HED_STYLE_WARNING, tag=0), + # 'camelCase': self.format_error(ValidationErrors.STYLE_WARNING, tag=0), # 'takesValue': [], # 'numeric': [], - # 'lowercase': self.format_error(ValidationErrors.HED_STYLE_WARNING, tag=0), - # 'multipleUpper': self.format_error(ValidationErrors.HED_STYLE_WARNING, tag=0) + # 'lowercase': self.format_error(ValidationErrors.STYLE_WARNING, tag=0), + # 'multipleUpper': self.format_error(ValidationErrors.STYLE_WARNING, tag=0) # } # self.validator_semantic(test_strings, expected_results, expected_issues, True) # @@ -133,11 +133,11 @@ def test_proper_capitalization(self): # } # expected_issues = { # 'proper': [], - # 'camelCase': self.format_error(ValidationErrors.HED_STYLE_WARNING, tag=0), + # 'camelCase': self.format_error(ValidationErrors.STYLE_WARNING, tag=0), # 'takesValue': [], # 'numeric': [], - # 'lowercase': self.format_error(ValidationErrors.HED_STYLE_WARNING, tag=0), - # 'multipleUpper': self.format_error(ValidationErrors.HED_STYLE_WARNING, tag=0) + # 'lowercase': self.format_error(ValidationErrors.STYLE_WARNING, tag=0), + # 'multipleUpper': self.format_error(ValidationErrors.STYLE_WARNING, tag=0) # } # self.validator_semantic(test_strings, expected_results, expected_issues, True) @@ -152,7 +152,7 @@ def test_child_required(self): } expected_issues = { 'hasChild': [], - 'missingChild': self.format_error(ValidationErrors.HED_TAG_REQUIRES_CHILD, tag=0) + 'missingChild': self.format_error(ValidationErrors.TAG_REQUIRES_CHILD, tag=0) } self.validator_semantic(test_strings, expected_results, expected_issues, True) @@ -179,14 +179,14 @@ def test_required_units(self): # legal_clock_time_units = ['hour:min', 'hour:min:sec'] expected_issues = { 'hasRequiredUnit': [], - 'missingRequiredUnit': self.format_error(ValidationErrors.HED_UNITS_DEFAULT_USED, tag=0, + 'missingRequiredUnit': self.format_error(ValidationErrors.UNITS_MISSING, tag=0, default_unit='s'), 'notRequiredNoNumber': [], 'notRequiredNumber': [], 'notRequiredScientific': [], - 'timeValue': self.format_error(ValidationErrors.HED_TAG_EXTENDED, tag=0, + 'timeValue': self.format_error(ValidationErrors.TAG_EXTENDED, tag=0, index_in_tag=10, index_in_tag_end=None), - 'invalidTimeValue': self.format_error(ValidationErrors.HED_TAG_EXTENDED, tag=0, + 'invalidTimeValue': self.format_error(ValidationErrors.TAG_EXTENDED, tag=0, index_in_tag=10, index_in_tag_end=None), } self.validator_semantic(test_strings, expected_results, expected_issues, True) @@ -249,27 +249,27 @@ def test_correct_units(self): 'correctNoPluralUnit': [], 'correctNonSymbolCapitalizedUnit': [], 'correctSymbolCapitalizedUnit': [], - 'incorrectUnit': self.format_error(ValidationErrors.HED_UNITS_INVALID, + 'incorrectUnit': self.format_error(ValidationErrors.UNITS_INVALID, tag=0, units=legal_time_units), - 'incorrectSiUsage': self.format_error(ValidationErrors.HED_UNITS_INVALID, + 'incorrectSiUsage': self.format_error(ValidationErrors.UNITS_INVALID, tag=0, units=legal_time_units), - 'incorrectPluralUnit': self.format_error(ValidationErrors.HED_UNITS_INVALID, + 'incorrectPluralUnit': self.format_error(ValidationErrors.UNITS_INVALID, tag=0, units=legal_freq_units), - 'incorrectSymbolCapitalizedUnit': self.format_error(ValidationErrors.HED_UNITS_INVALID, + 'incorrectSymbolCapitalizedUnit': self.format_error(ValidationErrors.UNITS_INVALID, tag=0, units=legal_freq_units), 'incorrectSymbolCapitalizedUnitModifier': self.format_error( - ValidationErrors.HED_UNITS_INVALID, tag=0, units=legal_freq_units), + ValidationErrors.UNITS_INVALID, tag=0, units=legal_freq_units), 'notRequiredNumber': [], 'notRequiredScientific': [], - 'specialAllowedCharBadUnit': self.format_error(ValidationErrors.HED_VALUE_INVALID, + 'specialAllowedCharBadUnit': self.format_error(ValidationErrors.VALUE_INVALID, tag=0), 'specialAllowedCharUnit': [], # 'properTime': [], - # 'invalidTime': self.format_error(ValidationErrors.HED_UNITS_INVALID, tag=0, + # 'invalidTime': self.format_error(ValidationErrors.UNITS_INVALID, tag=0, # units=legal_clock_time_units) # 'specialAllowedCharCurrency': [], - # 'specialNotAllowedCharCurrency': self.format_error(ValidationErrors.HED_UNITS_INVALID, + # 'specialNotAllowedCharCurrency': self.format_error(ValidationErrors.UNITS_INVALID, # tag=0, # units=legal_currency_units), } @@ -300,7 +300,7 @@ def test_extension_warning(self): } expected_issues = { 'noWarning': [], - 'warning': self.format_error(ValidationErrors.HED_TAG_EXTENDED, tag=0, + 'warning': self.format_error(ValidationErrors.TAG_EXTENDED, tag=0, index_in_tag=13, index_in_tag_end=None), } self.validator_semantic(test_strings, expected_results, expected_issues, True) @@ -319,12 +319,12 @@ def test_invalid_placeholder_in_normal_string(self): expected_issues = { 'invalidPlaceholder': self.format_error(ValidationErrors.INVALID_TAG_CHARACTER, tag=0, index_in_tag=9, index_in_tag_end=10, - actual_error=ValidationErrors.HED_VALUE_INVALID), + actual_error=ValidationErrors.PLACEHOLDER_INVALID), 'invalidMiscPoundSign': self.format_error(ValidationErrors.NO_VALID_TAG_FOUND, tag=0, index_in_tag=0, index_in_tag_end=8), 'invalidAfterBaseTag': self.format_error(ValidationErrors.INVALID_TAG_CHARACTER, tag=0, index_in_tag=14, index_in_tag_end=15, - actual_error=ValidationErrors.HED_VALUE_INVALID), + actual_error=ValidationErrors.PLACEHOLDER_INVALID), } self.validator_semantic(test_strings, expected_results, expected_issues, False) @@ -339,12 +339,12 @@ def test_span_reporting(self): } tag_unit_class_units = ['day', 'hour', 'minute', 's', 'second'] expected_issues = { - 'orgTagDifferent': self.format_error(ValidationErrors.HED_UNITS_INVALID, + 'orgTagDifferent': self.format_error(ValidationErrors.UNITS_INVALID, tag=0, units=tag_unit_class_units), 'orgTagDifferent2': - self.format_error(ValidationErrors.HED_UNITS_INVALID, + self.format_error(ValidationErrors.UNITS_INVALID, tag=0, units=tag_unit_class_units) - + self.format_error(ValidationErrors.HED_UNITS_INVALID, tag=1, + + self.format_error(ValidationErrors.UNITS_INVALID, tag=1, units=tag_unit_class_units), } self.validator_semantic(test_strings, expected_results, expected_issues, False) @@ -429,10 +429,12 @@ def test_topLevelTagGroup_validation(self): 'invalid2TwoInOne': False, } expected_issues = { - 'invalid1': self.format_error(ValidationErrors.HED_TOP_LEVEL_TAG, tag=0), + 'invalid1': self.format_error(ValidationErrors.HED_TOP_LEVEL_TAG, tag=0, actual_error=ValidationErrors.DEFINITION_INVALID) + + self.format_error(ValidationErrors.HED_TOP_LEVEL_TAG, tag=0), 'valid1': [], 'valid2': [], - 'invalid2': self.format_error(ValidationErrors.HED_TOP_LEVEL_TAG, tag=1), + 'invalid2': self.format_error(ValidationErrors.HED_TOP_LEVEL_TAG, tag=1, actual_error=ValidationErrors.DEFINITION_INVALID) + + self.format_error(ValidationErrors.HED_TOP_LEVEL_TAG, tag=1), 'invalidTwoInOne': self.format_error( ValidationErrors.HED_MULTIPLE_TOP_TAGS, tag=0, multiple_tags="Definition/InvalidDef3".split(", ")), @@ -533,13 +535,13 @@ def test_mismatched_parentheses(self): 'valid': True } expected_issues = { - 'extraOpening': self.format_error(ValidationErrors.HED_PARENTHESES_MISMATCH, + 'extraOpening': self.format_error(ValidationErrors.PARENTHESES_MISMATCH, opening_parentheses_count=2, closing_parentheses_count=1), - 'extraClosing': self.format_error(ValidationErrors.HED_PARENTHESES_MISMATCH, + 'extraClosing': self.format_error(ValidationErrors.PARENTHESES_MISMATCH, opening_parentheses_count=1, closing_parentheses_count=2) - + self.format_error(ValidationErrors.HED_TAG_EMPTY, source_string=test_strings['extraClosing'], + + self.format_error(ValidationErrors.TAG_EMPTY, source_string=test_strings['extraClosing'], char_index=84), 'valid': [] } @@ -625,49 +627,49 @@ def test_malformed_delimiters(self): tag="Action/Reach/To touch("), 'missingClosingComma': self.format_error(ValidationErrors.COMMA_MISSING, tag="Participant/Effect/Body part/Arm)"), - 'extraOpeningComma': self.format_error(ValidationErrors.HED_TAG_EMPTY, + 'extraOpeningComma': self.format_error(ValidationErrors.TAG_EMPTY, source_string=test_strings['extraOpeningComma'], char_index=0), - 'extraClosingComma': self.format_error(ValidationErrors.HED_TAG_EMPTY, + 'extraClosingComma': self.format_error(ValidationErrors.TAG_EMPTY, source_string=test_strings['extraClosingComma'], char_index=len( test_strings['extraClosingComma']) - 1), - # 'extraOpeningParen': self.format_error(ValidationErrors.HED_TAG_EMPTY, + # 'extraOpeningParen': self.format_error(ValidationErrors.TAG_EMPTY, # character='(', index_in_tag=0), - # 'extraClosingParen': self.format_error(ValidationErrors.HED_TAG_EMPTY, character=')', + # 'extraClosingParen': self.format_error(ValidationErrors.TAG_EMPTY, character=')', # index_in_tag=len(test_strings['extraClosingParen']) - 1), - 'extraOpeningParen': self.format_error(ValidationErrors.HED_PARENTHESES_MISMATCH, + 'extraOpeningParen': self.format_error(ValidationErrors.PARENTHESES_MISMATCH, opening_parentheses_count=2, closing_parentheses_count=1), - 'extraClosingParen': self.format_error(ValidationErrors.HED_PARENTHESES_MISMATCH, + 'extraClosingParen': self.format_error(ValidationErrors.PARENTHESES_MISMATCH, opening_parentheses_count=1, closing_parentheses_count=2), 'multipleExtraOpeningDelimiters': - self.format_error(ValidationErrors.HED_TAG_EMPTY, + self.format_error(ValidationErrors.TAG_EMPTY, source_string=test_strings['multipleExtraOpeningDelimiters'], char_index=0) - + self.format_error(ValidationErrors.HED_TAG_EMPTY, + + self.format_error(ValidationErrors.TAG_EMPTY, source_string=test_strings['multipleExtraOpeningDelimiters'], char_index=1) - + self.format_error(ValidationErrors.HED_TAG_EMPTY, + + self.format_error(ValidationErrors.TAG_EMPTY, source_string=test_strings['multipleExtraOpeningDelimiters'], char_index=2), 'multipleExtraClosingDelimiters': - self.format_error(ValidationErrors.HED_TAG_EMPTY, + self.format_error(ValidationErrors.TAG_EMPTY, source_string=test_strings['multipleExtraClosingDelimiters'], char_index=len(test_strings['multipleExtraClosingDelimiters']) - 1) - + self.format_error(ValidationErrors.HED_TAG_EMPTY, + + self.format_error(ValidationErrors.TAG_EMPTY, source_string=test_strings['multipleExtraClosingDelimiters'], char_index=len(test_strings['multipleExtraClosingDelimiters']) - 2) - + self.format_error(ValidationErrors.HED_TAG_EMPTY, + + self.format_error(ValidationErrors.TAG_EMPTY, source_string=test_strings['multipleExtraClosingDelimiters'], char_index=len(test_strings['multipleExtraClosingDelimiters']) - 3) - + self.format_error(ValidationErrors.HED_TAG_EMPTY, + + self.format_error(ValidationErrors.TAG_EMPTY, source_string=test_strings['multipleExtraClosingDelimiters'], char_index=len(test_strings['multipleExtraClosingDelimiters']) - 4), 'multipleExtraMiddleDelimiters': - self.format_error(ValidationErrors.HED_TAG_EMPTY, + self.format_error(ValidationErrors.TAG_EMPTY, source_string=test_strings['multipleExtraMiddleDelimiters'], char_index=22) - + self.format_error(ValidationErrors.HED_TAG_EMPTY, + + self.format_error(ValidationErrors.TAG_EMPTY, source_string=test_strings['multipleExtraMiddleDelimiters'], char_index=121) - + self.format_error(ValidationErrors.HED_TAG_EMPTY, + + self.format_error(ValidationErrors.TAG_EMPTY, source_string=test_strings['multipleExtraMiddleDelimiters'], char_index=122), 'valid': [], 'validNestedParentheses': [], @@ -743,40 +745,40 @@ def test_string_extra_slash_space(self): 'trailingDoubleSlashWithSpace': False, } expected_errors = { - 'twoLevelDoubleSlash': self.format_error(ValidationErrors.HED_NODE_NAME_EMPTY, + 'twoLevelDoubleSlash': self.format_error(ValidationErrors.NODE_NAME_EMPTY, index_in_tag=5, index_in_tag_end=7, tag=0), 'threeLevelDoubleSlash': - self.format_error(ValidationErrors.HED_NODE_NAME_EMPTY, + self.format_error(ValidationErrors.NODE_NAME_EMPTY, index_in_tag=7, index_in_tag_end=9, tag=0) - + self.format_error(ValidationErrors.HED_NODE_NAME_EMPTY, + + self.format_error(ValidationErrors.NODE_NAME_EMPTY, index_in_tag=13, index_in_tag_end=15, tag=0), 'tripleSlashes': - self.format_error(ValidationErrors.HED_NODE_NAME_EMPTY, index_in_tag=7, index_in_tag_end=10, tag=0) - + self.format_error(ValidationErrors.HED_NODE_NAME_EMPTY, + self.format_error(ValidationErrors.NODE_NAME_EMPTY, index_in_tag=7, index_in_tag_end=10, tag=0) + + self.format_error(ValidationErrors.NODE_NAME_EMPTY, index_in_tag=14, index_in_tag_end=17, tag=0), - 'mixedSingleAndDoubleSlashes': self.format_error(ValidationErrors.HED_NODE_NAME_EMPTY, + 'mixedSingleAndDoubleSlashes': self.format_error(ValidationErrors.NODE_NAME_EMPTY, index_in_tag=7, index_in_tag_end=9, tag=0), - 'singleSlashWithSpace': self.format_error(ValidationErrors.HED_NODE_NAME_EMPTY, + 'singleSlashWithSpace': self.format_error(ValidationErrors.NODE_NAME_EMPTY, index_in_tag=5, index_in_tag_end=7, tag=0), - 'doubleSlashSurroundingSpace': self.format_error(ValidationErrors.HED_NODE_NAME_EMPTY, + 'doubleSlashSurroundingSpace': self.format_error(ValidationErrors.NODE_NAME_EMPTY, index_in_tag=5, index_in_tag_end=8, tag=0), - 'doubleSlashThenSpace': self.format_error(ValidationErrors.HED_NODE_NAME_EMPTY, + 'doubleSlashThenSpace': self.format_error(ValidationErrors.NODE_NAME_EMPTY, index_in_tag=5, index_in_tag_end=8, tag=0), - 'sosPattern': self.format_error(ValidationErrors.HED_NODE_NAME_EMPTY, index_in_tag=5, + 'sosPattern': self.format_error(ValidationErrors.NODE_NAME_EMPTY, index_in_tag=5, index_in_tag_end=14, tag=0), 'alternatingSlashSpace': - self.format_error(ValidationErrors.HED_NODE_NAME_EMPTY, index_in_tag=7, index_in_tag_end=11, tag=0) - + self.format_error(ValidationErrors.HED_NODE_NAME_EMPTY, + self.format_error(ValidationErrors.NODE_NAME_EMPTY, index_in_tag=7, index_in_tag_end=11, tag=0) + + self.format_error(ValidationErrors.NODE_NAME_EMPTY, index_in_tag=15, index_in_tag_end=19, tag=0), - 'leadingDoubleSlash': self.format_error(ValidationErrors.HED_NODE_NAME_EMPTY, + 'leadingDoubleSlash': self.format_error(ValidationErrors.NODE_NAME_EMPTY, index_in_tag=0, index_in_tag_end=2, tag=0), - 'trailingDoubleSlash': self.format_error(ValidationErrors.HED_NODE_NAME_EMPTY, + 'trailingDoubleSlash': self.format_error(ValidationErrors.NODE_NAME_EMPTY, index_in_tag=15, index_in_tag_end=17, tag=0), - 'leadingDoubleSlashWithSpace': self.format_error(ValidationErrors.HED_NODE_NAME_EMPTY, + 'leadingDoubleSlashWithSpace': self.format_error(ValidationErrors.NODE_NAME_EMPTY, index_in_tag=0, index_in_tag_end=3, tag=0), - 'trailingDoubleSlashWithSpace': self.format_error(ValidationErrors.HED_NODE_NAME_EMPTY, + 'trailingDoubleSlashWithSpace': self.format_error(ValidationErrors.NODE_NAME_EMPTY, index_in_tag=15, index_in_tag_end=18, tag=0), } @@ -803,20 +805,20 @@ def test_no_more_than_two_tildes(self): } expected_issues = { 'noTildeGroup': [], - 'oneTildeGroup': self.format_error(ValidationErrors.HED_TILDES_UNSUPPORTED, + 'oneTildeGroup': self.format_error(ValidationErrors.TILDES_UNSUPPORTED, source_string=test_strings['oneTildeGroup'], char_index=56), 'twoTildeGroup': - self.format_error(ValidationErrors.HED_TILDES_UNSUPPORTED, + self.format_error(ValidationErrors.TILDES_UNSUPPORTED, source_string=test_strings['twoTildeGroup'], char_index=49) - + self.format_error(ValidationErrors.HED_TILDES_UNSUPPORTED, + + self.format_error(ValidationErrors.TILDES_UNSUPPORTED, source_string=test_strings['twoTildeGroup'], char_index=77), 'invalidTildeGroup': - self.format_error(ValidationErrors.HED_TILDES_UNSUPPORTED, + self.format_error(ValidationErrors.TILDES_UNSUPPORTED, source_string=test_strings['invalidTildeGroup'], char_index=49) - + self.format_error(ValidationErrors.HED_TILDES_UNSUPPORTED, + + self.format_error(ValidationErrors.TILDES_UNSUPPORTED, source_string=test_strings['invalidTildeGroup'], char_index=77) - + self.format_error(ValidationErrors.HED_TILDES_UNSUPPORTED, + + self.format_error(ValidationErrors.TILDES_UNSUPPORTED, source_string=test_strings['invalidTildeGroup'], char_index=147) } self.validator_semantic(test_strings, expected_results, expected_issues, False) @@ -846,13 +848,13 @@ def test_includes_all_required_tags(self): } expected_issues = { 'complete': [], - 'missingAgent': self.format_error(ValidationErrors.HED_REQUIRED_TAG_MISSING, + 'missingAgent': self.format_error(ValidationErrors.REQUIRED_TAG_MISSING, tag_prefix='Agent/Animal-agent'), - 'missingAction': self.format_error(ValidationErrors.HED_REQUIRED_TAG_MISSING, tag_prefix='Action'), + 'missingAction': self.format_error(ValidationErrors.REQUIRED_TAG_MISSING, tag_prefix='Action'), 'inSubGroup': [], 'missingAll': - self.format_error(ValidationErrors.HED_REQUIRED_TAG_MISSING, tag_prefix='Action') - + self.format_error(ValidationErrors.HED_REQUIRED_TAG_MISSING, tag_prefix='Agent/Animal-agent'), + self.format_error(ValidationErrors.REQUIRED_TAG_MISSING, tag_prefix='Action') + + self.format_error(ValidationErrors.REQUIRED_TAG_MISSING, tag_prefix='Agent/Animal-agent'), } self.validator_semantic(test_strings, expected_results, expected_issues, True) @@ -874,9 +876,9 @@ def test_multiple_copies_unique_tags(self): } expected_issues = { 'legal': [], - 'multipleDesc': self.format_error(ValidationErrors.HED_TAG_NOT_UNIQUE, + 'multipleDesc': self.format_error(ValidationErrors.TAG_NOT_UNIQUE, tag_prefix='Property/Organizational-property/Event-context'), - 'multipleDescIncShort': self.format_error(ValidationErrors.HED_TAG_NOT_UNIQUE, + 'multipleDescIncShort': self.format_error(ValidationErrors.TAG_NOT_UNIQUE, tag_prefix='Property/Organizational-property/Event-context'), } self.validator_semantic(test_strings, expected_results, expected_issues, False) @@ -912,10 +914,12 @@ def test_special_units(self): # 'properTime': [], # 'invalidTime': [], 'specialAllowedCharCurrency': [], - 'specialNotAllowedCharCurrency': self.format_error(ValidationErrors.HED_UNITS_INVALID, + 'specialNotAllowedCharCurrency': self.format_error(ValidationErrors.UNITS_INVALID, tag=0, - units=legal_currency_units), - 'specialAllowedCharCurrencyAsSuffix': self.format_error(ValidationErrors.HED_UNITS_INVALID, + units=legal_currency_units) + + self.format_error(ValidationErrors.VALUE_INVALID, + tag=0), + 'specialAllowedCharCurrencyAsSuffix': self.format_error(ValidationErrors.UNITS_INVALID, tag=0, units=legal_currency_units), } diff --git a/tests/validator/test_tag_validator_library.py b/tests/validator/test_tag_validator_library.py index c4552f689..571fa2b85 100644 --- a/tests/validator/test_tag_validator_library.py +++ b/tests/validator/test_tag_validator_library.py @@ -3,7 +3,7 @@ from hed.errors import error_reporter from hed import schema -from hed.errors.error_types import ValidationErrors +from hed.errors.error_types import ValidationErrors, DefinitionErrors from hed.schema.hed_schema_group import HedSchemaGroup from hed.errors.exceptions import HedFileError from tests.validator.test_tag_validator_base import TestValidatorBase @@ -58,7 +58,7 @@ def test_exist_in_schema(self): 'usedToBeIllegalComma': 'tl:Label/This is a label,tl:This/Is/A/Tag', 'legalDef': 'tl:Def/Item', 'legalDefExpand': 'tl:Def-expand/Item', - 'legalDefinition': 'tl:Definition/Item', + 'illegalDefinition': 'tl:Definition/Item', 'unknownPrefix': 'ul:Definition/Item' } expected_results = { @@ -72,15 +72,15 @@ def test_exist_in_schema(self): 'usedToBeIllegalComma': False, 'legalDef': True, 'legalDefExpand': True, - 'legalDefinition': True, + 'illegalDefinition': False, 'unknownPrefix': False } expected_issues = { 'takesValue': [], 'full': [], 'extensionsAllowed': [], - 'leafExtension': self.format_error(ValidationErrors.INVALID_EXTENSION, tag=0), - 'nonExtensionsAllowed': self.format_error(ValidationErrors.INVALID_EXTENSION, tag=0), + 'leafExtension': self.format_error(ValidationErrors.TAG_EXTENSION_INVALID, tag=0), + 'nonExtensionsAllowed': self.format_error(ValidationErrors.TAG_EXTENSION_INVALID, tag=0), 'invalidExtension': self.format_error( ValidationErrors.INVALID_PARENT_NODE, tag=0, index_in_tag=9, index_in_tag_end=12, expected_parent_tag="Property/Sensory-property/Sensory-attribute/Visual-attribute" + @@ -93,7 +93,7 @@ def test_exist_in_schema(self): index_in_tag=3, index_in_tag_end=7), 'legalDef': [], 'legalDefExpand': [], - 'legalDefinition': [], + 'illegalDefinition': self.format_error(DefinitionErrors.BAD_DEFINITION_LOCATION, tag=0), 'unknownPrefix': self.format_error( ValidationErrors.HED_LIBRARY_UNMATCHED, tag=0, unknown_prefix="ul:", known_prefixes=["", "tl:"]), } @@ -119,7 +119,7 @@ def test_proper_capitalization(self): 'camelCase': [], 'takesValue': [], 'numeric': [], - 'lowercase': self.format_error(ValidationErrors.HED_STYLE_WARNING, tag=0) + 'lowercase': self.format_error(ValidationErrors.STYLE_WARNING, tag=0) } self.validator_semantic(test_strings, expected_results, expected_issues, True) @@ -134,7 +134,7 @@ def test_child_required(self): } expected_issues = { 'hasChild': [], - 'missingChild': self.format_error(ValidationErrors.HED_TAG_REQUIRES_CHILD, tag=0) + 'missingChild': self.format_error(ValidationErrors.TAG_REQUIRES_CHILD, tag=0) } self.validator_semantic(test_strings, expected_results, expected_issues, True) @@ -162,14 +162,14 @@ def test_required_units(self): expected_issues = { 'hasRequiredUnit': [], 'missingRequiredUnit': self.format_error( - ValidationErrors.HED_UNITS_DEFAULT_USED, tag=0, default_unit='s'), + ValidationErrors.UNITS_MISSING, tag=0, default_unit='s'), 'notRequiredNoNumber': [], 'notRequiredNumber': [], 'notRequiredScientific': [], 'timeValue': self.format_error( - ValidationErrors.HED_TAG_EXTENDED, tag=0, index_in_tag=10, index_in_tag_end=None), + ValidationErrors.TAG_EXTENDED, tag=0, index_in_tag=10, index_in_tag_end=None), 'invalidTimeValue': self.format_error( - ValidationErrors.HED_TAG_EXTENDED, tag=0, index_in_tag=10, index_in_tag_end=None), + ValidationErrors.TAG_EXTENDED, tag=0, index_in_tag=10, index_in_tag_end=None), } self.validator_semantic(test_strings, expected_results, expected_issues, True) @@ -230,22 +230,22 @@ def test_correct_units(self): 'correctNonSymbolCapitalizedUnit': [], 'correctSymbolCapitalizedUnit': [], 'incorrectUnit': self.format_error( - ValidationErrors.HED_UNITS_INVALID, tag=0, units=legal_time_units), + ValidationErrors.UNITS_INVALID, tag=0, units=legal_time_units), 'incorrectPluralUnit': self.format_error( - ValidationErrors.HED_UNITS_INVALID, tag=0, units=legal_freq_units), + ValidationErrors.UNITS_INVALID, tag=0, units=legal_freq_units), 'incorrectSymbolCapitalizedUnit': self.format_error( - ValidationErrors.HED_UNITS_INVALID, tag=0, units=legal_freq_units), + ValidationErrors.UNITS_INVALID, tag=0, units=legal_freq_units), 'incorrectSymbolCapitalizedUnitModifier': self.format_error( - ValidationErrors.HED_UNITS_INVALID, tag=0, units=legal_freq_units), + ValidationErrors.UNITS_INVALID, tag=0, units=legal_freq_units), 'notRequiredNumber': [], 'notRequiredScientific': [], - 'specialAllowedCharBadUnit': self.format_error(ValidationErrors.HED_VALUE_INVALID, tag=0), + 'specialAllowedCharBadUnit': self.format_error(ValidationErrors.VALUE_INVALID, tag=0), 'specialAllowedCharUnit': [], # 'properTime': [], - # 'invalidTime': self.format_error(ValidationErrors.HED_UNITS_INVALID, tag=0, + # 'invalidTime': self.format_error(ValidationErrors.UNITS_INVALID, tag=0, # units=legal_clock_time_units) # 'specialAllowedCharCurrency': [], - # 'specialNotAllowedCharCurrency': self.format_error(ValidationErrors.HED_UNITS_INVALID, + # 'specialNotAllowedCharCurrency': self.format_error(ValidationErrors.UNITS_INVALID, # tag=0, # units=legal_currency_units), } @@ -275,7 +275,7 @@ def test_invalid_placeholder_in_normal_string(self): expected_issues = { 'invalidPlaceholder': self.format_error(ValidationErrors.INVALID_TAG_CHARACTER, tag=0, index_in_tag=12, index_in_tag_end=13, - actual_error=ValidationErrors.HED_VALUE_INVALID), + actual_error=ValidationErrors.PLACEHOLDER_INVALID), } self.validator_semantic(test_strings, expected_results, expected_issues, False) @@ -290,11 +290,11 @@ def test_span_reporting(self): } tag_unit_class_units = ['day', 'hour', 'minute', 's', 'second'] expected_issues = { - 'orgTagDifferent': self.format_error(ValidationErrors.HED_UNITS_INVALID, tag=0, + 'orgTagDifferent': self.format_error(ValidationErrors.UNITS_INVALID, tag=0, units=tag_unit_class_units), - 'orgTagDifferent2': self.format_error(ValidationErrors.HED_UNITS_INVALID, tag=0, + 'orgTagDifferent2': self.format_error(ValidationErrors.UNITS_INVALID, tag=0, units=tag_unit_class_units) - + self.format_error(ValidationErrors.HED_UNITS_INVALID, tag=1, + + self.format_error(ValidationErrors.UNITS_INVALID, tag=1, units=tag_unit_class_units), } self.validator_semantic(test_strings, expected_results, expected_issues, False) @@ -367,10 +367,12 @@ def test_topLevelTagGroup_validation(self): } expected_issues = { 'invalid1': self.format_error(ValidationErrors.HED_TOP_LEVEL_TAG, - tag=0), + tag=0, actual_error=ValidationErrors.DEFINITION_INVALID) + + self.format_error(ValidationErrors.HED_TOP_LEVEL_TAG, tag=0), 'valid1': [], 'valid2': [], - 'invalid2': self.format_error(ValidationErrors.HED_TOP_LEVEL_TAG, tag=1), + 'invalid2': self.format_error(ValidationErrors.HED_TOP_LEVEL_TAG, tag=1, actual_error=ValidationErrors.DEFINITION_INVALID) + + self.format_error(ValidationErrors.HED_TOP_LEVEL_TAG, tag=1), 'invalidTwoInOne': self.format_error( ValidationErrors.HED_MULTIPLE_TOP_TAGS, tag=0, multiple_tags="tl:Definition/InvalidDef3".split(", ")), @@ -437,15 +439,15 @@ def test_includes_all_required_tags(self): } expected_issues = { 'complete': [], - 'missingAgent': self.format_error(ValidationErrors.HED_REQUIRED_TAG_MISSING, + 'missingAgent': self.format_error(ValidationErrors.REQUIRED_TAG_MISSING, tag_prefix='Agent/Animal-agent'), - 'missingAction': self.format_error(ValidationErrors.HED_REQUIRED_TAG_MISSING, tag_prefix='Action'), + 'missingAction': self.format_error(ValidationErrors.REQUIRED_TAG_MISSING, tag_prefix='Action'), 'inSubGroup': [], 'missingAll': - self.format_error(ValidationErrors.HED_REQUIRED_TAG_MISSING, tag_prefix='Action') - + self.format_error(ValidationErrors.HED_REQUIRED_TAG_MISSING, tag_prefix='Agent/Animal-agent') - + self.format_error(ValidationErrors.HED_REQUIRED_TAG_MISSING, tag_prefix='tl:Action') - + self.format_error(ValidationErrors.HED_REQUIRED_TAG_MISSING, tag_prefix='tl:Agent/Animal-agent'), + self.format_error(ValidationErrors.REQUIRED_TAG_MISSING, tag_prefix='Action') + + self.format_error(ValidationErrors.REQUIRED_TAG_MISSING, tag_prefix='Agent/Animal-agent') + + self.format_error(ValidationErrors.REQUIRED_TAG_MISSING, tag_prefix='tl:Action') + + self.format_error(ValidationErrors.REQUIRED_TAG_MISSING, tag_prefix='tl:Agent/Animal-agent'), } self.validator_semantic(test_strings, expected_results, expected_issues, True) @@ -467,9 +469,9 @@ def test_multiple_copies_unique_tags(self): } expected_issues = { 'legal': [], - 'multipleDesc': self.format_error(ValidationErrors.HED_TAG_NOT_UNIQUE, + 'multipleDesc': self.format_error(ValidationErrors.TAG_NOT_UNIQUE, tag_prefix='tl:Property/Organizational-property/Event-context'), - 'multipleDescIncShort': self.format_error(ValidationErrors.HED_TAG_NOT_UNIQUE, + 'multipleDescIncShort': self.format_error(ValidationErrors.TAG_NOT_UNIQUE, tag_prefix='tl:Property/Organizational-property/Event-context'), } self.validator_semantic(test_strings, expected_results, expected_issues, False)