Menu

Re: [chiantipy:discussion] trouble getting recombination rates

Help
Ken Dere
2016-06-04
2016-06-06
  • Ken Dere

    Ken Dere - 2016-06-04

    I am sending a second copy of this since something bounced back at me.

    Hi Janos,

    thanks for your interest in Chianti and ChiantiPy. We are always happy
    to answer questions.

    There is a short discussion in the Quick Start guide about how things
    like this go. For example, o3.recombRate() is a method that produces
    the o3.RecombRate dict.

    if a qtconsole, which allows me to forget all the print statements:

    o3.recombRate()

    produces the dict o3.RecombRate where the first letter is capitalized

    o3.Recombrate.keys()

    dict_keys(['temperature', 'rate'])

    similarly

    o3.drRate()

    produces the o3.DrRate dict

    o3.DrRate.keys()

    dict_keys(['temperature', 'rate'])

    and the same with o3.rrRate

    o3.rrRate()

    o3.RrRate.keys()

    dict_keys(['temperature', 'rate'])

    so, to plot one of these

    plt.loglog(o3.DrRate['temperature'],o3.DrRate['rate'])

    of course, you could substitute the temperature 't' that you defined for
    the dictionary value - they are the same.

    best regards,

    Ken

    On 06/03/2016 06:55 PM, Janos Botyanszki wrote:

    Hi,

    Thanks for making Chianti available to the python dev community!

    I'm trying to get the latest and greatest rr + dr rates as a function
    of temperature, but am stuck on calling the API.

    Here's what I've tried, following the quick start guide for clarity:
    import chianti.core as ch
    import chianti.io as io
    import numpy as np

    t = 10.*(5.8 + 0.05np.arange(21.))

    o3 = ch.ion('o_3', temperature=t, eDensity=1.e+9, em=1.e+27)

    the following print the parameters correctly

    io.rrRead('o_3')
    io.drRead('o_3')

    but the following are all None

    print o3.recombRate()
    print o3.rrRate()
    print o3.drRate()

    Please let me know what I'm missing here. Thanks!

    Janos

    --
    Kenneth P. Dere
    Research Professor of Solar Physics
    Department of Physics and Astronomy
    George Mason University
    kdere@gmu.edu

     
  • Janos Botyanszki

    Hi Ken,

    Thanks for your response! I am now able to print the rates. I wasn't able to find anything about this in the Quick Start Guide for ChiantiPy.. would you be able to point me to it? Maybe I'm not seeing the right documentation.

    Best,
    Janos

     

Log in to post a comment.