|
pyCloudy
0.8.54
manage Cloudy photoionization code
|
Inherits object.
Public Member Functions | |
| def | __init__ |
| def | save_coeffs (self, file_coeffs) |
| def | nH (self) |
| def | ne (self) |
| def | te (self) |
| def | ff (self) |
| def | get_emis (self, ref) |
| def | get_emis_list |
| def | del_emis (self, ref) |
| def | get_emis_vol |
| def | Hp_mass (self) |
Hp_mass = [solar mass]. More... | |
| def | H0_mass (self) |
H0_mass = [solar mass]. More... | |
| def | H_mass (self) |
H_mass = [solar mass]. More... | |
| def | get_ionic (self, elem, ion) |
| def | get_ionic_list (self) |
| def | del_ionic (self, elem, ion) |
| def | print_all_emis_vol |
| def | vol_integ (self, a) |
| def | vol_mean (self, a, b) |
| def | get_T0_emis (self, ref) |
| def | get_t2_emis (self, ref) |
| def | get_T0_ion_vol (self, elem, ion) |
| def | get_t2_ion_vol (self, elem, ion) |
| def | get_T0_ion_vol_ne (self, elem, ion) |
| def | get_t2_ion_vol_ne (self, elem, ion) |
| def | get_ab_ion_vol |
| def | get_ab_ion_vol_ne |
| def | get_vel_ionic (self, elem, ion) |
| def | get_vel_emis (self, ref) |
| def | set_velocity (self, args, kwargs) |
| def | config_profile |
| def | get_profile |
| def | get_profile_list (self) |
| def | del_profile |
| def | plot_profiles |
| def | get_RGB |
Public Attributes | |
| log_ | |
| calling | |
| interp_method | |
| r_interp_method | |
| n_dim | |
| dims | |
| center | |
| plan_sym | |
| r_max | |
| m | |
| file_coeffs | |
| theta_tab | |
| phi_tab | |
| emis_labels | |
| x_unit | |
| cub_coord | |
| relative_depth | |
| vel_tab | |
| im_R | |
| im_G | |
| im_B | |
Static Public Attributes | |
| tuple | sqpi = np.sqrt(np.pi) |
Properties | |
| angles = property(_get_angles, _set_angles, None, None) | |
| v_turb = property(_get_v_turb, _set_v_turb, None, 'Turbulent velocity (km/s)') | |
| size_spectrum = property(_get_size_spectrum, _set_size_spectrum, None, "size of the array to compute line profile (pixels)") | |
| vel_max = property(_get_vel_max, _set_vel_max, None, "Line profiles computed between -vel_max and +vel_max") | |
| profile_function = property(_get_pf, _set_pf, None, 'Profile function for the line profile f(x, zeta_0)') | |
| def __init__ | ( | self, | |
| list_of_models, | |||
dims = 51, |
|||
center = True, |
|||
angles = None, |
|||
n_dim = 2, |
|||
file_coeffs = None, |
|||
interp_method = None, |
|||
plan_sym = False, |
|||
r_max = None, |
|||
r_interp_method = 'numpy' |
|||
| ) |
Object to create and manage pseudo-3D models.
param:
- list_of_models [list of pyCloudy.CloudyModel] list of models, as obtained e.g. by pyCloudy.load_models
- dims [int 1- or 3-elements array-list] dimension of the cube. May be different. One may be 1.
- center [boolean] if True, the coordinate-center is in the center of the cube, otherwise it's in the corner.
- angles [3-elements array-list] (degrees) rotation angles
- n_dims [int]
- file_coeffs [str] file_ to store the coeffs (not used yet)
- interp_method [str] method used for the interpolation of theta and phi
- plan_sym [Boolean] If True, the theta angles are only from 0 to 90, negative values are obtained by
mirror symmetry on the equatorial plane
- r_max [float] (cm) Geometrical size of the cube
- r_interp_method [str] method used for the radial interpolation (numpy or scipy)
| def config_profile | ( | self, | |
size_spectrum = 21, |
|||
vel_max = 20., |
|||
v_turb = 5., |
|||
profile_function = 'gaussian' |
|||
| ) |
param:
- size_spectrum [int] size of the array to compute emission line profiles
- vel_max [float] (km/s) the line profiles are computed on the [-vel_max, vel_max] array
- v_turb [float] (km/s) turbulent velocity
- profile_function ['gaussian' or a function] shape of the profile. If not 'gaussian', a user defined
function must be provide, taking x and zeta_0 as arguments.
| def del_emis | ( | self, | |
| ref | |||
| ) |
Delete the emissivity cube associated to the reference
| def del_ionic | ( | self, | |
| elem, | |||
| ion | |||
| ) |
Delete a ionic fraction cube
| def del_profile | ( | self, | |
ref = None, |
|||
axis = 'x' |
|||
| ) |
Delete a line profile cube.
| def ff | ( | self | ) |
| def get_ab_ion_vol | ( | self, | |
elem = None, |
|||
ion = None |
|||
| ) |
Return Integ(Xi/X.nH / Integ(nH)
| def get_ab_ion_vol_ne | ( | self, | |
elem = None, |
|||
ion = None |
|||
| ) |
Return Integ(Xi/X.ne.nH / Integ(ne.nH)
| def get_emis | ( | self, | |
| ref | |||
| ) |
Interpolate the emissivity of the referred line on the 3D cube
param:
ref [int or str] line reference
return:
3D cube of emissivities (erg/s/cm3)
| def get_emis_list | ( | self, | |
available = False |
|||
| ) |
Return the list of labels for the line emissivities
| def get_emis_vol | ( | self, | |
| ref, | |||
at_earth = False |
|||
| ) |
Compute the intensity of a line.
Parameters:
- ref [int or str]: line reference
- at_earth: if True (not default): the result is divided by 4.pi.D2
return:
integral of the emissivity of the referred line on the volume of cube (erg/s)
| def get_ionic | ( | self, | |
| elem, | |||
| ion | |||
| ) |
Return the 3D cube of ionic fraction corresponding to elem, ion
| def get_ionic_list | ( | self | ) |
Return the labels of the computed ionic fraction cubes
| def get_profile | ( | self, | |
| ref, | |||
axis = 'x' |
|||
| ) |
return:
the emission line profiles as a 3D spectral data of shape (size_spectrum, dim1, dim2),
where dim1 and dim2 are the dimensions in the directions not being the axis.
param:
ref [int or str] line reference
axis [one of 'x', 'y', 'z', 0, 1, 2] projection axis for the line profile
| def get_profile_list | ( | self | ) |
Return the labels of the computed line profiles
| def get_RGB | ( | self, | |
list_emis = [0, |
|||
axes = 1 |
|||
| ) |
Return a 3-colored imaged.
Parameters:
- list_emis: list of indices of the line to be used. Default = [0, 1, 2], associated to R, G, B.
Elements of the list are integers or line references.
- axes: on which the projection is done.
Usage:
plt.imshow(m3d.get_RGB(['N__2__6548A', 'O__3__5007A', 'H__1__4861A']))
| def get_T0_emis | ( | self, | |
| ref | |||
| ) |
Return Integ(Te.Emiss(ref)) / Integ(Emiss(ref))
| def get_T0_ion_vol | ( | self, | |
| elem, | |||
| ion | |||
| ) |
Return Integ(Te.nH.Xi/X) / Integ(nH.Xi/X)
| def get_T0_ion_vol_ne | ( | self, | |
| elem, | |||
| ion | |||
| ) |
Return Integ(Te.ne.nH.Xi/X) / Integ(ne.nH.Xi/X)
| def get_t2_emis | ( | self, | |
| ref | |||
| ) |
Return Integ((Te-T0)**2.Emiss(ref)) / Integ(Emiss(ref)) / T0**2
| def get_t2_ion_vol | ( | self, | |
| elem, | |||
| ion | |||
| ) |
Return Integ((Te-T0)**2.nH.Xi/X) / Integ(nH.Xi/X) / T0**2
| def get_t2_ion_vol_ne | ( | self, | |
| elem, | |||
| ion | |||
| ) |
Return Integ((Te-T0)**2.ne.nH.Xi/X) / Integ(ne.nH.Xi/X) / T0**2
| def get_vel_emis | ( | self, | |
| ref | |||
| ) |
return the velocity weigthed by the line emissivity
param:
ref [int or str] a line reference
| def get_vel_ionic | ( | self, | |
| elem, | |||
| ion | |||
| ) |
return the velocity weigthed by the ionic fraction
param:
elem [str] element
ion [int] ionic stage
| def H0_mass | ( | self | ) |
H0_mass =
[solar mass].
Return the H0 mass of the nebula in solar mass
| def H_mass | ( | self | ) |
H_mass =
[solar mass].
Return the H mass of the nebula in solar mass
| def Hp_mass | ( | self | ) |
Hp_mass =
[solar mass].
Return the H+ mass of the nebula in solar mass
| def ne | ( | self | ) |
| def nH | ( | self | ) |
| def plot_profiles | ( | self, | |
Nx = 10, |
|||
Ny = 10, |
|||
ref = None, |
|||
axis = 'x', |
|||
normalized = True, |
|||
i_fig = None, |
|||
transp = True, |
|||
color = 'yellow', |
|||
pos_x0 = 0., |
|||
pos_y0 = 0., |
|||
pos_dx = 1.0, |
|||
pos_dy = 1.0 |
|||
| ) |
Still experimental. Some problem with the size and shape of the axes.
| def print_all_emis_vol | ( | self, | |
norm = None |
|||
| ) |
Print the intensities of all the lines
Parameter:
- norm [str or int]: line ref to nromalize the intnesities
| def save_coeffs | ( | self, | |
| file_coeffs | |||
| ) |
| def set_velocity | ( | self, | |
| args, | |||
| kwargs | |||
| ) |
Call cub_coord.set_velocity with the same parameters and reset profiles.
| def te | ( | self | ) |
| def vol_integ | ( | self, | |
| a | |||
| ) |
Volume integrator
| def vol_mean | ( | self, | |
| a, | |||
| b | |||
| ) |
Volume weighted integrator.
Return Integ(a*b) / Integ(b)
Parameters:
- a: to be integrated
- b: the weigth
| calling |
| center |
| cub_coord |
| dims |
| emis_labels |
| file_coeffs |
| im_B |
| im_G |
| im_R |
| interp_method |
| log_ |
| m |
| n_dim |
| phi_tab |
| plan_sym |
| r_interp_method |
| r_max |
| relative_depth |
|
static |
| theta_tab |
| vel_tab |
| x_unit |
|
static |
|
static |
|
static |
|
static |
|
static |