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

Should plotting from pickled cats work yet? #289

Closed jeanconn closed 5 years ago

jeanconn commented 5 years ago

I'm not sure if this is a bridge too far for this release, but it would certainly be helpful if proseco refetched the stars etc and could make the plot (sparkles is obviously doing it).

In [2]: proseco.test(get_version=True)
Out[2]: '4.4-r590-8721ee3'

In [5]: acas = pickle.load(open('third.pkl', 'rb'))

In [6]: acas[22058].plot()
---------------------------------------------------------------------------
TypeError                                 Traceback (most recent call last)
<ipython-input-6-d2f1b815d6f8> in <module>()
----> 1 acas[22058].plot()

~/git/proseco/proseco/core.py in plot(self, ax, **kwargs)
    693         kwargs.setdefault('catalog', self.get_catalog_for_plot())
    694         kwargs.setdefault('stars', self.stars)
--> 695         kwargs.setdefault('bad_stars', self.bad_stars_mask)
    696         return super().plot(ax, **kwargs)
    697 

~/git/proseco/proseco/core.py in bad_stars_mask(self)
    475         """
    476         if not hasattr(self, '_bad_stars_mask'):
--> 477             self._bad_stars_mask = ~self.get_candidates_mask(self.stars)
    478         return self._bad_stars_mask
    479 

~/git/proseco/proseco/catalog.py in get_candidates_mask(self, stars)
    260 
    261         """
--> 262         ok = (self.acqs.get_candidates_mask(stars) |
    263               self.guides.get_candidates_mask(stars))
    264         return ok

~/git/proseco/proseco/acq.py in get_candidates_mask(self, stars)
    281               (stars['ASPQ1'] < 40) &  # Less than 2 arcsec offset from nearby spoiler
    282               (stars['ASPQ2'] == 0) &  # Proper motion less than 0.5 arcsec/yr
--> 283               (stars['POS_ERR'] < 3000) &  # Position error < 3.0 arcsec
    284               ((stars['VAR'] == -9999) | (stars['VAR'] == 5))  # Not known to vary > 0.2 mag
    285               )

TypeError: 'NoneType' object is not subscriptable
jeanconn commented 5 years ago

I suppose this is still just #207, so closing because that issue is still open.