imSim icon indicating copy to clipboard operation
imSim copied to clipboard

Fringing pattern not deterministic

Open rmjarvis opened this issue 1 year ago • 2 comments

Apparently the Python hash function is not deterministic as of Python 3.2. This is for good security-related reasons for most typical kinds of applications of hashes. But it means our fringing patterns will randomly change from one run to another (i.e. typically from one exposure to another for the way we typically run things).

cf. https://stackoverflow.com/questions/27954892/deterministic-hashing-in-python-3

I'm pretty sure this is not desirable behavior, so we should come up with a different way to convert serial_num into an integer, which is deterministic.

rmjarvis avatar Feb 02 '24 21:02 rmjarvis

This is what I have used (based on a different stack overflow which I didn't link to, sorry): https://github.com/lsst/pipe_tasks/blob/main/python/lsst/pipe/tasks/reserveIsolatedStars.py#L81-L84

erykoff avatar Feb 02 '24 21:02 erykoff

Fixed in #446

rmjarvis avatar Feb 02 '24 21:02 rmjarvis