Safe Haskell | Safe-Inferred |
---|---|
Language | GHC2021 |
Telescope.Asdf.GWCS
Synopsis
- data GWCS inp out = GWCS (GWCSStep inp) (GWCSStep out)
- data GWCSStep frame = GWCSStep {
- frame :: frame
- transform :: Maybe Transformation
- newtype AxisName = AxisName Text
- newtype AxisType = AxisType Text
- data Pix a
- data Rot a
- newtype Lon = Lon Double
- newtype Lat = Lat Double
- newtype LonPole = LonPole Double
- data Transformation = Transformation {}
- data Forward
- data Transform b c = Transform {}
- transform :: forall a bs cs. (ToAsdf a, ToAxes bs, ToAxes cs) => a -> Transform bs cs
- (|>) :: forall b c d. (ToAxes b, ToAxes d) => Transform b c -> Transform c d -> Transform b d
- (<&>) :: forall (a :: Type) (b :: Type) (cs :: Type) (ds :: Type). (ToAxes (TConcat a cs), ToAxes (TConcat b ds)) => Transform a b -> Transform cs ds -> Transform (TConcat a cs) (TConcat b ds)
- data Direction
- data Shift a = Shift Double
- data Scale a = Scale Double
- data Identity = Identity
- data Intercept = Intercept Double
- data Affine = Affine {}
- data Projection = Projection Direction
- data Rotate3d = Rotate3d {}
- data Linear a = Linear1d {}
- data CoordinateFrame = CoordinateFrame {}
- data StokesFrame = StokesFrame {}
- data SpectralFrame = SpectralFrame {}
- data CelestialFrame ref = CelestialFrame {}
- frameAxesObject :: NonEmpty FrameAxis -> Object
- data ICRSFrame = ICRSFrame
- data HelioprojectiveFrame = HelioprojectiveFrame {
- coordinates :: Cartesian3D
- obstime :: UTCTime
- rsun :: Quantity
- data HelioObserver = HelioObserver {}
- data HelioObservation = HelioObservation {}
- data Cartesian3D = Cartesian3D {}
- data CartesianRepresentation dims = CartesianRepresentation dims
- data FrameAxis = FrameAxis {}
- data CompositeFrame as = CompositeFrame as
- class ToAxes (as :: Type) where
- shift :: forall a f. (ToAxes (f a), ToAxes (Shift a)) => Double -> Transform (f a) (Shift a)
- scale :: forall a f. (ToAxes (f a), ToAxes (Scale a)) => Double -> Transform (f a) (Scale a)
- linear :: forall a. ToAxes a => Intercept -> Scale a -> Transform (Pix a) (Linear a)
- rotate :: (ToAxes x, ToAxes y) => Array D Ix2 Double -> Transform (Linear x, Linear y) (Rot (x, y))
- project :: (ToAxes x, ToAxes y) => Direction -> Transform (Rot (x, y)) (Phi, Theta)
- celestial :: Lat -> Lon -> LonPole -> Transform (Phi, Theta) (Alpha, Delta)
- data Phi
- data Theta
- data Alpha
- data Delta
- identity :: (ToAxes bs, ToAxes cs) => Transform bs cs
- wcsLinear :: ToAxes axis => WCSAxis alt axis -> Transform (Pix axis) (Linear axis)
- wcsIntercept :: WCSAxis alt axis -> Intercept
- class GTypeName f where
- type family TConcat a b where ...
Documentation
GWCS pipelines consist of an input and output GWCSStep
A step contains a frame (like CelestialFrame
) and a 'Transform a b'
Constructors
GWCSStep | |
Fields
|
Instances
Generic (GWCSStep frame) Source # | |
ToAsdf frame => ToAsdf (GWCSStep frame) Source # | |
type Rep (GWCSStep frame) Source # | |
Defined in Telescope.Asdf.GWCS type Rep (GWCSStep frame) = D1 ('MetaData "GWCSStep" "Telescope.Asdf.GWCS" "telescope-0.3.0-inplace" 'False) (C1 ('MetaCons "GWCSStep" 'PrefixI 'True) (S1 ('MetaSel ('Just "frame") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 frame) :*: S1 ('MetaSel ('Just "transform") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Transformation)))) |
data Transformation Source #
A Tranform
with the types stripped, and the axes recorded
Instances
Show Transformation Source # | |
Defined in Telescope.Asdf.GWCS Methods showsPrec :: Int -> Transformation -> ShowS # show :: Transformation -> String # showList :: [Transformation] -> ShowS # | |
Eq Transformation Source # | |
Defined in Telescope.Asdf.GWCS Methods (==) :: Transformation -> Transformation -> Bool # (/=) :: Transformation -> Transformation -> Bool # | |
ToAsdf Transformation Source # | |
Defined in Telescope.Asdf.GWCS |
A Transform specifies how we manipulate a type in a pipeline
spatialTransform :: WCSAxis s X -> WCSAxis s Y -> Transform (Pix X, PixY) (Scale X, Scale Y) spatialTransform wcsx wcsy = let dx = shift wcsx.crpix :: Transform (Pix X) (Shift X) dy = shift wcsy.crpix :: Transform (Pix Y) (Shift Y) xx = scale wcsx.cdelt :: Transform (Shift X) (Scale X) xy = scale wcsy.cdelt :: Transform (Shift Y) (Scale Y) in dx |> xx <&> dy |> xy
Constructors
Transform | |
Fields |
(|>) :: forall b c d. (ToAxes b, ToAxes d) => Transform b c -> Transform c d -> Transform b d infixr 5 Source #
Compose two transforms
(<&>) :: forall (a :: Type) (b :: Type) (cs :: Type) (ds :: Type). (ToAxes (TConcat a cs), ToAxes (TConcat b ds)) => Transform a b -> Transform cs ds -> Transform (TConcat a cs) (TConcat b ds) infixr 4 Source #
Concatent two transforms
data Projection Source #
Constructors
Projection Direction |
Instances
ToAsdf Projection Source # | |
Defined in Telescope.Asdf.GWCS |
Instances
Generic Rotate3d Source # | |
ToAsdf Rotate3d Source # | |
type Rep Rotate3d Source # | |
Defined in Telescope.Asdf.GWCS type Rep Rotate3d = D1 ('MetaData "Rotate3d" "Telescope.Asdf.GWCS" "telescope-0.3.0-inplace" 'False) (C1 ('MetaCons "Rotate3d" 'PrefixI 'True) ((S1 ('MetaSel ('Just "direction") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Direction) :*: S1 ('MetaSel ('Just "phi") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Lon)) :*: (S1 ('MetaSel ('Just "theta") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Lat) :*: S1 ('MetaSel ('Just "psi") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 LonPole)))) |
Instances
Generic (Linear a) Source # | |
ToAsdf (Linear a) Source # | |
ToAxes a => ToAxes (Linear a) Source # | |
Defined in Telescope.Asdf.GWCS | |
type Rep (Linear a) Source # | |
Defined in Telescope.Asdf.GWCS type Rep (Linear a) = D1 ('MetaData "Linear" "Telescope.Asdf.GWCS" "telescope-0.3.0-inplace" 'False) (C1 ('MetaCons "Linear1d" 'PrefixI 'True) (S1 ('MetaSel ('Just "intercept") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Double) :*: S1 ('MetaSel ('Just "slope") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Double))) |
data CoordinateFrame Source #
Instances
ToAsdf CoordinateFrame Source # | |
Defined in Telescope.Asdf.GWCS |
data StokesFrame Source #
Constructors
StokesFrame | |
Instances
ToAsdf StokesFrame Source # | |
Defined in Telescope.Asdf.GWCS |
data SpectralFrame Source #
Constructors
SpectralFrame | |
Instances
ToAsdf SpectralFrame Source # | |
Defined in Telescope.Asdf.GWCS |
data CelestialFrame ref Source #
Constructors
CelestialFrame | |
Instances
ToAsdf ref => ToAsdf (CelestialFrame ref) Source # | |
Defined in Telescope.Asdf.GWCS |
Constructors
ICRSFrame |
data HelioprojectiveFrame Source #
Constructors
HelioprojectiveFrame | |
Fields
|
Instances
ToAsdf HelioprojectiveFrame Source # | |
Defined in Telescope.Asdf.GWCS |
data HelioObserver Source #
Constructors
HelioObserver | |
Instances
ToAsdf HelioObserver Source # | |
Defined in Telescope.Asdf.GWCS |
data HelioObservation Source #
Constructors
HelioObservation | |
Instances
Generic HelioObservation Source # | |
Defined in Telescope.Asdf.GWCS Associated Types type Rep HelioObservation :: Type -> Type # Methods from :: HelioObservation -> Rep HelioObservation x # to :: Rep HelioObservation x -> HelioObservation # | |
ToAsdf HelioObservation Source # | |
Defined in Telescope.Asdf.GWCS | |
type Rep HelioObservation Source # | |
Defined in Telescope.Asdf.GWCS type Rep HelioObservation = D1 ('MetaData "HelioObservation" "Telescope.Asdf.GWCS" "telescope-0.3.0-inplace" 'False) (C1 ('MetaCons "HelioObservation" 'PrefixI 'True) (S1 ('MetaSel ('Just "obstime") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 UTCTime) :*: S1 ('MetaSel ('Just "rsun") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Quantity))) |
data Cartesian3D Source #
Instances
Generic Cartesian3D Source # | |
Defined in Telescope.Asdf.GWCS Associated Types type Rep Cartesian3D :: Type -> Type # | |
ToAsdf Cartesian3D Source # | |
Defined in Telescope.Asdf.GWCS | |
type Rep Cartesian3D Source # | |
Defined in Telescope.Asdf.GWCS type Rep Cartesian3D = D1 ('MetaData "Cartesian3D" "Telescope.Asdf.GWCS" "telescope-0.3.0-inplace" 'False) (C1 ('MetaCons "Cartesian3D" 'PrefixI 'True) (S1 ('MetaSel ('Just "x") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Quantity) :*: (S1 ('MetaSel ('Just "y") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Quantity) :*: S1 ('MetaSel ('Just "z") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Quantity)))) |
data CartesianRepresentation dims Source #
Constructors
CartesianRepresentation dims |
Instances
ToAsdf dims => ToAsdf (CartesianRepresentation dims) Source # | |
Defined in Telescope.Asdf.GWCS |
data CompositeFrame as Source #
Constructors
CompositeFrame as |
Instances
ToAsdf as => ToAsdf (CompositeFrame as) Source # | |
Defined in Telescope.Asdf.GWCS |
class ToAxes (as :: Type) where Source #
Convert a type to named axes
data X deriving (Generic, ToAxes) data Y instance ToAxes Y where toAxes = ["y"]
Minimal complete definition
Nothing
Methods
Instances
ToAxes Alpha Source # | |
Defined in Telescope.Asdf.GWCS | |
ToAxes Delta Source # | |
Defined in Telescope.Asdf.GWCS | |
ToAxes Phi Source # | |
Defined in Telescope.Asdf.GWCS | |
ToAxes Theta Source # | |
Defined in Telescope.Asdf.GWCS | |
ToAxes () Source # | |
Defined in Telescope.Asdf.GWCS | |
ToAxes a => ToAxes (Linear a) Source # | |
Defined in Telescope.Asdf.GWCS | |
ToAxes a => ToAxes (Pix a) Source # | |
Defined in Telescope.Asdf.GWCS | |
ToAxes a => ToAxes (Rot a) Source # | |
Defined in Telescope.Asdf.GWCS | |
ToAxes a => ToAxes (Scale a) Source # | |
Defined in Telescope.Asdf.GWCS | |
ToAxes a => ToAxes (Shift a) Source # | |
Defined in Telescope.Asdf.GWCS | |
(ToAxes a, ToAxes b) => ToAxes (a, b) Source # | |
Defined in Telescope.Asdf.GWCS | |
(ToAxes a, ToAxes b, ToAxes c) => ToAxes (a, b, c) Source # | |
Defined in Telescope.Asdf.GWCS | |
(ToAxes a, ToAxes b, ToAxes c, ToAxes d) => ToAxes (a, b, c, d) Source # | |
Defined in Telescope.Asdf.GWCS |
shift :: forall a f. (ToAxes (f a), ToAxes (Shift a)) => Double -> Transform (f a) (Shift a) Source #
scale :: forall a f. (ToAxes (f a), ToAxes (Scale a)) => Double -> Transform (f a) (Scale a) Source #
rotate :: (ToAxes x, ToAxes y) => Array D Ix2 Double -> Transform (Linear x, Linear y) (Rot (x, y)) Source #
wcsIntercept :: WCSAxis alt axis -> Intercept Source #