allensdk.api.queries.grid_data_api module

class allensdk.api.queries.grid_data_api.GridDataApi(resolution=None, base_uri=None)[source]

Bases: RmaApi

HTTP Client for the Allen 3-D Expression Grid Data Service.

See: Downloading 3-D Expression Grid Data

DATA_MASK = 'data_mask'
DENSITY = 'density'
ENERGY = 'energy'
INJECTION_DENSITY = 'injection_density'
INJECTION_ENERGY = 'injection_energy'
INJECTION_FRACTION = 'injection_fraction'
INTENSITY = 'intensity'
PROJECTION_DENSITY = 'projection_density'
PROJECTION_ENERGY = 'projection_energy'
download_alignment3d(section_data_set_id, num_rows='all', count=False, **kwargs)[source]

Download the parameters of the 3D affine tranformation mapping this section data set’s image-space stack to CCF-space (or vice-versa).

Parameters:
section_data_set_idint

download the parameters for this data set.

Returns:
dict

parameters of this section data set’s alignment3d

download_deformation_field(section_data_set_id, header_path=None, voxel_path=None, voxel_type='DeformationFieldVoxels', header_type='DeformationFieldHeader')[source]

Download the local alignment parameters for this dataset. This a 3D vector image (3 components) describing a deformable local mapping from CCF voxels to this section data set’s affine-aligned image stack.

Parameters:
section_data_set_idint

Download the deformation field for this data set

header_pathstr, optional

If supplied, the deformation field header will be downloaded to this path.

voxel_pathstr, optiona

If supplied, the deformation field voxels will be downloaded to this path.

voxel_typestr

WellKnownFileType of this dataset’s data file

header_typestr

WellKnownFileType of this dataset’s header file

download_expression_grid_data(section_data_set_id, include=None, path=None)[source]

Download in zipped metaimage format.

Parameters:
section_data_set_idinteger

What to download.

includelist of strings, optional

Image volumes. ‘energy’ (default), ‘density’, ‘intensity’.

pathstring, optional

File name to save as.

Returns:
file3-D expression grid data packaged into a compressed archive file (.zip).
download_gene_expression_grid_data(section_data_set_id, volume_type, path)[source]

Download a metaimage file containing registered gene expression grid data

Parameters:
section_data_set_idint

Download data from this experiment

volume_typestr

Download this type of data (options are GridDataApi.ENERGY, GridDataApi.DENSITY, GridDataApi.INTENSITY)

pathstr

Download to this path

download_projection_grid_data(section_data_set_id, image=None, resolution=None, save_file_path=None)[source]

Download in NRRD format.

Parameters:
section_data_set_idinteger

What to download.

imagelist of strings, optional

Image volume. ‘projection_density’, ‘projection_energy’, ‘injection_fraction’, ‘injection_density’, ‘injection_energy’, ‘data_mask’.

resolutioninteger, optional

in microns. 10, 25, 50, or 100 (default).

save_file_pathstring, optional

File name to save as.

Notes

See Downloading 3-D Projection Grid Data for additional documentation.