Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problem with ipymspectrum #239

Open
svaberg opened this issue Jun 15, 2019 · 2 comments
Open

Problem with ipymspectrum #239

svaberg opened this issue Jun 15, 2019 · 2 comments

Comments

@svaberg
Copy link
Contributor

svaberg commented Jun 15, 2019

Hi Ken and all,

Using the current revision of ChiantiPy the ipymspectrum class is not working for me. Following the example in the Quick Start

temp = [1.e+6, 2.e+6]
dens = 1.e+9
wvl = 200. + 0.05*np.arange(2001)
emeasure = [1.e+27 ,1.e+27]
s = ch.ipymspectrum(temp, dens, wvl, filter = (chfilters.gaussian,.2), em = emeasure, doContinuum=1, minAbund=1.e-5, verbose=0)
plt.figure
plt.plot(wvl, s.Spectrum['integrated'])

I get the following error

~/Documents/PHD/sw_tools/ChiantiPy/ChiantiPy/core/IpyMspectrum.py in __init__(self, temperature, eDensity, wavelength, filter, label, elementList, ionList, minAbund, keepIons, doLines, doContinuum, allLines, em, abundance, verbose, timeout)
    249                         else:
    250                             for iTempDen in range(self.NTempDen):
--> 251                                 twoPhoton[iTempDen] += tp['rate'][iTempDen]
    252                 else:
    253                     if 'errorMessage' in sorted(thisIon.Intensity.keys()):

KeyError: 'rate'

Does this happen for you as well?

If you are interested, I could write a couple of automated tests for ChiantiPy, just based on the example codes in the documentation. Would you be interested to integrate them in the project?

Best wishes,
Dag

@kdere
Copy link
Contributor

kdere commented Jun 15, 2019

I was kind of expecting that. I am sure it is due to the problems created by using only numpy arrays internally. I will look at that. mspectrum and bunch probably have similar problems.
thanks for letting me know.
Ken

@kdere
Copy link
Contributor

kdere commented Jun 16, 2019

Yes, if you wanted to write a couple of automated test that would be great. We already have some written by Will Barnes but they are not complete. I usually do a pytest by hand. Travis CI requires that the entire database be downloaded and that often led to a time out.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants