Skip to content

Commit a8395cf

Browse files
author
USAXS account
committed
send errors to me
1 parent 0c04ce0 commit a8395cf

File tree

2 files changed

+134
-422
lines changed

2 files changed

+134
-422
lines changed

src/usaxs/user/jun_loop.py

Lines changed: 24 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,18 @@
11
"""
2-
BS plan to run infinte data collection same as spec used to do.
2+
BS plan to run finte data collection same as spec used to do.
33
44
load this way:
55
66
%run -im usaxs.user.jun_loop
77
88
Then execute as :
9-
RE(junFiniteMultiPosLoop(delay1minutes))
109
11-
* file: /USAXS_data/bluesky_plans/finite_loop.py
12-
* aka: ~/.ipython/user/finite_loop.py
10+
RE(junFiniteMultiPosLoop(delay1minutes)) # adds XYZmin in title
11+
RE(myFiniteListLoop(delay1minutes)) # adds order number in title
1312
14-
* JIL, 2022-11-17 : first release
15-
* JIL, 2022-11-18 : added different modes
16-
* JIL, 2025-5-28 : fixs for BITS
17-
* JIL, 7/9/2025 user changes
13+
* file: usaxs/user/jun_loop.py
14+
15+
* JIL, 10/20/2025 specific user needs, based on myFiniteListLoop in finite_loop.py
1816
"""
1917

2018
import logging
@@ -62,25 +60,26 @@ def junFiniteMultiPosLoop(delay1minutes, md={}):
6260
# ListOfSamples = [[pos_X, pos_Y, thickness, scan_title],
6361
ListOfSamples = [
6462

65-
[15, 58, 4.0, "water_blank"], # Point1
66-
[25, 58, 4.0, "Z_15mgmL_DPEG_1p5mgmL_36hr"], # Point2
67-
[35, 58, 4.0, "Z_15mgmL_DPEG_3mgmL_36hr"], # Point3
68-
[45, 58, 4.0, "Z_15mgmL_DPEG_4p5mgmL_36hr"], # Point4
69-
[55, 58, 4.0, "Z_15mgmL_DPEG_6gmL_36hr"], # Point5
70-
[65, 58, 4.0, "Z_15mgmL_DPEG_6p75mgmL_36hr"], # Point6
71-
[75, 58, 4.0, "Z_15mgmL_DPEG_7p5mgmL_36hr"], # Point7
72-
[85, 58, 4.0, "Z_15mgmL_DPEG_3mgmL_47C_14hr"], # Point8
73-
[95, 58, 4.0, "Z_15mgmL_DPEG_4p5mgmL_47C_14hr"], # Point9
74-
[105, 58, 4.0, "Z_15mgmL_DPEG_6p75mgmL_47C_14hr"], # Point10
75-
[115, 58, 4.0, "Z_15mgmL_DPEG_50mgmL_14hr"], # Point11
63+
# [15, 55, 4.0, "DIwater_blank_4RD"], # Point1
64+
[25, 50, 4.0, "XY-20Mg2Co-insitu"], # Point2
65+
[35, 50, 4.0, "XY-20Mg2Co-2-INSITU"], # Point3
66+
# [45, 50, 4.0, "PEI15-CA55-130-dup"], # Point4
67+
# [55, 34, 4.0, "NB_50CaSO4_pH8-2_dup"], # Point5
68+
# [65, 58, 4.0, "Z_15mgmL_DPEG_6p75mgmL_36hr"], # Point6
69+
# [75, 58, 4.0, "Z_15mgmL_DPEG_7p5mgmL_36hr"], # Point7
70+
# [85, 58, 4.0, "Z_15mgmL_DPEG_3mgmL_47C_14hr"], # Point8
71+
# [95, 58, 4.0, "Z_15mgmL_DPEG_4p5mgmL_47C_14hr"], # Point9
72+
# [105, 58, 4.0, "Z_15mgmL_DPEG_6p75mgmL_47C_14hr"], # Point10
73+
# [115, 58, 4.0, "Z_15mgmL_DPEG_50mgmL_14hr"], # Point11
7674

7775
]
76+
7877

7978
# ListOfSamples = [[ 66.4, 20, 4.0, "H3S2H"], #tube 4
8079
# ]
8180

8281
def setSampleName():
83-
return f"{scan_title}" f"_{(time.time()-t0)/60:.0f}min"
82+
return f"{scan_title}" f"_{(time.time()-t0):.0f}sec"
8483

8584
def collectAllThree():
8685
sampleMod = setSampleName()
@@ -93,6 +92,7 @@ def collectAllThree():
9392
md["title"] = sampleMod
9493
yield from waxsExp(pos_X, pos_Y, thickness, sampleMod, md={})
9594

95+
#here starts execution
9696
yield from before_command_list() # this will run usual startup scripts for scans
9797

9898
t0 = time.time() # mark start time of data collection.
@@ -108,20 +108,21 @@ def collectAllThree():
108108
): # collects USAXS/SAXS/WAXS data while holding at temp1
109109
for pos_X, pos_Y, thickness, scan_title in ListOfSamples:
110110
yield from collectAllThree()
111+
#yield from bps.sleep(3*60)
111112

112113
logger.info("finished") # record end.
113114

114115
yield from after_command_list() # runs standard after scan scripts.
115116

116-
117-
def myFiniteListLoop(delay1minutes, StartTime, md={}):
117+
#####################################################################################
118+
def myFiniteListLoop(delay1minutes, md={}):
118119
"""
119120
Will run finite loop for delay1minutes - delay is in minutes
120121
over list of positions and names
121122
Runs all USAXS, then all SAXS, and then all WAXS
122123
1. Correct the ListOfSamples
123124
2. reload by
124-
%run -im user.finite_loop
125+
%run -im usaxs.user.jun_loop
125126
3. run:
126127
RE(myFiniteListLoop(20))
127128

0 commit comments

Comments
 (0)