Skip to content

Commit

Permalink
successfully removing old dependencies from the point target formulation
Browse files Browse the repository at this point in the history
  • Loading branch information
paulalndwhr committed Oct 15, 2023
1 parent 09c847b commit 38ea86a
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 9 deletions.
8 changes: 5 additions & 3 deletions src/doptics/two_mirrors.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import scipy.integrate as sci
import scipy as sp
from typing import Callable, List
from typing import Callable, List, Tuple, Union
import matplotlib.pyplot as plt
import numpy as np
from doptics.symbolic import u_prime_mv
Expand Down Expand Up @@ -145,8 +145,10 @@ def starting_density_rescaled(x): return 1 / ax * starting_density(x)


def solve_two_mirrors_parallel_source_point_target(starting_density: Callable, target_distribution_1: Callable,
target_distribution_2, x_span: List[float], y1_span: List[float],
y2_span: List[float],
target_distribution_2,
x_span: Union[List[float], Tuple[float, float]],
# y1_span: List[float],
# y2_span: List[float],
u0: float, w0: float, l1: float, l2: float,
number_rays=15,
color: str = 'szegedblue') -> List[dict]:
Expand Down
12 changes: 6 additions & 6 deletions test2.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,18 +31,18 @@
number_rays=15
)

def G1(y1): return 1
def G2(y2): return 1 - np.abs(y2 - 12) if 11 < y2 < 13 else 0
def E(x): return 1 / (np.exp(10 * (x - 0.5)) + np.exp(-10 * (x - 0.5)))
# G1 = func.G1
# def G2(y2): return 1 - np.abs(y2 - 12) if 11 < y2 < 13 else 0
# def E(x): return 1 / (np.exp(10 * (x - 0.5)) + np.exp(-10 * (x - 0.5)))

# new stuff
# E = func.uniform

angle_result = tms.solve_two_mirrors_parallel_source_point_target(starting_density=func.uniform,
target_distribution_1=G1,
target_distribution_2=G2,
target_distribution_1=func.G1,
target_distribution_2=func.G2,
x_span=x_span,
y1_span=y1_span, y2_span=y2_span, u0=u0, w0=w0,
u0=u0, w0=w0,
l1=l1, l2=l2,
# color='#a69f3f',
number_rays=16)

0 comments on commit 38ea86a

Please sign in to comment.