Skip to content

Commit 4afc6a6

Browse files
automatically set xtype=d when creating diffraction objects
1 parent 9ae8d9e commit 4afc6a6

1 file changed

Lines changed: 11 additions & 0 deletions

File tree

src/diffpy/utils/scattering_objects/diffraction_objects.py

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -463,13 +463,24 @@ def set_all_arrays(self):
463463
if xtype == "q":
464464
self.on_tth[0] = self.q_to_tth()
465465
self.on_tth[1] = master_array[1]
466+
self.on_d[0] = self.q_to_d()
467+
self.on_d[1] = master_array[1]
466468
if xtype == "tth":
467469
self.on_q[0] = self.tth_to_q()
468470
self.on_q[1] = master_array[1]
471+
self.on_d[0] = self.tth_to_d()
472+
self.on_d[1] = master_array[1]
473+
if xtype == "d":
474+
self.on_tth[0] = self.d_to_tth()
475+
self.on_tth[1] = master_array[1]
476+
self.on_q[0] = self.d_to_q()
477+
self.on_q[1] = master_array[1]
469478
self.tthmin = self.on_tth[0][0]
470479
self.tthmax = self.on_tth[0][-1]
471480
self.qmin = self.on_q[0][0]
472481
self.qmax = self.on_q[0][-1]
482+
self.dmin = self.on_d[0][0]
483+
self.dmax = self.on_d[0][-1]
473484

474485
def _get_original_array(self):
475486
if self.input_xtype in QQUANTITIES:

0 commit comments

Comments
 (0)