#!/usr/bin/env python3
# -*- coding: utf-8 -*-

# Telescope

lat = 44.5912  # [°] Latitude North from Greenwich.
lon = 9.2034  # [°] Longitude East from Greenwich.
alt = 1469  # [m] Altitude above sea level.

# Dome

flat_position = [24, 240]

open_state = {
    0: "Open",
    1: "Closed",
    2: "Opening",
    3: "Closing",
    4: "Error",
}

yes_no = {
    True: "Yes",
    False: "No",
}

# Switches

on_off = {
    True: "On",
    False: "Off",
}


# Camera
xmax = [0, 4145]  # max xrange in binning 1.
ymax = [0, 4126]  # max yrange in binning 1.

pixscale = 0.283  # arcsec/px in binning 1. From a resolved FITS
rotangle = -89.67  # -90 # typical rotation angle. From a resolved FITS

temp_fits = "temp.fits"

filter_state = {
    0: "Idle",
    1: "Moving",
    2: "Error",
}

filter_name = {
    1: "U",
    2: "B",
    3: "V",
    4: "R",
    5: "I",
    6: "Halpha",
    7: "Free",
    15: "Filter_error"
}

# Reversing filter_name
filter_number = {v: k for k, v in filter_name.items()}

camera_state = {
    0: "Idle",
    2: "Exposing",
    3: "Readout",
    5: "Error",
}

frame_type = {
    0: "Dark",
    1: "Light",
    2: "Bias",
    3: "Flat",
}

# Reversing frame_type
frame_number = {v: k for k, v in frame_type.items()}

# Directories
data_folder = "data"
fits_folder = "fits"
log_folder = "log"

dir_type = {
    0: "dark",
    1: "object",
    2: "bias",
    3: "flat",
}

# Reversing dir_type
dir_number = {v: k for k, v in dir_type.items()}

# FITS keywords
imagetyp = "IMAGETYP"  # 'Light'
dateobs = "DATE-OBS"  # '2021-12-18T05:09:56.163'

# FITS file prefix
prefix = "OARPAF."

# FITS file extension
ext = ".fits"
