akdeniz-uzay / A-Track

A-Track: Detecting Moving Objects in FITS images.
GNU General Public License v3.0
19 stars 7 forks source link

Fixed a bug in f2n #9

Closed eggoeke closed 6 years ago

eggoeke commented 6 years ago

There was a snippet where the wrong datatype was being used. Specifically, n had to be cast to an integer. Also brought a few hundred lines of code up to PEP8.

                    **if z2 == 'auto':
                            # Here we want to reject a percentage of high values...
                            sortedstatsel = np.sort(statsel)
                            n = int(round(0.9995 * statsel.size))
                            self.z2 = sortedstatsel[n]
                            if self.verbose:
                                    print('Setting auto z2 to {0}'.format(self.z2))**
yucelkilic commented 6 years ago

Dear @eggoeke ,

Firstly I am grateful for such a great effort and improvement. After the Python 3 compatibility, I've kept the PEP8 compatibility for the future, but you've done everything pretty well. Thank you. But I noticed that the actual developer of f2n (Dr. Malte Tewes) develops f2n for python3 and I also suggest you take a look at it.

Best wishes.