Closed Jashcraf closed 8 months ago
The development philosophy I find intuitive is to have one python file for each type of utility. These are simply lists of functions that can be called to perform a task. Then there's a file where we construct the Rayfront
class
math
: functions that hold constants / convenient mathematical operationsutils
: creature comfort functions (zero padding, cropping/roi, etc.)poke_core
: function that constructs the Raybundle
and uses all of the other methodsraytrace
: functions pertaining to raytracing in ZOS/CODE V or directly manipulating ray dataprt
: functions that perform polarization ray tracing mathgbd
: functions that perform gaussian beamlet decompositionpolarization
: functions that hold polarization-dependent calculations (mueller, jones)polarimetry
: Stokes, Mueller, PDI polarimetric data reductionthinfilms
: fresnel coefficients and thin film physicsreadwrite
: reading and writing data to and from pokeaccel_math
: inspired by POPPY's accel_math, holds math accelerators like cupy, jaxplotting
: standardized plotting functionsinterfaces
: code for interfacing with POPPY, HCIPy, prysm.At the moment this is a big change from where we are now, but I didn't expect Gaussian Beamlets to be so compatible with Poke so originally it was just for polarization ray tracing.
More thoughts for a polarization
script. Including some method of handling mueller matrices and polarimetry would be nice, but making the code readable is key. Maybe we split polarization
to hold the matrices and polarimetry
to hold the data reduction.
Is poke just going to be an amalgamation of all the code I wrote in grad school rather than having a cohesive theme? Yes, probably it will.
poke_core
Rayfront
class
Methods
This seems sufficient to turn into a branch, gonna try that now
Is poke just going to be an amalgamation of all the code I wrote in grad school rather than having a cohesive theme? Yes, probably it will.
This is the way.
Poke has been restructured in the restructure
branch. Currently the following modules exist:
poke_math
: functions that hold constants / convenient mathematical operationspoke_core
: function that constructs the Raybundle
and uses all of the other methodsraytrace
: functions pertaining to raytracing in ZOS/CODE V or directly manipulating ray datapolarization
: functions that hold polarization-dependent calculations (prt, fresnel)thinfilms
: fresnel coefficients and thin film physicswriting
: reading and writing data to and from pokeplotting
: standardized plotting functionsgbd
: now that GBD is figured out we do gaussian beamletsinterfaces
: code for interfacing with POPPY, HCIPy, prysm.accel_math
: inspired by POPPY's accel_math, holds math accelerators like cupy, jaxpolarimetry
: Stokes, Mueller, PDI polarimetric data reductionutils
: creature comfort functions (zero padding, cropping/roi, etc.)I think accel_math
got folded into poke_math
, and polarimetry
doesn't really fit here. I don't particularly care for utils
scripts, because they just feel like a pile of uncategorized things. For now, I'm closing this up
Recently was introduced to the
@classmethod
way of constructing the raybundle. Think it might be nice to do so I have alternate ways of constructing the raybundle based on whether polarization ray tracing or gaussian beamlets is being done. The ideal product is suitable for both - but I don't want to force the user to construct the differential ray bundles if they don't have to.Easy changes (could do right now)
Raybundle
toRayfront
because portmanteaus are the highest form of expressionMedium changes (take a week to make sure I do it right)
@classmethod
constructors for theRayfront
class to make differential ray tracing cleanerHard changes (take >1 week to fully implement well)