Candidate List Solution#

Ogle et al. (2016) mined the NASA/IPAC Extragalactic Database (NED) to identify a new type of galaxy: Superluminous Spiral Galaxies.

Table 1 lists the positions of these Super Spirals. Based on those positions, let’s create multiwavelength cutouts for each super spiral to see what is unique about this new class of objects.

1. Import the Python modules we’ll be using#

# Suppress unimportant warnings.
import warnings
warnings.filterwarnings("ignore", module="astropy.io.votable.*")
warnings.filterwarnings("ignore", module="pyvo.utils.xml.*")
warnings.filterwarnings('ignore', '.*RADECSYS=*', append=True)

import matplotlib.pyplot as plt
import numpy as np

# For downloading files
from astropy.utils.data import download_file

from astropy.coordinates import SkyCoord
from astropy.io import fits
from astropy.nddata import Cutout2D
import astropy.visualization as vis
from astropy.wcs import WCS
from astroquery.ipac.ned import Ned

import pyvo as vo

The next cell prepares the notebook to display our visualizations.

%matplotlib inline

2. Search NED for objects in this paper#

Insert a Code Cell below by clicking on the “Insert” Menu and choosing “Insert Cell Below”. Then consult QuickReference.md to figure out how to use astroquery to search NED for all objects in a paper, based on the refcode of the paper. Inspect the resulting astropy table.

objects_in_paper = Ned.query_refcode('2016ApJ...817..109O')
objects_in_paper.show_in_notebook()
WARNING: AstropyDeprecationWarning: show_in_notebook() is deprecated as of 6.1 and to create
         interactive tables it is recommended to use dedicated tools like:
         - https://github.com/bloomberg/ipydatagrid
         - https://docs.bokeh.org/en/latest/docs/user_guide/interaction/widgets.html#datatable
         - https://dash.plotly.com/datatable [warnings]
Table length=62
idxNo.Object NameRADECTypeVelocityRedshiftRedshift FlagMagnitude and FilterSeparationReferencesNotesPhotometry PointsPositionsRedshift PointsDiameter PointsAssociations
degreesdegreeskm / sarcmin
01WISEA J001550.14-100242.33.95892-10.04511G52766.00.17601SLS17.5g--1506389100
12WISEA J003807.80-010936.79.53254-1.16022G62442.00.208284SLS18.0g--160721211100
23WISEA J040422.92-054134.861.09553-5.693G75113.00.250549SLS18.6g--706110980
34WISEA J073806.16+282359.6114.5256828.3999G69225.00.230909SLS18.0g--1006677100
452MASX J07550424+1353261118.7677913.89069G66746.00.22264SLS18.5g--100387960
56WISEA J082655.11+181147.7126.7296318.19659G79580.00.265449SLS18.4g--80467860
672MASX J08542169+0449308133.590314.82505G47005.00.156793SLS16.7g--1805889100
78WHL J090944.8+222607137.4366922.43538GClstr88683.00.295813PUN--7004600
892MASX J09094480+2226078137.4367122.43535G85557.00.285388SLS19.0g--90305860
9102MASX J09260805+2405242141.5335524.09009G66672.00.222393SLS17.8g--1603271360
1011WHL J092608.1+240524141.5335724.09003GClstr66284.00.2211SUN--8006800
1112WISEA J093347.77+211436.7143.4490621.24354G51620.00.172186SLS16.9g--49051211961
1213WISEA J093622.14+390628.9144.0922739.10805G84821.00.282931SLS18.5g--606675100
1314MSPM 05544146.223522.8851GClstr26738.00.08919SUN--3001200
1415CGCG 122-067146.2236222.88533G26686.00.089016SLS15.3g--34049131680
1516WISEA J094700.08+254045.8146.7503625.6794G32690.00.109043SLS15.8g--2204681060
1617SDSS J095727.02+083501.7149.362598.58385G76903.00.256521SLS18.3g--80395580
1718WISEA J100356.88+382902.1150.9870338.48393G77525.00.258596SLS17.8g--80577780
1819WISEA J100416.04+295844.1151.0668629.97893G89471.00.298443SLS18.7g--706677100
1920WISEA J100956.35+261132.0152.4848226.19222G72216.00.240886SLS18.1g--130467660
2021GMBCG J152.52936+32.89139152.5293632.89139GClstr95634.00.319PUN--4002300
2122WISEA J101007.05+325329.0152.5293932.89142G86909.00.289896SLS18.7g--1006677100
22232MASS J10160396+3037481154.0165230.63005G75520.00.251906SLS18.7g--60497680
2324WISEA J102154.85+072415.5155.478557.40433G87123.00.290611SLS18.4g--60557580
2425WISEA J103015.74-010607.0157.56562-1.10196G84625.00.282277SLS18.3g--1106298100
25262MASX J10304263+0418219157.677554.306G48244.00.160924SLS16.8g--2405989100
26272MASX J10405643-0103584160.23509-1.06629G75021.00.250242SLS18.2g--17051912100
2728SDSS CE J160.241898-01.069106160.23509-1.06631GClstr75548.00.252SUN--8005800
2829WISEA J104724.97+230917.4161.8540723.15485G54729.00.182556SLS18.46--190468860
2930WISEA J111917.41+141946.5169.8225814.3296G43101.00.143771SLS16.6g--2006689100
30312MASS J11292875+0255498172.369792.93052G71830.00.239599SLS17.5g--90497780
3132WISEA J113800.86+521303.8174.5035952.21773G88717.00.295927SLS19.0g--90577680
3233WISEA J114100.04+384807.4175.250238.80206G80255.00.267701SLS18.5g--706688100
3334WISEA J115052.96+460448.1177.7206746.08004G86778.00.289461SLS18.5g--100539980
3435WISEA J115356.21+492355.4178.4842149.39875G49984.00.166728SLS17.1g--19067910100
35362MASX J11593546+1257080179.897712.95193G79003.00.263525SLS18.3g--705466100
3637WISEA J120053.92+480007.8180.2246848.00217G83466.00.278413SLS18.4g--807078100
3738GMBCG J180.22479+48.00211180.2247948.00211GClstr74948.00.25PUN--6003500
3839WISEA J121644.33+122450.5184.1847112.41404G77030.00.256944SLS18.3g--50557580
3940WISEA J122100.50+482729.1185.2520948.4581G89836.00.299659SLS18.7g--80618580
4041WISEA J123215.19+102119.1188.0633210.35531G49729.00.165877SLS17.2g--1906699100
4142WISEA J123431.08+515629.7188.6295251.94159G88714.00.295917SLS18.1g--330641216100
4243WISEA J123746.63+481227.5189.4442948.20764G81679.00.272452SLS18.2g--806587100
4344WISEA J131039.32+223502.8197.6638522.58413G69320.00.231225SLS18.1g--120488761
4445WISEA J132757.52+334529.3201.9895933.75825G74623.00.248916SLS17.7g--16088127100
4546WISEA J134228.33+115734.5205.6180611.9596G83561.00.27873SLS19.0g--806676100
4647WISEA J134355.49+244048.1205.9812224.68004G41147.00.13725SLS17.81--24046131360
4748SDSSCGB 16827206.9983332.44039GGroup----18.44--3001000
48492MASX J13475962+3227100206.9983732.45284G66870.00.223055SLS18.1g--1105466100
4950WISEA J135546.08+025456.0208.942032.91557G71602.00.238837SLS18.7g--110517780
5051WISEA J140138.37+263527.6210.4099226.59101G85128.00.283958SLS18.7g--80305640
51522MASS J14175497+2704341214.4790527.07617G47226.00.15753SLS16.9g--170256940
5253WISEA J143447.88+020228.8218.69952.04136G83828.00.279619SLS18.6g--1006210880
5354WISEA J144728.35+590831.9221.8681659.1422G73602.00.245509SLS18.3g--150701110100
5455WISEA J153619.01+452247.7234.0792345.37992G70804.00.236177SLS18.1g--90577580
5556WISEA J154307.78+193751.7235.7824519.63105G68774.00.229405SLS17.0g--44150222160
5657WISEA J154950.90+234444.0237.4621123.74557G78570.00.262082SLS18.5g--70315640
5758GMBCG J240.41924+27.30444240.4192427.30444GClstr57860.00.193PUN--4002300
58592MASX J16014061+2718161240.4192527.3044G49285.00.164398SLS16.7g--22054711101
5960WISEA J163945.96+460905.8249.941546.15163G74087.00.247128SLS18.3g--1307087100
6061WISEA J173406.17+602919.1263.5257260.48865G82730.00.275956SLS18.5g--806676100
6162SDSSCGB 59704263.5329260.48197GGroup82743.00.276SUN17.20--3001200

