Monday, August 22, 2016

AIA Response Summary

This is my final blog post for GSoC. It contains a summary of the work that has been completed over the summer, and some points of how to extend this module further.

Project Goal: A SunPy AIA response module that includes temperature and wavelength response functions that will utilize ChiantiPy and the CHIANTI database.

Main PR Links:

Project Abstract:

Solar physics uses the CHIANTI atomic physics database to obtain properties about various elements and ionisation states. By using observed elemental abundances and ionization states, one can use CHIANTI to obtain synthetic spectra of solar plasma of various features which informs a response function used by the observational instruments themselves. This response function is vital to understanding observations.

The Atmospheric Imaging Assembly (AIA) is a multi-wavelength imager on the Solar Dynamics Observatory, specifically looking at the solar corona to understand magnetic processes.

This program uses SunPy and ChiantiPy  to calculate two response functions that infer plasma properties like temperature and density for the AIA:
  • Wavelength response functions: calculate the amount of flux per wavelength measured by AIA
  • Temperature response functions: calculate the sensitivity of light from the plasma per temperature measured by AIA

    Major Resources:

    Project based on Research Paper - Boerner et al. (2012)
    SunPy -  Sunpy User Guide

    To Run the Reponse Module:

    >>>  from sunpy.instr.aia import Response
    >>> path = 'path/to/ssw/aia/response/data.genx'
    >>> channel_list = [94,131,171,193,211,304,335] 
    >>> response = Response(path_to_genx_dir = path, version = 6, channel_list = channel_list)

    This starts the Response module, and then can be used to calculate and look at the wavelength response or the temperature response of the instrument.  

    To look at the calibration of one part of the instrument, one can use a simple loop for multiple channels, or like this for one channel:
    >>> primary_mirror = response.get_channel_data(94)['primary_mirror_reflectance']
    >>> secondary_mirror = response.get_channel_data(94)['secondary_mirror_reflectance']
    >>> total_reflectance = primary_mirror + secondary_mirror

    The transmittance , reflectance, quantum efficiency, and ccd contamination plotted versus the wavelengths (response.get_channel_data(94)['wavelength_range']) will return calibration plots. 

    To view an instrument response, the Effective area vs wavelength is one of the more important features as this defines the wavelength response for each channel. For that, just calculate the response, and then use the attribute for each channel. Using the values from a .genx file is recommended for best results, but a calculated effective area is available.

    >>> response.calculate_effective_area(94, use_genx_effarea = True)
    Similarly, the temperature response can be calculated and then called as an attribute. The function takes into account the contribution from each ion transition in small wavelength ranges. Due to using ChiantiPy, the population of a datatable is necessary and is expensive in terms of time. 

    >>> response. calculate_temperature_response(94)

    This function returns a dictionary giving the wavelength and response values that can be used to plot the function on a log-log scale. Alternate temperatures can be provided using the temperature_array keyword. 

    Final Thoughts:


    This project has incorporated many programs (SunPy, SSW, ChiantiPy) and many new ideas. I'm very proud to have constructed the response functions. With these implemented, it provides a way to do calibration using the instrument properties. However, many of the struggles in the project have been from understanding everything that was implemented in the SSW version of these functions, and as a result, many more features could still be added as explained in the next section. I'm very happy with the overall product and feel it is a good base (as I had hoped it would be starting out). A special thanks to my advisor’s Will Barnes and Drew Leonard. They have always been very supportive during this process and provided invaluable advice and direction.

    Next Steps:


    1. The program sunpy/instr/tests/ has housed all of my initial testing parameters that were not implemented in this project. This will need to be flushed out as additional features are implemented.
    2. SunPy could benefit from a general .genx reader. This was discussed in the developer meetings for this project. Currently, I have implemented a program with this module called This can be removed with the addition of a general .genx reader.
    3. SunPy could also benefit from having a defined file storage application. Currently, the temperature response in this code requires the user to calculate a datatable to store for future use. With a file storage application, this could be stored ahead of time, allowing for quick calculations as needed. 
    4. One additional feature that could be implemented is the ability to alter density in the temperature response. Currently, it is the constant 1e+9, but the ability to have this as an array of density = various pressures * temperature would allow for more generalization.
    5. The temperature response creates an ion datatable if one is not already created. This feature would greatly benefit from a way in ChiantiPy to search the transitions that happen in small wavelength ranges without having to create an ion object for each ion. The only way that I found was to use the ion.Intensity to see which transitions occur, but having to make an ion  object for each ion takes a long time.

    Thanks GSoC for this opportunity!


No comments:

Post a Comment