Added missing file
This commit is contained in:
33
lib/Petzval/Merit.hs
Normal file
33
lib/Petzval/Merit.hs
Normal file
@@ -0,0 +1,33 @@
|
||||
module Petzval.Merit where
|
||||
|
||||
import Petzval.Calculations
|
||||
import Petzval.Types
|
||||
import Petzval.Trace
|
||||
import Petzval.Optics (Element, BakedIOR)
|
||||
import Petzval.System
|
||||
import Control.Lens
|
||||
import Data.Either
|
||||
import Linear
|
||||
|
||||
import qualified Data.Map as Map
|
||||
|
||||
type MeritPart a = [Element BakedIOR a] -> a
|
||||
|
||||
data Calcuable a => TracedSystem a =
|
||||
TracedSystem { system :: [Element BakedIOR a]
|
||||
, field_angles :: [Double]
|
||||
, wavelengths :: [Double]
|
||||
, tracePoints :: [(Ray a, HitRecord a)]
|
||||
}
|
||||
|
||||
|
||||
|
||||
spotSize :: Calcuable a => a -> MeritPart a
|
||||
spotSize fa system = rmsSize
|
||||
. toListOf (each._pos._xy)
|
||||
. rights
|
||||
. map fst
|
||||
. map (raytrace system)
|
||||
. map (createRay Nothing ep fa)
|
||||
$ hexapolarPattern 10
|
||||
where ep = entrancePupil system
|
||||
Reference in New Issue
Block a user