aperture_phot.py 文件源码

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

项目:FFIorBUST 作者: jradavenport 项目源码 文件源码
def __init__(self, filepath, verbose=False):
    '''
    Creates an exposure class which has many extensions.

    Parameters
    ----------
    filepath: str
      Path to the fits file of a single exposure
    verbose: bool
      Print some info to visually inspect

    '''
    self.source_table = Table(names=['aperture_sum','xcenter','ycenter','ra','dec'])

    # Open the file and print the info
    self.hdulist = pf.open(filepath)
    if verbose:
      self.hdulist.info()

    # Get the datetime of the exposure from the filename
    self.date_str = os.path.basename(filepath).replace('_ffi-cal.fits','').replace('kplr','')
    self.datetime = time.strptime(self.date_str, '%Y%j%H%M%S')
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号