
Night 4:Gamma-ray Speed
Delayed light
Delayed light
Do you dare question Einstein?
In the notebook on the right, you’ll learn how I carry out the calculations to see if all the gamma rays reach us at the same speed.
Now, don’t hold back and get on with the calculations and graphs. It’s your last chance before your big night.
Remember to stay cautious vigilant. There can be many explanations for the fact that gamma rays with different energies have a different arrival time. Some of these explanations have to do with the wormholes of spacetime, which you have surely heard of.

It seems clear that there’s a different arrival time for different energies.
But, it’s important to remain cautious. To be sure that the effect is due to the different speeds of the photons, we should see a delay that’s consistent with the same speed from several sources located at varying distances from the Earth. We can’t discard a theory based on a single case. We need a lot more evidence.
The only thing we can do is keep watching the flares and capture as many gamma rays as possible with our telescopes.
Defying Einstein
Albert Einstein claimed that, the speed of light within the vacuum is always the same … My gamma rays from Mrk421 have travelled through the vacuum for a long time to get from their source to the Earth. Let’s see if they have all gone at the same speed. As each one has travelled the same distance, “all” I have to do is check whether the time it takes between leaving Mrk421 and getting to the Earth is the same for each one.
Let’s start by loading the libraries and reading the data, as always.
import pandas as pd
import numpy as np
import matplotlib.pyplot as pl
%matplotlib inline
# We read the files and give them a name
mrk421_ON= pd.read_csv('data/EvtList_ON_Mrk421.txt', sep=' ')
mrk421_OFF= pd.read_csv('data/EvtList_OFF.txt', sep=' ')
# We define the cut variables had_cut and theta_cut to make the light curve
# (remember, we use the cut to calculate the excesses, not to make the theta plot)had_cut = 0.20
theta2_cut = 0.02
# We select the data:
mrk421_ON_cut = mrk421_ON[(mrk421_ON['had'] < had_cut) & (mrk421_ON['theta2'] < theta2_cut)]
mrk421_OFF_cut = mrk421_OFF[(mrk421_OFF['had'] < had_cut) & (mrk421_OFF['theta2'] < theta2_cut)]
# We use OFF normalization factor that we found before
factor = 4.71
mrk421_ON_cut.head()
Energia | had | theta2 | Tiempo | |
---|---|---|---|---|
31 | 172.0 | 0.006 | 0.003 | 9033.70 |
75 | 65.0 | 0.157 | 0.018 | 4643.12 |
170 | 367.0 | 0.097 | 0.003 | 2497.60 |
196 | 177.0 | 0.074 | 0.009 | 3845.38 |
226 | 875.0 | 0.008 | 0.001 | 3654.35 |
In the data for Mrk421, we have the column Tiempo (Time), which indicates the moment in which the telescope detects the gamma rays.
The question is, how can I know how long each of the gamma rays has taken to travel from Mrk421 to the Earth? The answer: I can’t. I only know when they’ve reached the Earth.
But, if I have data which shows that the amount of gamma rays changes over time, I can see if that change happens at the same time regardless of the gamma rays energy.
The Gamma rays are photons and when they enter the Earth’s atmosphere they interact with their molecules and generate a cascade of particles. Some photons come to Earth with more energy than others. The more energy they have the more “strongly” they collide with the molecules in the atmosphere and more particles are generated. If there are more particles we see more light with our MAGIC telescopes. This allows us to assign each event an amount of energy carried by the gamma ray. In the files:
** EvtList_ON_Mrk421.txt ** and ** EvtList_OFF.txt **
We not only have the hadroness, the theta square and the time for each event, we also have their energy in GeV. So, we can select the higher energy gamma rays, on the one hand, and the lower energy gamma rays on the other. This way we can analyse them independently.
Most (if not all) of the theories that predict that the speed of light in a vacuum is not always the same, indicate that this speed depends on the energy of the light, that is the energy of the gamma rays.
We need to define two energy intervals in our data: Low (Energy <100 GeV) and High (Energy> 500 GeV). To have this, we do the same as we did to cut on theta square or hadroness.
# 1 We define the cuts of "high energies" and "low energies"
cut_highE = 5000
cut_lowE = 1000
# 2 We select the data
# High energy
mrk421_ON_cut_highE =mrk421_ON_cut[mrk421_ON_cut['Energia']>cut_highE]
mrk421_OFF_cut_highE =mrk421_OFF_cut[mrk421_OFF_cut['Energia']>cut_highE]
# Low energy
mrk421_ON_cut_lowE =mrk421_ON_cut[mrk421_ON_cut['Energia']<cut_lowE]
mrk421_OFF_cut_lowE =mrk421_OFF_cut[mrk421_OFF_cut['Energia']<cut_lowE]
If we assume that when a flare occurs, the source simultaneously increases the number of photons for all energies, we can create a light curve for the two energy ranges and check if the amount of gamma rays we see grows at the same time for both ranges.
First we will create the light curve for high energies. Then, we will do the same for low energies, before, finally combining them. This time, instead of using 100 time slots, we will use 40.
#Light Curve High Energy
weights_high = np.ones_like(mrk421_OFF_cut_highE.theta2)*factor
# 1 Calculate Non and Noff for each time interval.
# We define 40 intervals (bins) in the 10,000 seconds of our data
bins = 40
Non, tiempos_highE= np.histogram(mrk421_ON_cut_highE.Tiempo, bins=bins)
Noff, bins_off= np.histogram(mrk421_OFF_cut_highE.Tiempo, bins=tiempos_highE, weights=weights_high)
# 2 Calculate the excess and the error for each time interval.
Exceso_highE= Non - Noff
Error_highE = (Non+Noff)**0.5
# 3 Create the light curve: the excesses with their errors over time
pl.figure(1, figsize=(10, 5), facecolor='w', edgecolor='k')
pl.errorbar(tiempos_highE[1:], Exceso_highE, xerr=10000.0/(2.0*bins), yerr= Error_highE, fmt='or', ecolor='red')
pl.xlabel('Tiempo [s]')
pl.ylabel('Numero de rayos Gammas')
pl.show()
#Light Curve Low Energy
weights_low = np.ones_like(mrk421_OFF_cut_lowE.theta2)*factor
# 1 Calculate Non and Noff for each time interval.
# We define 40 intervals (bins) in the 10,000 seconds of our data
bins =40
Non, tiempos_lowE= np.histogram(mrk421_ON_cut_lowE.Tiempo, bins=bins)
Noff, bins_off= np.histogram(mrk421_OFF_cut_lowE.Tiempo, bins=tiempos_highE, weights=weights_low)
# 2 Calculate the excess and the error for each time interval.
Exceso_lowE= Non - Noff
Error_lowE = (Non+Noff)**0.5
# 3 Create the light curve: the excesses with their errors over time
pl.figure(1, figsize=(10, 5), facecolor='w', edgecolor='k')
pl.errorbar(tiempos_lowE[1:], Exceso_lowE, xerr=10000.0/(2.0*bins), yerr= Error_lowE, fmt='or', ecolor='red')
pl.xlabel('Tiempo [s]')
pl.ylabel('Numero de rayos Gammas')
pl.show()
At first glance, we see that more low-energy gammas than high-energy gammas arrive, which is what we would expect.
But in order to see if there is any time difference between the two light curve, it is better to put the two of them on the same graph. While we’re at it, we will give the points and axis of each one the same colour. Let’s see how we can do this.
# 4 Depict the excess and error over time
# We use the function "pl.subplots ()" from which we can recover the axes in ax1
fig, ax1 = pl.subplots()
# Now instead of calling pl.errorbar, we call it with ax1.errorbar and
# we also add titles to the axis
ax1.errorbar(tiempos_highE[1:], Exceso_highE, xerr=10000.0/(2.0*bins), yerr=Error_highE, fmt='-or', ecolor='red')
ax1.set_ylabel('Numero de rayos Gamma, alta energia', color='r')
# Now, we include the light curve for low energy
ax2 = ax1.twinx()
ax2.errorbar(tiempos_lowE[1:], Exceso_lowE, xerr=10000.0/(2.0*bins), yerr=Error_lowE, fmt='-ob', ecolor='blue')
ax2.set_ylabel('Numero de rayos Gamma, baja energia', color='b')
# The light curve for high energy is in red (r) and
# the low energy one is blue (b).
# Let's do the same for the axes, so that it's clear what's what.
for tl in ax1.get_yticklabels():
tl.set_color('r')
for tl in ax2.get_yticklabels():
tl.set_color('b')
ax1.set_xlabel('Tiempo [s]')
pl.show()
This flare is full of interesting things, it seems clear that the amount of high energy (Red) gamma rays increases after the low energy (Blue) gamma-rays do. Does this mean that Einstein was wrong?
Note: By the way, in order to better compare the two light curves I have drawn a line to join the points. This is done by including “-” with “fmt = ‘- or’” and “fmt = ‘- ob’”.
Now we can visualize the events detected by the camera as we did before, but, this time, separating them according to the energy level:
from IPython.display import HTML
HTML("""
<video width="600" height="600" controls="" autoplay="" loop="">
<source src="data/animation_HighLow.mp4" type="video/mp4">
</video>
""")

