{"action":"created","issue":{"url":"https://api.github.com/repos/tomopy/tomopy/issues/132","repository_url":"https://api.github.com/repos/tomopy/tomopy","labels_url":"https://api.github.com/repos/tomopy/tomopy/issues/132/labels{/name}","comments_url":"https://api.github.com/repos/tomopy/tomopy/issues/132/comments","events_url":"https://api.github.com/repos/tomopy/tomopy/issues/132/events","html_url":"https://github.com/tomopy/tomopy/issues/132","id":113941660,"number":132,"title":"different results from legacy and current tomopy","user":{"login":"rh66","id":6943918,"avatar_url":"https://avatars.githubusercontent.com/u/6943918?v=3","gravatar_id":"","url":"https://api.github.com/users/rh66","html_url":"https://github.com/rh66","followers_url":"https://api.github.com/users/rh66/followers","following_url":"https://api.github.com/users/rh66/following{/other_user}","gists_url":"https://api.github.com/users/rh66/gists{/gist_id}","starred_url":"https://api.github.com/users/rh66/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rh66/subscriptions","organizations_url":"https://api.github.com/users/rh66/orgs","repos_url":"https://api.github.com/users/rh66/repos","events_url":"https://api.github.com/users/rh66/events{/privacy}","received_events_url":"https://api.github.com/users/rh66/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-10-28T22:43:10Z","updated_at":"2016-04-07T17:44:06Z","closed_at":null,"body":"Just start to try tomopy in conda, and I get different results by using current tomopy in conda and legacy tomopy. I probably just don't know some fundamentals and therefore make the mistake. Hope someone can point out what I did wrong here.\r\nI tested by assuming an object of round disc with intensity of 1 and radius of 200, with image width of 800. All the projections will be same since the rotation is centered at disc center. I generated projections, reconstructed it and plot the cross-section through disc center, as following:\r\n\r\n    data2=np.zeros((1200, 1, 800))\r\n    for i in range(400):\r\n        data2[:, 0, i+200]=2*(200**2-(199.5-i)**2)**0.5\r\n    angle2=np.linspace(0,180.0,1200)*np.pi/180.0\r\n    rec2 = tomopy.recon(data2, angle2, center=399.5, algorithm='gridrec')\r\n    plt.plot(rec2[0,400,:])\r\n    plt.show()\r\n\r\nThe result is the left plot of attached image. If I use legacy tomopy, the result is shown on the right of attached image. The right one is my original object. And the code of using legacy tomopy is:\r\n\r\n    data2=np.zeros((1200, 1, 800))\r\n    for i in range(400):\r\n        data2[:, 0, i+200]=2*(200**2-(199.5-i)**2)**0.5\r\n    dark = np.zeros((1, 800), dtype=float)\r\n    white = np.ones((1, 800), dtype=float)\r\n    theta = np.linspace(0, 180, 1200)\r\n    d = tomopy.xtomo_dataset(log='debug')\r\n    d.dataset(data2, white, dark, theta)\r\n    d.center=399.5\r\n    d.gridrec(emission=True)\r\n\r\nThank you for your attention and help.\r\nRong\r\n\r\n![reconstructioncompare](https://cloud.githubusercontent.com/assets/6943918/10804812/e6103476-7d9f-11e5-99e7-e544c710f111.jpeg)\r\n"},"comment":{"url":"https://api.github.com/repos/tomopy/tomopy/issues/comments/207021843","html_url":"https://github.com/tomopy/tomopy/issues/132#issuecomment-207021843","issue_url":"https://api.github.com/repos/tomopy/tomopy/issues/132","id":207021843,"user":{"login":"dgursoy","id":1311208,"avatar_url":"https://avatars.githubusercontent.com/u/1311208?v=3","gravatar_id":"","url":"https://api.github.com/users/dgursoy","html_url":"https://github.com/dgursoy","followers_url":"https://api.github.com/users/dgursoy/followers","following_url":"https://api.github.com/users/dgursoy/following{/other_user}","gists_url":"https://api.github.com/users/dgursoy/gists{/gist_id}","starred_url":"https://api.github.com/users/dgursoy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dgursoy/subscriptions","organizations_url":"https://api.github.com/users/dgursoy/orgs","repos_url":"https://api.github.com/users/dgursoy/repos","events_url":"https://api.github.com/users/dgursoy/events{/privacy}","received_events_url":"https://api.github.com/users/dgursoy/received_events","type":"User","site_admin":false},"created_at":"2016-04-07T17:44:06Z","updated_at":"2016-04-07T17:44:06Z","body":"Tried with current version with the following code, and got some interesting results. \r\n\r\n- Top plot: Gridrec reconstruction of Shepp-Logan phantom. \r\n- Middle plot: Gridrec reconstruction values multiplied with two\r\n- Bottom plot: Block-ART Iterative reconstruction plot\r\n\r\n```Gridrec``` result seems to be multiplied by two. @michael-sutherland any comments or ideas why this may have happened?\r\n\r\n```\r\nimport tomopy\r\nimport numpy as np\r\n\r\nobj = tomopy.shepp2d(128)\r\nang = tomopy.angles(180)\r\nprj = tomopy.project(obj, ang)\r\n\r\nrec1 = tomopy.recon(prj, ang, \r\n    algorithm='gridrec', \r\n    filter_name='ramlak',\r\n    num_gridx=128,\r\n    num_gridy=128)\r\n\r\nrec2 = tomopy.recon(prj, ang, \r\n    algorithm='bart',\r\n    num_iter=40,\r\n    num_gridx=128,\r\n    num_gridy=128,\r\n    num_block=10)\r\n\r\nimport matplotlib.pylab as plt\r\n\r\nplt.subplot(1, 3, 1)\r\nplt.plot(obj[0, 64, :], 'r', linewidth=3)\r\nplt.plot(rec1[0, 64, :], 'b', linewidth=2)\r\nplt.title('Gridrec')\r\nplt.grid()\r\nplt.axis('tight')\r\n\r\nplt.subplot(1, 3, 2)\r\nplt.plot(obj[0, 64, :], 'r', linewidth=3)\r\nplt.plot(2*rec1[0, 64, :], 'b', linewidth=2)\r\nplt.title('Gridrec multiplied by 2')\r\nplt.grid()\r\nplt.axis('tight')\r\n\r\nplt.subplot(1, 3, 3)\r\nplt.plot(obj[0, 64, :], 'r', linewidth=3)\r\nplt.plot(rec2[0, 64, :], 'b', linewidth=2)\r\nplt.title('BART')\r\nplt.grid()\r\nplt.axis('tight')\r\n\r\nplt.show()\r\n```\r\n\r\n...and here's the output image:\r\n\r\n![figure_1](https://cloud.githubusercontent.com/assets/1311208/14360958/51d59a78-fcbe-11e5-8dbd-e43ba81f0a72.png)"}}