These are chat archives for thunder-project/thunder

17th
Apr 2017
Lina Tran
@linamnt
Apr 17 2017 16:41
Hi everyone, I'm not sure if I'm doing something wrong when converting an image to a series (using img.toseries()) the dimensions which start off as (frames,x,y) get inverted such that I get (x,y, frames)? This seems to cause problems when doing other calculations on the series objects since frames typically comes first?
Lina Tran
@linamnt
Apr 17 2017 16:46
(or I am mistaken as to the frames having to come first, and the reason for the change in order of dimensions)
Davis Bennett
@d-v-b
Apr 17 2017 18:00
@linamnt the parallelized axis / axes are always to the left of the local axis / axes for the purposes of `imgs.shape` or `series.shape`
so a `thunder.images` object made of 1000 frames, each 512 by 512 will have `shape = [1000, 512, 512]`
if you convert that to `series`the dimensions will become `[512, 512, 1000]`
here's an example:
``````>>> test = td.images.fromrandom([10,11,12])
>>> test.shape
(10, 11, 12)
>>> test.toseries().shape
(11, 12, 10)``````
Lina Tran
@linamnt
Apr 17 2017 18:18
I see, so if I wanted to perform say series.mean() it always results in the mean across the local axis/axes, rather than across the parellelized axis, if I wanted to do the latter, the only option then is to do the mean on the array or image type instead?
Davis Bennett
@d-v-b
Apr 17 2017 20:09
@linamnt i think `series.mean()` takes the mean over the parallelized axes. see this example:
``````>>> test = td.images.fromrandom([10,11,12])
>>> test.shape
(10, 11, 12)
>>> test.mean().shape
(1, 11, 12)
>>> test.toseries().mean().shape
(1, 1, 10)``````
Lina Tran
@linamnt
Apr 17 2017 20:17
Thanks @d-v-b
Davis Bennett
@d-v-b
Apr 17 2017 20:32
(I imported `thunder` as `td` earlier in there)