-(defun sensor-dimensions (sensor-spec &key (format :aps))
- "Returns the number of pixels for a sensor.
-CAMERA-SPEC is either a keyword designating the camera or
-the number of megapixels of the sensor.
-FORMAT should be defined if the CAMERA-SPEC is the number of megapixels
-so the proper aspect ratio is used."
- (etypecase sensor-spec
- (keyword
- (ecase sensor-spec
- ;; nikon
- (:d2x (cons 4288 2848))
- (:d100 (cons 3037 2024))
- (:d2h (cons 2464 1632))
- (:d70 (cons 3008 2000))
-
- ;; canon
- (:1d (cons 2464 1648))
- (:1d2 (cons 3504 2336))
- (:1ds (cons 4064 2704))
- (:1ds2 (cons 4992 3328))
-
- ))
- (number
- (sensor-dimensions-megapixels format sensor-spec))))
+(defun rayleigh-limit (f-stop &optional (wavelength 0.0005))
+ "Returns the rayleigh limit in line pairs per mm (MTF 9%) as well as the MTF50"
+ (let ((rayleigh (float (/ 1 1.22 f-stop wavelength))))
+ (values rayleigh (* 0.46 rayleigh))))