@@ -79,8 +79,8 @@ def _assert_empty_catalog_table(self, table):
7979 assert len (table ) == 0
8080 assert sorted (table .colnames ) == sorted (["x" , "y" , "coord" ])
8181
82- def _get_catalog_names_as_set (self ):
83- marks = self .image .catalog_names
82+ def _get_catalog_labels_as_set (self ):
83+ marks = self .image .catalog_labels
8484 return set (marks )
8585
8686 @pytest .mark .parametrize ("load_type" , ["fits" , "nddata" , "array" ])
@@ -362,7 +362,7 @@ def test_set_catalog_style_before_catalog_data_raises_error(self):
362362 with pytest .raises (
363363 ValueError , match = "Must load a catalog before setting a catalog style"
364364 ):
365- self .image .set_catalog_style (color = "red" , shape = "x " , size = 10 )
365+ self .image .set_catalog_style (color = "red" , shape = "circle " , size = 10 )
366366
367367 def test_set_get_catalog_style_no_labels (self , catalog ):
368368 # Check that getting without setting returns a dict that contains
@@ -376,7 +376,7 @@ def test_set_get_catalog_style_no_labels(self, catalog):
376376 # Add some data before setting a style
377377 self .image .load_catalog (catalog )
378378 # Check that setting a marker style works
379- marker_settings = dict (color = "red" , shape = "x " , size = 10 )
379+ marker_settings = dict (color = "red" , shape = "crosshair " , size = 10 )
380380 self .image .set_catalog_style (** marker_settings .copy ())
381381
382382 retrieved_style = self .image .get_catalog_style ()
@@ -421,7 +421,7 @@ def test_set_get_catalog_style_preserves_extra_keywords(self, catalog):
421421 # The only required keywords are color, shape, and size.
422422 # Add some extra keyword to the style.
423423 style = dict (
424- color = "blue" , shape = "x " , size = 10 , extra_kw = "extra_value" , alpha = 0.5
424+ color = "blue" , shape = "circle " , size = 10 , extra_kw = "extra_value" , alpha = 0.5
425425 )
426426 self .image .set_catalog_style (** style .copy ())
427427
@@ -489,7 +489,7 @@ def test_load_multiple_catalogs(self, catalog):
489489 catalog_label = "test2" ,
490490 )
491491
492- assert sorted (self .image .catalog_names ) == ["test1" , "test2" ]
492+ assert sorted (self .image .catalog_labels ) == ["test1" , "test2" ]
493493
494494 # No guarantee markers will come back in the same order, so sort them.
495495 t1 = self .image .get_catalog (catalog_label = "test1" )
@@ -513,7 +513,7 @@ def test_load_multiple_catalogs(self, catalog):
513513 # other one without a label.
514514 self .image .remove_catalog (catalog_label = "test1" )
515515 # Make sure test1 is really gone.
516- assert self .image .catalog_names == ("test2" ,)
516+ assert self .image .catalog_labels == ("test2" ,)
517517
518518 # Get without a catalog
519519 t2 = self .image .get_catalog ()
@@ -534,7 +534,7 @@ def test_load_catalog_multiple_same_label(self, catalog):
534534 self .image .load_catalog (catalog , catalog_label = "test1" )
535535
536536 retrieved_catalog = self .image .get_catalog (catalog_label = "test1" )
537- assert len (retrieved_catalog ) == 2 * len (catalog )
537+ assert len (retrieved_catalog ) == len (catalog )
538538
539539 def test_load_catalog_with_skycoord_no_wcs (self , catalog , data ):
540540 # Check that loading a catalog with skycoord but no x/y and
@@ -543,13 +543,10 @@ def test_load_catalog_with_skycoord_no_wcs(self, catalog, data):
543543
544544 # Remove x/y columns from the catalog
545545 del catalog ["x" , "y" ]
546- self .image .load_catalog (catalog )
547- # Retrieve the catalog and check that the x and y columns are None
548- retrieved_catalog = self .image .get_catalog ()
549- assert "x" in retrieved_catalog .colnames
550- assert "y" in retrieved_catalog .colnames
551- assert all (rc is None for rc in retrieved_catalog ["x" ])
552- assert all (rc is None for rc in retrieved_catalog ["y" ])
546+ with pytest .raises (
547+ ValueError , match = "Cannot use pixel coordinates without pixel columns"
548+ ):
549+ self .image .load_catalog (catalog )
553550
554551 def test_load_catalog_with_use_skycoord_no_skycoord_no_wcs (self , catalog , data ):
555552 # Check that loading a catalog with use_skycoord=True but no
@@ -605,7 +602,7 @@ def test_load_catalog_with_no_style_has_a_style(self, catalog):
605602 def test_load_catalog_with_style_sets_style (self , catalog ):
606603 # Check that loading a catalog with a style sets the style
607604 # for that catalog.
608- style = dict (color = "blue" , shape = "x " , size = 10 )
605+ style = dict (color = "blue" , shape = "square " , size = 10 )
609606 self .image .load_catalog (
610607 catalog , catalog_label = "test1" , catalog_style = style .copy ()
611608 )
0 commit comments