Read boxsize
This commit is contained in:
@@ -72,7 +72,9 @@ def load_fields(pp):
|
||||
|
||||
# Create dataset
|
||||
data = {
|
||||
"header": {"time": pp.time * pp.info["unit_time"].express(U.Myr)},
|
||||
"header": {"time": pp.time * pp.info["unit_time"].express(U.Myr),
|
||||
"fluids": ["gas", "stars", "dm"],
|
||||
"box_size": pp.info["unit_length"].express(U.kpc)},
|
||||
"gas": {
|
||||
"position": cells["position"] * pp.info["unit_length"].express(U.kpc),
|
||||
"volume": cells["volume"],
|
||||
@@ -99,10 +101,10 @@ def load_fields(pp):
|
||||
return data
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
if __name__ == "__main__" and False:
|
||||
from snapshotprocessor import SnapshotProcessor
|
||||
|
||||
pp = SnapshotProcessor(
|
||||
"/home/nbrucy/ecogal/galturb/F20H_7_1pc_frig", num=80, params="params_gal.yml"
|
||||
"/home/nbrucy/ecogal/galturb/F20H_15_4pc_frig_from_relax", num=50, params="params_gal.yml"
|
||||
)
|
||||
data = load_fields(pp)
|
||||
|
||||
Reference in New Issue
Block a user