Autostronomy / AutoProf

Automatic Isophotal solutions for galaxy images
https://autoprof.readthedocs.io/
GNU General Public License v3.0
27 stars 4 forks source link

Missing logo PNG file and deprecation of scipy.integrate.trapz function #18

Closed Xudewang closed 3 months ago

Xudewang commented 3 months ago

Hi Connor,

I have reinstalled AutoProf version 1.1.2 using pip in a new Python 3.10 environment. I've encountered two issues:

(1) The installed files do not include the AutoProf logo PNG file in the media folder. As a result, when the "ap_doplot = True" option is set, the code will break due to the missing logo file.

(2) The requirements.txt file specifies scipy>=1.3.3. However, the scipy.integrate.trapz function used in AutoProf has been deprecated since version 1.12.0. This function can be replaced with the integrate.trapezoid function. Alternatively, the issue with the deprecated scipy.integrate.trapz function could be resolved by constraining the scipy version in the requirements.txt file to a version before 1.12.0.

And it seems that the newest version of NumPy has a conflict with AutoProf.

Best, Dewang

ConnorStoneAstro commented 3 months ago

Hi @Xudewang thanks for identifying these issues! For the plotting you can probably get a quick fix by setting ap_nologo = True in the config file. But for the rest, I'll make sure to fix this ASAP! I guess I knew that dependencies issues would come up eventually since I didn't set strict version requirements. I'll try and make sure this doesn't happen again with some clearer version requirements.

ConnorStoneAstro commented 3 months ago

HI @Xudewang I have pushed a new update version 1.2.0 which hopefully fixes the issues but I am working quick between things. I'll take a more deep dive in the next week or two and try to get a more reliable fix for the long term.

Xudewang commented 3 months ago

@ConnorStoneAstro Thanks for this quick fix! There is another "trapz" need to be removed from the Background.py import.

ConnorStoneAstro commented 3 months ago

@Xudewang ah thanks, that's what I get for going too fast. Ok, I uploaded a patch version 1.2.1 which no longer imports trapz in Background.py. hopefully this will hold up until I get the better versioning system online.

ConnorStoneAstro commented 3 months ago

@Xudewang just wanted to say thanks for pushing me to update the AutoProf versioning system. Development is a lot easier now that I've automated testing and distribution :)