NASSP Masters 5003F - Computational Astronomy Lecture 3 First, a bit more python. Then some noise statistics.
NASSP Masters 5003F - Computational Astronomy Python ins and outs We’re going to mostly read our data from FITS files, using a module called pyfits. – ware/pyfits We’ll crunch up the data using a module called numpy. – For graphical output we’ll use module ppgplot, (2 ps) which is a (fairly crude) wrapper to a package called PGPLOT. – – BREAKING NEWS! pylab is better for graphical output.
NASSP Masters 5003F - Computational Astronomy Manuals and example code You won’t need to download manuals for pyfits, numpy, scipy or pylab. I’ll do so and make them available from my home page. It’ll be much quicker for you to copy (or simply access) them from there. Some of these manuals are huge – I recommend you neither print or read them in entirety, but rather: –Read the bits you need using acroread. –Look at the example code I’ll provide you.
NASSP Masters 5003F - Computational Astronomy Random variables – probability density x p(x) Average μ: Variance σ 2 : Units: probability per unit x.
NASSP Masters 5003F - Computational Astronomy Random variables – probability density x p(x) Estimate of μ: Estimate of σ 2 :
NASSP Masters 5003F - Computational Astronomy Random variables – probability density x p(x)
NASSP Masters 5003F - Computational Astronomy Random variables – probability density x p(x) x0x0
NASSP Masters 5003F - Computational Astronomy p(x) Noise 2 most important distributions: –Gaussian …but not necessarily ‘white’
NASSP Masters 5003F - Computational Astronomy Noise –Poisson (= i) …but note Central Limit theorem.
NASSP Masters 5003F - Computational Astronomy Gauss and Poisson
NASSP Masters 5003F - Computational Astronomy Combinations of random variables Weighted average: Uncertainty propagation: if y = f(a,b), Uncertainty in this: Best SNR when: where:
NASSP Masters 5003F - Computational Astronomy Filtering and correlation Uncorrelated ie ‘white’ noise (with a Gaussian probability distribution.)
NASSP Masters 5003F - Computational Astronomy Filtering and correlation Fourier transformed – looks the same – same power at all f – hence ‘white’.
NASSP Masters 5003F - Computational Astronomy Filtering and correlation Autocorrelation function. Power spectrum: where F is the Fourier transform of signal f, eg: The autocorrelation function is:
NASSP Masters 5003F - Computational Astronomy Filtering and correlation Filtering operation correlates the noise. It is still Gaussian but no longer white.
NASSP Masters 5003F - Computational Astronomy Filtering and correlation FT is dominated in this case by low frequencies.
NASSP Masters 5003F - Computational Astronomy Filtering and correlation Autocorrelation function is broadened.
NASSP Masters 5003F - Computational Astronomy Signals and noise Natural signal + background Instrumental filtering/correlation General: + uncorrelated noise + uncorrelated noise Natural signal + background Instrumental filtering/correlation XMM-Newton: + uncorrelated noise + uncorrelated noise Natural signal + background Instrumental filtering/correlation Interferometry: + uncorrelated noise + uncorrelated noise
NASSP Masters 5003F - Computational Astronomy Signal detection Much harder.An obvious source.
NASSP Masters 5003F - Computational Astronomy Signal detection Parent function; data; model. Probability that the data results from a certain model: Reduced chi 2 : divide by deg free. Recall that P signal = 1-P no signal. Many types of signal, but only 1 no-signal. Hence test model with no source. Called the ‘null hypothesis’.
NASSP Masters 5003F - Computational Astronomy Signal detection Null hypothesis requires: –Perfect knowledge of background B. –A good estimate of σ. Sparse sources among gaussian: ok. But… –what about poisson bins with zero counts? Answer: Maximum Likelihood. –what about crowded fields? Answer: Bayes..? –can we trust the distribution? Answer: Monte Carlo.