4. Python Preparation Course#
Here, I will put materials you can study and soem external references for studying python rather than much of other explations. You must install python first (e.g., Anaconda). See the note Softwares to install python, and then Prepare Python to set up the environments.
4.1. Tutorials#
You will learn
pathlib
and other simple python grammars throughout the first few homework assignments.numpy tutorial: Basic numpy to a bit advanced masking.
pandas tutorial: Basic pandas, including iteration and grouping.
astropy fits tutorial: Basic FITS I/O and explanations about FITS, header, extensions.
4.2. HW Assignments#
4.3. References#
4.3.1. References - Python in Astronomy#
Matt Craig’s ccd as book
HIGHLY RECOMMENDED!
Explains details about the astronomical images, with worked examples. If you’re not familiar with astronomical data reduction, this is a good reference to start with.
Matt Craig’s reducer
A simple Jupyter Notebook to reduce data, which the author used for his classes.
If you want, you may get ideas from this and use them in your own code.
Lecture note for Técnicas Experimentales en Astrofísica
Unfortunately, this is now inaccessible (retrieved 2022-04-05)..
I was recommended by one of my friends at MPI, and this looks very well-structured for beginners. It can be a good complement to this lecture note.
-
I personally think the web is too laggy, but some tutorials seem informative, e.g., UVES spectrum analysis.
The latest or stable official websites for each package, e.g., astropy, photutils and ccdproc themselves, are good references.
4.3.2. General Python#
Book Think Python
HIGHLY RECOMMENDED!
Prof. Jinsoo Park(박진수)’s lecture notes
Ivezić et al.’s book (Amazon)
The first author is the creator of AstroML available on GitHub.
Recommended if you want to use Python in astronomical research.
-
Only the chapter 1 is enough maybe for this course.
Jake’s Python Data Science Handbook
This contains too much information for beginners… Maybe you can take a look at
matplotlib
part, etc, for fun.
Other free books/lectures/materials are everywhere (e.g., google “python free”)
Or summarized at some places (example)
Python visualization: pyviz.org, datavizpyr (python and R)
List of python-based Monte Carlo packages: https://gabriel-p.github.io/pythonMCMC/
The materials below are from the SPLIT Program of SNU (retrieved 2019 Sep)
4.3.3. Jupyter Notebook / Jupyter Lab#
What is Jupyter? See Wikipedia
Notebook Basics by MS Azure
awesome jupyter: A