How to extract I(+) and I(-) from miller array?
Hi Pavel, Thank you very much for the leads. They were very helpful. I was able to make the desired plot. Best regards, Blaine ________________________________________ From: Pavel Afonine [[email protected]] Sent: Tuesday, June 09, 2020 2:07 PM To: Mooers, Blaine H.M. (HSC); cctbx mailing list Subject: [EXTERNAL] Re: [cctbxbb] How to extract I(+) and I(-) from miller array? Hi Blaine, this is correct, this is how anomalous data are read in and stored in an instance of miller.array class. In this case I(+) and I(-) will be stored in one miller_array, anomalous_flag will be set to True, and .indices() will contain 'plus' and 'minus' mates as well as singletons. Now, if you want to get separate I(+) and I(-), for an example look in def anomalous_signal(self, use_binning=False): def anomalous_differences(self, enforce_positive_sigmas=False): def hemisphere_acentrics(self, plus_or_minus): def hemispheres_acentrics(self): def convert_to_non_anomalous_if_ratio_pairs_lone_less_than(self, threshold): in cctbx/miller/https://urldefense.proofpoint.com/v2/url?u=http-3A__-5F-5Finit-5F-5F.py&d=DwIDaQ&c=VjzId-SM5S6aVB_cCGQ0d3uo9UfKByQ3sI6Audoy6dY&r=k0gMbcsdOcdbPUNV5tW66KQSZfXL0ewVDPVBp7tqbks&m=wysWRjTnlpkcS7AX5EQA5s_aXLBMBSAq7euZ1zI8J6I&s=Z89gPpuGtxEJFRbpBhg8EyWuOGixW13wNgllafUKGjA&e= . Pavel On 6/9/20 07:55, Mooers, Blaine H.M. (HSC) wrote:
Dear CCTBX experts,
The diffraction data for 3hz7 from RC Researcher's question includes one dataset with column labels of 'I(+)', 'SIGI(+)', 'I(-)', 'SIGI(-)'. When the diffraction data of 3hz7 data are read from a mtz file into miller arrays, it would appear that the I(+) and I(-) are stored in a single column of intensities rather than two parallel columns.
from iotbx.reflection_file_reader import any_reflection_file
hkl_file = any_reflection_file('3hz7.mtz') miller_arrays = hkl_file.as_miller_arrays(merge_equivalents=False) Iobs = miller_arrays[1] list(Iobs[100:105])
[((7, 4, 38), 84.0, 52.20000076293945), ((-7, -4, -38), 112.80000305175781, 48.20000076293945), ((8, 4, 38), 119.69999694824219, 57.400001525878906), ((-8, -4, -38), 152.10000610351562, 65.9000015258789), ((6, 5, 38), 732.5, 57.5)]
How would I extract the I(+) and I(-) into lists to plot against each other in a scatter plot in matplotlib?
Best regards,
Blaine
Blaine Mooers, Ph.D. Associate Professor Department of Biochemistry and Molecular Biology College of Medicine University of Oklahoma Health Sciences Center S.L. Young Biomedical Research Center (BRC) Rm. 466 975 NE 10th Street, BRC 466 Oklahoma City, OK 73104-5419
_______________________________________________ cctbxbb mailing list [email protected] https://urldefense.proofpoint.com/v2/url?u=http-3A__phenix-2Donline.org_mailman_listinfo_cctbxbb&d=DwIDaQ&c=VjzId-SM5S6aVB_cCGQ0d3uo9UfKByQ3sI6Audoy6dY&r=k0gMbcsdOcdbPUNV5tW66KQSZfXL0ewVDPVBp7tqbks&m=wysWRjTnlpkcS7AX5EQA5s_aXLBMBSAq7euZ1zI8J6I&s=Zkw5Au452TkeMi_7sqcMtJEaek8Q9liXZLYMVy0h9oI&e=
You are welcome, Blaine! Pavel On 6/9/20 16:56, Mooers, Blaine H.M. (HSC) wrote:
Hi Pavel,
Thank you very much for the leads. They were very helpful. I was able to make the desired plot.
Best regards,
Blaine
________________________________________ From: Pavel Afonine [[email protected]] Sent: Tuesday, June 09, 2020 2:07 PM To: Mooers, Blaine H.M. (HSC); cctbx mailing list Subject: [EXTERNAL] Re: [cctbxbb] How to extract I(+) and I(-) from miller array?
Hi Blaine,
this is correct, this is how anomalous data are read in and stored in an instance of miller.array class. In this case I(+) and I(-) will be stored in one miller_array, anomalous_flag will be set to True, and .indices() will contain 'plus' and 'minus' mates as well as singletons.
Now, if you want to get separate I(+) and I(-), for an example look in
def anomalous_signal(self, use_binning=False): def anomalous_differences(self, enforce_positive_sigmas=False): def hemisphere_acentrics(self, plus_or_minus): def hemispheres_acentrics(self): def convert_to_non_anomalous_if_ratio_pairs_lone_less_than(self, threshold):
Pavel
On 6/9/20 07:55, Mooers, Blaine H.M. (HSC) wrote:
Dear CCTBX experts,
The diffraction data for 3hz7 from RC Researcher's question includes one dataset with column labels of 'I(+)', 'SIGI(+)', 'I(-)', 'SIGI(-)'. When the diffraction data of 3hz7 data are read from a mtz file into miller arrays, it would appear that the I(+) and I(-) are stored in a single column of intensities rather than two parallel columns.
from iotbx.reflection_file_reader import any_reflection_file
hkl_file = any_reflection_file('3hz7.mtz') miller_arrays = hkl_file.as_miller_arrays(merge_equivalents=False) Iobs = miller_arrays[1] list(Iobs[100:105])
[((7, 4, 38), 84.0, 52.20000076293945), ((-7, -4, -38), 112.80000305175781, 48.20000076293945), ((8, 4, 38), 119.69999694824219, 57.400001525878906), ((-8, -4, -38), 152.10000610351562, 65.9000015258789), ((6, 5, 38), 732.5, 57.5)]
How would I extract the I(+) and I(-) into lists to plot against each other in a scatter plot in matplotlib?
Best regards,
Blaine
Blaine Mooers, Ph.D. Associate Professor Department of Biochemistry and Molecular Biology College of Medicine University of Oklahoma Health Sciences Center S.L. Young Biomedical Research Center (BRC) Rm. 466 975 NE 10th Street, BRC 466 Oklahoma City, OK 73104-5419
_______________________________________________ cctbxbb mailing list [email protected] https://urldefense.proofpoint.com/v2/url?u=http-3A__phenix-2Donline.org_mailman_listinfo_cctbxbb&d=DwIDaQ&c=VjzId-SM5S6aVB_cCGQ0d3uo9UfKByQ3sI6Audoy6dY&r=k0gMbcsdOcdbPUNV5tW66KQSZfXL0ewVDPVBp7tqbks&m=wysWRjTnlpkcS7AX5EQA5s_aXLBMBSAq7euZ1zI8J6I&s=Zkw5Au452TkeMi_7sqcMtJEaek8Q9liXZLYMVy0h9oI&e=
_______________________________________________ cctbxbb mailing list [email protected] http://phenix-online.org/mailman/listinfo/cctbxbb
participants (2)
-
Mooers, Blaine H.M. (HSC)
-
Pavel Afonine