@@ -266,30 +266,6 @@ def load_catalog(self, table: Table, x_colname: str = 'x', y_colname: str = 'y',
266266 skycoord_colname : str = 'coord' , use_skycoord : bool = True ,
267267 catalog_label : str | None = None ,
268268 catalog_style : dict | None = None ) -> None :
269- """
270- Add markers to the image.
271-
272- Parameters
273- ----------
274- table : `astropy.table.Table`
275- The table containing the marker positions.
276- x_colname : str, optional
277- The name of the column containing the x positions. Default
278- is ``'x'``.
279- y_colname : str, optional
280- The name of the column containing the y positions. Default
281- is ``'y'``.
282- skycoord_colname : str, optional
283- The name of the column containing the sky coordinates. If
284- given, the ``use_skycoord`` parameter is ignored. Default
285- is ``'coord'``.
286- use_skycoord : bool, optional
287- If `True`, the ``skycoord_colname`` column will be used to
288- get the marker positions.
289- catalog_label : str, optional
290- The name of the marker set to use. If not given, a unique
291- name will be generated.
292- """
293269 try :
294270 coords = table [skycoord_colname ]
295271 except KeyError :
@@ -320,6 +296,7 @@ def load_catalog(self, table: Table, x_colname: str = 'x', y_colname: str = 'y',
320296 to_add [skycoord_colname ] = None
321297
322298 catalog_label = self ._resolve_catalog_label (catalog_label )
299+
323300 if (
324301 catalog_label in self ._catalogs
325302 and self ._catalogs [catalog_label ].data is not None
@@ -329,6 +306,13 @@ def load_catalog(self, table: Table, x_colname: str = 'x', y_colname: str = 'y',
329306 else :
330307 self ._catalogs [catalog_label ].data = to_add
331308
309+ if catalog_style is None :
310+ catalog_style = self ._default_marker_style .copy ()
311+
312+ self ._catalogs [catalog_label ].style = catalog_style
313+
314+ load_catalog .__doc__ = ImageViewerInterface .load_catalog .__doc__
315+
332316 def remove_catalog (self , catalog_label : str | None = None ) -> None :
333317 """
334318 Remove markers from the image.
0 commit comments