{"action":"created","issue":{"url":"https://api.github.com/repos/jpinedaf/GAS/issues/34","labels_url":"https://api.github.com/repos/jpinedaf/GAS/issues/34/labels{/name}","comments_url":"https://api.github.com/repos/jpinedaf/GAS/issues/34/comments","events_url":"https://api.github.com/repos/jpinedaf/GAS/issues/34/events","html_url":"https://github.com/jpinedaf/GAS/issues/34","id":83710567,"number":34,"title":"B18 Noise map is 0 everywhere","user":{"login":"low-sky","id":1139910,"avatar_url":"https://avatars.githubusercontent.com/u/1139910?v=3","gravatar_id":"","url":"https://api.github.com/users/low-sky","html_url":"https://github.com/low-sky","followers_url":"https://api.github.com/users/low-sky/followers","following_url":"https://api.github.com/users/low-sky/following{/other_user}","gists_url":"https://api.github.com/users/low-sky/gists{/gist_id}","starred_url":"https://api.github.com/users/low-sky/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/low-sky/subscriptions","organizations_url":"https://api.github.com/users/low-sky/orgs","repos_url":"https://api.github.com/users/low-sky/repos","events_url":"https://api.github.com/users/low-sky/events{/privacy}","received_events_url":"https://api.github.com/users/low-sky/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-06-01T21:51:42Z","updated_at":"2015-06-12T15:31:06Z","closed_at":null,"body":"Something is wrong and this makes ammonia fitting barf."},"comment":{"url":"https://api.github.com/repos/jpinedaf/GAS/issues/comments/111528616","html_url":"https://github.com/jpinedaf/GAS/issues/34#issuecomment-111528616","issue_url":"https://api.github.com/repos/jpinedaf/GAS/issues/34","id":111528616,"user":{"login":"jpinedaf","id":6529114,"avatar_url":"https://avatars.githubusercontent.com/u/6529114?v=3","gravatar_id":"","url":"https://api.github.com/users/jpinedaf","html_url":"https://github.com/jpinedaf","followers_url":"https://api.github.com/users/jpinedaf/followers","following_url":"https://api.github.com/users/jpinedaf/following{/other_user}","gists_url":"https://api.github.com/users/jpinedaf/gists{/gist_id}","starred_url":"https://api.github.com/users/jpinedaf/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jpinedaf/subscriptions","organizations_url":"https://api.github.com/users/jpinedaf/orgs","repos_url":"https://api.github.com/users/jpinedaf/repos","events_url":"https://api.github.com/users/jpinedaf/events{/privacy}","received_events_url":"https://api.github.com/users/jpinedaf/received_events","type":"User","site_admin":false},"created_at":"2015-06-12T15:31:06Z","updated_at":"2015-06-12T15:31:06Z","body":"I tested the code and it looks like it might be a problem with spectral cube. Below is a sample of the code that reproduces the issue:\r\n\r\n```\r\nimport matplotlib.pyplot as plt\r\nfrom spectral_cube import SpectralCube\r\nfrom astropy import units as u\r\nimport numpy as np\r\n\r\nfile_in='B18_NH3_11_base1.fits'\r\ncube = SpectralCube.read(file_in)\r\n\r\nindex_rms=np.arange(0,80)\r\nmask_rms = np.zeros( cube.shape, dtype=bool)\r\nmask_rms[index_rms] = True\r\n#mask_rms = mask_rms & np.isfinite( (cube.unmasked_data[:,:,:]).value )\r\ncube_rms = cube.with_mask(mask_rms)\r\n\r\nrms1 = cube[0:80,:,:].std(axis=0)\r\nrms2 = cube_rms.std(axis=0)\r\n\r\n# plot map\r\nplt.imshow( rms1.value,  origin='lower', vmin=0.01, vmax=0.4)\r\nplt.show()\r\n\r\n# plot map\r\nplt.imshow( rms2.value, origin='lower', vmin=0.01, vmax=0.4)\r\nplt.show()\r\n```\r\n\r\nThe map rms1 produces the proper error map, \r\n![b18_rms1](https://cloud.githubusercontent.com/assets/6529114/8133456/b6b395f8-1128-11e5-92cd-3211e6858046.png)\r\nbut rms2 produces a flat map with zeros.\r\n![b18_rms2](https://cloud.githubusercontent.com/assets/6529114/8133455/b6b330e0-1128-11e5-8867-53d79a90e080.png)\r\n"}}