validate_nwb#

validate_nwb(filepath: str | Path, verbose: bool = True) bool[source]#

Validate an NWB file using NWBInspector.

Parameters:
  • filepath (str or Path) – Path to the NWB file to validate.

  • verbose (bool, default=True) – If True, print validation results.

Returns:

True if validation passed with no errors, False otherwise.

Return type:

bool

Examples

>>> from myogen.utils.nwb import validate_nwb
>>>
>>> is_valid = validate_nwb("simulation.nwb")
>>> if is_valid:
...     print("File is valid!")