fmi-faim / napari-psf-analysis

A napari plugin to analysis point spread functions.
https://fmi-faim.github.io/napari-psf-analysis/
BSD 3-Clause "New" or "Revised" License
8 stars 3 forks source link

cannot convert float NaN to integer #38

Closed Lplantard closed 1 year ago

Lplantard commented 1 year ago
C:\Users\planlaur\Anaconda3\envs>call C:\Users\planlaur\Anaconda3\condabin\conda activate PSF-analysis
15:15:37 ERROR Failed to bootstrap the artifact.
15:15:37 ERROR
15:15:37 ERROR Possible solutions:
15:15:37 ERROR * Double check the endpoint for correctness (https://search.maven.org/).
15:15:37 ERROR * Add needed repositories to ~/.jgorc [repositories] block (see README).
15:15:37 ERROR * Try with an explicit version number (release metadata might be wrong).
15:15:37 ERROR
15:15:37 ERROR Full Maven error output:
15:15:37 ERROR  [ERROR] [ERROR] Some problems were encountered while processing the POMs:
15:15:37 ERROR  [ERROR] Non-resolvable import POM: Failed to resolve version for ome:formats-gpl:pom:LATEST: Could not find metadata ome:formats-gpl/maven-metadata.xml in local (C:\Users\planlaur\.m2\repository) @ line 8, column 29
15:15:37 ERROR  [ERROR] The build could not read 1 project -> [Help 1]
15:15:37 ERROR  [ERROR]
15:15:37 ERROR  [ERROR]   The project ome-BOOTSTRAPPER:formats-gpl-BOOTSTRAPPER:0 (C:\Users\planlaur\.jgo\ome\formats-gpl\LATEST\a2636a97ad34ecd06cc988e7b7979037cef5dcedcee036fc3307ab9af368c011\pom.xml) has 1 error
15:15:37 ERROR  [ERROR]     Non-resolvable import POM: Failed to resolve version for ome:formats-gpl:pom:LATEST: Could not find metadata ome:formats-gpl/maven-metadata.xml in local (C:\Users\planlaur\.m2\repository) @ line 8, column 29 -> [Help 2]
15:15:37 ERROR  [ERROR]
15:15:37 ERROR  [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
15:15:37 ERROR  [ERROR] Re-run Maven using the -X switch to enable full debug logging.
15:15:37 ERROR  [ERROR]
15:15:37 ERROR  [ERROR] For more information about the errors and possible solutions, please read the following articles:
15:15:37 ERROR  [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/ProjectBuildingException
15:15:37 ERROR  [ERROR] [Help 2] http://cwiki.apache.org/confluence/display/MAVEN/UnresolvableModelException
15:15:37 ERROR
---------------------------------------------------------------------------
ValueError                                Traceback (most recent call last)
File ~\Anaconda3\envs\PSF-analysis\lib\site-packages\superqt\utils\_qthreading.py:617, in create_worker.<locals>.reraise(e=ValueError('cannot convert float NaN to integer'))
    616 def reraise(e):
--> 617     raise e
        e = ValueError('cannot convert float NaN to integer')

File ~\Anaconda3\envs\PSF-analysis\lib\site-packages\superqt\utils\_qthreading.py:178, in WorkerBase.run(self=<napari._qt.qthreading.FunctionWorker object>)
    176     warnings.filterwarnings("always")
    177     warnings.showwarning = lambda *w: self.warned.emit(w)
--> 178     result = self.work()
        self = <napari._qt.qthreading.FunctionWorker object at 0x0000021DE4D30430>
    179 if isinstance(result, Exception):
    180     if isinstance(result, RuntimeError):
    181         # The Worker object has likely been deleted.
    182         # A deleted wrapped C/C++ object may result in a runtime
    183         # error that will cause segfault if we try to do much other
    184         # than simply notify the user.

File ~\Anaconda3\envs\PSF-analysis\lib\site-packages\superqt\utils\_qthreading.py:358, in FunctionWorker.work(self=<napari._qt.qthreading.FunctionWorker object>)
    357 def work(self) -> _R:
--> 358     return self._func(*self._args, **self._kwargs)
        self._func = <function PsfAnalysis.measure at 0x0000021DE5F82D30>
        self = <napari._qt.qthreading.FunctionWorker object at 0x0000021DE4D30430>
        self._args = (<napari_psf_analysis._dock_widget.PsfAnalysis object at 0x0000021DD3C15F70>, 'Stellaris8', 63, 1.4, 200.0, 36.1, 6000.0, 2000.0, '20230719_PSF_Stellaris8_63X_1.lif', <class 'numpy.ndarray'> (52, 512, 512) uint16, <class 'numpy.ndarray'> (1, 3) float64)
        self._kwargs = {}

File ~\Anaconda3\envs\PSF-analysis\lib\site-packages\napari_psf_analysis\_dock_widget.py:448, in PsfAnalysis.measure(self=<napari_psf_analysis._dock_widget.PsfAnalysis object>, microscope='Stellaris8', magnification=63, na=1.4, z_spacing=200.0, xy_pixelsize=36.1, psf_box_size_z=6000.0, psf_box_size_yx=2000.0, name='20230719_PSF_Stellaris8_63X_1.lif', img_data=<class 'numpy.ndarray'> (52, 512, 512) uint16, point_data=<class 'numpy.ndarray'> (1, 3) float64)
    445 for bead, offset in zip(beads, offsets):
    446     res = analyze_bead(bead=bead, spacing=spacing)
--> 448     summary_fig = build_summary_figure(
        bead = <class 'numpy.ndarray'> (30, 55, 55) uint16
        spacing = (200.0, 36.1, 36.1)
        res = {'z_bg': 911.5808059328485, 'z_amp': 58417.9224376982, 'z_mu': 3097.356118968857, 'z_sigma': 262.8886511237421, 'yx_bg': 38162760.01713956, 'yx_amp': -38157535.226886734, 'y_mu': 946.3998724585031, 'x_mu': 966.1914903862572, 'yx_cyy': -3592437439.2636957, 'yx_cyx': -20343663.806498874, 'yx_cxx': -3534867304.2507267, 'z_fwhm': 619.0554652773359, 'y_fwhm': nan, 'x_fwhm': nan, 'zyx_bg': 334.8472581426327, 'zyx_amp': 39510.20648792306, 'zyx_z_mu': 3011.834697865915, 'zyx_y_mu': 979.7227326127183, 'zyx_x_mu': 977.2699175048101, 'zyx_czz': 146560.20479439007, 'zyx_czy': -16242.326400654192, 'zyx_czx': 14333.364541305658, 'zyx_cyy': 25281.396657410736, 'zyx_cyx': -656.0389576544965, 'zyx_cxx': 26339.772815400986, 'zyx_z_fwhm': 901.5000509618162, 'zyx_y_fwhm': 374.4193244340027, 'zyx_x_fwhm': 382.17628669068085, 'zyx_pc1_fwhm': 913.0695933719419, 'zyx_pc2_fwhm': 374.96733452239425, 'zyx_pc3_fwhm': 353.064161595618, 'z_bg_sde': 396.3803255964697, 'z_amp_sde': 1551.2069648790518, 'z_mu_sde': 7.927959381475837, 'z_sigma_sde': 8.319830108054067, 'yx_bg_sde': 4149747589.0038185, 'yx_amp_sde': 4149747583.9285927, 'y_mu_sde': 15.74746610033358, 'x_mu_sde': 15.430628277546742, 'yx_cyy_sde': 390652307056.60443, 'yx_cyx_sde': 2218967193.3288727, 'yx_cxx_sde': 384386250145.3017, 'zyx_bg_sde': 3.2136962525644277, 'zyx_amp_sde': 106.54165312044952, 'zyx_z_mu_sde': 0.9225547572950137, 'zyx_y_mu_sde': 0.3831744858487225, 'zyx_x_mu_sde': 0.39110589683461966, 'zyx_czz_sde': 709.5907152820918, 'zyx_czy_sde': 214.8463918048904, 'zyx_czx_sde': 217.41240893302754, 'zyx_cyy_sde': 122.40996530124856, 'zyx_cyx_sde': 87.97760727530742, 'zyx_cxx_sde': 127.52999505879724}
        res["z_mu"] = 3097.356118968857
        res["y_mu"] = 946.3998724585031
        res["x_mu"] = 966.1914903862572
        (res["z_mu"], res["y_mu"], res["x_mu"]) = (3097.356118968857, 946.3998724585031, 966.1914903862572)
        (res["z_fwhm"], res["y_fwhm"], res["x_fwhm"]) = (619.0554652773359, nan, nan)
        res["z_fwhm"] = 619.0554652773359
        res["y_fwhm"] = nan
        res["x_fwhm"] = nan
        np = <module 'numpy' from 'C:\\Users\\planlaur\\Anaconda3\\envs\\PSF-analysis\\lib\\site-packages\\numpy\\__init__.py'>
        [
                        [res["zyx_cxx"], res["zyx_cyx"], res["zyx_czx"]],
                        [res["zyx_cyx"], res["zyx_cyy"], res["zyx_czy"]],
                        [res["zyx_czx"], res["zyx_czy"], res["zyx_czz"]],
                    ] = [[26339.772815400986, -656.0389576544965, 14333.364541305658], [-656.0389576544965, 25281.396657410736, -16242.326400654192], [14333.364541305658, -16242.326400654192, 146560.20479439007]]
        [res["zyx_cxx"], res["zyx_cyx"], res["zyx_czx"]] = [26339.772815400986, -656.0389576544965, 14333.364541305658]
        res["zyx_cxx"] = 26339.772815400986
        res["zyx_cyx"] = -656.0389576544965
        res["zyx_czx"] = 14333.364541305658
        [res["zyx_cyx"], res["zyx_cyy"], res["zyx_czy"]] = [-656.0389576544965, 25281.396657410736, -16242.326400654192]
        res["zyx_cyy"] = 25281.396657410736
        res["zyx_czy"] = -16242.326400654192
        [res["zyx_czx"], res["zyx_czy"], res["zyx_czz"]] = [14333.364541305658, -16242.326400654192, 146560.20479439007]
        res["zyx_czz"] = 146560.20479439007
        date = '2023-07-19'
        version = '1.0.1'
    449         bead_img=bead,
    450         spacing=spacing,
    451         location=(res["z_mu"], res["y_mu"], res["x_mu"]),
    452         fwhm_values=(res["z_fwhm"], res["y_fwhm"], res["x_fwhm"]),
    453         cov_matrix_3d=np.array(
    454             [
    455                 [res["zyx_cxx"], res["zyx_cyx"], res["zyx_czx"]],
    456                 [res["zyx_cyx"], res["zyx_cyy"], res["zyx_czy"]],
    457                 [res["zyx_czx"], res["zyx_czy"], res["zyx_czz"]],
    458             ]
    459         ),
    460         date=date,
    461         version=version,
    462     )
    463     yx_cov_matrix = np.array(
    464         [[res["yx_cyy"], res["yx_cyx"]], [res["yx_cyx"], res["yx_cxx"]]]
    465     )
    466     yx_pc = np.sort(np.sqrt(np.linalg.eigvals(yx_cov_matrix)))[::-1]

File ~\Anaconda3\envs\PSF-analysis\lib\site-packages\napari_psf_analysis\psf_analysis\psf_analysis.py:551, in build_summary_figure(bead_img=<class 'numpy.ndarray'> (30, 55, 55) uint16, spacing=(200.0, 36.1, 36.1), location=(3097.356118968857, 946.3998724585031, 966.1914903862572), fwhm_values=(619.0554652773359, nan, nan), cov_matrix_3d=<class 'numpy.ndarray'> (3, 3) float64, date='2023-07-19', version='1.0.1')
    541 ax_xy.set_yticks([])
    542 ax_xy.imshow(
    543     yx_sqrt_projection,
    544     cmap=cmap,
   (...)
    548     origin="lower",
    549 )
--> 551 _draw_fwhm(
        ax_xy = <Axes: >
        yx_sqrt_projection = <class 'numpy.ndarray'> (1444, 1444) float32
        fwhm_values = (619.0554652773359, nan, nan)
        fwhm_values[1:] = (nan, nan)
    552     ax_xy,
    553     spacing=4000 / yx_sqrt_projection.shape[1],
    554     fwhm=fwhm_values[1:],
    555     shape=yx_sqrt_projection.shape,
    556 )
    558 ax_zx.set_xticks([])
    559 ax_zx.set_yticks([])

File ~\Anaconda3\envs\PSF-analysis\lib\site-packages\napari_psf_analysis\psf_analysis\psf_analysis.py:422, in _draw_fwhm(axes=<Axes: >, shape=(1444, 1444), spacing=2.770083102493075, fwhm=(nan, nan), down=False)
    417     axes.plot([cx - dx, cx - dx], [cy - dy, shape[1] / 4], "--", c="white")
    418     axes.plot([cx + dx, cx + dx], [cy - dy, shape[1] / 4], "--", c="white")
    419     axes.text(
    420         cx,
    421         shape[1] / 4.5,
--> 422         f"{int(np.round(x_fwhm))}nm",
        axes = <Axes: >
        cx = 722.0
        shape[1] = 1444
        shape[1] / 4.5 = 320.8888888888889
        shape = (1444, 1444)
        x_fwhm = nan
        np.round = <function round at 0x0000021DC962E830>
        np = <module 'numpy' from 'C:\\Users\\planlaur\\Anaconda3\\envs\\PSF-analysis\\lib\\site-packages\\numpy\\__init__.py'>
    423         ha="center",
    424         va="top",
    425         fontsize=15,
    426         bbox=dict(facecolor="white", alpha=0.8, linewidth=0),
    427     )
    429 axes.plot(
    430     [
    431         shape[0] / 4,
   (...)
    437     solid_capstyle="butt",
    438 )
    439 axes.plot(
    440     [
    441         shape[0] / 4,
   (...)
    447     solid_capstyle="butt",
    448 )

ValueError: cannot convert float NaN to integer
15:17:49 ERROR Failed to bootstrap the artifact.
15:17:49 ERROR
15:17:49 ERROR Possible solutions:
15:17:49 ERROR * Double check the endpoint for correctness (https://search.maven.org/).
15:17:49 ERROR * Add needed repositories to ~/.jgorc [repositories] block (see README).
15:17:49 ERROR * Try with an explicit version number (release metadata might be wrong).
15:17:49 ERROR
15:17:49 ERROR Full Maven error output:
15:17:49 ERROR  [ERROR] [ERROR] Some problems were encountered while processing the POMs:
15:17:49 ERROR  [ERROR] Non-resolvable import POM: Failed to resolve version for ome:formats-gpl:pom:LATEST: Could not find metadata ome:formats-gpl/maven-metadata.xml in local (C:\Users\planlaur\.m2\repository) @ line 8, column 29
15:17:49 ERROR  [ERROR] The build could not read 1 project -> [Help 1]
15:17:49 ERROR  [ERROR]
15:17:49 ERROR  [ERROR]   The project ome-BOOTSTRAPPER:formats-gpl-BOOTSTRAPPER:0 (C:\Users\planlaur\.jgo\ome\formats-gpl\LATEST\a2636a97ad34ecd06cc988e7b7979037cef5dcedcee036fc3307ab9af368c011\pom.xml) has 1 error
15:17:49 ERROR  [ERROR]     Non-resolvable import POM: Failed to resolve version for ome:formats-gpl:pom:LATEST: Could not find metadata ome:formats-gpl/maven-metadata.xml in local (C:\Users\planlaur\.m2\repository) @ line 8, column 29 -> [Help 2]
15:17:49 ERROR  [ERROR]
15:17:49 ERROR  [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
15:17:49 ERROR  [ERROR] Re-run Maven using the -X switch to enable full debug logging.
15:17:49 ERROR  [ERROR]
15:17:49 ERROR  [ERROR] For more information about the errors and possible solutions, please read the following articles:
15:17:49 ERROR  [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/ProjectBuildingException
15:17:49 ERROR  [ERROR] [Help 2] http://cwiki.apache.org/confluence/display/MAVEN/UnresolvableModelException
15:17:49 ERROR
---------------------------------------------------------------------------
ValueError                                Traceback (most recent call last)
File ~\Anaconda3\envs\PSF-analysis\lib\site-packages\superqt\utils\_qthreading.py:617, in create_worker.<locals>.reraise(e=ValueError('cannot convert float NaN to integer'))
    616 def reraise(e):
--> 617     raise e
        e = ValueError('cannot convert float NaN to integer')

File ~\Anaconda3\envs\PSF-analysis\lib\site-packages\superqt\utils\_qthreading.py:178, in WorkerBase.run(self=<napari._qt.qthreading.FunctionWorker object>)
    176     warnings.filterwarnings("always")
    177     warnings.showwarning = lambda *w: self.warned.emit(w)
--> 178     result = self.work()
        self = <napari._qt.qthreading.FunctionWorker object at 0x0000021DEEEED790>
    179 if isinstance(result, Exception):
    180     if isinstance(result, RuntimeError):
    181         # The Worker object has likely been deleted.
    182         # A deleted wrapped C/C++ object may result in a runtime
    183         # error that will cause segfault if we try to do much other
    184         # than simply notify the user.

File ~\Anaconda3\envs\PSF-analysis\lib\site-packages\superqt\utils\_qthreading.py:358, in FunctionWorker.work(self=<napari._qt.qthreading.FunctionWorker object>)
    357 def work(self) -> _R:
--> 358     return self._func(*self._args, **self._kwargs)
        self._func = <function PsfAnalysis.measure at 0x0000021DE5F82D30>
        self = <napari._qt.qthreading.FunctionWorker object at 0x0000021DEEEED790>
        self._args = (<napari_psf_analysis._dock_widget.PsfAnalysis object at 0x0000021DE1CD0D30>, 'Stellaris8', 63, 1.4, 200.0, 36.0, 6000.0, 2000.0, '20230719_PSF_Stellaris8_63X_1.tif', <class 'numpy.ndarray'> (52, 512, 512) uint16, <class 'numpy.ndarray'> (1, 3) float64)
        self._kwargs = {}

File ~\Anaconda3\envs\PSF-analysis\lib\site-packages\napari_psf_analysis\_dock_widget.py:448, in PsfAnalysis.measure(self=<napari_psf_analysis._dock_widget.PsfAnalysis object>, microscope='Stellaris8', magnification=63, na=1.4, z_spacing=200.0, xy_pixelsize=36.0, psf_box_size_z=6000.0, psf_box_size_yx=2000.0, name='20230719_PSF_Stellaris8_63X_1.tif', img_data=<class 'numpy.ndarray'> (52, 512, 512) uint16, point_data=<class 'numpy.ndarray'> (1, 3) float64)
    445 for bead, offset in zip(beads, offsets):
    446     res = analyze_bead(bead=bead, spacing=spacing)
--> 448     summary_fig = build_summary_figure(
        bead = <class 'numpy.ndarray'> (30, 55, 55) uint16
        spacing = (200.0, 36.0, 36.0)
        res = {'z_bg': 911.5808059328485, 'z_amp': 58417.9224376982, 'z_mu': 3097.356118968857, 'z_sigma': 262.8886511237421, 'yx_bg': 117467013.95361866, 'yx_amp': -117461788.88858593, 'y_mu': 943.7655673388606, 'x_mu': 963.4849150753824, 'yx_cyy': -10996436993.613564, 'yx_cyx': -70532654.86219636, 'yx_cxx': -10820158740.89201, 'z_fwhm': 619.0554652773359, 'y_fwhm': nan, 'x_fwhm': nan, 'zyx_bg': 334.84726121673725, 'zyx_amp': 39510.20702939531, 'zyx_z_mu': 3011.834701518852, 'zyx_y_mu': 977.0088178712949, 'zyx_x_mu': 974.5627990373486, 'zyx_czz': 146560.20334410015, 'zyx_czy': -16197.333051058567, 'zyx_czx': 14293.659591418274, 'zyx_cyy': 25141.52674313579, 'zyx_cyx': -652.4092493049167, 'zyx_cxx': 26194.04767278325, 'zyx_z_fwhm': 901.5000465014087, 'zyx_y_fwhm': 373.3821460860392, 'zyx_x_fwhm': 381.1176227029394, 'zyx_pc1_fwhm': 912.9947920301789, 'zyx_pc2_fwhm': 373.93008929702125, 'zyx_pc3_fwhm': 352.1136197830051, 'z_bg_sde': 396.3803255964697, 'z_amp_sde': 1551.2069648790518, 'z_mu_sde': 7.927959381475837, 'z_sigma_sde': 8.319830108054067, 'yx_bg_sde': 5193976206.801739, 'yx_amp_sde': 5193976200.3584175, 'y_mu_sde': 15.7037016252851, 'x_mu_sde': 15.384185785968638, 'yx_cyy_sde': 486216079365.0854, 'yx_cyx_sde': 3123527978.7420464, 'yx_cxx_sde': 478436674191.13776, 'zyx_bg_sde': 3.2136962453128985, 'zyx_amp_sde': 106.54165573237475, 'zyx_z_mu_sde': 0.9225547470543801, 'zyx_y_mu_sde': 0.38211305089794656, 'zyx_x_mu_sde': 0.39002249557107915, 'zyx_czz_sde': 709.5906741931396, 'zyx_czy_sde': 214.25121873365615, 'zyx_czx_sde': 216.8101486128529, 'zyx_cyy_sde': 121.73272962089094, 'zyx_cyx_sde': 87.49086088093283, 'zyx_cxx_sde': 126.82443097663813}
        res["z_mu"] = 3097.356118968857
        res["y_mu"] = 943.7655673388606
        res["x_mu"] = 963.4849150753824
        (res["z_mu"], res["y_mu"], res["x_mu"]) = (3097.356118968857, 943.7655673388606, 963.4849150753824)
        (res["z_fwhm"], res["y_fwhm"], res["x_fwhm"]) = (619.0554652773359, nan, nan)
        res["z_fwhm"] = 619.0554652773359
        res["y_fwhm"] = nan
        res["x_fwhm"] = nan
        np = <module 'numpy' from 'C:\\Users\\planlaur\\Anaconda3\\envs\\PSF-analysis\\lib\\site-packages\\numpy\\__init__.py'>
        [
                        [res["zyx_cxx"], res["zyx_cyx"], res["zyx_czx"]],
                        [res["zyx_cyx"], res["zyx_cyy"], res["zyx_czy"]],
                        [res["zyx_czx"], res["zyx_czy"], res["zyx_czz"]],
                    ] = [[26194.04767278325, -652.4092493049167, 14293.659591418274], [-652.4092493049167, 25141.52674313579, -16197.333051058567], [14293.659591418274, -16197.333051058567, 146560.20334410015]]
        [res["zyx_cxx"], res["zyx_cyx"], res["zyx_czx"]] = [26194.04767278325, -652.4092493049167, 14293.659591418274]
        res["zyx_cxx"] = 26194.04767278325
        res["zyx_cyx"] = -652.4092493049167
        res["zyx_czx"] = 14293.659591418274
        [res["zyx_cyx"], res["zyx_cyy"], res["zyx_czy"]] = [-652.4092493049167, 25141.52674313579, -16197.333051058567]
        res["zyx_cyy"] = 25141.52674313579
        res["zyx_czy"] = -16197.333051058567
        [res["zyx_czx"], res["zyx_czy"], res["zyx_czz"]] = [14293.659591418274, -16197.333051058567, 146560.20334410015]
        res["zyx_czz"] = 146560.20334410015
        date = '2023-09-11'
        version = '1.0.1'
    449         bead_img=bead,
    450         spacing=spacing,
    451         location=(res["z_mu"], res["y_mu"], res["x_mu"]),
    452         fwhm_values=(res["z_fwhm"], res["y_fwhm"], res["x_fwhm"]),
    453         cov_matrix_3d=np.array(
    454             [
    455                 [res["zyx_cxx"], res["zyx_cyx"], res["zyx_czx"]],
    456                 [res["zyx_cyx"], res["zyx_cyy"], res["zyx_czy"]],
    457                 [res["zyx_czx"], res["zyx_czy"], res["zyx_czz"]],
    458             ]
    459         ),
    460         date=date,
    461         version=version,
    462     )
    463     yx_cov_matrix = np.array(
    464         [[res["yx_cyy"], res["yx_cyx"]], [res["yx_cyx"], res["yx_cxx"]]]
    465     )
    466     yx_pc = np.sort(np.sqrt(np.linalg.eigvals(yx_cov_matrix)))[::-1]

File ~\Anaconda3\envs\PSF-analysis\lib\site-packages\napari_psf_analysis\psf_analysis\psf_analysis.py:551, in build_summary_figure(bead_img=<class 'numpy.ndarray'> (30, 55, 55) uint16, spacing=(200.0, 36.0, 36.0), location=(3097.356118968857, 943.7655673388606, 963.4849150753824), fwhm_values=(619.0554652773359, nan, nan), cov_matrix_3d=<class 'numpy.ndarray'> (3, 3) float64, date='2023-09-11', version='1.0.1')
    541 ax_xy.set_yticks([])
    542 ax_xy.imshow(
    543     yx_sqrt_projection,
    544     cmap=cmap,
   (...)
    548     origin="lower",
    549 )
--> 551 _draw_fwhm(
        ax_xy = <Axes: >
        yx_sqrt_projection = <class 'numpy.ndarray'> (1440, 1440) float32
        fwhm_values = (619.0554652773359, nan, nan)
        fwhm_values[1:] = (nan, nan)
    552     ax_xy,
    553     spacing=4000 / yx_sqrt_projection.shape[1],
    554     fwhm=fwhm_values[1:],
    555     shape=yx_sqrt_projection.shape,
    556 )
    558 ax_zx.set_xticks([])
    559 ax_zx.set_yticks([])

File ~\Anaconda3\envs\PSF-analysis\lib\site-packages\napari_psf_analysis\psf_analysis\psf_analysis.py:422, in _draw_fwhm(axes=<Axes: >, shape=(1440, 1440), spacing=2.7777777777777777, fwhm=(nan, nan), down=False)
    417     axes.plot([cx - dx, cx - dx], [cy - dy, shape[1] / 4], "--", c="white")
    418     axes.plot([cx + dx, cx + dx], [cy - dy, shape[1] / 4], "--", c="white")
    419     axes.text(
    420         cx,
    421         shape[1] / 4.5,
--> 422         f"{int(np.round(x_fwhm))}nm",
        axes = <Axes: >
        cx = 720.0
        shape[1] = 1440
        shape[1] / 4.5 = 320.0
        shape = (1440, 1440)
        x_fwhm = nan
        np.round = <function round at 0x0000021DC962E830>
        np = <module 'numpy' from 'C:\\Users\\planlaur\\Anaconda3\\envs\\PSF-analysis\\lib\\site-packages\\numpy\\__init__.py'>
    423         ha="center",
    424         va="top",
    425         fontsize=15,
    426         bbox=dict(facecolor="white", alpha=0.8, linewidth=0),
    427     )
    429 axes.plot(
    430     [
    431         shape[0] / 4,
   (...)
    437     solid_capstyle="butt",
    438 )
    439 axes.plot(
    440     [
    441         shape[0] / 4,
   (...)
    447     solid_capstyle="butt",
    448 )

ValueError: cannot convert float NaN to integer