reciprocalspaceship.algorithms.compute_intensity_from_structurefactor

reciprocalspaceship.algorithms.compute_intensity_from_structurefactor(ds, F_key, SigF_key, output_columns=None, inplace=False)[source]

Compute intensities (I) and uncertainty estimates (SigI) from structure factor amplitudes (F) and their uncertainties (SigF) using error propagation

Intensity computed as I = SigF*SigF + F*F. Intensity error estimate approximated as SigI = abs(2*F*SigF)

Parameters:
  • ds (DataSet) – Input DataSet containing columns with F_key and SigF_key labels

  • F_key (str) – Column label for structure factor amplitudes

  • SigF_key (str) – Column label for structure factor error estimates

  • output_columns (list or tuple of column names) – Column labels to be added to ds for calculated I and SigI, respectively. output_columns must have len=2.

  • inplace (bool) – Whether to modify the DataSet in place or create a copy

Returns:

DataSet – DataSet with 2 additional columns corresponding to calculated intensities and intensity error estimates