[yt-svn] commit/yt: 5 new changesets
commits-noreply at bitbucket.org
commits-noreply at bitbucket.org
Tue Jul 1 04:26:50 PDT 2014
5 new commits in yt:
https://bitbucket.org/yt_analysis/yt/commits/ee96f89cad3d/
Changeset: ee96f89cad3d
Branch: yt-3.0
User: hegan
Date: 2014-06-26 00:57:01
Summary: Added halo finding method kwargs
Affected #: 2 files
diff -r 51e5fd53e4dcc5927fee55cb2ec0e1517bb50f63 -r ee96f89cad3d040d7568acdba74ce43b3abec0ca 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,7 +125,7 @@
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
# all of the analysis actions to be performed: callbacks, filters, and quantities
diff -r 51e5fd53e4dcc5927fee55cb2ec0e1517bb50f63 -r ee96f89cad3d040d7568acdba74ce43b3abec0ca 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()
https://bitbucket.org/yt_analysis/yt/commits/df3a93981d9f/
Changeset: df3a93981d9f
Branch: yt-3.0
User: hegan
Date: 2014-06-26 01:04:34
Summary: finder_kwargs default should be {} not None so it doesnt break when no kwargs are given
Affected #: 1 file
diff -r ee96f89cad3d040d7568acdba74ce43b3abec0ca -r df3a93981d9f148a44ad872e92f7f46120d87799 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
@@ -100,7 +100,7 @@
def __init__(self, halos_pf=None, data_pf=None,
data_source=None, finder_method=None,
- finder_kwargs=None,
+ finder_kwargs={},
output_dir="halo_catalogs/catalog"):
ParallelAnalysisInterface.__init__(self)
self.halos_pf = halos_pf
@@ -125,7 +125,11 @@
self.data_source = data_source
if finder_method is not None:
- finder_method = finding_method_registry.find(finder_method, **finder_kwargs)
+ #if finder_kwargs is not None:
+ finder_method = finding_method_registry.find(finder_method,
+ **finder_kwargs)
+ #else:
+ # finder_method = finding_method_registry.find(finder_method)
self.finder_method = finder_method
# all of the analysis actions to be performed: callbacks, filters, and quantities
https://bitbucket.org/yt_analysis/yt/commits/e66b96702434/
Changeset: e66b96702434
Branch: yt-3.0
User: hegan
Date: 2014-06-26 01:08:24
Summary: removed extraneous comments
Affected #: 1 file
diff -r df3a93981d9f148a44ad872e92f7f46120d87799 -r e66b9670243450671de2e56923268ccd9d641cf0 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
@@ -125,11 +125,8 @@
self.data_source = data_source
if finder_method is not None:
- #if finder_kwargs is not None:
finder_method = finding_method_registry.find(finder_method,
**finder_kwargs)
- #else:
- # finder_method = finding_method_registry.find(finder_method)
self.finder_method = finder_method
# all of the analysis actions to be performed: callbacks, filters, and quantities
https://bitbucket.org/yt_analysis/yt/commits/98352637e754/
Changeset: 98352637e754
Branch: yt-3.0
User: hegan
Date: 2014-06-30 16:35:08
Summary: default value of finder_kwargs is None, not empty dict
Affected #: 1 file
diff -r e66b9670243450671de2e56923268ccd9d641cf0 -r 98352637e75443ea2b3cd1caec1014bcb389e240 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
@@ -100,7 +100,7 @@
def __init__(self, halos_pf=None, data_pf=None,
data_source=None, finder_method=None,
- finder_kwargs={},
+ finder_kwargs=None,
output_dir="halo_catalogs/catalog"):
ParallelAnalysisInterface.__init__(self)
self.halos_pf = halos_pf
@@ -128,6 +128,8 @@
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 = []
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