def test_nexpose(self): ti = 95000.0 tf = self.t_postgl z = lambda t: 0.01 * t N, _ = sim.nexpose(self.n, z, ti, tf, p=self.p) Nmoretime, _ = sim.nexpose(self.n, z, ti + 500.0, tf - 500.0, p=self.p) Nmoredepth, _ = sim.nexpose( self.n, lambda t: z(t) + 1000.0, ti, tf, p=self.p) Nmorethick, _ = sim.nexpose(self.n, z, ti, tf, thickness=self.thickness, p=self.p) self.assertTrue(N < Nmoretime) print(N, Nmoredepth) self.assertTrue(N > Nmoredepth) self.assertTrue(N > Nmorethick)
def residual(t): C_model, _ = sim.nexpose(n, z, t, p=P, thickness=thickness) return np.abs(C - C_model)