<html><body>
<p>4 new commits in yt:</p>
<p><a href="https://bitbucket.org/yt_analysis/yt/commits/2bfe9f0abf0c/">https://bitbucket.org/yt_analysis/yt/commits/2bfe9f0abf0c/</a> Changeset: 2bfe9f0abf0c Branch: yt User: MatthewTurk Date: 2016-03-22 01:43:29+00:00 Summary: Adding ability to specify DatasetSeries is not a mixed data type.</p>
<p>For cases where identifying and loading datasets can be costly, this caches it. It defaults to true. ExodusII in particular can be slow if you're loading lots of HDF5-based datasets. Affected #: 1 file</p>
<p>diff -r de823c10fed9f0b5fd4acf0512c45fc7d9cc491a -r 2bfe9f0abf0c84be5440cf3e158bf10bb9a05845 yt/data_objects/time_series.py --- a/yt/data_objects/time_series.py +++ b/yt/data_objects/time_series.py @@ -154,8 +154,9 @@</p>
<pre> return ret
def __init__(self, outputs, parallel = True, setup_function = None,</pre>
<ul><li><p>**kwargs):</p></li></ul>
<p>+ mixed_dataset_types = False, **kwargs):</p>
<pre># This is needed to properly set _pre_outputs for Simulation subclasses.</pre>
<p>+ self._mixed_dataset_types = mixed_dataset_types</p>
<pre> if iterable(outputs) and not isinstance(outputs, string_types):
self._pre_outputs = outputs[:]
self.tasks = AnalysisTaskProxy(self)</pre>
<p>@@ -173,7 +174,7 @@</p>
<pre> # We can make this fancier, but this works
for o in self._pre_outputs:
if isinstance(o, string_types):</pre>
<ul><li><p>ds = load(o, **self.kwargs)</p></li></ul>
<p>+ ds = self._load(o, **self.kwargs)</p>
<pre> self._setup_function(ds)
yield ds
else:</pre>
<p>@@ -187,7 +188,7 @@</p>
<pre>return DatasetSeries(self._pre_outputs[key], self.parallel)
o = self._pre_outputs[key]
if isinstance(o, string_types):</pre>
<ul><li><p>o = load(o, **self.kwargs)</p></li></ul>
<p>+ o = self._load(o, **self.kwargs)</p>
<pre> self._setup_function(o)
return o
</pre>
<p>@@ -278,7 +279,7 @@</p>
<pre> sto, output = output
if isinstance(output, string_types):</pre>
<ul><li><p>ds = load(output, **self.kwargs)</p></li></ul>
<p>+ ds = self._load(output, **self.kwargs)</p>
<pre> self._setup_function(ds)
else:
ds = output</pre>
<p>@@ -384,6 +385,16 @@</p>
<pre> obj = cls(filenames, parallel = parallel)
return obj
</pre>
<p>+ <em>dataset_cls = None + def <em>load(self, output_fn, **kwargs): + if self._dataset_cls is not None: + return self._dataset_cls(output_fn, **kwargs) + elif self._mixed_dataset_types: + return load(output_fn, **kwargs) + ds = load(output_fn, **kwargs) + self._dataset_cls = ds.__class</em></em> + return ds +</p>
<pre>class TimeSeriesQuantitiesContainer(object):
def __init__(self, data_object, quantities):
self.data_object = data_object</pre>
<p><a href="https://bitbucket.org/yt_analysis/yt/commits/f0c2e2f6f94e/">https://bitbucket.org/yt_analysis/yt/commits/f0c2e2f6f94e/</a> Changeset: f0c2e2f6f94e Branch: yt User: MatthewTurk Date: 2016-03-24 14:03:31+00:00 Summary: Adding docstring Affected #: 1 file</p>
<p>diff -r 2bfe9f0abf0c84be5440cf3e158bf10bb9a05845 -r f0c2e2f6f94e53b807c50825de63796fc2c57f4b yt/data_objects/time_series.py --- a/yt/data_objects/time_series.py +++ b/yt/data_objects/time_series.py @@ -123,6 +123,11 @@</p>
<pre> file provided to the loop.
setup_function : callable, accepts a ds
This function will be called whenever a dataset is loaded.</pre>
<p>+ mixed_dataset_types : True or False, default False + If the times of datasets provided are not always going to be generated + by the same frontend, this should be True. Assuming identical datasets + will use the frontend Dataset class rather than using ``load``, which + provides a considerable speedup in some cases.</p>
<pre>Examples
--------</pre>
<p><a href="https://bitbucket.org/yt_analysis/yt/commits/40ea2c54805c/">https://bitbucket.org/yt_analysis/yt/commits/40ea2c54805c/</a> Changeset: 40ea2c54805c Branch: yt User: MatthewTurk Date: 2016-03-24 15:01:02+00:00 Summary: Rewording Affected #: 1 file</p>
<p>diff -r f0c2e2f6f94e53b807c50825de63796fc2c57f4b -r 40ea2c54805ced9385cf40630928db33e23c1a38 yt/data_objects/time_series.py --- a/yt/data_objects/time_series.py +++ b/yt/data_objects/time_series.py @@ -124,10 +124,9 @@</p>
<pre>setup_function : callable, accepts a ds
This function will be called whenever a dataset is loaded.
mixed_dataset_types : True or False, default False</pre>
<ul><li><p>If the times of datasets provided are not always going to be generated</p></li>
<li><p>by the same frontend, this should be True. Assuming identical datasets</p></li>
<li><p>will use the frontend Dataset class rather than using ``load``, which</p></li>
<li><p>provides a considerable speedup in some cases.</p></li></ul>
<p>+ Set to True if the DatasetSeries will load different dataset types, set + to False if loading dataset of a single type as this will result in a + considerable speed up from not having to figure out the dataset type.</p>
<pre>Examples
--------</pre>
<p><a href="https://bitbucket.org/yt_analysis/yt/commits/f12067d78ef4/">https://bitbucket.org/yt_analysis/yt/commits/f12067d78ef4/</a> Changeset: f12067d78ef4 Branch: yt User: chummels Date: 2016-03-24 15:06:15+00:00 Summary: Merged in MatthewTurk/yt (pull request #2062)</p>
<p>Adding ability to specify DatasetSeries is not a mixed data type. Affected #: 1 file</p>
<p>diff -r 66d8895f15b34d51b001a3618ff9c89f5bc765a9 -r f12067d78ef445599aa567bc5e38a6406bef9f06 yt/data_objects/time_series.py --- a/yt/data_objects/time_series.py +++ b/yt/data_objects/time_series.py @@ -123,6 +123,10 @@</p>
<pre> file provided to the loop.
setup_function : callable, accepts a ds
This function will be called whenever a dataset is loaded.</pre>
<p>+ mixed_dataset_types : True or False, default False + Set to True if the DatasetSeries will load different dataset types, set + to False if loading dataset of a single type as this will result in a + considerable speed up from not having to figure out the dataset type.</p>
<pre>Examples
--------</pre>
<p>@@ -154,8 +158,9 @@</p>
<pre> return ret
def __init__(self, outputs, parallel = True, setup_function = None,</pre>
<ul><li><p>**kwargs):</p></li></ul>
<p>+ mixed_dataset_types = False, **kwargs):</p>
<pre># This is needed to properly set _pre_outputs for Simulation subclasses.</pre>
<p>+ self._mixed_dataset_types = mixed_dataset_types</p>
<pre> if iterable(outputs) and not isinstance(outputs, string_types):
self._pre_outputs = outputs[:]
self.tasks = AnalysisTaskProxy(self)</pre>
<p>@@ -173,7 +178,7 @@</p>
<pre> # We can make this fancier, but this works
for o in self._pre_outputs:
if isinstance(o, string_types):</pre>
<ul><li><p>ds = load(o, **self.kwargs)</p></li></ul>
<p>+ ds = self._load(o, **self.kwargs)</p>
<pre> self._setup_function(ds)
yield ds
else:</pre>
<p>@@ -187,7 +192,7 @@</p>
<pre>return DatasetSeries(self._pre_outputs[key], self.parallel)
o = self._pre_outputs[key]
if isinstance(o, string_types):</pre>
<ul><li><p>o = load(o, **self.kwargs)</p></li></ul>
<p>+ o = self._load(o, **self.kwargs)</p>
<pre> self._setup_function(o)
return o
</pre>
<p>@@ -278,7 +283,7 @@</p>
<pre> sto, output = output
if isinstance(output, string_types):</pre>
<ul><li><p>ds = load(output, **self.kwargs)</p></li></ul>
<p>+ ds = self._load(output, **self.kwargs)</p>
<pre> self._setup_function(ds)
else:
ds = output</pre>
<p>@@ -384,6 +389,16 @@</p>
<pre> obj = cls(filenames, parallel = parallel)
return obj
</pre>
<p>+ <em>dataset_cls = None + def <em>load(self, output_fn, **kwargs): + if self._dataset_cls is not None: + return self._dataset_cls(output_fn, **kwargs) + elif self._mixed_dataset_types: + return load(output_fn, **kwargs) + ds = load(output_fn, **kwargs) + self._dataset_cls = ds.__class</em></em> + return ds +</p>
<pre>class TimeSeriesQuantitiesContainer(object):
def __init__(self, data_object, quantities):
self.data_object = data_object</pre>
<p>Repository URL: <a href="https://bitbucket.org/yt_analysis/yt/">https://bitbucket.org/yt_analysis/yt/</a></p>
<p>—</p>
<p>This is a commit notification from bitbucket.org. You are receiving this because you have the service enabled, addressing the recipient of this email.</p>
<img src="http://link.bitbucket.org/wf/open?upn=ll4ctv0L-2ByeRZFC1LslHcg6aJmnQ70VruLbmeLQr27CKsGIrvf8eg1WFzr4uRypUdT5gugSmQ31bLHYGjh0HlxmkXsDwcDTSOjWxn7td3tctVtqxQgeXP5HAxEpGfzTOG5hCHjSq93Z-2BzQ5v2t2Mz8v4c-2BcbAsxdl9vOf16ou-2F6SiYG74HrIxLMVExpbOI0uiMg6Z9hXfre6PP9g0GhqjgGxDguQ5bvX-2BJTHgC5mGvY-3D" alt="" width="1" height="1" border="0" style="height:1px !important;width:1px !important;border-width:0 !important;margin-top:0 !important;margin-bottom:0 !important;margin-right:0 !important;margin-left:0 !important;padding-top:0 !important;padding-bottom:0 !important;padding-right:0 !important;padding-left:0 !important;"/>
</body></html>