本文整理匯總了Python中xia2.Handlers.Flags.Flags.get_rmerge方法的典型用法代碼示例。如果您正苦於以下問題:Python Flags.get_rmerge方法的具體用法?Python Flags.get_rmerge怎麽用?Python Flags.get_rmerge使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類xia2.Handlers.Flags.Flags
的用法示例。
在下文中一共展示了Flags.get_rmerge方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。
示例1: resolution_rmerge
# 需要導入模塊: from xia2.Handlers.Flags import Flags [as 別名]
# 或者: from xia2.Handlers.Flags.Flags import get_rmerge [as 別名]
def resolution_rmerge(self, limit = None, log = None):
'''Compute a resolution limit where either rmerge = 1.0 (limit if
set) or the full extent of the data. N.B. this fit is only meaningful
for positive values.'''
if limit is None:
limit = Flags.get_rmerge()
bins, ranges = self.get_resolution_bins()
if limit == 0.0:
return ranges[-1][0]
rmerge_s = get_positive_values(
[self.calculate_rmerge(bin) for bin in bins])
s_s = [1.0 / (r[0] * r[0]) for r in ranges][:len(rmerge_s)]
if limit == 0.0:
return 1.0 / math.sqrt(max(s_s))
if limit > max(rmerge_s):
return 1.0 / math.sqrt(max(s_s))
rmerge_f = log_inv_fit(s_s, rmerge_s, 6)
if log:
fout = open(log, 'w')
for j, s in enumerate(s_s):
d = 1.0 / math.sqrt(s)
o = rmerge_s[j]
m = rmerge_f[j]
fout.write('%f %f %f %f\n' % (s, d, o, m))
fout.close()
try:
r_rmerge = 1.0 / math.sqrt(interpolate_value(s_s, rmerge_f, limit))
except:
r_rmerge = 1.0 / math.sqrt(max(s_s))
return r_rmerge