Helium lines labels for the .get_emis() function

94 views
Skip to first unread message

Vital Fernández

unread,
Nov 7, 2017, 12:38:05 PM11/7/17
to pyCloudy
I am using pyCloudy to generate the helium emissivities for a grid of temperatures and densities.

My script works fine and it generates a set of input files which run without issues: 

////////////////////////////////////
title M_i_Te15000
.0_ne100.0
////////////////////////////////////
set punch prefix "M_i_Te15000.0_ne100.0"
Blackbody 45000.000000
q
(H) = 47.000
radius
= 16.000
hden
= 2.000
filling factor
= 1.0
init file
"hheonly.ini"
element helium abundance
-3
constant temperature
4.17609125906
database H
-like levels large element hydrogen
database H
-like levels large element helium
set dr 0
stop zone
1
save
last radius ".rad"
save
last continuum ".cont"
save
last physical conditions ".phy"
save
last lines emissivity ".emis"
H  
1  4861.33A
H  
1  6562.81A
He 1  3888.63A
He 1  4026.20A
He 1  4471.49A
He 1  5875.64A
He 1  6678.15A
He 1  7065.22A
end of lines

However, once I load the models and I try to get the line Helium line emissivities I get the "is not a correct line reference - 1" warning... . I have tried many formats: He_1_388863A, He__1_388863A, He  1 3888.63A, HE__1_388863A...

How can I get the lines labels which are accepted by this method?

Thanks a lot!!


Christophe Morisset

unread,
Nov 9, 2017, 6:50:17 PM11/9/17
to pyCloudy
Hi Vital,

If you read the model in the M CloudyModel object, you can obtain the labels using:

In [11]: print(M.emis_labels)
['H__1_486133A' 'H__1_656281A' 'HE_1_388863A' 'HE_1_402620A' 'HE_1_447149A'
 'HE_1_587564A' 'HE_1_667815A' 'HE_1_706522A']

You ca then have the integration over the volume of this emissivity by:
In [13]: M.get_emis_vol('HE_1_388863A')
Out[13]: 16972140.1517535


Hope it helps,
Saludos,
Christophe

Vital Fernández

unread,
Nov 16, 2017, 12:25:57 PM11/16/17
to pyCloudy
Hello Christophe!

Thank you very much that is very useful

I am comparing with those in Porter 12-13 (using pyneb) and these ones.

I will keep you updated!

Thanks again
Reply all
Reply to author
Forward
0 new messages