New issue 970: bug in PPVcube viewing angle to FITS https://bitbucket.org/yt_analysis/yt/issue/970/bug-in-ppvcube-viewing-angle-...
Firstly, thank you for this excellent piece of software.
I am using the PPVcube class to write to FITS images and cubes (essentially, what is being done in this example: http://yt-project.org/doc/analyzing/analysis_modules/ppv_cubes.html...)
I have come across what seems to be a bug in changing the viewing angle of the rotating disk (parameter "L" in the above tutorial).
An aside: I think L should be L = [0.0,np.sin(i),np.cos(i)]; not what is currently set in the tutorial: L = [0.0,np.sin(i),np.sin(i)]
I've attached a script which is simply the original PPVCube.py script from the above webpage with an additional for loop to write out FITS images at inclination angles of 0,10,20,...,90 degrees. All that is changed is the "L" parameter. One key difference is that I write out a FITS cube with 1 velocity plane, as one would do if you would like to make a "total intensity or moment 0" map of CO or HI emission.
If you run the script, you'll produce 10 FITS images with the above inclinations. If you compare the FITS images you'll notice two strange things:
1) the inclination = 0 FITS image should be rotationally symmetric about the origin, but it is not. The effect of this is also seen in the higher inclination FITS images. 2) There is a 90 degree rotation of this asymmetry between the 20 and 30 degree inclination FITS images (more specifically between 26 and 27 degrees).
I suspect the issue is possibly caused by the fact that I am writing out to a single velocity channel. I hope I have missed anything obvious that is causing this. I am running the developer version of yt 3.0.2 and have updated.
I am under time pressure and need to decide whether to use yt or reluctantly switch to a much older, less flexible package. So I would greatly appreciate a confirmation of this perceived bug and a possible workaround or fix.
Many thanks Roger