Multi-instrument, multi-wavelength study of high energy sources with the Virtual Observatory#

François Bonnarel¹, Caroline Bot¹, Françoise Genova¹, René Goosmann¹, Manon Marchand¹, Ada Nebot¹.

  1. Université de Strasbourg, CNRS, Observatoire Astronomique de Strasbourg, UMR 7550, F-67000, Strasbourg, France

This Notebook is based on the Euro-VO “Multi-instrument, multi-wavelength study of high energy sources with the Virtual Observatory” tutorial http://www.euro-vo.org/sites/default/files/documents/tutorial-highenergy_2016Nov.pdf.

Developed by Caroline Bot, François Bonnarel, René Goosmann and Françoise Genova. Adapted to a Jupyter Notebook by Ada Nebot.

CDS


Introduction#

This tutorial demonstrates how to use several standard tools of the Virtual Observatory (VO) for data mining and multiple waveband data analysis. The step-by-step application below focuses on applications in the gamma-ray and high energy domain, but also involves observational data from other wavebands. The user may explore how to:

  1. query astronomical catalogues in the gamma-ray and high energy spectral band using VO tools

  2. cross-correlate catalogues to find an object at different photon energy bands

  3. apply selection criteria when extracting sources from a catalogue

  4. use the observational measures of the selected objects to explore possible correlations

  5. visualize astronomical images from the radio up to the high energy domain

  6. display spectral energy distributions obtained from different photometric data sets

Schematic view of the scientific rationale of the tutorial:

schema

# Standard Library
import pickle
from pathlib import Path

# Astronomy tools
from astropy import units as u
from astropy.coordinates import SkyCoord
from astropy.table import Table, hstack, join, unique, vstack

# Access astronomical databases
from astroquery.simbad import Simbad
from astroquery.vizier import Vizier

# Sky visualization
from ipyaladin import Aladin

# For plots
import plotly.express as px

Step #1 - Obtaining all HESS sources from SIMBAD#

Simbad

How to obtain a catalogue of all published HESS sources from the astronomical database SIMBAD.

The High Energy Stereoscopic System (HESS) is a Cherenkov telescope array detecting cosmic gamma-rays in the GeV—TeV range. Sources detected by HESS include supernova remnants (SNR), wind nebulae pulsars, active galactic nuclei (AGN) and others. The number of detected sources steadily grows and makes it possible to study certain sub-samples of the HESS catalogue. In the following, the HESS sources should be investigated with respect to their gamma-ray properties obtained from the second Fermi-LAT catalogue.

# Check which are the default fields
simbad = Simbad()
simbad.get_votable_fields()
['basic.main_id',
 'basic.ra',
 'basic.dec',
 'basic.coo_err_maj',
 'basic.coo_err_min',
 'basic.coo_err_angle',
 'basic.coo_wavelength',
 'basic.coo_bibcode']
# Check the available fields in a Simbad astroquery
simbad.list_votable_fields()
Table length=116
namedescriptiontype
objectobjectobject
mesDiameterCollection of stellar diameters.table
mesPMCollection of proper motions.table
mesISOInfrared Space Observatory (ISO) observing log.table
mesSpTCollection of spectral types.table
allfluxesall flux/magnitudes U,B,V,I,J,H,K,u_,g_,r_,i_,z_table
identIdentifiers of an astronomical objecttable
fluxMagnitude/Flux information about an astronomical objecttable
mesPLXCollection of trigonometric parallaxes.table
otypedefall names and definitions for the object typestable
mesDistanceCollection of distances (pc, kpc or Mpc) by several means.table
otypesList of all object types associated with an objecttable
mesVarCollection of stellar variability types and periods.table
mesXmmXMM observing log.table
.........
RMagnitude Rfilter name
IMagnitude Ifilter name
JMagnitude Jfilter name
HMagnitude Hfilter name
KMagnitude Kfilter name
uMagnitude SDSS ufilter name
gMagnitude SDSS gfilter name
rMagnitude SDSS rfilter name
iMagnitude SDSS ifilter name
zMagnitude SDSS zfilter name
GMagnitude Gaia Gfilter name
F150WJWST NIRCam F150Wfilter name
F200WJWST NIRCam F200Wfilter name
F444WJWST NIRCan F444Wfilter name
# Get more information about the field coordinatse
simbad.get_field_description("otype")
'Object type'

To check all available object types in Simbad go to http://simbad.u-strasbg.fr/simbad/sim-display?data=otypes

# Add the field otype and check that it is now included
simbad.add_votable_fields("otype")
# Check that it was added
simbad.get_votable_fields()
['basic.main_id',
 'basic.ra',
 'basic.dec',
 'basic.coo_err_maj',
 'basic.coo_err_min',
 'basic.coo_err_angle',
 'basic.coo_wavelength',
 'basic.coo_bibcode',
 'basic.otype']
