bluesky / hklpy

Diffractometer computation library with ophyd pseudopositioner support
https://blueskyproject.io/hklpy
BSD 3-Clause "New" or "Revised" License
2 stars 11 forks source link

adding same reflection should be ignored #248

Open prjemian opened 1 year ago

prjemian commented 1 year ago

When a user creates a file that is reloaded many times, such as during development, it can lead to the same reflections being added multiple times. We should handle this case more gracefully than to simply accumulate additional reflections.

Example:

These would be in a example.py file that is reloaded with %run -i example.py

prjemian commented 8 months ago

This would be enabled in a Python reflection class with a dunder equal method:

def __eq__(self, other):
    return comparison_result