In [2]:
from astropy.units import Quantity
In [3]:
f1 = Quantity(1500, 'mm')
f2 = Quantity(200, 'mm')
f3 = Quantity(30, 'mm')
In [4]:
def image_distance(object_distance, focal_length):
return (object_distance * focal_length)/(object_distance - focal_length)
In [7]:
print(image_distance(Quantity(100, 'm'), f1))
In [14]:
def saas_image_distance(object_distance):
f1 = Quantity(1500, 'mm')
f2 = Quantity(200, 'mm')
f3 = Quantity(30, 'mm')
d12 = Quantity(1819, 'mm')
d23 = Quantity(229, 'mm')
image_1 = image_distance(object_distance, f1)
print(image_1)
image_2 = image_distance(d12 + image_1, f2)
print(image_2)
image_3 = image_distance(d23 + image_2, f3)
return image_3
In [26]:
saas_image_distance(Quantity(10, 'm'))
Out[26]:
In [1]:
import pyoptools
In [2]:
from pyoptools.all import *
In [ ]: