Skip to content

Commit

Permalink
lazy :D
Browse files Browse the repository at this point in the history
  • Loading branch information
paulalndwhr committed Oct 20, 2023
1 parent 0ee88e5 commit 38245f2
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/doptics/functions.py
Original file line number Diff line number Diff line change
Expand Up @@ -187,3 +187,9 @@ def rescaling_target_distribution() -> None:
integral_y1 = appropriate_g_factor * sc.integrate.quad(g, yl, yr)[0]
print(integral_x[0])
print(integral_y1)


def function_equality_checker(true_func: Callable, test_func: Callable, domain: ArrayLike):
sample = (domain[1] - domain[0]) * np.random.Generator.random() + domain[0]

return False
3 changes: 3 additions & 0 deletions tests/test_target.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import doptics.functions as func
import doptics.target as tg
import numpy as np
from typing import Callable
from icecream import ic

Expand All @@ -26,6 +27,8 @@ def test_point_target_construction():

# assert targ.y1_density == y1_density
# assert targ.y2_density == y2_density
assert np.array_equiv(targ.y1_span, y1_span)
assert np.array_equiv(targ.y2_span, y2_span)
assert (targ.y1_span == y1_span).all()
assert (targ.y2_span == y2_span).all()
assert targ.l1 == l1
Expand Down

0 comments on commit 38245f2

Please sign in to comment.