APS-2BM-MIC / ipython-user2bmb

ipython configurations for the tomography instrument
2 stars 5 forks source link

report iteration number in repeated internal plan #41

Closed prjemian closed 6 years ago

prjemian commented 6 years ago

There is code already but it fails with this exception:

/home/beams8/USER2BMB/.ipython/profile_2bmb/startup/30-busy_fly_scan.py in _plan_()
    514         """function that yields the generator we want to repeat"""
    515         t0 = time.time()
--> 516         run_counter += 1
    517         yield from bps.checkpoint()
    518         yield from bps.mv(

UnboundLocalError: local variable 'run_counter' referenced before assignment
prjemian commented 6 years ago

converted variable local to user_tomo_scan() to a global variable and renamed to be associated.