fit_sbp.py 文件源码

python
阅读 24 收藏 0 点赞 0 评论 0

项目:atoolbox 作者: liweitianux 项目源码 文件源码
def ignore_data(self, xmin=None, xmax=None, unit=None):
        """
        Ignore the data points within range [xmin, xmax].
        If xmin is None, then xmin=min(xdata);
        if xmax is None, then xmax=max(xdata).

        if unit is None, then assume the same unit as `self.xunit'.
        """
        if unit is None:
            unit = self.xunit
        if xmin is not None:
            xmin = self.convert_unit(xmin, unit=unit)
        else:
            xmin = np.min(self.xdata)
        if xmax is not None:
            xmax = self.convert_unit(xmax, unit=unit)
        else:
            xmax = np.max(self.xdata)
        ignore_idx = np.logical_and(self.xdata >= xmin, self.xdata <= xmax)
        self.mask[ignore_idx] = False
        # reset `f_residual'
        self.f_residual = None
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号