telescope-0.1.0: Astronomical Observations (FITS, ASDF, WCS, etc)
Safe HaskellSafe-Inferred
LanguageGHC2021

Telescope.Fits.Encoding

Synopsis

Documentation

decode :: forall m. MonadThrow m => ByteString -> m Fits Source #

Decode a FITS file read as a strict ByteString

 decode =<< BS.readFile "samples/simple2x3.fits"

encode :: Fits -> ByteString Source #

Encode a FITS file to a strict ByteString

BS.writeFile $ encdoe fits

runRender :: BuilderBlock -> ByteString Source #

Execute a BuilderBlock and create a bytestring

renderDataKeywords :: BitPix -> Axes Column -> BuilderBlock Source #

Render required keywords for a data array

renderOtherKeywords :: Header -> BuilderBlock Source #

Header contains all other keywords. Filter out any that match system keywords so they aren't rendered twice

fillBlock :: BuilderBlock -> BuilderBlock Source #

Fill out the header or data block to the nearest 2880 bytes

data BuilderBlock Source #

We need a builder that keeps track of its length so we can pad things

Constructors

BuilderBlock 

Fields

builderBlock :: Int -> Builder -> BuilderBlock Source #

Smart constructor, don't allow negative lengths