sot / proseco

Probabilistic star evaluation and catalog optimization
https://sot.github.io/proseco
BSD 3-Clause "New" or "Revised" License
1 stars 0 forks source link

guide_count() confusion #288

Closed jskrist closed 5 years ago

jskrist commented 5 years ago

When I run ORViewer with the tidy-spark-joy branch, #285, I get the following error:

 Error executing python statement: 'exec(Path(MX_VAR_doWorkFile).open().read())' - guide_count() takes 2 positional arguments but 3 were given
 <class 'TypeError'>: guide_count() takes 2 positional arguments but 3 were given
 Traceback (most recent call last):
   File "<string>", line 1, in <module>
   File "<string>", line 22, in <module>
   File "C:\Users\jkristoff\Documents\MATLAB\FOT_Tools\Python\python3_Windows_64bit_testing\lib\site-packages\proseco-4.4-py3.6.egg\proseco\catalog.py", line 248, in get_review_table
     return ACAReviewTable(self)
   File "C:\Users\jkristoff\Documents\MATLAB\FOT_Tools\Python\python3_Windows_64bit_testing\lib\site-packages\sparkles-4.1-py3.6.egg\sparkles\core.py", line 378, in __init__
     self.is_ER)
 Error executing python statement: 'exec(Path(MX_VAR_doWorkFile).open().read())' - guide_count() takes 2 positional arguments but 3 were given

The actual code being called on the referenced line 22 is: acar = aca.get_review_table()

I thought this might be due to the new raise_exc argument being set to True by default, but I have passed raise_exc = False, everywhere I can, and I am still seeing this error. It looks like it might be caused due to a confusion between the guide_count() function used in proseco/guide.py, imported from chandra_aca.star_probs, which takes 2 parameters, and the guide_count() function used in sparkles/core.py, imported from .roll_optimize, which takes 3 parameters.

jskrist commented 5 years ago

Never-mind. 🤦‍♂️ I checked out the tidy-spark-joy branch instead of the pull request, and those two things are not the same.

taldcroft commented 5 years ago

FYI the latest code requires chandra_aca 4.25.1, which is going to be part of the Ska3 Matlab release.