Dictionary of the gamma ray hunter
Active Galactic Nuclei
There's party going on inside!
This type of galaxy (known as AGN) has a compact central core that generates much more radiation than usual. It is believed that this emission is due to the accretion of matter in a supermassive black hole located in the centre. They are the most luminous persistent sources known in the Universe.
Find out more:
Black Hole
We love everything unknown. And a black hole keeps many secrets.
A black hole is a supermassive astronomical object that shows huge gravitational effects so that nothing (neither particles nor electromagnetic radiation) can overcome its event horizon. That is, nothing can escape from within.
Blazar
No, it's not a 'blazer', we aren't going shopping
A blazar is a particular type of active galactic nucleus, characterised by the fact that its jet points directly towards the Earth. In other words, it’s a very compact energy source associated with a black hole in the centre of a galaxy that’s pointing at us.
Cherenkov Radiation
It may sound like the name of a ames Bond villain, but this phenomenon is actually our maximum object of study
Cherenkov radiation is the electromagnetic radiation emitted when a charged particle passes through a dielectric medium at a speed greater than the phase velocity of light in that medium. When a very energetic gamma photon or cosmic ray interacts with the Earth’s atmosphere, a high-speed cascade of particles is produced. The Cherenkov radiation of these charged particles is used to determine the origin and intensity of cosmic or gamma rays.
Find out more:
Cherenkov Telescopes
Our favourite toys!
Cherenkov telescopes are high-energy gamma photon detectors located on the Earth’s surface. They have a mirror to gather light and focus it towards the camera. They detect light produced by the Cherenkov effect from blue to ultraviolet on the electromagnetic spectrum. The images taken by the camera allow us to identify if the particular particle in the atmosphere is a gamma ray and at the same time determine its direction and energy. The MAGIC telescopes at Roque de Los Muchachos (La Palma) are an example.
Find out more:
Cosmic Rays
You need to know how to distinguish between rays, particles and sparks!
Cosmic rays are examples of high-energy radiation composed mainly of highly energetic protons and atomic nuclei. They travel almost at the speed of light and when they hit the Earth’s atmosphere, they produce cascades of particles. These particles generate Cherenkov radiation and some can even reach the surface of the Earth. However, when cosmic rays reach the Earth, it is impossible to know their origin, because their trajectory has changed. This is due to the fact that they have travelled through magnetic fields which force them to change their initial direction.
Find out more:
Dark Matter
What can it be?
How can we define something that is unknown? We know of its existence because we detect it indirectly thanks to the gravitational effects it causes in visible matter, but we can’t study it directly. This is because it doesn’t interact with the electromagnetic force so we don’t know what it is composed of. Here, we are talking about something that represents 25% of everything known! So, it’s better not to discount it, but rather try to shed light on what it is …
Find out more:
Duality Particle Wave
But, what is it?
A duality particle wave is a quantum phenomenon in which particles take on the characteristics of a wave, and vice versa, on certain occasions. Things that we would expect to always act like a wave (for example, light) sometimes behave like a particle. This concept was introduced by Louis-Victor de Broglie and has been experimentally demonstrated.
Find out more:
Event
These really are the events of the year
When we talk about events in this field, we refer to each of the detections we make via telescopes. For each of them, we have information such as the position in the sky, the intensity, and so on. This information allows us to classify them. We are interested in having many events so that we can carry out statistical analysis a posteriori and draw conclusions.
Gamma Ray
Yes, we can!
Gamma rays are extreme-frequency electromagnetic ionizing radiation (above 10 exahertz). They are the most energetic range on the electromagnetic spectrum. The direction from which they reach the Earth indicates where they originate from.
Find out more:
Lorentz Covariance
The privileges of certain equations.
Certain physical equations have this property, by which they don’t change shape when certain coordinates changes are given. The special theory of relativity requires that the laws of physics take the same form in any inertial reference system. That is, if we have two observers whose coordinates can be related by a Lorentz transformation, any equation with covariant magnitudes will be written the same in both cases.
Find out more:
Microquasar
Below you will learn what a quasar is...well a microquasar is the same, but smaller!
A microquasar is a binary star system that produces high-energy electromagnetic radiation. Its characteristics are similar to those of quasars, but on a smaller scale. Microquasars produce strong and variable radio emissions often in the form of jets and have an accretion disk surrounding a compact object (e.g. a black hole or neutron star) that’s very bright in the range of X-rays.
Find out more:
Nebula
What shape do the clouds have?
Nebulae are regions of the interstellar medium composed basically of gases and some chemical elements in the form of cosmic dust. Many stars are born within them due to condensation and accumulation of matter. Sometimes, it’s just the remains of extinct stars.
Find out more:
Particle Shower
The Niagara Falls of particles!
A particle shower results from the interaction between high-energy particles and a dense medium, for example, the Earth’s atmosphere. In turn, each of these secondary particles produced creates a cascade of its own, so that they end up producing a large number of low-energy particles.
Pulsar
Now you see me, now you don't
The word ‘pulsar’ comes from the shortening of pulsating star and it is precisely this, a star from which we get a discontinuous signal. More formally speaking, it’s a neutron star that emits electromagnetic radiation while it’s spinning. The emissions are due to the strong magnetic field they have and the pulse is related to the rotation period of the object and the orientation relative to the Earth. One of the best known and studied is the pulsar of the Crab Nebula, which, by the way, is very beautiful.
Find out more:
Quantum Gravity
A union of 'grave' importance ...
This field of physics aims to unite the quantum field theory, which applies the principles of quantum mechanics to classical systems of continuous fields, and general relativity. We want to define a unified mathematical basis with which all the forces of nature can be described, the Unified Field Theory.
Find out more:
Quasar
A 'quasi' star
Quasars are the furthest and most energetic members of a class of objects called active core galaxies. The name, quasar, comes from ‘quasi-stellar’ or ‘almost stars’. This is because, when they were discovered, using optical instruments, it was very difficult to distinguish them from the stars. However, their emission spectrum was clearly unique. They have usually been formed by the collision of galaxies whose central black holes have merged to form a supermassive black hole or a binary system of black holes.
Find out more:
Supernova Remnant
A candy floss in the cosmos
When a star explodes (supernova) a nebula structure is created around it, formed by the material ejected from the explosion along with interstellar material.
Find out more:
Theory of relativity
In this life, everything is relative...or not!
Albert Einstein was the genius who, with his theories of special and general realtivity, took Newtonian mechanics and made it compatible with electromagnetism. The first theory is applicable to the movement of bodies in the absence of gravitational forces and in the second theory, Newtonian gravity is replaced with more complex formulas. However, for weak fields and small velocities it coincides numerically with classical theory.
Find out more:
