Skip to content

Commit

Permalink
fix: complete manual ovveride tell
Browse files Browse the repository at this point in the history
  • Loading branch information
maffettone committed Apr 13, 2024
1 parent 1a4a711 commit dd4b6a3
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions pdf_agents/scientific_value.py
Original file line number Diff line number Diff line change
Expand Up @@ -112,9 +112,14 @@ def _value_function(self, X, Y):
def tell(self, x, y):
"""Update tell using relative info"""
x = x - self._motor_origins
doc = super().tell(x, y)
doc["absolute_position_offset"] = self._motor_origins
return doc
self.independent_cache.append(x)
self.observable_cache.append(y)
return dict(
independent_variable=x,
observable=y,
cache_len=len(self.independent_cache),
absolute_position_offset=self._motor_origins,
)

def report(self):
value = self._value_function(np.array(self.independent_cache), np.array(self.observable_cache))
Expand Down

0 comments on commit dd4b6a3

Please sign in to comment.