diff --git a/raytracing/imagingpath.py b/raytracing/imagingpath.py
index 9960d83..6c89bff 100644
--- a/raytracing/imagingpath.py
+++ b/raytracing/imagingpath.py
@@ -585,6 +585,9 @@ class ImagingPath(MatrixGroup):
         """
         fieldOfView = self.fieldOfView()
         (distance, conjugateMatrix) = self.forwardConjugate()
+        if conjugateMatrix is None:
+            return float("+inf")
+
         magnification = conjugateMatrix.A
         return abs(fieldOfView * magnification)
 

ImagingPath: imageSize fails when D is 0
When `D == 0`, there is no forward conjugate (nor backward), so we return `conjugateMatrix` as `None`. Because of that, `imageSize` raises an `AttributeError`. We should check if `conjugateMatrix` is `None`, but what should we return? Since there is no image, return `None`?
diff --git a/raytracing/tests/testsImagingPath.py b/raytracing/tests/testsImagingPath.py
index b543b8b..2e24ab7 100644
--- a/raytracing/tests/testsImagingPath.py
+++ b/raytracing/tests/testsImagingPath.py
@@ -61,5 +61,10 @@ class TestImagingPath(unittest.TestCase):
         chiefRay = path.chiefRay()
         self.assertIsNone(chiefRay)
 
+    def testImageSizeDIs0(self):
+        path = ImagingPath(System2f(f=10, diameter=10))
+        path.append(Aperture(20))
+        self.assertEqual(path.imageSize(), inf)
+
 if __name__ == '__main__':
     unittest.main()

pip install -e .
parse_log_pytest
numpy matplotlib
pytest
3.6
pytest --no-header -rA --tb=line --color=no -p no:cacheprovider -W ignore::DeprecationWarning
attrs==22.2.0
certifi==2021.5.30
cycler @ file:///tmp/build/80754af9/cycler_1637851556182/work
importlib-metadata==4.8.3
iniconfig==1.1.1
kiwisolver @ file:///tmp/build/80754af9/kiwisolver_1612282412546/work
matplotlib @ file:///tmp/build/80754af9/matplotlib-suite_1613407855456/work
numpy @ file:///tmp/build/80754af9/numpy_and_numpy_base_1603483703303/work
olefile @ file:///Users/ktietz/demo/mc3/conda-bld/olefile_1629805411829/work
packaging==21.3
Pillow @ file:///tmp/build/80754af9/pillow_1625670622947/work
pluggy==1.0.0
py==1.11.0
pyparsing @ file:///tmp/build/80754af9/pyparsing_1635766073266/work
pytest==7.0.1
python-dateutil @ file:///tmp/build/80754af9/python-dateutil_1626374649649/work
-e git+https://github.com/DCC-Lab/RayTracing.git@adc82c7e2d87b0d90f2a9790fe6f36c67a7d94d2#egg=raytracing
six @ file:///tmp/build/80754af9/six_1644875935023/work
tomli==1.2.3
tornado @ file:///tmp/build/80754af9/tornado_1606942266872/work
typing_extensions==4.1.1
zipp==3.6.0

name: RayTracing
channels:
  - defaults
  - https://repo.anaconda.com/pkgs/main
  - https://repo.anaconda.com/pkgs/r
  - conda-forge
dependencies:
  - _libgcc_mutex=0.1=main
  - _openmp_mutex=5.1=1_gnu
  - blas=1.0=openblas
  - ca-certificates=2025.2.25=h06a4308_0
  - certifi=2021.5.30=py36h06a4308_0
  - cycler=0.11.0=pyhd3eb1b0_0
  - dbus=1.13.18=hb2f20db_0
  - expat=2.6.4=h6a678d5_0
  - fontconfig=2.14.1=h52c9d5c_1
  - freetype=2.12.1=h4a9f257_0
  - giflib=5.2.2=h5eee18b_0
  - glib=2.69.1=h4ff587b_1
  - gst-plugins-base=1.14.1=h6a678d5_1
  - gstreamer=1.14.1=h5eee18b_1
  - icu=58.2=he6710b0_3
  - jpeg=9e=h5eee18b_3
  - kiwisolver=1.3.1=py36h2531618_0
  - lcms2=2.16=hb9589c4_0
  - ld_impl_linux-64=2.40=h12ee557_0
  - lerc=4.0.0=h6a678d5_0
  - libdeflate=1.22=h5eee18b_0
  - libffi=3.3=he6710b0_2
  - libgcc-ng=11.2.0=h1234567_1
  - libgfortran-ng=11.2.0=h00389a5_1
  - libgfortran5=11.2.0=h1234567_1
  - libgomp=11.2.0=h1234567_1
  - libopenblas=0.3.21=h043d6bf_0
  - libpng=1.6.39=h5eee18b_0
  - libstdcxx-ng=11.2.0=h1234567_1
  - libtiff=4.5.1=hffd6297_1
  - libuuid=1.41.5=h5eee18b_0
  - libwebp=1.2.4=h11a3e52_1
  - libwebp-base=1.2.4=h5eee18b_1
  - libxcb=1.15=h7f8727e_0
  - libxml2=2.9.14=h74e7548_0
  - lz4-c=1.9.4=h6a678d5_1
  - matplotlib=3.3.4=py36h06a4308_0
  - matplotlib-base=3.3.4=py36h62a2d02_0
  - ncurses=6.4=h6a678d5_0
  - numpy=1.19.2=py36h6163131_0
  - numpy-base=1.19.2=py36h75fe3a5_0
  - olefile=0.46=pyhd3eb1b0_0
  - openssl=1.1.1w=h7f8727e_0
  - pcre=8.45=h295c915_0
  - pillow=8.3.1=py36h5aabda8_0
  - pip=21.2.2=py36h06a4308_0
  - pyparsing=3.0.4=pyhd3eb1b0_0
  - pyqt=5.9.2=py36h05f1152_2
  - python=3.6.13=h12debd9_1
  - python-dateutil=2.8.2=pyhd3eb1b0_0
  - qt=5.9.7=h5867ecd_1
  - readline=8.2=h5eee18b_0
  - setuptools=58.0.4=py36h06a4308_0
  - sip=4.19.8=py36hf484d3e_0
  - six=1.16.0=pyhd3eb1b0_1
  - sqlite=3.45.3=h5eee18b_0
  - tk=8.6.14=h39e8969_0
  - tornado=6.1=py36h27cfd23_0
  - wheel=0.37.1=pyhd3eb1b0_0
  - xz=5.6.4=h5eee18b_1
  - zlib=1.2.13=h5eee18b_1
  - zstd=1.5.6=hc292b87_0
  - pip:
      - attrs==22.2.0
      - importlib-metadata==4.8.3
      - iniconfig==1.1.1
      - packaging==21.3
      - pluggy==1.0.0
      - py==1.11.0
      - pytest==7.0.1
      - tomli==1.2.3
      - typing-extensions==4.1.1
      - zipp==3.6.0
prefix: /opt/conda/envs/RayTracing

raytracing/tests/testsImagingPath.py::TestImagingPath::testImageSizeDIs0
raytracing/tests/testsImagingPath.py::TestImagingPath::testChiefRayNoApertureStop raytracing/tests/testsImagingPath.py::TestImagingPath::testDisplayRangeWithEmptyPath raytracing/tests/testsImagingPath.py::TestImagingPath::testDisplayRangeWithFiniteLens raytracing/tests/testsImagingPath.py::TestImagingPath::testDisplayRangeWithObjectHigherThanLens raytracing/tests/testsImagingPath.py::TestImagingPath::testEntrancePupilAIs0 raytracing/tests/testsImagingPath.py::TestImagingPath::testImagingPathInfiniteFieldOfView raytracing/tests/testsImagingPath.py::TestImagingPath::testImagingPathInfiniteFieldOfView2 raytracing/tests/testsImagingPath.py::TestImagingPath::testImagingPathInfiniteFieldOfView3
raytracing/imagingpath.py
raytracing/imagingpath.py