imgd

dnois.optics.imgd(obj_d: Real | Tensor, fl_obj: Real | Tensor, fl_img: Real | Tensor = None, diopter: Real | Tensor = None) Real | Tensor

Returns image distance \(s'\) given object distance \(s\).

This function has two overloaded forms:

dnois.optics.imgd(obj_d, fl_obj, fl_img=None)
\[s'=\frac{f's}{s-f}\]

Note

fl_img will be returned if obj_d is infinite.

Warning

The behavior of this function when fl_obj or fl_img is infinite is undefined.

Parameters:
  • obj_d (float or Tensor) – Object distance \(s\).

  • fl_obj (float or Tensor) – Object focal length \(f\).

  • fl_img (float or Tensor) – Image focal length \(f'\). Default: identical to fl_obj.


dnois.optics.imgd(obj_d, n_obj, n_img, diopter)
\[s'=\frac{n_2s}{\phi s-n_1}\]

Note

n_img / diopter will be returned if obj_d is infinite.

Parameters:
  • obj_d (float or Tensor) – Object distance \(s\).

  • n_obj (float or Tensor) – Refractive index in object space \(n_1\).

  • n_img (float or Tensor) – Refractive index in image space \(n_2\).

  • diopter (float or Tensor) – Diopter \(\phi\).

Returns:

Image distance \(s'\).

Return type:

float or Tensor