Skip to content

Commit 166af5f

Browse files
author
Jashcraf
committed
updates to physics validation, some demos testing polarization ray tracing
1 parent 035345a commit 166af5f

18 files changed

+1601
-74
lines changed

docs/notebooks/introtopolarization.ipynb

Lines changed: 1048 additions & 32 deletions
Large diffs are not rendered by default.

experiments/physics_validation/AragoSpot.ipynb

Lines changed: 273 additions & 0 deletions
Large diffs are not rendered by default.
5.61 KB
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.

experiments/physics_validation/polgrid_output.1.txt

Lines changed: 43 additions & 0 deletions
Large diffs are not rendered by default.

experiments/physics_validation/polgrid_output.txt

Lines changed: 43 additions & 0 deletions
Large diffs are not rendered by default.
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
! Define input variables
2+
num ^input_array(2,400) ^output_array(43,401) ^input_ray(4)
3+
num ^success
4+
^nrays == 400
5+
^nrays_across == sqrt(^nrays)
6+
^x_start == -1
7+
^x_end == 1
8+
^y_start == -1
9+
^y_end == 1
10+
! compute step size and construct input array
11+
^step_size == absf(^y_start-^y_end)/(^nrays_across-1)
12+
^x_cord == ^x_start
13+
^y_cord == ^y_start
14+
^next_row == 0
15+
FOR ^iter 1 ^nrays
16+
^input_array(1,^iter) == ^x_cord
17+
^input_array(2,^iter) == ^y_cord
18+
! update the x_cord
19+
^x_cord == ^x_cord + ^step_size
20+
IF modf(^iter,^nrays_across) = 0
21+
^next_row == 1
22+
END IF
23+
IF ^next_row = 1
24+
! update y_cord
25+
^y_cord == ^y_cord + ^step_size
26+
! reset x_cord
27+
^x_cord == ^x_start
28+
! reset next_row
29+
^next_row == 0
30+
END IF
31+
END FOR
32+
! Run POLGRID
33+
^success == POLGRID(1, 1, 1, 0, ^nrays, ^input_array, ^output_array)
34+
wri ^success
35+
! Write output_array to text file
36+
BUF DEL B1
37+
^result == ARRAY_TO_BUFFER(^output_array,1,0)
38+
BUF EXP B1 SEP "polgrid_output.txt"

0 commit comments

Comments
 (0)