basscape.blogg.se

Simpleseps raster 1.2.4
Simpleseps raster 1.2.4





simpleseps raster 1.2.4 simpleseps raster 1.2.4

curvilinear a boolean indicating whether a raster is a curvilinear raster (or NA).affine length 2 numeric the two affine parameters of the geotransform (or NA).dimensions length 2 character the dimension names that constitute a spatial raster (or NA).In addition to that, a dimensions object has an attribute called raster of class stars_raster, which is a named list with three elements: an attribute called dimensions with a dimensions object carrying dimension metadataĪ dimensions object is a named list of dimension elements, each describing the semantics a dimension of the data arrays (space, time, type etc).a (possibly empty) named list of arrays, each having named dimensions.Limit = max( + 1 for x in data] )īindata = binary_data(d, limit, 2 * shift)Įdit: As suggested, if you prefer to perform data to bindata conversion without having to define your own binary_data() function you could use numpy.zeros_like(). That you can easily edit to make it work with an arbitrary amount of data arrays: data = ,įinally if you are dealing with data arrays with different length (say and ) and you don't like plots that vanish in the middle of the figure you can tweak binary_data() again to force its range to the maximum range of your data. Let's say you have data1, data2 and data3 to plot stacked, you'd go like: import numpy as np So now you can set yshift parameter to shift data arrays on the y-axis.

simpleseps raster 1.2.4

To plot multiple data arrays stacked on the same figure you could tweak binary_data() like this: def binary_data(data, yshift=0): or better step it since it's binary data and step() looks way better: import numpy as np This can be done very easily with a list comprehension def binary_data(data): You can create a list with 1 in any position specified in data and 0 elsewhere.







Simpleseps raster 1.2.4