def check_some_values(self, topic): # manually pre-calculate some values? supply an error as well expect(len(topic.points)).to_equal(3) expect(interf.value_at_point(topic, 50, 50, 1, 0)).to_equal( 9.166154761796539e-1) expect(interf.value_at_point(topic, 51, 50, 1, 0)).to_equal( 9.538223520374552e-1) expect(interf.value_at_point(topic, 50, 51, 1, 0)).to_equal( 8.966206758021245e-1) expect(interf.value_at_point(topic, 51, 51, 1, 0)).to_equal( 9.345812279980938e-1)
def values_at_point_values(self, topic): error = 1e-12 # calculate suitable error based on w? val = interf.value_at_point(topic[0], topic[1][0], topic[1][1], zoom=4, time=10) # vary zoom and time? expect(val).to_be_less_than(error)