All Downloads are FREE. Search and download functionalities are using the official Maven repository.

lucuma.core.model.TelescopeGuideConfig.scala Maven / Gradle / Ivy

There is a newer version: 0.108.0
Show newest version
// Copyright (c) 2016-2023 Association of Universities for Research in Astronomy, Inc. (AURA)
// For license information see LICENSE or https://opensource.org/licenses/BSD-3-Clause

package lucuma.core.model

import cats.Eq
import cats.derived.*
import lucuma.core.enums.MountGuideOption
import monocle.Focus
import monocle.Lens

/** Data type for guide config. */
case class TelescopeGuideConfig(
  mountGuide:  MountGuideOption,
  m1Guide:     M1GuideConfig,
  m2Guide:     M2GuideConfig,
  dayTimeMode: Option[Boolean], // This should not be an Option but we make it optional for backward compatibility with TCC
  probeGuide:  Option[ProbeGuide]
) derives Eq

object TelescopeGuideConfig {
  val mountGuide: Lens[TelescopeGuideConfig, MountGuideOption] =
    Focus[TelescopeGuideConfig](_.mountGuide)

  val m1Guide: Lens[TelescopeGuideConfig, M1GuideConfig] =
    Focus[TelescopeGuideConfig](_.m1Guide)

  val m2Guide: Lens[TelescopeGuideConfig, M2GuideConfig] =
    Focus[TelescopeGuideConfig](_.m2Guide)

  val dayTimeMode: Lens[TelescopeGuideConfig, Option[Boolean]] =
    Focus[TelescopeGuideConfig](_.dayTimeMode)

  val probeGuide: Lens[TelescopeGuideConfig, Option[ProbeGuide]] =
    Focus[TelescopeGuideConfig](_.probeGuide)
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy