added most up-to-date versions of the SwissMX tools/utils
This commit is contained in:
27
data/retrieve_data.py
Normal file
27
data/retrieve_data.py
Normal file
@@ -0,0 +1,27 @@
|
||||
import sys, os
|
||||
print('starting slic')
|
||||
sys.path.insert(0, os.path.expanduser('/sf/cristallina/applications/mx/_obsolete/slic'))
|
||||
from slic.utils import json_load, json_save
|
||||
from slic.core.acquisition.broker.post_retrieve import post_retrieve_acq_jsons, API_ADDR
|
||||
|
||||
fn = "/sf/cristallina/data/p22233/raw/run0067-ocp_ech_420nm_1us_trans35_690nJ/meta/acq0006.json"
|
||||
pulses_per_file=1000
|
||||
n_missing = 7
|
||||
|
||||
acquisition = 20
|
||||
print('starting loop')
|
||||
file_names=[]
|
||||
for i in range(1,n_missing+1):
|
||||
acq='acq{0:0=4d}'.format(acquisition+i)
|
||||
d = json_load(fn)
|
||||
d["start_pulseid"] += i * pulses_per_file
|
||||
d["stop_pulseid"] += i * pulses_per_file
|
||||
print(acq)
|
||||
file_name = f"{acq}.json"
|
||||
print(file_name)
|
||||
file_names.append(file_name)
|
||||
json_save(d,file_name)
|
||||
|
||||
post_retrieve_acq_jsons(API_ADDR, file_names, continue_run=True)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user