[yt-svn] commit/yt-3.0: 7 new changesets
commits-noreply at bitbucket.org
commits-noreply at bitbucket.org
Wed Aug 21 11:42:01 PDT 2013
7 new commits in yt-3.0:
https://bitbucket.org/yt_analysis/yt-3.0/commits/1967e0050d28/
Changeset: 1967e0050d28
Branch: yt-3.0
User: MatthewTurk
Date: 2013-08-20 21:07:24
Summary: Removing NotImplemented error and check for other axis names.
Affected #: 1 file
diff -r 6e2d52bef215f9143407aedfe46bc8e1d9ea6187 -r 1967e0050d2854ed751332d82ab59e48b3c740cc yt/geometry/coordinate_handler.py
--- a/yt/geometry/coordinate_handler.py
+++ b/yt/geometry/coordinate_handler.py
@@ -198,17 +198,18 @@
return PolarFieldInfo
def pixelize(self, dimension, data_source, field, bounds, size, antialias = True):
- raise NotImplementedError
- if dimension == 1:
+ ax_name = self.axis_name[dimension]
+ if ax_name in ('r', 'theta'):
return self._ortho_pixelize(data_source, field, bounds, size,
antialias)
- elif dimension == 2:
- return self._polar_pixelize(data_source, field, bounds, size,
+ elif ax_name == "z":
+ return self._cyl_pixelize(data_source, field, bounds, size,
antialias)
else:
# Pixelizing along a cylindrical surface is a bit tricky
raise NotImplementedError
+
def _ortho_pixelize(self, data_source, field, bounds, size, antialias):
buff = _MPL.Pixelize(data_source['px'], data_source['py'],
data_source['pdx'], data_source['pdy'],
https://bitbucket.org/yt_analysis/yt-3.0/commits/a9c1f1c07666/
Changeset: a9c1f1c07666
Branch: yt-3.0
User: MatthewTurk
Date: 2013-08-21 18:22:50
Summary: We need an extra factor of dds to get the distance correct.
Affected #: 1 file
diff -r 1967e0050d2854ed751332d82ab59e48b3c740cc -r a9c1f1c07666e4594dccbdcbd53baaab9463204c yt/geometry/particle_deposit.pyx
--- a/yt/geometry/particle_deposit.pyx
+++ b/yt/geometry/particle_deposit.pyx
@@ -218,11 +218,14 @@
ib0[i] = iclip(ib0[i], 0, dim[i] - 1)
ib1[i] = iclip(ib1[i], 0, dim[i] - 1)
for i from ib0[0] <= i <= ib1[0]:
- idist[0] = (ii[0] - i) * (ii[0] - i) * dds[0]
+ idist[0] = (ii[0] - i) * dds[0]
+ idist[0] *= idist[0]
for j from ib0[1] <= j <= ib1[1]:
- idist[1] = (ii[1] - j) * (ii[1] - j) * dds[1]
+ idist[1] = (ii[1] - j) * dds[1]
+ idist[1] *= idist[1]
for k from ib0[2] <= k <= ib1[2]:
- idist[2] = (ii[2] - k) * (ii[2] - k) * dds[2]
+ idist[2] = (ii[2] - k) * dds[2]
+ idist[2] *= idist[2]
dist = idist[0] + idist[1] + idist[2]
# Calculate distance in multiples of the smoothing length
dist = sqrt(dist) / fields[0]
https://bitbucket.org/yt_analysis/yt-3.0/commits/b4ca9c3c4cee/
Changeset: b4ca9c3c4cee
Branch: yt-3.0
User: MatthewTurk
Date: 2013-08-21 18:49:46
Summary: It's time to put particle_filter in mods.py.
Affected #: 2 files
diff -r a9c1f1c07666e4594dccbdcbd53baaab9463204c -r b4ca9c3c4cee915b01c341ef07154b18d8ed9f66 yt/data_objects/api.py
--- a/yt/data_objects/api.py
+++ b/yt/data_objects/api.py
@@ -89,3 +89,6 @@
from particle_trajectories import \
ParticleTrajectoryCollection
+
+from particle_filters import \
+ particle_filter
diff -r a9c1f1c07666e4594dccbdcbd53baaab9463204c -r b4ca9c3c4cee915b01c341ef07154b18d8ed9f66 yt/mods.py
--- a/yt/mods.py
+++ b/yt/mods.py
@@ -64,7 +64,8 @@
ValidateParameter, ValidateDataField, ValidateProperty, \
ValidateSpatial, ValidateGridType, \
TimeSeriesData, AnalysisTask, analysis_task, \
- ParticleTrajectoryCollection, ImageArray
+ ParticleTrajectoryCollection, ImageArray, \
+ particle_filter
from yt.data_objects.derived_quantities import \
add_quantity, quantity_info
https://bitbucket.org/yt_analysis/yt-3.0/commits/f64fe766f68a/
Changeset: f64fe766f68a
Branch: yt-3.0
User: MatthewTurk
Date: 2013-08-21 19:28:22
Summary: When cycling through lots of particle types for ill-defined fields, we reset
last_freq.
Affected #: 1 file
diff -r b4ca9c3c4cee915b01c341ef07154b18d8ed9f66 -r f64fe766f68a36a04c29f89fd9806430399efc42 yt/data_objects/particle_fields.py
--- a/yt/data_objects/particle_fields.py
+++ b/yt/data_objects/particle_fields.py
@@ -45,6 +45,7 @@
def _AllFields(field, data):
v = []
for ptype in data.pf.particle_types:
+ data.pf._last_freq = (ptype, None)
if ptype == "all" or \
ptype in data.pf.known_filters:
continue
@@ -57,6 +58,7 @@
def _AllFields(field, data):
v = []
for ptype in data.pf.particle_types:
+ data.pf._last_freq = (ptype, None)
if ptype == "all" or \
ptype in data.pf.known_filters:
continue
https://bitbucket.org/yt_analysis/yt-3.0/commits/723556ebded0/
Changeset: 723556ebded0
Branch: yt-3.0
User: MatthewTurk
Date: 2013-08-21 20:14:56
Summary: Adding load_particles to yt.mods
Affected #: 1 file
diff -r f64fe766f68a36a04c29f89fd9806430399efc42 -r 723556ebded0369333691b62693f57fec4c60c1d yt/mods.py
--- a/yt/mods.py
+++ b/yt/mods.py
@@ -119,7 +119,8 @@
from yt.frontends.stream.api import \
StreamStaticOutput, StreamFieldInfo, add_stream_field, \
- StreamHandler, load_uniform_grid, load_amr_grids
+ StreamHandler, load_uniform_grid, load_amr_grids, \
+ load_particles
from yt.frontends.sph.api import \
OWLSStaticOutput, OWLSFieldInfo, add_owls_field, \
https://bitbucket.org/yt_analysis/yt-3.0/commits/f4853999c2b5/
Changeset: f4853999c2b5
Branch: yt-3.0
User: MatthewTurk
Date: 2013-08-21 20:41:12
Summary: Mandating a title for IPython notebooks uploaded to hub.
Affected #: 1 file
diff -r 723556ebded0369333691b62693f57fec4c60c1d -r f4853999c2b5b852006d6628719c882cddf966df yt/utilities/command_line.py
--- a/yt/utilities/command_line.py
+++ b/yt/utilities/command_line.py
@@ -1235,7 +1235,8 @@
lo.main( None, download=args.number )
class YTNotebookUploadCmd(YTCommand):
- args = (dict(short="file", type=str),)
+ args = (dict(short="file", type=str),
+ dict(long="--title", short="-t", type=str, default = None))
description = \
"""
Upload an IPython notebook to hub.yt-project.org.
@@ -1254,6 +1255,11 @@
t = json.loads(open(filename).read())['metadata']['name']
except (ValueError, KeyError):
print "File does not appear to be an IPython notebook."
+ if args.title is not None:
+ t = args.title
+ if len(t) == 0:
+ print "You need to specify a title with --title ."
+ return 1
from yt.utilities.minimal_representation import MinimalNotebook
mn = MinimalNotebook(filename, t)
rv = mn.upload()
https://bitbucket.org/yt_analysis/yt-3.0/commits/08a8f2e512f1/
Changeset: 08a8f2e512f1
Branch: yt-3.0
User: MatthewTurk
Date: 2013-08-21 20:41:38
Summary: Added tag yt-3.0a3 for changeset f4853999c2b5
Affected #: 1 file
diff -r f4853999c2b5b852006d6628719c882cddf966df -r 08a8f2e512f16552c3cb09f985ec49d28abb998f .hgtags
--- a/.hgtags
+++ b/.hgtags
@@ -5158,3 +5158,4 @@
0000000000000000000000000000000000000000 hop callback
a71dffe4bc813fdadc506ccad9efb632e23dc843 yt-3.0a1
954d1ffcbf04c3d1b394c2ea05324d903a9a07cf yt-3.0a2
+f4853999c2b5b852006d6628719c882cddf966df yt-3.0a3
Repository URL: https://bitbucket.org/yt_analysis/yt-3.0/
--
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