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

lineup2(): report peak statistics as additional run stream #1046

Open
prjemian opened this issue Nov 26, 2024 · 1 comment
Open

lineup2(): report peak statistics as additional run stream #1046

prjemian opened this issue Nov 26, 2024 · 1 comment
Assignees

Comments

@prjemian
Copy link
Contributor

When the lineup2() plan is run, peak statistics are assessed when the stop document is received. Since lineup2() uses a standard plan (bp.rel_scan()), it cannot add additional streams to the run.

Refactor the plan so that the stats are pushed to a new stream in the still-open run.

@prjemian prjemian self-assigned this Nov 26, 2024
@prjemian
Copy link
Contributor Author

prjemian commented Nov 26, 2024

From #1044 (comment):

... reported as additional stream ...

Must replace rel_scan() plan with custom plan. The heart of bp.scan_nd() provides the basis:

    @bpp.stage_decorator(list(detectors) + motors)
    @bpp.run_decorator(md=_md)
    def inner_scan_nd():
        if predeclare:
            yield from bps.declare_stream(*motors, *detectors, name="primary")
        for step in list(cycler):
            yield from per_step(detectors, step, pos_cache)
        # TODO: write analysis to `"peak_analysis"` stream

    return (yield from inner_scan_nd())

Would need to redesign when signal_stats.analysis = is called.

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

No branches or pull requests

1 participant