mperrin / poppy

Physical Optics Propagation in Python
BSD 3-Clause "New" or "Revised" License
177 stars 41 forks source link

Add option for CompoundAnalyticOptic to add transmissions #226

Closed corcoted closed 7 years ago

corcoted commented 7 years ago

Currently CompoundAnalyticOptic calculates the transmission as the product of the transmissions of the constituent elements. I'd like the possibility of summing the transmissions to make it easier to generate compound apertures.

For example

poppy.CompoundAnalyticOptic(opticslist=[poppy.RectangleAperture(width=1*u.m, height=0.5*u.m),
    poppy.RectangleAperture(width=0.5*u.m, height=1*u.m)])

results in a square aperture, but I would like a cross-shaped one.

A work-around is to invert the apertures, combine them, then invert again, but I'd like something more direct.

mperrin commented 7 years ago

This feature was implemented in PR #227, but we forgot to close the issue at the same time.