T[OII]

100 views
Skip to first unread message

Natalia Vale Asari

unread,
Nov 30, 2020, 3:15:01 PM11/30/20
to py...@googlegroups.com
Hello,

I am posting a question I asked Christophe to the group, since this may be useful to others. He will post his reply shortly! :)

We were trying to compare T[N II] to T[O II], but I am having trouble understanding the notations for the [O II] wavelengths.

We have measured 3726, 3739, 7320+ (= 7319 + 7320, blended), 7330+ (= 7330 + 7331, blended).

Here is a measurement for one object:
RO2 = (7320+ + 7330+) / (3726 + 3739) = 2.02765688e-02

I have tried:

In [78]: O2.getTemDen(2.02765688e-02, den=100, wave1='7325A', wave2='3727A')
Out[78]: 16914.47962334364

In [79]: O2.getTemDen(2.02765688e-02, den=100, to_eval = '(L(7319)+L(7320)+L(7330)+L(7331))/(L(3726)+L(3729))')
Out[79]: 10997.376808272045

In [80]: O2.getTemDen(2.02765688e-02, den=100, to_eval = '(L(7320)+L(7330))/(L(3726)+L(3729))')
Out[80]: 15132.726249600462

They all give different results, so I suppose they are different calculations. I am not sure what each one is doing exactly.



I have also tried to find more info on the nomenclature, but only found this in diags.py:

diags_dict['[OII] 3727+/7325+c'] = ('O2', '(B("3727A+"))/(B("7319A+")+B("7330A+"))',
'RMS([BE("7319A+")*B("7319A+")/(B("7319A+")+B("7330A+")), BE("7330A+")*B("7330A+")/(B("7319A+")+B("7330A+")), BE("3727A+")])')
diags_dict['[OII] 3727+/7325+'] = ('O2', '(L(3726)+L(3729))/(B("7319A+")+B("7330A+"))',
'RMS([E(3726)*L(3726)/(L(3726)+L(3729)), E(3729)*L(3729)/(L(3726)+L(3729)),BE("7319A+")*B("7319A+")/(B("7319A+")+B("7330A+")),BE("7330A+")*B("7330A+")/(B("7319A+")+B("7330A+"))])')
#diags_dict['[OII] 3727+/7325+'] = ('O2', '(L(3726)+L(3729))/(B("7325A+"))', 'RMS([E(3726)*L(3726)/(L(3726)+L(3729)), E(3729)*L(3729)/(L(3726)+L(3729)),BE("7325A+")])')
diags_dict['[OII] 3727+/7325+b'] = ('O2', '(L(3726)+L(3729))/(I(4,2)+I(4,3)+I(5,2)+I(5,3))',
'RMS([E(3726)*L(3726)/(L(3726)+L(3729)), E(3729)*L(3729)/(L(3726)+L(3729)),BE("7319A+")*B("7319A+")/(B("7319A+")+B("7330A+")),BE("7330A+")*B("7330A+")/(B("7319A+")+B("7330A+"))])')

which left me even more confused. What is the +c, +b?



Cheers,
Natalia

Christophe Morisset

unread,
Nov 30, 2020, 4:51:30 PM11/30/20
to PyNeb

Bonjour Natalia,

You are right that the situation is quite confusing, and I did not help by making changes that may be undocumented :-(

The best solution is to be very explicit, including the 6 transitions in the eval. You can check that the wavelengths you give actually point to the right transition by:


In [15]: o2 = pn.Atom('O',2)

In [16]: o2.getTransition(3729)
Out[16]: (2, 1)

In [17]: o2.getTransition(3727)
Out[17]: (3, 1)

In [18]: o2.getTransition(7330)
Out[18]: (5, 3)

In [19]: o2.getTransition(7331)
Out[19]: (4, 3)

In [20]: o2.getTransition(7320)
Out[20]: (4, 2)

In [21]: o2.getTransition(7319)
Out[21]: (5, 2)

The transition is the one found to be the closest to the give wavelength. This is important to check, as sometimes the wavelength is not correct and one can take twice the same into account. The very best way is to define the transition by the 2 levels involved, this will never change (unless you play with stupid ions like FeII ;-)) )

Then you can call the getTemDen using two explicit ways to define the line ratio:

o2.getTemDen(2.02765688e-02, den=100, to_eval = '(L(7319)+L(7320)+L(7330)+L(7331))/(L(3726)+L(3729))')

o2.getTemDen(2.02765688e-02, den=100, to_eval = '(I(5,3)+I(4,3)+I(5,2)+I(4,2))/(I(3,1)+I(2,1))')

The B for blend is usable (I hope) in Diagnostics.getCrossTenDen, but it does not work for getTemDen. I spent some time on this years ago, I could perhaps try again now and perhaps could solve the related issue... or not. But as the explicit version works, I think it is better to use it for now.

The +b and +c are to test labels in Diagnostics.getCrossTemDen. In the latest version of PyNeb, I defined the +b in the right way, it could be used (but as said before, not in Atom.getTemDen):

