Skip to content

Commit

Permalink
changes made durring BMM testing
Browse files Browse the repository at this point in the history
  • Loading branch information
bruceravel committed Nov 19, 2020
1 parent 0aed96b commit 198a0ec
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 16 deletions.
2 changes: 1 addition & 1 deletion startup/30-detectors.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@


run_report('\t'+'dwelltime')
with_quadem, with_struck, with_dualem, with_xspress3 = True, True, False, True
with_quadem, with_struck, with_dualem, with_xspress3 = True, True, False, False
from BMM.dwelltime import LockedDwellTimes

_locked_dwell_time = LockedDwellTimes('', name='dwti')
Expand Down
18 changes: 9 additions & 9 deletions startup/BMM/edge.py
Original file line number Diff line number Diff line change
Expand Up @@ -159,15 +159,15 @@ def change_edge(el, focus=False, edge='K', energy=None, slits=True, target=300.,
print(' %s: %s' % (list_msg('focus'), str(focus)))
print(' %s: %s' % (list_msg('photon delivery mode'), mode))
print(' %s: %s' % (list_msg('optimizing slits height'), str(slits)))
if BMMuser.prompt:
action = input("\nBegin energy change? [Y/n then Enter] ")
if action.lower() == 'q' or action.lower() == 'n':
return(yield from null())
if mode == 'C' and energy < 6000:
print(warning_msg('\nMoving to mode C for focused beam and an edge energy below 6 keV.'))
action = input("You will not get optimal harmonic rejection. Continue anyway? [Y/n then Enter] ")
if action.lower() == 'q' or action.lower() == 'n':
return(yield from null())
# if BMMuser.prompt:
# action = input("\nBegin energy change? [Y/n then Enter] ")
# if action.lower() == 'q' or action.lower() == 'n':
# return(yield from null())
# if mode == 'C' and energy < 6000:
# print(warning_msg('\nMoving to mode C for focused beam and an edge energy below 6 keV.'))
# action = input("You will not get optimal harmonic rejection. Continue anyway? [Y/n then Enter] ")
# if action.lower() == 'q' or action.lower() == 'n':
# return(yield from null())

start = time.time()
if mode == 'XRD':
Expand Down
1 change: 1 addition & 0 deletions startup/BMM/logging.py
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,7 @@ def BMM_log_info(message):
print(error_msg('\t\t\tslack_secret file not found!'))

def post_to_slack(text):
return
try:
channel = BMMuser.slack_channel
except:
Expand Down
2 changes: 1 addition & 1 deletion startup/BMM/user.py
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,7 @@ def __init__(self):
self.bounds = [-200, -30, 15.3, '14k'] ## scan grid parameters
self.steps = [10, 0.5, '0.05k']
self.times = [0.5, 0.5, '0.25k']
self.folder = os.environ.get('HOME')+'/data/'
self.folder = os.environ.get('HOME')+'/Data/'
self.filename = 'data.dat'
self.experimenters = ''
self.e0 = None
Expand Down
11 changes: 6 additions & 5 deletions startup/BMM/xafs.py
Original file line number Diff line number Diff line change
Expand Up @@ -713,11 +713,11 @@ def main_plan(inifile, **kwargs):
else:
print('\nPseudo-channel-cut energy = %.1f' % eave)

action = input("\nBegin scan sequence? [Y/n then Enter] ")
if action.lower() == 'q' or action.lower() == 'n':
BMMuser.final_log_entry = False
yield from null()
return
# action = input("\nBegin scan sequence? [Y/n then Enter] ")
# if action.lower() == 'q' or action.lower() == 'n':
# BMMuser.final_log_entry = False
# yield from null()
# return


## --*--*--*--*--*--*--*--*--*--*--*--*--*--*--*--*--*--*--*--
Expand Down Expand Up @@ -772,6 +772,7 @@ def main_plan(inifile, **kwargs):
## --*--*--*--*--*--*--*--*--*--*--*--*--*--*--*--*--
## measure XRF spectrum at Eave
xrfuid, xrffile, xrfimage = None, None, None
image_web, xascam_uid, image_ana, anacam_uid = None, None, None, None
html_dict['xrffile'], html_dict['xrfsnap'] = None, None
if 'xs' in p['mode'] and BMMuser.lims is True:
report('measuring an XRF spectrum at %.1f eV' % eave, 'bold')
Expand Down

0 comments on commit 198a0ec

Please sign in to comment.