#!/usr/bin/env python # coding: utf-8 # # Practice Problems # ### Lecture 19 # Answer each number in a separate cell # # Rename the notebook with your lastName, first inital and the lecture # # ex. Cych_B_19 # # Turn this notebook into Canvas # ## 1. Meshgrid and contour # - Write a lambda function for the equation # $$ c=f(a,b)=(1-a^2+b^3) e^{-(a^2+b^2)/2}$$. # - Create two arrays- a and b- that range from -3 to 3 in increments of 0.1. # - Make a meshgrid from a and b. # - Evaluate c for the meshgrid # - Make a contour plot of a,b and c. # ## 2. Mkigrf and maps # - Lisa moved to San Diego in 1983. Use the functions in the **mkigrf** module to do the following: # - Calculate the inclination, declination, and strength of the field that year. # - Create a map of the strength of the field in 1983 # - include coastlines # - a title # - a color bar # - Make a plot of declination in San Diego (33,-117) over the last 100 years. # In[ ]: