{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "(a) (5 points) Calculate the relative total mass of stars below 1 solar mass to stars above 1 solar mass in a Salpeter IMF versus a Kroupa et al. (1993) IMF ( a 3 power law segment IMF, see slide 13 in presentation Download slide 13 in presentationfor details), normalizing them to have the same number of stars above 1 solar mass. Use a lower cutoff mass of 0.07 solar masses and an upper cutoff mass of 100 solar masses. Remember that an IMF is a continuous function, and do this analytically. What are the implications for estimating a total stellar mass based on galaxy luminosity?\n", "\n" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "For Salpeter IMF, \n", "$$dN/dM = A M^{-2.35}$$ \n", "where we'll set the normalization $A=1$ and work in solar masses.\n", "We'll integrate from 0.07 to 100 solar masses to get total mass:\n", "$$\\int_{0.07}^{100} M dN/dM dM = \\int_{0.07}^{100} M^{-1.35} dM = {1.\\over -0.35} 100^{-0.35}-0.07^{-0.35} = 6.68$$\n", "\n", "For KTG IMF, we have \n", "$$dN/dM = A M^{-2.7}$$ for M>1, \n", "$$dN/dM = A M^{-2.2}$$ for \$0.5" ] }, "metadata": { "needs_background": "light" }, "output_type": "display_data" } ], "source": [ "import numpy as np\n", "%matplotlib inline\n", "import matplotlib.pyplot as plt\n", "\n", "def salpeter(m, slope=-2.35) :\n", " \"\"\" Salpeter IMF, single power law\n", " \"\"\"\n", " return m**slope\n", "\n", "def ktg(m) :\n", " \"\"\" KTG IMF, 3-segment power law\n", " \"\"\"\n", " # for efficiency, initialize output array and fill 3 sections separately\n", " imf = np.zeros(np.shape(m))\n", " j=np.where(m>1)[0]\n", " imf[j] = m[j]**-2.7\n", " j=np.where((m>0.5)&(m<=1))[0]\n", " imf[j] = m[j]**-2.2\n", " j=np.where(m<=0.5)[0]\n", " imf[j] = 0.5**(-2.2+1.3)*m[j]**-1.3\n", " return imf\n", " \n", "mass=np.arange(0.07,100,0.01)\n", "plt.plot(mass,salpeter(mass),label='Salpeter')\n", "plt.plot(mass,ktg(mass),label='KTG')\n", "plt.legend()\n", "plt.loglog()\n", "plt.xlabel('Mass')\n", "plt.ylabel('dN/dM')" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "The question actually suggested normalizing the IMFs to be equal number of stars above 1 solar mass. This doesn't really make for an obvious meaningful comparison, where what we're really be interested in is having the same total light from the two IMFs, but that would require applying an age and having to have luminosity as a function of mass. So, just going with what was asked, calculate the nummber of stars above 1 solar mass:" ] }, { "cell_type": "code", "execution_count": 64, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "0.7392627686555786 0.5880011134290861 1.2572472258502532\n" ] } ], "source": [ "nsalpeter = (100**-1.35 - 1**-1.35) / -1.35\n", "nktg = (100**-1.7 - 1**-1.7 ) / -1.7\n", "print(nsalpeter,nktg,nsalpeter/nktg)" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "This says we'd have to scale the KTG up by about 25 percent to match the total number of stars above 1 solar mass." ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "Question asked about fraction of mass below and above 1 solar mass for the two IMFs. This is actually independent of the normalization! But, again, it's not really an especially meaningful quantity, I'm afraid.\n" ] }, { "cell_type": "code", "execution_count": 17, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "6.676747846301279 0.6574577979194078\n" ] } ], "source": [ "msalpeter = (100**-0.35 - .07**-0.35) / -0.35\n", "msalpeterlow = (1**-0.35 - .07**-0.35) / -0.35\n", "print(msalpeter, msalpeterlow/msalpeter)" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "Salpeter IMF has 66% of mass below 1 solar mass" ] }, { "cell_type": "code", "execution_count": 67, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "3.3418095474777094 0.5895340664549453\n" ] } ], "source": [ "mktg = 0.5**(-2.2+1.3)* (0.5**0.7 - 0.07**0.7) / 0.7 +\\\n", " (1**-0.2 - 0.5**-0.2) / -0.2 +\\\n", " (100**-0.7 - 1**-0.7) / -0.7\n", "mktglow = 0.5**(-2.2+1.3)* (0.5**0.7 - 0.07**0.7) / 0.7 +\\\n", " (1**-0.2 - 0.5**-0.2) / -0.2 \n", "print(mktg, mktglow/mktg)\n" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "KTG IMG has 59% of mass below 1 solar mass.\n", "\n", "Compare the two:" ] }, { "cell_type": "code", "execution_count": 21, "metadata": {}, "outputs": [ { "data": { "text/plain": [ "1.1154499151103567" ] }, "execution_count": 21, "metadata": {}, "output_type": "execute_result" } ], "source": [ ".657/.589" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "Only 11% more mass in Salpeter!! Not the standard result.\n", "\n", "Total mass is quite different, however:\n" ] }, { "cell_type": "code", "execution_count": 23, "metadata": {}, "outputs": [ { "data": { "text/plain": [ "2.242161434702641" ] }, "execution_count": 23, "metadata": {}, "output_type": "execute_result" } ], "source": [ "6.67/(3.34*nsalpeter/nktg)" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "Really, the physical point that I was trying to make is that, for the same luminosity, there is significantly more mass in the Salpeter IMF, i.e. the M/L ratio is higher. But's it's hard to demonstrate that without bringing in luminosities! But that's the next problem....\n" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "