Closed jeanconn closed 5 years ago
This only applies to a catalog generated with get_guide_catalog()
. The fix should be to move the catalog=self.as_array()
line below the if self.catalog_type
block. After self.as_array()
the catalog is no longer a Table
and if it doesn't already have a type
column then that line fails.
Though I guess that approach has a side effect of adding a type
column to the guide catalog. Not a huge deal I guess.
From a vocab perspective, I don't see a difference between a "guide catalog" and a "pure guide catalog (get_guide_catalog)". Are you contrasting a "pure guide catalog" with a "subset of guide stars in a get_aca_catalog catatlog"?
Also, I'm a little confused by the suggested fix? If I bump that line down below the block I just get
UnboundLocalError: local variable 'catalog' referenced before assignment
when it is trying to assign the type
665 if self.catalog_type:
--> 666 catalog['type'] = self.catalog_type
667 catalog = self.as_array()
668 return catalog
Eh. I guess self['type'] = self.catalog_type would be doable.