Skip to content
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
- Fix for random phase values on Merlin when using PyChop not in instrument scientist mode.
Original file line number Diff line number Diff line change
Expand Up @@ -214,6 +214,11 @@ def setFreq(self, freqtext=None, **kwargs):
# Checks for independent phases
phases = []
for key, widget in self.widgets.items():
if "MERLIN" in str(self.engine.instname) and key.endswith("Phase") and widget["Label"].isHidden():
# Special case for MERLIN
# sets the default phase for Chopper0Phase if not in "Instrument Scientist Mode"
phase = float(widget["Edit"].text())
phases.append(phase)
if key.endswith("Phase") and not widget["Label"].isHidden():
idx = int(key[7])
phase = widget["Edit"].text()
Expand Down Expand Up @@ -642,9 +647,9 @@ def _gen_text_ei(self, ei, obj_in):
txt += "# Ei = %8.2f meV\n" % (ei)
txt += "# Flux = %8.2f n/cm2/s\n" % (flux)
txt += "# Elastic resolution = %6.2f meV\n" % (res[0])
txt += "# Time width at sample = %6.2f us, of which:\n" % (1e6 * np.sqrt(tsqvan))
txt += "# Time width at sample = %6.2f us, of which:\n" % (1e6 * np.sqrt(tsqvan[0]))
for ky, val in list(tsqdic.items()):
txt += "# %20s : %6.2f us\n" % (ky, 1e6 * np.sqrt(val))
txt += "# %20s : %6.2f us\n" % (ky, 1e6 * np.sqrt(val[0]))
txt += "# %s distances:\n" % (obj.instname)
txt += "# x0 = %6.2f m (%s to Fermi)\n" % (x0, first_component)
txt += "# x1 = %6.2f m (Fermi to sample)\n" % (x1)
Expand Down
2 changes: 1 addition & 1 deletion scripts/pychop/merlin.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ chopper_system:
radius: 300 # Disk radius
isDouble: False # Is this a double disk system?
isPhaseIndependent: True # Is this disk to be phased independently?
defaultPhase: 12800 # What is the default phase for this disk (either a time in microseconds
defaultPhase: 12400 # What is the default phase for this disk (either a time in microseconds
# or a slot index [as a string] for the desired rep to go through)
phaseOffset: 11300 # Offset introduced after disk chopper controller update
phaseName: 'Disk chopper phase delay time'
Expand Down