AIA Temperature Response Functions

In this notebook, we'll use the code already on my PR branch to first calculate the wavelength response functions. Then, we'll try to use CHIANTI and ChiantiPy to calculate the temperature response functions for a few ions.

We need to come up with a way to easily constrain how many wavelengths (or more precisely which ions) we need for each channel. We can certainly just search through every ion but this takes time!


In [15]:
import json

import numpy as np
import h5py
import seaborn as sns
from scipy.interpolate import splev,splrep
import matplotlib.pyplot as plt
import astropy.units as u
from sunpy.instr import aia
import ChiantiPy.core as ch
import ChiantiPy.tools.data as ch_data

%matplotlib inline

Wavelength Response


In [2]:
response = aia.Response(ssw_path='/Users/willbarnes/Documents/Rice/Research/ssw/',
                        #channel_list=[131,171,193,211,304]
                       )

In [7]:
response.calculate_wavelength_response(include_crosstalk=True)

In [8]:
response.peek_wavelength_response()



In [9]:
data = np.loadtxt('../aia_sample_data/aia_wresponse_raw.dat')
channels = sorted(list(response.wavelength_response.keys()))
ssw_results = {}
for i in range(len(channels)):
    ssw_results[channels[i]] = {'wavelength':data[:,0],
                                'response':data[:,i+1]}

In [10]:
fig,axes = plt.subplots(3,3,figsize=(12,12))
for c,ax in zip(channels,axes.flatten()):
    #ssw
    ax.plot(ssw_results[c]['wavelength'],ssw_results[c]['response'],
            #color=response.channel_colors[c],
            label='ssw')
    #sunpy
    ax.plot(response.wavelength_response[c]['wavelength'],response.wavelength_response[c]['response'],
            #color=response.channel_colors[c],
            #marker='.',ms=6,markevery=5,
            label='SunPy',linestyle=':',alpha=0.95,lw=2)
    if c!=335 and c!=304:
        ax.set_xlim([c-20,c+20])
    #if c==335:
    #    ax.set_xlim([120,140])
    #if c==304:
    #    ax.set_xlim([80,100])
    ax.set_title('{} $\mathrm{{\mathring{{A}}}}$'.format(c),fontsize=20)
    ax.set_xlabel(r'$\lambda$ ({0:latex})'.format(response.wavelength_response[c]['wavelength'].unit),fontsize=20)
    ax.set_ylabel(r'$R_i(\lambda)$ ({0:latex})'.format(response.wavelength_response[c]['response'].unit),fontsize=20)
# contamination plots
#304
#ssw
ax = axes.flatten()[-2]
ax.plot(ssw_results[304]['wavelength'],ssw_results[304]['response'],
        #color=response.channel_colors[c],
        label='ssw')
#sunpy
ax.plot(response.wavelength_response[304]['wavelength'],response.wavelength_response[304]['response'],
        label='SunPy',linestyle='',alpha=0.95,lw=2,
        #color=response.channel_colors[c],
        marker='.',ms=8,markevery=2,
       )
ax.set_xlim([80,100])
ax.set_title('{} $\mathrm{{\mathring{{A}}}}$ contamination from 94'.format(304),fontsize=14)
ax.set_xlabel(r'$\lambda$ ({0:latex})'.format(response.wavelength_response[c]['wavelength'].unit),fontsize=20)
ax.set_ylabel(r'$R_i(\lambda)$ ({0:latex})'.format(response.wavelength_response[c]['response'].unit),fontsize=20)
#335
ax = axes.flatten()[-1]
ax.plot(ssw_results[335]['wavelength'],ssw_results[335]['response'],
        #color=response.channel_colors[c],
        label='ssw')
#sunpy
ax.plot(response.wavelength_response[335]['wavelength'],response.wavelength_response[335]['response'],
        label='SunPy',linestyle='',alpha=0.95,lw=2,
        #color=response.channel_colors[c],
        marker='.',ms=8,markevery=2,
       )
ax.set_xlim([120,140])
ax.set_title('{} $\mathrm{{\mathring{{A}}}}$ contamination from 131'.format(335),fontsize=14)
ax.set_xlabel(r'$\lambda$ ({0:latex})'.format(response.wavelength_response[c]['wavelength'].unit),fontsize=20)
ax.set_ylabel(r'$R_i(\lambda)$ ({0:latex})'.format(response.wavelength_response[c]['response'].unit),fontsize=20)
axes[0,0].legend(loc='best')
plt.tight_layout()



In [11]:
fig,axes = plt.subplots(3,3,figsize=(12,12),sharey=True,sharex=True)
for c,ax in zip(channels,axes.flatten()):
    #ssw
    ax2 = ax.twinx()
    ssw_interp = ssw_results[c]['response']*response.wavelength_response[c]['response'].unit
    delta_response = np.fabs(response.wavelength_response[c]['response'] - ssw_interp)/(ssw_interp)
    ax.plot(response.wavelength_response[c]['wavelength'],delta_response,
            #color=response.channel_colors[c]
           )
    ax2.plot(response.wavelength_response[c]['wavelength'],response.wavelength_response[c]['response'],
            color='k',linestyle='--')
    ax.set_title('{} $\mathrm{{\mathring{{A}}}}$'.format(c),fontsize=20)
    ax.set_xlabel(r'$\lambda$ ({0:latex})'.format(response.wavelength_response[c]['wavelength'].unit),fontsize=20)
    ax.set_ylabel(r'$\frac{|\mathrm{SSW}-\mathrm{SunPy}|}{\mathrm{SSW}}$',fontsize=20)
    ax2.set_ylabel(r'$R_i(\lambda)$ ({0:latex})'.format(response.wavelength_response[c]['response'].unit))
    ax.set_ylim([-1.1,1.1])
plt.tight_layout()


/Users/willbarnes/anaconda/envs/sunpy-aia-response/lib/python3.5/site-packages/astropy/units/quantity.py:951: RuntimeWarning: invalid value encountered in true_divide
  return super(Quantity, self).__truediv__(other)

In [12]:
info_table = aia.response.aia_instr_properties_to_table([94,131,171,193,211,335],
                        ['/Users/willbarnes/Documents/Rice/Research/ssw/sdo/aia/response/aia_V6_all_fullinst.genx'])

Temperature Response

Set a temperature and density range. This is the range of temperatures and densities over which the contribution function for each ion will be calculated. Note that this is not a grid of temperatures and densities, but rather a list of $T$ and $n$ pairs.

