Tutorial: Calculating the SDO/AIA Response Functions in SunPy

This notebook gives examples of how to calculate the SDO/AIA wavelength and temperature response functions using SunPy and ChiantiPy. The provided API is very simple and easy to use.


In [1]:
import numpy as np
import matplotlib.pyplot as plt
import sunpy.instr.aia
%matplotlib inline

Wavelength Response

Calculate the wavelength response functions with SunPy.

EUV Channels: 94, 131, 171, 193, 211, 335, 304 $\mathrm{\mathring{A}}$


In [2]:
response = sunpy.instr.aia.Response(ssw_path='/Users/willbarnes/Documents/Rice/Research/ssw/')

In [3]:
response.calculate_wavelength_response()

Peek at the wavelength response functions.


In [4]:
response.peek_wavelength_response()


Far UV and Visible Channels: 1600, 1700, and 4500 $\mathrm{\mathring{A}}$

We can also very easily calculate the wavelength response functions for the far UV and visible channels centered on 1600, 1700, and 4500 $\mathrm{\mathring{A}}$.


In [5]:
response_uv = sunpy.instr.aia.Response(ssw_path='/Users/willbarnes/Documents/Rice/Research/ssw/',
                                       channel_list=[1600,1700,4500])


Cannot find contam for channel 1600 in file /Users/willbarnes/Documents/Rice/Research/ssw/sdo/aia/response/aia_V6_fuv_fullinst.genx
Setting ccd_contamination to 1
Cannot find contam for channel 1700 in file /Users/willbarnes/Documents/Rice/Research/ssw/sdo/aia/response/aia_V6_fuv_fullinst.genx
Setting ccd_contamination to 1
Cannot find contam for channel 4500 in file /Users/willbarnes/Documents/Rice/Research/ssw/sdo/aia/response/aia_V6_fuv_fullinst.genx
Setting ccd_contamination to 1

In [6]:
response_uv.calculate_wavelength_response()

In [7]:
response_uv.peek_wavelength_response()


Detailed Instrument Information

If you'd like very detailed information about each channel on the instrument, you can also generate an astropy Table that lists all of the different instrument properties that go into the wavelength response calculation.


In [8]:
table=sunpy.instr.aia.aia_instr_properties_to_table([94,131,171,193,211,335,304,1600,1700,4500],
                            ['/Users/willbarnes/Documents/Rice/Research/ssw/sdo/aia/response/aia_V6_all_fullinst.genx',
                             '/Users/willbarnes/Documents/Rice/Research/ssw/sdo/aia/response/aia_V6_fuv_fullinst.genx'])


Cannot find contam for channel 1600 in file /Users/willbarnes/Documents/Rice/Research/ssw/sdo/aia/response/aia_V6_fuv_fullinst.genx
Setting ccd_contamination to 1
Cannot find contam for channel 1700 in file /Users/willbarnes/Documents/Rice/Research/ssw/sdo/aia/response/aia_V6_fuv_fullinst.genx
Setting ccd_contamination to 1
Cannot find contam for channel 4500 in file /Users/willbarnes/Documents/Rice/Research/ssw/sdo/aia/response/aia_V6_fuv_fullinst.genx
Setting ccd_contamination to 1

In [9]:
table


