[SOLVED] ASTR400B Lab 2

30.00 $

Programming resource
Digital learning resource
Category:
Practical programming resource
Suitable for guided study and reference
Tutor guidance available when needed

Description

Rate this product

 

1 First Step

Make sure to have a cloned copy of your own repository on your computer (or nimoy if you

are using nimoy for Jupyter). Create a directory Labs/Lab2.

From the command line git clone the class repository. If you have already done this, git

pull to update the repository. There is a directory Labs/Lab2/ with a fifile Lab2.ipynb, which

is the template for this exercise.

Copy this template to your own repository directory Labs/Lab2

2 Schechter Function

The galaxy luminosity function in the nearby universe is well described by a Schechter

Function:

Φ(M)dM = (0.4 ln10) φ100.4(MM)(α+1)e100.4(M∗−M)

dM

(1)

With the following parameters from Smith+2009 for Field Galaxies in SDSS at z0.1 in

the Kband:

  1. φ=1.66 ×102 h3 Mpc3
  2. α = -0.81
  3. M= M

k

= -23.19 – 5log(h)

h = the Hubble constant in units of 100 km/s/Mpc . At z=0 this is 0.7. But we are

going to ignore it here. Units will then be in ”comoving” coordinates.

2.1 Question 1

Utilizing the defifined function in the template fifile, plot the Schechter Function using the

above parameter values over a magnitude range of -17 to -26. Try to reproduce the black

solid line in Figure 2.1, from Smith+2009

Plotting tips:

  1. import matplotlib.pyplot as plt – this lets you use plotting functions.
  2. np.arange(0,10,0.1) will return an array from 0 to 10 spaced in intervals of 0.1
  3. plt.semilogy lets you plot the y axis as log.

1Figure 1: Luminosity Function from Smith+2009, UKIDSS + SDSS KBand

2.2 Question 2

Galaxies in the Virgo Cluster have difffferent parameters, like α=-1.35 (Ferrarese+2016 ApJ

824) Overplot the Schechter Function with this new value of α. Try a smaller value of

α = 0.6. How does the function change? What does this mean?

2.3 Question 3

Build a function to compute the Schechter Function in terms of luminosity.

Use ‘quad‘ to determine the fraction of the luminosity that lies above L* in the following

three cases: α=-0.7 (default), α=-0.6, α=1.85.

Schechter Function:

Φ(L) =

n

L

LL

α

eL/L

(2)

n= 0.008 h3 Mpc3

L? = 1.4 × 1010L

3 The IMF

Create a function called Salpeter that defifines the Salpeter IMF:

ξ(M) = ξ0(M/M )α

(3)

α = 2.35 The function should take as input an array of stellar masses, M. You will need to

determine the normalization, ξ0, by integrating this equation over mass from 0.1 to 120 M

2and setting the value to 1. The function should then return ξ(M), which will now represent

the fractional number of stars.

  • from scipy.integrate import quad
  • quad(lambda x: fxn(x),xmin,xmax)
  • quad returns an array with 2 values. you want the fifirst value.

3.1 Question 1

Integrate your normalized function to compute the fraction of stars with stellar masses

greater than the sun and less than 120 M . ** Double Check: if you integrate your function

from 0.1 to 120 you should return 1.0

3.2 Question 2

How might you modify the above to return the fraction of mass in stars more massive than

the Sun?

4 Last Step

Git push your Lab1.ipynb fifile to your repo. Recall steps:

  1. git add fifilename
  2. git commit -m ”COMMENTS”
  3. git push

3

Resource details

Understand the Task Before You Use the Resource

Review the requirements, identify the programming concepts involved, study the implementation and test your understanding with your own examples and modifications.