Modeling optics with realistic edge apertures