本文整理汇总了Python中starutil.NDG.save方法的典型用法代码示例。如果您正苦于以下问题:Python NDG.save方法的具体用法?Python NDG.save怎么用?Python NDG.save使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类starutil.NDG
的用法示例。
在下文中一共展示了NDG.save方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: UsageError
# 需要导入模块: from starutil import NDG [as 别名]
# 或者: from starutil.NDG import save [as 别名]
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) )
ff = NDG("{0}/\*".format(ffdir))
ff.save( "FF" )
else:
msg_out( "Re-using old flatfielded template data...")
# Output files. Base the modification on "ff" rather than "indata",
# since "indata" may include non-science files (flatfields, darks etc)
# for which no corresponding output file should be created.
gexp = parsys["OUT"].value
outdata = NDG( ff, gexp )
# If required, create new artificial I, Q and U maps.
if newart:
msg_out( "Creating new artificial I, Q and U maps...")
# Get the parameters defining the artificial data
ipeak = parsys["IPEAK"].value