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

lucuma.itc.input.SignificantFiguresInput.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.input

import cats.syntax.parallel.*
import eu.timepit.refined.types.numeric.PosInt
import lucuma.itc.SignificantFigures
import lucuma.odb.graphql.binding.*

object SignificantFiguresInput {

  def binding: Matcher[SignificantFigures] =
    ObjectFieldsBinding.rmap {
      case List(
            PosIntBinding.Option("xAxis", xAxis),
            PosIntBinding.Option("yAxis", yAxis),
            PosIntBinding.Option("ccd", ccd)
          ) =>
        (xAxis, yAxis, ccd).parMapN(SignificantFigures.apply)
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy