Skip to content

Commit 6acc0df

Browse files
committed
Remove unused argument and logic
1 parent ed066ba commit 6acc0df

File tree

2 files changed

+3
-6
lines changed

2 files changed

+3
-6
lines changed

ccdproc/combiner.py

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -763,13 +763,10 @@ def _calculate_step_sizes(x_size, y_size, num_chunks):
763763
return xstep, ystep
764764

765765

766-
def _calculate_size_of_image(ccd, combine_uncertainty_function):
766+
def _calculate_size_of_image(ccd):
767767
# If uncertainty_func is given for combine this will create an uncertainty
768768
# even if the originals did not have one. In that case we need to create
769769
# an empty placeholder.
770-
xp = array_api_compat.array_namespace(ccd.data)
771-
if ccd.uncertainty is None and combine_uncertainty_function is not None:
772-
ccd.uncertainty = StdDevUncertainty(xp.zeros(ccd.data.shape))
773770

774771
size_of_an_img = ccd.data.nbytes
775772
try:
@@ -993,7 +990,7 @@ def combine(
993990
if ccd.mask is None:
994991
ccd.mask = xp.zeros_like(ccd.data, dtype=bool)
995992

996-
size_of_an_img = _calculate_size_of_image(ccd, combine_uncertainty_function)
993+
size_of_an_img = _calculate_size_of_image(ccd)
997994

998995
no_of_img = len(img_list)
999996

ccdproc/tests/run_for_memory_profile.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ def run_memory_profile(
109109
)
110110

111111
ccd = CCDData.read(files[0])
112-
expected_img_size = _calculate_size_of_image(ccd, None)
112+
expected_img_size = _calculate_size_of_image(ccd)
113113

114114
if memory_limit:
115115
kwargs["mem_limit"] = memory_limit

0 commit comments

Comments
 (0)