McDermott-Group / servers

Public repo that stores LabRAD servers and other non-measurement related code
0 stars 2 forks source link

[ADR Log] What is the *.temps format? #19

Closed patzinak closed 8 years ago

patzinak commented 8 years ago

I was not able to neither load a log file with MATLAB nor to open it with a text editor. This is not urgent at this moment.

roboguy222 commented 8 years ago

The code to save this is as follows:

f.write( struct.pack('d', mpl.dates.date2num(self.state['datetime'])) )
[f.write(struct.pack('d', temp)) for temp in newTemps]

Basically, .temps files are binary files with 5 numbers (time, 4 temps) saved as doubles. In python, these can be read back out using

[struct.unpack('d',f.read(8))[0] for x in ['time','t1','t2','t3','t4']]

You can update your matlab script for plotting past records, but it may not be worth it given I will be converting this to use @amopremcak 's new datavault as soon as he is finished.

amopremcak commented 8 years ago

Should be done with this by Sunday of this week. Going to have Noah torture test it while we are at APS and if all goes as planned we should be ready to launch by next week.

patzinak commented 8 years ago

Agreed with both. There is no real need to mess up with the temperature logs until we are in a better position.

On Fri, Mar 11, 2016 at 2:02 PM, amopremcak notifications@github.com wrote:

Should be done with this by Sunday of this week. Going to have Noah torture test it while we are at APS and if all goes as planned we should be ready to launch by next week.

— Reply to this email directly or view it on GitHub https://github.com/McDermott-Group/servers/issues/19#issuecomment-195525021 .

Ivan Pechenezhskiy Postdoctoral Research Associate Dept. of Physics, Univ. of Wisconsin–Madison Thomas Chamberlin Hall 5316 1150 University Ave, Madison, WI 53706 Office: 1 (608) 890-0821 http://www.physics.wisc.edu/~rfmcdermott/