# Query Simbad by catalog containing the keyword 'hess'
# and display the result
hess_simbad = simbad.query_catalog("HESS")
hess_simbad
Table length=114
main_idradeccoo_err_majcoo_err_mincoo_err_anglecoo_wavelengthcoo_bibcodeotypecatalog_id
degdegmasmasdeg
objectfloat64float64float32float32int16str1objectobjectobject
HESS J0232+20238.22166666666666420.272499999999997------2007A&A...475L...9AgamHESS J0232+202
HESS J0534+22083.522.0------2008ApJ...682L..41HgamHESS J0534+220
HESS J0535-69183.97916666666666-69.18611111111112------2019A&A...621A.138KgamHESS J0535-691
4FGL J0535.2-673684.00004166666666-67.58541666666666------X2012ApJ...759..123SHXBHESS J0536-675
HESS J0537-69184.43333333333334-69.16583333333334------2012A&A...545L...2HgamHESS J0537-691
HESS J0538-69184.692-69.103------G2024ApJ...970L..21AgamHESS J0538-691
HD 25944098.246902531940015.800322432180.01750.016390O2020yCat.1350....0GHXBHESS J0632+057
NAME MONOCEROS NEB99.679166666666666.50333333333333331000.018000.0941988IRASP.C......0JSNRHESS J0632+058
NAME Vela X128.287-45.1901------2015ApJS..217....2MPsrHESS J0835-455
NAME Vela Jr SN133.0-46.333333333333336------R2009BASI...37...45GSNRHESS J0852-463
HESS J1018-589154.5-58.9------2012Sci...335..189AgamHESS J1018-589
1FGL J1018.6-5856154.73161487762-58.946104235249980.00930.009490O2020yCat.1350....0GHXBHESS J1018-589A
PSR J1016-58154.08860833333333-58.9532500000000041213.0710.090R2015ApJ...814..128KPsrHESS J1018-589B
..............................
ARGO J1907+0627287.0516.3918800000000005208416.0208416.090G2020ApJ...905...76AgamHESS J1908+063
W 49b287.78949.1058999999999985000.05000.090X2022A&A...661A..38PSNRHESS J1911+090
ARGO J1912+1026288.06210.351599999999998306640.0306640.090G2020ApJ...905...76AgamHESS J1912+101
HESS J1915+115288.7511.500000000000002------G2021ApJ...917....6AgamHESS J1915+115
HESS J1923+140290.7513.999999999999998------G2021ApJ...917....6AgamHESS J1923+140
HESS J1923+141290.7514.1------2010ApJ...709L...6AgamHESS J1923+141
HAWC J1928+178292.0999999999999717.82------G2021ApJ...917....6AgamHESS J1928+181
SNR G054.1+00.3292.54418.8394314633.0314633.090G2020ApJ...905...76ASNRHESS J1930+188
2MASS J19435624+2118233295.9843521.306494444444446110.0110.090I2003yCat.2246....0CBlaHESS J1943+213
HESS J1943+215295.7521.51833333333333------2012PASJ...64..100YgamHESS J1943+215
QSO B2005-489302.35579329135-48.831590291959990.02580.019790O2020yCat.1350....0GBLLHESS J2009-488
QSO B2155-304329.71693843745-30.2255884577199970.01710.013790O2020yCat.1350....0GBLLHESS J2158-302
QSO B2356-309359.78293124841-30.6279641940399930.09370.071690O2020yCat.1350....0GBLLHESS J2359-306
f"There are {len(hess_simbad)} HESS sources in Simbad database."
'There are 114 HESS sources in Simbad database.'

Exercise: Do you know how to count how many HESS sources in Simbad are classified as HMXB? And as SNR? (answer in next cell, we use the pandas functionnalities)

df_hess_simbad = hess_simbad.to_pandas()
df_hess_simbad.groupby("otype").count()["main_id"]
otype
BLL     4
Bla     1
HXB     7
LXB     1
Psr    21
SNR    16
XB*     1
gam    62
reg     1
Name: main_id, dtype: int64

Step #2 - Projecting HESS sources onto the Fermi sky#

Aladin

Display the HESS sources in Galactic coordinates and overlay it on a view of an all-sky image survey conducted with Fermi LAT.

# Display the Fermi color HiPS
aladin = Aladin(survey="P/Fermi/color")
aladin
# Display the sources on top
aladin.add_table(hess_simbad, name="HESS-SIMBAD")
# Increase height of the widget
aladin.height = 600

** zoom out and move to see the points **

The HESS sources are overlayed on top of the Fermi images. If you don’t see them, zoom out and move around the sky to locate them around the Galactic Plane. By selecting a source you will see the main Simbad information of that source at the bottom of the AladinLite widget. You can change the image by selecting the stack layer.

# Select the "SNR" sources and overlay them
# Note that characters in python need that extra "b"
idx_SNR = hess_simbad["otype"] == ["SNR"]
aladin.add_table(hess_simbad[idx_SNR], name="SNR", color="red", shape="circle")

Scroll up to the widget to see the SNR in red.

Step #3 - Cross-identify HESS and Fermi LAT sources#

Xmatch

Here we will cross-correlate the HESS source list with the complete set of objects appearing in the 3rd Fermi LAT catalogue.

Then we use the CDS XMatch service (http://cdsxmatch.u-strasbg.fr/) via the astroquery.XMatch.query module to look for spatial crossmatches

The cross-correlation will create a new, sub-catalogue of all HESS sources found in Simbad that also appear in the 3rd Fermi-LAT catalogue.

The Fermi Gamma Ray Space Telescope was launched in 2008 and observes astronomical objects across the 10 keV – 300 GeV band. The main instrument of the Fermi satellite is the Large Area Telescope (LAT), an imaging high-energy gamma-ray telescope covering the spectral range of 20 MeV – 300 GeV. The LAT has a very wide field of view, covering 20% of the sky at any time and scanning the complete sky every three hours. In the third Fermi-LAT catalogue (3FGL) all identified Fermi sources after 4 years of continuous survey were published together with basic measurements such as photometric fluxes in different spectral bands, an estimated gamma-ray spectral slope, or a variability flag.

In the following cross-identification process, it is assumed that the HESS source and its Fermi counterpart have an apparent angular distance of less then 1°, which is guided by the average angular resolution of the Fermi-LAT across the gamma-ray waveband. The angular resolution of the Fermi-LAT drops from 3° at 100 MeV to 0.04° at 100 GeV. Choosing a different limit for the angular distance thus favors associations with more objects at the low or at the high energy end of the Fermi-LAT band.

Find the VizieR name of the 3rd Fermi LAT catalogue.

catalog_list = Vizier.find_catalogs("Fermi LAT third catalog")
for k, v in catalog_list.items():
    print(k, ": ", v.description)
IX/67 :  Incremental Fermi LAT 4th source cat. (4FGL-DR3) (Fermi-LAT col., 2022)
J/ApJ/893/46 :  The fourth Fermi-GBM GRB catalog: 10 years (von Kienlin+, 2020)
J/ApJS/199/31 :  Fermi LAT second source catalog (2FGL) (Nolan+, 2012)
J/ApJS/218/23 :  Fermi LAT third source catalog (3FGL) (Acero+, 2015)
J/ApJS/223/28 :  The third Fermi/GBM GRB catalog (6yr) (Bhat+, 2016)
J/ApJS/247/33 :  The Fermi LAT fourth source catalog (4FGL) (Abdollahi+, 2020)
J/ApJS/263/24 :  The 4LAC-DR3 catalog (Ajello+, 2022)

Check the list of cadidate catalogs and select the one that interests us, i.e. “Fermi LAT third source catalog (3FGL) (Acero+, 2015)”. It’s identifier is: J/ApJS/218/23. VizieR might have several tables associated to this catalog. The next step is to see if the catalog has more than one table associated. We display table names and metadata:

# these two lines are commented out to prevent this pretty large catalog to be queried a lot of times.
# They should be executed the first time you do the tutorial to store the result in a pickle file.

vizier = Vizier(row_limit=-1)
catalog = vizier.get_catalogs("J/ApJS/218/23")

print(catalog)
print("Metadata of each table: ")
print(catalog[0].meta)
TableList with 3 tables:
	'0:J/ApJS/218/23/table4' with 19 column(s) and 4984 row(s) 
	'1:J/ApJS/218/23/table8' with 13 column(s) and 3034 row(s) 
	'2:J/ApJS/218/23/table3' with 2 column(s) and 12 row(s) 
Metadata of each table: 
{'ID': 'J_ApJS_218_23_table4', 'name': 'J/ApJS/218/23/table4', 'description': 'LAT 4-year catalog (3034 unique 3FGL sources)'}

There are three tables, each with a different number of columns and rows. To see what could be of interest, let’s display their description.

for i in range(len(catalog)):
    print(catalog[i].meta["name"], ": ", catalog[i].meta["description"])
J/ApJS/218/23/table4 :  LAT 4-year catalog (3034 unique 3FGL sources)
J/ApJS/218/23/table8 :  LAT 4-year catalog: spectral information
J/ApJS/218/23/table3 :  Definitions of the analysis flags

We can even visualise the first element of each table to have an idea of their content.

table0 = catalog[0]
table0[0]
Row index=0
3FGLNaRAJ2000DEJ2000amajaminphiSigF35S25GammaModVarFlagAssocTeVClassIDSimbad
degdegdegdegdeg1e-05 / (m2 s)fW / m2
str13int16float32float32float32float32int16float32float32float32float32str2str1str12str18str1str5str26str6
J0000.1+654510.03865.7520.1020.078416.81.013.62.41PL32FGL J2359.6+6543cSimbad
table1 = catalog[1]
table1[0]
Row index=0
File3FGLLCF1E_F1F2E_F2F3E_F3F4E_F4F5E_F5
0.0001 / (m2 s)0.0001 / (m2 s)0.0001 / (m2 s)0.0001 / (m2 s)1e-05 / (m2 s)1e-05 / (m2 s)1e-06 / (m2 s)1e-06 / (m2 s)1e-06 / (m2 s)1e-06 / (m2 s)
str13str13str2float32float32float32float32float32float32float32float32float32float32
J0000.1p6545J0000.1+6545LC1.810.820.690.141.240.230.580.490.280.19
table2 = catalog[2]
table2[0]
Row index=0
FlagNote
int16str347
1Source with TS>35, which went to TS<25 when changing the diffuse model (Section 3.7.3) or the analysis method (Section 3.7.4). Sources with TS<=35 are not flagged with this bit because normal statistical fluctuations can push them to TS<25.

J/ApJS/218/23/table4 and J/ApJS/218/23/table8 contain positional and spectral information respectively. The first table has several entries for the same source, so before performing the match, let’s restric the table to unique entries for the same source. We then match the tables based on the names in column 3FGL to get all information in a single table.

table0 = unique(table0, keys="3FGL")
FERMI = join(
    table0,
    table1,
    keys="3FGL",
    join_type="inner",
    metadata_conflicts="silent",
)
print("Number of matches :", len(FERMI))
FERMI[0]
Number of matches : 3034
Row index=0
3FGLNaRAJ2000DEJ2000amajaminphiSigF35S25GammaModVarFlagAssocTeVClassIDSimbadFileLCF1E_F1F2E_F2F3E_F3F4E_F4F5E_F5
degdegdegdegdeg1e-05 / (m2 s)fW / m20.0001 / (m2 s)0.0001 / (m2 s)0.0001 / (m2 s)0.0001 / (m2 s)1e-05 / (m2 s)1e-05 / (m2 s)1e-06 / (m2 s)1e-06 / (m2 s)1e-06 / (m2 s)1e-06 / (m2 s)
str13int16float32float32float32float32int16float32float32float32float32str2str1str12str18str1str5str26str6str13str2float32float32float32float32float32float32float32float32float32float32
J0000.1+654510.03865.7520.1020.078416.81.013.62.41PL32FGL J2359.6+6543cSimbadJ0000.1p6545LC1.810.820.690.141.240.230.580.490.280.19

We have a new table with 3034 FERMI sources with spatial and spectral information. We move on to cross-match this table with the HESS-Simbad sources. This time the match will be based on positions.

Lets have a look again a the hess_simbad table and it’s content.

hess_simbad[0:5]
Table length=5
main_idradeccoo_err_majcoo_err_mincoo_err_anglecoo_wavelengthcoo_bibcodeotypecatalog_id
degdegmasmasdeg
objectfloat64float64float32float32int16str1objectobjectobject
HESS J0232+20238.22166666666666420.272499999999997------2007A&A...475L...9AgamHESS J0232+202
HESS J0534+22083.522.0------2008ApJ...682L..41HgamHESS J0534+220
HESS J0535-69183.97916666666666-69.18611111111112------2019A&A...621A.138KgamHESS J0535-691
4FGL J0535.2-673684.00004166666666-67.58541666666666------X2012ApJ...759..123SHXBHESS J0536-675
HESS J0537-69184.43333333333334-69.16583333333334------2012A&A...545L...2HgamHESS J0537-691
# Create a skycoord object from the ra and dec columns
c_hess_simbad = SkyCoord(hess_simbad["ra"], hess_simbad["dec"])
c_fermi = SkyCoord(FERMI["RAJ2000"], FERMI["DEJ2000"])
# Set the maximum separation
max_sep = 1.0 * u.deg
# For each row in the first catalog, look for the closest neighbor
idx, d2d, d3d = c_hess_simbad.match_to_catalog_sky(c_fermi, 1)
sep_constraint = d2d < max_sep

# limit the tables to matches within the maximum separation
hess_simbad_matches = hess_simbad[sep_constraint]
fermi_matches = FERMI[idx[sep_constraint]]

# Look at the number of matches in each table within the maximum separation
print("Number of possible hess-simbad matches:", len(hess_simbad_matches))
print("Number of possible fermi matches:", len(fermi_matches))
Number of possible hess-simbad matches: 97
Number of possible fermi matches: 97

There are 83 HESS-Simbad-FERMI possible matches within 1 degree for each row in the first table! Tables hess_simbad_matches and fermi_matches are the matched sources in hess_simbad and fermi, respectively, which are separated by less than 1 deg. But ideally we would like to have the result as a single table including the angular separation between the matches. Let’s go do that.

# Add the separation to the fermi Table and concatenate the matched tables
fermi_matches["Ang_Sep"] = d2d[sep_constraint]
hess_simbad_fermi = hstack(
    [hess_simbad_matches, fermi_matches],
    metadata_conflicts="silent",
)

print("Number of possible HESS-Simbad-Fermi matches", len(hess_simbad_fermi))
Number of possible HESS-Simbad-Fermi matches 97

Note that the same Fermi source can be associated to different HESS sources. You can investigate those possible matches within 1deg (recommended) or limit to have unique entries. For the purpose of the exercice we choose option 2, but in general, we recommend to look at all possible matches to see which might be the true association (if any).

# Limit to unique 3FGL sources, this will keep the first row of each duplicate
# Note that one could sort them before that
hess_simbad_fermi.sort("Ang_Sep")
hess_simbad_fermi = unique(hess_simbad_fermi, keys="3FGL", keep="first")
hess_simbad_fermi
Table length=73
main_idradeccoo_err_majcoo_err_mincoo_err_anglecoo_wavelengthcoo_bibcodeotypecatalog_id3FGLNaRAJ2000DEJ2000amajaminphiSigF35S25GammaModVarFlagAssocTeVClassIDSimbadFileLCF1E_F1F2E_F2F3E_F3F4E_F4F5E_F5Ang_Sep
degdegmasmasdegdegdegdegdegdeg1e-05 / (m2 s)fW / m20.0001 / (m2 s)0.0001 / (m2 s)0.0001 / (m2 s)0.0001 / (m2 s)1e-05 / (m2 s)1e-05 / (m2 s)1e-06 / (m2 s)1e-06 / (m2 s)1e-06 / (m2 s)1e-06 / (m2 s)deg
objectfloat64float64float32float32int16str1objectobjectobjectstr13int16float32float32float32float32int16float32float32float32float32str2str1str12str18str1str5str26str6str13str2float32float32float32float32float32float32float32float32float32float32float64
HESS J0232+20238.22166666666666420.272499999999997------2007A&A...475L...9AgamHESS J0232+202J0232.8+2016138.21920.2710.0550.047-47.20.44.92.03PLPbll1ES 0229+200SimbadJ0232.8p2016LC0.230.290.180.050.250.110.460.310.420.220.0029157033593276618
HESS J0534+22083.522.0------2008ApJ...682L..41HgamHESS J0534+220J0534.5+2201183.63722.0240.0120.0119030.7157.31471.92.23ECT1FHL J0534.5+2201PPSRPSR J0534+2200SimbadJ0534.5p2201LC6.31--3.33--14.47--90.0429.8656.022.840.1292618808058602
HD 25944098.246902531940015.800322432180.01750.016390O2020yCat.1350....0GHXBHESS J0632+057J0633.7+0632498.4386.5410.0180.0187157.917.1124.42.16EC2FGL J0633.7+0633PSRLAT PSR J0633+0632SimbadJ0633.7p0632LC8.431.054.670.2114.080.5025.801.611.050.350.7646571241230222
NAME Vela X128.287-45.1901------2015ApJS..217....2MPsrHESS J0835-455J0833.1-4511e3128.287-45.190--------18.3244.82.41PL51FHL J0833.1-4511eEPWNVela XSimbadJ0833.1-4511eLC37.18--8.19--14.46--31.87--6.87--0.00010275196628510123
NAME Vela Jr SN133.0-46.333333333333336------R2009BASI...37...45GSNRHESS J0852-463J0852.7-4631e3133.200-46.520------30.313.0147.11.94PLT101FGL J0854.0-4632ESNRVela JrSimbadJ0852.7-4631eLC9.392.213.410.287.540.6319.792.3913.221.280.23205529470804162
PSR J1016-58154.08860833333333-58.9532500000000041213.0710.090R2015ApJ...814..128KPsrHESS J1018-589BJ1016.3-58582154.079-58.9670.0310.029-8618.97.865.52.35EC52FGL J1016.5-5858EPSRPSR J1016-5857SimbadJ1016.3-5858LC7.613.732.200.437.330.6313.161.510.800.340.014613325460475186
1FGL J1018.6-5856154.73161487762-58.946104235249980.00930.009490O2020yCat.1350....0GHXBHESS J1018-589AJ1018.9-58564154.730-58.9460.0140.0142852.227.1250.32.30LP1FHL J1018.9-5855EHMB1FGL J1018.6-5856SimbadJ1018.9-5856LC26.671.0811.410.5521.920.7832.611.971.420.430.0008413415787775986
FGES J1023.3-5747155.81326306-57.77632889------G2018A&A...612A...1HgamHESS J1023-575J1023.1-57453155.790-57.7590.0180.018-3231.219.9148.12.25EC1FGL J1023.0-5746EPSRLAT PSR J1023-5746SimbadJ1023.1-5745LC0.327.016.330.6417.511.0225.371.961.590.470.02131765846051888
PSR J1028-5819157.11620000000002-58.3183722222222253.030.090R2015ApJ...814..128KPsrHESS J1026-582J1028.4-58195157.123-58.3200.0120.012-7457.533.3251.22.18EC1FHL J1028.4-5819PSRPSR J1028-5819SimbadJ1028.4-5819LC13.983.659.390.6826.780.9150.112.323.550.600.0039260856722611575
Mrk 421166.1138086814638.208832915520.01240.014890O2020yCat.1350....0GBLLHESS J1104+382J1104.4+38127166.11838.2100.0070.007-12190.330.3383.01.77PLT1FHL J1104.4+3812PBLLMkn 421SimbadJ1104.4p3812LC10.190.304.800.0917.980.3982.342.4042.611.710.0034909340127782604
PSR J1119-6127169.80958333333334-61.463750000000005------2000ApJ...541..367CPsrHESS J1119-614J1119.1-61272169.794-61.4660.0290.027-8627.06.784.92.36PL2FGL J1118.8-6128EPSRPSR J1119-6127SimbadJ1119.1-6127LC7.391.662.720.225.570.4310.591.241.390.400.007773186261269452
PSR J1301-6305195.6999969482-63.1800003052------2022ApJS..260...53APsrHESS J1303-631J1303.0-6312e2195.750-63.200------7.61.622.71.64PL2FGL J1303.7-6316cEPWNHESS J1303-631SimbadJ1303.0-6312eLC0.001.010.470.300.970.502.671.403.500.700.03014314809054314
HESS J1357-645209.25-64.5------gamHESS J1357-645J1356.6-64282209.164-64.4800.0670.055-7517.92.641.82.56PL2FGL J1356.0-6436EPSRPSR J1357-6429SimbadJ1356.6-6428LC8.560.971.910.152.260.283.010.750.210.240.042089720952953324
..............................................................................................................................
HESS J1854+013283.51.2999999999999998------G2021ApJ...917....6AgamHESS J1854+013J1855.9+0121e6283.9901.355------68.370.7535.72.20LPT0FGL J1855.9+0126SNRW44SimbadJ1855.9p0121eLC27.027.2220.680.8457.021.45102.684.067.841.130.49293665293776606
HESS J1858+020284.58333333333332.0900000000000003------2008A&A...477..353AgamHESS J1858+020J1857.9+02102284.4902.1700.0600.0581315.28.268.02.36LP3,42FGL J1857.6+0211ESimbadJ1857.9p0210LC10.143.582.340.465.840.719.601.720.500.440.12288571482134578
HAWC J1907+085286.798.57------G2021ApJ...917....6AgamHESS J1907+089J1904.9+08181286.2438.3060.1070.079234.71.417.02.30PL4,5SimbadJ1904.9p0818LC0.072.001.330.290.290.401.950.930.760.370.6020375632968096
ARGO J1907+0627287.0516.3918800000000005208416.0208416.090G2020ApJ...905...76AgamHESS J1908+063J1907.9+06024286.9866.0390.0130.013-4684.038.4319.12.24EC1FHL J1907.7+0600EPSRLAT PSR J1907+0602SimbadJ1907.9p0602LC30.881.7612.220.3231.160.8060.892.653.080.620.35874848502120776
ARGO J1912+1026288.06210.351599999999998306640.0306640.090G2020ApJ...905...76AgamHESS J1912+101J1908.9+10221287.22810.3750.1260.096-826.41.727.22.59PL3,4SimbadJ1908.9p1022LC3.881.571.050.241.570.431.100.880.370.300.8207313998263458
W 49b287.78949.1058999999999985000.05000.090X2022A&A...661A..38PSNRHESS J1911+090J1910.9+09064287.7449.1010.0170.016-8041.820.3183.52.18LP1FHL J1911.0+0905snrW 49BSimbadJ1910.9p0906LC17.511.845.990.4213.300.7443.122.457.330.920.04510685664614893
HESS J1915+115288.7511.500000000000002------G2021ApJ...917....6AgamHESS J1915+115J1915.9+11122289.00011.2160.1470.120210.73.838.22.41LP3,42FGL J1916.1+1106sppSimbadJ1915.9p1112LC6.281.221.810.273.050.584.211.420.000.340.3751428028503172
HESS J1923+141290.7514.1------2010ApJ...709L...6AgamHESS J1923+141J1923.2+1408e5290.81814.145------75.039.6345.82.15LP0FGL J1923.0+1411ESNRW51CSimbadJ1923.2p1408eLC25.152.2411.350.3529.470.8276.453.0016.421.270.07983070024905738
SNR G054.1+00.3292.54418.8394314633.0314633.090G2020ApJ...905...76ASNRHESS J1930+188J1928.4+18381292.11318.6340.1750.131-235.81.621.92.42PL1,4,5SimbadJ1928.4p1838LC0.271.950.990.261.260.391.650.930.640.370.45692117306583563
HAWC J1928+178292.0999999999999717.82------G2021ApJ...917....6AgamHESS J1928+181J1928.9+17393292.23717.6570.0800.058-58.53.525.02.32LP3,42FGL J1928.8+1740cSimbadJ1928.9p1739LC3.541.611.070.272.140.494.381.240.210.280.20879630393335458
QSO B2005-489302.35579329135-48.831590291959990.02580.019790O2020yCat.1350....0GBLLHESS J2009-488J2009.3-48494302.349-48.8280.0180.018-3340.33.644.91.77PLT1FHL J2009.4-4849PBLLPKS 2005-489SimbadJ2009.3-4849LC1.170.250.520.052.090.1710.150.934.750.630.005735961234808655
QSO B2155-304329.71693843745-30.2255884577199970.01710.013790O2020yCat.1350....0GBLLHESS J2158-302J2158.8-30136329.720-30.2270.0090.009-87142.121.7230.51.83LPT1FHL J2158.8-3013PbllPKS 2155-304SimbadJ2158.8-3013LC6.470.453.620.0913.420.3657.342.1023.981.350.00299836956521492
QSO B2356-309359.78293124841-30.6279641940399930.09370.071690O2020yCat.1350....0GBLLHESS J2359-306J2359.3-30383359.829-30.6460.0540.051-711.10.66.62.02PL1FHL J2359.2-3037PbllH 2356-309SimbadJ2359.3-3038LC0.770.280.120.040.440.101.270.400.560.250.04355625621825019
f"There are {len(hess_simbad_fermi)} FERMI-HESS-Simbad matches"
'There are 73 FERMI-HESS-Simbad matches'

Some of these associations are of known nature.

Vizier

Let’s query the ViZier catalog J/ApJ/810/14 : Third catalog of LAT-detected AGNs (3LAC) (Ackermann+, 2015). It lists 3LAC sources classified as AGNS. Let’s have a look at the catalog in question:

Vizier.ROW_LIMIT = -1
catalog = Vizier.get_catalogs("J/ApJ/810/14")
for tab in catalog:
    print(tab.meta["name"], ": ", tab.meta["description"])
J/ApJ/810/14/highlat :  High latitude (|b|>10deg) 3LAC full  sample and fluxes
J/ApJ/810/14/lowlat :  Low latitude (|b|<10deg) sample  and fluxes
J/ApJ/810/14/table7 :  Sources from earlier FGL catalogs missing in 3LAC
J/ApJ/810/14/table10 :  Properties of the 3FGL very-high-energy (VHE) AGNs
J/ApJ/810/14/table2 :  *List of ATCA blazar candidates

Table J/ApJ/810/14/table10 lists the properties of very-high-energy ANGs. Let’s have a look at that table:

table10 = catalog[3]
table10
Table length=55
3FGLLLVHESpClSEDClzalphae_alphaVar
str12str1str21str6str3float32float32float32float64
J0013.9-1853SHBL J001355.9-185406bllHSP0.0941.9350.16736.46
J0033.6-1921KUV 00311-1938bllHSP0.6101.7150.03564.62
J0035.9+5949L1ES J0033+595bllHSP--1.8980.04269.55
J0136.5+3905RGB J0136+391bllHSP--1.6960.02562.30
J0152.6+0148RGB J0152+017bllHSP0.0801.8870.10351.76
J0222.6+43013C 66AbllISP0.4441.8800.017885.04
J0232.8+20161ES 0229+200bllHSP0.1392.0250.15049.16
J0303.4-2407PKS 0301-243bllHSP0.2601.9180.022676.85
J0316.6+4119IC 310rdgHSP0.0191.9020.14338.74
J0319.8+1847RBS 0413bllHSP0.1901.5720.10276.33
J0319.8+4130NGC 1275rdgISP0.0181.9850.014622.21
J0349.2-11581ES 0347-121bllHSP--1.7340.15644.26
J0416.8+01041ES 0414+009bllHSP0.2871.7450.11455.85
...........................
J1517.6-2422AP LibbllLSP0.0482.1120.02660.31
J1555.7+1111PG 1553+113bllHSP--1.6040.025123.55
J1653.9+3945Markarian 501bllHSP0.0341.7160.016251.47
J1725.0+11521H 1720+117bllHSP--1.8850.04579.88
J1728.3+50131ES 1727+502bllHSP0.0551.9600.06554.08
J1743.9+19341ES 1741+196bllHSP0.0841.7770.10838.27
J2000.0+65091ES 1959+650bllHSP0.0471.8830.022158.37
J2001.1+4352LMAGIC J2001+435bllISP--1.9710.022341.11
J2009.3-4849PKS 2005-489bll-0.0711.7730.031131.06
J2158.8-3013PKS 2155-304bllHSP0.1161.7500.018618.50
J2202.7+4217BL LacertaebllISP0.0692.1610.0172340.22
J2250.1+3825B3 2247+381bllHSP0.1191.9120.07452.42
J2347.0+5142L1ES 2344+514bllHSP0.0441.7820.039100.97
J2359.3-3038H 2356-309bllHSP0.1652.0220.11540.97

There are no coordinates, only names are given in column _3FGL. Let’s see how many of these AGNs are within our table of matches hess_simbad_fermi:

hess_simbad_fermi_AGN = join(
    hess_simbad_fermi,
    table10,
    keys="3FGL",
    join_type="inner",
    metadata_conflicts="silent",
)
print("Number of matches :", len(hess_simbad_fermi_AGN))
hess_simbad_fermi_AGN
Number of matches : 5
Table length=5
main_idradeccoo_err_majcoo_err_mincoo_err_anglecoo_wavelengthcoo_bibcodeotypecatalog_id3FGLNaRAJ2000DEJ2000amajaminphiSigF35S25GammaModVar_1FlagAssocTeVClassIDSimbadFileLCF1E_F1F2E_F2F3E_F3F4E_F4F5E_F5Ang_SepLLVHESpClSEDClzalphae_alphaVar_2
degdegmasmasdegdegdegdegdegdeg1e-05 / (m2 s)fW / m20.0001 / (m2 s)0.0001 / (m2 s)0.0001 / (m2 s)0.0001 / (m2 s)1e-05 / (m2 s)1e-05 / (m2 s)1e-06 / (m2 s)1e-06 / (m2 s)1e-06 / (m2 s)1e-06 / (m2 s)deg
objectfloat64float64float32float32int16str1objectobjectobjectstr13int16float32float32float32float32int16float32float32float32float32str2str1str12str18str1str5str26str6str13str2float32float32float32float32float32float32float32float32float32float32float64str1str21str6str3float32float32float32float64
HESS J0232+20238.22166666666666420.272499999999997------2007A&A...475L...9AgamHESS J0232+202J0232.8+2016138.21920.2710.0550.047-47.20.44.92.03PLPbll1ES 0229+200SimbadJ0232.8p2016LC0.230.290.180.050.250.110.460.310.420.220.00291570335932766181ES 0229+200bllHSP0.1392.0250.15049.16
Mrk 421166.1138086814638.208832915520.01240.014890O2020yCat.1350....0GBLLHESS J1104+382J1104.4+38127166.11838.2100.0070.007-12190.330.3383.01.77PLT1FHL J1104.4+3812PBLLMkn 421SimbadJ1104.4p3812LC10.190.304.800.0917.980.3982.342.4042.611.710.0034909340127782604Markarian 421bllHSP0.0311.7720.008755.10
QSO B2005-489302.35579329135-48.831590291959990.02580.019790O2020yCat.1350....0GBLLHESS J2009-488J2009.3-48494302.349-48.8280.0180.018-3340.33.644.91.77PLT1FHL J2009.4-4849PBLLPKS 2005-489SimbadJ2009.3-4849LC1.170.250.520.052.090.1710.150.934.750.630.005735961234808655PKS 2005-489bll-0.0711.7730.031131.06
QSO B2155-304329.71693843745-30.2255884577199970.01710.013790O2020yCat.1350....0GBLLHESS J2158-302J2158.8-30136329.720-30.2270.0090.009-87142.121.7230.51.83LPT1FHL J2158.8-3013PbllPKS 2155-304SimbadJ2158.8-3013LC6.470.453.620.0913.420.3657.342.1023.981.350.00299836956521492PKS 2155-304bllHSP0.1161.7500.018618.50
QSO B2356-309359.78293124841-30.6279641940399930.09370.071690O2020yCat.1350....0GBLLHESS J2359-306J2359.3-30383359.829-30.6460.0540.051-711.10.66.62.02PL1FHL J2359.2-3037PbllH 2356-309SimbadJ2359.3-3038LC0.770.280.120.040.440.101.270.400.560.250.04355625621825019H 2356-309bllHSP0.1652.0220.11540.97

There are a few AGNs ! Let’s have a look at their properties and see how they compare with the rest of the population.

Step #4 - Searchig for relative locations in a “high-energy color-color diagram”#

How to trace various object properties of a given catalogue against each other and to point out specific sub-samples in the resulting plot.

The next goal is to look for correlations between different high-energy gamma-ray colors of the HESS sources that are also detected by Fermi. In stellar astronomy, tracing optical colors against each other gives a rather robust classification of different star types without having to do (more ambitious) spectroscopy. In the HESS-FERMI catalogue there is not much spectroscopic information available, but the different fluxes in F1—F5 coming from the 3FGL part can be used to eventually discriminate different sub-samples of the catalogue. Since a color is basically an observed flux ratio between two bands, constructing a color-color diagram has the great advantage to be independent of the distance to the objects.

The “color-color” diagram to be computed involves the following high-energy gamma-ray fluxes as measured by Fermi-LAT:

  • F1: flux over 100 – 300 MeV

  • F2: flux over 300 - 1000 MeV

  • F3: flux over 1 - 3 GeV

  • F4: flux over 3 - 10 GeV

  • F5: flux over 10 - 100 GeV

Merge all the tables in one, but keeping their origin by adding a column with name Source. Add a column for the object type TYPE.

# Create a column with name Source to know  which will contain types as "All" for FERMI,
FERMI["Source"] = "FGL3"
hess_simbad_fermi["Source"] = "HESS-Simbad-3FGL"
hess_simbad_fermi_AGN["Source"] = "AGNs-3LAC"
# Create a column with name TYPE which will contain types as "All" for FERMI,
# Have to change to str since otype is of object type
FERMI["TYPE"] = "ALL"
hess_simbad_fermi["TYPE"] = hess_simbad_fermi["otype"].astype(str)
hess_simbad_fermi_AGN["TYPE"] = "AGN"
# Merge the tables vertically using vstack
Data = vstack(
    [FERMI, hess_simbad_fermi, hess_simbad_fermi_AGN],
    metadata_conflicts="silent",
)
# Create two new columns with the flux ratios
Data["F2_F1"] = Data["F2"] / Data["F1"]
Data["F4_F3"] = Data["F4"] / Data["F3"]

Save the file into for instance csv format and into a Panda kind of table to be able to use Plotly

# Write Table to csv format and to panda format
Data.write("Data" / Path("Data_FERMI-HESS-SIMBAD-AGN.csv"), overwrite=True)
Data = Data.to_pandas()

And now lets plot using Plotly:

  • Flux ratios F2/F1 vs F4/F3

  • In a log. scale

  • Color coded according to the Source

  • Using fancy markers

  • Adding a legend

fig = px.scatter(
    Data,
    x="F2_F1",
    y="F4_F3",
    log_x=True,
    log_y=True,
    color="Source",
    hover_name="TYPE",
)
fig.update_traces(
    marker={"size": 12, "line": {"width": 2, "color": "DarkSlateGrey"}},
    selector={"mode": "markers"},
)
fig.show()

Note that when you move around with the mouse you get the values for each of the sources. You can activate or deactivate a type of Source in the plot by selecting it in the legend. You can zoom in and out, you can export as a png… and plenty more. Play a little bit with it.

Do the same as before but now color coded by object type.

# Plot same thing but color coded by the TYPE of object
fig = px.scatter(Data, "F2_F1", y="F4_F3", log_x=True, log_y=True, color="TYPE")
fig.update_traces(
    marker={"size": 12, "line": {"width": 2, "color": "DarkSlateGrey"}},
    selector={"mode": "markers"},
)
fig.show()

Step #5 – Display the location of interesting sources and search multi-wavelength data around them#

How to obtain multi-wavelength images for the source you are interested in.

After isolating the 5 SIMBAD-confirmed BL Lac objects on the gamma-ray “color-color” diagram, this last step focuses on one particular object: PKS 2155-304, a peculiar BL Lac object known to be very variable on a wide spectral range and to show recurrent outbursts. A BL Lac object is a sub-type of active galactic nuclei, where the central engine around the accreting supermassive black hole launches magnetized, ballistic jets that reach out to kiloparsec scales while being nearly aligned with the line of sight of the observer. The emission from the jets is modeled as relativistically beamed synchrotron-self-Compton (SSC) emission produced in the hot plasma of the ejected jet material. The very hot electrons produce synchrotron emission that peaks in the radio band and then the very same electrons comptonize the synchrotron photons and up-scatter them to gamma-rays and beyond. However, in reality the question of the seed photons and the structure of the jet are still under investigation. A simple SSC interpretation of the broad band spectrum is challenged by the partially correlated variability seen between different spectral bands.

Broad-band spectrum reaching from the radio to the high-energy band (H.E.S.S., Fermi-LAT collaborations, ApJ 696, L150)

SED

In the following, this tutorial shows how to obtain multi-waveband imaging for this source (PKS 2155-304).

Now, let’s plot again AladinLite with the catalog of AGNs on top on the Fermi image and centering around PKS 2155-30 and setting a field of view of 10 deg.

object_name = "PKS 2155-304"
aladin = Aladin(target=object_name, survey="P/Fermi/color", fov=10)
aladin
aladin.add_table(hess_simbad_fermi)
aladin.add_table(hess_simbad_fermi_AGN)

You can now see a marker on the source.

# object_coordinates = SkyCoord.from_name(object_name)
# here, were doing a query in a circle directly with an url to get the SED VizieR tool:
# query_url = f"https://vizier.cds.unistra.fr/viz-bin/sed?-c={object_coordinates.icrs.ra.deg},{object_coordinates.icrs.dec.deg}&-c.rs=5"
# since this can be a bit long, we saved the file in the folder Data. You can uncomment
# the url and comment the next line if you prefer to download the file:
query_url = "Data/sed_result.vot"
query = Table.read(query_url, format="votable")
query
Table length=1482
_RAJ2000_DEJ2000_tabname_ID_tab1_31_tab1_32sed_freqsed_fluxsed_efluxsed_filter
degdegd---GHzJyJy---
float64float64str32str64float64float64float64float32float32str32
329.716940600-30.225596400I/297/outNOMAD1===0597-1038713&-c=329.7169406 -30.2255964,eq=J2000&-c.rs=--0.01817500.0524--2MASS:H
329.716940600-30.225596400I/297/outNOMAD1===0597-1038713&-c=329.7169406 -30.2255964,eq=J2000&-c.rs=--0.02419600.0435--2MASS:J
329.716983000-30.225589000I/305/outGSC2.3===SCJS000019&-c=329.716983 -30.225589,eq=J2000&-c.rs=0.00--0.03825400.06070.024POSS-II:i
329.716983000-30.225589000I/305/outGSC2.3===SCJS000019&-c=329.716983 -30.225589,eq=J2000&-c.rs=0.00--0.04684300.03050.012POSS-II:F
329.716983000-30.225589000I/305/outGSC2.3===SCJS000019&-c=329.716983 -30.225589,eq=J2000&-c.rs=0.00--0.06405800.03050.0088POSS-II:J
329.716983000-30.225589000I/305/outGSC2.3===SCJS000019&-c=329.716983 -30.225589,eq=J2000&-c.rs=0.00--0.06749000.001930.00084Johnson:B
329.716934920-30.225604060I/317/samplePPMXL=1214064805186438959&-c=329.716935 -30.225604,eq=J2000&-c.r--0.01385500.05970.00132MASS:Ks
329.716934920-30.225604060I/317/samplePPMXL=1214064805186438959&-c=329.716935 -30.225604,eq=J2000&-c.r--0.01817500.05240.00132MASS:H
329.716934920-30.225604060I/317/samplePPMXL=1214064805186438959&-c=329.716935 -30.225604,eq=J2000&-c.r--0.02419600.04350.00112MASS:J
329.716877000-30.225596400I/320/spm4-c=329.7168770 -30.2255964,eq=J2000&-c.rs=0.004----1385500.0597--2MASS:Ks
329.716877000-30.225596400I/320/spm4-c=329.7168770 -30.2255964,eq=J2000&-c.rs=0.004----1817500.0524--2MASS:H
329.716877000-30.225596400I/320/spm4-c=329.7168770 -30.2255964,eq=J2000&-c.rs=0.004----2419600.0435--2MASS:J
329.716877000-30.225596400I/320/spm4-c=329.7168770 -30.2255964,eq=J2000&-c.rs=0.004----5414300.00126--Johnson:V
..............................
329.716666700-30.225555600J/other/NewA/11.557/BLLacrecno=259--0.02419600.0435--2MASS:J
329.716916700-30.225583300J/other/NewA/16.503/table1recno=765--0.01385500.05970.00132MASS:Ks
329.716916700-30.225583300J/other/NewA/16.503/table1recno=765--0.01817500.05240.00132MASS:H
329.716916700-30.225583300J/other/NewA/16.503/table1recno=765--0.02419600.04350.00112MASS:J
329.716938100-30.225588300J/other/AstBu/70.264/tablerecno=784--0.04.80.4920.061:=4.8GHz
329.716958300-30.225577800J/other/RAA/24.E5011/catalogrecno=3243--0.0135710.103--WISE:W4
329.716958300-30.225577800J/other/RAA/24.E5011/catalogrecno=3243--0.0259340.0651--WISE:W3
329.716958300-30.225577800J/other/RAA/24.E5011/catalogrecno=3243--0.0651720.0715--WISE:W2
329.716958300-30.225577800J/other/RAA/24.E5011/catalogrecno=3243--0.0894900.0644--WISE:W1
329.716958300-30.225577800J/other/RAA/24.E5011/catalogrecno=3243--0.01817500.0524--2MASS:H
329.716958300-30.225577800J/other/RAA/24.E5011/catalogrecno=3243--0.02419600.0435--2MASS:J
329.716958300-30.225577800J/other/RAA/24.E5011/catalogrecno=3243--0.01.2967e+060.0124--GALEX:NUV
329.716958300-30.225577800J/other/RAA/24.E5011/catalogrecno=3243--0.01.9607e+060.00788--GALEX:FUV
query["nufnu"] = query["sed_freq"] * query["sed_flux"] * 1e-17
cc = 3e18
query["lambda"] = cc / query["sed_freq"] / 1e9
df_query = query.to_pandas()
fig = px.scatter(
    df_query,
    x="lambda",
    y="nufnu",
    log_x=True,
    log_y=True,
    color="_tabname",
)
fig.update_traces(
    marker={"size": 10, "line": {"width": 1, "color": "DarkSlateGrey"}},
    selector={"mode": "markers"},
)

fig.update_layout(
    xaxis_title="Wavelength [Å]",
    yaxis_title="vFv",
    title={
        "text": "Based on VizieR photometric Viewer",
        "y": 0.95,
        "x": 0.4,
        "xanchor": "center",
        "yanchor": "top",
    },
)

fig.show()