Out[9]:
<QTable length=10>
channelwavelengthminimum_wavelengthwavelength_intervalnumber_wavelength_intervalseffective_areageometric_area_ccdplate_scaleelectron_per_dnelectron_per_evfocal_plane_filter_efficiencyentrance_filter_efficiencyprimary_mirror_reflectancesecondary_mirror_reflectancequantum_efficiency_ccdccd_contamination
AngstromAngstromAngstromAngstromcm2cm2sr / pixelectron / ctelectron / eV
float64objectfloat64float64int64objectfloat64float64float64float64objectobjectobjectobjectobjectobject
94.0[ 25. 25.10000038 25.20000076 ..., 899.79998779 899.90002441 900. ]25.00.100000001498751[ 5.27489294e-12 5.14545784e-12 5.01929488e-12 ..., 2.45101570e-14 2.45180802e-14 2.45260016e-14]83.08.46158039469e-1218.29999923710.273972988129[ 5.17922007e-02 5.09420000e-02 5.01057990e-02 ..., 1.00001000e-06 1.00001000e-06 1.00001000e-06][ 5.17922007e-02 5.09420000e-02 5.01057990e-02 ..., 1.00001000e-06 1.00001000e-06 1.00001000e-06][ 5.36785637e-06 5.39225630e-06 5.41665577e-06 ..., 8.52360651e-02 8.52409825e-02 8.52458999e-02][ 5.36785637e-06 5.39225630e-06 5.41665577e-06 ..., 8.52360651e-02 8.52409825e-02 8.52458999e-02][ 0.85138208 0.8509894 0.85064727 ..., 0.09263941 0.09265867 0.09267791][ 0.96578515 0.96544755 0.96510959 ..., 0.43874961 0.43874961 0.43874961]
131.0[ 25. 25.10000038 25.20000076 ..., 899.79998779 899.90002441 900. ]25.00.100000001498751[ 1.89890617e-10 1.85231025e-10 1.80689325e-10 ..., 1.89969934e-13 1.90052726e-13 1.90135505e-13]83.08.46158039469e-1217.60000038150.273972988129[ 5.17922007e-02 5.09420000e-02 5.01057990e-02 ..., 1.00001000e-06 1.00001000e-06 1.00001000e-06][ 5.17922007e-02 5.09420000e-02 5.01057990e-02 ..., 1.00001000e-06 1.00001000e-06 1.00001000e-06][ 3.22066699e-05 3.23530621e-05 3.24994580e-05 ..., 2.37297297e-01 2.37324327e-01 2.37351358e-01][ 3.22066699e-05 3.23530621e-05 3.24994580e-05 ..., 2.37297297e-01 2.37324327e-01 2.37351358e-01][ 0.85138208 0.8509894 0.85064727 ..., 0.09263941 0.09265867 0.09267791][ 0.96578515 0.96544755 0.96510959 ..., 0.43874961 0.43874961 0.43874961]
171.0[ 25. 25.10000038 25.20000076 ..., 899.79998779 899.90002441 900. ]25.00.100000001498751[ 4.46234338e-08 4.47057964e-08 4.47890933e-08 ..., 2.74987561e-10 2.73075645e-10 2.71178691e-10]83.08.46158039469e-1217.70000076290.273972988129[ 5.95474005e-01 5.93567014e-01 5.91665983e-01 ..., 3.08021008e-05 3.06914008e-05 3.05811991e-05][ 5.95474005e-01 5.93567014e-01 5.91665983e-01 ..., 3.08021008e-05 3.06914008e-05 3.05811991e-05][ 4.29414904e-05 4.31366789e-05 4.33318710e-05 ..., 2.93110162e-01 2.93112487e-01 2.93114781e-01][ 4.29414904e-05 4.31366789e-05 4.33318710e-05 ..., 2.93110162e-01 2.93112487e-01 2.93114781e-01][ 0.85138208 0.8509894 0.85064727 ..., 0.09263941 0.09265867 0.09267791][ 0.96578515 0.96544755 0.96510959 ..., 0.43874961 0.43874961 0.43874961]
193.0[ 25. 25.10000038 25.20000076 ..., 899.79998779 899.90002441 900. ]25.00.100000001498751[ 0.00000000e+00 0.00000000e+00 0.00000000e+00 ..., 3.31152911e-10 3.28830518e-10 3.26526500e-10]83.08.46158039469e-1218.29999923710.273972988129[ 5.95474005e-01 5.93567014e-01 5.91665983e-01 ..., 3.08021008e-05 3.06914008e-05 3.05811991e-05][ 5.95474005e-01 5.93567014e-01 5.91665983e-01 ..., 3.08021008e-05 3.06914008e-05 3.05811991e-05][ 0. 0. 0. ..., 0.32165378 0.32164654 0.32163933][ 0. 0. 0. ..., 0.32165378 0.32164654 0.32163933][ 0.85138208 0.8509894 0.85064727 ..., 0.09263941 0.09265867 0.09267791][ 0.96578515 0.96544755 0.96510959 ..., 0.43874961 0.43874961 0.43874961]
211.0[ 25. 25.10000038 25.20000076 ..., 899.79998779 899.90002441 900. ]25.00.100000001498751[ 2.78900547e-09 2.79415358e-09 2.79935963e-09 ..., 2.51502985e-10 2.49762072e-10 2.48034815e-10]83.08.46158039469e-1218.29999923710.273972988129[ 5.95474005e-01 5.93567014e-01 5.91665983e-01 ..., 3.08021008e-05 3.06914008e-05 3.05811991e-05][ 5.95474005e-01 5.93567014e-01 5.91665983e-01 ..., 3.08021008e-05 3.06914008e-05 3.05811991e-05][ 1.07354517e-05 1.07842488e-05 1.08330469e-05 ..., 2.80314744e-01 2.80321300e-01 2.80327857e-01][ 1.07354517e-05 1.07842488e-05 1.08330469e-05 ..., 2.80314744e-01 2.80321300e-01 2.80327857e-01][ 0.85138208 0.8509894 0.85064727 ..., 0.09263941 0.09265867 0.09267791][ 0.96578515 0.96544755 0.96510959 ..., 0.43874961 0.43874961 0.43874961]
335.0[ 25. 25.10000038 25.20000076 ..., 899.79998779 899.90002441 900. ]25.00.100000001498751[ 0.00000000e+00 0.00000000e+00 0.00000000e+00 ..., 1.14710755e-10 1.13935743e-10 1.13166643e-10]83.08.46158039469e-1217.60000038150.273972988129[ 5.95474005e-01 5.93567014e-01 5.91665983e-01 ..., 3.08021008e-05 3.06914008e-05 3.05811991e-05][ 5.95474005e-01 5.93567014e-01 5.91665983e-01 ..., 3.08021008e-05 3.06914008e-05 3.05811991e-05][ 0. 0. 0. ..., 0.18931125 0.18933147 0.18935168][ 0. 0. 0. ..., 0.18931125 0.18933147 0.18935168][ 0.85138208 0.8509894 0.85064727 ..., 0.09263941 0.09265867 0.09267791][ 0.96578515 0.96544755 0.96510959 ..., 0.43874961 0.43874961 0.43874961]
304.0[ 25. 25.10000038 25.20000076 ..., 899.79998779 899.90002441 900. ]25.00.100000001498751[ 0.00000000e+00 0.00000000e+00 0.00000000e+00 ..., 1.50464766e-10 1.49468438e-10 1.48479590e-10]83.08.46158039469e-1218.29999923710.273972988129[ 5.95474005e-01 5.93567014e-01 5.91665983e-01 ..., 3.08021008e-05 3.06914008e-05 3.05811991e-05][ 5.95474005e-01 5.93567014e-01 5.91665983e-01 ..., 3.08021008e-05 3.06914008e-05 3.05811991e-05][ 0. 0. 0. ..., 0.21681622 0.21685407 0.2168919 ][ 0. 0. 0. ..., 0.21681622 0.21685407 0.2168919 ][ 0.85138208 0.8509894 0.85064727 ..., 0.09263941 0.09265867 0.09267791][ 0.96578515 0.96544755 0.96510959 ..., 0.43874961 0.43874961 0.43874961]
1600.0[ 1200. 1201. 1202. ..., 9998. 9999. 10000.]1200.01.08801[ 1.72908514e-07 1.74622699e-07 1.79776137e-07 ..., 4.82054254e-08 4.82082108e-08 4.82110032e-08]30.78277587898.46158039469e-1217.70000076290.273972988129[ 6.89065026e-04 6.82173995e-04 6.75281975e-04 ..., 9.98920004e-05 9.99460026e-05 9.99999975e-05][ 3.61691997e-03 3.53040989e-03 3.51212989e-03 ..., 9.99421027e-05 9.99710974e-05 9.99999975e-05][ 0.131809 0.134442 0.13715 ..., 0.93633997 0.93636799 0.93639702][ 0.131809 0.134442 0.13715 ..., 0.93633997 0.93636799 0.93639702][ 0.12972373 0.13031748 0.13091122 ..., 0.17891297 0.17876408 0.17861518]1
1700.0[ 1200. 1201. 1202. ..., 9998. 9999. 10000.]1200.01.08801[ 1.00372837e-07 9.98574237e-08 1.01217751e-07 ..., 4.82554192e-08 4.82331970e-08 4.82110032e-08]30.78277587898.46158039469e-1217.70000076290.273972988129[ 3.99999990e-04 3.90099012e-04 3.80198006e-04 ..., 9.99956028e-05 9.99978001e-05 9.99999975e-05][ 3.61691997e-03 3.53040989e-03 3.51212989e-03 ..., 9.99421027e-05 9.99710974e-05 9.99999975e-05][ 0.131809 0.134442 0.13715 ..., 0.93633997 0.93636799 0.93639702][ 0.131809 0.134442 0.13715 ..., 0.93633997 0.93636799 0.93639702][ 0.12972373 0.13031748 0.13091122 ..., 0.17891297 0.17876408 0.17861518]1
4500.0[ 1200. 1201. 1202. ..., 9998. 9999. 10000.]1200.01.08801[ 2.50932093e-08 2.55979700e-08 2.66223807e-08 ..., 4.82575437e-08 4.82342593e-08 4.82110032e-08]30.78277587898.46158039469e-1217.70000076290.273972988129[ 9.99999975e-05 9.99999975e-05 9.99999975e-05 ..., 9.99999975e-05 9.99999975e-05 9.99999975e-05][ 3.61691997e-03 3.53040989e-03 3.51212989e-03 ..., 9.99421027e-05 9.99710974e-05 9.99999975e-05][ 0.131809 0.134442 0.13715 ..., 0.93633997 0.93636799 0.93639702][ 0.131809 0.134442 0.13715 ..., 0.93633997 0.93636799 0.93639702][ 0.12972373 0.13031748 0.13091122 ..., 0.17891297 0.17876408 0.17861518]1

Temperature Response


In [ ]: