diff --git a/btk/draw_blends.py b/btk/draw_blends.py index 5c8622f20..10aa3c016 100644 --- a/btk/draw_blends.py +++ b/btk/draw_blends.py @@ -36,7 +36,9 @@ def get_center_in_pixels(blend_catalog, wcs): Returns: `astropy.table.Column`: x and y coordinates of object centroid """ - x_peak, y_peak = wcs.all_world2pix(blend_catalog["ra"] / 3600, blend_catalog["dec"] / 3600, 0) + x_peak, y_peak = wcs.world_to_pixel_values( + blend_catalog["ra"] / 3600, blend_catalog["dec"] / 3600 + ) dx_col = Column(x_peak, name="x_peak") dy_col = Column(y_peak, name="y_peak") return dx_col, dy_col diff --git a/tests/test_draw.py b/tests/test_draw.py index 8971b35e7..a68339afc 100644 --- a/tests/test_draw.py +++ b/tests/test_draw.py @@ -164,7 +164,7 @@ def test_default(self, mock_show): self.match_background_noise(draw_output["blend_images"]) def test_basic_sampling(self): - sampling_function = btk.sampling_functions.BasicSamplingFunction() + sampling_function = btk.sampling_functions.BasicSampling() draw_generator = get_draw_generator( fixed_parameters=True, sampling_function=sampling_function ) diff --git a/tests/test_group_sampling.py b/tests/test_group_sampling.py index 9f8203710..c8809ff72 100644 --- a/tests/test_group_sampling.py +++ b/tests/test_group_sampling.py @@ -3,7 +3,7 @@ from btk.catalog import CatsimCatalog from btk.draw_blends import CatsimGenerator -from btk.sampling_functions import GroupSamplingFunctionNumbered +from btk.sampling_functions import GroupSamplingNumbered from btk.survey import get_surveys @@ -18,7 +18,7 @@ def get_group_sampling_draw_generator(batch_size=3): pixel_scale = 0.2 shift = [0.8, -0.7] catalog = CatsimCatalog.from_file(catalog_name) - sampling_function = GroupSamplingFunctionNumbered( + sampling_function = GroupSamplingNumbered( max_number, wld_catalog_name, stamp_size, pixel_scale, shift=shift ) draw_blend_generator = CatsimGenerator(