Skip to content

Commit

Permalink
get_median_outlier_mask biases p1d. turn it off
Browse files Browse the repository at this point in the history
  • Loading branch information
p-slash committed Jul 9, 2024
1 parent d757815 commit ead537a
Showing 1 changed file with 5 additions and 11 deletions.
16 changes: 5 additions & 11 deletions py/qsonic/spectrum.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,7 @@

import numpy as np

from qsonic.mathtools import (
_zero_function, _one_function, get_smooth_ivar, get_median_outlier_mask)
from qsonic.mathtools import _zero_function, _one_function, get_smooth_ivar


def add_wave_region_parser(parser=None):
Expand Down Expand Up @@ -303,11 +302,11 @@ def slice(self, arm, i1, i2):
self.cont_params['cont'][arm][i1:i2]

def set_forest_region(self, w1, w2, lya1, lya2):
""" Sets slices for the forest region. Masks outliers in each arm
separately based on moving median statistics
(see :func:`qsonic.mathtools.get_median_outlier_mask`). Also calculates
""" Sets slices for the forest region. Also calculates
the mean SNR in the forest and an initial guess for the continuum
amplitude.
amplitude. This is currently turned off, but it can mask outliers in
each arm separately based on moving median statistics
(see :func:`qsonic.mathtools.get_median_outlier_mask`).
Arguments
---------
Expand Down Expand Up @@ -337,11 +336,6 @@ def set_forest_region(self, w1, w2, lya1, lya2):
if self.reso:
self._forestreso[arm] = self.reso[arm][:, ii1:ii2].copy()

w = get_median_outlier_mask(
self._forestflux[arm], self._forestivar[arm])
self._forestflux[arm][w] = 0
self._forestivar[arm][w] = 0

self._forestivar_sm = self._forestivar
self._forestweight = self._forestivar
self._set_forest_related_parameters()
Expand Down

0 comments on commit ead537a

Please sign in to comment.