Skip to content

Artifact correction error when not using isosbestic #180

@saraemily23

Description

@saraemily23

Hello -- I am reanalyzing some data to see what it looks like without using my isosbestic control. I find that, for files that require artifact removal, the program hangs when I re-run the "Extract Timestamps" step. I see the following error in my terminal:


Removing Artifacts from the data and correcting timestamps...
Computing z-score for each of the data...
Remove Artifacts : True
Optimal parameters not found: Number of calls to function has reached maxfev = 800.
Traceback (most recent call last):
File "C:\Users\sem\GuPPy-main\GuPPy\preprocess.py", line 1235, in
raise e
File "C:\Users\sem\GuPPy-main\GuPPy\preprocess.py", line 1229, in
extractTsAndSignal(json.loads(sys.argv[1]))
File "C:\Users\sem\GuPPy-main\GuPPy\preprocess.py", line 1216, in extractTsAndSignal
execute_zscore(folderNames, inputParameters)
File "C:\Users\sem\GuPPy-main\GuPPy\preprocess.py", line 1156, in execute_zscore
compute_z_score(filepath, inputParameters)
File "C:\Users\sem\GuPPy-main\GuPPy\preprocess.py", line 999, in compute_z_score
z_score, dff, control_fit = helper_z_score(control, signal, filepath, name, inputParameters)
File "C:\Users\sem\GuPPy-main\GuPPy\preprocess.py", line 919, in helper_z_score
control_arr = helper_create_control_channel(signal[tsNew_index], tsNew[tsNew_index], window=101)
File "C:\Users\sem\GuPPy-main\GuPPy\preprocess.py", line 100, in helper_create_control_channel
control = curveFitFn(timestamps,*popt)
UnboundLocalError: local variable 'popt' referenced before assignment


These are all files that have previously been successfully analyzed (with the isosbestic control). Is this a bug, or am I doing something wrong?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions