Problems with '[OII] 3727+/7325+'

225 views
Skip to first unread message

francesca...@oabo.inaf.it

unread,
Nov 25, 2015, 6:12:09 AM11/25/15
to py...@googlegroups.com
Dear all,

I am encountering a problem when trying to simultaneously determine
temperature and density with the diags.getCrossTemDen option from the two
diagnostics:

'[OII] 3727+/7325+' and '[SII] 6731/6716' .

More specifically, I get the following error:

=================================================


diags.getCrossTemDen('[OII] 3727+/7325+', '[SII] 6731/6716',0.00418,0.7278)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File
"/Users/fannibali/Library/Python/2.7/lib/python/site-packages/pyneb/core/diags.py",
line 662, in getCrossTemDen
maxError=maxError, start_x=start_tem, end_x=end_tem)
File
"/Users/fannibali/Library/Python/2.7/lib/python/site-packages/pyneb/core/pynebcore.py",
line 2105, in getTemDen
end_x=end_x, to_eval=to_eval, nCut=nCut, maxIter=maxIter)
File
"/Users/fannibali/Library/Python/2.7/lib/python/site-packages/pyneb/core/pynebcore.py",
line 1939, in _getTemDen_1
result = nsect_recur(_func, start_x, end_x, nCut, maxIter)
File
"/Users/fannibali/Library/Python/2.7/lib/python/site-packages/pyneb/core/pynebcore.py",
line 1925, in nsect_recur
y = abs(f(x))
File
"/Users/fannibali/Library/Python/2.7/lib/python/site-packages/pyneb/core/pynebcore.py",
line 1876, in _func
result = eval(to_eval)
File "<string>", line 1, in <module>
NameError: name 'B' is not defined

==========================================
When typing the commands

for diag in sorted(pn.diags_dict.keys()):
print('"{0}" : {1}'.format(diag, pn.diags_dict[diag]))


I get, for the [O II] ratio:


"[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+"))])')


So I guess that the problem is due to the fact that it does not recognize
B().


Any idea on how to solve the problem?

Many thanks!

Francesca




Valentina Luridiana

unread,
Nov 25, 2015, 7:12:12 AM11/25/15
to francesca...@oabo.inaf.it, py...@googlegroups.com
Dear Francesca,

you're right about your diagnostics: unfortunately, the treatment of line blends in PyNeb is still buggy. A quick fix is explicitly defining your own diagnostic ratio, e.g.:

diags.addDiag('[OII] b3727/b7325', ('O2', '(I(3,1)+I(2,1))/(I(5,3)+I(5,2)+I(4,3)+I(4,2))', 'RMS([E(3726)*L(3726)/(L(3726)+L(3729)), E(3729)*L(3729)/(L(3726)+L(3729)),E(7319A+)*L(7319A+)/(L(7319A+)+L(7330A+)),E(7330A+)*L(7330A+)/(L(7319A+)+L(7330A+))])'))

and then using it the usual way:

diags.getCrossTemDen('[OII] b3727/b7325', '[SII] 6731/6716',1/0.00418,0.7278)
 
(I'm assuming 0.00418 is the 7325/3727 and not the 3727/7325 ratio - check this). 

Hope this helps,

Valentina


--
You received this message because you are subscribed to the Google Groups "PyNeb" group.
To post to this group, send an email to py...@googlegroups.com.
Visit this group at http://groups.google.com/group/pyneb.
For more options, visit https://groups.google.com/d/optout.

francesca...@oabo.inaf.it

unread,
Nov 25, 2015, 7:46:39 AM11/25/15
to Valentina Luridiana, francesca...@oabo.inaf.it, py...@googlegroups.com
Dear Valentina,

thanks for your prompt answer!
With that fix it is working now!

thanks again,

Francesca

Christophe Morisset

unread,
Feb 28, 2016, 10:40:52 PM2/28/16
to PyNeb, va...@iaa.es, francesca...@oabo.inaf.it
Hi,

Just to complete the procedure to deal with the [OII] lines: when using the diagnostic defined by Valentina in the previous message, you also need to have in the observations the following lines:
O2_7319A
O2_7320A
O2_7330A
O2_7331A
Obviously, some of the lines may be blend. It does not matter how the lines are related, unless you give the observed total intensity.
For example, you may set 7319 and 7330 to 0.0 on one hand, and 7320 and 7331 set to the observed corresponding blend values on the other hand.


Christophe
Reply all
Reply to author
Forward
0 new messages