brainglobe_atlasapi.utils#

Description

Provide utility functions for brainglobe-atlasapi.

Functions

atlas_name_from_repr

Generate atlas name given a description.

atlas_repr_from_name

Generate dictionary with atlas description given the name.

check_internet_connection

Check that there is an internet connection.

check_s3_status

Check that the remote S3 bucket is accessible.

conf_from_file

Read a configuration file from a local file path.

conf_from_url

Read conf file from a URL and cache a copy of the configuration file in the brainglobe directory.

get_download_size

Get file size based on the MB value on the "src" page of each atlas.

get_latest_version

Get the latest version from a list of version strings.

load_structures_from_csv

Load structures information from a CSV file.

read_json

Read a json file.

read_tiff

Read a tiff file.

remote_to_https

Convert an s3://bucket/prefix remote to an HTTPS URL.

retrieve_over_http

Download file from remote location, with progress bar.

version_tuple_from_str

Parse a version string into a numeric tuple for comparison.