@@ -77,8 +77,6 @@ def __init__(self, logger=None, image_width=500, image_height=500,
7777 self ._jup_img .max_width = '100%'
7878 self ._jup_img .height = 'auto'
7979
80- self ._pixel_offset = pixel_coords_offset
81-
8280 # Set the width of the box containing the image to the desired width
8381 # Note: We are NOT setting the height. That is because the height
8482 # is automatically set by the image aspect ratio.
@@ -196,8 +194,8 @@ def _mouse_move_cb(self, viewer, button, data_x, data_y):
196194 except Exception :
197195 imval = 'N/A'
198196
199- val = (f'X: { data_x + self . _pixel_offset :.2f} , '
200- f'Y: { data_y + self . _pixel_offset :.2f} ' )
197+ val = (f'X: { data_x :.2f} , '
198+ f'Y: { data_y :.2f} ' )
201199
202200 if image .wcs .wcs is not None :
203201 try :
@@ -239,8 +237,8 @@ def _mouse_click_cb(self, viewer, event, data_x, data_y):
239237
240238 # For debugging.
241239 with self .print_out :
242- print (f'Centered on X={ data_x + self . _pixel_offset } '
243- f'Y={ data_y + self . _pixel_offset } ' )
240+ print (f'Centered on X={ data_x } '
241+ f'Y={ data_y } ' )
244242
245243 def load_fits (self , filename , numhdu = None , memmap = None ):
246244 """Load a FITS file or HDU into the viewer.
@@ -320,7 +318,7 @@ def center_on(self, point):
320318 if isinstance (point , SkyCoord ):
321319 self ._viewer .set_pan (point .ra .deg , point .dec .deg , coord = 'wcs' )
322320 else :
323- self ._viewer .set_pan (* (np .asarray (point ) - self . _pixel_offset ))
321+ self ._viewer .set_pan (* (np .asarray (point )))
324322
325323 @deprecated ('0.3' , alternative = 'offset_by' )
326324 def offset_to (self , dx , dy , skycoord_offset = False ):
@@ -570,10 +568,6 @@ def get_markers_by_name(self, marker_name, x_colname='x', y_colname='y',
570568
571569 sky_col = SkyCoord (radec_col [:, 0 ], radec_col [:, 1 ], unit = 'deg' )
572570
573- # Convert X,Y from 0-indexed to 1-indexed
574- if self ._pixel_offset != 0 :
575- xy_col += self ._pixel_offset
576-
577571 # Build table
578572 if include_skycoord :
579573 markers_table = Table (
@@ -667,12 +661,6 @@ def add_markers(self, table, x_colname='x', y_colname='y',
667661 else : # Use X,Y
668662 coord_x = table [x_colname ].data
669663 coord_y = table [y_colname ].data
670- # Convert data coordinates from 1-indexed to 0-indexed
671- if self ._pixel_offset != 0 :
672- # Don't use the in-place operator -= here that modifies
673- # the input table.
674- coord_x = coord_x - self ._pixel_offset
675- coord_y = coord_y - self ._pixel_offset
676664
677665 # Prepare canvas and retain existing marks
678666 try :
0 commit comments