From 6bc633f3c5652672ce80c0afdcb6e0a8ad95c7ed Mon Sep 17 00:00:00 2001 From: PriyankaKetkarBNL <155195376+PriyankaKetkarBNL@users.noreply.github.com> Date: Thu, 10 Oct 2024 15:09:49 -0400 Subject: [PATCH 01/15] Update spreadsheets.py --- rsoxs/Functions/spreadsheets.py | 1 - 1 file changed, 1 deletion(-) diff --git a/rsoxs/Functions/spreadsheets.py b/rsoxs/Functions/spreadsheets.py index 59afb99..4e8a613 100644 --- a/rsoxs/Functions/spreadsheets.py +++ b/rsoxs/Functions/spreadsheets.py @@ -7,7 +7,6 @@ def load_sheet(path): newbar = load_samplesxlsx(path) if isinstance(newbar, list): rsoxs_config['bar'] = newbar - ##rsoxs_config.write() print(f'replaced persistent bar with bar loaded from {path}') return From ef80e06b25687af40f84f37aba3bdb993855116e Mon Sep 17 00:00:00 2001 From: PriyankaKetkarBNL <155195376+PriyankaKetkarBNL@users.noreply.github.com> Date: Thu, 10 Oct 2024 15:11:20 -0400 Subject: [PATCH 02/15] Update rsoxs_plans.py --- rsoxs/Functions/rsoxs_plans.py | 3 --- 1 file changed, 3 deletions(-) diff --git a/rsoxs/Functions/rsoxs_plans.py b/rsoxs/Functions/rsoxs_plans.py index da0a6c0..e38991e 100644 --- a/rsoxs/Functions/rsoxs_plans.py +++ b/rsoxs/Functions/rsoxs_plans.py @@ -34,7 +34,6 @@ motors = {"temp_ramp_rate": tem_tempstage.ramp_rate} -#@finalize_decorator(#rsoxs_config.write_plan) def run_bar( bar=None, sort_by=["apriority"], @@ -72,7 +71,6 @@ def run_bar( _description_ """ if bar == None: - #rsoxs_config.read() bar = rsoxs_config['bar'] if dry_run: verbose = True @@ -120,7 +118,6 @@ def run_bar( message += f'total time {time_sec(actual_total_time)}, expected {time_sec(queue_step["time_before"]+queue_step["acq_time"])}\n' message += f'expected time remaining {time_sec(queue_step["time_after"])} plus overhead\n' - #rsoxs_config.write() # bar may have changed - added annotations etc message = message[:message.rfind('expected')] message += f"End of Queue" rsoxs_bot.send_message(message) From ccee59337d52b77bdec72e21d71a49797bcacfac Mon Sep 17 00:00:00 2001 From: PriyankaKetkarBNL <155195376+PriyankaKetkarBNL@users.noreply.github.com> Date: Thu, 10 Oct 2024 15:13:01 -0400 Subject: [PATCH 03/15] Update fly_alignment.py --- rsoxs/Functions/fly_alignment.py | 3 --- 1 file changed, 3 deletions(-) diff --git a/rsoxs/Functions/fly_alignment.py b/rsoxs/Functions/fly_alignment.py index ab0c026..b139f2c 100644 --- a/rsoxs/Functions/fly_alignment.py +++ b/rsoxs/Functions/fly_alignment.py @@ -334,8 +334,6 @@ def find_optimum_motor_pos(db, uid, motor_name='RSoXS Sample Up-Down', signal_na -#@finalize_decorator(#rsoxs_config.write_plan) -#RE(fly_find_fiducials(f2=[3.5,-1,-2.4,1.5],f1=[2.0,-0.9,-1.5,0.8],y1=-187.5,y2=2)) # new encoders #def fly_find_fiducials(f2=[7.5,5,-2.5,0],f1=[4.6, 4, 1, 1.1],y2=2.5,y1=-188): def fly_find_fiducials(f2=[3.5,-1,-2.4,1.5],f1=[2.0,-0.9,-1.5,0.8],y1=-187.5,y2=2): thoffset = 0 @@ -380,7 +378,6 @@ def fly_find_fiducials(f2=[3.5,-1,-2.4,1.5],f1=[2.0,-0.9,-1.5,0.8],y1=-187.5,y2= accept = input(f"Do you want to apply this correction (y,n)?") if accept in ['y','Y','yes']: back = False - #rsoxs_config.read() for samp in rsoxs_config['bar']: if samp['front'] ==False: back = True From aee245df31d7148831331b2d96cbba03b5a92b4b Mon Sep 17 00:00:00 2001 From: PriyankaKetkarBNL <155195376+PriyankaKetkarBNL@users.noreply.github.com> Date: Thu, 10 Oct 2024 15:16:44 -0400 Subject: [PATCH 04/15] Update alignment.py --- rsoxs/Functions/alignment.py | 69 +----------------------------------- 1 file changed, 1 insertion(+), 68 deletions(-) diff --git a/rsoxs/Functions/alignment.py b/rsoxs/Functions/alignment.py index 5b11ed7..86d449b 100755 --- a/rsoxs/Functions/alignment.py +++ b/rsoxs/Functions/alignment.py @@ -154,8 +154,7 @@ def duplicate_sample(samp_num,name_suffix): newsamp['sample_name']+=f'_{name_suffix}' newsamp['sample_id']+=f'_{name_suffix}' rsoxs_config['bar'].append(newsamp) - #rsoxs_config.write() - + def move_to_location(locs=get_sample_location()): for item in locs: @@ -466,7 +465,6 @@ def samxscan(): -#@finalize_decorator(#rsoxs_config.write_plan) def spiralsearch( diameter=0.6, stepsize=0.2, @@ -603,76 +601,12 @@ def spiralsearch( -# Bar imaging utilities: - -# usage: - -# load bar onto imager, load bar file, and do image_bar(bar,path='path_to_image') - -# this will automatically go into image tagging, but to pick up where you left off, do - -# locate_samples_from_image(bar,'path_to_image') - -# Find alignment fiducials in chamber -# -# Helpful Functions goto_af1() goto_af2() and find_af1x(),find_af1y(),find_af2x(),find_af2y() -# -# and then remap the bar using -# correct_bar(bar,af1x,af1y,af2x,af2y) - - -# def find_fiducials(f2=[7.5, 3.5, -2.5, 1.1]): -# thoffset = 0 -# angles = [-90 + thoffset, 0 + thoffset, 90 + thoffset, 180 + thoffset] -# xrange = 3.5 -# xnum = 36 -# startxss = [f2, [4.2, 3.5, 1, 1.1]] -# yield from bps.mv(Shutter_enable, 0) -# yield from bps.mv(Shutter_control, 0) -# yield from load_configuration("SAXSNEXAFS") -# Beamstop_SAXS.kind = "hinted" -# # yield from bps.mv(DiodeRange, 7) -# # bec.enable_plots() # TODO: need to turn on plotting temporarilly for this function -# startys = [3, -187.0] # af2 first because it is a safer location -# maxlocs = [] -# for startxs, starty in zip(startxss, startys): -# yield from bps.mv(sam_Y, starty, sam_X, startxs[1], sam_Th, 0, sam_Z, 0) -# yield from bps.mv(Shutter_control, 1) -# yield from bp.rel_scan([Beamstop_SAXS], sam_Y, -1, 0.5, 16) # TODO: replace with flymax -# yield from bps.mv(Shutter_control, 0) -# #maxlocs.append(bec.peaks.max["SAXS Beamstop"][0]) #TODO: need to find maxiumum another way -# # yield from bps.mv(sam_Y, bec.peaks.max["SAXS Beamstop"][0]) -# for startx, angle in zip(startxs, angles): -# yield from bps.mv(sam_X, startx, sam_Th, angle) -# yield from bps.mv(Shutter_control, 1) -# yield from bp.scan( # TODO: replace with flymax -# [Beamstop_SAXS], -# sam_X, -# startx - 0.5 * xrange, -# startx + 0.5 * xrange, -# xnum, -# ) -# yield from bps.mv(Shutter_control, 0) -# yield from bps.sleep(3) -# # maxlocs.append(bec.peaks.max["SAXS Beamstop"][0]) #TODO: need to find maxiumum another way -# print(maxlocs) # [af2y,af2xm90,af2x0,af2x90,af2x180,af1y,af1xm90,af1x0,af1x90,af1x180] -# accept = input(f"Do you want to apply this correction (y,n)?") -# if accept in ['y','Y','yes']: -# back = False -# #rsoxs_config.read() -# for samp in rsoxs_config['bar']: -# if samp['front'] ==False: -# back = True -# correct_bar(maxlocs,include_back=back) -# # bec.disable_plots() - def rotate_now(theta, force=False): if theta is not None: samp = get_sample_dict() samp["angle"] = theta rotate_sample(samp, force) - #rsoxs_config.write() yield from load_sample(samp) @@ -686,7 +620,6 @@ def jog_samp_zoff(id_or_num,jog_val,write_default=True,move=True): samp['bar_loc']['zoff'] += jog_val if write_default: rotate_sample(samp) # this will write the new rotated positions into the position (without moving anything) - #rsoxs_config.write() # this saves the zoff and the new rotated position to the persistent sample list if(move): RE(load_samp(id_or_num)) else: From a625b308848f7d56dc4ec6e355230eb09bb83bc3 Mon Sep 17 00:00:00 2001 From: PriyankaKetkarBNL <155195376+PriyankaKetkarBNL@users.noreply.github.com> Date: Thu, 10 Oct 2024 15:18:25 -0400 Subject: [PATCH 05/15] Update energyscancore.py --- rsoxs/Functions/energyscancore.py | 4 ---- 1 file changed, 4 deletions(-) diff --git a/rsoxs/Functions/energyscancore.py b/rsoxs/Functions/energyscancore.py index 4c833bf..9837c0f 100644 --- a/rsoxs/Functions/energyscancore.py +++ b/rsoxs/Functions/energyscancore.py @@ -103,7 +103,6 @@ def cleanup(): yield from bps.mv(Shutter_control, 0) -#@finalize_decorator(##rsoxs_config.write_plan) def NEXAFS_step_scan_core( dets=None, # a list of detectors to run at each step - must be scalar type detectors wtih set_exp functions energy=None, # optional energy object to set energy commands to - sets to energy by default, but allows for simulation @@ -342,7 +341,6 @@ def NEXAFS_step_scan_core( -#@finalize_decorator(#rsoxs_config.write_plan) def new_en_scan_core( dets=None, # a list of detectors to run at each step - get from md by default energy=None, # optional energy object to set energy commands to - sets to energy by default, but allows for simulation @@ -668,7 +666,6 @@ def final(): -#@finalize_decorator(#rsoxs_config.write_plan) def NEXAFS_old_fly_scan_core( scan_params, openshutter=True, @@ -795,7 +792,6 @@ def NEXAFS_old_fly_scan_core( -#@finalize_decorator(#rsoxs_config.write_plan) def NEXAFS_fly_scan_core( scan_params, openshutter=True, From 50c0838425e86bf40052c9d22c82f507b9578b1c Mon Sep 17 00:00:00 2001 From: PriyankaKetkarBNL <155195376+PriyankaKetkarBNL@users.noreply.github.com> Date: Thu, 10 Oct 2024 15:22:25 -0400 Subject: [PATCH 06/15] Update alignment_local.py --- rsoxs/Functions/alignment_local.py | 40 +++++------------------------- 1 file changed, 6 insertions(+), 34 deletions(-) diff --git a/rsoxs/Functions/alignment_local.py b/rsoxs/Functions/alignment_local.py index 21730c3..c2faaf6 100644 --- a/rsoxs/Functions/alignment_local.py +++ b/rsoxs/Functions/alignment_local.py @@ -23,7 +23,6 @@ def sample_by_value_match(key, string, bar=None): if bar == None: - ##rsoxs_config.read() bar = rsoxs_config['bar'] results = [d for (index, d) in enumerate(bar) if d[key].find(string) >= 0] if len(results) == 1: @@ -41,7 +40,6 @@ def sample_by_name( name, bar=None): def list_samples(bar=None): if bar == None: - ##rsoxs_config.read() bar = rsoxs_config['bar'] text = " i Sample Name" for index, sample in enumerate(bar): @@ -123,12 +121,10 @@ def sanatize_angle(samp, force=False): samp["bar_loc"]["th"] = 195.0 if samp["bar_loc"]["th"] <= -155: samp["bar_loc"]["th"] = -155.0 - ##rsoxs_config.write() - + def samp_dict_from_id_or_num(num_or_id): - ##rsoxs_config.read() if isinstance(num_or_id,str): sam_dict = [d for (index, d) in enumerate(rsoxs_config['bar']) if d['sample_id'].find(num_or_id) >= 0] if len(sam_dict) > 0: @@ -146,7 +142,6 @@ def samp_dict_from_id_or_num(num_or_id): def offset_bar(xoff, yoff, zoff, thoff, bar=None): if bar == None: - ##rsoxs_config.read() bar = rsoxs_config['bar'] for samp in bar: for mot in samp["location"]: @@ -160,8 +155,7 @@ def offset_bar(xoff, yoff, zoff, thoff, bar=None): mot["position"] += thoff sample_recenter_sample(samp) - ##rsoxs_config.write() - + def default_sample(name,proposal_id,institution='NIST',grazing=False,front=True): return { "institution": institution, @@ -206,7 +200,6 @@ def stop(self, doc): import bluesky.preprocessors as bpp def image_bar( path=None, front=True, bar=None): if bar == None: - ##rsoxs_config.read() bar = rsoxs_config['bar'] global loc_Q loc_Q = queue.Queue(1) @@ -226,7 +219,6 @@ def image_bar( path=None, front=True, bar=None): def locate_samples_from_image( impath, front=True, bar=None): if bar == None: - ##rsoxs_config.read() bar = rsoxs_config['bar'] # if the image was just taken itself, before a bar was compiled, then this can be run to just load that image # and then interactively place the elements of bar @@ -249,7 +241,6 @@ def update_bar(loc_Q, front, inbar=None): updated with whether we are pointing at the front or the back of the bar """ if inbar == None: - ##rsoxs_config.read() inbar = rsoxs_config['bar'] from threading import Thread @@ -300,7 +291,6 @@ def worker(): AF2 = default_sample("AF2_back",proposal_id=gbar[0]['proposal_id'],institution=gbar[0]['institution'],front=False) gbar.insert(1, AF1) # inserts in the second position gbar.insert(-1, AF2) # inserts in the second to last position - ##rsoxs_config.write() while True: # for sample in bar: sample = gbar[samplenum] @@ -338,8 +328,6 @@ def worker(): sample["bar_loc"]["th0"] = float(180) annotateImage(sample_image_axes, item, sample["sample_name"]) # advance sample and loop - #rsoxs_config['bar'] = gbar - #rsoxs_config.write() samplenum += 1 elif item == "escape": print("aborting") @@ -352,8 +340,6 @@ def worker(): samplenum -= 1 if samplenum >= len(gbar): print("done") - #rsoxs_config['bar'] = gbar - #rsoxs_config.write() break t = Thread(target=worker) @@ -448,7 +434,6 @@ def plot_key_press(event): def offset_bar( xoff, yoff, zoff, thoff, bar = None): if bar == None: - #rsoxs_config.read() bar = rsoxs_config['bar'] for samp in bar: for mot in samp["location"]: @@ -460,8 +445,7 @@ def offset_bar( xoff, yoff, zoff, thoff, bar = None): mot["position"] += zoff if mot["motor"] == "th": mot["position"] += thoff - #rsoxs_config.write() - + def correct_bar(fiduciallist, include_back, training_wheels=True, bar = None): """ @@ -475,7 +459,6 @@ def correct_bar(fiduciallist, include_back, training_wheels=True, bar = None): fiducial list is the list output by find_fiducials() """ if bar == None: - #rsoxs_config.read() bar = deepcopy(rsoxs_config['bar']) af2y = fiduciallist[0] af2xm90 = fiduciallist[1] @@ -606,8 +589,7 @@ def correct_bar(fiduciallist, include_back, training_wheels=True, bar = None): rotate_sample(samp) # this will take the positions found above and the desired incident angle and # rotate the location of the sample accordingly rsoxs_config['bar'] = bar #event_model.sanitize_doc() #rsoxs_config['bar'] = orjson.dumps(bar) - #rsoxs_config.write() - + def zoffset(af1zoff, af2zoff, y, front=True, height=0.25, af1y=-186.3, af2y=4): """ Using the z offset of the fiducial positions from the center of rotation, @@ -688,7 +670,6 @@ def rotate_sample(samp, force=False): motor["position"] = theta_new if motor["motor"] == "y": motor["position"] = y0 - # #rsoxs_config.write() # in future, updating y (if the rotation axis is not perfectly along y # and z (to keep the sample-detector distance constant) as needed would be good as well # newz = rotatedz(newx, th, zoff, af1xoff) @@ -715,13 +696,11 @@ def sample_recenter_sample(samp): samp["bar_loc"]["x0"] = newx0 samp["bar_loc"]["y0"] = newy # y and y0 are the same, so we can just copy this samp["angle"] = newangle - # #rsoxs_config.write() - + def read_positions(bar=None): if bar == None: - #rsoxs_config.read() bar = rsoxs_config['bar'] # for when the positions are altered by hand in the excel sheet, (i.e. after spiral scans) # this reads those positions and sets the default positions (x0 and y0) to match @@ -731,7 +710,6 @@ def read_positions(bar=None): def resolve_spirals(bar=None): if bar == None: - #rsoxs_config.read() bar = rsoxs_config['bar'] for samp in bar: if len(str(samp['bar_loc'].get('spiral_started',''))) > 0 and len(samp['bar_loc'].get('spiral_done','')) == 0: @@ -757,7 +735,6 @@ def resolve_spirals(bar=None): newsamp['sample_name']+=f'_{i}' newsamp['sample_id']+=f'_{i}' rsoxs_config['bar'].append(newsamp) - #rsoxs_config.write() else: accept = input(f"image {im} at ({xs[im],ys[im]}) is correct (y,n)?") if accept in ['y','Y','yes']: @@ -767,14 +744,9 @@ def resolve_spirals(bar=None): {'motor':'z','position':z}] samp['bar_loc']['spiral_done']={"scan":h['start']['uid'], 'best_num':im} - #rsoxs_config.write() - + -#def clear_bar(): -# accept = input(f"Are you sure you want to clear the presistant bar? (y,n)?") -# if accept in ['y','Y','yes']: - #rsoxs_config.clear_bar() def acq(id_or_num,acq_num=0): samp = samp_dict_from_id_or_num(id_or_num) From 2a0dfa52674579dd56e1dda08114602c94e91334 Mon Sep 17 00:00:00 2001 From: PriyankaKetkarBNL <155195376+PriyankaKetkarBNL@users.noreply.github.com> Date: Thu, 10 Oct 2024 15:25:54 -0400 Subject: [PATCH 07/15] Update alignment_local.py --- rsoxs/Functions/alignment_local.py | 1 + 1 file changed, 1 insertion(+) diff --git a/rsoxs/Functions/alignment_local.py b/rsoxs/Functions/alignment_local.py index c2faaf6..0319c25 100644 --- a/rsoxs/Functions/alignment_local.py +++ b/rsoxs/Functions/alignment_local.py @@ -268,6 +268,7 @@ def worker(): gbar.insert(0, AF1) gbar.insert(1, AF2) gbar.insert(2, diode) + ## Appending fiducials/diodes to the end does not always reliably add image position into rsoxs_config (Issue #2, also encountered during 20241006 beam time), so it is simpler to add these at the beginnng. From fa59e42817f02d23227741f936d950905145528f Mon Sep 17 00:00:00 2001 From: PriyankaKetkarBNL <155195376+PriyankaKetkarBNL@users.noreply.github.com> Date: Thu, 10 Oct 2024 15:39:54 -0400 Subject: [PATCH 08/15] Update startup.py Cleaning up get_ipython()-related code --- rsoxs/startup.py | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/rsoxs/startup.py b/rsoxs/startup.py index ea38ec0..76069d2 100755 --- a/rsoxs/startup.py +++ b/rsoxs/startup.py @@ -56,16 +56,15 @@ def is_re_worker_active(): if not is_re_worker_active(): - ip = get_ipython() ns = get_ipython().user_ns nslsii.configure_base( ns, "rsoxs", bec=False, configure_logging=True, publish_documents_with_kafka=True ) - ip.log.setLevel("ERROR") - RE = ip.user_ns["RE"] - db = ip.user_ns["db"] - sd = ip.user_ns["sd"] - #bec = ip.user_ns["bec"] + get_ipython().log.setLevel("ERROR") + RE = ns["RE"] + db = ns["db"] + sd = ns["sd"] + #bec = ns["bec"] else: ns = {} nslsii.configure_base( From 6d26b7f8502ef3c4bf674691708972f0e98021c1 Mon Sep 17 00:00:00 2001 From: PriyankaKetkarBNL <155195376+PriyankaKetkarBNL@users.noreply.github.com> Date: Thu, 10 Oct 2024 15:43:01 -0400 Subject: [PATCH 09/15] Update startup.py --- rsoxs/startup.py | 27 ++++++++------------------- 1 file changed, 8 insertions(+), 19 deletions(-) diff --git a/rsoxs/startup.py b/rsoxs/startup.py index 76069d2..83eaba5 100755 --- a/rsoxs/startup.py +++ b/rsoxs/startup.py @@ -55,25 +55,14 @@ def is_re_worker_active(): return False -if not is_re_worker_active(): - ns = get_ipython().user_ns - nslsii.configure_base( - ns, "rsoxs", bec=False, configure_logging=True, publish_documents_with_kafka=True - ) - get_ipython().log.setLevel("ERROR") - RE = ns["RE"] - db = ns["db"] - sd = ns["sd"] - #bec = ns["bec"] -else: - ns = {} - nslsii.configure_base( - ns, "rsoxs", bec=False, configure_logging=True, publish_documents_with_kafka=True - ) - RE = ns["RE"] - db = ns["db"] - sd = ns["sd"] - #bec = ns["bec"] +if not is_re_worker_active(): ns = get_ipython().user_ns +else: ns = {} +nslsii.configure_base(ns, "rsoxs", bec=False, configure_logging=True, publish_documents_with_kafka=True) +if not is_re_worker_active(): get_ipython().log.setLevel("ERROR") +RE = ns["RE"] +db = ns["db"] +sd = ns["sd"] +#bec = ns["bec"] # === START PERSISTENT DICT CODE === From 211ed03701c6df356df2ddf92a493e80d68cf55d Mon Sep 17 00:00:00 2001 From: PriyankaKetkarBNL <155195376+PriyankaKetkarBNL@users.noreply.github.com> Date: Thu, 10 Oct 2024 15:48:24 -0400 Subject: [PATCH 10/15] Update startup.py --- rsoxs/startup.py | 29 ----------------------------- 1 file changed, 29 deletions(-) diff --git a/rsoxs/startup.py b/rsoxs/startup.py index 83eaba5..f4f4137 100755 --- a/rsoxs/startup.py +++ b/rsoxs/startup.py @@ -65,37 +65,8 @@ def is_re_worker_active(): #bec = ns["bec"] -# === START PERSISTENT DICT CODE === -# old code, using the files on lustre to store the persistent dict -#from bluesky.utils import PersistentDict -#runengine_metadata_dir = Path("/nsls2/data/sst/legacy/RSoXS/config/runengine-metadata") -#RE.md = PersistentDict(runengine_metadata_dir) -# new code, using redis from nslsii.md_dict import RunEngineRedisDict - -class Sync_Dict(RunEngineRedisDict): - - def write(self): - self._set_local_metadata_on_server() - print('RSoXS configuration saved to redis') - - def read(self): - self.update(self._get_local_metadata_from_server()) - - def write_plan(self): - yield from bps.null() - self.write() - yield from bps.null() - - def clear_bar(self): - self['bar'] = [] - self.write() - - -#RE.md = Sync_Dict(host="info.sst.nsls2.bnl.gov", port=60737) # port specific to rsoxs run engine -#rsoxs_config = Sync_Dict(re_md_channel_name='RSoXS Config',host="info.sst.nsls2.bnl.gov", port=60737,db=1,global_keys=[]) - import redis from redis_json_dict import RedisJSONDict mdredis = redis.Redis("info.sst.nsls2.bnl.gov") From 17249879b515b81461302f4f668895524e1448a4 Mon Sep 17 00:00:00 2001 From: PriyankaKetkarBNL <155195376+PriyankaKetkarBNL@users.noreply.github.com> Date: Thu, 10 Oct 2024 15:50:07 -0400 Subject: [PATCH 11/15] Update startup.py --- rsoxs/startup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rsoxs/startup.py b/rsoxs/startup.py index f4f4137..bc4c7f8 100755 --- a/rsoxs/startup.py +++ b/rsoxs/startup.py @@ -147,7 +147,7 @@ def md_validator(md): RE.md_validator = md_validator -# === END PERSISTENT DICT CODE === + # Optional: set any metadata that rarely changes. From 0826aa938f15a9a57f76aaf00df97b37bf4387dc Mon Sep 17 00:00:00 2001 From: PriyankaKetkarBNL <155195376+PriyankaKetkarBNL@users.noreply.github.com> Date: Thu, 10 Oct 2024 16:39:30 -0400 Subject: [PATCH 12/15] Update flystream_wrapper.py --- rsoxs/Functions/flystream_wrapper.py | 1 + 1 file changed, 1 insertion(+) diff --git a/rsoxs/Functions/flystream_wrapper.py b/rsoxs/Functions/flystream_wrapper.py index 2d52097..b705e85 100644 --- a/rsoxs/Functions/flystream_wrapper.py +++ b/rsoxs/Functions/flystream_wrapper.py @@ -8,6 +8,7 @@ from bluesky.preprocessors import plan_mutator +## TODO: This is intended to be centralized in Jamie Titus's nbs-bl package. Switch the imports after moving to all the new packages. def flystream_during_wrapper(plan, flyers, stream=False): """ Kickoff and collect "flyer" (asynchronously collect) objects during runs. From 07fb1674ac2dbf7275e06135367148594714a3d7 Mon Sep 17 00:00:00 2001 From: PriyankaKetkarBNL <155195376+PriyankaKetkarBNL@users.noreply.github.com> Date: Thu, 10 Oct 2024 16:40:29 -0400 Subject: [PATCH 13/15] Update fly_alignment.py --- rsoxs/Functions/fly_alignment.py | 1 + 1 file changed, 1 insertion(+) diff --git a/rsoxs/Functions/fly_alignment.py b/rsoxs/Functions/fly_alignment.py index b139f2c..e5cebb9 100644 --- a/rsoxs/Functions/fly_alignment.py +++ b/rsoxs/Functions/fly_alignment.py @@ -32,6 +32,7 @@ BeamStopS) from .alignment import load_configuration, rsoxs_config,correct_bar +## TODO: Not sure why this is redefined identically as the function in flystream_wrapper.py, but end goal is to move to Jamie's function. def flystream_during_wrapper(plan, flyers, stream=False): """ Kickoff and collect "flyer" (asynchronously collect) objects during runs. From 7fb7875476577651058928fb8bfea91374d13f0a Mon Sep 17 00:00:00 2001 From: PriyankaKetkarBNL <155195376+PriyankaKetkarBNL@users.noreply.github.com> Date: Fri, 11 Oct 2024 09:07:40 -0400 Subject: [PATCH 14/15] Update startup.py Enabling BEC --- rsoxs/startup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rsoxs/startup.py b/rsoxs/startup.py index bc4c7f8..de54d35 100755 --- a/rsoxs/startup.py +++ b/rsoxs/startup.py @@ -62,7 +62,7 @@ def is_re_worker_active(): RE = ns["RE"] db = ns["db"] sd = ns["sd"] -#bec = ns["bec"] +bec = ns["bec"] ## Was initially commented out From bef6e4e07a7384dd35aace10bb9d934f439782af Mon Sep 17 00:00:00 2001 From: PriyankaKetkarBNL <155195376+PriyankaKetkarBNL@users.noreply.github.com> Date: Fri, 11 Oct 2024 09:18:14 -0400 Subject: [PATCH 15/15] Update startup.py Reverting change --- rsoxs/startup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rsoxs/startup.py b/rsoxs/startup.py index de54d35..bc4c7f8 100755 --- a/rsoxs/startup.py +++ b/rsoxs/startup.py @@ -62,7 +62,7 @@ def is_re_worker_active(): RE = ns["RE"] db = ns["db"] sd = ns["sd"] -bec = ns["bec"] ## Was initially commented out +#bec = ns["bec"]