Example #1
0
 def __init__(self, timeSleep):
     self.continuous = None
     super(DarkShooterThread, self).__init__()
     self.console = ConsoleThreadOutput()
     self.s = timeSleep
     self.ss = SThread()
     self.settings = SettingsCamera()
Example #2
0
    def __init__(self):
        self.lock = Locker()
        self.console = ConsoleThreadOutput()
        self.settings = SettingsCamera()
        self.settings.setup_settings()
        self.fan = Fan()

        # Campos da janela principal para as informações da câmera
        self.firmware_field = None
        self.model_field = None

        self.main = Status()
        self.now_plus_10 = datetime.now()
        self.settedhour = datetime.now()
        self.continuousShooterThread = ContinuousShooterThread(
            int(self.settings.get_camera_settings()[4]))
        self.ephemerisShooterThread = EphemerisShooter()

        self.sthread = SThread()

        self.commands = CameraQThread(self)
        self.shooting = False
        # Initiating the Slots
        self.init_slots()

        self.info_ini = []

        info_ini = self.get_camera_settings_ini()
        self.aux_temperature = int(info_ini[0])

        self.temp = 0
        self.temp_contador = 0
        self.temp_contador_manual = 0
Example #3
0
    def __init__(self):
        super(EphemerisShooter, self).__init__()
        self.camconfig = SettingsCamera()
        self.camconfig.setup_settings()
        infocam = self.camconfig.get_camera_settings()

        self.ObserverFactory = EphemObserverFactory()
        self.continuousShooterThread = ContinuousShooterThread(int(infocam[4]))
        self.console = ConsoleThreadOutput()
        self.config = ConfigProject()

        info = self.config.get_geographic_settings()
        infosun = self.config.get_moonsun_settings()

        self.latitude = info[0]  # '-45.51'
        self.longitude = info[1]  # '-23.12'
        self.elevation = info[2]  # 350

        self.max_solar_elevation = infosun[0]  # -12
        self.ignore_lunar_position = infosun[1]
        self.max_lunar_elevation = infosun[2]  # 8
        self.max_lunar_phase = infosun[3]  # 1
        self.wait_temperature = False

        print(int(infocam[4]))
        try:
            self.s = int(infocam[4])
            self.continuousShooterThread.set_sleep_time(self.s)
        except Exception as e:
            self.s = 5

        self.shootOn = False
        self.controller = True
        self.count = 1
Example #4
0
def get_camera_settings():
    """
    Pega os valores no ini camera
    info_cam[0] = temperature_camera
    info_cam[1] = tempo de espera até atingir temperatura desejada
    info_cam[2] = dark(Open or close shutter)
    """
    settings = SettingsCamera()
    info_cam = settings.get_camera_settings()

    return info_cam
Example #5
0
 def get_camera_settings(self):
     '''
     pega os valores no ini camera
     info[0] = temperature_camera
     info[1] = prefixo/filter name
     info[2] = tempo_exposicao
     info[3] = tempo_fotos(tempo entre fotos)
     info[4] = time_cooling(CCD cooling time)
     info[5] = Image contrast: bottom
     info[6] = Image contrast: top level
     info[7] = Booleano para decidir se a foto é dark
     '''
     settings = SettingsCamera()
     info = settings.get_camera_settings()
     return info
Example #6
0
    def __init__(self, parent=None):
        super(Shooter, self).__init__(parent)
        self.cam = Camera()
        self.cond = 0
        self.sref_calc = SettingsCamera()

        # Label for Image
        self.img = QtWidgets.QLabel(self)
        self.config_img_label()

        # Creating a Pallete
        self.pa = QtGui.QPalette()

        self.set_layout()
        self.link_signals()
Example #7
0
    def __init__(self):
        self.lock = Locker()
        self.console = ConsoleThreadOutput()
        self.settings = SettingsCamera()
        self.settings.setup_settings()
        self.fan = Fan()

        # Campos da janela principal para as informações da câmera
        self.firmware_field = None
        self.model_field = None
        self.valor_pixels_x = None
        self.valor_pixels_y = None

        self.main = Status()
        self.now_plus = datetime.now()
        self.settedhour = datetime.now()
        """
        executa o modo manual continuousShooterThread
        """
        self.continuousShooterThread = ContinuousShooterThread(
            int(self.settings.get_camera_settings()[4]))
        """
        executa o modo automatico ephemerisShooterThread
        """
        self.ephemerisShooterThread = EphemerisShooter()

        self.sthread = SThread()

        self.commands = CameraQThread(self)
        self.shooting = False
        # Initiating the Slots
        self.init_slots()

        self.info_ini = []
        self.pass_list = [1024, 1024]
        self.pass_list_str = ["1024", "1024"]

        info_ini = self.get_camera_settings_ini()
        self.aux_temperature = int(info_ini[0])

        self.temp = 0
        self.temp_contador = False
        self.temp_contador_manual = False
        self.is_connected = False
Example #8
0
    def __init__(self, parent=None):
        super(SettingsWindow, self).__init__(parent)
        self.cam = SettingsCamera()
        self.camera = Camera()
        self.console = ConsoleThreadOutput()
        self.create_cam_widgets()
        self.p = parent
        self.fan = Fan(self.fanButton)

        self.lock = Locker()

        self.setting_values()

        self.one_photo = SThread()

        self.setLayout(
            set_lvbox(
                set_hbox(self.setField_temperature_label,
                         self.setField_temperature),
                set_hbox(self.pre, self.prel), set_hbox(self.exp, self.expl),
                set_hbox(self.binning, self.combo),
                set_hbox(self.dark, self.close_open),
                set_hbox(self.tempo_fotos_label, self.tempo_fotos),
                set_hbox(self.time_colling_label, self.time_colling),
                set_hbox(self.contrast_msg),
                set_hbox(self.getlevel1, self.getlevel1l, self.getlevel2,
                         self.getlevel2l), set_hbox(self.ignore_crop_l),
                set_hbox(self.crop_msg),
                set_hbox(self.crop_xi, self.getcropxi_l, self.crop_xf,
                         self.getcropxf_l),
                set_hbox(self.crop_yi, self.getcropyi_l, self.crop_yf,
                         self.getcropyf_l), set_hbox(self.image_tif_l),
                set_hbox(self.image_fit_l),
                set_hbox(self.btn_one_photo,
                         self.tempButton,
                         self.fanButton,
                         stretch2=1),
                set_hbox(self.buttonok,
                         self.button_clear,
                         self.buttoncancel,
                         stretch2=1)))
Example #9
0
    def __init__(self, parent=None):
        super(SettingsWindow, self).__init__(parent)
        self.cam = SettingsCamera()
        self.camera = Camera()
        self.console = ConsoleThreadOutput()
        #self.a_temp_regulation = TempRegulation(self)
        self.create_cam_widgets()
        self.p = parent
        self.fan = Fan(self.fanButton)

        #self.button_clear = QtWidgets.QPushButton('Clear', self)

        self.setField_temperature = QtWidgets.QLineEdit(self)
        self.setting_values()

        self.one_photo = SThread()

        self.setLayout(
            set_lvbox(
                set_hbox(self.setField_temperature_label,
                         self.setField_temperature),
                set_hbox(self.pre, self.prel), set_hbox(self.exp, self.expl),
                set_hbox(self.binning, self.combo),
                set_hbox(self.tempo_fotos_label, self.tempo_fotos),
                set_hbox(self.time_colling_label, self.time_colling),
                set_hbox(self.dark, self.close_open),
                set_hbox(self.getlevel1, self.getlevel1l),
                set_hbox(self.getlevel2, self.getlevel2l),
                set_hbox(self.btn_one_photo,
                         self.tempButton,
                         self.fanButton,
                         stretch2=1),
                set_hbox(self.buttonok,
                         self.button_clear,
                         self.buttoncancel,
                         stretch2=1)))
Example #10
0
    def get_camera_settings(self):
        '''
        pega os valores no ini camera
        info[0] = temperature_camera
        info[1] = prefixo/filter name
        info[2] = tempo_exposicao
        info[3] = binning
        info[4] = tempo_fotos(tempo entre fotos)
        info[5] = time_cooling(CCD cooling time)
        info[6] = Image contrast: bottom
        info[7] = Image contrast: top level
        info[8] = Booleano para decidir se a foto é dark
        info[9] = axis_xi inicial
        info[10] = axis_xf final
        info[11] = axis_yi inicial
        info[12] = axis_yf final
        info[13] = ignore_crop
        info[14] = image_tif
        info[15] = image_fit
        '''
        settings = SettingsCamera()
        info = settings.get_camera_settings()

        return info
Example #11
0
 def get_camera_settings_ini(self):
     settings = SettingsCamera()
     info_ini = settings.get_camera_settings()
     return info_ini
Example #12
0
    def __init__(self, parent=None):
        super(SettingsCCDInfos, self).__init__(parent)

        # Instance attributes create_filter_wheel_info_group
        self.serial_filter_wheel_info_l = None
        self.serial_filter_wheel_info_f = None
        self.tempt_filter_wheel_info_l = None
        self.tempt_filter_wheel_info_f = None
        self.slots_filter_wheel_info_l = None
        self.slots_filter_wheel_info_f = None

        # Instance attributes create_filter_wheel_group
        self.shutter_l = None
        self.close_open_filter_wheel = None
        self.close_open_filter_wheel_info = None
        self.btn_set_shutter = None
        self.get_filter_l = None
        self.filter_position = None
        self.btn_set_filter = None
        self.set_filter_position = None
        self.btn_home_position_filter = None

        # Instance attributes create_ccd_info_group
        self.info_port_ccd_l = None
        self.info_port_ccd_f = None
        self.info_camera_model_l = None
        self.info_camera_model_f = None
        self.info_pixel_array_l = None
        self.info_pixel_array_f = None

        # Instance attributes create_ccd_camera_group
        self.close_open = None
        self.temp_set_point_l = None
        self.temp_set_point_f = None
        self.temp_init_l = None
        self.temp_init_f = None
        self.one_photoButton = None
        self.tempButton = None
        self.fanButton = None

        # Instance attributes create_push_button_group
        self.saveButton = None
        self.cancelButton = None
        self.clearButton = None

        self.select_filter_manual = 1
        self.select_filter_shutter = "Closed"

        self.imager_window = parent

        self.cam = Camera()

        self.roda_filtros = FilterControl()

        self.var_save_ini_camera = SettingsCamera()

        self.console = ConsoleThreadOutput()

        self.fan = Fan(self.fanButton)

        self.one_photo = SThread()

        self.lock = Locker()

        self.firmware = "????"
        self.model = "????"
        self.y_pixels = "????"
        self.x_pixels = "????"

        grid = QGridLayout()
        grid.addWidget(self.create_filter_wheel_info_group(), 0, 0)
        grid.addWidget(self.create_filter_wheel_group(), 1, 0)
        grid.addWidget(self.create_ccd_info_group(), 0, 1)
        grid.addWidget(self.create_ccd_camera_group(), 1, 1)
        grid.addWidget(self.create_push_button_group(), 2, 1)
        self.setLayout(grid)

        self.button_settings()

        self.setWindowTitle("Imager Box")
        self.resize(500, 340)
        self.info_cam()