Diff. Emis_vol in pycloudy and intensity in Cloudy

151 views
Skip to first unread message

SUVENDU RAKSHIT

unread,
Oct 29, 2013, 1:00:28 PM10/29/13
to pycl...@googlegroups.com
Hi, 

I am very new in pycloudy and cloudy. Could you please clear my doubts,
I understand that get_emis in pycloudy and save lines, emissivity in cloudy is the same and get_emis_vol is the integrated get_emis over volume(and this is the intensity of line). Am I right?
I have two other queries:
Is the get_emis_vol in pycloudy same as cloudy " save lines, intensity " commend? 
How to get emergent emissivity in pycloudy. Do we need to save it?
Thanks for the help.    

Regards,
Suvendu

Christophe Morisset

unread,
Nov 12, 2013, 10:07:57 AM11/12/13
to pycl...@googlegroups.com
Hi,

Sorry for the delay, I was organizing a conference... You are right that the integral over the volume of the emissivity gives the intensity of the line.
To answer your questions:
Is the get_emis_vol in pycloudy same as cloudy " save lines, intensity " commend? 
No, the get_emis_vol in pyCloudy is actually doing the numerical integration over the grid. In case of a CloudyModel object, it is done on the cloudy radial mesh and the result should be very close to the cloudy integration. In the case of a 3D object, the integration is performed on the 3D grid, which may leads to inaccurate results in case of a coarse grid and/or lines emitted in a thin region.
You can ask pyCloudy to print both outputs and compare them:

import pyCloudy as pc
In = pc.CloudyInput('test1')
In.set_cste_density(2)
In.set_radius(17)
In.set_BB(Teff = 50000, lumi_unit = 'q(H)', lumi_value = 47)
In.set_line_file('lines.dat')  # Line intensities
In.read_emis_file('lines.dat') # Line emissivities zone by zone
In.print_input()
In.run_cloudy(dir_='.')
Out = pc.CloudyModel('test1', read_lin=True) # Line emissivities are not read by default
for label in Out.line_labels:
    cloudy_intensity = Out.get_line(label)
    pyCloudy_intensity = Out.get_emis_vol(label)/ Out.get_emis_vol('H__1__4861A')
    diff = (cloudy_intensity - pyCloudy_intensity) / pyCloudy_intensity * 100
    print('{0} Cloudy intensity: {1:6.4f} pyCloudy integration: {2:6.4f}, difference: {3:6.4f}%'.format(label, cloudy_intensity, pyCloudy_intensity, diff))

How to get emergent emissivity in pycloudy. Do we need to save it?
The emergent emissivity is the Cloudy output by default. It is what you get from Out.get_emis('H__1__4861A')

SUVENDU RAKSHIT

unread,
Nov 14, 2013, 3:06:43 PM11/14/13
to pycl...@googlegroups.com
Hi,

Thanks you very much for the reply.
Yes, the difference is close to zero for 1D model.

Thanks,
Suv
Reply all
Reply to author
Forward
0 new messages