Commit 211d2798 authored by Thomas Vincent's avatar Thomas Vincent

avoid useless computation until there is a default bin size for

spherical coords
parent 91003a94
......@@ -636,19 +636,19 @@ class QSpaceWidget(Qt.QDialog):
entry = entries[0] # Get default config from first entry
for coordinates in QSpaceCoordinates.ALLOWED:
# Compute Qspace conversion
q_array = qspace_conversion(
img_size=xsocsH5.image_size(entry),
center_chan=xsocsH5.direct_beam(entry),
chan_per_deg=xsocsH5.chan_per_deg(entry),
beam_energy=xsocsH5.beam_energy(entry),
phi=phi,
eta=eta,
nu=nu,
delta=delta,
coordinates=coordinates)
if coordinates == QSpaceCoordinates.CARTESIAN:
# Compute Qspace conversion
q_array = qspace_conversion(
img_size=xsocsH5.image_size(entry),
center_chan=xsocsH5.direct_beam(entry),
chan_per_deg=xsocsH5.chan_per_deg(entry),
beam_energy=xsocsH5.beam_energy(entry),
phi=phi,
eta=eta,
nu=nu,
delta=delta,
coordinates=coordinates)
# Estimate bin numbers based on smallest distance between q vectors
maxbins = []
for dim in (q_array[..., 0], q_array[..., 1], q_array[..., 2]):
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment