Skip to content

Commit b976510

Browse files
committed
revert code
1 parent ce13a89 commit b976510

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

gempy/library/peak_finding.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,8 @@ def average_along_slit(ext, center=None, offset_from_center=None,
9898
ext.data, ext.mask, ext.variance,
9999
transpose=(dispersion_axis == 0), section=extract_slice)
100100

101+
# The "variance" here is the square of the standard error on the mean
102+
# of the pixel values averaged over the section of the slit.
101103
if constant_slit:
102104
# Create 1D spectrum; pixel-to-pixel variation is a better indicator
103105
# of S/N than the VAR plane
@@ -106,8 +108,6 @@ def average_along_slit(ext, center=None, offset_from_center=None,
106108
data, mask, variance = NDStacker.combine(
107109
data, mask=mask, variance=variance if use_variance else None,
108110
combiner=combiner)
109-
if not use_variance:
110-
variance *= (extract_slice.stop - extract_slice.start - 2)
111111
return data, mask, variance, extract_slice
112112

113113
else:

0 commit comments

Comments
 (0)