All Downloads are FREE. Search and download functionalities are using the official Maven repository.
Please wait. This can take some minutes ...
Many resources are needed to download a project. Please understand that we have to compensate our server costs. Thank you in advance.
Project price only 1 $
You can buy this project and download/modify it how often you want.
lucuma.core.enums.GnirsFpuSlit.scala Maven / Gradle / Ivy
// 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
package core
package enums
import cats.syntax.eq.*
import lucuma.core.math.Angle
import lucuma.core.util.Enumerated
/**
* Enumerated type for GNIRS FPU Slit.
* @group Enumerations (Generated)
*/
sealed abstract class GnirsFpuSlit(
val tag: String,
val shortName: String,
val longName: String,
val slitWidth: Angle,
val obsolete: Boolean
) extends Product with Serializable
object GnirsFpuSlit {
/** @group Constructors */ case object LongSlit_0_10 extends GnirsFpuSlit("LongSlit_0_10", "0.10\"", "0.10 arcsec", Angle.fromDoubleArcseconds(0.100), false)
/** @group Constructors */ case object LongSlit_0_15 extends GnirsFpuSlit("LongSlit_0_15", "0.15\"", "0.15 arcsec", Angle.fromDoubleArcseconds(0.150), false)
/** @group Constructors */ case object LongSlit_0_20 extends GnirsFpuSlit("LongSlit_0_20", "0.20\"", "0.20 arcsec", Angle.fromDoubleArcseconds(0.200), false)
/** @group Constructors */ case object LongSlit_0_30 extends GnirsFpuSlit("LongSlit_0_30", "0.30\"", "0.30 arcsec", Angle.fromDoubleArcseconds(0.300), false)
/** @group Constructors */ case object LongSlit_0_45 extends GnirsFpuSlit("LongSlit_0_45", "0.45\"", "0.45 arcsec", Angle.fromDoubleArcseconds(0.450), false)
/** @group Constructors */ case object LongSlit_0_675 extends GnirsFpuSlit("LongSlit_0_675", "0.675\"", "0.675 arcsec", Angle.fromDoubleArcseconds(0.675), false)
/** @group Constructors */ case object LongSlit_1_00 extends GnirsFpuSlit("LongSlit_1_00", "1.0\"", "1.0 arcsec", Angle.fromDoubleArcseconds(1.000), false)
/** @group Constructors */ case object LongSlit_3_00 extends GnirsFpuSlit("LongSlit_3_00", "3.0\"", "3.0 arcsec", Angle.fromDoubleArcseconds(3.000), true)
/** All members of GnirsFpuSlit, in canonical order. */
val all: List[GnirsFpuSlit] =
List(LongSlit_0_10, LongSlit_0_15, LongSlit_0_20, LongSlit_0_30, LongSlit_0_45, LongSlit_0_675, LongSlit_1_00, LongSlit_3_00)
/** Select the member of GnirsFpuSlit with the given tag, if any. */
def fromTag(s: String): Option[GnirsFpuSlit] =
all.find(_.tag === s)
/** Select the member of GnirsFpuSlit with the given tag, throwing if absent. */
def unsafeFromTag(s: String): GnirsFpuSlit =
fromTag(s).getOrElse(throw new NoSuchElementException(s"GnirsFpuSlit: Invalid tag: '$s'"))
/** @group Typeclass Instances */
implicit val GnirsFpuSlitEnumerated: Enumerated[GnirsFpuSlit] =
new Enumerated[GnirsFpuSlit] {
def all = GnirsFpuSlit.all
def tag(a: GnirsFpuSlit) = a.tag
override def unsafeFromTag(s: String): GnirsFpuSlit =
GnirsFpuSlit.unsafeFromTag(s)
}
}