diff --git a/navipy/moving/agent.py b/navipy/moving/agent.py index 7b30f1721f9bc6a4ebddcbb43949704884ccb7e8..baa501a962b92702d257ac483165d9531363d27c 100644 --- a/navipy/moving/agent.py +++ b/navipy/moving/agent.py @@ -49,7 +49,7 @@ class DefaultBrain(): class AbstractAgent(): - def __init__(self, convention='rxyz'): + def __init__(self, convention='rzyx'): self._brain = DefaultBrain() self._alter_posorientvel = defaultcallback tuples = [('location', 'x'), ('location', 'y'), diff --git a/navipy/moving/test_agent.py b/navipy/moving/test_agent.py index 3319808148c5b7baca40fbf7fae78345c6810a05..46c46ff79d84333c3479cf3f00393ff2c225826d 100644 --- a/navipy/moving/test_agent.py +++ b/navipy/moving/test_agent.py @@ -18,7 +18,7 @@ version = float(nx.__version__) class BrainTest(Brain): def __init__(self, renderer=None): Brain.__init__(self, renderer=renderer) - convention = 'rxyz' + convention = 'rzyx' tuples = [('location', 'x'), ('location', 'y'), ('location', 'z'), (convention, 'alpha_0'), (convention, 'alpha_1'), (convention, 'alpha_2')] @@ -48,21 +48,23 @@ class TestNavipyMovingAgent(unittest.TestCase): self.mydb_filename = pkg_resources.resource_filename( 'navipy', 'resources/database.db') self.mydb = navidb.DataBaseLoad(self.mydb_filename) + self.convention = 'rzyx' self.brain = BrainTest(self.mydb) - convention = 'rxyz' tuples = [('location', 'x'), ('location', 'y'), - ('location', 'z'), (convention, 'alpha_0'), - (convention, 'alpha_1'), (convention, 'alpha_2')] + ('location', 'z'), (self.convention, 'alpha_0'), + (self.convention, 'alpha_1'), (self.convention, 'alpha_2')] index = pd.MultiIndex.from_tuples(tuples, names=['position', 'orientation']) self.__posorient_col = index tuples_vel = [('location', 'x'), ('location', 'y'), - ('location', 'z'), (convention, 'alpha_0'), - (convention, 'alpha_1'), (convention, 'alpha_2'), + ('location', 'z'), (self.convention, 'alpha_0'), + (self.convention, 'alpha_1'), + (self.convention, 'alpha_2'), ('location', 'dx'), ('location', 'dy'), - ('location', 'dz'), (convention, 'dalpha_0'), - (convention, 'dalpha_1'), (convention, 'dalpha_2')] + ('location', 'dz'), (self.convention, 'dalpha_0'), + (self.convention, 'dalpha_1'), + (self.convention, 'dalpha_2')] index_vel = pd.MultiIndex.from_tuples(tuples_vel, names=['position', 'orientation']) @@ -87,7 +89,7 @@ class TestNavipyMovingAgent(unittest.TestCase): # GridAgent # def test_move_gridagent(self): - agent = naviagent.GridAgent(self.brain, 'rxyz') + agent = naviagent.GridAgent(self.brain, self.convention) initposorient = None with warnings.catch_warnings(record=True): initposorient = self.brain.posorients.loc[13, :] @@ -114,7 +116,7 @@ class TestNavipyMovingAgent(unittest.TestCase): obtained, initposorient.loc[obtained.index])) def test_fly_gridagent(self): - agent = naviagent.GridAgent(self.brain, 'rxyz') + agent = naviagent.GridAgent(self.brain, self.convention) initposorient = None with warnings.catch_warnings(record=True): initposorient = self.brain.posorients.loc[13, :]