@@ -87,7 +87,7 @@ def test_adding_markers_as_world_recovers_with_get_markers():
8787 marks_coords = SkyCoord (marks_world , unit = 'degree' )
8888 mark_coord_table = Table (data = [marks_coords ], names = ['coord' ])
8989 iw .add_markers (mark_coord_table , use_skycoord = True )
90- result = iw .get_markers ()
90+ result = iw .get_all_markers ()
9191 # Check the x, y positions as long as we are testing things...
9292 np .testing .assert_allclose (result ['x' ], marks_pix ['x' ])
9393 np .testing .assert_allclose (result ['y' ], marks_pix ['y' ])
@@ -121,7 +121,7 @@ def test_can_add_markers_with_names():
121121 marker_name = 'nonsense' )
122122
123123 # check that we get the right number of markers
124- marks = image .get_markers (marker_name = 'nonsense' )
124+ marks = image .get_markers_by_name (marker_name = 'nonsense' )
125125 assert len (marks ) == 6
126126
127127 # Make sure setting didn't change the default name
@@ -132,7 +132,7 @@ def test_can_add_markers_with_names():
132132 assert image ._marktags == set (['nonsense' , image ._default_mark_tag_name ])
133133
134134 # Delete just the nonsense markers
135- image .remove_markers ('nonsense' )
135+ image .remove_markers_by_name ('nonsense' )
136136
137137 assert 'nonsense' not in image ._marktags
138138 assert image ._default_mark_tag_name in image ._marktags
@@ -141,7 +141,7 @@ def test_can_add_markers_with_names():
141141 image .add_markers (Table (data = [x , y ], names = ['x' , 'y' ]),
142142 marker_name = 'nonsense' )
143143 # ...and now delete all of the markers
144- image .reset_markers ()
144+ image .remove_all_markers ()
145145 # We should have no markers on the image
146146 assert image ._marktags == set ()
147147
@@ -192,14 +192,14 @@ def test_get_marker_with_names():
192192 assert len (image ._marktags ) == 3
193193
194194 for marker in image ._marktags :
195- out_table = image .get_markers ( marker_name = marker )
195+ out_table = image .get_markers_by_name ( marker )
196196 # No guarantee markers will come back in the same order, so sort them.
197197 out_table .sort ('x' )
198198 assert (out_table ['x' ] == input_markers ['x' ]).all ()
199199 assert (out_table ['y' ] == input_markers ['y' ]).all ()
200200
201201 # Get all of markers at once
202- all_marks = image .get_markers ( marker_name = 'all' )
202+ all_marks = image .get_all_markers ( )
203203
204204 # That should have given us three copies of the input table
205205 expected = vstack ([input_markers ] * 3 , join_type = 'exact' )
@@ -222,7 +222,7 @@ def test_unknown_marker_name_error():
222222 iw = ImageWidget ()
223223 bad_name = 'not a real marker name'
224224 with pytest .raises (ValueError ) as e :
225- iw .get_markers (marker_name = bad_name )
225+ iw .get_markers_by_name (marker_name = bad_name )
226226
227227 assert f"No markers named '{ bad_name } '" in str (e .value )
228228
@@ -239,7 +239,7 @@ def test_marker_name_has_no_marks_warning():
239239 iw .start_marking (marker_name = bad_name )
240240
241241 with pytest .warns (UserWarning ) as record :
242- iw .get_markers (marker_name = bad_name )
242+ iw .get_markers_by_name (marker_name = bad_name )
243243
244244 assert f"Marker set named '{ bad_name } ' is empty" in str (record [0 ].message )
245245
@@ -265,7 +265,7 @@ def test_empty_marker_name_works_with_all():
265265 # Start marking to create a new marker set that is empty
266266 iw .start_marking (marker_name = 'empty' )
267267
268- marks = iw .get_markers ( marker_name = 'all' )
268+ marks = iw .get_all_markers ( )
269269 assert len (marks ) == len (x )
270270 assert 'empty' not in marks ['marker name' ]
271271
0 commit comments