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*)", ]
def __init__(self): ChimeraObject.__init__(self) self._srv = None self._dispatcher = None self._srvThread = None self.host = None
def __init__(self): ChimeraObject.__init__(self) self.telescope = None self.server = None self.error = False
def __init__(self): ChimeraObject.__init__(self) self.abort = threading.Event() self.abort.clear() self.__isExposing = threading.Event()
def __init__(self): ChimeraObject.__init__(self) self.abort = threading.Event() self.abort.clear() self.__isExposing = threading.Event() self.extra_header_info = dict()
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
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
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*)']
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()
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
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()
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
def __init__(self): ChimeraObject.__init__(self) self._sun = ephem.Sun() self._moon = ephem.Moon()
def __init__(self): ChimeraObject.__init__(self) self._supports = {}
def __init__(self): ChimeraObject.__init__ (self) self.answer = 42
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
def __init__(self): ChimeraObject.__init__(self) self.imagesByID = OrderedDict() self.imagesByPath = OrderedDict()
def __init__(self): ChimeraObject.__init__(self) self.imagesByID = {} self.imagesByPath = {}
def __init__(self): ChimeraObject.__init__(self) self._in_fifo = None self._out_fifo = None
def __init__(self): ChimeraObject.__init__(self) self.executor = None self.scheduler = None self.machine = None
def __init__(self): ChimeraObject.__init__(self) self.imageRequest = None self.filter = None self.currentRun = None
def __init__ (self): ChimeraObject.__init__(self) self.counter = 0
def __init__(self): ChimeraObject.__init__(self) self.counter = 0
def __init__(self): ChimeraObject.__init__(self) self.answer = 42
def __init__(self): ChimeraObject.__init__(self) self.t0 = time.time()
def __init__ (self): ChimeraObject.__init__(self) raise Exception("oops in __init__")
def __init__ (self): ChimeraObject.__init__(self) self.counter = 0 self.results = []
def __init__(self): ChimeraObject.__init__(self) self._park_position = None
def __init__(self): ChimeraObject.__init__(self)
def __init__ (self): ChimeraObject.__init__(self)