I am probably making this too hard. When there is a visad data object, it is possible to see if there is a time associated with the object or if it has been omitted:
<type 'visad.meteorology.ImageSequenceImpl'> FunctionType: Domain has 1 components: 0. RealType: Time 0. Name = Time 0. Unit: s since 1970-01-01 00:00:00.000 UTC Range: FunctionType: Domain has 2 components: 0. RealType: ImageElement 0. Name = ImageElement 1. RealType: ImageLine 1. Name = ImageLine Range: RealTupleType has 1 components: 0. RealType: Band2_TEMP 0. Name = Band2_TEMP 0. Unit: K
How can that be tested in code? It seems that testing len(d.getDomainSet()) == 1 is sloppy and too narrow. Is there a better way?
from ucar.unidata.data.grid import GridUtil print GridUtil.isTimeSequence(yourData)
To be true, the data object must not be a Flatfield, and its domain must be 1-dimensional and of type Time. So this means you will still get 'true' if your ImageSequenceImpl only has a single time step. For a SingleBandedImageImpl, however, you should always get 'false'.