openspyrit / spyrit

A Python toolbox for deep image reconstruction, with emphasis on single-pixel imaging.
https://spyrit.readthedocs.io/en/
GNU Lesser General Public License v3.0
45 stars 15 forks source link

How can I change the code in the function package #234

Closed WH-CSU closed 1 month ago

WH-CSU commented 2 months ago

Dear Author, How can I change the code in the function package? For example, spyrit.core.noise.Poisson, I found only comments and Example in the noise.py function package. thanks if you can reply!

romainphan commented 2 months ago

Hi, I assume you want to change the source code to implement yourself some changes, for instance in noise.py ? If that's the case, you can follow the guidelines to install spyrit in developer mode in the ReadMe. It works for Windows too even if it's in the Linux & MacOs section. I hope this helps,

nducros commented 1 month ago

Hi, Have you checked it works?

WH-CSU commented 1 month ago

Hi, Have you checked it works?

Thank you very much for your help, I made changes to the code, although I'm not sure what the difference is between developer mode and application mode, but changing the noise.py code in application mode still works!

romainphan commented 1 month ago

Hi, glad to know this works :) The developer mode is useful if you want to have your package files somewhere else than in the (default) environment directory. This way you can have multiple environments referring to the same modified version. By the way, you're more than welcome if you'd like to contribute to the package!

WH-CSU commented 1 month ago

Hi, glad to know this works :) The developer mode is useful if you want to have your package files somewhere else than in the (default) environment directory. This way you can have multiple environments referring to the same modified version. By the way, you're more than welcome if you'd like to contribute to the package!

Thank you very much for your help, and once the results of my work prove useful, I'll be happy to make the modified code public so that more people can learn about spyrit!

romainphan commented 1 month ago

Thank you very much! I'm closing this issue but feel free to get back to us for any other issue, or to merge your modified version of the code.