torchref.maps.difference_map module
Isomorphous difference map from two datasets.
Computes a difference Fourier map using DF = F_data - F_reference with phases from a model, after scaling both datasets to a common reference.
- class torchref.maps.difference_map.DifferenceMap(data, data_reference, model, gridsize=None, device=None)[source]
Bases:
MapIsomorphous difference map between two datasets.
Scales both datasets to a common reference using
DatasetCollection, then computes difference Fourier coefficients:DF * exp(i * phi_calc)whereDF = F_data - F_reference.- Parameters:
data (ReflectionData) – Reflection data for the perturbed state (e.g., light, derivative).
data_reference (ReflectionData) – Reflection data for the reference state (e.g., dark, native).
model (ModelFT) – Model for computing phases.
gridsize (tuple of int, optional) – Grid dimensions (nx, ny, nz). If None, determined automatically.