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


Python Sed.writeSED方法代码示例

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


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

示例1: mCalcs

# 需要导入模块: from lsst.sims.photUtils import Sed [as 别名]
# 或者: from lsst.sims.photUtils.Sed import writeSED [as 别名]
def mCalcs(airmass, bandName, ra, dec, expMJD,  FWHMeff, hwbpdict, photparams=None, sm=None):
    """
    sm : 
    """
    if photparams is None:
        photparams = PhotometricParameters()
    if sm is None:
        sm = SkyModel(observatory='LSST', mags=False, preciseAltAz=True)
    # Obtain full sky transmission at airmass
    # Note that this method is not interpolating but choosing the atmospheric transmission from
    # Modtran simulations of the closest airmass in a sequence of np.arange(1., 2.51, 0.1)
    fname = atmTransName(airmass)
    print(fname)
    atmTrans = np.loadtxt(fname)
    wave, trans = hwbpdict[bandName].multiplyThroughputs(atmTrans[:, 0], atmTrans[:, 1])
    bp = Bandpass(wavelen=wave, sb=trans)
    # Set the observing condition
    sm.setRaDecMjd(lon=[ra], lat=[dec], filterNames=[bandName],
                   mjd=expMJD, degrees=False, azAlt=False)
    # Get the sky sed
    wave, spec = sm.returnWaveSpec()
    sed = Sed(wavelen=wave, flambda=spec[0])
    sed.writeSED('skySED_laptop.csv')
    m5 = calcM5(sed, bp, hwbpdict[bandName], photparams, FWHMeff)
    # Get the sky magnitude only in the band concerned
    m = sm.returnMags(bandpasses=hwbpdict)[bandName][0]
    return m5, m
开发者ID:rbiswas4,项目名称:ObsCond,代码行数:29,代码来源:brightness.py

示例2:

# 需要导入模块: from lsst.sims.photUtils import Sed [as 别名]
# 或者: from lsst.sims.photUtils.Sed import writeSED [as 别名]
skyheader += versioninfo

perfilterheader = {}
for f in filters:
    good = np.where(filters[f].sb > 0)[0]
    wavelen_blue = filters[f].wavelen[good[0]-1]
    wavelen_red = filters[f].wavelen[good[-1]+1]
    perfilterheader[f] = '# Wavelen_cutoff_BLUE %.2f\n' % (wavelen_blue)
    perfilterheader[f] += '# Wavelen_cutoff_RED %.2f\n' % (wavelen_red)


detector.writeThroughput(os.path.join(outDir, 'detector.dat'), print_header=header)
lens1.writeThroughput(os.path.join(outDir, 'lens1.dat'), print_header=header)
lens2.writeThroughput(os.path.join(outDir, 'lens2.dat'), print_header=header)
lens3.writeThroughput(os.path.join(outDir, 'lens3.dat'), print_header=header)
m1.writeThroughput(os.path.join(outDir, 'm1.dat'), print_header=header)
m2.writeThroughput(os.path.join(outDir, 'm2.dat'), print_header=header)
m3.writeThroughput(os.path.join(outDir, 'm3.dat'), print_header=header)
atmos_std.writeThroughput(os.path.join(outDir, 'atmos_std.dat'), print_header=atmosheader)
atmos_10.writeThroughput(os.path.join(outDir, 'atmos_10.dat'), print_header=atmosheader)
darksky.writeSED(os.path.join(outDir, 'darksky.dat'), print_header=skyheader)

for f in filters:
    filters[f].writeThroughput(os.path.join(outDir, 'filter_%s.dat' %(f)), print_header=header+perfilterheader[f])
    hardware[f].writeThroughput(os.path.join(outDir, 'hardware_%s.dat' %(f)), print_header=header+perfilterheader[f])
    system[f].writeThroughput(os.path.join(outDir, 'total_%s.dat' %(f)), print_header=systemheader+perfilterheader[f])




开发者ID:krvikassingh,项目名称:syseng_throughputs,代码行数:28,代码来源:createThroughputsFiles.py


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