{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ " **Chapter 1: [Introduction](../Introduction/CH1_00-Introduction.ipynb)** \n", "\n", "\n", "
\n", "\n", "# Homework 1\n", "\n", " Test Python Environment\n", "\n", "[Download](https://raw.githubusercontent.com/gduscher/MSE672-Introduction-to-TEM//main/Homework/Homework01.ipynb)\n", "\n", "[![OpenInColab](https://colab.research.google.com/assets/colab-badge.svg)](\n", " https://colab.research.google.com/github/gduscher/MSE672-Introduction-to-TEM/blob/main/Homework/Homework01.ipynb)\n", " \n", " \n", "part of \n", "\n", " **[MSE672: Introduction to Transmission Electron Microscopy](../_MSE672_Intro_TEM.ipynb)**\n", "\n", "by Gerd Duscher, Spring 2024\n", "
\n", "Microscopy Facilities
\n", "Institute of Advanced Materials & Manufacturing
\n", "Materials Science & Engineering
\n", "The University of Tennessee, Knoxville\n", "\n", "Background and methods to analysis and quantification of data acquired with transmission electron microscopes.\n" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Load Packages\n", "\n", "First we need to load the libraries we want to use. \n", "Here we use:\n", "- numpy: numerical library\n", "- matplotlib: graphic library\n", "\n", "Both of these packages are provided by annaconda and are already installed in Google Colab." ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "import numpy as np\n", "import matplotlib.pylab as plt" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "Now we run the next code cell to plot a graph." ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "# Generate plotting values\n", "t = np.linspace(0, 2*np.pi, 200)\n", "x = 16 * np.sin(t)**3\n", "y = 13 * np.cos(t) - 5 * np.cos(2*t) - 2 * np.cos(3*t) - np.cos(4*t)\n", "\n", "plt.figure()\n", "plt.plot(x,y, color='red', linewidth=2)\n", "plt.text(-23, 0, 'I', ha='center', va='center', fontsize=206)\n", "\n", "plt.text(20,0, 'MSE 672',va='center', fontsize=206)\n", "plt.gca().set_aspect('equal')" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "Who would have thought that the formula of love is based on trigonometry?" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "Try to run this in colab and you rown computer." ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [] } ], "metadata": { "kernelspec": { "display_name": "Python 3 (ipykernel)", "language": "python", "name": "python3" }, "language_info": { "codemirror_mode": { "name": "ipython", "version": 3 }, "file_extension": ".py", "mimetype": "text/x-python", "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", "version": "3.11.7" }, "toc": { "base_numbering": 1, "nav_menu": {}, "number_sections": true, "sideBar": true, "skip_h1_title": false, "title_cell": "Table of Contents", "title_sidebar": "Contents", "toc_cell": false, "toc_position": {}, "toc_section_display": true, "toc_window_display": false }, "vscode": { "interpreter": { "hash": "d3105775deb9e68bf81490a789229048724f10d5265dd295cc854492d5686166" } } }, "nbformat": 4, "nbformat_minor": 4 }