def run(self): self.set_etime_pre_binning() self.lock.set_acquire() try: self.info = SbigDriver.photoshoot(self.etime * 100, self.pre, self.b) self.init_image() except Exception as e: print(e) finally: self.lock.set_release()
def run(self): self.set_etime_pre_binning() self.lock.set_acquire() try: self.info = SbigDriver.photoshoot(self.etime, self.pre, self.b, self.dark_photo, self.get_level1,\ self.get_level2) self.init_image() except Exception as e: print(e) finally: self.lock.set_release()
def create_image_open(self): self.roda_filtros.open_shutter() self.set_config_take_image() self.lock.set_acquire() my_list = get_wish_filters_settings() # list of schedule try: if self.count_aux < len(my_list): if self.one_photo: index_of_dic = self.selected_filter else: index_of_dic = str(my_list[self.count_aux]) self.valores_principais_wish_filter(index_of_dic) self.count_aux += 1 else: self.count_aux = 0 if self.one_photo: index_of_dic = self.selected_filter else: index_of_dic = str(my_list[self.count_aux]) self.valores_principais_wish_filter(index_of_dic) self.count_aux += 1 except Exception as e: print("Try filter ini -> {}".format(e)) project_infos = get_project_settings() name_observatory = project_infos[2][1] self.path, self.tempo = set_path() self.new_image_name = str( self.prefix) + "_" + str(name_observatory) + "_" + str(self.tempo) new_image_name = self.path + str(self.new_image_name) try: self.info_matrix = SbigDriver.photoshoot(self.exposure_time, self.binning, 0) except Exception as e: print("self.info_matrix = SbigDriver.photoshoot ERROR -> " + str(e)) self.for_headers_dic['Open or close shutter'] = "OPEN" self.save_image_format(new_image_name) self.for_headers_dic = {} self.one_photo = False self.init_image() self.lock.set_release()
def take_dark(self): ''' manda instrução para o SbigDriver para tirar uma foto dark ''' try: self.set_etime_pre_binning() self.lock.set_acquire() self.info = SbigDriver.photoshoot(self.etime, self.pre, self.b, 1, self.get_level1, self.get_level2) self.init_image() except Exception as e: print(e) finally: time.sleep(1) self.lock.set_release()
def run(self): self.set_etime_pre_binning() self.lock.set_acquire() try: self.info = SbigDriver.photoshoot( self.etime, self.pre, self.b, self.dark_photo, self.get_level1, self.get_level2, self.get_axis_xi, self.get_axis_xf, self.get_axis_yi, self.get_axis_yf, self.get_ignore_crop, self.get_image_tif, self.get_image_fit) self.init_image() except Exception as e: print(e) finally: self.lock.set_release()
def create_image_close(self): self.roda_filtros.close_shutter() my_list = get_wish_filters_settings() # list of schedule my_list = set(my_list) my_list = sorted(my_list) count_aux = 0 while count_aux < len(my_list): self.set_config_take_image() self.lock.set_acquire() if self.one_photo: index_of_dic = self.selected_filter count_aux = 100 else: index_of_dic = str(my_list[count_aux]) self.valores_principais_wish_filter(index_of_dic) project_infos = get_project_settings() name_observatory = project_infos[2][1] self.path, self.tempo = set_path() self.new_image_name = "DARK-" + str( self.prefix) + "_" + str(name_observatory) + "_" + str( self.tempo) new_image_name = self.path + str(self.new_image_name) try: self.info_matrix = SbigDriver.photoshoot( self.exposure_time, self.binning, 1) except Exception as e: print("self.info_matrix = SbigDriver.photoshoot ERROR -> " + str(e)) self.for_headers_dic['Open or close shutter'] = "CLOSED" self.save_image_format(new_image_name) self.for_headers_dic = {} count_aux += 1 self.init_image() self.lock.set_release() self.one_photo = False
def take_dark(self): ''' Manda instrução para o SbigDriver para tirar uma foto dark(shooter fechado)\ com os valores na info[] ''' try: self.set_etime_pre_binning() self.lock.set_acquire() self.info = SbigDriver.photoshoot( self.etime, self.pre, self.b, 1, self.get_level1, self.get_level2, self.get_axis_xi, self.get_axis_xf, self.get_axis_yi, self.get_axis_yf, self.get_ignore_crop, self.get_image_tif, self.get_image_fit) self.init_image() except Exception as e: print(e) finally: time.sleep(1) self.lock.set_release()