According to Boerner et al. (2012), we should use a constant pressure of $10^{15}$ cm$^{-3}$ K.


In [13]:
temperature = np.logspace(5,8,50)*u.K
pressure = 1e15*u.K*u.cm**(-3)
density = pressure/temperature

The main question is: how exactly do we calculate the temperature response functions? According to Boerner et al. (2012), the response function $K$ for channel $i$ is given by, $$ K_i(T) = \int_0^{\infty}\mathrm{d}\lambda\,G(\lambda,T)R_i(\lambda) $$ where $K$ has units DN cm$^{-5}$ s$^{-1}$ pix$^{-1}$. So what is the right expression for $G(\lambda,n,T)$, the contribution function?

Let's divide the contribution function into a line emission part and a continuum part such that, $$ G(\lambda,T) = G_{continuum}(\lambda,T) + \sum_XG_X(\lambda,T) $$

where $X$ denotes an ion in the CHIANTI database. In this way, the response for each channel becomes,

$$ \begin{align} K_i(T) &= \int_0^{\infty}\mathrm{d}\lambda\,\big(G_{continuum}(\lambda,T) + \sum_XG_X(\lambda,T)\big)R_i(\lambda) \\ &= \int_0^{\infty}\mathrm{d}\lambda\,G_{continuum}(\lambda,T)R_i(\lambda) + \sum_X\int_0^{\infty}\mathrm{d}\lambda\,G_X(\lambda,T)R_i(\lambda) \end{align} $$

So there is a contribution from the continuum plus a contribution from each ion at every wavelength where there is a spectral line. In particular, the continuum includes three different contributions: free-free losses, free-bound losses, and two-photon losses,

$$ G_{continuum}(\lambda,T) = G_{ff}(\lambda,T) + G_{fb}(\lambda,T) + G_{tp}(\lambda,T) $$

The expressions for these losses can be found in Landi et al. (1999). These are calculated and summed over each ion as well. Thus, the full expression for the temperature response is given by,

$$ K_i(T) = \int_0^{\infty}\mathrm{d}\lambda\,(G_{ff}(\lambda,T) + G_{fb}(\lambda,T)R_i(\lambda) + G_{tp}(\lambda,T)) + \sum_X\int_0^{\infty}\mathrm{d}\lambda\,G_X(\lambda,T)R_i(\lambda) $$

Make a list of ions. Exactly what ions should be included is not really clear. Certainly, at least all ions of Fe. Really though, just look at all the ions in CHIANTI. Though, the user should have a chance to select which ions are included so that they can easily calculate the response functions, given only a few lines/ions.


In [ ]:
ion_list = (['fe_{}'.format(i) for i in np.arange(6,26)] 
            + ['ca_{}'.format(i) for i in np.arange(10,20)])

Boerner et al. (2012) use the coronal abundances of Feldman and Widing (1993) and the ionization balances of Dere et al. (2009). We also want to make sure we are calculating all of the emissivities in units of photons rather than ergs as this makes it easier when multiplying by the instrument response function.


In [14]:
ch_data.Defaults['flux'] = 'photon'
ch_data.Defaults['abundfile'] = 'sun_coronal_1992_feldman'
ch_data.Defaults['ioneqfile'] = 'chianti'

Now iterate through the ion list, calculating the emission and subsequently the contribution function at each stage and then interpolating the wavelength response function to the appropriate wavelengths.

Not that for the line emission, we are using the expression,

