本文整理汇总了Python中starutil.NDG.filter方法的典型用法代码示例。如果您正苦于以下问题:Python NDG.filter方法的具体用法?Python NDG.filter怎么用?Python NDG.filter使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类starutil.NDG
的用法示例。
在下文中一共展示了NDG.filter方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: NDG
# 需要导入模块: from starutil import NDG [as 别名]
# 或者: from starutil.NDG import filter [as 别名]
qff.comment = "qff"
uff = NDG(ucont)
uff.comment = "uff"
invoke( "$KAPPA_DIR/ffclean in={0} out={1} box=3 clip=\[2,2,2\]"
.format(qcont,qff) )
invoke( "$KAPPA_DIR/ffclean in={0} out={1} box=3 clip=\[2,2,2\]"
.format(ucont,uff) )
# The next stuff we do independently for each subarray.
qmos = {}
umos = {}
for a in ('S4A','S4B','S4C','S4D','S8A','S8B','S8C','S8D'):
# Get an NDG object that contains the cleaned Q maps for the current
# subarray.
qarray = qcont.filter(a)
# If any data was found for the current subarray...
if qarray != None:
# There seems to be a tendency for each bolometer to have its own fixed
# bias in Q and U. We now try to remove these biases by removing the Q and
# U values that are common to each image (as opposed to astronomical Q/U
# variations, which are fixed on the sky and so will vary from image to
# image as the focal plane is moved on the sky). First we find the mean Q
# value in each bolometer by averaging the Q images, aligned in PIXEL (i.e.
# bolomter) coords. The mean Q value per bolometer is put in qcom.sdf.
msg_out( "Removing background Q level from {0} bolometers...".format(a))
qcom = NDG(1)
qcom.comment = "qcom"
invoke("$KAPPA_DIR/wcsframe {0} PIXEL".format(qarray))
示例2: UsageError
# 需要导入模块: from starutil import NDG [as 别名]
# 或者: from starutil.NDG import filter [as 别名]
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 = loadndg( "FF" )
if not ff:
ff = NDG(indata)
msg_out( "Flatfielding template data...")
invoke("$SMURF_DIR/flatfield in={0} out={1}".format(indata,ff) )
ff = ff.filter()
savendg( "FF", ff )
else:
msg_out( "Re-using old flatfielded template data...")
# 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
ifwhm = parsys["IFWHM"].value
pol = parsys["POL"].value
# Determine the spatial extent of the data on the sky.
invoke("$SMURF_DIR/makemap in={0} out=! config=def".format(ff))
示例3: invoke
# 需要导入模块: from starutil import NDG [as 别名]
# 或者: from starutil.NDG import filter [as 别名]
invoke("$POLPACK_DIR/polext in={0} angrot=90".format(uart) )
invoke("$KAPPA_DIR/setunits ndf={0} units=pW".format(iart) )
invoke("$KAPPA_DIR/setunits ndf={0} units=pW".format(qart) )
invoke("$KAPPA_DIR/setunits ndf={0} units=pW".format(uart) )
# If required, create an artificial common-mode (i.e. unpolarised emission
# from the sky) for each sub-scan/grid-point.
if incom:
# First flat-field all the INCOM files.
cff = NDG.load( "CFF" )
if not cff:
cff = NDG(incom)
msg_out( "Flatfielding common-mode data...")
invoke("$SMURF_DIR/flatfield in={0} out={1}".format(incom,cff) )
cff = cff.filter()
cff.save( "CFF" )
else:
msg_out( "Re-using old flatfielded common-mode data...")
# Process each sub-scan separately as they may have different lengths.
cfactor = parsys["CFACTOR"].value
com = NDG.load( "COM" )
if not com:
msg_out( "Creating new artificial common-mode signals...")
comlen = 0
totcom = NDG(1)
lbnd = []
ubnd = []