Power-law density distribution

48 views
Skip to first unread message

Gabriel Rubio

unread,
Apr 16, 2020, 6:17:27 PM4/16/20
to pyCloudy

Hi everyone.


I hope everybody stay safe and healthy at home. 

My question is about the use of the command “c_input.set_cste_density”, i want to use a  power-law density distribution. I know that is possible to include that with the following instruction c_input.set_cste_density(logdens, ff=ff, others=‘power x’) but using this line i have a TypeError: set_cste_density() got an unexpected keyword argument 'others'


anybody can help me? I’m using python 3.7 

Thanks in advance

Christophe Morisset

unread,
Apr 16, 2020, 7:42:55 PM4/16/20
to pyCloudy
Hi Gabriel,

Hoping you also are safe at home ;-)

The way you can change the density law is actually to ignore the set_cste_density method and put the density command in the set_others method:
For example:

options = ('no molecules',
            'no level2 lines',
            'no fine opacities',
            'COSMIC RAY BACKGROUND',
            'element limit off -8',
            'hden 9, power = -2'
           )
c_input.set_other(options)

You can also include the command for the filling factor in this tuple. Anything you need BTW.
Hope it helps,
Christophe
Reply all
Reply to author
Forward
0 new messages