3. Filter the NED results#

The results from NED will include galaxies, but also other kinds of objects (e.g. galaxy clusters, galaxy groups). Print the ‘Type’ column to see the full range of classifications and filter the results so that we only keep the galaxies in the list.

objects_in_paper['Type']
<MaskedColumn name='Type' dtype='object' description="NED's Preferred Object Type: G,GPair,GTrpl,GGroup,GClstr,QSO,AbLS,RadioS,IrS,EmLS,UvES,XrayS,SN" length=62>
G
G
G
G
G
G
G
GClstr
G
G
GClstr
G
...
G
G
G
G
G
G
GClstr
G
G
G
GGroup
# Keep only the galaxies from the list
galaxies = objects_in_paper[np.array(objects_in_paper['Type']) == 'G']

galaxies.show_in_notebook()
WARNING: AstropyDeprecationWarning: show_in_notebook() is deprecated as of 6.1 and to create
         interactive tables it is recommended to use dedicated tools like:
         - https://github.com/bloomberg/ipydatagrid
         - https://docs.bokeh.org/en/latest/docs/user_guide/interaction/widgets.html#datatable
         - https://dash.plotly.com/datatable [warnings]
Table length=53
idxNo.Object NameRADECTypeVelocityRedshiftRedshift FlagMagnitude and FilterSeparationReferencesNotesPhotometry PointsPositionsRedshift PointsDiameter PointsAssociations
degreesdegreeskm / sarcmin
01WISEA J001550.14-100242.33.95892-10.04511G52766.00.17601SLS17.5g--1506389100
12WISEA J003807.80-010936.79.53254-1.16022G62442.00.208284SLS18.0g--160721211100
23WISEA J040422.92-054134.861.09553-5.693G75113.00.250549SLS18.6g--706110980
34WISEA J073806.16+282359.6114.5256828.3999G69225.00.230909SLS18.0g--1006677100
452MASX J07550424+1353261118.7677913.89069G66746.00.22264SLS18.5g--100387960
56WISEA J082655.11+181147.7126.7296318.19659G79580.00.265449SLS18.4g--80467860
672MASX J08542169+0449308133.590314.82505G47005.00.156793SLS16.7g--1805889100
792MASX J09094480+2226078137.4367122.43535G85557.00.285388SLS19.0g--90305860
8102MASX J09260805+2405242141.5335524.09009G66672.00.222393SLS17.8g--1603271360
912WISEA J093347.77+211436.7143.4490621.24354G51620.00.172186SLS16.9g--49051211961
1013WISEA J093622.14+390628.9144.0922739.10805G84821.00.282931SLS18.5g--606675100
1115CGCG 122-067146.2236222.88533G26686.00.089016SLS15.3g--34049131680
1216WISEA J094700.08+254045.8146.7503625.6794G32690.00.109043SLS15.8g--2204681060
1317SDSS J095727.02+083501.7149.362598.58385G76903.00.256521SLS18.3g--80395580
1418WISEA J100356.88+382902.1150.9870338.48393G77525.00.258596SLS17.8g--80577780
1519WISEA J100416.04+295844.1151.0668629.97893G89471.00.298443SLS18.7g--706677100
1620WISEA J100956.35+261132.0152.4848226.19222G72216.00.240886SLS18.1g--130467660
1722WISEA J101007.05+325329.0152.5293932.89142G86909.00.289896SLS18.7g--1006677100
18232MASS J10160396+3037481154.0165230.63005G75520.00.251906SLS18.7g--60497680
1924WISEA J102154.85+072415.5155.478557.40433G87123.00.290611SLS18.4g--60557580
2025WISEA J103015.74-010607.0157.56562-1.10196G84625.00.282277SLS18.3g--1106298100
21262MASX J10304263+0418219157.677554.306G48244.00.160924SLS16.8g--2405989100
22272MASX J10405643-0103584160.23509-1.06629G75021.00.250242SLS18.2g--17051912100
2329WISEA J104724.97+230917.4161.8540723.15485G54729.00.182556SLS18.46--190468860
2430WISEA J111917.41+141946.5169.8225814.3296G43101.00.143771SLS16.6g--2006689100
25312MASS J11292875+0255498172.369792.93052G71830.00.239599SLS17.5g--90497780
2632WISEA J113800.86+521303.8174.5035952.21773G88717.00.295927SLS19.0g--90577680
2733WISEA J114100.04+384807.4175.250238.80206G80255.00.267701SLS18.5g--706688100
2834WISEA J115052.96+460448.1177.7206746.08004G86778.00.289461SLS18.5g--100539980
2935WISEA J115356.21+492355.4178.4842149.39875G49984.00.166728SLS17.1g--19067910100
30362MASX J11593546+1257080179.897712.95193G79003.00.263525SLS18.3g--705466100
3137WISEA J120053.92+480007.8180.2246848.00217G83466.00.278413SLS18.4g--807078100
3239WISEA J121644.33+122450.5184.1847112.41404G77030.00.256944SLS18.3g--50557580
3340WISEA J122100.50+482729.1185.2520948.4581G89836.00.299659SLS18.7g--80618580
3441WISEA J123215.19+102119.1188.0633210.35531G49729.00.165877SLS17.2g--1906699100
3542WISEA J123431.08+515629.7188.6295251.94159G88714.00.295917SLS18.1g--330641216100
3643WISEA J123746.63+481227.5189.4442948.20764G81679.00.272452SLS18.2g--806587100
3744WISEA J131039.32+223502.8197.6638522.58413G69320.00.231225SLS18.1g--120488761
3845WISEA J132757.52+334529.3201.9895933.75825G74623.00.248916SLS17.7g--16088127100
3946WISEA J134228.33+115734.5205.6180611.9596G83561.00.27873SLS19.0g--806676100
4047WISEA J134355.49+244048.1205.9812224.68004G41147.00.13725SLS17.81--24046131360
41492MASX J13475962+3227100206.9983732.45284G66870.00.223055SLS18.1g--1105466100
4250WISEA J135546.08+025456.0208.942032.91557G71602.00.238837SLS18.7g--110517780
4351WISEA J140138.37+263527.6210.4099226.59101G85128.00.283958SLS18.7g--80305640
44522MASS J14175497+2704341214.4790527.07617G47226.00.15753SLS16.9g--170256940
4553WISEA J143447.88+020228.8218.69952.04136G83828.00.279619SLS18.6g--1006210880
4654WISEA J144728.35+590831.9221.8681659.1422G73602.00.245509SLS18.3g--150701110100
4755WISEA J153619.01+452247.7234.0792345.37992G70804.00.236177SLS18.1g--90577580
4856WISEA J154307.78+193751.7235.7824519.63105G68774.00.229405SLS17.0g--44150222160
4957WISEA J154950.90+234444.0237.4621123.74557G78570.00.262082SLS18.5g--70315640
50592MASX J16014061+2718161240.4192527.3044G49285.00.164398SLS16.7g--22054711101
5160WISEA J163945.96+460905.8249.941546.15163G74087.00.247128SLS18.3g--1307087100
5261WISEA J173406.17+602919.1263.5257260.48865G82730.00.275956SLS18.5g--806676100

