objd

dnois.optics.objd(img_d: Real | Tensor, fl_obj: Real | Tensor, fl_img: Real | Tensor = None, diopter: Real | Tensor = None) Real | Tensor

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

This function has two overloaded forms:

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

Note

fl_obj will be returned if img_d is infinite.

Warning

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

Parameters:
  • img_d (float or Tensor) – Image 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.objd(img_d, n_obj, n_img, diopter)
\[s=\frac{n_1s'}{\phi s'-n_2}\]

Note

n_obj / diopter will be returned if img_d is infinite.

Parameters:
  • img_d (float or Tensor) – Image 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:

Object distance \(s\).

Return type:

float or Tensor