1.5e-10\t10
2e-10\t40
2.5e-10\t5
+ >>> h.bin_edges = h.bin_edges[:2]
+ >>> h.counts = h.counts[:1]
+ >>> h.to_stream(sys.stdout)
+ ... # doctest: +NORMALIZE_WHITESPACE, +REPORT_UDIFF
+ #Force (N)\tUnfolding events
+ 1.5e-10\t10
+ 2e-10\t0
"""
if self.headings != None:
stream.write('#%s\n' % '\t'.join(self.headings))
for bin,count in zip(self.bin_edges, self.counts):
stream.write('%g\t%g\n' % (bin, count))
+ if len(self.counts) == 1:
+ # print an extra line so that readers can determine bin width
+ stream.write('%g\t0\n' % (self.bin_edges[-1]))
def analyze(self):
"""Analyze `.counts` and `.bin_edges` if the raw data is missing.