validate_atlas#

brainglobe_atlasapi.atlas_generation.validate_atlases.validate_atlas(atlas_name, version, validation_functions)[source]#

Validate the latest version of a given atlas.

This function attempts to load the specified atlas, updates it if necessary, and then runs a suite of provided validation functions against it. It collects and reports the results of each validation check.

Parameters:
  • atlas_name (str) – The name of the atlas to validate.

  • version (str) – The version of the atlas to validate. (Currently not directly used for loading, but passed from get_all_atlases_lastversions).

  • validation_functions (list of callable) – A list of functions, each expecting a BrainGlobeAtlas object as input and designed to perform a specific validation check.

Returns:

A dictionary containing the validation results for the specified atlas. The format is {atlas_name: [(function_name, error_message, status)]}. error_message is None if the check passes.

Return type:

dict