本文整理汇总了Python中frame.Frame.debug方法的典型用法代码示例。如果您正苦于以下问题:Python Frame.debug方法的具体用法?Python Frame.debug怎么用?Python Frame.debug使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类frame.Frame
的用法示例。
在下文中一共展示了Frame.debug方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: run_analysis
# 需要导入模块: from frame import Frame [as 别名]
# 或者: from frame.Frame import debug [as 别名]
def run_analysis():
# turn on interactive use of pyplot
plt.ion()
# read in and process dark file if it's supplied
dark_frames = None
if args.dark != None:
print('Reading dark frames from ', args.dark)
filename_dark_flat = utils.get_flat_filename( args.dark, args.tag )
#process the dark file
dark_frames = Dark(args.dark,filename_dark_flat,100)
else:
print('No dark file supplied.')
# read frames one by one, either from file or shared memory
if args.light != None:
print('Read frames from data file ', args.light)
# create the frame object that holds the frame
frame = Frame()
frame.debug = True
# read the binary file
idx = 0
nframes = 0
with open(args.light,'rb') as f:
while True:
try:
print('Read frame from file idx ', idx)
# read a frame from the file
idx = frame.read_frame_from_file(f, idx)
print('frame at index ', frame.index)
print('frame nframes ', frame.nframes)
print('new idx ', idx)
print('raw frame ', frame.raw_frame)
print('flat frame ', frame.flat_frame)
nframes += frame.nframes
print('Read ', nframes, ' so far')
except IndexError:
print(' caught IndexError: found ', nframes, nframes)
break
else:
print('Read frames from shared mem is not implemented yet')