Workshop series on data analysis and machine learning for astrophysics
https://retrosci-fi.tumblr.com/Make sure you understand this first
- Python, first steps on understanding Object-Oriented Programming
- Python data structures: list, tuple, dict
- Numpy: killing the for-loop
- Detecting things (some classical stats fundaments and the question of SNR)
- Dealing with uncertainties (Gvar, PyNeb and some Monte-Carlo)
- Detecting stars (Numpy, Astropy, Astroquery, Pandas)
-
From classical fit to MCMC fit
- Classical modeling: least-square basics (best fit and classic uncertainty estimation)
- LSMC: exploring the parameter space with Monte-Carlo
- Bayesian optimization and the Markov-Chain (chaining drunks)
-
Example: MCMC from scratch
- code parallelization (writing multiple papers at the same time)
-
Next steps on the Bayesian side of the force : Okham's razor, systematic errors and the power of priors.
-
examples:
- Non-linear model fitting
- M1, how to deconvolve multiple emission lines along the line-of-sight ?
- Recover orbital parameters from a luminosity curve
-
Detect patterns with convolution
-
Pump up your Python (with Cython)
-
Classification and modeling
- PCA: how to start drawing curved lines
- Walk through random forests and let the machines show you what you fail to see
- Hierarchical clustering
-
examples:
- Find a thousand planetary nebulae in a 3 billion voxels haystack
- Redefine the regions of the BPT diagram
Make intelligence emerge from sand and practice ethical slavery
- Creating a brain from scratch
- Become a god and simulate life
- The easy path to the simulation of a galaxy with autoencoders (but you might learn nothing useful from a physicist point-of-view)
installation instructions with Anaconda (should work on Linux, Mac OSX, Windows)
If you already have Anaconda installed go to step 2
instructions are here: Miniconda — Conda
- place the downloaded file on your home directory
- install it (use the real file name instead of
Miniconda*.sh)
bash Miniconda*.shconda install conda-buildcreate an environment and install needed modules manually
conda create -n learn python=3.7
conda install -n learn numpy scipy bottleneck matplotlib astropy cython h5py pytables pandas
conda install -n learn -c conda-forge pyregion
conda install -n learn -c astropy photutils astroqueryif your shell is bash, which is now generally the case for OSX and most linux distributions please do
conda init bash
If you have a different shell replace bash with the name of your shell.
Now if you have Scisoft installed (which does not goes well with Anaconda/Python... but still you may want to have it)
then please add export PYTHONPATH='' at the end of your profile file where some environment variables are defined (e.g. .bashrc, .profile, .bash_profile).
You may then activate your environment with
conda activate learn
now your prompt should be something like (learn). If conda activate learn does not work. Please do the following conda init bash (if bash is your shell
note: you may now have to install gcc on Mac OSX or linux if you want to be able to execute the following with no error (see https://discussions.apple.com/thread/8336714). To check that you have gcc installed type gcc --help in a terminal. You should see the usage informations displayed.
e.g. to install gcc under ubuntu (or debian based distributions):
sudo apt update
sudo apt install build-essentialThen you can install the last python modules with pip (because those modules are not available via anaconda)
pip install gvar --no-deps
pip install lsqfit --no-deps
pip install pyneb --no-deps
pip install anytree --no-depsconda install -n learn -c conda-forge jupyterlabRun it
conda activate learn # you don't need to do it if you are already in the orb environment
jupyter labYou should now have your web browser opened and showing the jupyter lab interface !
