Skip to content

Commit

Permalink
Flag the rms!!
Browse files Browse the repository at this point in the history
  • Loading branch information
AlecThomson committed Dec 5, 2024
1 parent 878210f commit 9a9a4aa
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions arrakis/rmsynth_oncuts.py
Original file line number Diff line number Diff line change
Expand Up @@ -359,10 +359,15 @@ def sigma_clip_spectra(
for spectrum in stokes_spectra:
filtered_data = spectrum.data.copy()
filtered_data[filter_idx] = np.nan
filtered_rms = spectrum.rms.copy()
# Set the RMS to NaN where the data is NaN!
filtered_rms[filter_idx] = np.nan
filtered_bkg = spectrum.bkg.copy()
filtered_bkg[filter_idx] = np.nan
filtered_spectrum = Spectrum(
data=filtered_data,
rms=spectrum.rms,
bkg=spectrum.bkg,
rms=filtered_rms,
bkg=filtered_bkg,
filename=spectrum.filename,
header=spectrum.header,
)
Expand Down

0 comments on commit 9a9a4aa

Please sign in to comment.