[AstroPy] Using Astropy to plot skymaps...possible error in tutorial?

William Bridgman wtbsvs at gmail.com
Tue Dec 10 08:31:26 EST 2019


It appears most of this stuff is done as Jupyter notebooks - which is
really inconsistent with my workflows which require more command-line
style tools.
It will take some time for me to convert this stuff to a notebook,
especially if it needs to be totally self-contained/standalone.
Thanks for the pointers.
Tom

On Mon, Dec 9, 2019 at 12:26 PM Kelle Cruz <kellecruz at gmail.com> wrote:
>
> Hi Tom,
>
> Cool, glad to hear that tutorial is useful! And this tweak to the tutorial would be very welcome! As far as I know, I don't think there is a convention and I think pointing out that folks may want to think deliberately about which way to do it is useful.
>
> Please consider posting an issue here in the tutorials repo:
> https://github.com/astropy/astropy-tutorials/issues
>
> If you wanted to make the tweak yourself, that would also be amazing. You could fork the repo and modify the notebook or download it and edit it in Google Colab and then share it with us. Both methods are described in the Contributor instructions: https://github.com/astropy/astropy-tutorials/blob/master/CONTRIBUTING.rst#procedure-for-contributing
>
> And notebook is here:
> https://github.com/astropy/astropy-tutorials/tree/master/tutorials/notebooks/plot-catalog
>
> Thanks!
> Kelle
>
> --
> Kelle Cruz, PhD
> 917.837.9748 — Hunter: x16486 — AMNH: x7930
> Pronouns: she/her and they/them
>
>
>
> On Mon, Dec 9, 2019 at 12:15 PM William Bridgman <wtbsvs at gmail.com> wrote:
>>
>> I occasionally need to generate reference charts and plots for some of
>> my work producing content for general audiences and I was trying to
>> use the charting tutorial at the bottom of
>> http://learn.astropy.org/rst-tutorials/plot-catalog.html
>>
>> However, if I plot the Yale Bright star catalog using this algorithm,
>> I get unrecognizable constellations.
>>
>> ra,dec,magnitude = YaleStars.ExtractBasic()
>> coords_icrs = coord.SkyCoord(ra,dec,frame='icrs')
>> fig = plt.figure(figsize=(8,4.5))
>> axes = fig.add_subplot(111,projection='mollweide')
>> axes.scatter(ra.radian, dec.radian,s=(vMagThreshold - magnitude+1)**2)
>> axes.set_xticklabels(['14h','16h','18h','20h', '22h', '0h',
>> '2h','4h','6h','8h','10h'])
>> axes.grid(True)
>> plt.show()
>>
>> Checking against my reference charts clearly shows the constellations
>> reversed (see ICRSflipped.pdf).
>>
>> A change to the above fixed this issue (ICRS.pdf):
>>
>> axes.scatter(-ra.radian, dec.radian,s=(vMagThreshold - magnitude+1)**2)
>> axes.set_xticklabels(['10h','8h','6h','4h', '2h', '0h',
>> '22h','20h','18h','16h','14h'])
>>
>> Is there a legitimate convention for plotting skymaps reversed,
>> perhaps to match instrument view?
>>
>> What's the procedure for revising tutorials?
>>
>> Thanks,
>> Tom
>> --
>> Dr. William T."Tom" Bridgman
>> Scientific Visualization Studio
>> NASA/Goddard Space Flight Center
>> Greenbelt, MD  20771
>> http://svs.gsfc.nasa.gov
>> _______________________________________________
>> AstroPy mailing list
>> AstroPy at python.org
>> https://mail.python.org/mailman/listinfo/astropy
>
> _______________________________________________
> AstroPy mailing list
> AstroPy at python.org
> https://mail.python.org/mailman/listinfo/astropy



-- 
Dr. William T."Tom" Bridgman
Scientific Visualization Studio
NASA/Goddard Space Flight Center
Greenbelt, MD  20771
http://svs.gsfc.nasa.gov


More information about the AstroPy mailing list