cryostat-gui / cryostat-gui Goto Github PK
View Code? Open in Web Editor NEWSoftware to control an Oxford Cryostat, as well as transport measurment devices, at TU Wien
License: MIT License
Software to control an Oxford Cryostat, as well as transport measurment devices, at TU Wien
License: MIT License
Include a software layer for the ramp of the Oxford ITC503:
The ramp rate set for ITC503 is not always what the instrument does, since there is a maximum time for the ramp. If a very small ramp rate is set for a single large temperature step, this will fail.
Currently a function in a device control thread looks something like this:
def setRamp_Rate_K(self):
try:
self.LakeShore350.ControlSetpointRampParameterCommand(1,1,self.Ramp_Rate_value)
except AssertionError as e_ass:
self.sig_assertion.emit(e_ass.args[0])
except VisaIOError as e_visa:
if type(e_visa) is type(self.timeouterror) and e_visa.args == self.timeouterror.args:
self.sig_visatimeout.emit()
else:
self.sig_visaerror.emit(e_visa.args[0])
Actually, nearly all the functions look like this. What the function does is in one line, all the rest is exception handling, which is the same in all functions. Ideally, it would look more like this:
@ExceptionHandling
@pyqtSlot()
def setRamp_Rate_K(self):
self.LakeShore350.ControlSetpointRampParameterCommand(1,1,self.Ramp_Rate_value)
Currently I am not sure about how to pass the signals to the decorator, as all of this happens at compilation-time of the class.
uninterrupted live logging in case of starting a new thread
aligning the database plot code to the currently functional live-plot (and make it functional)
combining database with live-data
backend for all the currently disabled GUI elements:
relative vs absolute time (in case of time-axes)
time in hours/minutes/seconds
drawing only a certain range (especially when using the database)
In-application plotting of live-measured data
showing multiple plots at once
saving and loading presets
implement button on mainWindow to clear the temporary folder in which the XX.pid
files are stored, which prevent the individual ControlClients to start multiple times.
This is necessary in case of non-orderly shutdown of the ControlClients, during which the pid files are not cleared properly
ITC503 is not capable to change PID values during a sweep on its own.
change from string formatting to sqlite3's builtin sql-injection prohibiting functionality:
change all
mycursor.execute('ADD COLUMN {} TO TABLE {}'.format(column, table))
to
mycursor.execute('ADD COLUMN ? TO TABLE ?', column, table)
.dat
filesImplement one mainControl app, which can start/stop, show/hide different device apps
adapt mainWindow.py
accordingly:
when putting 100% to the gas flow parameter, the needle valve stays at 0%, since the device does not understand 100%.
One-liner to make 100% gui input 99% device input
implement an abstract logger (and logging configuration) class from which the different ones can inherit basic functions and attributes
take an extended look at which windows should be closed and which should be hid, in what circumstance - and implement the same.
make a setting in the global settings:
checkbox: 'silence errors'
check for that in the show_error_textbrowser
method
memory leaks:
GUI freeze:
controls_software_disabled
context manager, instead of just disabling the wanted widgets, the whole GUI freezes. find the bad program design and exchange it for something betterimplement running the sequences for the Cryostat in the zmq architecture, i.e. using zmq comms to retrieve data
set:
currently data is provided for prometheus by the one logging class, which collects all data, and exposes it all to prometheus.
we would like to have the individual services which interact with the instruments, to do this themselves - like this, if there is no data available, it is much easier to detect
GUI element signals should in principle not be connected to lambda functions: they can not be disconnected. Thus, whenever one stops a device thread and starts it again, the gui elements are connected a second time, and every action is recorded and managed twice (or multiple times, when the device thread was stopped and started more than once)
Therefore, we need functions for every single GUI element action!
implement a long term storage for prometheus on the server, so logs can be investigated for longer periods
good calculation for rate of change of a specific value - needs precise datetime format, refer to #22
uncertainties of measurements
maybe more useful data to calculate from raw measured values?
the data sent back by the ITC is in exact accordance with what is being displayed at the physical front panel. Therefore, a number above 100°C can only have one decimal - however, the sensor is still better.
Using the current setpoint and the temperature difference between setpoint and temperature, more precision could be retrieved from the instrument
the logging package should be used as advised in the docs:
__main__
, so that logging output is generatedImplementing an abstract sequence performer, which leaves the set_temperature
functions with an NotImplementedError
, where anyone might plug in their systems particularities - to be used in conjuction with the sequence parser.
There are many things to do here separately!
A thread which recieves a sequence, and measures in a given pattern, without setting any control parameters of the devices themselves
Implement a 'settings' window, where all the 'basic' settings for instruments or control-cycles will be drawn together into a central place.
while using nssm to run ControlClients as windows services, it is currently not possible to use the file rotation feature of I/O nssm stdout redirection.
When using this feature in nssm, the services cannot be reliably stopped, but remain in a state of "stop pending", while the respective nssm process continues to run.
So that we do not incur enormous log-files, we should find another way to rotate them, hopefully with only a small amount of hardcoding of file locations
Implement the following functions and behaviour
function((s) to bring the device to highest/lowest speed
2182A Front Autozero
can be turned off for speed (measures two times with different polarities)
if one measures with two polarities oneself, the effects minimised by Front Autozero should also
be minimised by design
2182A Autozero
2182A Autorange (turn off for speed, do ourselves)
2182A set Rate
test for ohmicity of probe, 4 measurements in the specific setting
implement the logging and dataStorage app
Currently, the one core operating everything is just coming to its limit.
the multiprocessing
package should be used for calculations for displayed data, inside the respective QThread, so the actual workload is handed to a different core.
Additionally, it would be very good to do the database update in a separate core (using multiprocessing
again), as this gives short bursts of comparably large cpu loads.
json
and pickle
for temperature control:
For stabilized temperature measurements:
classes inheriting from AbstractLoopThread run the function running()
repeatedly, waiting a set interval
between runs. FOr measuring devices this can mean to request a high number of different values from an instrument, which might take a rather long amount of time.
Therefore, the function running
is only invoked if a parameter self.loop = True
is set. As soon as this parameter is changed to False
, the function is not invoked anymore, until it is set to True
again.
Also, after setting it to False
, one should wait for a small amount of time, to ensure that all recent communication is over, to have a "clear field of operations".
This setting and unsetting for all/a specific device, should best be handled in a context manager. This context manager should accept two arguments, one mandatory and one optional:
currently this is solved in a bare function, which needs to be called for setting and unsetting.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.