Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
prjemian opened this issue Aug 20, 2018 · 9 comments
Open

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

prjemian opened this issue Aug 20, 2018 · 9 comments
Assignees
Labels
enhancement New feature or request

Comments

@prjemian
Copy link
Contributor

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 prjemian added the enhancement New feature or request label Aug 20, 2018
@prjemian prjemian self-assigned this Aug 20, 2018
@prjemian
Copy link
Contributor Author

related to #48

@prjemian
Copy link
Contributor Author

prjemian commented Nov 14, 2018

Summary of 2018-08 Taxi/Fly Tomo Scan

  • my_series(start, stop, step, acquire_time=0.02):

    • runs user_tomo_scan at series of tomo_stage.y positions
  • user_tomo_scan(*, acquire_time=0.02, iterations=1, delay_time_s=1.0, samOutDist=-3, md=None):

    • setup:
      • tomo rotary stage
      • tomo scan
      • tomo detector
      • metadata
    • repeat for specified iterations:
      • prepare:
        • detector (and image acquisition)
        • rotary stage
        • shutter
        • tomo_scan:
  • tomo_scan(*, start=0, stop=180, numProjPerSweep=1500, slewSpeed=5, accl=1, samInPos=0, samOutDist=-3, acquire_time=0.02, md=None):

    • setup:
      • tomo rotary stage
      • tomo scan
      • tomo detector
      • metadata
      • additional signals to be monitored
      • interim progress reporting
      • cleanup
    • scan:
      • prepare:
        • monitors
        • rotary stage
      • measure darks and flats
      • open shutter
      • taxi
      • fly
    • after the scan is done:
      • read detector and save data to primary stream
      • update HDF5 file with rotary table position array
  • cleanup:

    • removes monitors:
      • rotary stage
      • detector
    • resets taxi/fly
    • restores default settings
      • detector
      • rotary stage
      • signals from supervisory processes (such as MONA)
    • closes shutter
    • returns rotary stage to default position

@prjemian
Copy link
Contributor Author

rough taxi/fly algorithm for tomo

repeat
    prepare
    measure darks
    measure flats
    prepare for tomo
    taxi
    fly
    collect
    clean up

@prjemian
Copy link
Contributor Author

rough step-scan algorithm for tomo

repeat
    prepare
    measure darks
    measure flats
    prepare for tomo
    repeat
        rotate
        trigger
        collect
    clean up

@prjemian
Copy link
Contributor Author

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
Copy link
Contributor Author

@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
Copy link
Contributor Author

@prjemian
Copy link
Contributor Author

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

@prjemian
Copy link
Contributor Author

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant