APS-4ID-POLAR / ipython-polar

4-ID-Polar ipython configuration for bluesky (and other)
1 stars 3 forks source link

Create a function to recover setup #65

Open gfabbris opened 3 years ago

gfabbris commented 3 years ago

Something like:

# scan is either a scan_no or a database v1 header in this example.
def recover_function(scan=-1):

   if isinstance(scan, int):
        # It'd be probably better to use V2 for this...
        scan = db.v1[scan_no]

    undulatory.downstream.offset.put(scan.config_data('undulator')['baseline'][0]['undulator_downstream_offset'])
    ...