allensdk.internal.brain_observatory.annotated_region_metrics module

Module for calculating annotated region metrics from ISI data

allensdk.internal.brain_observatory.annotated_region_metrics.create_region_mask(image_shape, x, y, width, height, mask)[source]

Create mask for region on retinotopic map

Parameters:
image_shapetuple

(height, width) of retinotopic map

xint

x offset of region mask within retinotopic map

yint

y offset of region mask within retinotopic map

widthint

width of region mask

heightint

height of region mask

masklist

region mask as a list of lists

Returns:
numpy.ndarray

Region mask

allensdk.internal.brain_observatory.annotated_region_metrics.eccentricity(az, alt, az_center, alt_center)[source]

Compute eccentricity

Parameters:
aznumpy.ndarray

Azimuth retinotopic map

altnumpy.ndarray

Altitude retinotopic map

az_centerfloat

Azimuth value to use as center of eccentricity map

alt_centerfloat

Altitude value to use as center of eccentricity map

Returns:
numpy.ndarray

Eccentricity map

allensdk.internal.brain_observatory.annotated_region_metrics.get_metrics(altitude_phase, azimuth_phase, x=None, y=None, width=None, height=None, mask=None, altitude_scale=0.322, azimuth_scale=0.383)[source]

Calculate annotated region metrics

allensdk.internal.brain_observatory.annotated_region_metrics.retinotopy_metric(mask, isi_map)[source]

Compute retinotopic metrics for a responding area

Parameters:
masknumpy.ndarray

Mask representing the area over which to calculate metrics

isi_mapnumpy.ndarray

Retinotopic map

Returns:
(float, float, float, float) tuple

min, max, range, bias of retinotopic map over masked region