$$ G_X(\lambda,T) = \frac{1}{4\pi}\epsilon_X(\lambda,T)\mathrm{Ab}(X)\frac{N(X^{+m}}{N(X)}\frac{1}{n_e} $$

which has units of photons cm$^{3}$ s$^{-1}$ sr$^{-1}$. The factor of $1/4\pi$ is included in the expression return by the emiss() method on the ChiantiPy ion object.


In [43]:
temperature_responses = {k:np.zeros(len(temperature)) for k in response.wavelength_response}

In [44]:
for ion in ch_data.MasterList:
    #if ion.split('_')[0] != 'fe':
    #    continue
    print('{}: Calculating contribution function for {}'.format(ch_data.MasterList.index(ion),ion))
    #declare ion object
    tmp = ch.ion(ion,temperature=temperature.value,eDensity=density.value,
                 abundance='sun_coronal_1992_feldman')
    #calculate emissivity
    tmp.emiss()
    em = tmp.Emiss['emiss'][np.argsort(tmp.Emiss['wvl']),:]
    wvl = np.sort(tmp.Emiss['wvl'])
    #calculate contribution function.
    gofnt = tmp.Abundance*em*tmp.IoneqOne/tmp.EDensity
    #iterate over channels
    for channel in response.wavelength_response:
        #print('Adding to channel {}'.format(channel))
        #interpolate response function to transitions
        rsp = splev(wvl,splrep(response.wavelength_response[channel]['wavelength'].value,
                               response.wavelength_response[channel]['response'].value))
        rsp = np.where(rsp<0,0,rsp)*response._channel_info[channel]['plate_scale'].value
        #weighted sum over wavelength
        #add to temperature response
        temperature_responses[channel] += np.dot(rsp,gofnt)


0: Calculating contribution function for h_1
1: Calculating contribution function for he_2
2: Calculating contribution function for c_6
3: Calculating contribution function for n_7
4: Calculating contribution function for o_8
5: Calculating contribution function for ne_10
6: Calculating contribution function for na_11
7: Calculating contribution function for mg_12
8: Calculating contribution function for al_13
9: Calculating contribution function for si_14
10: Calculating contribution function for p_15
11: Calculating contribution function for s_16
12: Calculating contribution function for cl_17
13: Calculating contribution function for ar_18
14: Calculating contribution function for k_19
15: Calculating contribution function for ca_20
16: Calculating contribution function for fe_26
17: Calculating contribution function for ni_28
18: Calculating contribution function for he_1
19: Calculating contribution function for c_5
20: Calculating contribution function for n_6
21: Calculating contribution function for o_7
22: Calculating contribution function for ne_9
23: Calculating contribution function for na_10
24: Calculating contribution function for mg_11
25: Calculating contribution function for al_12
26: Calculating contribution function for si_13
27: Calculating contribution function for p_14
28: Calculating contribution function for s_15
29: Calculating contribution function for cl_16
30: Calculating contribution function for ar_17
31: Calculating contribution function for k_18
32: Calculating contribution function for ca_19
33: Calculating contribution function for fe_25
34: Calculating contribution function for ni_27
35: Calculating contribution function for zn_29
36: Calculating contribution function for c_5d
37: Calculating contribution function for n_6d
38: Calculating contribution function for o_7d
39: Calculating contribution function for ne_9d
40: Calculating contribution function for mg_11d
41: Calculating contribution function for al_12d
42: Calculating contribution function for si_13d
43: Calculating contribution function for s_15d
44: Calculating contribution function for ar_17d
45: Calculating contribution function for ca_19d
46: Calculating contribution function for fe_25d
47: Calculating contribution function for ni_27d
48: Calculating contribution function for c_4
49: Calculating contribution function for n_5
50: Calculating contribution function for o_6
51: Calculating contribution function for ne_8
52: Calculating contribution function for na_9
53: Calculating contribution function for mg_10
54: Calculating contribution function for al_11
55: Calculating contribution function for si_12
56: Calculating contribution function for p_13
57: Calculating contribution function for s_14
58: Calculating contribution function for ar_16
59: Calculating contribution function for k_17
60: Calculating contribution function for ca_18
61: Calculating contribution function for ti_20
 Elvlc file missing for ti_21
62: Calculating contribution function for cr_22
63: Calculating contribution function for mn_23
 Elvlc file missing for mn_24
64: Calculating contribution function for fe_24
65: Calculating contribution function for co_25
 Elvlc file missing for co_26
66: Calculating contribution function for ni_26
67: Calculating contribution function for zn_28
68: Calculating contribution function for c_4d
69: Calculating contribution function for n_5d
70: Calculating contribution function for o_6d
71: Calculating contribution function for ne_8d
72: Calculating contribution function for mg_10d
73: Calculating contribution function for al_11d
74: Calculating contribution function for si_12d
75: Calculating contribution function for s_14d
76: Calculating contribution function for ar_16d
77: Calculating contribution function for ca_18d
78: Calculating contribution function for fe_24d
79: Calculating contribution function for ni_26d
80: Calculating contribution function for c_3
81: Calculating contribution function for n_4
82: Calculating contribution function for o_5
83: Calculating contribution function for ne_7
84: Calculating contribution function for na_8
85: Calculating contribution function for mg_9
86: Calculating contribution function for al_10
87: Calculating contribution function for si_11
88: Calculating contribution function for p_12
89: Calculating contribution function for s_13
90: Calculating contribution function for cl_14
91: Calculating contribution function for ar_15
92: Calculating contribution function for k_16
93: Calculating contribution function for ca_17
94: Calculating contribution function for ti_19
95: Calculating contribution function for cr_21
96: Calculating contribution function for mn_22
97: Calculating contribution function for fe_23
98: Calculating contribution function for co_24
99: Calculating contribution function for ni_25
100: Calculating contribution function for zn_27
101: Calculating contribution function for fe_23d
102: Calculating contribution function for fe_22d
103: Calculating contribution function for fe_21d
104: Calculating contribution function for fe_20d
105: Calculating contribution function for fe_19d
106: Calculating contribution function for fe_18d
107: Calculating contribution function for fe_17d
108: Calculating contribution function for fe_16d
109: Calculating contribution function for fe_15d
110: Calculating contribution function for fe_14d
111: Calculating contribution function for fe_13d
112: Calculating contribution function for fe_12d
113: Calculating contribution function for fe_11d
114: Calculating contribution function for fe_10d
115: Calculating contribution function for fe_9d
116: Calculating contribution function for fe_8d
117: Calculating contribution function for fe_7d
118: Calculating contribution function for fe_6d
119: Calculating contribution function for fe_5d
120: Calculating contribution function for fe_4d
121: Calculating contribution function for fe_3d
122: Calculating contribution function for fe_2d
123: Calculating contribution function for c_2
124: Calculating contribution function for n_3
125: Calculating contribution function for o_4
126: Calculating contribution function for ne_6
127: Calculating contribution function for na_7
128: Calculating contribution function for mg_8
129: Calculating contribution function for al_9
130: Calculating contribution function for si_10
131: Calculating contribution function for p_11
132: Calculating contribution function for s_12
133: Calculating contribution function for cl_13
134: Calculating contribution function for ar_14
135: Calculating contribution function for k_15
136: Calculating contribution function for ca_16
137: Calculating contribution function for ti_18
138: Calculating contribution function for cr_20
139: Calculating contribution function for mn_21
140: Calculating contribution function for fe_22
141: Calculating contribution function for co_23
142: Calculating contribution function for ni_24
143: Calculating contribution function for c_1
144: Calculating contribution function for n_2
145: Calculating contribution function for o_3
146: Calculating contribution function for ne_5
147: Calculating contribution function for na_6
148: Calculating contribution function for mg_7
149: Calculating contribution function for al_8
150: Calculating contribution function for si_9
151: Calculating contribution function for p_10
152: Calculating contribution function for s_11
153: Calculating contribution function for cl_12
154: Calculating contribution function for ar_13
155: Calculating contribution function for k_14
156: Calculating contribution function for ca_15
157: Calculating contribution function for ti_17
158: Calculating contribution function for cr_19
159: Calculating contribution function for mn_20
160: Calculating contribution function for fe_21
161: Calculating contribution function for co_22
162: Calculating contribution function for ni_23
163: Calculating contribution function for zn_25
 Elvlc file missing for zn_26
164: Calculating contribution function for n_1
165: Calculating contribution function for o_2
166: Calculating contribution function for ne_4
167: Calculating contribution function for na_5
168: Calculating contribution function for mg_6
169: Calculating contribution function for al_7
170: Calculating contribution function for si_8
171: Calculating contribution function for p_9
172: Calculating contribution function for s_10
173: Calculating contribution function for cl_11
174: Calculating contribution function for ar_12
175: Calculating contribution function for k_13
176: Calculating contribution function for ca_14
177: Calculating contribution function for ti_16
178: Calculating contribution function for cr_18
179: Calculating contribution function for mn_19
180: Calculating contribution function for fe_20
181: Calculating contribution function for co_21
182: Calculating contribution function for ni_22
183: Calculating contribution function for zn_24
184: Calculating contribution function for o_1
185: Calculating contribution function for ne_3
186: Calculating contribution function for na_4
187: Calculating contribution function for mg_5
188: Calculating contribution function for al_6
189: Calculating contribution function for si_7
190: Calculating contribution function for p_8
191: Calculating contribution function for s_9
192: Calculating contribution function for cl_10
193: Calculating contribution function for ar_11
194: Calculating contribution function for k_12
195: Calculating contribution function for ca_13
196: Calculating contribution function for ti_15
197: Calculating contribution function for cr_17
198: Calculating contribution function for mn_18
199: Calculating contribution function for fe_19
200: Calculating contribution function for co_20
201: Calculating contribution function for ni_21
202: Calculating contribution function for zn_23
203: Calculating contribution function for ne_2
204: Calculating contribution function for na_3
205: Calculating contribution function for mg_4
206: Calculating contribution function for al_5
207: Calculating contribution function for si_6
208: Calculating contribution function for p_7
209: Calculating contribution function for s_8
210: Calculating contribution function for ar_10
211: Calculating contribution function for k_11
212: Calculating contribution function for ca_12
213: Calculating contribution function for ti_14
214: Calculating contribution function for cr_16
215: Calculating contribution function for mn_17
216: Calculating contribution function for fe_18
217: Calculating contribution function for co_19
218: Calculating contribution function for ni_20
219: Calculating contribution function for na_2
220: Calculating contribution function for mg_3
221: Calculating contribution function for al_4
222: Calculating contribution function for si_5
223: Calculating contribution function for p_6
224: Calculating contribution function for s_7
225: Calculating contribution function for ar_9
226: Calculating contribution function for k_10
227: Calculating contribution function for ca_11
228: Calculating contribution function for ti_13
229: Calculating contribution function for cr_15
230: Calculating contribution function for mn_16
231: Calculating contribution function for fe_17
232: Calculating contribution function for co_18
233: Calculating contribution function for ni_19
234: Calculating contribution function for zn_21
 Elvlc file missing for zn_22
235: Calculating contribution function for mg_2
236: Calculating contribution function for al_3
237: Calculating contribution function for si_4
238: Calculating contribution function for p_5
239: Calculating contribution function for s_6
240: Calculating contribution function for ar_8
241: Calculating contribution function for k_9
242: Calculating contribution function for ca_10
243: Calculating contribution function for ti_12
244: Calculating contribution function for cr_14
245: Calculating contribution function for mn_15
246: Calculating contribution function for fe_16
247: Calculating contribution function for co_17
248: Calculating contribution function for ni_18
249: Calculating contribution function for zn_20
250: Calculating contribution function for al_2
251: Calculating contribution function for si_3
252: Calculating contribution function for s_5
253: Calculating contribution function for ar_7
254: Calculating contribution function for ca_9
255: Calculating contribution function for ti_11
256: Calculating contribution function for cr_13
257: Calculating contribution function for fe_15
258: Calculating contribution function for ni_17
259: Calculating contribution function for si_2
260: Calculating contribution function for s_4
261: Calculating contribution function for ca_8
262: Calculating contribution function for fe_14
263: Calculating contribution function for ni_16
264: Calculating contribution function for s_3
265: Calculating contribution function for cl_4
 Elvlc file missing for cl_5
266: Calculating contribution function for ar_5
 Elvlc file missing for ar_6
267: Calculating contribution function for k_6
 Elvlc file missing for k_7
268: Calculating contribution function for ca_7
269: Calculating contribution function for fe_13
270: Calculating contribution function for ni_15
271: Calculating contribution function for s_2
272: Calculating contribution function for cl_3
273: Calculating contribution function for ar_4
274: Calculating contribution function for k_5
275: Calculating contribution function for ca_6
276: Calculating contribution function for fe_12
277: Calculating contribution function for ni_14
278: Calculating contribution function for s_1
279: Calculating contribution function for cl_2
280: Calculating contribution function for ar_3
281: Calculating contribution function for ca_5
282: Calculating contribution function for cr_9
 Elvlc file missing for cr_10
283: Calculating contribution function for mn_10
 Elvlc file missing for mn_11
284: Calculating contribution function for fe_11
285: Calculating contribution function for ni_13
286: Calculating contribution function for cr_8
287: Calculating contribution function for mn_9
288: Calculating contribution function for fe_10
289: Calculating contribution function for ni_12
290: Calculating contribution function for cr_7
291: Calculating contribution function for mn_8
292: Calculating contribution function for fe_9
293: Calculating contribution function for ni_11
294: Calculating contribution function for ca_2
 Elvlc file missing for ca_3
295: Calculating contribution function for fe_8
296: Calculating contribution function for fe_7
297: Calculating contribution function for fe_6
298: Calculating contribution function for fe_5
299: Calculating contribution function for fe_4
300: Calculating contribution function for fe_3
301: Calculating contribution function for fe_2
302: Calculating contribution function for ni_2
 Elvlc file missing for ni_3

In [110]:
# ssw responses
precalculated_responses_data = np.loadtxt('../aia_sample_data/aia_tresponse_raw.dat')
precalc_channels = [94,131,171,193,211,304,335]
precalculated_responses = {c: precalculated_responses_data[:,i+1] for i,c in enumerate(precalc_channels)}
precalculated_responses['temperature'] = precalculated_responses_data[:,0]
# ssw responses with chiantifix and evenorm fix
precalculated_responses_data = np.loadtxt('../aia_sample_data/aia_tresponse_fix.dat')
precalculated_responses_fix = {c: precalculated_responses_data[:,i+1] for i,c in enumerate(precalc_channels)}
precalculated_responses_fix['temperature'] = precalculated_responses_data[:,0]

In [111]:
channel_colors = {c: sns.color_palette('Set2',7)[i] for i,c in enumerate(response.wavelength_response)}

In [116]:
fig,axes = plt.subplots(4,2,figsize=(15,30),sharex=True)
for channel,ax in zip(sorted(list(temperature_responses.keys())),axes.flatten()):
    ax.plot(temperature,temperature_responses[channel]/(0.83*(1./4./np.pi)),
             label=r'lines',
             color=channel_colors[channel])
    ax.plot(temperature,(temperature_responses[channel]/(0.83*(1./4./np.pi))
                          + continuum_contributions[channel]),
             linestyle=':',
             label='lines + continuum',
             color=channel_colors[channel])
    ax.set_xscale('log')
    ax.set_yscale('log')
    ax.set_ylim([1e-30,2e-24])
    ax.set_xlim([1e5,1e8])
    ax.set_title(r'{} $\AA$'.format(channel))
    
for i,pc in enumerate(precalc_channels):
    axes.flatten()[i].plot(10**precalculated_responses['temperature'],
                            precalculated_responses[pc],
                            linestyle='--',
                            label=r'SSW',
                            color=channel_colors[pc])
    axes.flatten()[i].plot(10**precalculated_responses_fix['temperature'],
                        precalculated_responses_fix[pc],
                        linestyle='-.',
                        label=r'SSW with chiantifix',
                        color=channel_colors[pc])
axes[0,1].legend(loc='best')


Out[116]:
<matplotlib.legend.Legend at 0x1173a3f28>

In [61]:
continuum_contributions = {k:np.zeros(len(temperature)) for k in response.wavelength_response}

In [62]:
wvl = response.wavelength_response[94]['wavelength'].value
for ion in ch_data.MasterList:
    #if ion.split('_')[0] != 'fe':
    #    continue
    print('{}: Calculating contribution function for {}'.format(ch_data.MasterList.index(ion),ion))
    tmp = ch.ion(ion,temperature=temperature.value,eDensity=density.value,abundance='sun_coronal_1992_feldman')
    #two photon emiss
    tmp.twoPhoton(wvl)
    if 'rate' in tmp.TwoPhoton:
        two_photon = tmp.TwoPhoton['rate']
    else:
        two_photon = tmp.TwoPhoton['emiss']
    #free-free
    tmp_cont = ch.continuum(ion,temperature.value,abundance='sun_coronal_1992_feldman')
    if tmp_cont.Ion > 1:
        tmp_cont.freeFree(wvl)
        if 'rate' in tmp_cont.FreeFree:
            free_free = tmp_cont.FreeFree['rate']
        else:
            free_free = np.zeros((len(temperature),len(wvl)))
    else:
        free_free = np.zeros((len(temperature),len(wvl)))
    #free-bound
    if tmp_cont.Ion > 1:
        tmp_cont.freeBound(wvl)
        if 'rate' in tmp_cont.FreeBound:
            free_bound = tmp_cont.FreeBound['rate']
        else:
            free_bound = np.zeros((len(temperature),len(wvl)))
    else:
        free_bound = np.zeros((len(temperature),len(wvl)))
    #add to channels
    for channel in response.wavelength_response:
        continuum_contributions[channel] += np.dot((two_photon + free_free + free_bound),
                                                   (response.wavelength_response[channel]['response'].value
                                                    *response._channel_info[channel]['plate_scale'].value))


0: Calculating contribution function for h_1
1: Calculating contribution function for he_2
2: Calculating contribution function for c_6
3: Calculating contribution function for n_7
4: Calculating contribution function for o_8
5: Calculating contribution function for ne_10
6: Calculating contribution function for na_11
7: Calculating contribution function for mg_12
8: Calculating contribution function for al_13
9: Calculating contribution function for si_14
10: Calculating contribution function for p_15
11: Calculating contribution function for s_16
12: Calculating contribution function for cl_17
13: Calculating contribution function for ar_18
14: Calculating contribution function for k_19
15: Calculating contribution function for ca_20
16: Calculating contribution function for fe_26
/Users/willbarnes/anaconda/envs/sunpy-aia-response/lib/python3.5/site-packages/ChiantiPy-0.7.dev417-py3.5.egg/ChiantiPy/core/Continuum.py:413: RuntimeWarning: invalid value encountered in multiply
  fbrate[0,itemp] = em[itemp]*(const.planck*const.light/(1.e-8*wvl))**5*const.verner*gIoneq[itemp]*ratg[0]*expf[0,itemp]*vCross/temperature[itemp]**1.5
/Users/willbarnes/anaconda/envs/sunpy-aia-response/lib/python3.5/site-packages/numpy/ma/core.py:852: RuntimeWarning: invalid value encountered in greater_equal
  return umath.absolute(a) * self.tolerance >= umath.absolute(b)
17: Calculating contribution function for ni_28
18: Calculating contribution function for he_1
19: Calculating contribution function for c_5
20: Calculating contribution function for n_6
21: Calculating contribution function for o_7
22: Calculating contribution function for ne_9
23: Calculating contribution function for na_10
24: Calculating contribution function for mg_11
25: Calculating contribution function for al_12
26: Calculating contribution function for si_13
27: Calculating contribution function for p_14
28: Calculating contribution function for s_15
29: Calculating contribution function for cl_16
30: Calculating contribution function for ar_17
31: Calculating contribution function for k_18
32: Calculating contribution function for ca_19
33: Calculating contribution function for fe_25
34: Calculating contribution function for ni_27
35: Calculating contribution function for zn_29
36: Calculating contribution function for c_5d
 not doing 2 photon for c_5d
37: Calculating contribution function for n_6d
 not doing 2 photon for n_6d
38: Calculating contribution function for o_7d
 not doing 2 photon for o_7d
39: Calculating contribution function for ne_9d
 not doing 2 photon for ne_9d
40: Calculating contribution function for mg_11d
 not doing 2 photon for mg_11d
41: Calculating contribution function for al_12d
 not doing 2 photon for al_12d
42: Calculating contribution function for si_13d
 not doing 2 photon for si_13d
43: Calculating contribution function for s_15d
 not doing 2 photon for s_15d
44: Calculating contribution function for ar_17d
 not doing 2 photon for ar_17d
45: Calculating contribution function for ca_19d
 not doing 2 photon for ca_19d
46: Calculating contribution function for fe_25d
 not doing 2 photon for fe_25d
47: Calculating contribution function for ni_27d
 not doing 2 photon for ni_27d
48: Calculating contribution function for c_4
 not doing 2 photon for c_4
49: Calculating contribution function for n_5
 not doing 2 photon for n_5
50: Calculating contribution function for o_6
 not doing 2 photon for o_6
51: Calculating contribution function for ne_8
 not doing 2 photon for ne_8
52: Calculating contribution function for na_9
 not doing 2 photon for na_9
53: Calculating contribution function for mg_10
 not doing 2 photon for mg_10
54: Calculating contribution function for al_11
 not doing 2 photon for al_11
55: Calculating contribution function for si_12
 not doing 2 photon for si_12
56: Calculating contribution function for p_13
 not doing 2 photon for p_13
57: Calculating contribution function for s_14
 not doing 2 photon for s_14
58: Calculating contribution function for ar_16
 not doing 2 photon for ar_16
59: Calculating contribution function for k_17
 not doing 2 photon for k_17
60: Calculating contribution function for ca_18
 not doing 2 photon for ca_18
61: Calculating contribution function for ti_20
 not doing 2 photon for ti_20
62: Calculating contribution function for cr_22
 not doing 2 photon for cr_22
63: Calculating contribution function for mn_23
 not doing 2 photon for mn_23
64: Calculating contribution function for fe_24
 not doing 2 photon for fe_24
65: Calculating contribution function for co_25
 not doing 2 photon for co_25
66: Calculating contribution function for ni_26
 not doing 2 photon for ni_26
67: Calculating contribution function for zn_28
 not doing 2 photon for zn_28
68: Calculating contribution function for c_4d
 not doing 2 photon for c_4d
69: Calculating contribution function for n_5d
 not doing 2 photon for n_5d
70: Calculating contribution function for o_6d
 not doing 2 photon for o_6d
71: Calculating contribution function for ne_8d
 not doing 2 photon for ne_8d
72: Calculating contribution function for mg_10d
 not doing 2 photon for mg_10d
73: Calculating contribution function for al_11d
 not doing 2 photon for al_11d
74: Calculating contribution function for si_12d
 not doing 2 photon for si_12d
75: Calculating contribution function for s_14d
 not doing 2 photon for s_14d
76: Calculating contribution function for ar_16d
 not doing 2 photon for ar_16d
77: Calculating contribution function for ca_18d
 not doing 2 photon for ca_18d
78: Calculating contribution function for fe_24d
 not doing 2 photon for fe_24d
79: Calculating contribution function for ni_26d
 not doing 2 photon for ni_26d
80: Calculating contribution function for c_3
 not doing 2 photon for c_3
81: Calculating contribution function for n_4
 not doing 2 photon for n_4
82: Calculating contribution function for o_5
 not doing 2 photon for o_5
83: Calculating contribution function for ne_7
 not doing 2 photon for ne_7
84: Calculating contribution function for na_8
 not doing 2 photon for na_8
85: Calculating contribution function for mg_9
 not doing 2 photon for mg_9
86: Calculating contribution function for al_10
 not doing 2 photon for al_10
87: Calculating contribution function for si_11
 not doing 2 photon for si_11
88: Calculating contribution function for p_12
 not doing 2 photon for p_12
89: Calculating contribution function for s_13
 not doing 2 photon for s_13
90: Calculating contribution function for cl_14
 not doing 2 photon for cl_14
91: Calculating contribution function for ar_15
 not doing 2 photon for ar_15
92: Calculating contribution function for k_16
 not doing 2 photon for k_16
93: Calculating contribution function for ca_17
 not doing 2 photon for ca_17
94: Calculating contribution function for ti_19
 not doing 2 photon for ti_19
95: Calculating contribution function for cr_21
 not doing 2 photon for cr_21
96: Calculating contribution function for mn_22
 not doing 2 photon for mn_22
97: Calculating contribution function for fe_23
 not doing 2 photon for fe_23
98: Calculating contribution function for co_24
 not doing 2 photon for co_24
99: Calculating contribution function for ni_25
 not doing 2 photon for ni_25
100: Calculating contribution function for zn_27
 not doing 2 photon for zn_27
101: Calculating contribution function for fe_23d
 not doing 2 photon for fe_23d
102: Calculating contribution function for fe_22d
 not doing 2 photon for fe_22d
103: Calculating contribution function for fe_21d
 not doing 2 photon for fe_21d
104: Calculating contribution function for fe_20d
 not doing 2 photon for fe_20d
105: Calculating contribution function for fe_19d
 not doing 2 photon for fe_19d
106: Calculating contribution function for fe_18d
 not doing 2 photon for fe_18d
107: Calculating contribution function for fe_17d
 not doing 2 photon for fe_17d
108: Calculating contribution function for fe_16d
 not doing 2 photon for fe_16d
109: Calculating contribution function for fe_15d
 not doing 2 photon for fe_15d
110: Calculating contribution function for fe_14d
 not doing 2 photon for fe_14d
111: Calculating contribution function for fe_13d
 not doing 2 photon for fe_13d
112: Calculating contribution function for fe_12d
 not doing 2 photon for fe_12d
113: Calculating contribution function for fe_11d
 not doing 2 photon for fe_11d
114: Calculating contribution function for fe_10d
 not doing 2 photon for fe_10d
115: Calculating contribution function for fe_9d
 not doing 2 photon for fe_9d
116: Calculating contribution function for fe_8d
 not doing 2 photon for fe_8d
117: Calculating contribution function for fe_7d
 not doing 2 photon for fe_7d
118: Calculating contribution function for fe_6d
 not doing 2 photon for fe_6d
119: Calculating contribution function for fe_5d
 not doing 2 photon for fe_5d
120: Calculating contribution function for fe_4d
 not doing 2 photon for fe_4d
121: Calculating contribution function for fe_3d
 not doing 2 photon for fe_3d
122: Calculating contribution function for fe_2d
 not doing 2 photon for fe_2d
123: Calculating contribution function for c_2
 not doing 2 photon for c_2
124: Calculating contribution function for n_3
 not doing 2 photon for n_3
125: Calculating contribution function for o_4
 not doing 2 photon for o_4
126: Calculating contribution function for ne_6
 not doing 2 photon for ne_6
127: Calculating contribution function for na_7
 not doing 2 photon for na_7
128: Calculating contribution function for mg_8
 not doing 2 photon for mg_8
129: Calculating contribution function for al_9
 not doing 2 photon for al_9
130: Calculating contribution function for si_10
 not doing 2 photon for si_10
131: Calculating contribution function for p_11
 not doing 2 photon for p_11
132: Calculating contribution function for s_12
 not doing 2 photon for s_12
133: Calculating contribution function for cl_13
 not doing 2 photon for cl_13
134: Calculating contribution function for ar_14
 not doing 2 photon for ar_14
135: Calculating contribution function for k_15
 not doing 2 photon for k_15
136: Calculating contribution function for ca_16
 not doing 2 photon for ca_16
137: Calculating contribution function for ti_18
 not doing 2 photon for ti_18
138: Calculating contribution function for cr_20
 not doing 2 photon for cr_20
139: Calculating contribution function for mn_21
 not doing 2 photon for mn_21
140: Calculating contribution function for fe_22
 not doing 2 photon for fe_22
141: Calculating contribution function for co_23
 not doing 2 photon for co_23
142: Calculating contribution function for ni_24
 not doing 2 photon for ni_24
143: Calculating contribution function for c_1
 not doing 2 photon for c_1
144: Calculating contribution function for n_2
 not doing 2 photon for n_2
145: Calculating contribution function for o_3
 not doing 2 photon for o_3
146: Calculating contribution function for ne_5
 not doing 2 photon for ne_5
147: Calculating contribution function for na_6
 not doing 2 photon for na_6
148: Calculating contribution function for mg_7
 not doing 2 photon for mg_7
149: Calculating contribution function for al_8
 not doing 2 photon for al_8
150: Calculating contribution function for si_9
 not doing 2 photon for si_9
151: Calculating contribution function for p_10
 not doing 2 photon for p_10
152: Calculating contribution function for s_11
 not doing 2 photon for s_11
153: Calculating contribution function for cl_12
 not doing 2 photon for cl_12
154: Calculating contribution function for ar_13
 not doing 2 photon for ar_13
155: Calculating contribution function for k_14
 not doing 2 photon for k_14
156: Calculating contribution function for ca_15
 not doing 2 photon for ca_15
157: Calculating contribution function for ti_17
 not doing 2 photon for ti_17
158: Calculating contribution function for cr_19
 not doing 2 photon for cr_19
159: Calculating contribution function for mn_20
 not doing 2 photon for mn_20
160: Calculating contribution function for fe_21
 not doing 2 photon for fe_21
161: Calculating contribution function for co_22
 not doing 2 photon for co_22
162: Calculating contribution function for ni_23
 not doing 2 photon for ni_23
163: Calculating contribution function for zn_25
 not doing 2 photon for zn_25
164: Calculating contribution function for n_1
 not doing 2 photon for n_1
165: Calculating contribution function for o_2
 not doing 2 photon for o_2
166: Calculating contribution function for ne_4
 not doing 2 photon for ne_4
167: Calculating contribution function for na_5
 not doing 2 photon for na_5
168: Calculating contribution function for mg_6
 not doing 2 photon for mg_6
169: Calculating contribution function for al_7
 not doing 2 photon for al_7
170: Calculating contribution function for si_8
 not doing 2 photon for si_8
171: Calculating contribution function for p_9
 not doing 2 photon for p_9
172: Calculating contribution function for s_10
 not doing 2 photon for s_10
173: Calculating contribution function for cl_11
 not doing 2 photon for cl_11
174: Calculating contribution function for ar_12
 not doing 2 photon for ar_12
175: Calculating contribution function for k_13
 not doing 2 photon for k_13
176: Calculating contribution function for ca_14
 not doing 2 photon for ca_14
177: Calculating contribution function for ti_16
 not doing 2 photon for ti_16
178: Calculating contribution function for cr_18
 not doing 2 photon for cr_18
179: Calculating contribution function for mn_19
 not doing 2 photon for mn_19
180: Calculating contribution function for fe_20
 not doing 2 photon for fe_20
181: Calculating contribution function for co_21
 not doing 2 photon for co_21
182: Calculating contribution function for ni_22
 not doing 2 photon for ni_22
183: Calculating contribution function for zn_24
 not doing 2 photon for zn_24
184: Calculating contribution function for o_1
 not doing 2 photon for o_1
185: Calculating contribution function for ne_3
 not doing 2 photon for ne_3
186: Calculating contribution function for na_4
 not doing 2 photon for na_4
187: Calculating contribution function for mg_5
 not doing 2 photon for mg_5
188: Calculating contribution function for al_6
 not doing 2 photon for al_6
189: Calculating contribution function for si_7
 not doing 2 photon for si_7
190: Calculating contribution function for p_8
 not doing 2 photon for p_8
191: Calculating contribution function for s_9
 not doing 2 photon for s_9
192: Calculating contribution function for cl_10
 not doing 2 photon for cl_10
193: Calculating contribution function for ar_11
 not doing 2 photon for ar_11
194: Calculating contribution function for k_12
 not doing 2 photon for k_12
195: Calculating contribution function for ca_13
 not doing 2 photon for ca_13
196: Calculating contribution function for ti_15
 not doing 2 photon for ti_15
197: Calculating contribution function for cr_17
 not doing 2 photon for cr_17
198: Calculating contribution function for mn_18
 not doing 2 photon for mn_18
199: Calculating contribution function for fe_19
 not doing 2 photon for fe_19
200: Calculating contribution function for co_20
 not doing 2 photon for co_20
201: Calculating contribution function for ni_21
 not doing 2 photon for ni_21
202: Calculating contribution function for zn_23
 not doing 2 photon for zn_23
203: Calculating contribution function for ne_2
 not doing 2 photon for ne_2
204: Calculating contribution function for na_3
 not doing 2 photon for na_3
205: Calculating contribution function for mg_4
 not doing 2 photon for mg_4
206: Calculating contribution function for al_5
 not doing 2 photon for al_5
207: Calculating contribution function for si_6
 not doing 2 photon for si_6
208: Calculating contribution function for p_7
 not doing 2 photon for p_7
209: Calculating contribution function for s_8
 not doing 2 photon for s_8
210: Calculating contribution function for ar_10
 not doing 2 photon for ar_10
211: Calculating contribution function for k_11
 not doing 2 photon for k_11
212: Calculating contribution function for ca_12
 not doing 2 photon for ca_12
213: Calculating contribution function for ti_14
 not doing 2 photon for ti_14
214: Calculating contribution function for cr_16
 not doing 2 photon for cr_16
215: Calculating contribution function for mn_17
 not doing 2 photon for mn_17
216: Calculating contribution function for fe_18
 not doing 2 photon for fe_18
217: Calculating contribution function for co_19
 not doing 2 photon for co_19
218: Calculating contribution function for ni_20
 not doing 2 photon for ni_20
219: Calculating contribution function for na_2
 not doing 2 photon for na_2
220: Calculating contribution function for mg_3
 not doing 2 photon for mg_3
221: Calculating contribution function for al_4
 not doing 2 photon for al_4
222: Calculating contribution function for si_5
 not doing 2 photon for si_5
223: Calculating contribution function for p_6
 not doing 2 photon for p_6
224: Calculating contribution function for s_7
 not doing 2 photon for s_7
225: Calculating contribution function for ar_9
 not doing 2 photon for ar_9
226: Calculating contribution function for k_10
 not doing 2 photon for k_10
227: Calculating contribution function for ca_11
 not doing 2 photon for ca_11
228: Calculating contribution function for ti_13
 not doing 2 photon for ti_13
229: Calculating contribution function for cr_15
 not doing 2 photon for cr_15
230: Calculating contribution function for mn_16
 not doing 2 photon for mn_16
231: Calculating contribution function for fe_17
 not doing 2 photon for fe_17
232: Calculating contribution function for co_18
 not doing 2 photon for co_18
233: Calculating contribution function for ni_19
 not doing 2 photon for ni_19
234: Calculating contribution function for zn_21
 not doing 2 photon for zn_21
235: Calculating contribution function for mg_2
 not doing 2 photon for mg_2
236: Calculating contribution function for al_3
 not doing 2 photon for al_3
237: Calculating contribution function for si_4
 not doing 2 photon for si_4
238: Calculating contribution function for p_5
 not doing 2 photon for p_5
239: Calculating contribution function for s_6
 not doing 2 photon for s_6
240: Calculating contribution function for ar_8
 not doing 2 photon for ar_8
241: Calculating contribution function for k_9
 not doing 2 photon for k_9
242: Calculating contribution function for ca_10
 not doing 2 photon for ca_10
243: Calculating contribution function for ti_12
 not doing 2 photon for ti_12
244: Calculating contribution function for cr_14
 not doing 2 photon for cr_14
245: Calculating contribution function for mn_15
 not doing 2 photon for mn_15
246: Calculating contribution function for fe_16
 not doing 2 photon for fe_16
247: Calculating contribution function for co_17
 not doing 2 photon for co_17
248: Calculating contribution function for ni_18
 not doing 2 photon for ni_18
249: Calculating contribution function for zn_20
 not doing 2 photon for zn_20
250: Calculating contribution function for al_2
 not doing 2 photon for al_2
251: Calculating contribution function for si_3
 not doing 2 photon for si_3
252: Calculating contribution function for s_5
 not doing 2 photon for s_5
253: Calculating contribution function for ar_7
 not doing 2 photon for ar_7
254: Calculating contribution function for ca_9
 not doing 2 photon for ca_9
255: Calculating contribution function for ti_11
 not doing 2 photon for ti_11
256: Calculating contribution function for cr_13
 not doing 2 photon for cr_13
257: Calculating contribution function for fe_15
 not doing 2 photon for fe_15
258: Calculating contribution function for ni_17
 not doing 2 photon for ni_17
259: Calculating contribution function for si_2
 not doing 2 photon for si_2
260: Calculating contribution function for s_4
 not doing 2 photon for s_4
261: Calculating contribution function for ca_8
 not doing 2 photon for ca_8
262: Calculating contribution function for fe_14
 not doing 2 photon for fe_14
263: Calculating contribution function for ni_16
 not doing 2 photon for ni_16
264: Calculating contribution function for s_3
 not doing 2 photon for s_3
265: Calculating contribution function for cl_4
 not doing 2 photon for cl_4
266: Calculating contribution function for ar_5
 not doing 2 photon for ar_5
267: Calculating contribution function for k_6
 not doing 2 photon for k_6
268: Calculating contribution function for ca_7
 not doing 2 photon for ca_7
269: Calculating contribution function for fe_13
 not doing 2 photon for fe_13
270: Calculating contribution function for ni_15
 not doing 2 photon for ni_15
271: Calculating contribution function for s_2
 not doing 2 photon for s_2
272: Calculating contribution function for cl_3
 not doing 2 photon for cl_3
273: Calculating contribution function for ar_4
 not doing 2 photon for ar_4
274: Calculating contribution function for k_5
 not doing 2 photon for k_5
275: Calculating contribution function for ca_6
 not doing 2 photon for ca_6
276: Calculating contribution function for fe_12
 not doing 2 photon for fe_12
277: Calculating contribution function for ni_14
 not doing 2 photon for ni_14
278: Calculating contribution function for s_1
 not doing 2 photon for s_1
279: Calculating contribution function for cl_2
 not doing 2 photon for cl_2
280: Calculating contribution function for ar_3
 not doing 2 photon for ar_3
281: Calculating contribution function for ca_5
 not doing 2 photon for ca_5
282: Calculating contribution function for cr_9
 not doing 2 photon for cr_9
283: Calculating contribution function for mn_10
 not doing 2 photon for mn_10
284: Calculating contribution function for fe_11
 not doing 2 photon for fe_11
285: Calculating contribution function for ni_13
 not doing 2 photon for ni_13
286: Calculating contribution function for cr_8
 not doing 2 photon for cr_8
287: Calculating contribution function for mn_9
 not doing 2 photon for mn_9
288: Calculating contribution function for fe_10
 not doing 2 photon for fe_10
289: Calculating contribution function for ni_12
 not doing 2 photon for ni_12
290: Calculating contribution function for cr_7
 not doing 2 photon for cr_7
291: Calculating contribution function for mn_8
 not doing 2 photon for mn_8
292: Calculating contribution function for fe_9
 not doing 2 photon for fe_9
293: Calculating contribution function for ni_11
 not doing 2 photon for ni_11
294: Calculating contribution function for ca_2
 not doing 2 photon for ca_2
295: Calculating contribution function for fe_8
 not doing 2 photon for fe_8
296: Calculating contribution function for fe_7
 not doing 2 photon for fe_7
297: Calculating contribution function for fe_6
 not doing 2 photon for fe_6
298: Calculating contribution function for fe_5
 not doing 2 photon for fe_5
299: Calculating contribution function for fe_4
 not doing 2 photon for fe_4
300: Calculating contribution function for fe_3
 not doing 2 photon for fe_3
301: Calculating contribution function for fe_2
 not doing 2 photon for fe_2
302: Calculating contribution function for ni_2
 not doing 2 photon for ni_2

In [91]:
plt.figure(figsize=(8,8))
for channel in continuum_contributions:
    plt.plot(temperature,
             continuum_contributions[channel],
             label=channel,color=channel_colors[channel])
plt.xscale('log')
plt.yscale('log')
plt.xlim([1e5,1e8])
plt.ylim([1e-32,1e-27])
plt.legend(loc='best')


Out[91]:
<matplotlib.legend.Legend at 0x110a62c18>

Seems like the factor of $1/4\pi$ is missing from the contribution function, despite what the comments in the IDL code say...neglecting it gives good (almost exact!) agreement in the parts of the response function dominated by line emission

Factor of 0.83 is definitely missing.

Continuum calculation still too small.

TODO:

  • re-calculate emission structure from IDL scripts
  • re-calculate temperature response functions
  • double-check continuum calculations, compare with CHIANTI-IDL results; continuum calculations still too small
  • save emissivity info in HDF5 file, separated by ion, $N_{\lambda}\times N_{T}$ array for each ion, continuum contributions as well
  • flow chart of how this code works might be helpful...

In [ ]: