-
Notifications
You must be signed in to change notification settings - Fork 5
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
Useful updates for future improvement #2
Conversation
…respective attributes with channels previously set at Oxygen
…dd_log" flag at _getTransferChannels and _getElogChannels.
…s set to OFF. Included attribute that stores the elog timestamp.
…log fetch into matrix of float (or datetime) values.
Hello, With the new commits, I have changed/ included the following:
I hope you find these modifications useful and I am looking forward to keep contributing. Please let me know if there are any Best regards |
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.
Thank you for the PR. Overall it looks very useful and I do not expect any problems for existing code based on this library. I added a few remarks that should be easy to fix.
Hello,
I have updated the pyOxygen package with new features:
fetchElog
function, in case of an error from ':ELOG:FETCH?' would return an empty list (Can happen if elog has not yet started). I have modified it to return the valueFalse
, as is the case from 'NONE'.channelList
andelogChannelList
are updated at the__init__
using the helper functions_getTransferChannels
and_getElogChannels
.setElogTimestamp
method, only the 'REL' and 'ABS´ arguments were available. the 'ELOG' was included._localElogStartTime
was created and included at__init__
. This attribute is updated with the current datetime every time that the methodstartElog
is called. The reason for that is to have a time reference to when the elog started so that functions in the future could be implemented, those functions will use this reference to stop the logging if a certain amount of time is reached.elogContext
method, which is a context manager that can be used in awith
statement. The context manager starts the ELOG and stops it either when exiting the context or when an Exception occurs within the context. The following snipped exemplifies its usage:I hope you find these changes useful. If so, I would like to improve more by creating another module containing functions that
record values from the Oxygen using multithreads or coroutines, while other instruments can be controlled and recorded as well.
Best regards
Danton