[yt-svn] commit/yt: brittonsmith: Merged in hegan/yt/yt-3.0 (pull request #982)
commits-noreply at bitbucket.org
commits-noreply at bitbucket.org
Tue Jul 1 04:26:51 PDT 2014
1 new commit in yt:
https://bitbucket.org/yt_analysis/yt/commits/6e33df0e38cb/
Changeset: 6e33df0e38cb
Branch: yt-3.0
User: brittonsmith
Date: 2014-07-01 13:26:41
Summary: Merged in hegan/yt/yt-3.0 (pull request #982)
Added halo finding method kwargs to HaloCatalog
Affected #: 2 files
diff -r 103131490fefcf01b2a7288ad246869fe853dd47 -r 6e33df0e38cbe4b7887b272bd7559597322177ad yt/analysis_modules/halo_analysis/halo_catalog.py
--- a/yt/analysis_modules/halo_analysis/halo_catalog.py
+++ b/yt/analysis_modules/halo_analysis/halo_catalog.py
@@ -59,6 +59,8 @@
output_dir : str
The top level directory into which analysis output will be written.
Default: "."
+ finder_kwargs : dict
+ Arguments to pass to the halo finder if finder_method is given.
Examples
--------
@@ -98,6 +100,7 @@
def __init__(self, halos_pf=None, data_pf=None,
data_source=None, finder_method=None,
+ finder_kwargs=None,
output_dir="halo_catalogs/catalog"):
ParallelAnalysisInterface.__init__(self)
self.halos_pf = halos_pf
@@ -122,8 +125,11 @@
self.data_source = data_source
if finder_method is not None:
- finder_method = finding_method_registry.find(finder_method)
+ finder_method = finding_method_registry.find(finder_method,
+ **finder_kwargs)
self.finder_method = finder_method
+ if finder_kwargs is None:
+ finder_kwargs = {}
# all of the analysis actions to be performed: callbacks, filters, and quantities
self.actions = []
diff -r 103131490fefcf01b2a7288ad246869fe853dd47 -r 6e33df0e38cbe4b7887b272bd7559597322177ad yt/analysis_modules/halo_analysis/halo_finding_methods.py
--- a/yt/analysis_modules/halo_analysis/halo_finding_methods.py
+++ b/yt/analysis_modules/halo_analysis/halo_finding_methods.py
@@ -44,27 +44,27 @@
def __call__(self, ds):
return self.function(ds, *self.args, **self.kwargs)
-def _hop_method(pf):
+def _hop_method(pf, **finder_kwargs):
r"""
Run the Hop halo finding method.
"""
- halo_list = HOPHaloFinder(pf)
+ halo_list = HOPHaloFinder(pf, **finder_kwargs)
halos_pf = _parse_old_halo_list(pf, halo_list)
return halos_pf
add_finding_method("hop", _hop_method)
-def _fof_method(pf):
+def _fof_method(pf, **finder_kwargs):
r"""
Run the FoF halo finding method.
"""
- halo_list = FOFHaloFinder(pf)
+ halo_list = FOFHaloFinder(pf, **finder_kwargs)
halos_pf = _parse_old_halo_list(pf, halo_list)
return halos_pf
add_finding_method("fof", _fof_method)
-def _rockstar_method(pf):
+def _rockstar_method(pf, **finder_kwargs):
r"""
Run the Rockstar halo finding method.
"""
@@ -74,7 +74,7 @@
from yt.analysis_modules.halo_finding.rockstar.api import \
RockstarHaloFinder
- rh = RockstarHaloFinder(pf)
+ rh = RockstarHaloFinder(pf, **finder_kwargs)
rh.run()
Repository URL: https://bitbucket.org/yt_analysis/yt/
--
This is a commit notification from bitbucket.org. You are receiving
this because you have the service enabled, addressing the recipient of
this email.
More information about the yt-svn
mailing list