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

lucuma.itc.legacy.ItcRemoteGraphResult.scala Maven / Gradle / Ivy

There is a newer version: 0.22.3
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.itc.legacy

import cats.data.NonEmptyList
import cats.syntax.all.*
import eu.timepit.refined.types.numeric.PosInt
import lucuma.core.math.SignalToNoise
import lucuma.itc.ItcChartGroup

case class GraphsRemoteResult(
  ccds:   NonEmptyList[ItcRemoteCcd],
  groups: NonEmptyList[ItcChartGroup]
) {
  val maxTotalSNRatio: Double = ccds.map(_.totalSNRatio).maximum
  val maxWellDepth: Double    = ccds.map(_.wellDepth).maximum
  val maxPeakPixelFlux: Int   = ccds.map(_.peakPixelFlux).maximum.toInt
}

case class ExposureCalculation(
  exposureTime:  Double,
  exposures:     PosInt,
  signalToNoise: SignalToNoise
)

case class ExposureTimeRemoteResult(exposureCalculation: NonEmptyList[ExposureCalculation])




© 2015 - 2024 Weber Informatics LLC | Privacy Policy