Skip to content
This repository was archived by the owner on Jun 30, 2026. It is now read-only.
This repository was archived by the owner on Jun 30, 2026. It is now read-only.

Not able to do the Gaussian fit to find the brightest spot in poi #712

Description

@Jyotiprakash-8485

After clicking the optimize position of crosshair, it was doing the scan but not able to locate the brightest spot inside the poi area as it was not able to do the gaussian fit.

Here is the error message:

`Traceback (most recent call last):

File "D:\OneDrive\Desktop\Qudi_new\Qudi\qudi\logic\fitmethods\gaussianlikemethods.py", line 345, in make_gaussian_fit

result = mod_final.fit(data, x=x_axis, params=params, **kwargs) 

File "C:\Users\SingleNV\anaconda3\lib\site-packages\lmfit\model.py", line 1162, in fit

raise ValueError(f"'Missing independent variable '{var}'") 

ValueError: 'Missing independent variable 'xx'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):

File "D:\OneDrive\Desktop\Qudi_new\Qudi\qudi\logic\optimizer_logic.py", line 449, in do_z_optimization

result = self._fit_logic.make_gaussianlinearoffset_fit( 

File "D:\OneDrive\Desktop\Qudi_new\Qudi\qudi\logic\fitmethods\gaussianlikemethods.py", line 511, in make_gaussianlinearoffset_fit

error, params = estimator(x_axis, data, params) 

File "D:\OneDrive\Desktop\Qudi_new\Qudi\qudi\logic\fitmethods\gaussianlikemethods.py", line 571, in estimate_gaussianlinearoffset_peak

res_ordinary_gauss = self.make_gaussian_fit( 

File "D:\OneDrive\Desktop\Qudi_new\Qudi\qudi\logic\fitmethods\gaussianlikemethods.py", line 348, in make_gaussian_fit

'message: {0}\n'.format(result.message)) 

UnboundLocalError: local variable 'result' referenced before assignment`

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions