{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "# Preparations: Working with pycraf" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## License\n", "\n", "```\n", "Preparations: Working with pycraf.\n", "Copyright (C) 2012+ Axel Jessner (jessner@mpifr.de)\n", " 2015+ Benjamin Winkel (bwinkel@mpifr.de)\n", "\n", "This program is free software; you can redistribute it and/or\n", "modify it under the terms of the GNU General Public License\n", "as published by the Free Software Foundation; either version 2\n", "of the License, or (at your option) any later version.\n", "\n", "This program is distributed in the hope that it will be useful,\n", "but WITHOUT ANY WARRANTY; without even the implied warranty of\n", "MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n", "GNU General Public License for more details.\n", "\n", "You should have received a copy of the GNU General Public License\n", "along with this program; if not, write to the Free Software\n", "Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.\n", "```" ] }, { "cell_type": "markdown", "metadata": { "collapsed": true }, "source": [ "## Exercises\n", "\n", "- Find the (online) versions of the pycraf:\n", " - Github repository,\n", " - page on the distribution server (PyPI),\n", " - manual\n", " - tutorial notebooks" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "- Look at the satellite-tutorial notebook. It's not correctly rendered on GitHub. Use the nbviewer service to make the movies work." ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "- Look at the implementation details of the `pycraf.conversions.free_space_loss` function, either by browsing the Github repository or using the appropriate link in the manual. As you can see, a decorator (`@pycraf.utils.ranged_quantity_input` is used). Can you find out, what it does?" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "- Pycraf uses the docstring format that is also used by astropy. Have a look at the API reference of any function in the manual (where it is rendered) and in the source code. Write a simple Python function with two arguments and one return value, which uses the same docstring format. Which possibilities does one have in `ipython` and the `Jupyter` notebooks to read the documentation without using a web browser?" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "- Have a quick glance over any of the module descriptions in the manual (e.g., `pycraf.conversions` or `pycraf.protection`). What kind of information can be found on these pages." ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "- Another source of information is the tutorial notebooks on the Github repository. Open some of them and try to find out what makes them different from the examples in the manual." ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "- How many issues (aka bug reports/feature requests/questions) are currently open/closed on the pycraf and astropy Github repositories? By reading a few of them, what do you think is important for a helpful bug report? Should you use the bug-report feature excessively? Is it preferrable to write emails to the developers?" ] } ], "metadata": { "anaconda-cloud": {}, "kernelspec": { "display_name": "Python [Root]", "language": "python", "name": "Python [Root]" }, "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.5.2" } }, "nbformat": 4, "nbformat_minor": 0 }