4. Search the NAVO Registry for image resources#

The paper selected super spirals using WISE, SDSS, and GALEX images. Search the NAVO registry for image resources, using the ‘servicetype’ search parameter. How many image resources are currently available?

image_services = vo.regsearch(servicetype='sia')

print(f'{len(image_services)} result(s) found.')

image_services.to_table()['ivoid', 'short_name', 'res_title']
321 result(s) found.
Table length=321
ivoidshort_nameres_title
objectobjectobject
ivo://3crsnapshots/sia3CRSnap.sia3CRSnapshots Simple Image Access Service
ivo://archive.stsci.edu/borgBoRGBrightest of Reionizing Galaxies (BoRG)
ivo://archive.stsci.edu/ghostsGHOSTSGalaxy Halos, Outer disks, Substructure, Thick disks and Star clusters (GHOSTS)
ivo://archive.stsci.edu/sia/galexGALEXGalaxy Evolution Explorer (GALEX)
ivo://archive.stsci.edu/siap/hlaHLAHubble Legacy Archive
ivo://arvo/siapArVO SIAPArmenian Virtual Observatory SIAP
ivo://astron.nl/apertif_dr_bootes/q/cutoutDR BootesApertif DR Bootes - Mosaic
ivo://astron.nl/hetdex/lotss-dr1-img/cutoutLoTSS-DR1 CutoutLoTSS-DR1 Image Cutout Service
ivo://astron.nl/hetdex/lotss-dr1-img/imgsLoTSS-DR1 imagesLoTSS-DR1 Image Archive
.........
ivo://wfau.roe.ac.uk/ukidssdr2-siapUKIDSS DR2 SIAPUKIDSS DR2 SIAP Service
ivo://wfau.roe.ac.uk/ukidssdr3-siapUKIDSS DR3 SIAPUKIDSS DR3 SIAP Service
ivo://wfau.roe.ac.uk/ukidssdr4-siapUKIDSS DR4 SIAPUKIDSS DR4 SIAP Service
ivo://wfau.roe.ac.uk/ukidssdr5-siapUKIDSS DR5 SIAPUKIDSS DR5 SIAP Service
ivo://wfau.roe.ac.uk/ukidssdr6-siapUKIDSS DR6 SIAPUKIDSS DR6 SIAP Service
ivo://wfau.roe.ac.uk/ukidssdr7-siapUKIDSS DR7 SIAPUKIDSS DR7 SIAP Service
ivo://wfau.roe.ac.uk/ukidssdr8-siapUKIDSS DR8 SIAPUKIDSS DR8 SIAP Service
ivo://wfau.roe.ac.uk/ukidssdr9-siapUKIDSS DR9 SIAPUKIDSS DR9 SIAP Service
ivo://wfau.roe.ac.uk/vhsdr1-siapVHS DR1 SIAPVHS DR1 SIAP Service
ivo://wfau.roe.ac.uk/vista-siapVISTA SIAPVISTA SIAP Service

5. Search the NAVO Registry for image resources that will allow you to search for AllWISE images#

There are hundreds of image resources…too many to quickly read through. Try adding the ‘keywords’ search parameter to your registry search, and find the image resource you would need to search the AllWISE images. Remember from the Known Issues that ‘keywords’ must be a list.

allwise_image_services = vo.regsearch(servicetype='sia', keywords=['allwise'])

print(f'{len(allwise_image_services)} result(s) found.')

allwise_image_services.to_table()['ivoid', 'short_name', 'res_title']
1 result(s) found.
Table length=1
ivoidshort_nameres_title
objectobjectobject
ivo://irsa.ipac/wise/images/allwise/l3aAllWISE L3aAllWISE Atlas (L3a) Coadd Images

6. Choose the AllWISE image service that you are interested in#

allwise_image_service = allwise_image_services[0]
allwise_image_service.service
SIAService(baseurl : 'https://irsa.ipac.caltech.edu/ibe/sia/wise/allwise/p3am_cdd?', description : 'None')

7. Choose one of the galaxies in the NED list#

ra = galaxies['RA'][0]
dec = galaxies['DEC'][0]
pos = SkyCoord(ra, dec, unit = 'deg')
ra,dec
(np.float64(3.95892), np.float64(-10.04511))

8. Search for a list of AllWISE images that cover this galaxy#

How many images are returned? Which are you most interested in?

allwise_image_table = allwise_image_service.search(pos=pos, size=0)
allwise_image_table
<DALResultsTable length=4>
      sia_title        ...    coadd_id  
                       ...              
        object         ...     object   
---------------------- ... -------------
W2 Coadd 0046m107_ac51 ... 0046m107_ac51
W1 Coadd 0046m107_ac51 ... 0046m107_ac51
W3 Coadd 0046m107_ac51 ... 0046m107_ac51
W4 Coadd 0046m107_ac51 ... 0046m107_ac51

9. Use the .to_table() method to view the results as an Astropy table#

