當前位置: 首頁>>代碼示例>>Python>>正文


Python Flags.get_resolution_low方法代碼示例

本文整理匯總了Python中xia2.Handlers.Flags.Flags.get_resolution_low方法的典型用法代碼示例。如果您正苦於以下問題:Python Flags.get_resolution_low方法的具體用法?Python Flags.get_resolution_low怎麽用?Python Flags.get_resolution_low使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在xia2.Handlers.Flags.Flags的用法示例。


在下文中一共展示了Flags.get_resolution_low方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。

示例1:

# 需要導入模塊: from xia2.Handlers.Flags import Flags [as 別名]
# 或者: from xia2.Handlers.Flags.Flags import get_resolution_low [as 別名]
      Debug.write('Using XDS Integrater in new resolution mode')
    except NotAvailableError, e:
      if preselection == 'xdsr':
        raise RuntimeError, \
              'preselected integrater xdsr not available: ' + \
              'xds not installed?'
      pass

  if not integrater:
    raise RuntimeError, 'no integrater implementations found'

  # check to see if resolution limits were passed in through the
  # command line...

  dmin = Flags.get_resolution_high()
  dmax = Flags.get_resolution_low()

  if dmin:
    Debug.write('Adding user-assigned resolution limits:')

    if dmax:

      Debug.write('dmin: %.3f dmax: %.2f' % (dmin, dmax))
      integrater.set_integrater_resolution(dmin, dmax, user = True)

    else:

      Debug.write('dmin: %.3f' % dmin)
      integrater.set_integrater_high_resolution(dmin, user = True)

開發者ID:hainm,項目名稱:xia2,代碼行數:31,代碼來源:IntegraterFactory.py

示例2: setup_from_xinfo_file

# 需要導入模塊: from xia2.Handlers.Flags import Flags [as 別名]
# 或者: from xia2.Handlers.Flags.Flags import get_resolution_low [as 別名]

#.........這裏部分代碼省略.........
        # in here I also need to look and see if we have
        # been given any scaled reflection files...

        # check to see if we have a user supplied lattice...
        if crystals[crystal].has_key('user_spacegroup'):
          lattice = Syminfo.get_lattice(
            crystals[crystal]['user_spacegroup'])
        elif settings.space_group is not None:
          # XXX do we ever actually get here?
          lattice = Syminfo.get_lattice(
            settings.space_group.type().lookup_symbol())
        elif Flags.get_lattice():
          lattice = Flags.get_lattice()
        else:
          lattice = None

        # and also user supplied cell constants - from either
        # the xinfo file (the first port of call) or the
        # command-line.

        if crystals[crystal].has_key('user_cell'):
          cell = crystals[crystal]['user_cell']
        elif settings.unit_cell is not None:
          # XXX do we ever actually get here?
          cell = settings.unit_cell.parameters()
        else:
          cell = None

        dmin = wave_info.get('dmin', 0.0)
        dmax = wave_info.get('dmax', 0.0)

        if dmin == 0.0 and dmax == 0.0:
          dmin = Flags.get_resolution_high()
          dmax = Flags.get_resolution_low()

        # want to be able to locally override the resolution limits
        # for this sweep while leaving the rest for the data set
        # intact...

        for sweep_name in crystals[crystal]['sweeps'].keys():
          sweep_info = crystals[crystal]['sweeps'][sweep_name]

          sample_name = sweep_info.get('sample')
          if sample_name is None:
            if len(crystals[crystal]['samples']) == 1:
              sample_name = crystals[crystal]['samples'].keys()[0]
            else:
              raise RuntimeError('No sample given for sweep %s' %sweep_name)

          xsample = xc.get_xsample(sample_name)
          assert xsample is not None

          dmin_old = dmin
          dmax_old = dmax
          replace = False

          if 'RESOLUTION' in sweep_info:

            values = map(float, sweep_info['RESOLUTION'].split())
            if len(values) == 1:
              dmin = values[0]
            elif len(values) == 2:
              dmin = min(values)
              dmax = max(values)
            else:
              raise RuntimeError, \
開發者ID:hainm,項目名稱:xia2,代碼行數:70,代碼來源:XProject.py


注:本文中的xia2.Handlers.Flags.Flags.get_resolution_low方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。