src/muler/hpf.py
def sky_subtract(self, method="scalar"):
        """Subtract sky spectrum from science spectrum, with refinements for sky throughput

        Note: This operation does not wavelength shift or scale the sky spectrum

        Parameters
        ----------
        method : (str)
            The method for sky subtraction: "naive", "scalar", or "vector", as described in
            Gully-Santiago et al. in prep.  Default is scalar.

        Returns
        -------
        sky_subtractedSpec : (HPFSpectrum)
            Sky subtracted Spectrum
        """

        if method == "naive":
            log.warning(
                "Naive sky subtraction method is known to oversubtract the sky, see GitHub Issues."
            )
            beta = 1.0 * u.dimensionless_unscaled
        elif method == "scalar":
            beta = 0.93 * u.dimensionless_unscaled
        elif method == "vector":
            beta_native_spectrum = self.get_static_sky_ratio_template()
            resampler = LinearInterpolatedResampler(extrapolation_treatment="zero_fill")
            beta = resampler(beta_native_spectrum, self.spectral_axis)
        else:
            log.error("Method must be one of 'naive', 'scalar' or 'vector'. ")
            raise NotImplementedError

        # These steps should propagate uncertainty?
        sky_estimator = self.sky.multiply(beta, handle_meta="first_found")
        return self.subtract(sky_estimator, handle_meta="first_found")
Subtract sky spectrum from science spectrum, with refinements for sky throughput

        Note: This operation does not wavelength shift or scale the sky spectrum

        Parameters
        ----------
        method : (str)
            The method for sky subtraction: "naive", "scalar", or "vector", as described in
            Gully-Santiago et al. in prep.  Default is scalar.

        Returns
        -------
        sky_subtractedSpec : (HPFSpectrum)
            Sky subtracted Spectrum
        
Subtract sky spectrum from science spectrum, with refinements for sky throughput
Note: This operation does not wavelength shift or scale the sky spectrum

Parameters



Returns


Subtract sky spectrum from science spectrum with refinements for sky throughput Note : This operation does not wavelength shift or scale the sky spectrum Parameters Returns
def sky_subtract(self, method="scalar"):
        if method == "naive":
            log.warning(
                "Naive sky subtraction method is known to oversubtract the sky, see GitHub Issues."
            )
            beta = 1.0 * u.dimensionless_unscaled
        elif method == "scalar":
            beta = 0.93 * u.dimensionless_unscaled
        elif method == "vector":
            beta_native_spectrum = self.get_static_sky_ratio_template()
            resampler = LinearInterpolatedResampler(extrapolation_treatment="zero_fill")
            beta = resampler(beta_native_spectrum, self.spectral_axis)
        else:
            log.error("Method must be one of 'naive', 'scalar' or 'vector'. ")
            raise NotImplementedError
        sky_estimator = self.sky.multiply(beta, handle_meta="first_found")
        return self.subtract(sky_estimator, handle_meta="first_found")
def sky_subtract ( self , method = "scalar" ) : if method == "naive" : log . warning ( "Naive sky subtraction method is known to oversubtract the sky, see GitHub Issues." ) beta = 1.0 * u . dimensionless_unscaled elif method == "scalar" : beta = 0.93 * u . dimensionless_unscaled elif method == "vector" : beta_native_spectrum = self . get_static_sky_ratio_template ( ) resampler = LinearInterpolatedResampler ( extrapolation_treatment = "zero_fill" ) beta = resampler ( beta_native_spectrum , self . spectral_axis ) else : log . error ( "Method must be one of 'naive', 'scalar' or 'vector'. " ) raise NotImplementedError sky_estimator = self . sky . multiply ( beta , handle_meta = "first_found" ) return self . subtract ( sky_estimator , handle_meta = "first_found" )
Subtract sky spectrum from science spectrum, with refinements for sky throughput
Note: This operation does not wavelength shift or scale the sky spectrum
Subtract sky spectrum from science spectrum with refinements for sky throughput Note : This operation does not wavelength shift or scale the sky spectrum
"""Subtract sky spectrum from science spectrum, with refinements for sky throughput

        Note: This operation does not wavelength shift or scale the sky spectrum

        Parameters
        ----------
        method : (str)
            The method for sky subtraction: "naive", "scalar", or "vector", as described in
            Gully-Santiago et al. in prep.  Default is scalar.

        Returns
        -------
        sky_subtractedSpec : (HPFSpectrum)
            Sky subtracted Spectrum
        """ # These steps should propagate uncertainty?
self
method