Added missing file

This commit is contained in:
2023-01-30 13:11:37 +01:00
parent 32fb672bf5
commit 462de223a4

33
lib/Petzval/Merit.hs Normal file
View 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