To do extragalactic astronomy we need to measure a galaxy spectrum (a measure of
the flux it emits at each wavelength) so we can find out what kind of galaxy it
is and how far away it is. The structure of the spectrum, its overall shape and
small scale details of its absorption and emission lines, tells us these
properties.
Plotted below is an example of a galaxy spectrum.
In [45]:
However it’s hard to measure a galaxy spectrum, obtaining enough signal at each
wavelength takes potentially hours of observation time. This means that
accumulating samples that contain millions of galaxies can take years, or more
likely, decades. In fact some galaxies can’t be measured this way at all because
they are just too faint.
Solution: measure the flux across a whole region of wavelengths instead of
at individual wavelengths. This data is both faster to collect and still viable
for very faint galaxies as there is more signal per data point.
Different filters are added in front of the telescope so only light of certain
wavelengths can pass through. The plots below demonstrates this; they show a set
of possible filters represented by their transmission functions, which are the
probability of a photon of light making it through and being detected.
Overplotted for illustration purposes is an example galaxy spectrum. All the
flux from the galaxy that lies within the blue filter is added together
(integrated) and so on for the other 5 filters plotted in different colors
leaving (in this example) just 6 measurements of the galaxy’s flux.
The ideal filters (left hand side) show that all the light within the filter
region is detected (as transmission probability=1 across the wavelength range of
the filter, and is equal to 0 outside), but this is not what happens in
practice.
In reality is not possible to fabricate such perfect filters, and the quality of
the filters also degrades over time. In addition to this the detection
probability is affected by the precision of the reflection by the telescope’s
mirrors, the efficiency of the detector that measures the photons, and the
transmission properties of light through the atmosphere. In short, the
transmission of the filters is not constant from observation to observation.
And in reality, on average, we end up with something like the right hand side
below.
In [46]:
The atmosphere
For ground-based telescopes we have to observe the universe through our own
atmosphere, which absorbs and scatters some of the incident light. The resulting
transmission of light through our atmosphere varies depending on the quantity of
different consituents during the observation (including ozone and water vapor).
The quantity and distribution of these constituents varies seasonally, and also
on an hourly basis.
The water vapor is one of the most interesting components because it has huge
absorption effects at around 9,000 to 10,000 angstroms (angstrom=$10^{-10}$
meters). This is modelled for typical conditions and particularly evident in the
wiggly-ness of the purple filter on the right.
The transmission by the purple filter can increase and decrease according to the
amount of water vapor in the atmosphere. Below is a model showing the difference
between two potential purple filters when there is a normal/low amount of water
vapor in the atmosphere and an extreme amount.
It’s clear from these two realisations of this filter that they both probe
slightly different parts of a galaxy spectrum, therefore they contain
potentially different information.
In [47]:
The potential information gain
I want to test if this information is retrievable given the huge diversity of
galaxies (many different spectra at may different redshifts) and the measurement
errors on the observed flux through this filter.
Although the two realisations of the filters are fairly different, there is a
lot of ambiguity in measurements of flux through a filter. First, there are a
lot of different possible spectra for galaxies: the spectrum of galaxy A through
the “extreme” filter could produce the same observed flux as the spectrum of
galaxy B through the “normal” filter. Because the “normal” filter covers all the
same wavelengths as the “extreme” filter, and we have no way of telling what
exact wavelengths the photons are at, then we can’t measure if there’s anything
different between the underlying spectra from the measurements of these two
galaxies. Second, galaxies are at different distances (called redshifts) and
this means the further they are away the more their spectrum becomes stretched
and shifted to higher wavlengths (towards the right in the previous plots).
Therefore the previous scenario could be re-jigged to be the same underlying
galaxy spectrum, except shifted to two different redshifts. Therefore both
having different galaxy spectra, and having galaxy spectra at different
redshifts, contribute to this ambiguity.
Finally the observed flux through a filter comes with some associated
measurement error which can be very large for galaxies on the threshold of being
detectable. This contributes some uncertainty to exactly how much flux has been
observed through either of these filters.
Simulations
Let’s assume we do a large galaxy survey (like that to be done by
LSST) where every galaxy will be observed hundreds of
times though each of the six filters plotted above, and then all the
observations are added together to create a final very precise set of six
observations. We could do this survey assuming a fixed transmission by the
atmosphere (really where the data is “corrected” to some fixed transmission -
don’t ask how!) or we could model the individual atmospheric transmissions for
each observation. In this universe let’s just assume there are only two possible
atmospheric transmissions and they end up producing the “extreme” and “normal”
filters above.
Then let’s simulate two galaxy surveys:
all of the hundreds of observations per galaxy are made through all
six filters shown on the right hand side in the plot above.
all of the hundreds of observations of each galaxy are made through only
the first five filters in the plot above, and then half of the
observations for the last filter are made through the “extreme” filter and
half through the “normal” filter. Therefore the final observations through
each of the “extreme” and “normal” filters will be \( 1/\sqrt 2 \) as precise as
when all of the observations are made through the “normal” filter alone (as in
the first case).
In this pretend universe we will assume a galaxy can have one of 129 different
possible spectra, and that there are equal numbers of each of these galaxy
spectra at every redshift.
We will simulate each galaxy (each one of the galaxy spectra) 100 times at each
redshift, producing different observations because of the measurement errors on
the observed flux in each filter.
Redshifts will be assigned in two ways: (i) every one of these 100 galaxies will
be placed at the same redshift, one out of ten redshifts overall, and (ii) each
galaxy is assigned a redshift uniformly between a maximum and a minimum.
Case (i) is an overly-simplistic universe where galaxies can only exist at 10
fixed distances. This reduces the abiguity between the underlying galaxy
spectrum at different redshifts and the resulting flux in a filter. It will be
useful for testing.
Test 1: classifying the observation filter
If there is different information contained within the “extreme” and “normal”
filters then data originating from the “extreme” filter should be separable from
data originating from the “normal” filter. Here I try using a Random Forest
Classifier to learn the difference between the data from the two different
filters.
This is repeated four times:
the “easy” case of having no measurement errors and data at only 10 unique
redshifts. This reduces the ambiguity in the data considerably.
a “medium” case of having no measurement errors but having data at continuous
redshifts.
another “medium” case of having measurement errors but having data at 10
unique redshifts.
the “hard” case (which is much closer to the real universe than the others)
having measurement errors and having data at continuous redshifts.
Note that the only data that goes into the classifier is the flux measured
through either the “extreme” filter or the “normal” filter, and a 0 or 1
indicating which filter the data originated from. No data from the other filters
(the first five) is used (yet).
In [48]:
Reading in data set: brown_y3y4_photometry.txt and using columns ['y_true_0', 'y_true_1']
Shape of data read in (129000, 26)
Creating new data set of y filter mag vs filter class
Training sample size = 206400
Testing sample size = 51600
True positive = 25800 False positive = 0
False negative = 21 True negative = 25779
Recall = 0.999186708493
Precision = 1.0
Reading in data set: brown_y3y4_randz_photometry.txt and using columns ['y_true_0', 'y_true_1']
Shape of data read in (129000, 26)
Creating new data set of y filter mag vs filter class
Training sample size = 206400
Testing sample size = 51600
True positive = 12406 False positive = 13394
False negative = 12188 True negative = 13612
Recall = 0.504431975279
Precision = 0.480852713178
Reading in data set: brown_y3y4_photometry.txt and using columns ['y_obs_0', 'y_obs_1']
Shape of data read in (129000, 26)
Creating new data set of y filter mag vs filter class
Training sample size = 206400
Testing sample size = 51600
True positive = 14559 False positive = 11241
False negative = 10106 True negative = 15694
Recall = 0.590269612812
Precision = 0.564302325581
Reading in data set: brown_y3y4_randz_photometry.txt and using columns ['y_obs_0', 'y_obs_1']
Shape of data read in (129000, 26)
Creating new data set of y filter mag vs filter class
Training sample size = 206400
Testing sample size = 51600
True positive = 12344 False positive = 13456
False negative = 12135 True negative = 13665
Recall = 0.504268965236
Precision = 0.478449612403
The result shows that the easy case gets near-perfect classification, but adding
in any other ambiguity into the data results in a recall and precision close to
0.5: no better than guessing.
However we have extra data that can help break the ambiguity from different
galaxy spectra and different redshifts: the other 5 filters! Let’s repeat with
using those as well.
In [49]:
Reading in data set: brown_y3y4_photometry.txt and using columns ['u_true', 'g_true', 'r_true', 'i_true', 'z_true', 'y_true_0', 'y_true_1']
Shape of data read in (129000, 26)
Creating new data set of ugriz + y filter mag vs filter class
Training sample size = 206400
Testing sample size = 51600
True positive = 25800 False positive = 0
False negative = 0 True negative = 25800
Recall = 1.0
Precision = 1.0
Reading in data set: brown_y3y4_randz_photometry.txt and using columns ['u_true', 'g_true', 'r_true', 'i_true', 'z_true', 'y_true_0', 'y_true_1']
Shape of data read in (129000, 26)
Creating new data set of ugriz + y filter mag vs filter class
Training sample size = 206400
Testing sample size = 51600
True positive = 23252 False positive = 2548
False negative = 1284 True negative = 24516
Recall = 0.94766873166
Precision = 0.901240310078
Reading in data set: brown_y3y4_photometry.txt and using columns ['u_obs', 'g_obs', 'r_obs', 'i_obs', 'z_obs', 'y_obs_0', 'y_obs_1']
Shape of data read in (129000, 26)
Creating new data set of ugriz + y filter mag vs filter class
Training sample size = 206400
Testing sample size = 51600
True positive = 20168 False positive = 5632
False negative = 3702 True negative = 22098
Recall = 0.844909928781
Precision = 0.781705426357
Reading in data set: brown_y3y4_randz_photometry.txt and using columns ['u_obs', 'g_obs', 'r_obs', 'i_obs', 'z_obs', 'y_obs_0', 'y_obs_1']
Shape of data read in (129000, 26)
Creating new data set of ugriz + y filter mag vs filter class
Training sample size = 206400
Testing sample size = 51600
True positive = 17261 False positive = 8539
False negative = 5325 True negative = 20475
Recall = 0.764234481537
Precision = 0.669031007752
This is more hopeful! However with the recall only at around 0.75, this means
only about 75% of the filters were distinguisable, and with the precision at
0.65 only 65% of the filters were correctly classed which is only slightly
better than guessing. It’s not clear from this if the extra information from
using both slightly different filters will help us estimate galaxy properties.
Test 2: estimating redshifts
Still, let’s see if we can use the extra information from the separate filters
to learn something about the galaxy: its redshift.
Instead of classifying the data, I will use all of the data from each galaxy
survey to attempt to estimate the redshift of the galaxy. I will train a Random
Forest Regressor to find a mapping between the flux observed in each filter and
the redshift. If splitting up the flux observations into the “extreme and
“normal” filters is better than doing all the observations in the “normal”
filter then the resulting redshifts will be closer to the true ones for more
galaxies in that survey.
Everything below uses case (ii) with continuous redshifts.
First I try using data without measurement errors to get a maximal limit for how
useful the extra information could be.
In [50]:
Training sample size = 103200
all visits, columns in fit are: ['u_true', 'g_true', 'r_true', 'i_true', 'z_true', 'y_true']
half visits in y, columns in fit are: ['u_true', 'g_true', 'r_true', 'i_true', 'z_true', 'y_true_0', 'y_true_1']
It appears that splitting up the data over two filters has a very slight
improvement for galaxies closer than a redshift of 1. Probably at larger
redshifts (distances) the measurement errors become too large (as the galaxies
are fainter) and this masks the information.
Anyway, now we don’t expect too much for the realistic case of having data with
measurement errors, but here goes.
In [51]:
Training sample size = 103200
all visits, columns in fit are: ['u_obs', 'g_obs', 'r_obs', 'i_obs', 'z_obs', 'y_obs']
half visits in y, columns in fit are: ['u_obs', 'g_obs', 'r_obs', 'i_obs', 'z_obs', 'y_obs_0', 'y_obs_1']
Yup, very slight improvement for galaxies at redshifts less than 0.8. The extra
effort of modelling correctly multiple atmospheric transmissions probably won’t
help us estimate more precise properties of galaxies.