-
Notifications
You must be signed in to change notification settings - Fork 29
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
Instream improvements #78
Conversation
- Adapted ni_x_series_in_streamer.py to interface change (UNTESTED)
- Implemented trace snapshot saving
- Updated `changelog.md`
… dialog. The user can choose between a fixed number of fractional digits or automatic scaling with SI prefix and 5 fractional digits.
Awesome @Neverhorst ! I am happy that we are going with floats for the timestamps. I played around with |
I have tested the |
I also tested the In addition, I am testing this with the wavemeter implementation I am working on right now. Almost everything seems to work fine here including multiple channels. However, I had to remove a |
Thank you for testing. Apart from that I'm still not satisfied with the buffer requirements in the
This is the preferred way for data streams because you can simply append new samples to such an array without copying samples around. The current version of |
- Moved everything to handle contiguous C-style buffers with multiplexed channel layout for more efficient memory handling.
…ream-improvements
The two most recent commits seem to have broken something - I get a zero cts/s reading with our nidaq even though there should be around 1 kHz of counts. The analog channels work for me, at least they display the same noise as the nidaq test panel does. Can you confirm that with your nidaq @NicolasStaudenmaier ? |
Yes, I can confirm. If I have more than one digital channel the data of the first is displayed as the second displayed digital channel. This only of the first digital channel is actually displayed, if it is not displayed its data is not shown anywhere.
|
Yeah, digital channels are difficult/impossible to debug with a simulated device due to our weird way of setting up the task, so thanks for the input. I can not check if the digital channel output shown in the instreamer makes sense, but at least the error you reported @NicolasStaudenmaier is gone now. I suspect it was the cause of all the trouble. |
Yes, for me now it works as I would expect it and as it was before the two commits of yesterday. |
For me as well! I can read out one digital and one analog channel simultaneously without issue. Awesome! |
@qku @NicolasStaudenmaier , |
Yes, it is ready to merge in my eyes. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
With testing by @qku and my side and fixing the bugs as of the discussion, looks ready to merge now.
- Raised package requirement to `qudi-core>=1.4.0`
…ummy from number_of_samples to samples_per_channel. I assume this was overseen in PR #78 and the only real hardware in main (NIXSeriesInStreamer) is actually already written that way.
Description
Expands and improves the
DataInStreamInterface
in various ways:SampleTiming
Enum to constraints that specifies one of three timing modes:CONSTANT
: The sample rate is deterministic and constant. Each sample in the stream has a fixed timing determined by the sample rate.TIMESTAMP
: The sample rate is just a hint for the hardware but can not be considered constant. The hardware will provide anumpy.float64
timestamp in seconds from the start of the stream for each sample. This requires an additional timestamp buffer array in addition to the normal channel sample buffer.RANDOM
: The sample rate is just a hint for the hardware but can not be considered constant. There is no deterministic time correlation between samples, except that they are acquired one after another.InStreamDummy
,NIXSeriesInStreamer
,TimeSeriesReaderLogic
andTimeSeriesGui
modules have been adapted to the interface changes.Rudimentary data saving has been implemented in the
TimeSeriesReaderLogic
module.Sample generation in
InStreamDummy
module has been improved and newSampleTiming
modes have been implemented (choose viaConfigOption
)Motivation and Context
The main feature was the introduction of the
SampleTiming
into the interface. Several new projects were missing a possibility to use the streaming interface with non-uniform sampling.See also Issue #59
How Has This Been Tested?
Extensively tested with dummy module and time series toolchain.
Needs further testing with NI X-series hardware.
Types of changes
Checklist:
/docs/changelog.md
.(syntax, indentation, mutable default values, etc.).