diags_dict['[OII] 3727+/7325+b'] = ('O2', '(L(3726)+L(3729))/(I(4,2)+I(4,3)+I(5,2)+I(5,3))',
              'RMS([E(3726)*L(3726)/(L(3726)+L(3729)), E(3729)*L(3729)/(L(3726)+L(3729)),BE("7319A+")*B("7319A+")/(B("7319A+")+B("7330A+")),BE("7330A+")*B("7330A+")/(B("7319A+")+B("7330A+"))])')

To explain the other results you are obtaining:

O2.getTemDen(2.02765688e-02, den=100, wave1='7325A', wave2='3727A')          

uses the ratio of only 1/1 lines

O2.getTemDen(2.02765688e-02, den=100, to_eval = '(L(7320)+L(7330))/(L(3726)+L(3729))')               

uses the ratio of 2 / 2 lines, not 4 / 2 as you want.

Hope it is clear. You may re-post your question on the discussion group, my answer could help other users.

Bye, take care of you.

Christophe

Natalia Vale Asari

unread,
Dec 1, 2020, 6:37:57 AM12/1/20
to Christophe Morisset, PyNeb
Thank you, Christophe, that is clear now! In summary, we should use:

> o2.getTemDen(2.02765688e-02, den=100, to_eval = '(L(7319)+L(7320)+L(7330)+L(7331))/(L(3726)+L(3729))')
> o2.getTemDen(2.02765688e-02, den=100, to_eval = '(I(5,3)+I(4,3)+I(5,2)+I(4,2))/(I(3,1)+I(2,1))')

Cheers,
Natalia

Natalia Vale Asari

unread,
Dec 11, 2020, 6:45:18 AM12/11/20
to PyNeb
Dear Christophe,
By the same token, to calculate O+/H+, one should not use
abO2 = O2.getIonAbundance(int_ratio=tabData['F3727'], tem=TN2, den=n2, wave='3727A', Hbeta=1.)

But use instead
abO2 = O2.getIonAbundance(int_ratio=tabData['F3727'], tem=TN2, den=n2, to_eval='(L(3726)+L(3729))', Hbeta=1.)

right?

Thank you,
Natalia

Jorge García Rojas

unread,
Dec 11, 2020, 7:20:23 AM12/11/20
to Natalia Vale Asari, PyNeb
Hi Natalia,

or alternatively

abO2 = O2.getIonAbundance(int_ratio=tabData['F3727'], tem=TN2, den=n2, to_eval='I(2,1)+I(3,1)', Hbeta=1.)

I usually read all the lines for a file and compute the abundances going through each line. The correct way of computing abundances from these lines is hardcoded in pyneb so if you read a file with the following rows:

O2_3727A+ 20.34
O2_3727A+e 0.07
O2_7319A+ 6.90
O2_7319A+e 0.07
O2_7330A+ 6.75
O2_7330A+e 0.07

and put it in an obs object in the usual way:

obs = pn.Observation(obsFile=‘file.dat', fileFormat='lines_in_rows', corrected=True)

you can see that it is hardcoded in pyneb because if you do:

for line in obs.getSortedLines():
print(line.to_eval)

you obtain:

I(2,1)+I(3,1)
I(4,2)+I(5,2)
I(4,3)+I(5,3)

cheers,

Jorge
> --
> You received this message because you are subscribed to the Google Groups "PyNeb" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to pyneb+un...@googlegroups.com.
> To view this discussion on the web, visit https://groups.google.com/d/msgid/pyneb/074227B7-BF7B-406B-A31D-B70691F51544%40astro.ufsc.br.

Natalia Vale Asari

unread,
Dec 11, 2020, 2:07:06 PM12/11/20
to PyNeb
Dear Jorges,

> On 11 Dec 2020, at 09:20, Jorge García Rojas <astro...@gmail.com> wrote:
>
> Hi Natalia,
>
> or alternatively
>
> abO2 = O2.getIonAbundance(int_ratio=tabData['F3727'], tem=TN2, den=n2, to_eval='I(2,1)+I(3,1)', Hbeta=1.)
>
> I usually read all the lines for a file and compute the abundances going through each line. The correct way of computing abundances from these lines is hardcoded in pyneb so if you read a file with the following rows:
>
> O2_3727A+ 20.34
> O2_3727A+e 0.07
> O2_7319A+ 6.90
> O2_7319A+e 0.07
> O2_7330A+ 6.75
> O2_7330A+e 0.07
>
> and put it in an obs object in the usual way:
>
> obs = pn.Observation(obsFile=‘file.dat', fileFormat='lines_in_rows', corrected=True)
>
> you can see that it is hardcoded in pyneb because if you do:
>
> for line in obs.getSortedLines():
> print(line.to_eval)
>
> you obtain:
>
> I(2,1)+I(3,1)
> I(4,2)+I(5,2)
> I(4,3)+I(5,3)

Thank you very much. I was scratching my head trying to find how I could find the hard-coded transitions.


Cheers,
Natalia
Reply all
Reply to author
Forward
0 new messages