[misc] May last round of bug corrections
This commit is contained in:
+8
-3
@@ -269,7 +269,7 @@ class StudyProcessor(Aggregator, HDF5Container):
|
||||
return series
|
||||
|
||||
def _extract_stellar_from_log(self, stellar_objects, log_filename, run):
|
||||
cmd_grep = f"grep stellar {log_filename} -n"
|
||||
cmd_grep = f"grep 'stellar objects:' {log_filename} -n"
|
||||
content = os.popen(cmd_grep).readlines()
|
||||
nb_stellar = list(map(lambda s: int(s.split()[1]), content))
|
||||
line_numbers = list(map(lambda s: int(s.split(":")[0]), content))
|
||||
@@ -440,8 +440,13 @@ class StudyProcessor(Aggregator, HDF5Container):
|
||||
|
||||
def get_coldens0(self, run):
|
||||
mp = 1.4 * 1.66 * 10**(-24) * U.g
|
||||
z0 = self.get_nml("galbox_params/height0", run) * U.pc
|
||||
n0 = self.get_nml("galbox_params/dens0", run) * U.cm**(-3)
|
||||
try:
|
||||
z0 = self.get_nml("galbox_params/height0", run) * U.pc
|
||||
n0 = self.get_nml("galbox_params/dens0", run) * U.cm**(-3)
|
||||
except KeyError:
|
||||
z0 = self.get_nml("cloud_params/height0", run) * U.pc
|
||||
n0 = self.get_nml("cloud_params/dens0", run) * U.cm**(-3)
|
||||
|
||||
return (np.sqrt(2 * np.pi) * mp * z0 * n0).express(U.coldens)
|
||||
|
||||
def total_mass(self):
|
||||
|
||||
Reference in New Issue
Block a user