Using pyND.plotting.skyplot


In [37]:
from astropy.table import Table

Read sample data table


In [38]:
a = Table.read('sky_coordinate_list.csv')
a[0:2]


Out[38]:
Table length=2
longitudelatitudeRA[deg]RA[hrs]Dec[deg]Number
float64float64float64float64float64int64
97.96751289758868-60.178432370167530.10278750.0068525000000000020.04466752
97.99007100373754-60.178151193099390.11307920.0075386133333333350.04914062

Import skyplot


In [39]:
from pyND.plotting import skyplot

skyplot(longitude, latitude, origin=0, zscale=None,zminmax=None, zlabel='Use zlabel=...',zcmap='viridis', pointcolor='seagreen', system='Galactic',projection='aitoff', title=None)

    - longitude
    - latitude
    - origin = 0: The center of the plot in the longitude coordinate. For system='RADec', assumed in hours.

    - pointcolor = 'seagreen': Color to use if not using zscale.

    - zscale = None:  variable for scaling point colors
    - zminmax = None: Optional min/max list for color scaling
    - zlabel= ...:    Set the title for the colorbar
    - zcmap='viridis': Set the color map to use with the scaling.

    - system = 'Galactic': Optionally use 'RADec' for longitude = RA in decimal degrees, latitude = Declination in deg

    - projection = 'aitoff': Projection type: 'mollweide', 'aitoff', 'hammer', 'lambert'

    - title = None: Plot title.

Plot objects on a Galactic coordinate system

Without color scaling


In [63]:
skyplot(a['longitude'],a['latitude'],origin=120., pointcolor='firebrick',
                title='Galactic Coordinate Plot')


With color scaling

  • The color of the points can be scaled to the zscale variable.
  • Control the range of values mapped using, e.g., zminmax=[0,50].
  • Set the label on the color bar using zlabel.

In [64]:
skyplot(a['longitude'],a['latitude'],origin=120.,
        title='Galactic Coordinate Plot',
        zscale=a['Number'],zminmax=[0,50],zlabel='Number of Objects')


Plot objects using equatorial coordinates

  • The coordinates are both assumed to be in decimal degrees.
  • The origin is assumed to be in hours.

In [65]:
skyplot(a['RA[deg]'],a['Dec[deg]'],origin=11,system='RADec')



In [ ]: