tgasSelect.py 文件源码

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

项目:gaia_tools 作者: jobovy 项目源码 文件源码
def determine_statistical(self,data,j,k):
        """
        NAME:
           determine_statistical
        PURPOSE:
           Determine the subsample that is part of the statistical sample
           described by this selection function object
        INPUT:
           data - a TGAS subsample (e.g., F stars)
           j - J magnitudes for data
           k - K_s magnitudes for data
        OUTPUT:
           index array into data that has True for members of the 
           statistical sample
        HISTORY:
           2017-01-18 - Written - Bovy (UofT/CCA)
        """
        # Sky cut
        data_sid= (data['source_id']\
                       /2**(35.+2*(12.-numpy.log2(_BASE_NSIDE)))).astype('int')
        skyindx= True-self._exclude_mask_skyonly[data_sid]
        # Color, magnitude cuts
        cmagindx= (j >= self._jmin)*(j <= self._jmax)\
            *(j-k >= self._jkmin)*(j-k <= self._jkmax)
        return skyindx*cmagindx
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号