allwise_images = allwise_image_table.to_table()
allwise_images
Table length=4
sia_titlesia_urlcloud_accesssia_naxessia_fmtsia_rasia_decsia_naxissia_crpixsia_crvalsia_projsia_scalesia_cdsia_bp_idsia_bp_refsia_bp_hisia_bp_losia_bp_unitmagzpmagzpuncunc_urlcov_urlcoadd_id
degdegpixdegdeg / pixdeg / pix
objectobjectobjectint32objectfloat64float64int32[2]float64[2]float64[2]objectfloat64[2]float64[4]objectfloat64float64float64objectfloat64float64objectobjectobject
W2 Coadd 0046m107_ac51https://irsa.ipac.caltech.edu/ibe/data/wise/allwise/p3am_cdd/00/0046/0046m107_ac51/0046m107_ac51-w2-int-3.fits{"aws": {"bucket_name": "nasa-irsa-wise", "key":"wise/allwise/images/p3am_cdd/00/0046/0046m107_ac51/0046m107_ac51-w2-int-3.fits", "region": "us-west-2"}}2image/fits4.61538-10.6011114095 .. 40952048.0 .. 2048.04.61538 .. -10.601111SIN-0.0003819444391411 .. 0.0003819444391411-0.0003819444391411 .. 0.0003819444391411W24.6e-065.19e-064.02e-06m19.50.007https://irsa.ipac.caltech.edu/ibe/data/wise/allwise/p3am_cdd/00/0046/0046m107_ac51/0046m107_ac51-w2-unc-3.fits.gzhttps://irsa.ipac.caltech.edu/ibe/data/wise/allwise/p3am_cdd/00/0046/0046m107_ac51/0046m107_ac51-w2-cov-3.fits.gz0046m107_ac51
W1 Coadd 0046m107_ac51https://irsa.ipac.caltech.edu/ibe/data/wise/allwise/p3am_cdd/00/0046/0046m107_ac51/0046m107_ac51-w1-int-3.fits{"aws": {"bucket_name": "nasa-irsa-wise", "key":"wise/allwise/images/p3am_cdd/00/0046/0046m107_ac51/0046m107_ac51-w1-int-3.fits", "region": "us-west-2"}}2image/fits4.61538-10.6011114095 .. 40952048.0 .. 2048.04.61538 .. -10.601111SIN-0.0003819444391411 .. 0.0003819444391411-0.0003819444391411 .. 0.0003819444391411W13.35e-063.78e-063.13e-06m20.50.006https://irsa.ipac.caltech.edu/ibe/data/wise/allwise/p3am_cdd/00/0046/0046m107_ac51/0046m107_ac51-w1-unc-3.fits.gzhttps://irsa.ipac.caltech.edu/ibe/data/wise/allwise/p3am_cdd/00/0046/0046m107_ac51/0046m107_ac51-w1-cov-3.fits.gz0046m107_ac51
W3 Coadd 0046m107_ac51https://irsa.ipac.caltech.edu/ibe/data/wise/allwise/p3am_cdd/00/0046/0046m107_ac51/0046m107_ac51-w3-int-3.fits{"aws": {"bucket_name": "nasa-irsa-wise", "key":"wise/allwise/images/p3am_cdd/00/0046/0046m107_ac51/0046m107_ac51-w3-int-3.fits", "region": "us-west-2"}}2image/fits4.61538-10.6011114095 .. 40952048.0 .. 2048.04.61538 .. -10.601111SIN-0.0003819444391411 .. 0.0003819444391411-0.0003819444391411 .. 0.0003819444391411W31.156e-051.627e-057.6e-06m18.00.012https://irsa.ipac.caltech.edu/ibe/data/wise/allwise/p3am_cdd/00/0046/0046m107_ac51/0046m107_ac51-w3-unc-3.fits.gzhttps://irsa.ipac.caltech.edu/ibe/data/wise/allwise/p3am_cdd/00/0046/0046m107_ac51/0046m107_ac51-w3-cov-3.fits.gz0046m107_ac51
W4 Coadd 0046m107_ac51https://irsa.ipac.caltech.edu/ibe/data/wise/allwise/p3am_cdd/00/0046/0046m107_ac51/0046m107_ac51-w4-int-3.fits{"aws": {"bucket_name": "nasa-irsa-wise", "key":"wise/allwise/images/p3am_cdd/00/0046/0046m107_ac51/0046m107_ac51-w4-int-3.fits", "region": "us-west-2"}}2image/fits4.61538-10.6011114095 .. 40952048.0 .. 2048.04.61538 .. -10.601111SIN-0.0003819444391411 .. 0.0003819444391411-0.0003819444391411 .. 0.0003819444391411W42.209e-052.336e-051.984e-05m13.00.012https://irsa.ipac.caltech.edu/ibe/data/wise/allwise/p3am_cdd/00/0046/0046m107_ac51/0046m107_ac51-w4-unc-3.fits.gzhttps://irsa.ipac.caltech.edu/ibe/data/wise/allwise/p3am_cdd/00/0046/0046m107_ac51/0046m107_ac51-w4-cov-3.fits.gz0046m107_ac51

10. From the result in 8., select the first record for an image taken in WISE band W1 (3.6 micron)#

Hints:

  • Loop over records and test on the .bandpass_id attribute of each record

  • Print the .title and .bandpass_id of the record you find, to verify it is the right one.

for allwise_image_record in allwise_image_table:
    if 'W1' in allwise_image_record.bandpass_id:
        break
print(allwise_image_record.title, allwise_image_record.bandpass_id)
W1 Coadd 0046m107_ac51 W1

11. Visualize this AllWISE image#

## If you only run this once, you can do it in memory in one line:
##  This fetches the FITS as an astropy.io.fits object in memory
#allwise_w1_image = allwise_image_record.getdataobj()
## But if you might run this notebook repeatedly with limited bandwidth,
##  download it once and cache it.
file_name = download_file(allwise_image_record.getdataurl(), cache=True)
allwise_w1_image = fits.open(file_name)
fig = plt.figure()

