class src::drt::python::core::Study 
class src::drt::python::core::Study
  : public _Study
Python intermediate for libdrt._Study.
Allow for the construction of a system, specification of study conditions, and finally the abillity to run a study. Note that many things may be preconfigured in the config files.
Summary
| Members | Descriptions | 
|---|---|
| __init__(self, Union[str, Series], Optional[Union[Type[Atom], Structure]], Optional][Union[Callable, sympy.Expr], Optional[np.ndarray], Optional][Union[Config, str], bool, bool, bool, **kwargs) | General constructor for starting a study. | 
| segment_density(self) → np.ndarray | Counts the dislocation density for a study per voxel. | 
| density(self) → np.ndarray | Computes the per system dislocation density for a study. | 
| edge_density(self) → np.ndarray | Computes the per system edge dislocation density for a study. | 
| screw_density(self) → np.ndarray | Computes the per system screw dislocation density for a study. | 
| mixed_density(self) → np.ndarray | Computes the per system mixed dislocation density for a study. | 
| partial_gradient(self, int, int, bool, bool) → np.ndarray | Partial computation for calculating the gradient of the system. | 
| gradient(self) → np.ndarray | Computes the gradient of the whole system without periodic images (property). | 
| adjusted_gradient(self) → np.ndarray | Computes the gradient of the whole system without periodic images (property). | 
| average(self) → np.ndarray | Computes the average gradient (property). | 
| periodicity_gradient(self) → np.ndarray | Computes the gradient at the boundary of the periodic cell (property). | 
| deformation(self) → np.ndarray | Computes the deformed lattice cell (property). | 
| graph(self) →Graph | Returns an adjacency wrapper on a per voxel level. | 
| subgraph(self) → "Graph.SubGraph" | Returns an adjacency wrapper on a per voxel level. | 
| deviations(self, np.ndarray) → np.ndarray | Computes the angle deviations of the system about given factors. | 
| phase_space(self, np.ndarray, np.ndarray) → Tuple[np.ndarray, np.ndarray] | Computes the angle deviations of the system about given factors. | 
| reciprocals(self, np.ndarray) → Tuple[np.ndarray, np.ndarray, np.ndarray] | Computes the angle deviations of the system about given factors. | 
| raytrace(self, np.ndarray, Optional[np.ndarray], Optional[np.ndarray], point_source) → np.ndarray | Computes the raytraced image of the system. | 
Members
__init__
__init__(self, study : Union[str, Series], structure : Optional[Union[Type[Atom], Structure]]=None, spectra : Optional][Union[Callable, sympy.Expr]=None, precomputed_gradient : Optional[np.ndarray]=None, config : Optional][Union[Config, str]=None, periodicity : bool=False, reset : bool=False, persist_microstructure : bool=True, **kwargs)
General constructor for starting a study.
Creates a Study and optionally seeds initial parameters:
Parameters
- 
studythe file name or pd3.Study object to perform the raytracing with.
- 
resetboolean whether to flush GPU cache. Note this will corrupt exisiting studies.
segment_density
segment_density(self) → np.ndarray
Counts the dislocation density for a study per voxel.
density
density(self) → np.ndarray
Computes the per system dislocation density for a study.
TODO: Finish total implementation of this + different types of crystal type.
Returns: resolution x 13 dislocation densities, where 13 corresponds to the 12 slip systems + uncategorized.
edge_density
edge_density(self) → np.ndarray
Computes the per system edge dislocation density for a study.
NOTE: Only works for FCC for now. Returns: resolution x 13 dislocation densities, where 13 corresponds to the 12 slip systems + uncategorized.
screw_density
screw_density(self) → np.ndarray
Computes the per system screw dislocation density for a study.
NOTE: Only works for FCC for now. Returns: resolution x 7 dislocation densities, where 7 corresponds to the 6 bv + uncategorized.
mixed_density
mixed_density(self) → np.ndarray
Computes the per system mixed dislocation density for a study.
NOTE: Only works for FCC for now. Returns: resolution x 7 dislocation densities, where 7 corresponds to the 6 bv + uncategorized.
partial_gradient
partial_gradient(self, count : int=1, total : int=1, periodicity : bool=False, local : bool=False) → np.ndarray
Partial computation for calculating the gradient of the system.
Calculates the count/total section of the gradients. 
Parameters
- 
countthe gradient section to calculate. 1 <=count<=total
- 
totalthe count of possible sections.
- 
periodicityflag for determining whether to factor in mirror cells.
gradient
gradient(self) → np.ndarray
Computes the gradient of the whole system without periodic images (property).
adjusted_gradient
adjusted_gradient(self) → np.ndarray
Computes the gradient of the whole system without periodic images (property).
average
average(self) → np.ndarray
Computes the average gradient (property).
NOTE: There is a slight discrepacy between this value, and the numpy computed value. For now, use the numpy value. See issue/13
periodicity_gradient
periodicity_gradient(self) → np.ndarray
Computes the gradient at the boundary of the periodic cell (property).
deformation
deformation(self) → np.ndarray
Computes the deformed lattice cell (property).
graph
Returns an adjacency wrapper on a per voxel level.
subgraph
subgraph(self) → "Graph.SubGraph"
Returns an adjacency wrapper on a per voxel level.
deviations
deviations(self, factors : np.ndarray) → np.ndarray
Computes the angle deviations of the system about given factors.
Parameters
- factorsthe HKL integer factors for reflection.
phase_space
phase_space(self, source : np.ndarray, factors : np.ndarray) → Tuple[np.ndarray, np.ndarray]
Computes the angle deviations of the system about given factors.
Parameters
- factorsthe HKL integer factors for reflection.
Returns: A tuple of the points in reciprocal space, and the corresponding intensities
reciprocals
reciprocals(self, factors : np.ndarray) → Tuple[np.ndarray, np.ndarray, np.ndarray]
Computes the angle deviations of the system about given factors.
Parameters
- factorsthe HKL integer factors for reflection.
Returns: A tuple of the points in reciprocal space, and the corresponding intensities and energies
raytrace
raytrace(self, factors : np.ndarray, orientations : Optional[np.ndarray]=None, weights : Optional[np.ndarray]=None, point_source=False) → np.ndarray
Computes the raytraced image of the system.
Parameters
- factorsthe HKL integer factors for reflection.