Skip to content

Commit 8bd97a5

Browse files
author
Macy Huston
committed
debug 0 star lost_mass_option=3 case
1 parent 0f945c0 commit 8bd97a5

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

synthpop/population.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -733,7 +733,7 @@ def generate_field(self) -> Tuple[pandas.DataFrame, Dict]:
733733
n_star_expected, mass_per_slice = self.get_n_star_expected(
734734
radii, average_imass_per_star, av_mass_corr)
735735

736-
if (self.lost_mass_option == 3) and (self.population_density.density_unit != 'number'):
736+
if (self.lost_mass_option == 3) and (self.population_density.density_unit != 'number') and (sum(n_star_expected)>0):
737737
if np.sum(n_star_expected) < self.N_av_mass:
738738
n_star_expected *= self.N_av_mass / np.sum(n_star_expected)
739739

0 commit comments

Comments
 (0)