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

Improve usage of def collect_data() #4

Open
mrakitin opened this issue Sep 25, 2018 · 2 comments
Open

Improve usage of def collect_data() #4

mrakitin opened this issue Sep 25, 2018 · 2 comments
Assignees

Comments

@mrakitin
Copy link
Member

Avoid using RE inside of the function:

  • def collect_data( exposure_time=1, meta_string=['X','Y', 'Exp'], dets= [ pil1M ] ):
    '''
    dets: [pil1M], collect SAXS data
    [rayonix ] collect MAXS data
    [pil300KW] collect WAXS data
    the combination will collect detectors data simultineously
    e..g, [ pil1M, pil300KW] simultineously collect SAXS and WAXS
    '''
    posy = stage.y.position
    posx = stage.x.position
    #inc = stage.th.position
    inc = sample.al.position
    arc = waxs.arc.position
    md = 'sample: %s, x=%.2f, y=%0.2f, inc=%0.2f, arc=%.2f, exp=%s s.'%(
    RE.md['sample_name'],posx, posy, inc, arc, exposure_time )
    posx_ = create_string(posx)
    posy_ = create_string(posy)
    exposure_time_ = create_string(exposure_time)
    inc_ = create_string(inc)
    arc_ = create_string(arc)
    filename= '%s_%s'%( RE.md['user_name'], RE.md['sample_name'] )
    if 'X' in meta_string:
    filename +='_X%s'%posx_
    if 'Y' in meta_string:
    filename +='_Y%s'%posy_
    if 'Inc' in meta_string:
    filename += '_Inc%s'%inc_
    if 'Arc' in meta_string:
    filename += '_arc%s'%arc_
    if 'Exp' in meta_string:
    filename +='_Exp%s'%exposure_time_
    print(filename)
    for detector in dets:
    detector.cam.file_name.put(filename)
    detector.cam.acquire_time.put(exposure_time)
    detector.cam.acquire_period.put(exposure_time)
    RE( count( [detector] ),
    Measurement = '%s'%md)

Metadata:

  • add md as a kwarg into that module.
@mrakitin mrakitin assigned mrakitin and gfreychet and unassigned mrakitin Apr 9, 2019
@mrakitin
Copy link
Member Author

mrakitin commented Apr 9, 2019

@gfreychet is working on refactoring and updating the whole processing for user scans, and we with @awalter-bnl mentioned this particular issue, so the RE(...) is not used inside of the plans.

@mrakitin
Copy link
Member Author

This is still WIP as of 2020-2 deployment.

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

No branches or pull requests

2 participants