mcmodels.core.Experiment¶
-
class
mcmodels.core.Experiment(injection_density=None, projection_density=None)[source]¶ Class containing the data from an anterograde injection
Experiment conveniently compiles the relevant information from a given anterograde viral tracing experiment data.
Parameters: - voxel_model_cache : VoxelModelCache object
This supplies the interface for pulling experimental data.
- experiment_id : int
AllenSDK id assigned to given experiment
Examples
>>> from mcmodels.core import Experiment, VoxelModelCache >>> cache = VoxelModelCache() >>> eid = 100141273 >>> exp = Experiment(voxel_model_cache, eid) >>> exp.injection_density.shape (132,80,114)
Attributes: bilateral_injectionReturns injection hemisphere
centroidReturns centroid of the injection density.
injection_hemisphere_idReturns injection hemisphere
injection_volumeReturns total injection volume = sum(injection_density)
normalized_injection_densityReturns injection density normalized to have unit sum.
normalized_projection_densityReturns projection_density normalized by the total injection_density
projection_volumeReturns total projection volume = sum(projection_density)
Methods
flip(self)Reflects experiment along midline. from_cache(cache, experiment_id[, …])Alternative constructor allowing for pulling grid data. get_injection get_projection Methods
__init__(self[, injection_density, …])flip(self)Reflects experiment along midline. from_cache(cache, experiment_id[, …])Alternative constructor allowing for pulling grid data. get_injection(self[, normalized])get_projection(self[, normalized])-
bilateral_injection¶ Returns injection hemisphere
-
centroid¶ Returns centroid of the injection density.
-
classmethod
from_cache(cache, experiment_id, data_mask_tolerance=None)[source]¶ Alternative constructor allowing for pulling grid data.
Parameters: - cache : VoxelModelCache or MouseConnectivityCache instance.
Object used to pull grid data.
- experiment_id : int
Experiment id of the experiment from which to pull grid data.
- data_mask_tolerance : float, optional (default = None)
Tolerance with which to mask ‘bad’ data. data_mask array has values on the interval [0,1], where a nonzero element indicates a ‘bad’ voxel. If None is passed, the parameter defaults to DEFAULT_DATA_MASK_TOLERANCE (0.5).
-
injection_hemisphere_id¶ Returns injection hemisphere
-
injection_volume¶
-
normalized_injection_density¶ Returns injection density normalized to have unit sum.
-
normalized_projection_density¶ Returns projection_density normalized by the total injection_density
-
projection_volume¶