telescope-0.2.0: Astronomical Observations (FITS, ASDF, WCS, etc)
Safe HaskellNone
LanguageGHC2021

Telescope.Asdf.GWCS

Synopsis

Documentation

data GWCS inp out Source #

GWCS pipelines consist of an input and output GWCSStep

Constructors

GWCS (GWCSStep inp) (GWCSStep out) 

Instances

Instances details
(ToAsdf inp, ToAsdf out) => ToAsdf (GWCS inp out) Source # 
Instance details

Defined in Telescope.Asdf.GWCS

Methods

toValue :: GWCS inp out -> Value Source #

schema :: GWCS inp out -> SchemaTag Source #

anchor :: GWCS inp out -> Maybe Anchor Source #

toNode :: GWCS inp out -> Node Source #

data GWCSStep frame Source #

A step contains a frame (like CelestialFrame) and a 'Transform a b'

Constructors

GWCSStep 

Fields

Instances

Instances details
Generic (GWCSStep frame) Source # 
Instance details

Defined in Telescope.Asdf.GWCS

Associated Types

type Rep (GWCSStep frame) 
Instance details

Defined in Telescope.Asdf.GWCS

type Rep (GWCSStep frame) = D1 ('MetaData "GWCSStep" "Telescope.Asdf.GWCS" "telescope-0.2.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))))

Methods

from :: GWCSStep frame -> Rep (GWCSStep frame) x #

to :: Rep (GWCSStep frame) x -> GWCSStep frame #

ToAsdf frame => ToAsdf (GWCSStep frame) Source # 
Instance details

Defined in Telescope.Asdf.GWCS

type Rep (GWCSStep frame) Source # 
Instance details

Defined in Telescope.Asdf.GWCS

type Rep (GWCSStep frame) = D1 ('MetaData "GWCSStep" "Telescope.Asdf.GWCS" "telescope-0.2.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))))

newtype AxisName Source #

Constructors

AxisName Text 

Instances

Instances details
IsString AxisName Source # 
Instance details

Defined in Telescope.Asdf.GWCS

Semigroup AxisName Source # 
Instance details

Defined in Telescope.Asdf.GWCS

Show AxisName Source # 
Instance details

Defined in Telescope.Asdf.GWCS

Eq AxisName Source # 
Instance details

Defined in Telescope.Asdf.GWCS

ToAsdf AxisName Source # 
Instance details

Defined in Telescope.Asdf.GWCS

newtype AxisType Source #

Constructors

AxisType Text 

Instances

Instances details
IsString AxisType Source # 
Instance details

Defined in Telescope.Asdf.GWCS

ToAsdf AxisType Source # 
Instance details

Defined in Telescope.Asdf.GWCS

data Pix (a :: k) Source #

Instances

Instances details
ToAxes a => ToAxes (Pix a) Source # 
Instance details

Defined in Telescope.Asdf.GWCS

Methods

toAxes :: [AxisName] Source #

data Rot (a :: k) Source #

Instances

Instances details
ToAxes a => ToAxes (Rot a) Source # 
Instance details

Defined in Telescope.Asdf.GWCS

Methods

toAxes :: [AxisName] Source #

newtype Lon Source #

Constructors

Lon Float 

Instances

Instances details
ToAsdf Lon Source # 
Instance details

Defined in Telescope.Asdf.GWCS

newtype Lat Source #

Constructors

Lat Float 

Instances

Instances details
ToAsdf Lat Source # 
Instance details

Defined in Telescope.Asdf.GWCS

newtype LonPole Source #

Constructors

LonPole Float 

Instances

Instances details
ToAsdf LonPole Source # 
Instance details

Defined in Telescope.Asdf.GWCS

data Transformation Source #

A Tranform with the types stripped, and the axes recorded

Constructors

Transformation 

data Forward Source #

Instances

Instances details
Show Forward Source # 
Instance details

Defined in Telescope.Asdf.GWCS

Eq Forward Source # 
Instance details

Defined in Telescope.Asdf.GWCS

Methods

(==) :: Forward -> Forward -> Bool #

(/=) :: Forward -> Forward -> Bool #

data Transform (b :: k) (c :: k1) Source #

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 

Instances

Instances details
Show (Transform b c) Source # 
Instance details

Defined in Telescope.Asdf.GWCS

Methods

showsPrec :: Int -> Transform b c -> ShowS #

show :: Transform b c -> String #

showList :: [Transform b c] -> ShowS #

transform :: (ToAsdf a, ToAxes bs, ToAxes cs) => a -> Transform bs cs Source #

Convert a type into a Transform via ToAsdf and ToAxes

(|>) :: forall {k} b (c :: k) d. (ToAxes b, ToAxes d) => Transform b c -> Transform c d -> Transform b d infixr 5 Source #

Compose two transforms

(<&>) :: forall a b cs ds. (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 Direction Source #

Constructors

Pix2Sky 
Native2Celestial 

Instances

Instances details
Show Direction Source # 
Instance details

Defined in Telescope.Asdf.GWCS

ToAsdf Direction Source # 
Instance details

Defined in Telescope.Asdf.GWCS

data Shift (a :: k) Source #

Constructors

Shift Float 

Instances

Instances details
Show (Shift a) Source # 
Instance details

Defined in Telescope.Asdf.GWCS

Methods

showsPrec :: Int -> Shift a -> ShowS #

show :: Shift a -> String #

showList :: [Shift a] -> ShowS #

Eq (Shift a) Source # 
Instance details

Defined in Telescope.Asdf.GWCS

Methods

(==) :: Shift a -> Shift a -> Bool #

(/=) :: Shift a -> Shift a -> Bool #

ToAsdf (Shift a) Source # 
Instance details

Defined in Telescope.Asdf.GWCS

ToAxes a => ToAxes (Shift a) Source # 
Instance details

Defined in Telescope.Asdf.GWCS

Methods

toAxes :: [AxisName] Source #

data Scale (a :: k) Source #

Constructors

Scale Float 

Instances

Instances details
Show (Scale a) Source # 
Instance details

Defined in Telescope.Asdf.GWCS

Methods

showsPrec :: Int -> Scale a -> ShowS #

show :: Scale a -> String #

showList :: [Scale a] -> ShowS #

Eq (Scale a) Source # 
Instance details

Defined in Telescope.Asdf.GWCS

Methods

(==) :: Scale a -> Scale a -> Bool #

(/=) :: Scale a -> Scale a -> Bool #

ToAsdf (Scale a) Source # 
Instance details

Defined in Telescope.Asdf.GWCS

ToAxes a => ToAxes (Scale a) Source # 
Instance details

Defined in Telescope.Asdf.GWCS

Methods

toAxes :: [AxisName] Source #

data Identity Source #

Constructors

Identity 

Instances

Instances details
Show Identity Source # 
Instance details

Defined in Telescope.Asdf.GWCS

Eq Identity Source # 
Instance details

Defined in Telescope.Asdf.GWCS

ToAsdf Identity Source # 
Instance details

Defined in Telescope.Asdf.GWCS

data Intercept Source #

Constructors

Intercept Float 

Instances

Instances details
Show Intercept Source # 
Instance details

Defined in Telescope.Asdf.GWCS

Eq Intercept Source # 
Instance details

Defined in Telescope.Asdf.GWCS

data Affine Source #

Constructors

Affine 

Instances

Instances details
ToAsdf Affine Source # 
Instance details

Defined in Telescope.Asdf.GWCS

data Rotate3d Source #

Constructors

Rotate3d 

Fields

Instances

Instances details
Generic Rotate3d Source # 
Instance details

Defined in Telescope.Asdf.GWCS

Associated Types

type Rep Rotate3d 
Instance details

Defined in Telescope.Asdf.GWCS

Methods

from :: Rotate3d -> Rep Rotate3d x #

to :: Rep Rotate3d x -> Rotate3d #

ToAsdf Rotate3d Source # 
Instance details

Defined in Telescope.Asdf.GWCS

type Rep Rotate3d Source # 
Instance details

Defined in Telescope.Asdf.GWCS

data Linear (a :: k) Source #

Constructors

Linear1d 

Fields

Instances

Instances details
Generic (Linear a) Source # 
Instance details

Defined in Telescope.Asdf.GWCS

Associated Types

type Rep (Linear a) 
Instance details

Defined in Telescope.Asdf.GWCS

type Rep (Linear a) = D1 ('MetaData "Linear" "Telescope.Asdf.GWCS" "telescope-0.2.0-inplace" 'False) (C1 ('MetaCons "Linear1d" 'PrefixI 'True) (S1 ('MetaSel ('Just "intercept") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Float) :*: S1 ('MetaSel ('Just "slope") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Float)))

Methods

from :: Linear a -> Rep (Linear a) x #

to :: Rep (Linear a) x -> Linear a #

ToAsdf (Linear a) Source # 
Instance details

Defined in Telescope.Asdf.GWCS

ToAxes a => ToAxes (Linear a) Source # 
Instance details

Defined in Telescope.Asdf.GWCS

Methods

toAxes :: [AxisName] Source #

type Rep (Linear a) Source # 
Instance details

Defined in Telescope.Asdf.GWCS

type Rep (Linear a) = D1 ('MetaData "Linear" "Telescope.Asdf.GWCS" "telescope-0.2.0-inplace" 'False) (C1 ('MetaCons "Linear1d" 'PrefixI 'True) (S1 ('MetaSel ('Just "intercept") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Float) :*: S1 ('MetaSel ('Just "slope") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Float)))

data StokesFrame Source #

Constructors

StokesFrame 

Fields

data ICRSFrame Source #

Constructors

ICRSFrame 

Instances

Instances details
ToAsdf ICRSFrame Source # 
Instance details

Defined in Telescope.Asdf.GWCS

data CompositeFrame as Source #

Constructors

CompositeFrame as 

Instances

Instances details
ToAsdf as => ToAsdf (CompositeFrame as) Source # 
Instance details

Defined in Telescope.Asdf.GWCS

class ToAxes as 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

toAxes :: [AxisName] Source #

default toAxes :: (Generic as, GTypeName (Rep as)) => [AxisName] Source #

Instances

Instances details
ToAxes Alpha Source # 
Instance details

Defined in Telescope.Asdf.GWCS

Methods

toAxes :: [AxisName] Source #

ToAxes Delta Source # 
Instance details

Defined in Telescope.Asdf.GWCS

Methods

toAxes :: [AxisName] Source #

ToAxes Phi Source # 
Instance details

Defined in Telescope.Asdf.GWCS

Methods

toAxes :: [AxisName] Source #

ToAxes Theta Source # 
Instance details

Defined in Telescope.Asdf.GWCS

Methods

toAxes :: [AxisName] Source #

ToAxes () Source # 
Instance details

Defined in Telescope.Asdf.GWCS

Methods

toAxes :: [AxisName] Source #

ToAxes a => ToAxes (Linear a) Source # 
Instance details

Defined in Telescope.Asdf.GWCS

Methods

toAxes :: [AxisName] Source #

ToAxes a => ToAxes (Pix a) Source # 
Instance details

Defined in Telescope.Asdf.GWCS

Methods

toAxes :: [AxisName] Source #

ToAxes a => ToAxes (Rot a) Source # 
Instance details

Defined in Telescope.Asdf.GWCS

Methods

toAxes :: [AxisName] Source #

ToAxes a => ToAxes (Scale a) Source # 
Instance details

Defined in Telescope.Asdf.GWCS

Methods

toAxes :: [AxisName] Source #

ToAxes a => ToAxes (Shift a) Source # 
Instance details

Defined in Telescope.Asdf.GWCS

Methods

toAxes :: [AxisName] Source #

(ToAxes a, ToAxes b) => ToAxes (a, b) Source # 
Instance details

Defined in Telescope.Asdf.GWCS

Methods

toAxes :: [AxisName] Source #

(ToAxes a, ToAxes b, ToAxes c) => ToAxes (a, b, c) Source # 
Instance details

Defined in Telescope.Asdf.GWCS

Methods

toAxes :: [AxisName] Source #

(ToAxes a, ToAxes b, ToAxes c, ToAxes d) => ToAxes (a, b, c, d) Source # 
Instance details

Defined in Telescope.Asdf.GWCS

Methods

toAxes :: [AxisName] Source #

shift :: forall {k} (a :: k) f. (ToAxes (f a), ToAxes (Shift a)) => Float -> Transform (f a) (Shift a) Source #

scale :: forall {k} (a :: k) f. (ToAxes (f a), ToAxes (Scale a)) => Float -> Transform (f a) (Scale a) Source #

rotate :: (ToAxes x, ToAxes y) => Array D Ix2 Float -> Transform (Linear x, Linear y) (Rot (x, y)) Source #

project :: (ToAxes x, ToAxes y) => Direction -> Transform (Rot (x, y)) (Phi, Theta) Source #

data Phi Source #

Instances

Instances details
Generic Phi Source # 
Instance details

Defined in Telescope.Asdf.GWCS

Associated Types

type Rep Phi 
Instance details

Defined in Telescope.Asdf.GWCS

type Rep Phi = D1 ('MetaData "Phi" "Telescope.Asdf.GWCS" "telescope-0.2.0-inplace" 'False) (V1 :: Type -> Type)

Methods

from :: Phi -> Rep Phi x #

to :: Rep Phi x -> Phi #

ToAxes Phi Source # 
Instance details

Defined in Telescope.Asdf.GWCS

Methods

toAxes :: [AxisName] Source #

type Rep Phi Source # 
Instance details

Defined in Telescope.Asdf.GWCS

type Rep Phi = D1 ('MetaData "Phi" "Telescope.Asdf.GWCS" "telescope-0.2.0-inplace" 'False) (V1 :: Type -> Type)

data Theta Source #

Instances

Instances details
Generic Theta Source # 
Instance details

Defined in Telescope.Asdf.GWCS

Associated Types

type Rep Theta 
Instance details

Defined in Telescope.Asdf.GWCS

type Rep Theta = D1 ('MetaData "Theta" "Telescope.Asdf.GWCS" "telescope-0.2.0-inplace" 'False) (V1 :: Type -> Type)

Methods

from :: Theta -> Rep Theta x #

to :: Rep Theta x -> Theta #

ToAxes Theta Source # 
Instance details

Defined in Telescope.Asdf.GWCS

Methods

toAxes :: [AxisName] Source #

type Rep Theta Source # 
Instance details

Defined in Telescope.Asdf.GWCS

type Rep Theta = D1 ('MetaData "Theta" "Telescope.Asdf.GWCS" "telescope-0.2.0-inplace" 'False) (V1 :: Type -> Type)

data Alpha Source #

Instances

Instances details
Generic Alpha Source # 
Instance details

Defined in Telescope.Asdf.GWCS

Associated Types

type Rep Alpha 
Instance details

Defined in Telescope.Asdf.GWCS

type Rep Alpha = D1 ('MetaData "Alpha" "Telescope.Asdf.GWCS" "telescope-0.2.0-inplace" 'False) (V1 :: Type -> Type)

Methods

from :: Alpha -> Rep Alpha x #

to :: Rep Alpha x -> Alpha #

ToAxes Alpha Source # 
Instance details

Defined in Telescope.Asdf.GWCS

Methods

toAxes :: [AxisName] Source #

type Rep Alpha Source # 
Instance details

Defined in Telescope.Asdf.GWCS

type Rep Alpha = D1 ('MetaData "Alpha" "Telescope.Asdf.GWCS" "telescope-0.2.0-inplace" 'False) (V1 :: Type -> Type)

data Delta Source #

Instances

Instances details
Generic Delta Source # 
Instance details

Defined in Telescope.Asdf.GWCS

Associated Types

type Rep Delta 
Instance details

Defined in Telescope.Asdf.GWCS

type Rep Delta = D1 ('MetaData "Delta" "Telescope.Asdf.GWCS" "telescope-0.2.0-inplace" 'False) (V1 :: Type -> Type)

Methods

from :: Delta -> Rep Delta x #

to :: Rep Delta x -> Delta #

ToAxes Delta Source # 
Instance details

Defined in Telescope.Asdf.GWCS

Methods

toAxes :: [AxisName] Source #

type Rep Delta Source # 
Instance details

Defined in Telescope.Asdf.GWCS

type Rep Delta = D1 ('MetaData "Delta" "Telescope.Asdf.GWCS" "telescope-0.2.0-inplace" 'False) (V1 :: Type -> Type)

identity :: (ToAxes bs, ToAxes cs) => Transform bs cs Source #

wcsLinear :: forall axis (alt :: WCSAlt). ToAxes axis => WCSAxis alt axis -> Transform (Pix axis) (Linear axis) Source #

wcsIntercept :: forall {k} (alt :: WCSAlt) (axis :: k). WCSAxis alt axis -> Intercept Source #

class GTypeName (f :: k -> Type) where Source #

Generic NodeName

Methods

gtypeName :: forall (p :: k). f p -> String Source #

Instances

Instances details
Datatype d => GTypeName (D1 d f :: k -> Type) Source # 
Instance details

Defined in Telescope.Asdf.GWCS

Methods

gtypeName :: forall (p :: k). D1 d f p -> String Source #

type family TConcat a b where ... Source #

Equations

TConcat (a, b, c) d = (a, b, c, d) 
TConcat a (b, c, d) = (a, b, c, d) 
TConcat (a, b) (c, d) = (a, b, c, d) 
TConcat (a, b) c = (a, b, c) 
TConcat a (b, c) = (a, b, c) 
TConcat a b = (a, b)