ISISComputingGroup / IBEX

Top level repository for IBEX stories
5 stars 2 forks source link

LSI correlator: plot correlation function on-the-go #7566

Open rerpha opened 1 year ago

rerpha commented 1 year ago

(@smk78 edit of @rerpha text)

As a user of the LSi correlator, I would like to be able to see my correlation function as the data is gathered. This is useful i) when setting up/aligning for a measurement (involving lots of quick measurement-tweak cycles) and, ii) for judging the acquired statistics as the measurement proceeds (else one must grossly over-estimate the measurement duration).

This 'live view' functionality is available in the vendor software, but despite being an ethernet device the LSi correlator is unable to talk to both the vendor software and Ibex at the same time. Indeed the correlator IOC must be stopped in order for the vendor software to run. This means at present a user must do multiple measurements, each time allowing the correlator data to be written to file, and then inspecting the data only once each measurement has finished, which is very time-consuming.

The correlation function plot looks like this image

This data is stored in a numpy array.

In the first instance we should investigate whether or not this can be made available at run-time.

Acceptance Criteria

What is the acceptance criteria?

Extra Information

Matplotlib may be best for this use case.

https://lsinstruments.ch/en/theory/dynamic-light-scattering-dls/introduction

How to Test

verbose instructions for reviewer to test changes (Add before making a PR)

smk78 commented 1 year ago

Feedback received at the 2023 SANS User Meeting earlier this week indicated this feature would be highly desirable if it could be implemented. Thus as a first step there is an imperative to investigate if the correlator API can actually be tapped to provide the necessary information with the necessary frequency.

rerpha commented 1 year ago

From a brief investigation (see #7603 for full details) at the moment it looks like the most we can get data from the device is after each repetition. Peter looked at the vendor code and unfortunately they don't have any way of acting on any sort of event/callback which would make things much quicker (ie act on data as soon as it arrives) - it looked like it wouldn't be that hard to actually implement in the vendor driver, so might be best if we contact them to add some sort of event fire or callback handler. If every repetition is fast enough we could probably just go with that.

smk78 commented 1 year ago

Thanks for the update @rerpha . By all means please try contacting the vendor. support@lsinstruments.ch seems to reach their CTO, Andrea. I have an open support ticket with them which you could reference: https://support.lsinstruments.ch/osTicket/tickets.php?id=1305. You will note that in my post of Feb 16 I did raise this issue.