APS-2BM-MIC / ipython-user2bmb

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

generalize the `tomo_scan()` and `user_tomo_scan()` plans #49

Open prjemian opened 6 years ago

prjemian commented 6 years ago

These working plans have protocols that are general but also have protocols that are very specific to the instrumentation in 2-BM-B. Generalize for use in other stations and beam lines (32-ID-C comes to mind). Ultimately, tomo_scan() might become part of a standard library (perhaps APS_BlueSky_tools) for general use.

prjemian commented 6 years ago

related to #48

prjemian commented 5 years ago

Summary of 2018-08 Taxi/Fly Tomo Scan

prjemian commented 5 years ago

rough taxi/fly algorithm for tomo

repeat
    prepare
    measure darks
    measure flats
    prepare for tomo
    taxi
    fly
    collect
    clean up
prjemian commented 5 years ago

rough step-scan algorithm for tomo

repeat
    prepare
    measure darks
    measure flats
    prepare for tomo
    repeat
        rotate
        trigger
        collect
    clean up
prjemian commented 5 years ago

Consensus of the NSLS-II DAMA team is for bluesky plans to be functions rather than class methods. For tomography scans, it seems more natural in Python to create a strong base class with subclasses for step and taxi/fly, then subclasses for each instrument.

prjemian commented 5 years ago

@decarlof : Are you comfortable with the intention to create a generalized TomographyScanBase(object) base class with subclasses for step and taxi/fly, then subclasses for each instrument. The class will have placeholders for the rotation axis, detector, shutter, displacement axis (for white frames), ... and a bluesky plan comparable to tomo_scan() above. The user_tomo_scan() (common settings picked out by the instrument team) would be defined in the instrument subclass.

import APS_BlueSky_tools.plans as APS_plans
class TomographyScanBase(object)
    def tomo_scan(self, ...)
class TomographyStepScan(TomographyScanBase)
    def tomo_scan(self, ...)
class TomographyTaxiFlyScan(TomographyScanBase)
    def tomo_scan(self, ...)

# at 2-BM-B
class TomographyTaxiFlyScan2BMB(APS_plans.TomographyTaxiFlyScan)
    def tomo_scan(self, ...)
prjemian commented 5 years ago

First draft in another repo: https://github.com/BCDA-APS/APS_BlueSky_tools/blob/master/examples/tomo_issue49.ipynb

prjemian commented 5 years ago

Incorporate #46 (add delay between each dark and flat).

prjemian commented 5 years ago

Incorporate #48 (detector-specific info should be part of detector object)