@@ -277,30 +277,6 @@ def load_catalog(self, table: Table, x_colname: str = 'x', y_colname: str = 'y',
277277 skycoord_colname : str = 'coord' , use_skycoord : bool = True ,
278278 catalog_label : str | None = None ,
279279 catalog_style : dict | None = None ) -> None :
280- """
281- Add markers to the image.
282-
283- Parameters
284- ----------
285- table : `astropy.table.Table`
286- The table containing the marker positions.
287- x_colname : str, optional
288- The name of the column containing the x positions. Default
289- is ``'x'``.
290- y_colname : str, optional
291- The name of the column containing the y positions. Default
292- is ``'y'``.
293- skycoord_colname : str, optional
294- The name of the column containing the sky coordinates. If
295- given, the ``use_skycoord`` parameter is ignored. Default
296- is ``'coord'``.
297- use_skycoord : bool, optional
298- If `True`, the ``skycoord_colname`` column will be used to
299- get the marker positions.
300- catalog_label : str, optional
301- The name of the marker set to use. If not given, a unique
302- name will be generated.
303- """
304280 try :
305281 coords = table [skycoord_colname ]
306282 except KeyError :
@@ -331,6 +307,7 @@ def load_catalog(self, table: Table, x_colname: str = 'x', y_colname: str = 'y',
331307 to_add [skycoord_colname ] = None
332308
333309 catalog_label = self ._resolve_catalog_label (catalog_label )
310+
334311 if (
335312 catalog_label in self ._catalogs
336313 and self ._catalogs [catalog_label ].data is not None
@@ -340,6 +317,13 @@ def load_catalog(self, table: Table, x_colname: str = 'x', y_colname: str = 'y',
340317 else :
341318 self ._catalogs [catalog_label ].data = to_add
342319
320+ if catalog_style is None :
321+ catalog_style = self ._default_marker_style .copy ()
322+
323+ self ._catalogs [catalog_label ].style = catalog_style
324+
325+ load_catalog .__doc__ = ImageViewerInterface .load_catalog .__doc__
326+
343327 def remove_catalog (self , catalog_label : str | None = None ) -> None :
344328 """
345329 Remove markers from the image.
0 commit comments