| Getting Started | Documentation | Glish | Learn More | Programming | Contact Us |
| Version 1.9 Build 803 |
|
Continuing with the example above, find the maximum and minimum temperature in the last 3 hours of the data.
- xstart:=dm.quantity(xtimeinseconds[1],'s') # get the beginning time and
# convert it into a quantity with
# units of seconds.
- xstart
[unit=s, value=13098.2014]
- xstop:=dm.add(xstart,'3.h') # set the end time to the start
# time plus 3 hours.
- xstop
[unit=s, value=23898.2014]
- platetemp:=data.getcol("RC08_10_PLATE15K") # make an array of all the 15 K
# plate temperatures.
- mask:=xtimeinseconds<xstop[value] # define a boolean mask that is
# true only within the time range.
- maxinfirst3:=max(platetemp[mask]) # get the max in this range
- mininfirst3:=min(platetemp[mask]) # get the min in this range
- print mininfirst3, maxinfirst3
15.1367188 16.1132812