Документ взят из кэша поисковой машины. Адрес оригинального документа : http://www.apo.nmsu.edu/Telescopes/TCC/html/tune_8py_source.html
Дата изменения: Tue Sep 15 02:25:37 2015
Дата индексирования: Sun Apr 10 00:19:13 2016
Кодировка:

Поисковые слова: п п п п п п п п п
lsst.tcc: python/tcc/base/tune.py Source File
lsst.tcc  1.2.2-3-g89ecb63
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
tune.py
Go to the documentation of this file.
1 from __future__ import division, absolute_import
2 
3 from .fieldWrapper import WrapperList, DocWrapper, ScalarWrapper, ArrayWrapper
4 
5 __all__ = ["Tune"]
6 
7 class Tune(object):
8  """!Tuning Constants
9  """
10  def __init__(self):
11  self.doBrdTelPos = True
12  self.doCollimate = True
13  self.doStatus = True
14  self.maxUsers = 25
17  self.statusInterval = [10, 2, 10]
18  self.slewAdvTime = 0.5
19  self.slewMinDuration = 0.5
20  self.trackInterval = 5.0
21  self.trackAdvTime = 1.0
22  self.slewConvTime = 0.15
23  self.slewMaxIter = 30
24  self.slewFudge = 1.0
25 
26  @property
27  def _WrapperList(self):
28  """!Create WrapperList cache if it does not already exist
29  """
30  if hasattr(self, "__WLCache"):
31  return self.__WLCache
32 
33  wrapperList = WrapperList(name="Tune", obj=self,
34  wrappers = (
35  DocWrapper("\nMiscellaneous Parameters\n"),
36 
37  ScalarWrapper("doBrdTelPos", dtype=bool, help="Broadcast telescope position as UDP packets?"),
38  ScalarWrapper("doCollimate", dtype=bool, help="Update collimation?"),
39  ScalarWrapper("doStatus", dtype=bool, help="Print status at regular intervals?"),
40 
41  ScalarWrapper("maxUsers", dtype=int, help="maximum number of simultaneous users"),
42 
43  ScalarWrapper("collimateInterval", dtype=float,
44  help="interval between collimation corrections (sec; 0 for none)",
45  ),
46  ScalarWrapper("collimateSlewEnd", dtype=float,
47  help="""Time before slew end for an extra collimation update (sec);
48  <0 for no extra update (0 simply starts it as the slew ends)""",
49  ),
50  ArrayWrapper("statusInterval", numElts=3, dtype=float,
51  help="""Interval between status updates (sec; 0 for none):
52  while tracking (ignored), during a slew, and other""",
53  ),
54 
55  DocWrapper("\nTracking and Slewing Parameters\n"),
56 
57  ScalarWrapper("slewAdvTime", dtype=float,
58  help="How far in advance to send the first PVT of a slew (sec)",
59  ),
60  ScalarWrapper("slewMinDuration", dtype=float,
61  help="""Minimum slew duration after the first PVT is sent (sec);
62  provides time to send the remaining slew PVTs after the first""",
63  ),
64 
65  ScalarWrapper("trackInterval", dtype=float,
66  help="The interval between tracking updates (sec)",
67  ),
68  ScalarWrapper("trackAdvTime", dtype=float,
69  help="How far in advance to send a tracking update (sec)",
70  ),
71 
72  ScalarWrapper("slewConvTime", dtype=float,
73  help="""Slew convergence criterion (sec);
74  successive slews must have durations that match to within this time interval""",
75  ),
76  ScalarWrapper("slewMaxIter", dtype=int,
77  help="Max iterations of the slew computation",
78  ),
79  ScalarWrapper("slewFudge", dtype=float,
80  help="Time for axis controllers to settle after a slew (sec)",
81  ),
82  ),
83  )
84 
85  self.__WLCache = wrapperList
86  return self.__WLCache
87 
88  def load(self, f):
89  """!Load data from a file-like object
90  """
91  self._WrapperList.load(f)
92 
93  def loadPath(self, filePath):
94  """!Load data from a file specified by path
95  """
96  self._WrapperList.loadPath(filePath)
97 
98  def dump(self, f):
99  """!Dump data to a file-like object
100  """
101  self._WrapperList.dump(f)
102 
103  def __repr__(self):
104  return self._WrapperList.dumpStr()
def load
Load data from a file-like object.
Definition: tune.py:88
def dump
Dump data to a file-like object.
Definition: tune.py:98
def loadPath
Load data from a file specified by path.
Definition: tune.py:93
Tuning Constants.
Definition: tune.py:7