Skip to content

GSoC 2015 Ideas Page

Nabil Freij edited this page Feb 22, 2024 · 4 revisions

Improvements to the SunPy Database

Suggested Mentor(s): Stuart Mumford, Steven Christe

Difficulty: Beginner

Astronomy knowledge needed: None

Programming skills: Python, some database knowledge would be helpful, but not required.

Description

The database module provides functionality to users to manage collections of files on disk in a way not reliant upon folder structure and file name. The database allows users to find files on disk by either physical parameters, such as wavelength and time or properties of the instrument such as name and spacecraft. It also allows more complex queries by enabling searches of the raw meta data associated with the files.

The improvements to the database functionality that would be implemented by this project include:

  1. Integration of the new UnifiedDownloader code into the database search, to replace the direct VSO integration current present. (The VSO is a repository of solar physics data, SunPy's VSO API has been wrapped by UnifiedDownloader.)
  2. Support for relative paths in the database module #783 to allow a centralised database with multiple users, all referencing a central file store mounted with different absolute paths on each client.
  3. Supporting all data supported by the sunpy.lightcurve module in the database. The major hurdle here is the lack of standardisation in the file used by this data.

There are various other maintenance tasks which need undertaking (https://github.com/sunpy/sunpy/labels/Database) which would be a good way for someone interested in this project to familiarise themselves with the codebase.

Integrating ChiantiPy and SunPy

Suggested Mentor(s): Dan Ryan, Ken Dere

Difficulty: Beginner

Astronomy knowledge needed: Some knowledge of spectra.

Programming skills: Python.

Description

The CHIANTI atomic physics database is a valuable resource for solar physics. The CHIANTI database holds a large amount of information on the physical properties of different elements in different ionisation states and enabled the calculation of various parameters from this information. Using CHIANTI it is possible to calculate the spectra of various types of solar plasma (e.g., flare, quiet sun, etc.) from the observed elemental abundances and ionisation states. These synthetic spectra are essential for comparing to the data observed by various instruments to calculate the response functions of the instruments and to compare to the properties of observed plasma to allow the calculation of physical parameters such as temperature.

Currently, no SunPy code uses the Python interface to the CHIANTI database ChiantiPy. This project would develop the routines to be included in SunPy to use ChiantiPy for various physical calculations desired. The first potential use of ChiantiPy in SunPy is in the sunpy.instr.goes module, where currently data tables calculated using CHIANTI are downloaded from the Solar Software (SSW) distribution, these data tables should be created using SunPy.

Other potential application of ChiantiPy in SunPy include:

  1. Conversion of ChiantiPy spectra objects to SunPy Spectra objects.
  2. Calculation of AIA temperature response functions from ChiantiPy contribution functions.

Expected Outcomes: This project would facilitate SunPy becoming independent from Solar SoftWare (SSW) in producing and maintaining files required by the sunpy.instr.goes module for determining the thermodynamic properties of the emitting plasma observed by GOES. It would also allow SunPy users to calculate spectra and exclusively through Python without relying on SSW.

Support for analysis of Solar Energetic Particles

Suggested Mentor(s): David Pérez-Suárez, Timo Laitinen (University of Central Lancashire)

Difficulty: Beginner

Astronomy knowledge needed: None

Programming skills: Python.

Description

SunPy is able to read a lightcurve from different sources (GOES x-ray, Lyra, Norh,...), however these are not all. Solar Energetic Particles (SEPs) are accelerated during solar eruptions up to relativistic energies. They propagate from the Sun to the heliosphere, and arriving near Earth they pose a danger to astronauts and spacecraft. Thus, it is important to understand their acceleration and propagation mechanisms, so that we can mitigate the Space Weather risk they pose.

SEPs are observed with several instruments onboard several spacecraft, such as GOES, SOHO, ACE, and the two STEREO spacecraft. The timing and evolution of the SEP observations are compared to observations of solar X-ray and radio bursts, changes in solar magnetic field and EUV observations, and coronagraphs, and to the solar wind and magnetic field properties at the observing spacecraft. However, while many of these other observations can already be accessed with SunPy, there is as of now no tool to analyse the SEP observations.

The SEP data is typically available as plaintext files with header information, with columns representing energies and particle elements, while the rows represent time. Also CDF files are used in some occasions. This project should be able to read these in as a lightcurve object and allow to perform the basic operations used when the data is analysed. These basic operations include:

  • Visualisation as time series, including changing the time or energy resolution. The SEP observations often suffer from low count-rates, and averaging over energy or time is needed.
  • Visualisation as energy spectrum. Combination of energies and integration over time is important also in this case.
  • Visualisation of intensity ratios of different particle species. These ratios and their energy- and time-dependence is important for understanding the mechanisms behind the SEP acceleration for different SEP events.

Ability of comparing the SEP observations with other light-curve type data, such as X-ray and in-situ observations (magnetic field and solar wind propecties near the spacecraft) would also be very useful.

Read more about the data format, archive and visualisation examples in the project's page

Lightcurve Refactor

Suggested Mentor(s): Stuart Mumford, Dan Ryan, Andrew Inglis, Jack Ireland

Difficulty: Intermediate

Astronomy knowledge needed: None

Programming skills: Python

Description

The Lightcurve class is one of the three core datatypes in SunPy, along with Map and Spectra. Lightcurve is designed to read in, process and store meta data related to solar physics time series data. Currently, Lightcurve uses the pandas library as its underlying data structure, however, this is subject to change in the future.

Much like the map submodule, lightcurve needs to be able to read in various supported data formats (such as FITS, ascii and others in the future), store their meta data and give users Beginner and unified access to this metadata independently of the original source of the data.

As currently implemented (as of 0.5) the lightcurve module performs three core tasks:

  1. Download the raw data
  2. Read this data into a pandas dataframe
  3. store the meta data obtained with the data.

As of the SunPy 0.6 release the first stage will be moved out of lightcurve and into the net subpackage as part of the UnifiedDownloader (name subject to change) Pull Request. This leaves lightcurve in a similar position to map where the data acquisition is not part of the core data type and is managed separately. Therefore, enabling the implementation of a factory class like Map for the lightcurve module.

Expected Outcomes

Someone under taking this project will complete the following tasks:

  1. Become familiar with the UnifiedDownloader code, if it has not been accepted into the SunPy codebase, complete the remaining tasks for this to be achieved.
  2. Re-write any new lightcurve sources that were not included in the UnifiedDownloader code as sources for UnifiedDownloader.
  3. Write a factory class for lightcurve similar to the sunpy.map.Map class. This class will be a generic constructor for lightcurve allowing the user to instantiate any one of the many subclasses of GenericLightcurve present in sunpy.lightcurve.sources. The API design for the factory class is here: https://github.com/sunpy/sunpy-SEP/pull/6
  4. Design and develop a robust method of dealing with lightcurve meta data, which can handle joining different parts of timeseries from different files, each with their own meta data. (See #1122)

IRIS, 4D Cubes and GUI

Suggested Mentors: Steven Christe (NASA GSFC, SunPy), Nabil Freij (Sheffield University)

Difficulty: Intermediate to Expert

Astronomy knowledge needed: None

Programming skills: Python and basic knowledge of GUI design.

Description

Recently, a new Sun observing satellite was launched, called IRIS. It performs high-resolution, multi-wavelength observations of the solar atmosphere. As a result, the data is saved out as 4D cubes. These cubes have the following structure, [Time, Wavelength, Spatial]. This format is also used by other ground and space-based telescopes.

Traditionally (which is a powerful thing in astronomy), data analysis is done using a programming language called IDL. Using this language, a GUI was created called CRISPEX and is used to do simple but effective analysis.

This project aims to create a smaller scale version that uses Ginga as a backend. Ginga is a file viewer that was created with astrophysics in mind. It allows basic manipulation of FIT files, which are the standard data container in astrophysics. A Python plugin will be created and integrated into Ginga, allowing the user to open 3D/4D datasets and perform basic analysis, such as, slit extraction.

To achieve this, a previous ESA summer project created a cube class. While it was finished, it was never integrated into SunPy. The code was created to hold and manipulate complex datatypes. It is similar in style to the SunPy Map Class and follows that convention. It however, has extra features enabling specific data formats to be extracted that the user requires, for example, a spectrum. The student will need to become familiar with this code, as small tweaks need to occur before it is added to SunPy.

Finally, the plugin will be created using Python. However, a background in QT would ideally be needed but it is not necessary. Ginga uses multiple backends for the GUI but we plan to use QT.

Plugin Features:

  1. Open FITS file and call the correct SunPy Map or Cube class.
  2. Solar coordinate integration.
  3. Perform slit extraction with the ability to choose a time and/or wavelength range.

Sunpy Feature:

  1. Full IRIS support.

For ChiantiPy

GUI Spectral Explorer

Suggested Mentor(s): Ken Dere

Difficulty: Intermediate

Astronomy knowledge needed: A basic understand of astrophysical spectroscopy

Programming skills: Python

Description

The goal of this project is to provide a graphical user interface to enable a user to explore observed spectra and compare it with theoretical spectra. The basis for the theoretical spectra is the CHIANTI atomic database for astrophysical spectroscopy that was first released in 1997. Programmatic access to the database, which is freely available, is provided by the ChiantiPy package -- a pure python package. It is highly object oriented with each ion, such as Fe XVII, being the basic object. Higher level objects are often assembled from a collection of ions, such as when calculating a spectrum. ChiantiPy uses the CHIANTI database to calculate line and continuum intensities as a function of temperature, electron density. This can be done for a set of elemental abundances in CHIANTI or for a user provided set of elemental abundances. At present, if a user wants to compare CHIANTI theoretical spectra it must be done on a case-by-case basis. A GUI explorer, written in Python and preferably PyQt or Wx based, will provide an integrated tool to import observed spectra and plot them alongside theoretical spectra. It will further allow the user to understand what spectra lines contribute to various spectral line profile, how the predicted spectra vary as a function of temperature and density.

It will be necessary to develop techniques to import observed spectra from a variety sources. Typical sources are in FITS files, HDF5 files, or csv files. It will also be important to allow users import their data through modules of their own.

GUI to use LCT tools

Suggested Mentor(s): Jose Iván Campos Rozo (National Astronomical Observatory, National University of Colombia), Santiago Vargas Domínguez (National Astronomical Observatory, National University of Colombia), David Pérez Suárez.

Difficulty: Intermediate

Astronomy knowledge needed: None

Programming skills: Python, basic knowledge of qt4, pyqt4, qt designer

Description

The Local Correlation Tracking (LCT, November & Simon, 1988) technique is a robust method used to study the dynamics of structures in a time series of images. By tracking pixel displacements, using a correlation window, LCT can determine proper motions and generate flow maps of horizontal velocities. This procedure is used to study the dynamics of plasma in the solar photosphere at different spatial scales, e.g the analysis of granular and supergranular convective cells, meridional flows, etc. A widget implemented in Python was developed. It generates a user-friendly graphical user interface (GUI) to control various parameters for the process of calculating flow maps of proper motions for a series of filtergrams (data cube). Our purpose is to implement this tool in Sunpy using its structure and to improve it with some more options, i.e. masks, statistics, histograms, contours and multi-plots. Although an initial version is already developed, our proposal is to focus on the efficient integration of the code in the SunPy libraries. The code (without widget files yet) is https://github.com/Hypnus1803/flow_maps

Expected Outcomes: To integrate efficiently the code in SunPy libraries.

Clone this wiki locally