Open jkingslake opened 8 months ago
I looked at the original .DAT files, and they simply record temperatures like that. Here is a time series of the A101 winter temperatures, with any absurdly high temperatures cut out:
Now, if I open a .DAT file from the SD card from one of the months without any reasonable temperature measurements, the temperatures are indeed recorded to be that high:
What code are you using to open the dat files?
Textedit (I am just double clicking on the file itself and opening it with the app), which definitely reads it properly. Negative longitude values are still preserved fine. Same thing happens when I open with VSCode
I see. Could you attach an affected dat file here?
I reckon the temperatures are just stored on the ApRES that way. Maybe the MATLAB scripts have a conversion, or maybe this is just a bug in how the ApRES records temperature. I think it would make sense that it's subtracting from 512, seeing that the values are all around 500.
I cannot attach a file of that size or type, but here is a google drive link: https://drive.google.com/file/d/1aDRwOpr7qBH6e8jGIIDanWLpK3bogs9s/view?usp=sharing
Ok, I am convinced that the temperatures are supposed to be stored like that. In the Nicholls MATLAB scripts, there is this block of code at the end of LoadBurstRMB6.m:
if vdat.Code == 0 % Clean temperature record (wrong data type?) bti1 = find(vdat.Temperature_1>300); if ~isempty(bti1) vdat.Temperature_1(bti1) = vdat.Temperature_1(bti1)-512; end bti2 = find(vdat.Temperature_2>300); vdat.Temperature_2(bti2) = vdat.Temperature_2(bti2)-512; end
So it looks like they manually clean it, and they do indeed remove 512. We'll need to add in a similar adjustment as well when reading in the data - it can be a simple if statement
Oh, interesting! Yes, we should that around here.
It looks like temperatures in C below zero are getting decoded from the .dat files incorrectly.