package math
Mathematical data types for general use, not specific to the Gem model.
- Alphabetic
- By Inheritance
- math
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Package Members
- package dimensional
- package parser
Package of atto parsers, for parsing things in the science model.
Package of atto parsers, for parsing things in the science model. The idea here is that parsers compose, so for internal use it's nice to have them together and so we can share implementations. In end-user code we normally want to expose something weaker like
String => Option[A]
that delegates to a parser, rather than exposingParser[A]
directly. Each set of parsers is provided as a trait that can be extended and as a module whose members can be imported (preferred). - package skycalc
- package syntax
Type Members
- sealed class Angle extends AnyRef
Exact angles represented as integral microarcseconds.
Exact angles represented as integral microarcseconds. These values form a commutative group over addition, where the inverse is reflection around the 0-180° axis. The subgroup of angles where integral microarcseconds correspond with clock microseconds (i.e., where they are evenly divisible by 15 microarcseconds) is represented by the HourAgle subtype.
Lawful conversion to and from other types/scales is provided by optics defined on the companion object. Floating-point conversions are provided directly
- trait AngleOptics extends OpticsHelpers
- final case class ApparentRadialVelocity(cz: Quantity[BigDecimal, units.MetersPerSecond]) extends Product with Serializable
Representation of a radial velocity in meters per second Unlike RadialVelocity this is not limited to the speed of light Apparent Radial Velocity is often represented as cz
- final case class BrightnessValue(scaledValue: Int) extends Product with Serializable
Exact brightness value represented as an int with the original value scaled up
Exact brightness value represented as an int with the original value scaled up
- scaledValue
A brightness integral value, as the original multiplied by 1000. value is unitless.
- See also
The Wikipedia https://en.wikipedia.org/wiki/Apparent_magnitude
- final case class Coordinates(ra: RightAscension, dec: Declination) extends Product with Serializable
A point in the sky, given right ascension and declination.
- trait CoordinatesOptics extends AnyRef
- type Dec = Declination
- sealed abstract case class Declination extends Product with Serializable
Celestial latitude, measured in angular distance from the celestial equator.
Celestial latitude, measured in angular distance from the celestial equator. Points north of the celestial equator have positive declinations, while those south have negative declinations. This is a newtype wrapper for an
Angle
constrainted to the range [-90°, 90°], or [270 - 360) + [0 - 90] in terms of the underlyingAngle
. Note that the range is *inclusive* of both poles.- See also
The helpful Wikipedia article.
- trait DeclinationOptics extends AnyRef
- final class Epoch extends AnyRef
An epoch, the astronomer's equivalent of
Instant
, based on a fractional year in some temporal scheme (Julian or Besselian) that determines year zero and the length of a year.An epoch, the astronomer's equivalent of
Instant
, based on a fractional year in some temporal scheme (Julian or Besselian) that determines year zero and the length of a year. The only meaningful operation for anEpoch
is to ask the elapsed epoch-years between it and some other point in time. We need this for proper motion corrections because velocities are measured in motion per epoch-year. The epoch year is stored internally as integral milliyears.- See also
The Wikipedia article
- trait EpochOptics extends AnyRef
- final class HourAngle extends Angle
Exact hour angles represented as integral microseconds.
Exact hour angles represented as integral microseconds. These values form a commutative group over addition, where the inverse is reflection around the 0-12h axis. This is a subgroup of the integral Angles where microarcseconds are evenly divisible by 15.
Lawful conversion to and from other types/scales is provided by optics defined on the companion object. Floating-point conversions are provided directly
- See also
The helpful Wikipedia article.
- trait HourAngleOptics extends OpticsHelpers
- sealed abstract case class Index extends Product with Serializable
A positive, non-zero value for numbered identifiers.
- trait IndexOptics extends AnyRef
- sealed abstract case class JulianDate extends Product with Serializable
Astronomical time representation of continuous days since noon, November 24, 4714 BC.
Astronomical time representation of continuous days since noon, November 24, 4714 BC.
- See also
The Wikipedia article
- type Lat = Declination
- type Lon = Angle
- final case class Offset(p: Component[P], q: Component[Q]) extends Product with Serializable
Angular offset with P and Q components.
- trait OffsetOptics extends AnyRef
- trait OpticsHelpers extends AnyRef
- sealed abstract case class Parallax extends Product with Serializable
Parallax stored as microarcseconds Normally parallax is expressed in milliarcseconds but simbad reports them with a higher precision thus using microarcseconds gives us enough space.
Parallax stored as microarcseconds Normally parallax is expressed in milliarcseconds but simbad reports them with a higher precision thus using microarcseconds gives us enough space. Parallax values need to be in the interval [0°, 180°]. 180° is a theoretical limit - actual astronomical values will be very small.
- sealed trait ParallaxOptics extends AnyRef
- final case class Place(latitude: Lat, longitude: Lon, altitude: Quantity[NonNegInt, Meter], timezone: ZoneId) extends Product with Serializable
A point on Earth, given latitude, longitude and altitude in m above sea level.
- final case class ProperMotion(ra: AngularVelocityComponent[VelocityAxis.RA], dec: AngularVelocityComponent[VelocityAxis.Dec]) extends Product with Serializable
ProperMotion contains Ra/Dec angular velocities
- sealed trait ProperMotionOptics extends AnyRef
- type RA = RightAscension
- final case class RadialVelocity extends Product with Serializable
Representation of a radial velocity in meters per second Valid range is (-C, C) where C is the speed of light Radial Velocity is often represented as RV
Representation of a radial velocity in meters per second Valid range is (-C, C) where C is the speed of light Radial Velocity is often represented as RV
The selection of units is based on references to velocities as low as 20 cm/s https://en.wikipedia.org/wiki/Radial_velocity
- final case class Redshift(z: BigDecimal) extends Product with Serializable
Represents a redshift of an object as it moves away (positive) or towards (negative) the observing point
Represents a redshift of an object as it moves away (positive) or towards (negative) the observing point
Redshift can be (perhaps surprisingly) higher than 1.
For far objects Redshift can be converted to RadialVelocity which takes into account relativistic effects and cannot be more than C For nearer objects we can convert to ApparentRadialVelocity which doesn't consider relativistic effects
Often Redshift is referred as z
- final case class RightAscension(toHourAngle: HourAngle) extends Product with Serializable
Celestial longitude, measured eastward along the celestial equator from the vernal equinox to the hour circle of the point in question.
- trait RightAscensionOptics extends AnyRef
- final case class Wavelength(toPicometers: Quantity[PosInt, units.Picometer]) extends Product with Serializable
Exact wavelengths represented as positive integral picometers in the range (0 ..
Exact wavelengths represented as positive integral picometers in the range (0 .. PosInt.MaxValue] which means the largest representable wavelength is 2.147483647 mm.
- toPicometers
This wavelength in positive integral picometers (10-12 of a meter).
- trait units extends AnyRef
Value Members
- val Dec: Declination.type
- val Lat: Declination.type
- val Lon: Angle.type
- val RA: RightAscension.type
- object Angle extends AngleOptics
- object ApparentRadialVelocity extends Serializable
- object Axis
- object BrightnessUnits
- object BrightnessValue extends Serializable
- object Constants
- object Coordinates extends CoordinatesOptics with Serializable
- object Declination extends DeclinationOptics with Serializable
- object Epoch extends EpochOptics
- object HourAngle extends HourAngleOptics
- object Index extends IndexOptics with Serializable
- object JulianDate extends Serializable
- object Offset extends OffsetOptics with Serializable
- object Parallax extends ParallaxOptics with Serializable
- object Place extends Serializable
- object ProperMotion extends ProperMotionOptics with Serializable
- object RadialVelocity extends Serializable
- object Redshift extends Serializable
- object RightAscension extends RightAscensionOptics with Serializable
- object VelocityAxis
- object Wavelength extends Serializable
- object units extends units