From 198a0eca0a69c5103aeed105d1af05739be6c761 Mon Sep 17 00:00:00 2001 From: Bruce Ravel Date: Thu, 19 Nov 2020 14:33:28 -0500 Subject: [PATCH] changes made durring BMM testing --- startup/30-detectors.py | 2 +- startup/BMM/edge.py | 18 +++++++++--------- startup/BMM/logging.py | 1 + startup/BMM/user.py | 2 +- startup/BMM/xafs.py | 11 ++++++----- 5 files changed, 18 insertions(+), 16 deletions(-) diff --git a/startup/30-detectors.py b/startup/30-detectors.py index fc64b1ed..740a4f71 100644 --- a/startup/30-detectors.py +++ b/startup/30-detectors.py @@ -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') diff --git a/startup/BMM/edge.py b/startup/BMM/edge.py index 6bc329b3..49d293c2 100644 --- a/startup/BMM/edge.py +++ b/startup/BMM/edge.py @@ -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': diff --git a/startup/BMM/logging.py b/startup/BMM/logging.py index b9e3e007..fde3c659 100644 --- a/startup/BMM/logging.py +++ b/startup/BMM/logging.py @@ -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: diff --git a/startup/BMM/user.py b/startup/BMM/user.py index 8fe8ad17..c1372820 100644 --- a/startup/BMM/user.py +++ b/startup/BMM/user.py @@ -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 diff --git a/startup/BMM/xafs.py b/startup/BMM/xafs.py index 30aa8eee..17d62c6f 100644 --- a/startup/BMM/xafs.py +++ b/startup/BMM/xafs.py @@ -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 ## --*--*--*--*--*--*--*--*--*--*--*--*--*--*--*--*--*--*--*-- @@ -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')