Section 3: Convolution, Correlation and Time-Series Flashcards
convolution describes
the effect of one signal on another
correlation describes
the similarity of two signals
convolution and correlation are particularly important in
time series analysis
but also useful in spectroscopy and image analysis
convolution =
correlation with g reversed wrt u
auto-correlation function of real function f is
cross correlation with itself
convolution: observed signal often the
convolution of the source signal and something else
convolution: want to recover the
source signal
so need DECONVOLUTION
cross-correlation - find the lag/shift needed to get two observations to match via the
lag/shift that gives CCF maximum
auto-correlation - find a periodic signal or repeating pattern in an observation via the
lag distance between odd (or even) peaks in the |ACF|^2
Convolution: PSF - the image of a point source produced by telescope and detector is never
a point
convolution PSF: the image intensity distribution is the
convolution of this point source and the point spread function
PSF sometimes called the
instrumental profile
PSF resulting from diffraction telescope aperture is
the Airy pattern
convolution with the PSF: consider the 1D problem
1 point source convolved with PSF = observed sources
a single source at position x1 with intensity I(x1) is spread out across
position by the PSF
1D case: at a position x2, the observed intensity of the single source is
o(x2)=I(x1)PSF(x2-x1)
convolution with the PSF - consider multiple point sources
point sources convolved with PSF = observed sources
convolution with PSF multiple sources - source distribution contributes to the intensity as
o(x2)=I * PSF
the convolution of the distribution I with the PSF
it is possible to correct for effects of the PSF by
deconvolving, using the convolution theorem
FT of the function h(t)
H(s) = F(h(t)) = ∫h(t)e^-2piist dt
the inverse fourier transform F^-1 of H(s) would recover
h(t)
F^-1 (H(s)) = ∫ H(s) e^2piist ds = h(t)
convolution theorem
the FT of the convolution of two functions is equal to the multiplication of their FTs
o=I*PSF
F(o)=F(I) x F(PSF)
if the PSF is known we can find I from o via
I = F^-1 [F(o)/F(PSF)]
if data series has large no of elements, finding the convolution can be slow so can instead
use the convolution theorem
as the correlation can also be written in terms of a convolution, we can use correlation theorem to
quickly compute via FT instead of full equation
the PSF can be composed of the
instrument and the atmospheric PSF
Overall PSF can be measured by
observing a bright point source (eg star or quasar) near the target
object (eg galaxy)
For most UV-IR instruments, the image PSF caused by the instrument is broader than
the diffraction pattern
Even if you can make the different contributions to the PSF as small as possible you can not get better
than
the instrument’s diffraction pattern
ie diffraction limited with FWHM_PSF <FWMH_airydisk
instrument PSF can arise from
-aperture diffraction
-scattering from roughness/dirt on mirrors or other surfaces
-errors in reflecting surface shape
-optical mis-alignments
image of stars are spread out across the detector by
the PSF
if we just want to do photometry (counting photons) from a source then can adopt a simpler methods than
PSF deconvolution
“aperture photometry”
aperture photometry process
-define ‘apertures’ (boxes) of different sizes
-sum counts in each aperture
-counts tend to ‘true’ counts as aperture size increases
downsides of aperture photometry
-background noise also increases with larger apertures
-higher chance of getting counts from other sources with larger aperture
In spectroscopy, lines recorded have a profile of intensity versus
wavelength that is a combination of
the true line profile and the instrumental lines profile
the instrumental profile is sometimes called the
spectral PSF
ideally the ILP will be
symmetric and narrower than the true line profile
this is often not the case
convolution of an emission spectrum
3 spectral lines convolved with ILP = observed spectrum
what makes convolution of an absorption line spectrum different
absorption features wider and shallower in observed vs true spectrum
Radiation at 𝝀𝟏 is spread
out, so contribution to
intensity at 𝝀𝟏 in observed
spectrum is
reduced
Adjacent radiation at 𝝀𝟐
also spread out, and
contributes to
observed
intensity at 𝝀𝟏
Observed intensity at 𝝀𝟏
found by
summing all contributions
All parts of a galaxy along a line-of sight contribute to
its observed spectrum
different parts have different LOS velocities which effectively
broadens/smears a spectral line
overall spectrum can be described as a convolution of a
typical stellar spectrum and the LOS velocity distribution
the LOS velocity distribution is
fraction of stars contributing to spectrum with radial velocities between V_LOS and V_LOS +dV_LOS
It is convenient to express the observed spectrum in terms of
spectral velocity u
which is defined by u=c lnλ
light observed at spectral velocity u was emitted at
spectral velocity u-v_los
Suppose that all stars have intrinsically identical spectra 𝑺(𝒖).
𝑺(𝒖) measures
the relative intensity of radiation at spectral velocity u
intensity from a star with V_LOS is
S(u-V_LOS)
the observed composite spectrum is the convolution of
the stellar spectral velocity with the LOS velocity distribution
If the spectral velocity is dominated by a single 𝒗𝑳𝑶𝑺, we can use
cross-correlation to find it
we subtract the mean from the galaxy and stellar spectra then use an arbitrary V_LOSi
If 𝒗𝑳𝑶𝑺𝒊 does not align the two signals, 𝑮(𝒖)𝑺(𝒖 − 𝒗𝑳𝑶𝑺) will be
small +ve/-ve numbers at a given u
CCF small
If 𝒗𝑳𝑶𝑺𝒊 does align the two signals,
𝑮(𝒖)𝑺(𝒖 − 𝒗𝑳𝑶𝑺) will be
large +ve numbers at a given u
CCF is large
we can estimate 𝒗𝑳𝑶𝑺 by calculating
the CCF for many trial values of 𝒗𝑳𝑶𝑺 and 𝑺(𝒖 − 𝒗𝑳𝑶𝑺), and finding its maximum value
Periods present in a signal can be found using
auto-correlation
(cross-correlation with the signal itself)
the auto-correlation of a time series measures how
well a signal matches a time-shifted version of itself
(not having to fit a model, just matching the data to itself)
cross correlation between two time series f and g is
CCF (𝜏) = integral of f(t) g(t-𝜏) dt
t=time
𝜏=variable time lag/shift
examples of time-varying signals
cepheid light curve
eclipsing binary
sunspot number
To find a period
𝑻 present in
data
shift the data by some lag 𝝉 and cross-correlate with itself – i.e. auto-correlation
When the lag is close to the
period, f(t)f(t-𝜏) is mostly
positive
when the lag is out of phase with the period, f(t)f(t-𝜏) is
mostly negative
When the lag is a multiple of the
period get a
max ACF
𝜏=nT for integer n
𝜏-0,T,2T,3T…
When the lag is half a period out, get a
min ACF
𝜏=(2n+1)T/2
𝜏=T/2, 3T/2, 5T/2…
in |ACF|^2 you will get a peak when
𝜏=nT/2
𝜏=0,T/2, T, 3T/2, 2T, 5T/2, 3T….
Even with far “noisier” data (i.e. larger non-periodic signal added) the auto-correlation approach can still
recover the periodic signal
a periodic function can be expressed as
a sum of sines and cosines
ie a fourier series
the fourier transform of this periodic function decomposes it into
those sines and consines
we can identify the frequencies/periods via
the power spectrum or power spectral density PSD(v)
several routines available to calculate FT or the PSD can also be calculated directly via
PSD(v)^2 =C(v)^2 + S(v)^2
As the sines and cosines in
the Fourier series describing
the data add linearly, each
separate period that is
present will contribute
its own peak to the PSD
if the signal has the characteristics of white noise (a signal that is entirely random) then the power spectrum is
flat ie PSD=const
this means that there are no periods present in the signal (one part of the signal is entirely uncorrelated with any other)
can get “colours” of noise eg
red noise from Brownian motion with PSD prop to v^-2
- Suppose that a Cepheid light curve is being observed over several days
- The intrinsic modulation (𝑻 ∼ few hours) might be overlaid with:
A high frequency signal from the electronics
A low frequency signal due to temperature changes from day to
day affecting the CCD
these periodic nosie components can removed by
filtering
by plotting the PSD, we can decide which periods correspond to
the unwanted noise
and try get rid of them
Having established which frequencies correspond to unwanted noise, these can be
removed from the FT
essentially the FT is truncated at high and low frequencies
after removing noise from the FT, doing the inverse FT will then generate
a much cleaner time series, where the interesting effects are enhanced
the time series are repeating but very non-sinusoidal and/or the data might not be regularly sampled
due to eg
only observing every so often due to weather/scheduling etc
example of a case where fourier methods may not be efficient at identifying periods in data
extra-solar planet transits across the face of the parent star or star spot on rotating star
typically curves are built up by observations over several orbital periods
phase folding procedure
- Guess a trial period, 𝑻𝒊
- Divide the time-series 𝑰𝒊 up into bins based on this period
- Fold/stack all the bins together based on this trial 𝑻𝒊
- Average the values inside these stacked bins
- Plot each average as a function of bin number
Time series analysis methods based on Fourier series work best if
data span many periods and the period does not change much
time series methods based on fourier series are not good at
searching for an aperiodic signal such as a short-lived burst or a quasi-periodic signal
our signal is a linear combination of the
basis functions
The problem with Fourier series is that they are strictly periodic, and
Fourier analysis can only decompose a signal into
a set of periodic basis functions
eg sines and cosines
Wavelets is a similar approach to Fourier analysis but uses different
basis functions which are finite and/or non-periodic
such basis functions are called mother wavelets
mother wavelets
basis functions which are finite and/or non-periodic
many different mother wavelets depending on
data type
morlet wavelet
plane wave convolved with a gaussian
effectively a gaussian windowed FT so good for changing sinusoids
Wavelet analysis assumes that the signal is a superposition of
short time structures, all with the same basic shape
Each contributing wavelet has its
amplitude, width (𝒂) and position (𝒃)
in time changed so that the wavelets sum equals the signal
So for a range of 𝒂, 𝒃 values, 𝑾(𝒂, 𝒃) is calculated and plotted as
2D wavelet power spectrogram
|𝑾 𝒂, 𝒃|^2
Colour scale gives regions of higher wavelet power, indicating what
frequencies are occurring when, and how they are changing
time on x-axis, frequency or period on y-axis
The region shaded white at the edge of the wavelet power
spectrogram indicates
a,b values at which the wavelet extends outside the time range of the data
for small a values, when does wavelet extend outside time range
for b values near time range edges
for larger a values, when does wavelet extend outside the time range
occurs for wider range of b values
the region where the boundary effects are important resulting in unreliable wavelet power is called the
cone of influence