@@ -266,30 +266,6 @@ def load_catalog(self, table: Table, x_colname: str = 'x', y_colname: str = 'y',
266
266
skycoord_colname : str = 'coord' , use_skycoord : bool = True ,
267
267
catalog_label : str | None = None ,
268
268
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
- """
293
269
try :
294
270
coords = table [skycoord_colname ]
295
271
except KeyError :
@@ -320,6 +296,7 @@ def load_catalog(self, table: Table, x_colname: str = 'x', y_colname: str = 'y',
320
296
to_add [skycoord_colname ] = None
321
297
322
298
catalog_label = self ._resolve_catalog_label (catalog_label )
299
+
323
300
if (
324
301
catalog_label in self ._catalogs
325
302
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',
329
306
else :
330
307
self ._catalogs [catalog_label ].data = to_add
331
308
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
+
332
316
def remove_catalog (self , catalog_label : str | None = None ) -> None :
333
317
"""
334
318
Remove markers from the image.
0 commit comments