Sadie noticed that the data operation "|setDepend0Units('ms since 1970-01-01T00:00')" doesn't have an obvious analog in scripting. This makes me realize there are a number of functions in the data operations which are implemented with three or fours lines of code, which are easily composed in a script by me, but not by others who aren't so familiar with the libraries. The goal should be that any operation "|doXXX(arg)" should have a Jython function "doXXX(ds,arg)".
Short of that, script authors can work around this problem by calling the OperationsProcessor themselves, like so:
ds= dataset( findgen(40), sin( linspace( 0, 2*PI, 40 ) ) )
from org.das2.qds import OperationsProcessor
ds= OperationsProcessor.process( ds, "|setDepend0Units('ms since 1970-01-01T00:00')", None )
plot( ds )
(See https://github.com/autoplot/dev/demos/2021/20210818/demoOperationsProcessor.jy)
It's ironic that sprocess is sprocess( str, ds ) not sprocess( ds, str )! Whoops...
I've gone ahead and added process( ds, str ) and deprecated sprocess. I'll update the above example to use this.
Last edit: Jeremy Faden 2021-08-18
Diff:
I made new setDepend0Units, setDepend1Units, and setValidRange in Ops (which is imported automatically into Jython scripts). Other functions are fairly simple wrappers around existing code.
I see setDepend0Cadence but not setDepend0Units.
We also saw that netcdf didn't allow "hrs+since+2020-01-01" for units, but does allow "hr since 2020-01-01T00:00Z"
Also another script showed where the timetags are dropped in some operations.