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

documentation: subscans #253

Open
hartytp opened this issue Nov 15, 2021 · 5 comments
Open

documentation: subscans #253

hartytp opened this issue Nov 15, 2021 · 5 comments

Comments

@hartytp
Copy link
Contributor

hartytp commented Nov 15, 2021

Subscans are a killer feature, but there isn't much in the docs about them. We should fix this. Dumping some notes that @dnadlinger kindly sent me offline...

A subscan is part of the ndscan results channel tree for the containing fragment. This means that you can then also scan that fragment itself (e.g. to see how some parameter affects a calibration measurement).

The top-level runner is what creates the ndscan.* dataset tree in the first place, and "has a HasEnvironment interface", i.e. doesn't compose with fragments. The intended use case is from some top-level experiment which needs to run a scan e.g. as part of a periodic calibration measurement, where the scan should be run just as if you manually used the fragment from the UI, just with fixed parameters. Currently, another use case for TopLevelRunner is for adaptive top-level calibration experiments which need to execute a variable amount of subscans, e.g. until convergence is reached in 2D micromotion compensation. It would be much neater to do this as a subscan, so the top-level servo can itself be used as a Fragment, but unfortunately, the restrictive nature of the dataset/HDF5 format makes it hard to accommodate the changing data shapes.


One thing I found non-obvious was how the subscan results are exposed (and IIRC right now the example code doesn't use the subscan results). If a fragment has a scan called foo which exposes a results channel bar then the attribute self.foo_bar will be created (by what? when?) which has the susbscan results. This can be used to do further analyses in the to level fragment etc.

@hartytp
Copy link
Contributor Author

hartytp commented Nov 15, 2021

@dnadlinger one other question: what is the expected behaviour with plots from subscans? AFAICT from playing around quickly subscans do not generate plots. Is that correct?

@dnadlinger
Copy link
Member

what is the expected behaviour with plots from subscans? AFAICT from playing around quickly subscans do not generate plots. Is that correct?

Subscan plots are accessible via the context menu in the main plot window; you can click on each point to select the one you want to view the subscan for.

@dnadlinger
Copy link
Member

(And yes, there should be docs!)

@hartytp
Copy link
Contributor Author

hartytp commented Nov 15, 2021

Subscan plots are accessible via the context menu in the main plot window; you can click on each point to select the one you want to view the subscan for.

thanks. Maybe I just missed that. If the top level fragment doesn't have any analyses does this mean no plot is created?

@hartytp
Copy link
Contributor Author

hartytp commented Jun 27, 2022

c.f. #288

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