Predicting Sunspots and Solar Flares with a tinge of Python

Prateek Chanda (~prateekiiest)




The Problem

The Sun releases huge amount of magnetic energy in the form of X-rays, EUV (Extreme ultraviolet) and high energy particles. This kind of radiation bursts can cause damage to space and ground based technological infrastructure. Hence monitoring such solar activity is crucial.

Research Work

There has been considerable research in the field of solar activity monitoring as done by NASA Space Stations. Primary research includes locating sunspot regions or potential regions of high solar density along with detecting solar flares from the solar data.

Solar Physics in Python

In the field of solar physics, IDL is regarded as the primary programming language for solar data analysis purpose. But due to its less popularity and complexity there has been transition to using a much simpler yet robust language Python. The SunPy Project is such a community developed open source project for solar data analysis purpose based in Python.

So how using python we can benefit the astrophysics and helio-physics community to query solar data and analyze them much more efficiently and produce much more insightful results ?

In this talk we will be discussing how we can analyze sunspots and solar flares through image-processing tools using a python package called sunpy.

A small example

Locating Solar Spikes in the solar Map

Original observed AIA image enter image description here

After locating such regions enter image description here



  • Knowledge of Python (Beginner/ Intermediate)
  • Little bit knowledge about the sunpy package (not mandatory)
  • Python modules like scipy and matplotlib since there is heavy use of this two modules.
  • A lot of excitement and passion for open science

Content URLs:

Speaker Info:

Prateek has been an open source enthusiast for the past 2 years with a deep love in the field of astronomy and helio-physics. He is currently an undergraduate in computer science also a GitHub Campus Expert working directly with GitHub Education to build open source communities and support them on campus.

He is a core contributor to the SunPy project for around more than a year which is lead by researchers from different universities along with scientists at the NASA Goddard Space Flight Center.

Speaker Links:

Section: Data science
Type: Talks
Target Audience: Intermediate
Last Updated:

For any confusion, or if you would like to know more about the idea. You can contact me at

Happy Pythoning !!

Prateek Chanda (~prateekiiest)


Can you change the tag of the talk to Data Science? The talk doesn't fit in the context of Core Python.

Sourav Singh (~sourav)

ok, sure

Prateek Chanda (~prateekiiest)

Pretty Interesting!

Anand B Pillai (~pythonhacker)

Login to add a new comment.