联系方式

  • QQ:99515681
  • 邮箱:99515681@qq.com
  • 工作时间:8:00-21:00
  • 微信:codinghelp

您当前位置:首页 >> CS作业CS作业

日期:2018-05-26 10:02

PHYS 391 { Lab 3: Playing with Astronomical Data: Signal to Noise and

Clusters

This is a three part lab. The rst part demonstrates the concept of signal to noise ratio with various

exposures of the same galaxy. The second part uses signal to noise ratio to nd the diameter of a galaxy. In

the third and last part you will measure the distance and age of a stellar cluster. The main purpose of this

lab is to introduce you to astronomical image data, practice error analysis on counting data and use linear

regression to derive parameters.

The lab write up is explained in the last section.

1 Signal to Noise Ratio

Almost all astronomical data comes in the form of photons. Photons strike a detector per unit time from

a distant object. If an object is faint, how can we distinguish between that and background sky noise or

a noisy detector? To quantify the reliability of a detection and to reject any non detections, astronomers

use the statistic signal to noise ratio (SNR) to measure the object photons above the background photon

noise. It is essentially the square root rule for counting statistics. We can use SNR to establish limits of an

extended object, such as a galaxy or distinguish between random noise and a faint star.

After preliminary tasks that acquaint you with the software, you will observe how SNR changes with exposure

time and measure the diameter of a galaxy. The data used in this part of the lab comes from Sloan Digital

Sky Survey and Pine Mountain Observatory.

1.1 De nitions

1.1.1 Photometry

Photometry is the term for measuring

ux from any astrophysical object. Modern CCDs (charged cou-

pled devices, ie cameras) make this an easy task because each image pixel counts the number of pho-

tons that strike it1 within some exposure time. All we have to do is sum all of the light for a partic-

ular object. We do this by de ning an `aperture' centered about a star with a large enough radius to

encompass all the light from the star but small enough to exclude light from a nearby star. All of the

photons including the sky background and other sources of noise 2 are then summed up in this aperture.

Figure 1: A visual de-

scription of the photom-

etry process.

The sky background level is estimated from averaging the pixels of a small piece of

sky near the star (usually an annulus of about 3-10 pixels in width centered around

the star and outside the aperture. The background is then subtracted leaving just

the source counts. Figure 1 is a picture of this process.

The longer the exposure time, the more photons collected per object. For example,

if a CCD collects 5 photons per second from a star, in 10 seconds it will theoretically

collect 50 photons. But you are also collecting more sky and noise photons as well.

Thus the goal for photometry is to optimize the source counts without completely

obliterating the signal with noise. One way to do this is to take several shorter

images and combine them in various ways rather than take one long exposure.

1.1.2 Signal to Noise

Signal to noise ratio (SNR), is essentially the number of times the object signal is

greater than noise. SNR comes from Poisson counting statistics where the standard

1Truthfully, pixels count the number of photo electrons and this number depends on the sensitivity of the detector. For

instance, it could take 20 photons to knock o a photo electron. This concept is called gain.

2other sources can include electronic read out noise,thermal noise from the detector, cosmic rays, light pollution, bad pixels,

etc

1

deviation or noise goes as the square root of the counts:  

p

N. With photometry, we also must include

the sky background photons when calculating the SNR. Our equation for SNR is then

SNR =

Source

p

Sky + Source

(1)

where Source are the photons from the star and Sky are photons from the sky background and non-stellar

sources.

For instance if you collect 10,000 photons in an aperture where 100 are from the star and 9900 are from

noise, the SNR is:

SNR =

100 p

(9900 + 100)

= 1

Conceptually, this means that the amplitude of your signal is as big as a random

uctuation of noise {

the signal is indistinguishable from the noise. The bare minimum for detecting object is SNR = 3. A bright

star will have an SNR of at least 1000 or have a signal that is 1000 times greater than a random

uctuation

of noise. A large SNR means a small measured error for

ux.

1.2 Virtual Box, DS9, PyRAF and Gedit Software Descriptions

1.2.1 VM

Starting VM: Click on the virtual machine (VM) icon and then click start. When it's done booting

up, you will see a terminal window which by default starts in the lab391 directory. Make your own subdi-

rectory (mkdir) using your duckid as the directory name in the lab391 directory. Copy all the les from the

directory lab les/ to your directory (cp). There will be les that you won't use but that isn't a concern.

You need to do this only once unless you move to another machine.

Saving Work: The virtual box has a linked folder that connects it to the rest of the computer called

pyraf share. To access your data outside of the VM, copy your les to this folder and retrieve them outside

the virtual box. It should be located on the Desktop. If not, ask your TA. You can also sftp your les to

your duck account too.

Turning o VM: When you are ready to turn o the VM, exit out of all running programs in the VM.

IMPORTANT! Shut o the VM by going under the VM menu item `system' and select 'Shut

Down' DO NOT click to close the window; that may break the VM and destroy any work you have

contained in it. It will also render the VM useless until we can x it.

1.2.2 DS9

On a terminal in the VM, type ds9 &3 at the prompt. This will bring up a widget that will allow you to

view the FITS les. FITS les are binary image les with an attached header le that describes the contents

and specs of the image. For demonstrative purposes, load an image (anything with a . ts extension) from

the lab les directory by going under the le menu in the ds9 widget. If you haven't done so, consult the

ds9help.pdf document for more information. Move the cursor over the image you will see numbers changing

for `X', `Y'4 and `Value'. X and Y - are simply pixel coordinates and `Value' corresponds to the number

of photons in each pixel. If you click on the image you will probably get a green circle. You can either

delete these (see ds9help.pdf) or start over by closing the window. You can load up to 16 images in di erent

'frames'.

3The '&' allows the command prompt to return so you can keep using the terminal window. Otherwise you can't type more

commands in the window

4Depending on the last users settings, X and Y could be in RA and Dec

2

1.2.3 PyRAF

Type pyraf in the terminal window. You should now be in the pyraf environment if you see a di er-

ent command prompt. PyRAF is a python wrapper for an astronomical software package called IRAF

(Image Reduction and Analysis Facility) which allows us to use python and linux commands in the envi-

ronment. As you will notice, this is a very stripped down python environment and isn't as user friendly as

an IDE like Jupyter. We will be using pyraf programs that read information from an image loaded in ds9.

Figure 2: Radial brightness pro-

le of a star

Imexamine: PyRAF task imexamine automatically nds the correct

aperture size, subtracts the background sky and returns the

ux along

with other values. Imexamine is far superior than manually adding the

pixels and subtracting the background because it calculates the center of

the star and derives an aperture radius that is three times the full width

half maximum (FWHM) of the stellar pro le (see gure 2).

You must have ds9 running in order to use imexamine. In pyRAF, type

imexamine at the prompt. The cursor will change to a blinking disk.

See the attached le: imexaminehelp.pdf for various commands. For this

lab, you will only need the 'a' and 'm' command to measure photons and

'q' to quit.

Caveats: PyRAF is potentially buggy. Be sure to save les/scripts in

case you have to restart pyRAF and/or it dies and the VM needs to be

reinstalled.

1.2.4 Gedit

Gedit is a simple text editor available in the VM. Just type gedit your le

& to start up the widget. Use this for keeping scripts and data.

1.3 Lab Instructions for SNR and Exposure time

In this quick exercise you will compare the SNR of the same objects in four di erent images. Display these

four UV images in four di erent frames and adjust the brightness/ contrast as needed.

 m101u10. ts (one 10 minute exposure)

 m101u15. ts (one 15 minute exposure)

 m101ucombmed. ts (median of four 15 minute exposures -15 total minutes)

 m101ucombadd. ts (sum of four 15 minute exposures { 60 total minutes)

The median exposure takes the median value of each pixel from all four images where as the added exposure

is simply the addition of values in each pixel leading to a larger count per pixel.

Type imexamine at pyraf prompt. Go to the m101u10 image. Pick out a star - nd one isn't saturated

(saturated stars appear as blobs with spikes coming from the center). Hover the cursor over a star and type

'a' (without quotes). You will get the following two-line output (boldfaced values are the important ones):

COL (pixel column) LINE (pixel row) COORDINATES (a repeat of COL and LINE) R (aperture radius

derived from 3 times the FWHM) MAG (apparent magnitude) FLUX (total number of source photons)

SKY (median sky photons per pixel). The middle 3 terms are not important and the last 3 are derived

values of the FWHM of the star.

Record R, FLUX, SKY and exposure time. Note that the term FLUX here is misleading. These are actually

just photon counts collected over a period of time. But this is okay because you will use this value as 'Source'

in equation (1). SKY is the median value per pixel. Therefore Sky is equal to SKY times the aperture area.

3

Do this entire process again for a very faint star-like object that you can nd on the image. If the star

is too faint the t won't converge and you will get an INDEF for your FLUX and R will be larger than it

should be. Then just pick another star. Calculate the SNR. For the bright star this should be 100-5000. For

the faint star, aim for a value less than 30. Now do this same process using the same stars in the other three

images.Present your data in a table and answer the following questions:

1. By what factor is the SNR greater for the 15 min exposure to the 10 min exposure? If source and

sky photons increase linearly with exposure time, is this what you expect? What about the added

exposure vs the 15 min exposure? Did the SNR improve according to what you expect?

2. Compare the median SNR to the 15 minute exposure SNR. Is there an advantage median has over the

15 minute exposure for either star?

3. Aside from possible time constraints, why would it better to add several shorter exposures together

than take one long exposure? Think about how faint and bright stars would appear on a long exposure

image.

4. If there is a neighboring star in this annulus, how will that e ect the FLUX measurement from the

star?

1.4 Measuring a Galaxy Diameter

Signal to noise ratio is also convenient for de ning the observable limits of a galaxy. Our eyes can't detect

the outer regions of galaxies like CCDs. In this exercise you will estimate the size of a galaxy by measuring

where the galaxy

ux decreases to a SNR = 3. You will be using Sloan Digital Sky Survey (SDSS) data

which has a higher resolution than Pine Mountain.

1.5 Lab Instructions for Measuring Galaxy Diameter

Display le ngc4636g. t and adjust the contrast until you see the galaxy. Use the key `m' in imexamine

and hover the cursor at various points in the image. The 'm' button is best for non point-like light sources.

Try using it at any part of the image to see how it works. It will bring up the following on the pyRAF

command line: SECTION (Range of x and y coordinates de ning the box used for statistics) NPIX (number

of pixels in box used for statistics), MEAN, MEDIAN, STANDARD DEVIATION, MIN AND MAX. You

will need MEAN, NPIX and SECTION. MEAN gives the average count per pixel in an NxN box (N is

either 5 or 10). Unlike the previous exercise, sky noise is not automatically subtracted. First nd the mean

sky background of an area far from the galaxy light and stars. This is the nominal sky background value.

Do this a few times around the image to be sure you found a lowest sky brightness area. Use this mean

value as your sky background value. The SNR equation you will need is slightly di erent than the previous

one given. Using the quantities in imexamine it will look like this:

SNR =

2  NPIX  (MEANgalaxy+sky ??MEANsky) p

NPIX MEANgalaxy+sky

(2)

The factor 2 corresponds to gain which pertains to the response of the CCD to photons. Solve for the

galaxy mean needed for an SNR  3 using equation (2). Starting from the center of the galaxy, work your

way out on the long axis until the value is close to your estimated galaxy mean value for SNR=3. Note, you

can nd the galaxy center by using the `r' function on imexamine. Get the cursor close to the center and

press r. Use the coordinate given on the graph title where it says `Radial pro le at . . . '. Once you nd the

approximate location of the galaxy edge, nd this distance in pixel units and convert to arcminutes (`), the

proper unit for apparent radius. There are 0.4 arcseconds (\) per pixel. Estimate distance errors based on

the size of your aperture box and if your values don't change for a small range of pixels around your initial

estimate.

Answer the following questions:

4

1. How does this value compare to the published value of 3 arc minutes?

2. Is this measurement the true extent of the galaxy? Why or why not?

2 Find Distance to a Cluster

2.1 Background

Stellar clusters are a population of stars born from the same giant molecular cloud. They are good objects for

testing stellar theories because all the stars in the cluster are the same age, have the same initial composition

and are roughly the same distance from Earth. Stars can range from 0.1 to approximately 100 times the

mass of the sun and mass determines a star's surface color, temperature, luminosity and life expectancy. For

instance, Sirius is twice as massive as the sun. It appears comparatively white with a surface temperature

4000 degrees hotter than the sun. It outputs 25 times more photons per second than the sun and has a

life expectancy of about 1 billion years, whereas the sun will live for 10 billion years total. By plotting the

temperature against the brightness of each individual star in the cluster, we can determine their age, life

expectancy, radius, mass and distance. This plot is known as a Hertzsprung Russell (HR) diagram.

The brightness of the star is the

ux just through one lter (e.g. blue, red etc). This is normally expressed

as the log base 10 of the

ux called magnitude. It is usually represented by the lter name like B, V or

more generally by the symbol m. We determine stellar temperature by measuring the ratio of blue photon


ux to green or red photon

ux. This is the color of the star which is also in units of magnitude. Brie

y,

stars that are bright and hotter (bluer) are located to the upper left of the diagram. Cooler (redder) and

dimmer stars are located on the lower right. Shown below is an HR diagram of the young open Pleiades

cluster and two old globular clusters. But how do we know that one population is old and one is young?

(a) Pleiades Open Cluster (b) Globular Cluster

Figure 3: Two HR diagrams of a young and old stellar population, respectively

2.1.1 Cluster Age

A star's lifetime is de ned by the time it takes to fuse all of it's hydrogen into helium in the core. A star in

this phase is called main sequence star. Stars that are main sequence lie in in a diagonal strip that extends

from the upper left to the bottom right of the graph. Once stars run out of fuel, they evolve to a di erent

stage eventually becoming red giants. Stars do not randomly run out of fuel. Massive stars use up their

fuel faster than smaller main sequence stars because they require more internal pressure generated in their

core to support greater overlying mass, even though they start o with more fuel than a smaller star. As a

result, the most massive star in a cluster is the rst to "die" or evolve o the main sequence and start the

red giant stage. At this point the star starts burning hydrogen in the layer above the core causing the outer

5

Figure 4: M3 HR diagram.

layers to expand and cool. Thus the star becomes brighter and redder in appearance. This can be seen most

dramatically in gure 3b and gure 4 as a sharp corner where the data shift to the right horizontally. This

corner is called the "main sequence turn o ". In gure 3a, we can see this e ect but less so. The stars

that are evolving o the main sequence are massive blue stars. They are getting brighter and still remain

relatively blue and hot. The turn o point in gure 3a is indicated by the red line and where the data

starts to curve away from the diagonal. The location of the turn o point will determine age of the cluster.

A cluster is as old as the lifetime of it's most massive and luminous main sequence star. For

the Pleiades cluster the most massive main sequence star has a color of B-V = -0.05 (see if you agree by

examining gure 3a). Based on stellar theory, a main sequence star with this color has a life expectancy of

about 100 million years. Therefore the cluster is 100 million years old. In terms of human ages, this is a

"teenage" cluster.

2.1.2 Cluster Distance

By de nition,

ux is the amount of brightness from a star that intersects with Earth. Thus it is a distance

dependent quantity and distance can be derived from the measured brightness. If we knew the intrinsic

luminosity or energy output of each star in the cluster it would be trivial to nd the distance, but obviously

we don't. Fortunately main sequence stars have one property that is independent of distance and that is

color. For example, the sun has a B-V = 0.6 and an apparent magnitude of V = -26.74. If we took the

sun and moved it 10 parsecs away, it would have a magnitude of V = 4.83 but it would still have a color

of B-V = 0.6. We can do this same exercise with any star with a known distance by comparing it's color

and magnitude to a star in the cluster with the same color. The di erence in magnitude is related to the

distance as you will see in the following section.

2.1.3 Equations

Below are equations you will need estimating cluster lifetime and distance. Explanations follow.

F =

L?

d2 (3)

m1 ?? m2 = ??2:5log10(

F1

F2

) (4)

L?  M3:5

? (5)

T? 

M?

L?

 1010years (6)

6

Figure 5: Part of globular cluster M12

Equation (3) is

ux. Here d is the distance to the object and the units are parsecs. L? is luminosity of

the star measured in units of solar luminosities L . Equation (4) is the di erence in magnitude between

two objects. You can also use this equation to measure the di erence of the same object at two di erent

distances. Note that B or V are magnitude m. Equation (5) relates the luminosity to the mass M? of the

star measured in solar masses M . Equation (6) gives the lifetime of the star.

2.2 Lab Instructions for Cluster Data

In this exercise you will measure the age and distance of globular cluster M12 ( gure 5). Color and magnitude

data have already been extracted from a ESO Very Large Telescope image using open source software called

Aperture Photometry Tool. The software looks for all point-like sources in the image and measures the

magnitudes. The operative word here is 'all'. Some of these stars don't belong to the cluster and some

cluster stars near the center are crowded and thus their values may be o . The real exercise is to t a line to

the main sequence portion of the HR diagram in order to determine the age and distance. You don't have to

use all of the cluster data either. You can select subsamples of data from a certain part of the image using

the position coordinates of sources in the data le. If you do this, I recommend plotting the coordinate data

and then deciding where you wish to select data. But DO NOT select data based on it's position in the

HR diagram. Errors are very small thus not included in the le. You will then be able to use data from

this diagram to determine the distance of the cluster. You may do this portion of the lab in any python

environment, pyRAF isn't necessary.

Load the cluster data into your python environment and plot B-V against V. Notice the axes in all HR

diagrams presented here. The smaller the magnitude value, the brighter the star. Thus the vertical axis

numbers are listed in reverse (yes confusing). Your plot should look like a much messier version of gure 3b

and 4 but with a similar underlying structure.

Fit a curve to the main sequence portion of the data using poly t(). Experiment with a linear t and a

2nd order polynomial t. You will have to slice your arrays such that you are only tting the main sequence.

2.2.1 Calculating the distance to M12

Find a star in table 1 that has a B-V value within the range of M12 B-V values (most should). Compare

the V band magnitude of this star to the V magnitude that lies along your t with the same B-V value in

your HR diagram. Using these two V magnitudes, nd the distance to the cluster using equations (3) and

(4). Hint: if main sequence stars have the same color, they have the same luminosity. Another hint: Each

magnitude in table 1 is the magnitude of each star if located 10 parsecs away. Repeat this measurement

using as many di erent stars in table 1 as you possibly can. Calculate the average and standard deviation

7

Comparison Stars

Star B-V V Luminosity

Epsilon Eridani 0.887 6.19 0.34

61 Cygni 1.139 7.5 0.15

70 Ophiuchi 0.777 5.49 0.54

hr 8832 0.983 6.46 0.26

Kappa Ceti 0.674 5.16 0.85

61 Ursae Majoris 0.69 5.53 0.61

16 Cygni A 0.64 4.29 1.55

Tau Ceti 0.72 5.69 0.45

82 G Eridani 0.71 5.34 0.74

Table 1: Star data for main sequence stars. The V band magnitudes is the brightness of each star if located

10 parsecs away. Luminosity is in units of solar luminosities L

of the calculated distances. Look up the actual distance. How much bigger or smaller is your derived value

(in percentage)?

2.2.2 Age of M12

Starting with equations (3) and (4), solve for the relative luminosity (L1=L2) between a star at the turno

point and any star in your cluster that has the same B-V value as a star in table 1 provided it has a larger

B-V value. (Be sure to use the V band magnitude for this color from your HR diagram and not table 1.) For

example, suppose that for some hypothetical cluster a a star with a color value of B-V =.64 has a magnitude

of 11 on it's HR diagram and the turno point for this cluster is at V=6. Therefore the luminosity would

be 6:0 ?? 11 = ??2:5log10(L?=0:34L ) and L? = 34L . Then using equations (5) and (6), solve for mass of

the star and lifetime. This is a very approximate method to nd age, so if you get a result within 50% of

the actual value, you did it correctly.

3 Lab Report

Your write up will consist of a small summary of each experiment, your methods (brief explanation yet com-

plete), results & analysis and discussion. Do this structure for the SNR experiments and cluster experiment

separately but submit it on one document. Make use of tables, plots and/or images to show measured values

and results where appropriate. Include equations used and steps to derive quantities as well as your HR

diagram with the t plotted over the data and and the t coecients explicitly shown. Include any answers

to questions asked in the discussion and if necessary, any explanations as to why your results might be o

and what you would try di erently if given more time. Most ( 80%) of the points will be going to the

results and analysis sections and answering questions in the discussions.

8


版权所有:编程辅导网 2021 All Rights Reserved 联系方式:QQ:99515681 微信:codinghelp 电子信箱:99515681@qq.com
免责声明:本站部分内容从网络整理而来,只供参考!如有版权问题可联系本站删除。 站长地图

python代写
微信客服:codinghelp