sleep removal and proper source naming

This commit is contained in:
2022-05-16 17:34:46 +02:00
parent 5b2fb0f3d5
commit b5baa4dce1
+1 -12
View File
@@ -19,21 +19,14 @@ def prepare_det(dr):
print("Stoping the detector...")
stop_data = {'cmd': "STOP"}
r = requests.post(url=urljoin(URL,DET), headers=headers, json=stop_data)
time.sleep(0.1)
print("Configuring the detector...")
data_config = {"det_name":"eiger","config":{"frames":5000, "triggers":1, "exptime":0.0005, "period": 0.001, "timing":"auto", "tengiga":1, "dr":dr}}
r = requests.post(url=urljoin(URL,DET), headers=headers, json=data_config)
time.sleep(0.5)
print("Starting the detector...")
start_data = {'cmd':"START"}
r = requests.post(url = urljoin(URL,DET), headers=headers, json=start_data)
time.sleep(0.5)
def main(argv):
# details of request
n_images = 5
n_acquisitions = 5
@@ -44,13 +37,9 @@ def main(argv):
print(f'Performing { j } aquisitions (bit depth { dr })...')
for i in range(0,n_acquisitions):
output_file ='/home/dbe/git/sf_daq_buffer/eiger/xbl-daq-28/output_folder%s_%s_req%s_dr%s.h5' % (j, datetime.now().strftime("%H%M%S"), i, dr)
data = {'sources':'BEC.EG01V01', 'n_images':n_images, 'output_file':output_file, 'user_id': 503}
data = {'sources':'cSAXS.EG01V01', 'n_images':n_images, 'output_file':output_file, 'user_id': 503}
r = requests.post(url = urljoin(URL,j), json=data, headers=headers)
print("RESPONSE FROM REQUEST: ", r.text)
if __name__ == "__main__":
main(sys.argv[1:])