bionanoimaging / PSFDistiller.jl

Distills a point spread function (PSF) from a measurement of beads by selecting local maxima that are separate enough from other ones.
MIT License
2 stars 2 forks source link

Error in the gauss_fit function #4

Closed hzarei4 closed 1 year ago

hzarei4 commented 1 year ago

Hello,

I try to run the example code of this project and the line 17 gives an error:

ERROR: Mutating arrays is not supported -- called copyto!(Array{Float64, 3}, ...)
This error occurs when you ask Zygote to differentiate operations that change
the elements of arrays in place (e.g. setting values with x .= ...)

Possible fixes:
- avoid mutating operations (preferred)
- or read the documentation and solutions for this error
  https://fluxml.ai/Zygote.jl/latest/limitations

and the versioninfo() output:

julia> versioninfo()
Julia Version 1.9.0
Commit 8e630552924 (2023-05-07 11:25 UTC)
Platform Info:
  OS: Linux (x86_64-linux-gnu)
  CPU: 16 × 11th Gen Intel(R) Core(TM) i7-11700KF @ 3.60GHz
  WORD_SIZE: 64
  LIBM: libopenlibm
  LLVM: libLLVM-14.0.6 (ORCJIT, rocketlake)
  Threads: 1 on 16 virtual cores
Environment:
  JULIA_COPY_STACKS = 1

Is this a Zygote problem?

RainerHeintzmann commented 1 year ago

The problem may be with InverseModelling.jl Can you use the newest version (Github) of that one? Maybe we should look together...


Rainer Heintzmann Leibniz Institute of Photonic Technology, Albert-Einstein Str. 9, 07745 Jena, Germany (preferred mail address) Tel.: +49 (0) 3641 206 431 Fax.: +49 (0) 3641 206 139 Institute of Physical Chemistry, Friedrich-Schiller-Universität Jena, Helmholtzweg 4, 07743 Jena, Germany jenaphotonics® Tel.: +49 (0) 3641 948 350

On Mon, 15 May 2023 at 18:41, Hossein Zarei Oshtolagh < @.***> wrote:

Hello,

I try to run the example code of this project and the line 17 https://github.com/bionanoimaging/PSFDistiller.jl/blob/37189add6fabc80aff652292ed230bcefdf67c57/examples/distille_psfs.jl#L17 gives an error:

ERROR: Mutating arrays is not supported -- called copyto!(Array{Float64, 3}, ...) This error occurs when you ask Zygote to differentiate operations that change the elements of arrays in place (e.g. setting values with x .= ...)

Possible fixes:

and the versioninfo() output:

julia> versioninfo() Julia Version 1.9.0 Commit 8e630552924 (2023-05-07 11:25 UTC) Platform Info: OS: Linux (x86_64-linux-gnu) CPU: 16 × 11th Gen Intel(R) Core(TM) i7-11700KF @ 3.60GHz WORD_SIZE: 64 LIBM: libopenlibm LLVM: libLLVM-14.0.6 (ORCJIT, rocketlake) Threads: 1 on 16 virtual cores Environment: JULIA_COPY_STACKS = 1

Is this a Zygote problem?

— Reply to this email directly, view it on GitHub https://github.com/bionanoimaging/PSFDistiller.jl/issues/4, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABZVV26USGCR4JTRTV57HMDXGJMD5ANCNFSM6AAAAAAYCOPGDA . You are receiving this because you are subscribed to this thread.Message ID: @.***>

hzarei4 commented 1 year ago

This was the InverseModeling.jl error. I have fixed it and made a Pull Request.