@@ -0,0 +1,744 @@
+import time%0Aimport numpy as np%0A%0Adef parse_srs_log(fname,sensor=2):%0A    %22%22%22%0A    Parse log file created by Heather's SRS logger%0A    *fname* : file name of log%0A    *sensor* : which sensor to extract (right now 2 corresponds to the package thermometer)%0A    returns numpy arrays of unix times and the temperature values%0A    %22%22%22%0A    fh = open(fname,'r')%0A    lines = fh.readlines()%0A    fh.close()%0A    temps = %5B%5D%0A    times = %5B%5D%0A    for line in lines:%0A        parts = line.split(' ')%0A        if int(parts%5B0%5D) != sensor:%0A            continue%0A        if len(parts) %3C 4:%0A            continue%0A        temps.append(float(parts%5B2%5D))%0A        times.append(time.mktime(time.strptime(parts%5B3%5D.strip(),'%25Y%25m%25d-%25H%25M%25S')))%0A    return np.array(times),np.array(temps)%0A

Add parse_srs to parse log files from Heather's SRS logger