本文整理汇总了Python中chimera.core.chimeraobject.ChimeraObject类的典型用法代码示例。如果您正苦于以下问题:Python ChimeraObject类的具体用法?Python ChimeraObject怎么用?Python ChimeraObject使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了ChimeraObject类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: __init__
def __init__(self):
ChimeraObject.__init__(self)
# debug log
# self._debugLog = None
self._debuglog = logging.getLogger("_tpldebug_")
logfile = os.path.join(SYSTEM_CONFIG_DIRECTORY, "tpl.log")
if os.path.exists(logfile):
shutil.move(logfile, os.path.join(SYSTEM_CONFIG_DIRECTORY, "tpl.log_%s" % time.strftime("%Y%m%d-%H%M%S")))
_log_handler = logging.FileHandler(logfile)
_log_handler.setFormatter(
logging.Formatter(
fmt="%(asctime)s[%(levelname)s:%(threadName)s]-%(name)s-(%(filename)s:%(lineno)d):: %(message)s"
)
)
# _log_handler.setLevel(logging.DEBUG)
self._debuglog.setLevel(logging.DEBUG)
self._debuglog.addHandler(_log_handler)
self.log.setLevel(logging.INFO)
# Command counter
self.next_command_id = 1
self.last_cmd_deleted = 0
# Store received objects
self.commands_sent = {}
self._expect = [
"(?P<CMDID>\d+) DATA INLINE (?P<OBJECT>\S+)=(?P<VALUE>.+)",
"(?P<CMDID>\d+) DATA OK (?P<OBJECT>\S+)",
"(?P<CMDID>\d+) COMMAND (?P<STATUS>\S+)",
"(?P<CMDID>\d+) EVENT ERROR (?P<OBJECT>\S+):(?P<ENCM>(.*?)\s*)",
]
示例2: __init__
def __init__(self):
ChimeraObject.__init__(self)
self._srv = None
self._dispatcher = None
self._srvThread = None
self.host = None
示例3: __init__
def __init__(self):
ChimeraObject.__init__(self)
self.telescope = None
self.server = None
self.error = False
示例4: __init__
def __init__(self):
ChimeraObject.__init__(self)
self.abort = threading.Event()
self.abort.clear()
self.__isExposing = threading.Event()
示例5: __init__
def __init__(self):
ChimeraObject.__init__(self)
self.abort = threading.Event()
self.abort.clear()
self.__isExposing = threading.Event()
self.extra_header_info = dict()
示例6: __init__
def __init__(self):
'''
Constructor.
'''
ChimeraObject.__init__(self)
self.sunMaxAlt = -18.
self.isJD = False
self.tbin = 1./60./24. # Default time bin is 1 minute.
self.tolairmass = 0.01
示例7: __init__
def __init__(self):
ChimeraObject.__init__(self)
self.queue = Queue.Queue()
self._mode = None
# to reuse telescope proxy on control method
self._tel = None
self._telChanged = False
# to cache for az_resolution of the dome
self.controlAzRes = None
self._waitAfterSlew = threading.Event()
self._waitAfterSlew.clear()
示例8: __init__
def __init__(self):
ChimeraObject.__init__(self)
# Command counter
self.next_command_id = 1
self.last_cmd_deleted = 0
# Store received objects
self.commands_sent = {}
self._expect = [ '(?P<CMDID>\d+) DATA INLINE (?P<OBJECT>\S+)=(?P<VALUE>.+)',
'(?P<CMDID>\d+) DATA OK (?P<OBJECT>\S+)',
'(?P<CMDID>\d+) COMMAND (?P<STATUS>\S+)',
'(?P<CMDID>\d+) EVENT ERROR (?P<OBJECT>\S+):(?P<ENCM>(.*?)\s*)']
示例9: __init__
def __init__(self):
ChimeraObject.__init__(self)
self.imageRequest = None
self.filter = None
self.currentRun = None
self.best_fit = None
self._debugging = False
self._debug_images = []
self._debug_image = 0
self._log_handler = None
示例10: __init__
def __init__(self):
'''
Constructor.
'''
ChimeraObject.__init__(self)
#
# Reading in configuration parameters
#
config = ConfigParser.RawConfigParser()
if os.path.exists(os.path.join(os.path.expanduser('~/.chimera'),'tao.cfg')):
config.read(os.path.join(os.path.expanduser('~/.chimera'),'tao.cfg'))
else:
log.warning('No user defined configuration found at %s. Using default values.'%(os.path.join(os.path.expanduser('~/.chimera'),'tao.cfg')))
config.read(os.path.join(os.path.join(cfgpath,'../../tao.cfg')))
#
# Setting configuration parameters
#
self.stdFlag = config.get('TargetsInfo', 'Standard')
self.sciFlag = config.get('TargetsInfo', 'Science')
self.stdUser = config.get('TargetsInfo', 'stdUser')
self.sciUser = config.get('TargetsInfo', 'sciUser')
self.stdFile = config.get('TargetsInfo', 'stdFile')
self.sciFile = config.get('TargetsInfo', 'sciFile')
self.PATH = os.path.expanduser(config.get('Local', 'PATH'))
self.sitelat = float(config.get('Site','sitelat'))
self.sitelong = float(config.get('Site','sitelong'))
self.sunMaxAlt = float(config.get('Site','sunMaxAlt'))
self.filters = [i.replace(' ', '') for i in config.get('Instrument', 'Filters').split(',')]
self.nfilters = len(self.filters)
self.stdExpTime = [float(i) for i in config.get('TargetsInfo', 'stdExpTime').split(',')]
self.sciExpTime = [float(i) for i in config.get('TargetsInfo', 'sciExpTime').split(',')]
self.stdMaxAirmass = float(config.get('TargetsInfo','stdMaxAirmass'))
#
# These are time bins, which breaks the night in timely intervals. Bins is the time at the begining of the bin
# and Mask is percent full.
self.obsTimeBins = []
self.obsTimeMask = []
self.isJD = False
示例11: __init__
def __init__(self):
ChimeraObject.__init__(self)
self.imageRequest = None
self.filter = None
self.currentRun = None
self._debugging = False
self._debug_images = []
self._debug_image = 0
self._log_handler = None
self._state = GuiderStatus.OFF
self.abort = threading.Event()
self.abort.clear()
示例12: __init__
def __init__(self):
ChimeraObject.__init__(self)
self._operationStatus = {
"site": InstrumentOperationFlag.UNSET,
"telescope": InstrumentOperationFlag.UNSET,
"camera": InstrumentOperationFlag.UNSET,
"dome": InstrumentOperationFlag.UNSET,
"scheduler": InstrumentOperationFlag.UNSET,
"domefan": InstrumentOperationFlag.UNSET,
"weatherstation": InstrumentOperationFlag.UNSET,
}
self._telegramBroadcast = False
self._telegramSocket = None
self._testIP = '8.8.8.8' # Use google's dns IP as beacon to network connectivity
self._log_handler = None
self.checklist = None
self.machine = None
self.bot = None
示例13: __init__
def __init__(self):
ChimeraObject.__init__(self)
self._supports = {}
示例14: __init__
def __init__ (self):
ChimeraObject.__init__ (self)
self.ntrials = 0 # number times we try to center on a field
self.nfields = 0 # number of fields we try to center on
self.checkedpointing = False # True = Standard field is verified
self.currentField = 0 # counts fields tried to verify
示例15: __init__
def __init__(self):
ChimeraObject.__init__(self)
self.imagesByID = OrderedDict()
self.imagesByPath = OrderedDict()