本文整理汇总了Python中starutil.NDG.load方法的典型用法代码示例。如果您正苦于以下问题:Python NDG.load方法的具体用法?Python NDG.load怎么用?Python NDG.load使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类starutil.NDG
的用法示例。
在下文中一共展示了NDG.load方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: UsageError
# 需要导入模块: from starutil import NDG [as 别名]
# 或者: from starutil.NDG import load [as 别名]
phase16 = 0.0
sigma = 0.0
# See if old temp files are to be re-used.
restart = parsys["RESTART"].value
if restart == None:
retain = parsys["RETAIN"].value
indata.save( "IN" )
else:
retain = True
NDG.tempdir = restart
if not os.path.isdir(restart):
raise UsageError("\n\nThe directory specified by parameter RESTART ({0}) "
"does not exist".format(restart) )
fred = NDG.load( "IN", True )
if indata != fred:
raise UsageError("\n\nThe directory specified by parameter RESTART ({0}) "
"refers to different time-series data".format(restart) )
msg_out( "Re-using data in {0}".format(restart) )
# Initialise the starlink random number seed to a known value so that
# results are repeatable.
os.environ["STAR_SEED"] = "65"
# Flat field the supplied template data
ff = NDG.load( "FF" )
if not ff:
ffdir = NDG.subdir()
msg_out( "Flatfielding template data...")
invoke("$SMURF_DIR/flatfield in={0} out=\"{1}/*\"".format(indata,ffdir) )