Skip to content

Commit

Permalink
Merge pull request #134 from brittonsmith/rdir
Browse files Browse the repository at this point in the history
Set output directory properly for rockstar halo finder.
  • Loading branch information
brittonsmith authored Jan 26, 2022
2 parents f119632 + 8ba862d commit ace1202
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion yt_astro_analysis/halo_analysis/halo_catalog/halo_catalog.py
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ def __init__(
halo_field_type="all",
finder_method=None,
finder_kwargs=None,
output_dir="halo_catalogs",
output_dir=None,
):

super().__init__()
Expand All @@ -134,6 +134,12 @@ def __init__(
data_source = halos_ds.all_data()
self.data_source = data_source

if output_dir is None:
if finder_method == "rockstar":
output_dir = finder_kwargs.get("outbase", "rockstar_halos")
else:
output_dir = "halo_catalogs"

self.output_basedir = ensure_dir(output_dir)
self.pipeline = AnalysisPipeline(output_dir=self.output_dir)
self.quantities = self.pipeline.quantities
Expand Down

0 comments on commit ace1202

Please sign in to comment.