xpdAcq / mission-control

Releases, Installers, Specs, and more!
0 stars 4 forks source link

extra long delay when running tseries #120

Open CJ-Wright opened 6 years ago

CJ-Wright commented 6 years ago

It seems that there is an issue with the tseries delay

Expected Behavior

The delay set by the user is the delay respected by the system

Current Behavior

It seems that when running the following tseries

 'sp_computed_exposure': 0.2,
 'sp_num_frames': 2.0,
 'sp_plan_name': 'tseries',
 'sp_requested_delay': 0.2,
 'sp_requested_exposure': 0.2,
 'sp_requested_num': 10,
 'sp_time_per_frame': 0.1,
 'sp_type': 'tseries',
 'sp_uid': '113eb67f-bfd7-4a73-9790-2b77d0a5dfc8',

the delay in the time reported by the databroker

table = db[-1].table()['time']
arr = np.asarray(table)
delay = flaot(arr[1] - arr[0]) * 1e-9

is roughly 2 seconds (although it seems to bounce around a little)

Attn: @sghose @chiahaoliu

chiahaoliu commented 6 years ago

A quick thoguht.

By default (can be overridden), fast shutter is closed after a shot and open again for the next one. Can shutter operate at such high speed? (close/open in less than 0.1s) We also need to consider overhead in processing bluesky messages, such as checkpoint after moving shutter, readback to make sure shutter status, etc.

Reference from bluesky, it takes run engine about 27ms to process one message http://nsls-ii.github.io/bluesky/async.html?highlight=message#asynchronous-acquisition

CJ-Wright commented 6 years ago

If this is a fast shutter issue, can we put the speed of the fast shutter into the configuration somewhere and then raise if the delay is faster than the shutter and the shutter is set to the "open/close for every shot" configuration?

sghose commented 6 years ago

This delay is happening only to tseries not to ct. Can we diagnose the delay where it is coming from. I mean for quick check we could stop shutter in/out in tseries like before. then try the .2_.1_100 tesries plan. This is a quick test for the shutter. How can we do that?

chiahaoliu commented 6 years ago

ScanPlan(bt, tseries, 0.2, 0.1, 100, False) :)

btw tseries? provides this instruction too.

I would suggest also try:

ScanPlan(bt, tseries, 0.2, 0.3, 100, False)

since the true delay is bigger value between 0 or delay-exposure time

chiahaoliu commented 5 years ago

@sghose would it be possible to update us the status of this issue? thanks

sbillinge commented 5 years ago

@sghose @dooryhee we are waiting for an update about the origin of this before we can work on it.

adelezh commented 5 years ago

ScanPlan(bt, tseries, 0.2,0.3, 100, False)has been tested, it took 40.1 sec to finish 100 scan, so it is about 0.4sec/scan including delay.