当前位置: 首页>>代码示例>>Python>>正文


Python IO.readfits_all方法代码示例

本文整理汇总了Python中MOSFIRE.IO.readfits_all方法的典型用法代码示例。如果您正苦于以下问题:Python IO.readfits_all方法的具体用法?Python IO.readfits_all怎么用?Python IO.readfits_all使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在MOSFIRE.IO的用法示例。


在下文中一共展示了IO.readfits_all方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: test_trace_edge

# 需要导入模块: from MOSFIRE import IO [as 别名]
# 或者: from MOSFIRE.IO import readfits_all [as 别名]
    def test_trace_edge(self):
            (header, data1, targs, ssl, msl, asl) = \
                            IO.readfits_all("/users/npk/desktop/c9/m110326_3242.fits")
            data = data1

            ssl = ssl[ssl["Slit_Number"] != ' ']
            numslits = np.round(np.array(ssl["Slit_length"], 
                    dtype=np.float) / 7.02)

            for i in range(len(ssl)):
                    print ssl[i]["Target_Name"], numslits[i]
开发者ID:themiyan,项目名称:MosfireDRP_Themiyan,代码行数:13,代码来源:Flats.py

示例2: reload

# 需要导入模块: from MOSFIRE import IO [as 别名]
# 或者: from MOSFIRE.IO import readfits_all [as 别名]


npk April 14th 2011

'''
import MOSFIRE
import time
from MOSFIRE import Fit, IO
import numpy as np, pylab as pl

reload(Fit)
reload(IO)

if __name__ == "__main__":
        (header, data1, targs, ssl, msl, asl) = IO.readfits_all("/users/npk/desktop/c9/m110326_3242.fits")
        data = data1

        ssl = ssl[ssl["Slit_Number"] != ' ']
        numslits = np.round(np.array(ssl["Slit_length"], dtype=np.float) / 7.02)

        for i in range(len(ssl)):
                print ssl[i]["Target_Name"], numslits[i]





        Outputs:
        xposs []: Array of x positions along the slit edge [pix]
        yposs []: The fitted y positions of the "top" edge of the slit [pix]
开发者ID:Keck-DataReductionPipelines,项目名称:MosfireDRP_preWMKO,代码行数:32,代码来源:drp2_clean.py

示例3: reload

# 需要导入模块: from MOSFIRE import IO [as 别名]
# 或者: from MOSFIRE.IO import readfits_all [as 别名]
import pylab as pl
import scipy as sp

from MOSFIRE import IO, Fit, Bspline

reload(IO)
reload(Fit)
reload(Bspline)

np.set_printoptions(precision=3)


# use the following file and id'd spectrum to guess


(header, data, targs, ssl, msl, asl) = IO.readfits_all(
    "/users/npk/desktop/c9/m110319_1949.fits")
band = 'H'

pl.ion()

DRAW = True
def fit_spec(data, pos, alpha, sinbeta, gamma, delta, band):
    global DRAW
    ar_h_lines = np.array([1.465435, 1.474317, 1.505062, 1.517684, 1.530607, 
        1.533334, 1.540685, 1.590403, 1.599386, 1.618444, 1.644107,
        1.674465, 1.744967, 1.791961])

    Ar_K_lines = np.array([1.982291, 1.997118, 2.032256, 2.057443, 
        2.062186, 2.099184, 2.133871, 2.15409, 2.204558, 2.208321,
        2.313952, 2.385154])
开发者ID:Keck-DataReductionPipelines,项目名称:MosfireDRP_preWMKO,代码行数:33,代码来源:drp7.py


注:本文中的MOSFIRE.IO.readfits_all方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。