{"action":"created","issue":{"url":"https://api.github.com/repos/pyspeckit/pyspeckit/issues/42","labels_url":"https://api.github.com/repos/pyspeckit/pyspeckit/issues/42/labels{/name}","comments_url":"https://api.github.com/repos/pyspeckit/pyspeckit/issues/42/comments","events_url":"https://api.github.com/repos/pyspeckit/pyspeckit/issues/42/events","html_url":"https://github.com/pyspeckit/pyspeckit/issues/42","id":68487708,"number":42,"title":"xarr offset and flip when loading/plotting 1D spectra","user":{"login":"privong","id":1630295,"avatar_url":"https://avatars.githubusercontent.com/u/1630295?v=3","gravatar_id":"","url":"https://api.github.com/users/privong","html_url":"https://github.com/privong","followers_url":"https://api.github.com/users/privong/followers","following_url":"https://api.github.com/users/privong/following{/other_user}","gists_url":"https://api.github.com/users/privong/gists{/gist_id}","starred_url":"https://api.github.com/users/privong/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/privong/subscriptions","organizations_url":"https://api.github.com/users/privong/orgs","repos_url":"https://api.github.com/users/privong/repos","events_url":"https://api.github.com/users/privong/events{/privacy}","received_events_url":"https://api.github.com/users/privong/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/pyspeckit/pyspeckit/labels/bug","name":"bug","color":"fc2929"}],"state":"open","locked":false,"assignee":{"login":"keflavich","id":143715,"avatar_url":"https://avatars.githubusercontent.com/u/143715?v=3","gravatar_id":"","url":"https://api.github.com/users/keflavich","html_url":"https://github.com/keflavich","followers_url":"https://api.github.com/users/keflavich/followers","following_url":"https://api.github.com/users/keflavich/following{/other_user}","gists_url":"https://api.github.com/users/keflavich/gists{/gist_id}","starred_url":"https://api.github.com/users/keflavich/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/keflavich/subscriptions","organizations_url":"https://api.github.com/users/keflavich/orgs","repos_url":"https://api.github.com/users/keflavich/repos","events_url":"https://api.github.com/users/keflavich/events{/privacy}","received_events_url":"https://api.github.com/users/keflavich/received_events","type":"User","site_admin":false},"milestone":null,"comments":9,"created_at":"2015-04-14T20:22:43Z","updated_at":"2015-04-15T18:19:03Z","closed_at":null,"body":"I have been experiencing an issue with pyspeckit v0.1.14, in which loading a 1D FITS spectrum results in a xarr which is offset from the expected xarr by a factor of the xarr.refX and the associated data values are flipped L-R. \r\n\r\nE.g., the corect spectrum should appear as: in this image \r\n![correct spectrum](http://privon.com/upload/demo.png)\r\n\r\nBut after issuing the the following pyspeckit commands,\r\n```\r\nimport pyspeckit\r\nsp = pyspeckit.Spectrum('demo.fits')\r\nsp.plotter()\r\n```\r\nAppears as so: \r\n![flipped / offset spectrum](http://privon.com/upload/flipped.png)\r\n\r\nThe FITS file I used to demonstrate this behavior: http://privon.com/upload/demo.fits\r\n\r\nThe FITS fine in question was written out using pyfits (using sp.write() ), after calibration and processing. I assume something could be wrong with the FITS headers that would lead to this behavior, but if that's the case it might also suggest an issue with the way pyspeckit writes out FITS files?\r\n\r\nUnfortunately I haven't had the chance to dig into the code and try to find the source. It's on my list, but I may not get to it until at least after the ALMA deadline on the 23rd."},"comment":{"url":"https://api.github.com/repos/pyspeckit/pyspeckit/issues/comments/93516841","html_url":"https://github.com/pyspeckit/pyspeckit/issues/42#issuecomment-93516841","issue_url":"https://api.github.com/repos/pyspeckit/pyspeckit/issues/42","id":93516841,"user":{"login":"keflavich","id":143715,"avatar_url":"https://avatars.githubusercontent.com/u/143715?v=3","gravatar_id":"","url":"https://api.github.com/users/keflavich","html_url":"https://github.com/keflavich","followers_url":"https://api.github.com/users/keflavich/followers","following_url":"https://api.github.com/users/keflavich/following{/other_user}","gists_url":"https://api.github.com/users/keflavich/gists{/gist_id}","starred_url":"https://api.github.com/users/keflavich/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/keflavich/subscriptions","organizations_url":"https://api.github.com/users/keflavich/orgs","repos_url":"https://api.github.com/users/keflavich/repos","events_url":"https://api.github.com/users/keflavich/events{/privacy}","received_events_url":"https://api.github.com/users/keflavich/received_events","type":"User","site_admin":false},"created_at":"2015-04-15T18:19:03Z","updated_at":"2015-04-15T18:19:03Z","body":"It looks like you have a spectrum over the range [83.699647789291404,...,91.480654049200112] GHz, however in the original report you show something going down to 81 GHz.  Am I missing something?  CLASS writes FITS files different from every other program in some subtle ways, but I didn't think they were *that* discrepant.  Perhaps there is an error in the CLASS reading, though - I have in the source code that `dv=-hdr['CDELT1']`, which does not seem right.  I was trying to follow these instructions:\r\nhttp://iram.fr/IRAMFR/GILDAS/doc/html/class-html/node84.html"}}