nasa-jpl / autoRIFT

A Python module of a fast and intelligent algorithm for finding the pixel displacement between two images
Apache License 2.0
212 stars 52 forks source link

Fix issue #64 #65

Closed snoyes closed 1 year ago

jhkennedy commented 1 year ago

@snoyes thanks! This is great! I've fixed a few of these as I've found them but hadn't done a deep look yet.

I found another possibly problematic places is is used: https://github.com/nasa-jpl/autoRIFT/blob/master/geo_autoRIFT/autoRIFT/autoRIFT.py#L437

I'm out the next couple days, but I'll push a change for that line as well (unless you beat me to it) and then merge next week.

snoyes commented 1 year ago

I found another possibly problematic places is is used: https://github.com/nasa-jpl/autoRIFT/blob/master/geo_autoRIFT/autoRIFT/autoRIFT.py#L437

That one is ok if you want to make sure OverSampleRatio is a dict. If it's acceptable to be a subclass of dict, like an OrderedDict or a collections.Counter, then use isinstance() instead.

jhkennedy commented 1 year ago

@snoyes I'm pretty sure it can be any dict-like object, so isinstance() would be better here, but I'll actually leave that for the future.