From: Friedrich F. <foe...@bi...> - 2016-02-29 11:58:11
|
dear dustin, the project function is still experimental and not used anywhere else. nevertheless, your fix should be fine - if you look at the volume in chimera you probably will end up with many z-layers showing the same 2d data. this and other functions will have more support when we have hired a full-time developer for pytom. cheers friedrich On Fri, Feb 26, 2016 at 9:54 PM, Dustin Morado <dus...@gm...> wrote: > Hi all, > > When I try to project a subvolume I get the following error: > > --------------------------------------------------------------------------- > ValueError Traceback (most recent call last) > <ipython-input-9-c7d5e1885a02> in <module>() > ----> 1 sv2d = project(sv, r) > > /opt/pytom/basic/transformations.py in project(v, rot, verbose) > 611 npprojection = ndarray([v.sizeX(), v.sizeY(), 1], > dtype=float32, buffer=None, offset=0, strides=npvol.strides, > 612 order='F') > --> 613 proj(npvol, axis=2, dtype=float32, out=npprojection) > 614 projection = npy2vol(npprojection,3) > 615 return projection > > /usr/lib/python2.7/dist-packages/numpy/core/fromnumeric.pyc in sum(a, > axis, dtype, out, keepdims) > 1712 else: > 1713 return _methods._sum(a, axis=axis, dtype=dtype, > -> 1714 out=out, keepdims=keepdims) > 1715 > 1716 def product (a, axis=None, dtype=None, out=None, keepdims=False): > > /usr/lib/python2.7/dist-packages/numpy/core/_methods.pyc in _sum(a, axis, > dtype, out, keepdims) > 23 def _sum(a, axis=None, dtype=None, out=None, keepdims=False): > 24 return um.add.reduce(a, axis=axis, dtype=dtype, > ---> 25 out=out, keepdims=keepdims) > 26 > 27 def _prod(a, axis=None, dtype=None, out=None, keepdims=False): > > ValueError: output parameter for reduction operation add has too many > dimensions > > If I add ‘keepdims=True’ to the sum call I get a projection, but is this > OK to do? > > — > Cheers, > Dustin > > ------------------------------------------------------------------------------ > Site24x7 APM Insight: Get Deep Visibility into Application Performance > APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month > Monitor end-to-end web transactions and take corrective actions now > Troubleshoot faster and improve end-user experience. Signup Now! > http://pubads.g.doubleclick.net/gampad/clk?id=272487151&iu=/4140 > _______________________________________________ > Pytom-mail mailing list > Pyt...@li... > https://lists.sourceforge.net/lists/listinfo/pytom-mail > -- Dr. Friedrich Foerster Max-Planck Institut fuer Biochemie Am Klopferspitz 18 D-82152 Martinsried Tel: +49 89 8578 2632 Fax: +49 89 8578 2641 www.biochem.mpg.de/foerster |