In this notebook we will connect to the VizieR catalog service to pull Milky Way datasets of Globular Clusters, Open Clusters, Planetary Nebulae, Pulsars, Magnetars, Supernovae Remnants and OB Associations. As newer catalogs are made available the code can easily be updated. Catalogs are pulled from VizieR using Astroquery.
Mark SubbaRao
msubbarao@adlerplanetarium.org
#Set up astropy and astroquery
from astropy.table import Table,Column
from astropy.coordinates import SkyCoord, Distance, CartesianRepresentation
from astropy.io.votable import from_table, writeto
from astropy import units as u
from astroquery.vizier import Vizier
v = Vizier()
v.ROW_LIMIT = -1
C:\Anaconda\lib\site-packages\IPython\kernel\__init__.py:13: ShimWarning: The `IPython.kernel` package has been deprecated. You should import from ipykernel or jupyter_client instead. "You should import from ipykernel or jupyter_client instead.", ShimWarning)
%config InlineBackend.rc = {}
import matplotlib
import matplotlib.pyplot as plt
%matplotlib inline
import seaborn
#Connect to WWT and set up Layer Group
from pywwt.mods import *
wwt = WWTClient(host="127.0.0.1") #Can pass a IP address here if WWT is running on a remote machine
wwt.new_layer_group("Sky","Galactic Datasets")
Connecting to WWT on host 127.0.0.1.
Distances of Galactic Planetary Nebulae (Stanghellini+, 2008)
VizieR Catalog: J/ApJ/689/194/table1
563 Objects
Cats = v.get_catalogs('J/ApJ/689/194/table1')
PNeCat=Cats[0]
PNeCat.rename_column('_RAJ2000', 'RA')
PNeCat.rename_column('_DEJ2000', 'dec')
del PNeCat['_RA','_DE','SimbadName']
PNeCoords=SkyCoord(PNeCat['RA'],PNeCat['dec'],unit=(u.degree, u.degree),\
distance=Distance(PNeCat['Dist'],u.pc),frame='icrs')
C:\Anaconda\lib\site-packages\astroquery\vizier\core.py:556: UserWarning: VOTABLE parsing raised exception: warnings.warn("VOTABLE parsing raised exception: {0}".format(ex))
PNeCat
RA | dec | Name | tau | rad | F5GHz | Dist |
---|---|---|---|---|---|---|
deg | deg | arcs | Jy | pc | ||
float64 | float64 | string80 | float32 | float32 | float32 | int32 |
3.25423 | 72.52197 | NGC 40 | 3.46 | 18.20 | 0.460 | 1249 |
11.76391 | -11.87192 | NGC 246 | 5.31 | 112.00 | 0.248 | 475 |
25.58312 | 51.57532 | NGC 650-1 | 5.24 | 69.20 | 0.110 | 746 |
53.31102 | -25.87165 | NGC 1360 | 5.82 | 192.00 | 0.222 | 351 |
61.74746 | 60.92067 | NGC 1501 | 4.08 | 25.90 | 0.224 | 1167 |
62.32079 | 30.77596 | NGC 1514 | 4.59 | 50.20 | 0.262 | 760 |
63.56576 | -12.73936 | NGC 1535 | 3.31 | 9.20 | 0.166 | 2305 |
85.52583 | 9.08619 | NGC 2022 | 3.62 | 9.70 | 0.091 | 2518 |
107.34384 | -0.80655 | NGC 2346 | 4.54 | 27.30 | 0.086 | 1369 |
... | ... | ... | ... | ... | ... | ... |
268.59575 | 27.99947 | Vy1-2 | 3.26 | 2.30 | 0.012 | 9002 |
283.50787 | -6.43892 | Vy1-4 | 3.20 | 2.00 | 0.010 | 10100 |
276.99835 | -26.11341 | Vy2-1 | 2.59 | 1.90 | 0.038 | 7997 |
350.74121 | 46.89939 | Vy2-3 | 3.85 | 2.30 | 0.003 | 11820 |
9.72574 | 66.39684 | We-1 | 5.38 | 9.50 | 0.001 | 5796 |
71.67792 | 44.46667 | We-2 | 3.63 | 46.00 | 2.000 | 534 |
109.35841 | -10.17713 | We-6 | 6.68 | 31.00 | 0.001 | 3233 |
25.65833 | 60.16237 | We2-5 | 6.18 | 97.00 | 0.025 | 820 |
358.07500 | 62.53639 | We2-262 | 6.80 | 65.00 | 0.003 | 1625 |
112.26121 | 13.24678 | YM 29 | 6.06 | 307.50 | 0.327 | 245 |
fig = plt.figure (figsize=(13,6))
ax = fig.add_subplot(111,projection="mollweide")
ax.grid(True)
plt.title("Planetary Nebulae",fontsize=18)
ax.scatter(PNeCoords.galactic.l.wrap_at(180.*u.degree).radian,PNeCoords.galactic.b.radian,c="green")
<matplotlib.collections.PathCollection at 0x1c125f28>
C:\Anaconda\lib\site-packages\matplotlib\collections.py:590: FutureWarning: elementwise comparison failed; returning scalar instead, but in the future will perform elementwise comparison if self._edgecolors == str('face'):
#Set up WWT layer
PNe_layer = wwt.new_layer("Galactic Datasets", "Planetary Nebulae", PNeCat.colnames)
#Set visualization parameters in WWT
props_dict = {"CoordinatesType":"Spherical",\
"MarkerScale":"Screen",\
"PointScaleType":"Constant",\
"ScaleFactor":"8",\
"ShowFarSide":"True",\
"AltColumn":"6",\
"AltType":"Distance",\
"AltUnit":"Parsecs",\
"RaUnits":"Degrees",\
"PlotType":"Circle",\
"ColorValue":"ARGBColor:255:0:255:0",\
"TimeSeries":"False"}
PNe_layer.set_properties(props_dict)
#Send data to WWT client
PNe_layer.update(data=PNeCat, purge_all=True, no_purge=False, show=True)
#Add the Cartesian coordinates as the first three columns in the data table
PNeCat.add_column(Column(PNeCoords.represent_as(CartesianRepresentation).x.to(u.pc),name='x_coord',meta={'ucd': 'pos.cartesian.x'}),0)
PNeCat.add_column(Column(PNeCoords.represent_as(CartesianRepresentation).y.to(u.pc),name='y_coord',meta={'ucd': 'pos.cartesian.y'}),1)
PNeCat.add_column(Column(PNeCoords.represent_as(CartesianRepresentation).z.to(u.pc),name='z_coord',meta={'ucd': 'pos.cartesian.z'}),2)
#Write VOtable for Digistar visualization
from astropy.io.votable import from_table, writeto
votable = from_table(PNeCat)
writeto(votable, "data/PNe.du")
PNeCat.remove_columns(['x_coord', 'y_coord', 'z_coord'])
--------------------------------------------------------------------------- KeyError Traceback (most recent call last) <ipython-input-10-e71f1f5e82e3> in <module>() ----> 1 PNeCat.remove_columns(['x_coord', 'y_coord', 'z_coord']) C:\Anaconda\lib\site-packages\astropy\table\table.pyc in remove_columns(self, names) 1260 for name in names: 1261 if name not in self.columns: -> 1262 raise KeyError("Column {0} does not exist".format(name)) 1263 1264 for name in names: KeyError: u'Column x_coord does not exist'
#Add the Cartesian, Galactic coordinates as the first three columns in the data table
PNeCat.add_column(Column(PNeCoords.galactic.represent_as(CartesianRepresentation).x.to(u.pc),name='x_gal_coord',meta={'ucd': 'pos.cartesian.x'}),0
PNeCat.add_column(Column(PNeCoords.galactic.represent_as(CartesianRepresentation).y.to(u.pc),name='y_gal_coord',meta={'ucd': 'pos.cartesian.y'}),1)
PNeCat.add_column(Column(PNeCoords.galactic.represent_as(CartesianRepresentation).z.to(u.pc),name='z_gal_coord',meta={'ucd': 'pos.cartesian.z'}),2)
#Remove name Column since we can parse labels ***TO DO*** capture this in a .label file
PNeCat.remove_column("Name")
#Write .speck file for DigitalSky and Uniview
writeFile = open('data/PNe.speck','a')
#Define and write the header
headerText="\
#Planetary Nebulae From (Stanghellini+, 2008)\n\
dataVar 0 ra\n\
dataVar 1 Dec\n\
dataVar 2 tau\n\
dataVar 3 Rad\n\
dataVar 4 F5GHz\n\
dataVar 5 Dist\n"
writeFile.write(headerText)
#Write the data
PNeCat.write(writeFile,format='ascii.no_header')
writeFile.close()
Properties of Galactic Globular Clusters((Francis+, 2014))
VizieR Catalog: VII/271/catalog
157 Objects
Cats = v.get_catalogs('VII/271/catalog')
GCCat=Cats[0]
del GCCat['RAJ2000','DEJ2000','SimbadName','Name','mu0','r_Dist','DistH','X','Y','Z','Rgc','E_B-V_','RV','r_RV','q_RV','r__Fe_H_']
GCCat.rename_column('__Fe_H_', 'Fe/H')
GCCat.rename_column('_RAJ2000', 'RA')
GCCat.rename_column('_DEJ2000', 'dec')
#Create Column with dist in pc, not kpc (for WWT)
distCol=Column(1000*GCCat['Dist'].filled(0),name='distance',meta={'ucd': 'pos.distance'}, unit='pc')
GCCat.add_column(distCol)
del GCCat['Dist']
GCCoords=SkyCoord(GCCat['RA'],GCCat['dec'],unit=(u.degree, u.degree),\
distance=Distance(GCCat['distance'],u.pc),frame='icrs')
GCCat #just first 10
RA | dec | ID | Fe/H | distance |
---|---|---|---|---|
deg | deg | [-] | pc | |
float64 | float64 | string120 | float32 | float32 |
6.0234 | -72.0813 | NGC 104 | -0.69 | 4580.00 |
13.1885 | -26.5826 | NGC 288 | -1.35 | 9360.00 |
15.8094 | -70.8488 | NGC 362 | -1.31 | 8840.00 |
30.7375 | -3.2528 | Whiting 1 | -0.70 | 29400.00 |
48.0675 | -55.2162 | NGC 1261 | -1.28 | 16540.00 |
53.3335 | 79.5811 | Pal 1 | -0.65 | 12970.00 |
58.7600 | -49.6067 | AM 1 | -1.70 | 123200.00 |
66.1863 | -21.1900 | Eridanus | -1.47 | 89760.00 |
71.5246 | 31.3815 | Pal 2 | -1.42 | 27670.00 |
... | ... | ... | ... | ... |
301.5202 | -21.9223 | NGC 6864 | -1.29 | 20050.00 |
308.5474 | 7.4045 | NGC 6934 | -1.47 | 16170.00 |
313.3654 | -12.5373 | NGC 6981 | -1.43 | 16780.00 |
315.3728 | 16.1879 | NGC 7006 | -1.65 | 40050.00 |
322.4932 | 12.1669 | NGC 7078 | -2.32 | 10430.00 |
323.3625 | -0.8235 | NGC 7089 | -1.59 | 11390.00 |
325.0923 | -23.1799 | NGC 7099 | -2.23 | 8650.00 |
326.6618 | -21.2526 | Pal 12 | -0.68 | 18690.00 |
346.6853 | 12.7720 | Pal 13 | -1.88 | 23880.00 |
347.1112 | -15.6115 | NGC 7492 | -1.72 | 26770.00 |
fig = plt.figure (figsize=(13,6))
ax = fig.add_subplot(111,projection="mollweide")
ax.grid(True)
plt.title("Globular Clusters",fontsize=18)
ax.scatter(GCCoords.galactic.l.wrap_at(180.*u.degree).radian,GCCoords.galactic.b.radian,c='red')
<matplotlib.collections.PathCollection at 0x1c43d898>
#Set up WWT layer
GC_layer = wwt.new_layer("Galactic Datasets", "Globular Clusters", GCCat.colnames)
#Set visualization parameters in WWT
props_dict = {"CoordinatesType":"Spherical",\
"MarkerScale":"Screen",\
"PointScaleType":"Constant",\
"ScaleFactor":"8",\
"ShowFarSide":"True",\
"AltColumn":"4",\
"AltType":"Distance",\
"AltUnit":"Parsecs",\
"RaUnits":"Degrees",\
"PlotType":"Circle",\
"ColorValue":"ARGBColor:255:255:255:255",\
"TimeSeries":"False"}
GC_layer.set_properties(props_dict)
#Send data to WWT client
GC_layer.update(data=GCCat, purge_all=True, no_purge=False, show=True)
Optically visible open clusters and Candidates (Dias+ 2002-2013)
VizieR Catalog: B/ocl/clusters
2174 Objects
Cats = v.get_catalogs('B/ocl/clusters')
ocCat=Cats[0]
ocCat.keep_columns(["Cluster","_RAJ2000","_DEJ2000","Dist","Diam","Age"])
ocCat.rename_column('_RAJ2000', 'RA')
ocCat.rename_column('_DEJ2000', 'dec')
#Create Column with dist in pc (not kpc for WWT)
distCol=Column(ocCat['Dist'].filled(0),name='distance',meta={'ucd': 'pos.distance'}, unit='pc')
ocCat.add_column(distCol)
del ocCat['Dist']
ocCoords=SkyCoord(ocCat['RA'],ocCat['dec'],unit=(u.degree, u.degree),\
distance=Distance(ocCat['distance'],u.pc),frame='icrs')
ocCat[:10] #just first 10
RA | dec | Cluster | Diam | Age | distance |
---|---|---|---|---|---|
deg | deg | arcm | [yr] | pc | |
88.054 | 26.992 | Majaess 68 | 22.0 | -- | 0 |
359.275 | 65.414 | FSR 0469 | 1.8 | -- | 0 |
357.029 | 36.205 | Alessi 22 | 82.0 | -- | 0 |
356.854 | 63.226 | FSR 0453 | 4.5 | -- | 0 |
356.829 | 60.468 | Majaess 227 | 13.0 | -- | 0 |
354.950 | 61.928 | Majaess 225 | 12.0 | -- | 0 |
57.904 | 51.517 | Majaess 36 | 4.0 | -- | 0 |
1.171 | 56.083 | Stock 19 | 4.0 | -- | 0 |
88.075 | 29.904 | FSR 0828 | 2.7 | -- | 0 |
1.842 | 64.973 | Majaess 1 | 5.0 | -- | 0 |
fig = plt.figure (figsize=(13,6))
ax = fig.add_subplot(111,projection="mollweide")
ax.grid(True)
plt.title("Open Clusters",fontsize=18)
ax.scatter(ocCoords.galactic.l.wrap_at(180.*u.degree).radian,ocCoords.galactic.b.radian,c='green')
<matplotlib.collections.PathCollection at 0x1f8126a0>
#Set up WWT layer
OC_layer = wwt.new_layer("Galactic Datasets", "Open Clusters", ocCat.colnames)
#Set visualization parameters in WWT
props_dict = {"CoordinatesType":"Spherical",\
"MarkerScale":"Screen",\
"PointScaleType":"Constant",\
"ScaleFactor":"8",\
"ShowFarSide":"True",\
"AltColumn":"5",\
"AltType":"Distance",\
"AltUnit":"Parsecs",\
"RaUnits":"Degrees",\
"PlotType":"Circle",\
"ColorValue":"ARGBColor:255:255:255:0",\
"TimeSeries":"False"}
OC_layer.set_properties(props_dict)
#Send data to WWT client
OC_layer.update(data=ocCat, purge_all=True, no_purge=False, show=True)
A revised Galactic supernova remnant catalogue (Green 2014)
VizieR Catalog: VII/272/snrs
294 Objects
This catalog does not provide distances, so we will only provide code to visualize in WWT.
Cats = v.get_catalogs('VII/272/snrs')
snrCat=Cats[0]
snrCat.keep_columns(["SNR","_RAJ2000","_DEJ2000","MajDiam","S_1GHz_"])
snrCat.rename_column('S_1GHz_', 'S_1GHz')
snrCat.rename_column('_RAJ2000', 'RA')
snrCat.rename_column('_DEJ2000', 'dec')
snrCoords=SkyCoord(snrCat['RA'],snrCat['dec'],unit=(u.degree, u.degree),frame='icrs')
print len(snrCat)
snrCat[:10] #Just first 10
294
RA | dec | SNR | MajDiam | S_1GHz |
---|---|---|---|---|
deg | deg | arcm | Jy | |
266.43 | -29.00 | G000.0+00.0 | 3.5 | 100.0 |
266.56 | -28.63 | G000.3+00.0 | 15.0 | 22.0 |
266.84 | -28.15 | G000.9+00.1 | 8.0 | 18.0 |
267.12 | -28.15 | G001.0-00.1 | 8.0 | 15.0 |
267.41 | -27.77 | G001.4-00.1 | 10.0 | 2.0 |
267.19 | -27.17 | G001.9+00.3 | 1.5 | 0.6 |
268.86 | -25.83 | G003.7-00.2 | 14.0 | 2.3 |
268.23 | -25.47 | G003.8+00.3 | 18.0 | 3.0 |
272.23 | -27.05 | G004.2-03.5 | 28.0 | 3.2 |
262.68 | -21.48 | G004.5+06.8 | 3.0 | 19.0 |
fig = plt.figure (figsize=(13,6))
ax = fig.add_subplot(111,projection="mollweide")
ax.grid(True)
plt.title("Supernova Remnants",fontsize=18)
ax.scatter(snrCoords.galactic.l.wrap_at(180.*u.degree).radian,snrCoords.galactic.b.radian,c='magenta')
<matplotlib.collections.PathCollection at 0x1c39a550>
#Set up WWT layer
SNR_layer = wwt.new_layer("Galactic Datasets", "Supernova Remnants", snrCat.colnames)
#Set visualization parameters in WWT
props_dict = {"CoordinatesType":"Spherical",\
"MarkerScale":"Screen",\
"PointScaleType":"Constant",\
"ScaleFactor":"8",\
"ShowFarSide":"True",\
"RaUnits":"Degrees",\
"PlotType":"Circle",\
"ColorValue":"ARGBColor:255:255:0:255",\
"TimeSeries":"False"}
SNR_layer.set_properties(props_dict)
#Send data to WWT client
SNR_layer.update(data=snrCat, purge_all=True, no_purge=False, show=True)
Catalog of Pulsars(Taylor+ 1995)
VizieR Catalog: VII/189/table1
706 Objects
Cats = v.get_catalogs('VII/189/table1')
pulsarCat=Cats[0]
pulsarCat.keep_columns(["Jname","RAJ2000","DEJ2000","dist","P","Age"])
#Create Column with dist in pc (not kpc) for WWT
distCol=Column(1000*pulsarCat['dist'].filled(0),name='distance',meta={'ucd': 'pos.distance'}, unit='pc')
pulsarCat.add_column(distCol)
del pulsarCat['dist']
pulsarCat.rename_column('RAJ2000', 'RA')
pulsarCat.rename_column('DEJ2000', 'dec')
pulsarCoords=SkyCoord(pulsarCat['RA'],pulsarCat['dec'],unit=(u.degree, u.degree),\
distance=Distance(pulsarCat['distance'],u.pc),frame='icrs')
print len(pulsarCat)
pulsarCat[:10] #just first 10
706
Jname | RA | dec | P | Age | distance |
---|---|---|---|---|---|
deg | deg | s | [yr] | pc | |
0006+1834 | 1.52000 | 18.58306 | 0.6937476704700000 | 6.719 | 700.00 |
0014+4746 | 3.57393 | 47.77585 | 1.2406989780800000 | 7.543 | 1840.00 |
0023-7204C | 5.95976 | -72.07540 | 0.0057567800116100 | -- | 4500.00 |
0024-7204D | 6.05782 | -72.07884 | 0.0053575732859000 | -- | 4500.00 |
0024-7204E | 6.02464 | -72.07304 | 0.0035363290000000 | -- | 4500.00 |
0024-7204F | 6.02464 | -72.07304 | 0.0026235790000000 | -- | 4500.00 |
0024-7204G | 6.02464 | -72.07304 | 0.0040403790000000 | -- | 4500.00 |
0024-7204H | 6.02464 | -72.07304 | 0.0032105000000000 | -- | 4500.00 |
0024-7204I | 6.02464 | -72.07304 | 0.0034849930000000 | -- | 4500.00 |
0024-7204J | 6.02464 | -72.07304 | 0.0021006334000000 | -- | 4500.00 |
fig = plt.figure (figsize=(13,6))
ax = fig.add_subplot(111,projection="mollweide")
ax.grid(True)
plt.title("Pulsars",fontsize=18)
ax.scatter(pulsarCoords.galactic.l.wrap_at(180.*u.degree).radian,pulsarCoords.galactic.b.radian,c='orange')
<matplotlib.collections.PathCollection at 0x1c347208>
#Set up WWT layer
pulsar_layer = wwt.new_layer("Galactic Datasets", "Pulsars", pulsarCat.colnames)
#Set visualization parameters in WWT
props_dict = {"CoordinatesType":"Spherical",\
"MarkerScale":"Screen",\
"PointScaleType":"Constant",\
"ScaleFactor":"8",\
"ShowFarSide":"True",\
"AltColumn":"5",\
"AltType":"Distance",\
"AltUnit":"Parsecs",\
"RaUnits":"Degrees",\
"PlotType":"Circle",\
"ColorValue":"ARGBColor:255:0:255:255",\
"TimeSeries":"False"}
pulsar_layer.set_properties(props_dict)
#Send data to WWT client
pulsar_layer.update(data=pulsarCat, purge_all=True, no_purge=False, show=True)
The McGill magnetar catalog (Olausen+, 2014)
VizieR Catalog: J/ApJS/212/6/table9
26 Objects
Cats = v.get_catalogs('J/ApJS/212/6/table9')
magCat=Cats[0]
magCat.keep_columns(["Name","_RAJ2000","_DEJ2000","Dist","B","Per"])
magCat.rename_column('_RAJ2000', 'RA')
magCat.rename_column('_DEJ2000', 'dec')
#Create Column with dist in pc, not kpc (for WWT)
distCol=Column(1000*magCat['Dist'].filled(0),name='distance',meta={'ucd': 'pos.distance'}, unit='pc')
magCat.add_column(distCol)
del magCat['Dist']
magCoords=SkyCoord(magCat['RA'],magCat['dec'],unit=(u.degree, u.degree),\
distance=Distance(magCat['distance'],u.pc),frame='icrs')
print len(magCat)
magCat[:10] #just first 10
26
RA | dec | Name | Per | B | distance |
---|---|---|---|---|---|
deg | deg | s | 1e+10 T | pc | |
15.179750 | -72.192722 | CXOU J010043.1-721134 | 8.020392000 | 3.900 | 62400.0 |
26.593362 | 61.750886 | 4U 0142+61 | 8.688328770 | 1.300 | 3600.0 |
64.641112 | 57.539697 | SGR 0418+5729 | 9.078388220 | 0.061 | 2000.0 |
75.278167 | 45.276089 | SGR 0501+4516 | 5.762096530 | 1.900 | 2000.0 |
81.503708 | -66.076750 | SGR 0526-66 | 8.054400000 | 5.600 | 53600.0 |
162.529750 | -59.889278 | 1E 1048.1-5937 | 6.457875400 | 3.900 | 9000.0 |
237.725516 | -54.306698 | 1E 1547.0-5408 | 2.072125500 | 3.200 | 4500.0 |
245.687042 | -49.847972 | PSR J1622-4950 | 4.326100000 | 2.700 | 9000.0 |
248.966017 | -47.589808 | SGR 1627-41 | 2.594578000 | 2.200 | 11000.0 |
251.792500 | -45.871361 | CXOU J164710.2-455216 | 10.610644000 | 0.660 | 3900.0 |
fig = plt.figure (figsize=(13,6))
ax = fig.add_subplot(111,projection="mollweide")
ax.grid(True)
plt.title("Magnetars",fontsize=18)
ax.scatter(magCoords.galactic.l.wrap_at(180.*u.degree).radian,magCoords.galactic.b.radian,c='yellow')
<matplotlib.collections.PathCollection at 0x21ed8208>
#Set up WWT layer
Magnetar_layer = wwt.new_layer("Galactic Datasets", "Supernova Remnants", magCat.colnames)
#Set visualization parameters in WWT
props_dict = {"CoordinatesType":"Spherical",\
"MarkerScale":"Screen",\
"PointScaleType":"Constant",\
"ScaleFactor":"8",\
"ShowFarSide":"True",\
"AltColumn":"5",\
"AltType":"Distance",\
"AltUnit":"Parsecs",\
"RaUnits":"Degrees",\
"PlotType":"Circle",\
"ColorValue":"ARGBColor:255:127:0:255",\
"TimeSeries":"False"}
SNR_layer.set_properties(props_dict)
#Send data to WWT client
SNR_layer.update(data=amgCat, purge_all=True, no_purge=False, show=True)
New list of OB associations(Melnik+, 1995)
VizieR Catalog: J/PAZh/21/13/table
88 Objects
Cats = v.get_catalogs('J/PAZh/21/13/table')
OBCat=Cats[0]
OBCat.keep_columns(["AssME","_RA.icrs","_DE.icrs","D","Ntot"])
#Create Column with dist in pc (not kpc)
distCol=Column(1000*OBCat['D'].filled(0),name='distance',meta={'ucd': 'pos.distance'}, unit='pc')
OBCat.add_column(distCol)
del OBCat['D']
OBCat.rename_column('_RA.icrs', 'RA')
OBCat.rename_column('_DE.icrs', 'dec')
OBCoords=SkyCoord(OBCat['RA'],OBCat['dec'],unit=(u.degree, u.degree),\
distance=Distance(OBCat['distance'],u.pc),frame='icrs')
print len(OBCat)
OBCat[:10] #just first 10
88
AssME | Ntot | RA | dec | distance |
---|---|---|---|---|
deg | deg | pc | ||
SGR 1 A | 18 | 271.16 | -24.29 | 1520.00 |
SGR 1 B | 5 | 272.47 | -23.69 | 1940.00 |
SGR 1 C | 12 | 270.83 | -22.70 | 1440.00 |
SGR 7 | 5 | 273.42 | -20.64 | 1280.00 |
SGR 4 | 22 | 273.93 | -18.93 | 1850.00 |
SER 1 A | 10 | 275.20 | -16.63 | 1500.00 |
SER 1 B | 19 | 274.72 | -13.84 | 2050.00 |
SCT 3 | 10 | 276.32 | -14.33 | 1480.00 |
SER 2 | 15 | 274.54 | -12.27 | 1450.00 |
VUL 1 | 15 | 295.77 | 23.32 | 2540.00 |
fig = plt.figure (figsize=(13,6))
ax = fig.add_subplot(111,projection="mollweide")
ax.grid(True)
plt.title("OB Associations",fontsize=18)
ax.scatter(OBCoords.galactic.l.wrap_at(180.*u.degree).radian,OBCoords.galactic.b.radian,c='cyan')
<matplotlib.collections.PathCollection at 0x2384c080>
#Set up WWT layer
OB_layer = wwt.new_layer("Galactic Datasets", "OB Associations", OBCat.colnames)
#Set visualization parameters in WWT
props_dict = {"CoordinatesType":"Spherical",\
"MarkerScale":"Screen",\
"PointScaleType":"Constant",\
"ScaleFactor":"8",\
"ShowFarSide":"True",\
"AltColumn":"4",\
"AltType":"Distance",\
"AltUnit":"Parsecs",\
"RaUnits":"Degrees",\
"PlotType":"Circle",\
"ColorValue":"ARGBColor:255:64:64:255",\
"TimeSeries":"False"}
OB_layer.set_properties(props_dict)
#Send data to WWT client
OB_layer.update(data=OBCat, purge_all=True, no_purge=False, show=True)