People, I am trying to figure out how to extract the calculated phases from an .MTZ file using CCTBX, so far I have this code:
from iotbx.reflection_file_reader import any_reflection_file hkl_file = any_reflection_file('3hz7.mtz') arrays = hkl_file.as_miller_arrays(merge_equivalents=False) arrays.phases() #<---- Error
But I get the following error:
Traceback (most recent call last): arrays.phases() File "/home/acresearch/Desktop/CCTBX/mc3/envs/tenv/lib/python3.8/site-packages/cctbx/miller/__init__.py", line 3871, in phases assert isinstance(self.data(), flex.complex_double) AssertionError
The CCTBX documentation does not have any explanation on how to use .phases() nor shows any example of it that allows me to understand how it is used.
Does anyone know how to extract the phases from an .MTZ file? if not with CCTBX then with another python library?