One of the recent updates to katdal is a wrapper for object-valued sensors. The wrapper defers hashing to the underlying object, allowing it to be looked up in dicts. If the object is a generic one, it will merrily hash based on its id. In the case of katpoint objects like Target and Antenna, this resulted in targets being treated as different even though they have identical description strings, causing katdal to crash.
One solution is to make the wrapper object unhashable, which is crude but effective. The more elegant solution of this commit is to make all relevant katpoint objects hashable instead in a way that is compatible with their respective equality comparison operators.
The only holdout is DelayCorrection, which needs a description string first (and soon!).
One of the recent updates to katdal is a wrapper for object-valued sensors. The wrapper defers hashing to the underlying object, allowing it to be looked up in dicts. If the object is a generic one, it will merrily hash based on its id. In the case of katpoint objects like Target and Antenna, this resulted in targets being treated as different even though they have identical description strings, causing katdal to crash.
One solution is to make the wrapper object unhashable, which is crude but effective. The more elegant solution of this commit is to make all relevant katpoint objects hashable instead in a way that is compatible with their respective equality comparison operators.
The only holdout is DelayCorrection, which needs a description string first (and soon!).