wcs = WCS(allwise_w1_image[0].header)
ax = fig.add_subplot(1, 1, 1, projection=wcs)
ax.imshow(allwise_w1_image[0].data, cmap='gray_r', origin='lower', vmax = 10)
ax.scatter(ra, dec, transform=ax.get_transform('fk5'), s=500, edgecolor='red', facecolor='none')
<matplotlib.collections.PathCollection at 0x7fe52d2edf00>
../../_images/75895e9e22fc9721d9e3a0e372887b0e91525bfaf927d776137284456fad8085.png

12. Plot a cutout of the AllWISE image, centered on your position#

Try a 60 arcsecond cutout.

size = 60
cutout = Cutout2D(allwise_w1_image[0].data, pos, (size, size), wcs=wcs)
wcs = cutout.wcs

fig = plt.figure()

ax = fig.add_subplot(1, 1, 1, projection=wcs)
ax.imshow(cutout.data, cmap='gray_r', origin='lower', vmax = 10)
ax.scatter(ra, dec, transform=ax.get_transform('fk5'), s=500, edgecolor='red', facecolor='none')
<matplotlib.collections.PathCollection at 0x7fe525039c60>
../../_images/a09e7fb1b261028f2b2f6833266ed0e8388d469226c565a79bf8d40bf6149f3c.png

13. Try visualizing a cutout of a GALEX image that covers your position#

Repeat steps 4, 5, 6, 8 through 12 for GALEX.

galex_image_services = vo.regsearch(keywords=['galex'], servicetype='sia')
print(f'{len(galex_image_services)} result(s) found.')
galex_image_services.to_table()['ivoid', 'short_name', 'res_title']
3 result(s) found.
Table length=3
ivoidshort_nameres_title
objectobjectobject
ivo://archive.stsci.edu/sia/galexGALEXGalaxy Evolution Explorer (GALEX)
ivo://mast.stsci/siap/galex_atlasGALEX_AtlasGALEX Atlas of Nearby Galaxies
ivo://nasa.heasarc/skyview/galexGALEXGalaxy Explorer All Sky Survey: Near UV
galex_image_service = galex_image_services[0]
galex_image_table = galex_image_service.search(pos=pos, size=0.0, intersect='covers')
for i in range(len(galex_image_table)):
    if (('image/fits' in galex_image_table[i].format) and
        (galex_image_table['energy_bounds_center'][i]==2.35e-07) and
        (galex_image_table[i]['productType'] == 'SCIENCE')):
        break
galex_image_record = galex_image_table[i]
print(galex_image_record.title, galex_image_record.bandpass_id)
AIS_270_0005_sg14-nd-int.fits.gz NUV
## See above regarding two ways to do this:
#galex_nuv_image = fits.open(galex_image_record.getdataurl())
file_name = download_file(galex_image_record.getdataurl(), cache=True)
galex_nuv_image=fits.open(file_name)
image_data = galex_nuv_image[0].data
print('Min:', np.min(image_data))
print('Max:', np.max(image_data))
print('Mean:', np.mean(image_data))
print('Stdev:', np.std(image_data))
Min: 0.0
Max: 8.563285
Mean: 0.0014577592
Stdev: 0.013107345
fig = plt.figure()
ax = fig.add_subplot(1, 1, 1, projection=WCS(galex_nuv_image[0].header))
ax.imshow(galex_nuv_image[0].data, cmap='gray_r', origin='lower', vmin=0.0, vmax=0.01)
ax.scatter(ra, dec, transform=ax.get_transform('fk5'), s=500, edgecolor='red', facecolor='none')
<matplotlib.collections.PathCollection at 0x7fe51de17ac0>
../../_images/c3befaf1105b89d50e9571e86312c0da5abebf5db128de325f9f3fb307f0979c.png
cutout = Cutout2D(galex_nuv_image[0].data, pos, size, wcs=WCS(galex_nuv_image[0].header))

fig = plt.figure()

ax = fig.add_subplot(1, 1, 1, projection=cutout.wcs)
ax.imshow(cutout.data, cmap='gray_r', origin='lower', vmin = 0.0, vmax = 0.01)
ax.scatter(ra, dec, transform=ax.get_transform('fk5'), s=500, edgecolor='red', facecolor='none')
<matplotlib.collections.PathCollection at 0x7fe51deb7c40>
../../_images/b3c3d410b91f513752a7e1545e282a864d37cea2522b87d21a49c7579174d2c2.png

14. Try visualizing a cutout of an SDSS image that covers your position#

