-
Notifications
You must be signed in to change notification settings - Fork 46
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
Signal generators refactor and documentation #175
Comments
Just a few comments from my side, to clarify some things:
|
Hi, thank you for your message! I answer in points:
Thank youu :) P.S: the reason we wanted to do the daq stuff is because @Bodeeen wanted to use TrigerScope for the scans. In the end they ended up doing a different widget for that but the idea was to integrate it in the scan widget: did you do it in the end? |
hi, I have been trying to use imswitch, which I love for the widgets and comms, but I think device layer and planning could be refactored out of the imswitch core to use best practices from third-party libraries which have more generalizable solutions. For instance, the device architecture of ophyd https://nsls-ii.github.io/ophyd/architecture.html encompasses all design concerns regarding devices stay there, which are accessible by the planning layer https://nsls-ii.github.io/bluesky/plans.html I have used this model in a personal project (1, 2), and I feel it helps a lot from a dev perspective to be able to rapidly add devices to the overall system and work with new or existing plans by writing plans through an established standard (https://nsls-ii.github.io/bluesky/plans.html#stub-plans). Best, |
That sounds exciting!
Could You imagine having a dedicated low level manager that implements this
… interface in ImSwitch?
Message ID: ***@***.***>
|
Hi @pskeshu , thanks for pitching in. I'm not quite sure I understand what you mean when you say "refactor out the device layer". Could you elaborate more on this? Also, is there a As for the links you posted I've only gave a glimpse and they present some really interesting concepts. What I'm afraid though in integrating all these abstraction layers on top of each other we may limit ourselves performance wise - especially when talking about camera acquisitions. But I may be mistaken since I'm still just reading the documentation. Also how do I know if my device is supported? Is there a list of supported devices? EDIT: I just realized you may have intended to say that the device layer should follow the model intended in ophyd rather than implementing ophyd in itself as a device layer replacement. Am I correct? |
@beniroquai to resuscitate this topic, for your stichting widget, do you think you would be able to adapt the suggestion for using ophyd as an abstraction level in cohesion with the scanning? As a test run to evaluate how hard or easy it is to use |
@jacopoabramo Sorry, I missed your EDIT. Yes, largely that's what I'm trying to articulate - that device layer can be refactored as ophyd objects, which can simplify support to a large extent. In principle then, any new device can be added to this architecture, as long as follows a standard like ophyd, which is very mature and has community support. There are so many advantages to this, that might warrant a call. |
@pskeshu all good, thanks any way for replying. Indeed after your post I dug more in depth into ophyd and it's a perfect fit for exactly what we want to achieve on the scanning side - and not only. @nornil this is close to the generic experiment planner we were discussing in the past, since bluesky objective is exactly to plan and customize experiments |
Just to elaborate, ophyd support gives access to the larger bluesky ecosystem, which makes it easy to work across platforms. It creates standards for acquisition, planning, and overall looks really neat for writing experiments with python. And GUI integration with bluesky is an active project. They might have insights on how to go about this. cc @tacaswell @danielballan |
Thanks for the insight, @pskeshu . One thing I'm trying to wrap my mind around is mostly how performant the bluesky engine can be when trying to integrate high speed acquisitions. To elaborate: I'm currently using an hacked version of ImSwitch to control an interferometric scattering microscope (iSCAT) with a side fluorescence channel; the iSCAT channel uses a camera capable of reaching up to 10k FPS. As we use it for particle tracking experiments with exposure times as low as 300 us, the current recording engine allows me to only record a certain number of frames before losing them. Would bluesky be able to achieve such high framerates? If so, how? One thing I've been pondering is accelerating the model by compiling it with Cython; would this be a possibility for bluesky as well? |
A question for the nikea community perhaps - https://join.slack.com/t/nikea/shared_invite/zt-24yl9vom8-Dac~gmCsQkflInf4ayFVNw |
Today @jonatanalvelid kindly helped me getting more familiar with the current status of the signal generators within ImSwitch. @kasasxav, I apologize for tormenting you with this but I really need to make some order in my mind about this :P so whenever you have time to review this information it would be great.
First some terminology because this got me confused a lot, so it's just a reminder for me:
There are currently some problems and questions which should be addressed:
APDManager
to theNidaqManager
class (for example here) which should not be there. The reason being that the signal generator in theAPDManager
could also use an interface different from theNidaqManager
. Speaking with Jonatan we've come to realize that there should be some way to address this problem, but he's also currently working on it. This is just a reminder to keep this under watch and fix this whenever somebody manages to work on this;SuperScanManager
class there's a reference to this_parameterCompatibility
method which is both abstract and implemented; is this a typo?_scanDesigner
->_analogSignalDesigner
_TTLCycleDesigner
->_digitalSignalDesigner
makeFullScan
method, there's a reference to thescanInfoDict
dictionary, which Jonatan told me is only used within the APDManager and there are some calculations being done to obtain this dictionary. Is there any reason why this should not be moved to the APDManager and add some parameters in the APD managerProperties if necessary?runScanAdvanced
, in theScanController
classes should probably be refactored to just a simplerunScan
, whilemakeFullScan
in theScanManager
classes should be come something likebuildScanSignal
, unless I'm missing something;ScanController
classes there's a direct reference to thenidaqManager
instance which should not be there, but instead there should be a reference to aScanManager
base class. Funnily enough, @kasasxav, if you remember this is what we talked about a long time ago whenever I did myPulseStreamerManager
implementation :DEDIT: the issue mentiones
documentation
because there should be a proper vocabulary about this with some more detailed terminology in order to avoid confusion. Also, once we are sure about the points mentioned above, a proper tutorial on how to implement new signal generators and designers should be added in the documentation.The text was updated successfully, but these errors were encountered: