This workshop is designed to introduce IFAE and ICE astronomers and particle physicists to modern programming practices in Python specifically applicable to their scientific research. The course is intended to be hands-on so that participants will be able to follow, discuss and reuse the examples explained during each lesson. Sessions will cover from the most basic programming practices to intermediate-advanced tools specific for scientists.
Scientists from IFAE, ICE and PIC will be presenting the course lessons. In order to enable a confortable work space, the number of participants is limited to 50.
Even the workshop will begin with some beginner lessons, it is recommended to know the basics before starting the workshop. For those who have not programmed in python before, we encourage to take this online python course: http://sthurlow.com/python/
We encourage everyone to come with his laptop and run all the examples that each session will be presenting (even this is not mandatory).
After the first 30 minutes of preparation, teachers will not be able to assist you in your python setup as sessions will need to get started.
So before arriving to the workshop make sure you have a python 3.6 installed with:
To have this python setup we recommend using Anaconda distribution, following these 3 steps:
1. Install Python 3.6
1.1 Download anaconda distribution for Python 3.6 here https://www.anaconda.com/download/
1.2 Follow the installation instructions - both GUI or terminal versions work fine. If prompted, select the option to add the new anaconda directory to your path.
2. Set an environment for the workshop
2.1 Create a new environment named py36 executing in a terminal:
> conda create -n py36 python=3.6 anaconda
2.2 Activate the environment executing in a terminal:
> source activate py36
3. Install additional packages to the environment
3.1 Install with conda installer:
> conda install -c astropy astroquery photutils astroplan
3.2 Install with pip installer:
> pip install fitsio pyspark healpy pycodestyle scikit-learn
Please contact us in case of installation problems, before the workshop starts.
These are some problems that some of you have found (and its solutions!):
Issue 1. Already installed anaconda error during installation.
Solution: specify different destination during installation (recommended with command line installer)
Issue 2. Python command does not run anaconda 3.6 version by default
Solution: Make sure you have the anaconda directory in your path (echo $PATH). Make sure you don't have aliases to python.
Issue 3. TCSH use different command to activate environment
Solution: Go to > bash
Issue 4. Healpy error: Conflicting with previous healpix versions installed or issue with openmp compilation.
Solution: Use alternative conda installation:
conda config --add channels conda-forge conda install healpy
In this github repository you can find the notebooks for the sessions of this course:
You can clone the repository with git or simply download it as a ZIP file.