Hints:

  • Search the registry using `keywords=[‘sloan’]

  • Find the service with a short_name of 'SDSS SIAP'

  • After obtaining your search results, select r-band images using the .title attribute of the records that are returned, since .bandpass_id is not populated.

sdss_image_services = vo.regsearch(keywords=['sloan'], servicetype='sia')
sdss_image_services.to_table()['ivoid', 'short_name', 'res_title', 'source_value']
Table length=21
ivoidshort_nameres_titlesource_value
objectobjectobjectobject
ivo://mast.stsci/siap/al218VLA.AL218VLA-A Array AL218 Texas Survey Source Snapshots (AL218)
ivo://mast.stsci/siap/vla-firstVLA-FIRSTVLA Faint Images of the Radio Sky at Twenty Centimeters (FIRST)
ivo://nasa.heasarc/skyview/sdssSDSSSloan Digital Sky Survey g-band
ivo://nasa.heasarc/skyview/sdssdr7SDSSDR7Sloan Digital Sky Survey g-band DR7
ivo://nasa.heasarc/skyview/stripe82vlaStripe82VLAVLA Survey of SDSS Stripe 82
ivo://org.gavo.dc/bgds/q/siabgds siaBochum Galactic Disk Survey (BGDS) images2015AN....336..590H
ivo://sdss.jhu/services/siap-imagesSDSS SIAPSloan Digital Sky Survey Images (Latest Release)
ivo://sdss.jhu/services/siapdr1-imagesSDSSDR1Sloan Digital Sky Survey DR1 - Images
ivo://sdss.jhu/services/siapdr2-imagesSDSSDR2Sloan Digital Sky Survey DR2 - Images
ivo://sdss.jhu/services/siapdr3-colorSDSSDR3-ColorSloan Digital Sky Survey DR3
ivo://sdss.jhu/services/siapdr3-gSDSSDR3-GSloan Digital Sky Survey DR3 - Filter g
ivo://sdss.jhu/services/siapdr3-iSDSSDR3-ISloan Digital Sky Survey DR3 - Filter i
ivo://sdss.jhu/services/siapdr3-rSDSSDR3-RSloan Digital Sky Survey DR3 - Filter r
ivo://sdss.jhu/services/siapdr3-uSDSSDR3-USloan Digital Sky Survey DR3 - Filter u
ivo://sdss.jhu/services/siapdr3-zSDSSDR3-ZSloan Digital Sky Survey DR3 - Filter z
ivo://sdss.jhu/services/siapdr4-colorSDSSDR4-ColorSloan Digital Sky Survey DR4
ivo://sdss.jhu/services/siapdr4-imagesSDSSDR4Sloan Digital Sky Survey DR4 - Images
ivo://sdss.jhu/services/siapdr5-imagesSDSSDR5Sloan Digital Sky Survey DR5 - Images
ivo://sdss.jhu/services/siapdr7-imagesSDSSDR7Sloan Digital Sky Survey DR7 - Images
ivo://sdss.jhu/services/siapdr8-imagesSDSSDR8Sloan Digital Sky Survey DR8 - Images
ivo://sdss.jhu/services/siapdr9-imagesSDSSDR9Sloan Digital Sky Survey DR9 - Images
#  Use list comprehension to check each service's short_name attribute.
#   Given the above, we know the first match is the right one.
sdss_image_service = [s for s in sdss_image_services if 'SDSS SIAP' in s.short_name ][0]
sdss_image_service.short_name
'SDSS SIAP'
sdss_image_table = sdss_image_service.search(pos=pos, size=0.0)
len(sdss_image_table['Title'])
60
for sdss_rband_record in sdss_image_table:
    if 'Sloan Digital Sky Survey - Filter r' in sdss_rband_record.title:
        break
print(sdss_rband_record.title, sdss_rband_record.bandpass_id)
Sloan Digital Sky Survey - Filter r None
##  See above regarding two ways to do this
# sdss_rband_image = fits.open(sdss_rband_record.getdataurl())
file_name = download_file(sdss_rband_record.getdataurl(), cache=True)
sdss_rband_image=fits.open(file_name)
fig = plt.figure()

ax = fig.add_subplot(1, 1, 1, projection=WCS(sdss_rband_image[0].header))

interval = vis.PercentileInterval(99.9)
vmin,vmax = interval.get_limits(sdss_rband_image[0].data)
norm = vis.ImageNormalize(vmin=vmin, vmax=vmax, stretch=vis.LogStretch(1000))
ax.imshow(sdss_rband_image[0].data, cmap = 'gray_r', norm = norm, origin = 'lower')
ax.scatter(ra, dec, transform=ax.get_transform('fk5'), s=500, edgecolor='red', facecolor='none')
WARNING: FITSFixedWarning: 'datfix' made the change 'Set MJD-OBS to 54007.000000 from DATE-OBS'. [astropy.wcs.wcs]
<matplotlib.collections.PathCollection at 0x7fe516d73070>
../../_images/dd5c7e06a9a1eb775ecb05a7ffa7c158b8da12f1bd294e5a752cd9aba70aafba.png
cutout = Cutout2D(sdss_rband_image[0].data, pos, size, wcs=WCS(sdss_rband_image[0].header))
fig = plt.figure()
ax = fig.add_subplot(1, 1, 1, projection=cutout.wcs)
vmin,vmax = interval.get_limits(sdss_rband_image[0].data)
norm = vis.ImageNormalize(vmin=vmin, vmax=vmax, stretch=vis.LogStretch(1000))
ax.imshow(cutout.data, cmap = 'gray_r', norm = norm, origin = 'lower')
ax.scatter(ra, dec, transform=ax.get_transform('fk5'), s=500, edgecolor='red', facecolor='none')
WARNING: FITSFixedWarning: 'datfix' made the change 'Set MJD-OBS to 54007.000000 from DATE-OBS'. [astropy.wcs.wcs]
<matplotlib.collections.PathCollection at 0x7fe516ba7310>
../../_images/1c92b1d0712d2c3ecfa05649b24a017140edde3b9174535a25be33a5f6d2db86.png

15. Try looping over all positions and plotting multiwavelength cutouts#

Warning: this cell takes a long time to run! We limit it to the first three galaxies only.

# Pick the first 3 galaxies.
galaxy_subset = galaxies[0:3]

# For each galaxy,
for galaxy in galaxy_subset:

    # Establish the position.
    ra = galaxy['RA']
    dec = galaxy['DEC']
    pos = SkyCoord(ra, dec, unit = 'deg')

    # Set up the plot for this position.
    fig = plt.figure(figsize=(20,6))
    plt.suptitle('POSITION = ' + str(ra) + ', ' + str(dec), fontsize=16)

    # GALEX

    # Find the GALEX images that overlap the position.
    galex_image_table = galex_image_service.search(pos=pos, size=0.25)

    # Find the GALEX All-Sky Image Survey (AIS) Near-UV FITS coadd.
    galex_image_record = None
    for record in galex_image_table:
        if (('image/fits' in record.format) and
            (record['energy_bounds_center'] == 2.35e-07) and
            (record['productType'] == 'SCIENCE')):
            galex_image_record = record
            break

    if galex_image_record is not None:
        # Create a cutout.
        file_name = download_file(galex_image_record.getdataurl(), cache=True)
        gimage = fits.open(file_name)
        galex_cutout = Cutout2D(gimage[0].data, pos, size, wcs=WCS(gimage[0].header))

        # Plot the cutout in the first position of a 1x3 (rowsxcols) grid.
        ax = fig.add_subplot(1, 3, 1, projection=galex_cutout.wcs)
        ax.set_title(galex_image_record.title)
        ax.imshow(galex_cutout.data, cmap='gray_r', origin='lower', vmin = 0.0, vmax = 0.01)
        ax.scatter(ra, dec, transform=ax.get_transform('fk5'), s=500, edgecolor='red', facecolor='none')
    else:
        # We didn't find a suitable image, so leave that subplot blank.
        ax = fig.add_subplot(1, 3, 1, projection=galex_cutout.wcs)
        ax.set_title('GALEX image not found')

    # SDSS

    # Find the SDSS images that overlap the position.
    sdss_image_table = sdss_image_service.search(pos=pos, size=0)

    # Find the first SDSS r-band image.
    sdss_rband_record = None
    for record in sdss_image_table:
        if 'Sloan Digital Sky Survey - Filter r' in record.title:
            sdss_rband_record = record
            break

    if sdss_rband_record is not None:
        # Create a cutout.
        file_name = download_file(sdss_rband_record.getdataurl(), cache=True)
        sdss_rband_image=fits.open(file_name)

        sdss_cutout = Cutout2D(sdss_rband_image[0].data, pos, size,
                               wcs=WCS(sdss_rband_image[0].header))

        # Plot the cutout in the second position of a 1x3 grid.
        vmin,vmax = interval.get_limits(sdss_cutout.data)
        norm = vis.ImageNormalize(vmin=vmin, vmax=vmax, stretch=vis.LogStretch(1000))
        ax = fig.add_subplot(1, 3, 2, projection=sdss_cutout.wcs)
        ax.imshow(sdss_cutout.data, cmap = 'gray_r', norm = norm, origin = 'lower')
        ax.scatter(ra, dec, transform=ax.get_transform('fk5'), s=500, edgecolor='red', facecolor='none')
        ax.set_title(sdss_rband_record.title)
    else:
        # We didn't find a suitable image, so leave that subplot blank.
        ax = fig.add_subplot(1, 3, 2, projection=galex_cutout.wcs)
        ax.set_title('SDSS rband image not found')

    # AllWISE

    # Find the AllWISE images that overlap the position.
    allwise_image_table = allwise_image_service.search(pos=pos, size=0)

    # Find the first AllWISE W1 channel image.
    allwise_image_record = None
    for record in allwise_image_table:
        if 'W1' in record.bandpass_id:
            allwise_image_record = record
            break

    if allwise_image_record is not None:
        # Create a cutout.
        file_name = download_file(allwise_image_record.getdataurl(), cache=True)
        allwise_w1_image=fits.open(file_name)

        allwise_cutout = Cutout2D(allwise_w1_image[0].data, pos, (size, size),
                                  wcs=WCS(allwise_w1_image[0].header))

        # Plot the cutout in the third position of a 1x3 grid.
        ax = fig.add_subplot(1, 3, 3, projection=allwise_cutout.wcs)
        ax.imshow(allwise_cutout.data, cmap='gray_r', origin='lower', vmax = 10)
        ax.scatter(ra, dec, transform=ax.get_transform('fk5'), s=500, edgecolor='red', facecolor='none')
        ax.set_title(allwise_image_record.title)
    else:
        # We didn't find a suitable image, so leave that subplot blank.
        ax = fig.add_subplot(1, 3, 3, projection=galex_cutout.wcs)
        ax.set_title('AllWISE W1 image not found')
WARNING: FITSFixedWarning: 'datfix' made the change 'Set MJD-OBS to 54007.000000 from DATE-OBS'. [astropy.wcs.wcs]
WARNING: FITSFixedWarning: 'datfix' made the change 'Set MJD-OBS to 54424.000000 from DATE-OBS'. [astropy.wcs.wcs]
WARNING: FITSFixedWarning: 'datfix' made the change 'Set MJD-OBS to 51465.000000 from DATE-OBS'. [astropy.wcs.wcs]
../../_images/bd707c9e3fa07a8a86adb6fc4c3feae1cf9ae96ff6a2c55dde83e6c8e19869fc.png ../../_images/073761ebe24db97dec0cc4dd573883c2a9532a5ee9fe56650dc1bbe4f71865fe.png ../../_images/741e66f02d79f700aad20767445f32b6b4a431e823ba5aee3a4ba73efe32dbea.png