nemocrys / multilog Goto Github PK
View Code? Open in Web Editor NEWMeasurement data recording and visualization using various devices.
License: GNU General Public License v3.0
Measurement data recording and visualization using various devices.
License: GNU General Public License v3.0
Make channels individually configurable (npc, lsync, ...), currently these settings are global.
One csv file takes 1.5 mb per image, a compressed file only needs 0.2 mb. Switching to another data format here would save a lot of disk space.
Rogowski_300A factor is x50 (not x100)
Sometimes, probably after running for a long time, the exit button is not working correctly. Additional logging could be helpful to track this problem.
Add a checkbox to hide the lines of selected sensors, as it was implemented in multilog v1. This is helpful if there are many sensors in one plot.
There are many reasons for testing. I think using pytest is a good idea.
The camera xml file is hardcoded in optris_ip640.py included several fixed paths. These are not correct for windows and should be adjustable, e.g., in the main config file.
Currently capturing of camera images is automatically started and cannot be changed later. The following features would be very useful without restarting multilog (for each camera separately):
See https://realpython.com/python-metaclasses/ and comment in man.py - not sure if that's possible, but it'd increase readability of the code.
Re-implement the device-class to make the code more readable and maintainable, e.g. using a separate object for each channel. The current implementation based on multilog1 using various lists is hard to understand / maintain.
Check if the cooling water flow is greater than zero when multilog measurement is started. If not, open a warning in a popup window.
Docstrings are already present, use them to generate a readthedocs website!
Currently all data is stored within the script folder (clone of Github repository). An option would be useful to set a working directory (e.g., one level up from script folder) for configuration files, measurement data and logs.
Currently only temperature measurement and operating point are logged. It'd be nice to also log the setpoint "wsp" and the selection op / wsp.
Add labels with Emissivity, ... information to the view.
This could also a device-related problem. Additional logging would be helpful here.
Calculate and show cooling rate (W) in various loops in real time under IFM tab?
Currently program can be started, but pressing "Start" to begin data saving produces an error if the base folder is not a clone of the git repository. I.e., downloading the code from github is not sufficient and git software is needed to update the code on every PC running it. An option to skip this or enter the missing information (program version?) manually would be useful here.
The config_template.yml is not really clear about which lines exactly should be commented out to deactive a device. Due to the large number of settings and permanent comments at many places, it would be easier to add an enable switch for each device. These could be also used to avoid unnecessary imports of packages, e.g., Optris or Basler.
Fresh copy on a new Windows notebook shows an unclear error when clicking on Start, see attachment. It works if the call to write_nomad_file() is commented out in main.py and if Process-Condition-Logger is disabled in the config.
config.txt
The procedures write_nomad_file() and write_metadata() lead to an unspecific FileNotFoundError: [WinError 2] for a minimal device setup on Windows (attached).
config.txt
With the plan to transition to digital lab-books in mind, I suggest having the process condition tab as the landing page/tab, so we remember to fill in the info. I also suggest having no default values (or maybe NaN) to avoid confusion in case the fields are not filled in.
This can be used to describe the position of the sensor and other notes that used to be in the Lab book.
Currently process conditions can be manually entered and only logged in the corresponding tab. An option could be added to send these changes to the devices such as Eurotherm:
Generally a separate program could be useful for process control (vs. logging), but this small extension seems reasonable also for the logging part as long as we have this tab here.
There is a race condition for updating of measurement data (but the output is still valid). I think the problem was that the time-list may have a different length than the sampling-list when the view is updated.
Log-file snippet:
2022-09-15 12:49:57,408 WARNING multilog.devices - IFM-flowmeter save_measurement: time difference between event and saving of 1.092403 seconds for samplint timestep 2022-09-15 12:49:56.315+02:00 - 2653.875
2022-09-15 12:50:09,401 WARNING multilog.devices - IFM-flowmeter save_measurement: time difference between event and saving of 1.085731 seconds for samplint timestep 2022-09-15 12:50:08.315+02:00 - 2665.875
2022-09-15 12:50:20,377 WARNING multilog.devices - IFM-flowmeter save_measurement: time difference between event and saving of 2.062282 seconds for samplint timestep 2022-09-15 12:50:18.314+02:00 - 2675.874
2022-09-15 12:50:20,382 ERROR multilog.main - Error in updating view of IFM-flowmeter
Traceback (most recent call last):
File "/home/nemocrys/Documents/experiments/meas-multilog/multilog/main.py", line 175, in update_view
self.tabs[device].set_measurement_data(self.rel_time, device_sampling[device])
File "/home/nemocrys/Documents/experiments/meas-multilog/multilog/view.py", line 506, in set_measurement_data
self.temperature_widget.set_data(sensor, rel_time, meas_data["Temperature"][sensor])
File "/home/nemocrys/Documents/experiments/meas-multilog/multilog/view.py", line 388, in set_data
self.lines[sensor].setData(x, y, connect=np.logical_and(con, np.roll(con, -1)))
File "/usr/local/lib/python3.8/dist-packages/pyqtgraph/graphicsItems/PlotDataItem.py", line 595, in setData
self.updateItems( styleUpdate = self.property('styleWasChanged') )
File "/usr/local/lib/python3.8/dist-packages/pyqtgraph/graphicsItems/PlotDataItem.py", line 644, in updateItems
self.curve.setData(x=x, y=y, **curveArgs)
File "/usr/local/lib/python3.8/dist-packages/pyqtgraph/graphicsItems/PlotCurveItem.py", line 365, in setData
self.updateData(*args, **kargs)
File "/usr/local/lib/python3.8/dist-packages/pyqtgraph/graphicsItems/PlotCurveItem.py", line 419, in updateData
raise Exception("X and Y arrays must be the same shape--got %s and %s." % (self.xData.shape, self.yData.shape))
Exception: X and Y arrays must be the same shape--got (1340,) and (1339,).
2022-09-15 12:50:21,453 WARNING multilog.devices - IFM-flowmeter save_measurement: time difference between event and saving of 1.138052 seconds for samplint timestep 2022-09-15 12:50:20.315+02:00 - 2677.875
2022-09-15 12:50:23,385 WARNING multilog.devices - IFM-flowmeter save_measurement: time difference between event and saving of 1.069698 seconds for samplint timestep 2022-09-15 12:50:22.315+02:00 - 2679.875
2022-09-15 12:50:27,376 WARNING multilog.devices - IFM-flowmeter save_measurement: time difference between event and saving of 1.061414 seconds for samplint timestep 2022-09-15 12:50:26.314+02:00 - 2683.874
2022-09-15 12:50:35,380 WARNING multilog.devices - IFM-flowmeter save_measurement: time difference between event and saving of 1.065411 seconds for samplint timestep 2022-09-15 12:50:34.315+02:00 - 2691.874
Sampling time was 2s.
As was implemented in multilog v1, see empty function calc_x2_ticks() in view.py.
Clicking between the many tabs during a busy experiment is quite distracting. A tile view, where several tabs (especially the process data input!) can be shown simultaneously, would help here.
The graphical interface contains quite advanced plots of measurement data and an overview of configuration information. It would be useful to store screenshots of all tabs on Exit.
See description in FAIRmat-NFDI/AreaA-data_modeling_and_schemas#3 and templates in https://github.com/FAIRmat-NFDI/AreaA-data_modeling_and_schemas/tree/main/melt_czochralski_Dadzis
This was not included when multilog2 was published.
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.