Skip to content

Commit

Permalink
fix error in volume-filling factor
Browse files Browse the repository at this point in the history
* should be working now
  • Loading branch information
CraigYanitski committed Jul 30, 2024
1 parent 5404504 commit d1c2ecb
Showing 1 changed file with 16 additions and 6 deletions.
22 changes: 16 additions & 6 deletions kosmatau3d/models/voxel.py
Original file line number Diff line number Diff line change
Expand Up @@ -513,13 +513,23 @@ def set_properties(
/ 100**3
for ens in range(len(constants.clump_mass_number))
]
self.__volume_factor = volume_factor
if isinstance(ensemble_density, (list, tuple, np.ndarray)):
self.__ensemble_density = ensemble_density
else:
self.__ensemble_density = [ensemble_density] * len(
constants.clump_mass_number
)
if isinstance(ensemble_density, (list, tuple, np.ndarray)):
self.__ensemble_density = ensemble_density
else:
self.__ensemble_density = [ensemble_density] * len(
constants.clump_mass_number
)
self.__volume_factor = [
self.__ensemble_mass[ens]
* constants.mass_solar
/ self.__ensemble_density[ens]
/ constants.mass_h
/ constants.voxel_size**3
/ constants.pc**3
/ 100**3
for ens in range(len(constants.clump_mass_number))
]

if isinstance(fuv, (list, tuple, np.ndarray)):
self.__fuv = fuv
Expand Down

0 comments on commit d1c2ecb

Please sign in to comment.