Skip to content

Commit

Permalink
readability update after linting
Browse files Browse the repository at this point in the history
  • Loading branch information
Jashcraf committed Jan 10, 2024
1 parent 68266a0 commit 61cc233
Show file tree
Hide file tree
Showing 4 changed files with 42 additions and 272 deletions.
4 changes: 1 addition & 3 deletions poke/interfaces.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,7 @@
from poke.poke_math import np


def jones_pupil_to_hcipy_wavefront(
jones_pupil, pupil_grid, input_stokes_vector=[1, 0, 0, 0], shape=None
):
def jones_pupil_to_hcipy_wavefront(jones_pupil, pupil_grid, input_stokes_vector=[1, 0, 0, 0], shape=None):
"""converts a poke jones pupil to an HCIPy partially polarized wavefront,
only works on square jones pupils
Expand Down
15 changes: 5 additions & 10 deletions poke/materials.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,20 +3,15 @@
from pathlib import Path

# Silica == Fused Silica
# fmt: off
avail_materials = [
"Al",
"Ag", # metals
"HfO2",
"SiO2",
"Ta2O5",
"TiO2",
"Nb2O5", # Oxides
"Al", "Ag", # metals
"HfO2", "SiO2", "Ta2O5", "TiO2", "Nb2O5", # Oxides
"SiN", # Nitrides
"MgF2",
"CaF2",
"LiF", # Fluorides
"MgF2", "CaF2", "LiF", # Fluorides
"Silica", # Glasses
]
# fmt: on


def get_abs_path(file):
Expand Down
22 changes: 2 additions & 20 deletions poke/poke_core.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,18 +21,7 @@


class Rayfront:
def __init__(
self,
nrays,
wavelength,
pupil_radius,
max_fov,
normalized_pupil_radius=1,
fov=[0.0, 0.0],
waist_pad=None,
circle=True,
grid="even",
):
def __init__(self, nrays, wavelength, pupil_radius, max_fov, normalized_pupil_radius=1, fov=[0.0, 0.0], waist_pad=None, circle=True, grid="even",):

"""class for the Rayfront object that
1) traces rays with the zosapi
Expand Down Expand Up @@ -247,14 +236,7 @@ def trace_rayset(self, pth, wave=1, surfaces=None, _experimental=True):
########################### GAUSSIAN BEAMLET TRACING METHODS ###########################
"""

def beamlet_decomposition_field(
self,
dcoords,
dnorms=np.array([0.0, 0.0, 1.0]),
memory_avail=4,
misaligned=True,
vignette=True,
):
def beamlet_decomposition_field(self, dcoords, dnorms=np.array([0.0, 0.0, 1.0]), memory_avail=4, misaligned=True, vignette=True):
"""computes the coherent field by decomposing the entrance pupil into gaussian beams
and propagating them to the final surface
Expand Down
Loading

0 comments on commit 61cc233

Please sign in to comment.