astroquery
As a starting point, use astroquery to find out the data and celestial bodies you want. For how to use it, refer to Searching the space astronomical catalog using python's astroquery and simple plotting method using galaxies.
Skyview cannot determine NGC only by "N", but depending on the catalog, NGC is often omitted and only N is used. In the following, N is changed to NGC and I is changed to IC to generate a list of names.
skyview
astroquery's skyview provides the images at https://astroquery.readthedocs.io/en/latest/skyview/skyview.html. Here, an example shows an example in which an X-ray image of Rosat's HRI and a visible image of DSS are downloaded and saved in fits.
Here, An X-ray catalog and atlas of galaxies. (Fabbiano +,) at http://vizier.u-strasbg.fr/viz-bin/VizieR-3?-source=J/ApJS/80/531/gxfluxes 1992) is shown as a reference example.
python
#!/usr/bin/env python
from astroquery.vizier import Vizier
v = Vizier(catalog="J/ApJS/80/531/gxfluxes",columns=['Name',"logLx","Bmag","dist","type"],row_limit=-1)
data = v.query_constraints()
sname = data[0]["Name"]
namelist = []
olist=["HRI","DSS"]
def save(p,name,obs):
for onep,oneo in zip(p,obs):
onep.writeto(name+"_"+oneo+".fits",overwrite=True)
for one in sname:
name=one.strip().split()[0]
name=name.replace("N","NGC").replace("I","IC")
namelist.append(name)
from astroquery.skyview import SkyView
for i,name in enumerate(namelist):
print(i,name)
try:
paths = SkyView.get_images(position=name, survey=olist)
save(paths,name,olist)
except:
print("..... ERROR ",i,name)
How to plot the fits image downloaded in this way How to plot multiple fits images side by side using python. Astronomical tools such as ds9 may be used, but batch processing is often troublesome with ds9.
The database is https://vizier.u-strasbg.fr/viz-bin/VizieR?-Source=VII/272 A catalog of Galactic supernova remnants (Green, 2014) A catalog of Galactic supernova remnants (Green, 2014) Seems to be the latest, so I will use this.
It's basically the same as above, but the name given to the SkyView positon must be a name recognized by SIMBAD or NED, so for example, G016.2-02.7 is not enough, and SNR is added before it. I have to.
Other than that, in the case of X-rays and visible light of distant galaxies, the apparent diameters are almost the same, but since the supernova remnants are celestial bodies in the system, the apparent diameters vary widely, so the optimum image is automatically acquired as below. Not really (will be revised somewhere).
python
#!/usr/bin/env python
from astroquery.vizier import Vizier
v = Vizier(catalog="VII/272/snrs",columns=["SNR","type","S","Names"],row_limit=-1)
#https://vizier.u-strasbg.fr/viz-bin/VizieR?-source=VII/272
#A catalogue of Galactic supernova remnants (Green, 2014) A catalogue of Galactic supernova remnants (Green, 2014)
data = v.query_constraints()
sname = data[0]["SNR"]
namelist = []
olist=["HRI","DSS","Fermi 5"]
def save(p,name,obs):
for onep,oneo in zip(p,obs):
onep.writeto(name+"_"+oneo+".fits",overwrite=True)
for one in sname:
name=one.strip().split()[0]
namelist.append(name)
from astroquery.skyview import SkyView
for i,name in enumerate(namelist):
print(i,name)
try:
paths = SkyView.get_images(position="SNR " + name, survey=olist)
Recommended Posts