Astigmatic surfaces - separate components?
Currently Mirror
and Beamsplitter
components have both Rcx
, Rcy
model parameters for the RoCs in each plane. The Lens
just has f
(no separation of the focal length into the two planes) for now but we'll want to have support for astigmatic lenses too (easy to do).
I was wondering recently whether we want to keep these surfaces as being generic, with the option of them being astigmatic, or do we want to have separate components for the astigmatic versions? e.g. Mirror
would just have Rc
as a model parameter whilst AstigmaticMirror
would have Rcx
and Rcy
.
This separation could be quite neat in my opinion as it would get around some of the (essentially) user-interface problems referenced in #133 (closed). I think the majority of the time people use non-astigmatic surfaces so having specialised component versions for these could remove any confusion about planes and setting up references when scanning RoCs.
The only disadvantage I can think of here is that there would be a bit of code duplication I imagine. But this could be solved in principle by having, using mirrors as an example, a MirrorBase
abstract class from which Mirror
and AstigmaticMirror
both derive.
Any thoughts?