Skip to content

Commit c2923aa

Browse files
committed
Fix codestyle.
1 parent de3f3fc commit c2923aa

1 file changed

Lines changed: 6 additions & 5 deletions

File tree

ndcube/analysis/rebin.py

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
1-
import astropy.nddata
21
import numpy as np
32

4-
from ndcube import utils
3+
import astropy.nddata
4+
5+
from ndcube import ExtraCoords, utils
56
from ndcube.utils.exceptions import warn_user
67
from ndcube.wcs.wrappers import ResampledLowLevelWCS
78

@@ -277,12 +278,12 @@ def rebin_by_edges(
277278
orig_wcs = cube.combined_wcs
278279
new_coord_values = list(cube.axis_world_coords_values(wcs=orig_wcs))
279280
new_coord_physical_types = orig_wcs.world_axis_physical_types[::-1]
280-
new_coord_pix_idxs = [physical_type_to_pixel_axes(phys_type, orig_wcs) for phys_type in new_coord_physical_types]
281+
new_coord_pix_idxs = [utils.wcs.physical_type_to_pixel_axes(phys_type, orig_wcs) for phys_type in new_coord_physical_types]
281282
new_coord_names = (
282283
name if name else phys_type
283284
for name, phys_type in zip(orig_wcs.world_axis_names[::-1], new_coord_physical_types)
284285
)
285-
wc_arr_idxs = [convert_between_array_and_pixel_axes(idx, ndim) for idx in new_coord_pix_idxs]
286+
wc_arr_idxs = [utils.wcs.convert_between_array_and_pixel_axes(idx, ndim) for idx in new_coord_pix_idxs]
286287

287288
# Combine data and mask and determine whether mask also needs rebinning.
288289
new_data = _create_masked_array_for_rebinning(cube.data, cube.mask, operation_ignores_mask)
@@ -328,7 +329,7 @@ def rebin_by_edges(
328329
)
329330
data_unc = np.moveaxis(data_chunk, i, 0)
330331
mask_unc = np.moveaxis(mask_chunk, i, 0) if rebin_mask else new_mask
331-
tmp_uncertainty = propagate_rebin_uncertainties(
332+
tmp_uncertainty = utils.cube.propagate_rebin_uncertainties(
332333
uncertainty_chunk,
333334
data_unc,
334335
mask_unc,

0 commit comments

Comments
 (0)