SPIDERMAN icon indicating copy to clipboard operation
SPIDERMAN copied to clipboard

Patching code for python 3.9

Open taylorbell57 opened this issue 2 years ago • 0 comments

I am looking at adding spiderman as an accepted model type in Eureka, but I encountered several issues installing and running spiderman. This PR includes the changes I needed to make in order to get spiderman installed and running on my Intel MacOS 12.6 running python 3.9.7.

  1. I had to remove the brackets around the license kwarg to the setup function in setup.py as setuptools tries to run split on what it assumes is a string which fails if license is a list.
  2. matplotlib._png is no longer present, but matplotlib.pyplot.imread does exist and should do the trick
  3. The mask variable in the stellar_grid.sum_flux function had been made a list containing an array which made it 2 dimensional (1,1000) which broken when doing diff = diff[mask] as diff is only 1 dimensional

Spiderman now works for me, but I don't get the same values that are outputted on https://spiderman.readthedocs.io/en/latest/plotting.html. The two printed values on that page are 0.00045781826310942186 and 7.03802421799e+20 while I get 0.0005302903777573142 and 7.118960968189555e+22 even though I copy-pasted the exact commands on that page. The first plot I get is also not exactly the same shape as https://spiderman.readthedocs.io/en/latest/_images/simple_spectrum.png and instead has a slight upward curvature instead of downward curvature. Perhaps the docs values and plots are just out-of-date and do not represent the values one should expect with the current version of the code after some fixes or improvements?

taylorbell57 avatar Sep 15 '22 21:09 taylorbell57