Python for Astronomers and Particle Physicists

Europe/Madrid
L3-01 (Institute of Space Sciences)

L3-01

Institute of Space Sciences

Institute of Space Sciences <br/> Campus UAB - Bellaterra <br/> Spain
Francesc Torradeflot (PIC), Jorge Carretero, Kai Brügge, Maximilian Nöthe, Pau Tallada, Santiago Serrano (IEEC-CSIC), Scott Griffiths (IFAE), Tarek Hassan (IFAE)
Description

Workshop Overview


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.

Organisation


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. 

Workshop preliminaries


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:

  • numpy
  • scipy
  • matplotlib
  • seaborn
  • astropy
  • astroquery
  • photutils
  • astroplan
  • pandas
  • sqlalchemy
  • fitsio
  • bz2file
  • pyspark
  • healpy
  • pycodestyle
  • scikit-learn
  • pytest

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.   

 

Troubleshouting

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

 

The Python Notebooks

In this github repository you can find the notebooks for the sessions of this course:

https://github.com/Python4AstronomersAndParticlePhysicists/PythonWorkshop-ICE 

You can clone the repository with git or simply download it as a ZIP file.

 

    • 09:30 10:00
      Welcome and Setup L3-01

      L3-01

      Institute of Space Sciences

      Institute of Space Sciences <br/> Campus UAB - Bellaterra <br/> Spain

      Workshop welcome, presentation of teachers, setup everyone's computers.

      Conveners: Mr Santiago Serrano (IEEC-CSIC), Dr Tarek Hassan (IFAE)
    • 10:00 11:00
      The language: Python 3.6, IDE & Notebooks (Beginner) L3-01

      L3-01

      Institute of Space Sciences

      Institute of Space Sciences <br/> Campus UAB - Bellaterra <br/> Spain

      This session will briefly review the basics of the python programming, python environments, a very useful IDE (PyCharm) and the very trendy Jupyter Notebooks, that will be used through the rest of the workshop.

      Conveners: Mr Santiago Serrano (IEEC-CSIC), Dr Tarek Hassan (IFAE)
    • 11:00 11:15
      Quick coffee 15m L3-01

      L3-01

      Institute of Space Sciences

      Institute of Space Sciences <br/> Campus UAB - Bellaterra <br/> Spain
    • 11:15 13:00
      Good programming: Types, Classes, PEP8 & Git (Beginner) L3-01

      L3-01

      Institute of Space Sciences

      Institute of Space Sciences <br/> Campus UAB - Bellaterra <br/> Spain
      Conveners: Mr Francesc Torradeflot (PIC), Dr Scott Griffiths (IFAE)
    • 13:00 14:30
      Lunch 1h 30m
    • 14:30 16:00
      Arrays: Numpy (Intermediate) L3-01

      L3-01

      Institute of Space Sciences

      Institute of Space Sciences <br/> Campus UAB - Bellaterra <br/> Spain
      Convener: Dr Maximilian Nöthe (Technische Universität Dortmund)
    • 16:00 16:30
      Coffee 30m L3-01

      L3-01

      Institute of Space Sciences

      Institute of Space Sciences <br/> Campus UAB - Bellaterra <br/> Spain
    • 16:30 18:00
      Plotting: Matplotlib (Intermediate) L3-01

      L3-01

      Institute of Space Sciences

      Institute of Space Sciences <br/> Campus UAB - Bellaterra <br/> Spain
    • 09:30 11:00
      Table Handling: Pandas (Intemediate) L3-01

      L3-01

      Institute of Space Sciences

      Institute of Space Sciences <br/> Campus UAB - Bellaterra <br/> Spain
    • 11:00 11:30
      Coffee and cookies 30m L3-01

      L3-01

      Institute of Space Sciences

      Institute of Space Sciences <br/> Campus UAB - Bellaterra <br/> Spain
    • 11:30 13:00
      Modelling and fitting: scipy (Intermediate) L3-01

      L3-01

      Institute of Space Sciences

      Institute of Space Sciences <br/> Campus UAB - Bellaterra <br/> Spain
    • 13:00 14:30
      Lunch 1h 30m
    • 14:30 16:00
      Machine Learning I: Classification (Advanced) L3-01

      L3-01

      Institute of Space Sciences

      Institute of Space Sciences <br/> Campus UAB - Bellaterra <br/> Spain
    • 16:00 16:30
      Coffee & doubts 30m L3-01

      L3-01

      Institute of Space Sciences

      Institute of Space Sciences <br/> Campus UAB - Bellaterra <br/> Spain
    • 16:30 18:00
      Machine Learning II: Regression (Advanced) L3-01

      L3-01

      Institute of Space Sciences

      Institute of Space Sciences <br/> Campus UAB - Bellaterra <br/> Spain
    • 09:30 11:00
      Astronomy I: Astropy (Advanced) L3-01

      L3-01

      Institute of Space Sciences

      Institute of Space Sciences <br/> Campus UAB - Bellaterra <br/> Spain
      Convener: Mr Santiago Serrano (IEEC-CSIC)
    • 11:00 11:30
      Coffee and galletas 30m L3-01

      L3-01

      Institute of Space Sciences

      Institute of Space Sciences <br/> Campus UAB - Bellaterra <br/> Spain
    • 11:30 13:00
      Astronomy II: PhotUtils, Pyephem (advanced) L3-01

      L3-01

      Institute of Space Sciences

      Institute of Space Sciences <br/> Campus UAB - Bellaterra <br/> Spain
    • 13:00 14:30
      Lunch 1h 30m
    • 14:30 16:00
      Databases: Data modeling & SQL (Advanced) L3-01

      L3-01

      Institute of Space Sciences

      Institute of Space Sciences <br/> Campus UAB - Bellaterra <br/> Spain
    • 16:00 16:30
      Coffee 30m L3-01

      L3-01

      Institute of Space Sciences

      Institute of Space Sciences <br/> Campus UAB - Bellaterra <br/> Spain
    • 16:30 18:00
      Big Data: Hadoop, Spark (Advanced +) L3-01

      L3-01

      Institute of Space Sciences

      Institute of Space Sciences <br/> Campus UAB - Bellaterra <br/> Spain
    • 18:00 18:30
      Wine and cheese closure 30m L3-01

      L3-01

      Institute of Space Sciences

      Institute of Space Sciences <br/> Campus UAB - Bellaterra <br/> Spain
Your browser is out of date!

Update your browser to view this website correctly. Update my browser now

×