{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "# IPython Notebook for turning in solutions to the problems in the Essentials of Paleomagnetism Textbook by L. Tauxe" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Problems in Chapter 1" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "### Problem 1: " ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "Given that:\n", "\n", "$$\n", "\\nabla V_m = - \\bigl(\n", "{ {\\partial}\\over {\\partial r} }\n", "{ {m \\cos \\theta} \\over {4 \\pi r^2}} + \n", "{ {1\\over r} }\n", "{ {\\partial}\\over {\\partial \\theta} }\n", " { { m\\cos \\theta}\\over { 4 \\pi r^2} }\n", " \\bigr)\n", "$$\n", "\n", "it follows that:\n", "\n", "Complete this text using LaTeX formatting. see the above example. Notice how stand alone equations look like this: \n", "$$\n", "\\hbox{Type your equation here}\n", "$$\n", "and inline math looks like this: $\\alpha,\\beta,\\gamma$\n" ] }, { "cell_type": "code", "execution_count": 3, "metadata": { "collapsed": false }, "outputs": [], "source": [ "# code to calculate H_r and H_theta\n", "import numpy as np\n", "deg2rad=np.pi/180. # converts degrees to radians\n", "# write code here to calculate H_r and H_theta and convert to B_r, B_theta\n", "\n", "\n", "# This is how you print out nice formatted numbers\n", "# floating point variables have the syntax: \n", "# '%X.Yf'%(FP_variable) where X is the number of digits and Y is the \n", "# number of didgets after the decimal. \n", "# uncomment this line to print\n", "#print 'H_r= ','%7.1f'%(H_r), 'H_theta= ', '%7.1f'%(H_theta)\n", "# to format integers: use the syntax:\n", "# '%i'%(INT_variable)\n", "#print 'B_r = ','%i'%(B_r*1e6), 'uT' # B_r in microtesla\n", "#print 'B_theta =','%i'%(B_theta*1e6),'uT' # B_theta in microtesla" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Problem 2a:" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "Some text to describe what you are doing. (Edit this!)" ] }, { "cell_type": "code", "execution_count": 4, "metadata": { "collapsed": false }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "42.0\n" ] } ], "source": [ "# write a function here with the form\n", "def myfunc(B_in): # edit this line for your own input variables!\n", " # do some math here to define OUTPUT_VARIABLES\n", " B_out=B_in*1.\n", " return B_out\n", "B=42 # define your input variables here\n", "print myfunc(B)" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Problem 2b: " ] }, { "cell_type": "code", "execution_count": 8, "metadata": { "collapsed": false }, "outputs": [], "source": [ "# take your program from 2a and modify it to respond to some input flag\n", "# e.g.:\n", "def myfunc(B_in,units):\n", " if units=='cgs':\n", " # do cgs conversion..... \n", " pass\n", " elif units=='SI':\n", " # do SI conversion\n", " pass" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Problem 3a:" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "a) This problem boils down to finding the value for ${\\bf m}$ in Equation 1.8 in Chapter 1 that would give rise to a radial field of 10$\\mu$T at a depth of 2890 km (radius of the Earth minus radius of the dipole source). \n", "\n", "Write text here about how you solve the problem.... " ] }, { "cell_type": "code", "execution_count": 6, "metadata": { "collapsed": false }, "outputs": [], "source": [ "# Write code here to calculate the moment, m and print it in ZAm^2\n" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Problem 3b" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "b) To compare 10 $\\mu$T with the field produced by an axial dipole of 80 ZAm$^2$, we need the second part of Equation 1.8 in the text:\n", "\n", "Type your answer here with nice LaTeX formatting. " ] }, { "cell_type": "code", "execution_count": 7, "metadata": { "collapsed": false }, "outputs": [], "source": [ "# Write some code here that calculates H_r, H_theta, the total field\n", "# in H and converted to microtesla. Use nicely formated print statements \n", "# display your results. " ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Problem 4:" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "\n", "Write your answer in this markdown cell. Follow the latex examples provided for Problem 1. Also you can look stuff up online for latex math.\n", "\n" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": false }, "outputs": [], "source": [] } ], "metadata": { "kernelspec": { "display_name": "Python 2", "language": "python", "name": "python2" }, "language_info": { "codemirror_mode": { "name": "ipython", "version": 2 }, "file_extension": ".py", "mimetype": "text/x-python", "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython2", "version": "2.7.10" } }, "nbformat": 4, "nbformat_minor": 0 }