當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。