File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -764,6 +764,7 @@ def find_mrt_sources(self):
764764 from astropy .utils import minversion
765765
766766 PHOTUTILS_LT_3 = not minversion (photutils , "2.3.1.dev" ) # dev tag a little off
767+ photutils .future_column_names = True
767768
768769 LOG .info ('Detection threshold: {}' .format (self .threshold ))
769770
@@ -787,7 +788,6 @@ def find_mrt_sources(self):
787788
788789 # can fail for cases where nothing found. Allow code to return
789790 # nothing and move on
790-
791791 tbl = s .find_stars (snrmap , mask = snrmap_mask )
792792 if tbl is None :
793793 nsources = 0
@@ -797,6 +797,12 @@ def find_mrt_sources(self):
797797 LOG .info ('{{no}} sources found using kernel: {}' .format (nsources ))
798798
799799 if nsources > 0 :
800+ if not PHOTUTILS_LT_3 :
801+ col_map = {'x_centroid' : 'xcentroid' ,
802+ 'y_centroid' : 'ycentroid' }
803+ for col in col_map :
804+ tbl .rename_column (col , col_map [col ])
805+
800806 tbl = tbl [np .isfinite (tbl ['xcentroid' ])]
801807 LOG .info ('{} sources found using kernel' .format (len (tbl )))
802808 if (len (tbls ) > 0 ):
You can’t perform that action at this time.
0 commit comments