/
DenitionoftheFlexibleImageTransportSystem(FITS)TheFITSStandardVersion3.0:approved2008July10bytheIAUFWGDocumentpublicationdate:2010November18FITSWorkingGroupCommission5:DocumentationandAstronomicalDataInternationalAstronomicalUnionhttp://fits.gsfc.nasa.go DenitionoftheFlexibleImageTransportSystem(FITS)TheFITSStandardVersion3.0:approved2008July10bytheIAUFWGDocumentpublicationdate:2010November18FITSWorkingGroupCommission5:DocumentationandAstronomicalDataInternationalAstronomicalUnionhttp://fits.gsfc.nasa.go

DenitionoftheFlexibleImageTransportSystem(FITS)TheFITSStandardVersion3.0:approved2008July10bytheIAUFWGDocumentpublicationdate:2010November18FITSWorkingGroupCommission5:DocumentationandAstronomicalDataInternationalAstronomicalUnionhttp://fits.gsfc.nasa.go - PDF document

tatiana-dople
tatiana-dople . @tatiana-dople
Follow
480 views
Uploaded On 2015-07-21

DenitionoftheFlexibleImageTransportSystem(FITS)TheFITSStandardVersion3.0:approved2008July10bytheIAUFWGDocumentpublicationdate:2010November18FITSWorkingGroupCommission5:DocumentationandAstronomicalDataInternationalAstronomicalUnionhttp://fits.gsfc.nasa.go - PPT Presentation

ContentsContentsi1Introduction111BriefhistoryofFITS112Versionhistoryofthisdocument113Acknowledgments ID: 89309

ContentsContentsi1Introduction11.1BriefhistoryofFITS..................................................11.2Versionhistoryofthisdocument............................................11.3Acknowledgments...

Share:

Link:

Embed:

Download Presentation from below link

Download Pdf The PPT/PDF document "DenitionoftheFlexibleImageTransportSyst..." is the property of its rightful owner. Permission is granted to download and print the materials on this web site for personal, non-commercial use only, and to display it on your personal computer provided you do not modify the materials and that you retain all copyright notices contained in the materials. By downloading content from our website, you accept the terms of this agreement.


Presentation Transcript

DenitionoftheFlexibleImageTransportSystem(FITS)TheFITSStandardVersion3.0:approved2008July10bytheIAUFWGDocumentpublicationdate:2010November18FITSWorkingGroupCommission5:DocumentationandAstronomicalDataInternationalAstronomicalUnionhttp://fits.gsfc.nasa.gov/iaufwg/ ContentsContentsi1Introduction11.1BriefhistoryofFITS..................................................11.2Versionhistoryofthisdocument............................................11.3Acknowledgments...................................................22Denitions,acronyms,andsymbols32.1Conventionsusedinthisdocument...........................................32.2Denedterms......................................................33FITSleorganization43.1Overalllestructure..................................................43.2IndividualFITSStructures...............................................43.3Primaryheaderanddataunit..............................................43.3.1Primaryheader.................................................43.3.2Primarydataarray...............................................43.4Extensions........................................................53.4.1Requirementsforconformingextensions...................................53.4.2Standardextensions..............................................53.4.3Orderofextensions...............................................53.5Specialrecords(restricteduse).............................................53.6Physicalblocking....................................................53.6.1Bitstreamdevices................................................53.6.2Sequentialmedia................................................53.7Restrictionsonchanges.................................................64Headers64.1Keywordrecords....................................................64.1.1Syntax.....................................................64.1.2Components..................................................64.2Value..........................................................64.2.1Characterstring.................................................64.2.2Logical.....................................................74.2.3Integernumber.................................................74.2.4Realoating-pointnumber...........................................74.2.5Complexintegernumber............................................74.2.6Complexoating-pointnumber........................................74.3Units...........................................................84.3.1Constructionofunitsstrings..........................................84.3.2Unitsincommentelds............................................84.4Keywords........................................................104.4.1Mandatorykeywords..............................................104.4.2Otherreservedkeywords............................................114.4.3Additionalkeywords..............................................145DataRepresentation145.1Characters........................................................145.2Integers.........................................................145.2.1Eight-bit....................................................145.2.2Sixteen-bit...................................................145.2.3Thirty-two-bit..................................................145.2.4Sixty-four-bit..................................................145.2.5Unsignedintegers................................................145.3IEEE-754oatingpoint.................................................14i 6Randomgroupsstructure146.1Keywords........................................................156.1.1Mandatorykeywords..............................................156.1.2Reservedkeywords...............................................156.2Datasequence......................................................156.3Datarepresentation...................................................167Standardextensions167.1Imageextension.....................................................167.1.1Mandatorykeywords..............................................167.1.2Otherreservedkeywords............................................167.1.3Datasequence.................................................167.2TheASCIItableextension...............................................177.2.1Mandatorykeywords..............................................177.2.2Otherreservedkeywords............................................187.2.3Datasequence.................................................187.2.4Fields......................................................197.2.5Entries.....................................................197.3Binarytableextension.................................................197.3.1Mandatorykeywords..............................................207.3.2Otherreservedkeywords............................................207.3.3DataSequence.................................................227.3.4Datadisplay..................................................247.3.5Variable-lengtharrays.............................................247.3.6Variable-length-arrayguidelines........................................258Worldcoordinatesystems268.1Basicconcepts.....................................................268.2Worldcoordinatesystemrepresentations........................................288.2.1AlternativeWCSaxisdescriptions.......................................288.3Celestialcoordinatesystemrepresentations......................................308.4Spectralcoordinatesystemrepresentations.......................................318.4.1Spectralcoordinatereferenceframes......................................318.5Conventionalcoordinatetypes.............................................33ASyntaxofkeywordrecords34BSuggestedtimescalespecication35CSummaryofkeywords37DASCIItext38EIEEEoating-pointformats38E.1Basicformats......................................................38E.1.1Single......................................................39E.1.2Double.....................................................39E.2Bytepatterns......................................................39FReservedextensiontypenames41F.1Standardextensions...................................................41F.2Conformingextensions.................................................41F.3Othersuggestedextensionnames............................................41GMIMEtypes41G.1MIMEtype`application/fits'...........................................41G.1.1Recommendationsforapplicationwriters...................................42G.2MIMEtype`image/fits'...............................................42G.2.1Recommendationsforapplicationwriters...................................42G.3Fileextensions.....................................................43ii HPastchangesorclaricationstotheformaldenitionofFITS43H.1Di erencesbetweentherequirementsinthisstandardandtherequirementsintheoriginalFITSpapers.......43H.2ListofmodicationtotheFITSstandard,version3..................................43References/Index44ListofTables1SignicantmilestonesinthedevelopmentofFITS...................................22Versionhistoryofthestandard..............................................23IAU-recommendedbasicunits..............................................84Additionalallowedunits.................................................95Prexesformultiplesandsubmultiples.........................................96Charactersandstringsallowedtodenotemathematicaloperations...........................97Mandatorykeywordsforprimaryheader.........................................108InterpretationofvalidBITPIXvalue...........................................109Exampleofaprimaryarrayheader............................................1110Mandatorykeywordsinconformingextensions.....................................1111UsageofBZEROtorepresentnon-defaultintegerdatatypes...............................1412Mandatorykeywordsinprimaryheaderprecedingrandomgroups...........................1513Mandatorykeywordsinimageextensions........................................1614MandatorykeywordsinASCIItableextensions.....................................1715ValidTFORMnformatvaluesinTABLEextensions....................................1716ValidTDISPnformatvaluesinTABLEextensions....................................1817Mandatorykeywordsinbinarytableextensions.....................................2018ValidTFORMndatatypesinBINTABLEextensions....................................2119UsageofTZEROntorepresentnon-defaultintegerdatatypes..............................2220ValidTDISPnformatvaluesinBINTABLEextensions..................................2221WCSandcelestialcoordinatesnotation.........................................2722ReservedWCSkeywords................................................2923Reservedcelestialcoordinatealgorithmcodes......................................3024AllowedvaluesofRADESYSa..............................................3125Reservedspectralcoordinatetypecodes1........................................3226Non-linearspectralalgorithmcodes1..........................................3227Spectralreferencesystems................................................3328Examplekeywordsfora100elementarrayofcomplexvalues.............................3329ConventionalStokesvalues...............................................33C.1MandatoryFITSkeywords................................................37C.2ReservedFITSkeywords.................................................37C.3GeneralreservedFITSkeywords.............................................37D.1ASCIIcharacterset...................................................38E.1Summaryofformatparameters.............................................39E.2IEEEoating-pointformats...............................................40iii iv 1.IntroductionAnarchivalformatmustbeutterlyportableandself-describing,ontheassumptionthat,apartfromthetran-scriptiondevice,neitherthesoftwarenorthehardwarethatwrotethedatawillbeavailablewhenthedataareread.`PreservingScienticDataonourPhysicalUniverse,'p.60.SteeringCommitteefortheStudyontheLong-TermRetentionofSelectedScienticandTechnicalRecordsoftheFederalGovernment,[US]NationalResearchCouncil,NationalAcademyPress1995.Thisdocument,hereafterreferredtoasthe`standard',de-scribestheFlexibleImageTransportSystem(FITS)whichisthestandardarchivaldataformatforastronomicaldatasets.AlthoughFITSwasoriginallydesignedfortransportingimagedataonmagnetictape(whichaccountsforthe`I'and`T'inthename),thecapabilitiesoftheFITSformathaveexpandedtoac-commodatemorecomplexdatastructures.TheroleofFITShasalsogrownfromsimplyawaytotransportdatabetweendi er-entanalysissoftwaresystemsintothepreferredformatfordatainastronomicalarchives,aswellastheon-lineanalysisformatusedbymanysoftwarepackages.ThisstandardisintendedasaformalcodicationoftheFITSformatwhichhasbeenendorsedbytheInternationalAstronomicalUnion(IAU)fortheinterchangeofastronomicaldata(IAU1983).Itisfullyconsistentwithallactionsanden-dorsementsoftheIAUFITSWorkingGroup(IAUFWG)whichwasappointedbyCommission5oftheIAUtooverseefurtherdevelopmentoftheFITSformat.Inparticular,thisstandardde-nestheorganizationandcontentoftheheaderanddataunitsforallstandardFITSdatastructures:theprimaryarray,therandomgroupsstructure,theimageextension,theASCIItableextension,andthebinarytableextension.Italsospeciesminimumstruc-turalrequirementsandgeneralprinciplesgoverningthecreationofnewextensions.Forheaders,itspeciesthepropersyntaxforkeywordrecordsanddenesrequiredandreservedkeywords.Fordata,itspeciescharacterandnumericvaluerepresentationsandtheorderingofcontentswithinthebytestream.OneimportantfeatureoftheFITSformatisthatitsstruc-ture,downtothebitlevel,iscompletelyspeciedindocuments(suchasthisstandard),manyofwhichhavebeenpublishedinrefereedscienticjournals.Giventhesedocuments,whicharereadilyavailableinhardcopyforminlibrariesaroundtheworldaswellasinelectronicformontheInternet,futureresearchersshouldbeabletodecodethestreamofbytesinanyFITSformatdatale.Incontrast,manyothercurrentdataformatsareonlyimplicitlydenedbythesoftwarethatreadsandwritestheles.Ifthatsoftwareisnotcontinuallymaintainedsothatitcanberunonfuturecomputersystems,thentheinformationencodedinthosedatalescouldbelost.1.1.BriefhistoryofFITSTheFITSformatevolvedoutoftherecognitionthatastandardformatwasneededfortransferringastronomicalimagesfromoneresearchinstitutiontoanother.Therstprototypedevel-opmentsofauniversalinterchangeformatthatwouldeventu-allyleadtothedenitionoftheFITSformatbeganin1976be-tweenDonWellsatKPNOandRonHartenattheNetherlandsFoundationforResearchinAstronomy(NFRA).ThisneedforanimageinterchangeformatwasraisedatameetingoftheAstronomysectionoftheU.S.NationalScienceFoundationinJanuary1979,whichledtotheformationofataskforcetoworkontheproblem.MostofthetechnicaldetailsoftherstbasicFITSagreement(withlesconsistingofonlyaprimaryheaderfollowedbyadataarray)weresubsequentlydevelopedbyDonWellsandEricGreisen(NRAO)inMarch1979.Afterfurtherrenements,andsuccessfulimageinterchangetestsbe-tweenobservatoriesthatusedwidelydi erenttypesofcomputersystems,therstpapersthatdenedtheFITSformatwerepub-lishedin1981(Wellsetal.1981;Greisen&Harten1981).TheFITSformatquicklybecamethedefactostandardfordatainter-changewithintheastronomicalcommunity(mostlyon9-trackmagnetictapeatthattime)andwasociallyendorsedbytheIAUin1982(IAU1983).Mostnationalandinternationalas-tronomicalprojectsandorganizationssubsequentlyadoptedtheFITSformatfordistributionandarchivingoftheirscienticdataproducts.SomeofthehighlightsinthedevelopmentalhistoryofFITSareshowninTable1.1.2.VersionhistoryofthisdocumentThefundamentaldenitionoftheFITSformatwasoriginallycontainedinaseriesofpublishedpapers(Wellsetal.1981;Greisen&Harten1981;Grosbøletal.1988;Hartenetal.1988).AsFITSbecamemorewidelyused,theneedforasin-gledocumenttounambiguouslydenetherequirementsoftheFITSformatbecameapparent.In1990,theNASAScienceOceofStandardsandTechnology(NOST)attheGoddardSpaceFlightCenterprovidedfundingforatechnicalpaneltodeveloptherstversionofthisstandarddocument.AsshowninTable2,theNOSTpanelproducedseveraldraftversions,culminatingintherstNOSTstandarddocument,NOST100-1.0,in1993.AlthoughthisdocumentwasdevelopedunderaNASAaccreditationprocess,itwassubsequentlyformallyap-provedbytheIAUFWG,whichistheinternationalcontrolau-thorityfortheFITSformat.Thesmallupdatetothestandardin1995(NOST100-1.1)addedarecommendationonthephysicalunitsofheaderkeywordvalues.TheNOSTtechnicalpanelwasconvenedasecondtimetomakefurtherupdatesandclaricationstothestandard,resultingintheNOST100-2.0versionthatwasapprovedbytheIAUFWGin1999andpublishedin2001(Hanischetal.2001).In2005,theIAUFWGformallyapprovedthevariable-lengtharraycon-ventioninbinarytables,andashorttimelaterapprovedsup-portforthe64-bitintegersdatatype.Newversionsofthestan-dardwerereleasedtoreectbothofthesechanges(versionsIAUFWG2.1andIAUFWG2.1b).Mostrecently,theIAUFWGappointeditsowntechnicalpanelinearly2007toconsiderfurthermodicationsandup-datestothestandard.Thechangesproposedbythispanel,whichwereultimatelyapprovedbytheIAUFWGafteraformalpublicreviewprocess,areshowninthis3.0versionofthedocument.Thelatestversionofthestandard,aswellasotherinfor-mationabouttheFITSformat,canbeobtainedfromtheFITSSupportOcewebsiteathttp://fits.gsfc.nasa.gov.ThiswebsitealsocontainsthecontactinformationfortheChairmanoftheIAUFWG,towhomanyquestionsorcommentsregardingthisstandardshouldbeaddressed.1 Table1.SignicantmilestonesinthedevelopmentofFITS. DateMilestoneSection 1979InitialFITSAgreementandrstinterchangeofles1981Publishedoriginal(singleHDU)denition(Wellsetal.1981)1981Publishedrandomgroupsdenition(Greisen&Harten1981)Sect.61982FormallyendorsedbytheIAU(IAU1983)1988Denedrulesformultipleextensions(Grosbøletal.1988)1988IAUFITSWorkingGroup(IAUFWG)established1988ExtendedtoincludeASCIItableextensions(Hartenetal.1988)Sect.7.21988FormalIAUapprovalofASCIItables(IAU1988)Sect.7.21990ExtendedtoincludeIEEEoating-pointdata(Wells&Grosbøl1990)Sect.5.31994ExtendedtomultipleIMAGEarrayextensions(Ponzetal.1994)Sect.7.11995Extendedtobinarytableextensions(Cottonetal.1995)Sect.7.31997Adopted4-digityeardateformat(Bunclark&Rots1997)Sect.4.4.22002Adoptedconventionsforworldcoordinatesystems(Greisen&Calabretta2002)Sect.82002Adoptedconventionsforcelestialcoordinates(Calabretta&Greisen2002)Sect.8.32004AdoptedMIMEtypesforFITSdatales(Allen&Wells2005)App.G2005Extendedtosupportvariable-lengtharraysinbinarytablesSect.7.3.52005Adoptedconventionsforspectralcoordinatesystems(Greisenetal.2006)Sect.8.42005Extendedtoinclude64-bitintegerdatatypeSect.5.2.4 Table2.Versionhistoryofthestandard. VersionDateStatus NOST100-0.11990DecemberFirstDraftStandardNOST100-0.21991JuneSecondRevisedDraftStandardNOST100-0.31991DecemberThirdRevisedDraftStandardNOST100-1.01993JuneNOSTStandardNOST100-1.11995SeptemberNOSTStandardNOST100-2.01999MarchNOSTStandardIAUFWG2.12005AprilIAUFWGStandardIAUFWG2.1b2005DecemberIAUFWGStandardIAUFWG3.02008JulyIAUFWGStandard 1.3.AcknowledgmentsThemembersofthethreetechnicalpanelsthatproducedthisstandardareshownbelow.Firsttechnicalpanel,1990–1993RobertJ.Hanisch(Chair)SpaceTelescopeScienceInst.LeeE.BrotzmanHughesSTXEdwardKemperHughesSTXBarryM.SchlesingerRaytheonSTXPeterJ.TeubenUniversityofMarylandMichaelE.VanSteenbergNASAGoddardSFCWayneH.WarrenJr.HughesSTXRichardA.WhiteNASAGoddardSFCSecondtechnicalpanel,1994–1999RobertJ.Hanisch(Chair)SpaceTelescopeScienceInst.AllenFarrisSpaceTelescopeScienceInst.EricW.GreisenNationalRadioAstr.Obs.WilliamD.PenceNASAGoddardSFCBarryM.SchlesingerRaytheonSTXPeterJ.TeubenUniversityofMarylandRandallW.ThompsonComputerSciencesCorp.ArchibaldWarnockA/WWWEnterprisesThirdtechnicalpanel,2007WilliamD.Pence(Chair)NASAGoddardSFCLucioChiappettiIASFMilano,INAF,ItalyCliveG.PageUniversityofLeicester,UKRichardShawNationalOpticalAstr.Obs.ElizabethStobieUniversityofArizona2 2.Denitions,acronyms,andsymbols2.1.ConventionsusedinthisdocumentTermsorletterssetinCourierfontrepresentliteralstringsthatappearinFITSles.Inthecaseofkeywordnames,suchas`NAXISn',thelowercaseletterrepresentsapositiveintegerindexnumber,generallyintherange1to999.Theemphasizedwordsmust,shall,should,may,recommended,andoptionalinthisdocumentaretobeinterpretedasdescribedinIETFstan-dard,RFC2119(Bradner1997).2.2.Denedterms UsedtodesignateanASCIIspacecharacter.ANSIAmericanNationalStandardsInstitute.ArrayAsequenceofdatavalues.Thissequencecorrespondstotheelementsinarectilinear,n-dimensionmatrix(1n999,orn=0inthecaseofanullarray).ArrayvalueThevalueofanelementofanarrayinaFITSle,withouttheapplicationoftheassociatedlineartransforma-tiontoderivethephysicalvalue.ASCIIAmericanNationalStandardCodeforInformationInterchange.ASCIIcharacterAnymemberofthe7-bitASCIIcharacterset.ASCIIdigitOneofthetenASCIIcharacters`0'through`9'whicharerepresentedbydecimalcharactercodes48through57(hexadecimal30through39).ASCIINULLTheASCIIcharacterthathasalleightbitssettozero.ASCIIspaceTheASCIIcharacterforspacewhichisrepre-sentedbydecimal32(hexadecimal20).ASCIItextTherestrictedsetofASCIIcharactersdecimal32through126(hexadecimal20through7E).BasicFITSTheFITSstructureconsistingoftheprimaryheaderfollowedbyasingleprimarydataarray.ThisisalsoknownasSingleImageFITS(SIF),asopposedtoMulti-ExtensionFITS(MEF)lesthatcontainoneormoreexten-sionsfollowingtheprimaryHDU.BigendianThenumericaldataformatusedinFITSlesinwhichthemostsignicantbyteofthevalueisstoredrstfollowedbytheremainingbytesinorderofsignicance.BitAsinglebinarydigit.ByteAnorderedsequenceofeightconsecutivebitstreatedasasingleentity.CardimageAnobsoletetermforan80-characterkeywordrecordderivedfromthe80-columnpunchedcomputercardsthatwereprevalentinthe1960sand1970s.CharacterstringAsequenceofoneormoreoftherestrictedsetofASCIItextcharacters,decimal32through126(hex-adecimal20through7E).ConformingextensionAnextensionwhosekeywordsandor-ganizationadheretotherequirementsforconformingexten-sionsdenedinSect.3.4.1ofthisstandard.DatablockA2880-byteFITSblockcontainingdatadescribedbythekeywordsintheassociatedheaderofthatHDU.DeprecateToexpressdisapprovalof.ThistermisusedtorefertoobsoletestructuresthatshouldnotbeusedinnewFITSlesbutwhichshallremainvalidindenitely.EntryAsinglevalueinanASCIItableorbinarytablestandardextension.ExtensionAFITSHDUappearingaftertheprimaryHDUinaFITSle.ExtensiontypenameThevalueoftheXTENSIONkeyword,usedtoidentifythetypeoftheextension.FieldAcomponentofalargerentity,suchasakeywordrecordorarowofanASCIItableorbinarytablestandardextension.Aeldinatableextensionrowconsistsofasetofzeroormoretableentriescollectivelydescribedbyasingleformat.FileAsequenceofoneormorerecordsterminatedbyanend-of-leindicatorappropriatetothemedium.FITSFlexibleImageTransportSystem.FITSblockAsequenceof28808-bitbytesalignedon2880byteboundariesintheFITSle,mostcommonlyeitheraheaderblockoradatablock.Specialrecordsareanotherin-frequentlyusedtypeofFITSblock.ThisblocklengthwaschosenbecauseitisevenlydivisiblebythebyteandwordlengthsofallknowncomputersystemsatthetimeFITSwasdevelopedin1979.FITSleAlewithaformatthatconformstothespecicationsinthisdocument.FITSstructureOneofthecomponentsofaFITSle:thepri-maryHDU,therandomgroupsrecords,anextension,or,col-lectively,thespecialrecordsfollowingthelastextension.FITSSupportOceTheFITSinformationwebsitethatismaintainedbytheIAUFWGandiscurrentlyhostedathttp://fits.gsfc.nasa.gov.FloatingpointAcomputerrepresentationofarealnumber.FractionTheeldofthemantissa(orsignicand)ofaoating-pointnumberthatliestotherightofitsimpliedbinarypoint.GroupparametervalueThevalueofoneoftheparametersprecedingagroupintherandomgroupsstructure,withouttheapplicationoftheassociatedlineartransformation.HDUHeaderandDataUnit.Adatastructureconsistingofaheaderandthedatatheheaderdescribes.NotethatanHDUmayconsistentirelyofaheaderwithnodatablocks.HeaderAseriesofkeywordrecordsorganizedwithinoneormoreheaderblocksthatdescribesstructuresand/ordatawhichfollowitintheFITSle.HeaderblockA2880-byteFITSblockcontainingasequenceofthirty-six80-characterkeywordrecords.HeapThesupplementaldataareafollowingthemaindatatableinabinarytablestandardextension.IAUInternationalAstronomicalUnion.IAUFWGInternationalAstronomicalUnionFITSWorkingGroup.IEEEInstituteofElectricalandElectronicEngineers.IEEENaNIEEENot-a-Numbervalue;usedtorepresentunde-nedoating-pointvaluesinFITSarraysandbinarytables.IEEEspecialvaluesFloating-pointnumberbytepatternsthathaveaspecial,reservedmeaning,suchas0,1,underow,overow,denormalized,NaN.(SeeAppendixE).IndexedkeywordAkeywordnamethatisoftheformofaxedrootwithanappendedpositiveintegerindexnumber.KeywordnameThersteightbytesofakeywordrecordwhichcontaintheASCIInameofametadataquantity(unlessitisblank).KeywordrecordAn80-characterrecordinaheaderblockcon-sistingofakeywordnameinthersteightcharactersfol-lowedbyanoptionalvalueindicator,valueandcommentstring.Thekeywordrecordshallbecomposedonlyofthe3 restrictedsetofASCIItextcharactersrangingfromdecimal32to126(hexadecimal20to7E).MandatorykeywordAkeywordthatmustbeusedinallFITSlesorakeywordrequiredinconjunctionwithparticularFITSstructures.MantissaAlsoknownassignicand.ThecomponentofanIEEEoating-pointnumberconsistingofanexplicitorim-plicitleadingbittotheleftofitsimpliedbinarypointandafractioneldtotheright.MEFMulti-ExtensionFITS,i.e.,aFITSlecontainingapri-maryHDUfollowedbyoneormoreextensionHDUs.NOSTNASA/ScienceOceofStandardsandTechnology.PhysicalvalueThevalueinphysicalunitsrepresentedbyanelementofanarrayandpossiblyderivedfromthearrayvalueusingtheassociated,butoptional,lineartransformation.PixelShortfor`Pictureelement';asinglelocationwithinanarray.PrimarydataarrayThedataarraycontainedintheprimaryHDU.PrimaryHDUTherstHDUinaFITSle.PrimaryheaderTherstheaderinaFITSle,containingin-formationontheoverallcontentsofthele(aswellasontheprimarydataarray,ifpresent).RandomGroupAFITSstructureconsistingofacollectionof`groups',whereagroupconsistsofasubarrayofdataandasetofassociatedparametervalues.Randomgroupsaredep-recatedforanyuseotherthanforradiointerferometrydata.RecordAsequenceofbitstreatedasasinglelogicalentity.RepeatcountThenumberofvaluesrepresentedinaeldinabinarytablestandardextension.ReservedkeywordAnoptionalkeywordthatmustbeusedonlyinthemannerdenedinthisstandard.SIFSingleImageFITS,i.e.,aFITSlecontainingonlyapri-maryHDU,withoutanyextensionHDUs.AlsoknownasBasicFITS.SpecialrecordsAseriesofoneormoreFITSblocksfollowingthelastHDUwhoseinternalstructuredoesnototherwiseconformtothatfortheprimaryHDUortothatspeciedforaconformingextensioninthisstandard.Anyuseofspe-cialrecordsrequiresapprovalfromtheIAUFITSWorkingGroup.StandardextensionAconformingextensionwhoseheaderanddatacontentarecompletelyspeciedinSect.7ofthisstan-dard,namely,animageextension,anASCIItableextension,orabinarytableextension.3.FITSleorganization3.1.OveralllestructureAFITSleshallbecomposedofthefollowingFITSstructures,intheorderlisted:–Primaryheaderanddataunit(HDU).–ConformingExtensions(optional).–Otherspecialrecords(optional,restricted).AFITSlecomposedofonlytheprimaryHDUissometimesreferredtoasaBasicFITSle,oraSingleImageFITS(SIF)le,andaFITSlecontainingoneormoreextensionsfollowingtheprimaryHDUissometimesreferredtoasaMulti-ExtensionFITS(MEF)le.EachFITSstructureshallconsistofanintegralnumberofFITSblockswhichareeach2880bytes(23040bits)inlength.TheprimaryHDUshallstartwiththerstFITSblockoftheFITSle.TherstFITSblockofeachsubsequentFITSstruc-tureshallbetheFITSblockimmediatelyfollowingthelastFITSblockoftheprecedingFITSstructure.ThisstandarddoesnotimposealimitonthetotalsizeofaFITSle,noronthesizeofanindividualHDUwithinaFITSle.Softwarepackagesthatreadorwritedataaccordingtothisstandardcouldbelimited,however,inthesizeoflesthataresupported.Inparticular,somesoftwaresystemshavehistoricallyonlysupportedlesupto231bytesinsize(approximately2:1109bytes).3.2.IndividualFITSStructuresTheprimaryHDUandeveryextensionHDUshallconsistofoneormore2880-byteheaderblocksimmediatelyfollowedbyanoptionalsequenceofassociated2880-bytedatablocks.TheheaderblocksshallcontainonlytherestrictedsetofASCIItextcharacters,decimal32through126(hexadecimal20through7E).TheASCIIcontrolcharacterswithdecimalvalueslessthan32(includingthenull,tab,carriagereturn,andlinefeedcharac-ters),andthedeletecharacter(decimal127orhexadecimal7F)mustnotappearanywherewithinaheaderblock.3.3.PrimaryheaderanddataunitTherstcomponentofaFITSleshallbetheprimaryHDUwhichalwayscontainstheprimaryheaderandmaybefollowedbytheprimarydataarray.Iftheprimarydataarrayhaszerolength,asdeterminedbythevaluesoftheNAXISandNAXISnkeywordsintheprimaryheader(Sect.4.4.1),thentheprimaryHDUshallcontainnodatablocks.3.3.1.PrimaryheaderTheheaderofaprimaryHDUshallconsistofoneormoreheaderblocks,eachcontainingaseriesof80-characterkeywordrecordscontainingonlytherestrictedsetofASCIItextcharac-ters.Each2880-byteheaderblockcontains36keywordrecords.ThelastheaderblockmustcontaintheENDkeyword(denedinSect.4.4.1)whichmarksthelogicalendoftheheader.Keywordrecordswithoutinformation(e.g.,followingtheENDkeyword)shallbelledwithASCIIspaces(decimal32orhexadecimal20).3.3.2.PrimarydataarrayTheprimarydataarray,ifpresent,shallconsistofasingledataarraywithfrom1to999dimensions(asspeciedbytheNAXISkeyworddenedinSect.4.4.1).TherandomgroupsconventionintheprimarydataarrayisamorecomplicatedstructureandisdiscussedseparatelyinSect.6.Theentirearrayofdataval-uesarerepresentedbyacontinuousstreamofbitsstartingwiththerstbitoftherstdatablock.Eachdatavalueshallcon-sistofaxednumberofbitsthatisdeterminedbythevalueoftheBITPIXkeyword(Sect.4.4.1).Arraysofmorethanonedi-mensionshallconsistofasequencesuchthattheindexalongaxis1variesmostrapidly,thatalongaxis2nextmostrapidly,andthosealongsubsequentaxesprogressivelylessrapidly,with4 A(1,1,...,1),A(2,1,...,1),:::,A(NAXIS1,1,...,1),A(1,2,...,1),A(2,2,...,1),:::,A(NAXIS1,2,...,1),:::,A(1,NAXIS2,...,NAXISm),:::,A(NAXIS1,NAXIS2,...,NAXISm)Fig.1.Arraysofmorethanonedimensionshallconsistofase-quencesuchthattheindexalongaxis1variesmostrapidlyandthosealongsubsequentaxesprogressivelylessrapidly.thatalongaxism,wheremisthevalueofNAXIS,varyingleastrapidly.Thereisnospaceoranyotherspecialcharacterbetweenthelastvalueonaroworplaneandtherstvalueonthenextroworplaneofamulti-dimensionalarray.Exceptfortheloca-tionoftherstelement,thearraystructureisindependentoftheFITSblockstructure.ThisstorageorderisshownschematicallyinFig.1andisthesameorderasinmulti-dimensionalarraysintheFortranprogramminglanguage(ISO2004).Theindexcountalongeachaxisshallbeginwith1andincrementby1uptothevalueoftheNAXISnkeyword(Sect.4.4.1).Ifthedataarraydoesnotllthenaldatablock,theremain-derofthedatablockshallbelledbysettingallbitstozero.Theindividualdatavaluesshallbestoredinbig-endianbyteor-dersuchthatthebytecontainingthemostsignicantbitsofthevalueappearsrstintheFITSle,followedbytheremainingbytes,ifany,indecreasingorderofsignicance.3.4.Extensions3.4.1.RequirementsforconformingextensionsAllextensions,whetherornotfurtherdescribedinthisstandard,shallfulllthefollowingrequirementstobeinconformancewiththisFITSstandard.Newextensiontypesshouldbecreatedonlywhentheorganizationoftheinformationissuchthatitcan-notbehandledbyoneoftheexistingextensiontypes.AFITSlethatcontainsextensionsiscommonlyreferredtoasamulti-extensionFITS(MEF)le.3.4.1.1.IdentityEachextensiontypeshallhaveauniquetypename,speci-edintheheaderbytheXTENSIONkeyword(Sect.4.4.1).Toprecludeconict,extensiontypenamesmustberegisteredwiththeIAUFWG.ThecurrentlistofregisteredextensionsisgiveninAppendixF.Anup-to-datelistisalsomaintainedontheFITSSupportOcewebsite.3.4.1.2.SizespecicationThetotalnumberofbitsinthedataofeachextensionshallbespeciedintheheaderforthatextension,inthemannerprescribedinSect.4.4.1.3.4.2.StandardextensionsAstandardextensionisaconformingextensionwhoseorgani-zationandcontentarecompletelyspeciedinSect.7ofthisstandard.Onlyoneextensionformatshallbeapprovedforeachtypeofdataorganization.3.4.3.OrderofextensionsAnextensionmayfollowtheprimaryHDUoranotherconform-ingextension.Standardextensionsandotherconformingexten-sionsmayappearinanyorderinaFITSle.3.5.Specialrecords(restricteduse)Specialrecordsare2880-byteFITSblocksfollowingthelastHDUoftheFITSlethathaveanunspeciedstructurethatdoesnotmeettherequirementsofaconformingextension.Therst8bytesofthespecialrecordsmustnotcontainthestring`XTENSION'.Itisrecommendedthattheydonotcontainthestring`SIMPLE '.Thecontentsofspecialrecordsarenototh-erwisespeciedbythisstandard.SpecialrecordswereoriginallydesignedasawayfortheFITSformattoevolvebyallowingnewFITSstructurestobeimplemented.Followingthedevelopmentofconformingexten-sions,whichprovideageneralmechanismforstoringdi erenttypesofdatastructuresinFITSformatinawelldenedmanner,theneedforothernewtypesofFITSdatastructureshasbeengreatlyreduced.Consequently,furtheruseofspecialrecordsisrestrictedandrequirestheapprovaloftheIAUFITSWorkingGroup.3.6.Physicalblocking3.6.1.BitstreamdevicesForbitstreamdevices,includingbutnotrestrictedtologicallesystems,FITSlesshallbeinterpretedasasequenceofoneormore2880-byteFITSblocks,regardlessofthephysicalblock-ingstructureoftheunderlyingrecordingmedia.WhenwritingaFITSleonmediawithaphysicalblocksizeunequaltothe2880-byteFITSblocklength,anybytesremaininginthelastphysicalblockfollowingtheendoftheFITSleshouldbesettozero.Similarly,whenreadingFITSlesonsuchmedia,anybytesremaininginthelastphysicalblockfollowingtheendoftheFITSleshallbedisregarded.3.6.2.SequentialmediaTheFITSformatwasoriginallydevelopedforwritinglesonsequentialmagnetictapedevices.Thefollowingrulesonhowtowritetosequentialmedia(Grosbøl&Wells1994)arenowirrelevanttomostcurrentdatastoragedevices.Ifphysicallypossible,FITSlesshallbewrittenonsequen-tialmediainblocksthatarefromonetotenintegermultiplesof2880-bytesinlength.Ifthisisnotpossible,theFITSleshallbewrittenasabitstreamusingthenativeblocksizeofthesequen-5 tialdevice.AnybytesremaininginthelastblockfollowingtheendoftheFITSleshallbesettozero.WhenreadingFITSlesonsequentialmedia,anylesshorterthan2880bytesinlength(e.g.,ANSItapelabels)arenotconsideredpartoftheFITSlesandshouldbedisregarded.3.7.RestrictionsonchangesAnystructurethatisavalidFITSstructureshallremainavalidFITSstructureatallfuturetimes.UseofcertainvalidFITSstruc-turesmaybedeprecatedbythisorfutureFITSstandarddocu-ments.4.HeadersThersttwosectionsofthischapterdenethestructureandcon-tentofheaderkeywordrecords.ThisisfollowedinSect.4.3withrecommendationsonhowphysicalunitsshouldbeexpressed.Thenalsectiondenesthemandatoryandreservedkeywordsforprimaryarraysandconformingextensions.4.1.Keywordrecords4.1.1.SyntaxEach80-characterheaderkeywordrecordshallconsistofakey-wordname,avalueindicator(onlyrequiredifavalueispresent),anoptionalvalue,andanoptionalcomment.Keywordsmayap-pearinanyorderexceptwherespecicallystatedotherwiseinthisstandard.ItisrecommendedthattheorderofthekeywordsinFITSlesbepreservedduringdataprocessingoperationsbecausethedesignersoftheFITSlemayhaveusedconven-tionsthatattachparticularsignicancetotheorderofcertainkeywords(e.g.,bygroupingsequencesofCOMMENTkeywordsatspeciclocationsintheheader,orappendingHISTORYkey-wordsinchronologicalorderofthedataprocessingsteps).Aformalsyntax,givingacompletedenitionofthesyntaxofFITSkeywordrecords,isgiveninAppendixA.Itisintendedasanaidininterpretingthetextdeningthestandard.4.1.2.Components4.1.2.1.Keywordname(bytes1through8)Thekeywordnameshallbealeftjustied,8-character,space-lled,ASCIIstringwithnoembeddedspaces.Alldigits0through9(decimalASCIIcodes48to57,orhexadecimal30to39)anduppercaseLatinalphabeticcharacters`A'through`Z'(decimal65to90orhexadecimal41to5A)arepermitted;lowercasecharactersshallnotbeused.Theunderscore(` ',decimal95orhexadecimal5F)andhyphen(`-',decimal45orhexadecimal2D)arealsopermitted.Noothercharactersarepermitted.1Forindexedkeywordnamesthathaveasinglepositiveintegerindexcounterappendedtotherootname,thecountershallnothaveleadingzeroes(e.g.,NAXIS1,notNAXIS001).Notethatkeywordnamesthatbeginwith(orconsistsolelyof)anycombinationofhyphens,underscores,anddigitsarelegal. 1Thisrequirementdi ersfromthewordingintheoriginalFITSpa-pers.SeeAppendixH.4.1.2.2.Valueindicator(bytes9and10)IfthetwoASCIIcharacters`= '(decimal61followedbydecimal32)arepresentinbytes9and10ofthekeywordrecordthisindicatesthatthekeywordhasavalueeldasso-ciatedwithit,unlessitisoneofthecommentarykeywordsdenedinSect.4.4.2(i.e.,aHISTORY,COMMENT,orcompletelyblankkeywordname)whichbydenitionhavenovalue.4.1.2.3.Value/comment(bytes11through80)Inkeywordrecordsthatcontainthevalueindicatorinbytes9and10,theremainingbytes11through80oftherecordshallcontainthevalue,ifany,ofthekeyword,followedbyoptionalcomments.Inkeywordrecordswithoutavalueindicator,bytes9through80shouldbeinterpretedascommentarytext,however,thisdoesnotprecludeconventionsthatinterpretthecontentofthesebytesinotherways.Thevalueeld,whenpresent,shallcontaintheASCIItextrepresentationofaliteralstringconstant,alogicalconstant,oranumericalconstant,intheformatspeciedinSect.4.2.Thevalueeldmaybeanulleld;i.e.,itmayconsistentirelyofspaces,inwhichcasethevalueassociatedwiththekeywordisundened.ThemandatoryFITSkeywordsdenedinthisstandardmustnotappearmorethanoncewithinaheader.Allotherkeywordsthathaveavalueshouldnotappearmorethanonce.Ifakeyworddoesappearmultipletimeswithdi erentvalues,thenthevalueisindeterminate.Ifacommentfollowsthevalueeld,itmustbeprecededbyaslash(`/',decimal47orhexadecimal2F).1Aspacebe-tweenthevalueandtheslashisstronglyrecommended.ThecommentmaycontainanyoftherestrictedsetofASCIItextcharacters,decimal32through126(hexadecimal20through7E).TheASCIIcontrolcharacterswithdecimalvalueslessthan32(includingthenull,tab,carriagereturn,andlinefeedcharac-ters),andthedeletecharacter(decimal127orhexadecimal7F)mustnotappearanywherewithinakeywordrecord.4.2.ValueThestructureofthevalueelddependsonthedatatypeofthevalue.Thevalueeldrepresentsasinglevalueandnotanarrayofvalues.1Thevalueeldmustbeinoneoftwoformats:xedorfree.Thexed-formatisrequiredforvaluesofmandatorykeywordsandisrecommendedforvaluesofallotherkeywords.4.2.1.CharacterstringAcharacterstringvalueshallbecomposedonlyofthesetofrestrictedASCIItextcharacters,decimal32through126(hex-adecimal20through7E)enclosedbysinglequotecharacters(“'”,decimal39,hexadecimal27).Asinglequoteisrepresentedwithinastringastwosuccessivesinglequotes,e.g.,O'HARA='O''HARA'.Leadingspacesaresignicant;trailingspacesarenot.Thisstandardimposesnorequirementsonthecasesensi-tivityofcharacterstringvaluesunlessexplicitlystatedinthedenitionofspecickeywords.Ifthevalueisaxed-formatcharacterstring,thestartingsinglequotecharactermustbeinbyte11ofthekeywordrecordandtheclosingsinglequotemustoccurinorbeforebyte80.6 Earlierversionsofthisstandardalsorequiredthatxed-formatcharactersstringsmustbepaddedwithspacecharacterstoatleastalengthofeightcharacterssothattheclosingquotechar-acterdoesnotoccurbeforebyte20.Thisminimumcharacterstringlengthisnolongerrequired,exceptforthevalueoftheXTENSIONkeyword(e.g.,'IMAGE 'and'TABLE ';seeSect.7)whichmustbepaddedtoalengthofeightcharactersforbackwardcompatibilitywithprevioususage.Free-formatcharacterstringsfollowthesamerulesasxed-formatcharacterstringsexceptthatthestartingsinglequotecharactermayoccurafterbyte11.Anybytesprecedingthestart-ingquotecharacterandafterbyte10mustcontainthespacechar-acter.Notethatthereisasubtledistinctionbetweenthefollowingthreekeywords:KEYWORD1=''/nullstringkeywordKEYWORD2=''/emptystringkeywordKEYWORD3=/undefinedkeywordThevalueofKEYWORD1isanull,orzerolengthstringwhereasthevalueoftheKEYWORD2isanemptystring(nominallyasinglespacecharacterbecausetherstspaceinthestringissignicant,buttrailingspacesarenot).ThevalueofKEYWORD3isundenedandhasanindeterminatedatatypeaswell,exceptincaseswherethedatatypeofthespeciedkeywordisexplicitlydenedinthisstandard.Themaximumpossiblelengthofakeywordstringis68char-acters(withtheopeningandclosingquotecharactersinbytes11and80,respectively).Ingeneral,nolengthlimitlessthan68isimpliedforcharacter-valuedkeywords.4.2.2.LogicalIfthevalueisaxed-formatlogicalconstant,itshallappearasanuppercaseTorFinbyte30.Alogicalvalueisrepresentedinfree-formatbyasinglecharacterconsistingofanuppercaseTorFastherstnon-spacecharacterinbytes11through80.4.2.3.IntegernumberIfthevalueisaxed-formatinteger,theASCIIrepresentationshallberight-justiedinbytes11through30.Anintegercon-sistsofa`+'(decimal43orhexadecimal2B)or`'(decimal45orhexadecimal2D)sign,followedbyoneormorecontiguousASCIIdigits(decimal48to57orhexadecimal30to39),withnoembeddedspaces.Theleading`+'signisoptional.Leadingzerosarepermitted,butarenotsignicant.Theintegerrepresen-tationshallalwaysbeinterpretedasasigned,decimalnumber.Thisstandarddoesnotlimittherangeofanintegerkeywordvalue,however,softwarepackagesthatreadorwritedataac-cordingtothisstandardcouldbelimitedintherangeofvaluesthataresupported(e.g.,totherangethatcanberepresentedbya32-bitor64-bitsignedbinaryinteger).Afree-formatintegervaluefollowsthesamerulesasxed-formatintegersexceptthattheASCIIrepresentationmayoccuranywherewithinbytes11through80.4.2.4.Realoating-pointnumberIfthevalueisaxed-formatrealoating-pointnumber,theASCIIrepresentationshallberight-justiedinbytes11through30.Aoating-pointnumberisrepresentedbyadecimalnumberfollowedbyanoptionalexponent,withnoembeddedspaces.Adecimalnumbershallconsistofa`+'(decimal43orhex-adecimal2B)or`–'(decimal45orhexadecimal2D)sign,fol-lowedbyasequenceofASCIIdigitscontainingasingledecimalpoint(`.'),representinganintegerpartandafractionalpartoftheoating-pointnumber.Theleading`+'signisoptional.Atleastoneoftheintegerpartorfractionalpartmustbepresent.Ifthefractionalpartispresent,thedecimalpointmustalsobepresent.Ifonlytheintegerpartispresent,thedecimalpointmaybeomitted,inwhichcasetheoating-pointnumberisindistin-guishablefromaninteger.Theexponent,ifpresent,consistsofanexponentletterfollowedbyaninteger.Lettersintheexponen-tialform(`E'or`D')2shallbeuppercase.Thefullprecisionof64-bitvaluescannotbeexpressedoverthewholerangeofvaluesusingthexed-format.Thisstandarddoesnotimposeanupperlimitonthenumberofdigitsofprecision,noranylimitontherangeofoating-pointkeywordvalues.Softwarepackagesthatreadorwritedataaccordingtothisstandardcouldbelimited,however,intherangeofvaluesandexponentsthataresupported(e.g.,totherangethatcanberepresentedbya32-bitor64-bitoating-pointnumber).Afree-formatoating-pointvaluefollowsthesamerulesasaxed-formatoating-pointvalueexceptthattheASCIIrepre-sentationmayoccuranywherewithinbytes11through80.4.2.5.ComplexintegernumberThereisnoxed-formatforcomplexintegernumbers.3Ifthevalueisacomplexintegernumber,thevaluemustberepresentedasarealpartandanimaginarypart,separatedbyacommaandenclosedinparenthesese.g.,(123,45).Spacesmayprecedeandfollowtherealandimaginaryparts.Therealandimaginarypartsarerepresentedinthesamewayasintegers(Sect.4.2.3).Sucharepresentationisregardedasasinglevalueforthecomplexintegernumber.Thisrepresentationmaybelo-catedanywherewithinbytes11through80.4.2.6.Complexoating-pointnumberThereisnoxed-formatforcomplexoating-pointnumbers.3Ifthevalueisacomplexoating-pointnumber,thevaluemustberepresentedasarealpartandanimaginarypart,sepa-ratedbyacommaandenclosedinparentheses,e.g.,(123.23,-45.7).Spacesmayprecedeandfollowtherealandimaginaryparts.Therealandimaginarypartsarerepresentedinthesamewayasoating-pointvalues(Sect.4.2.4).Sucharepresenta-tionisregardedasasinglevalueforthecomplexoating-pointnumber.Thisrepresentationmaybelocatedanywherewithinbytes11through80. 2The`D'exponentformistraditionallyusedwhenrepresentingval-uesthathavemoredecimalsofprecisionoralargermagnitudethancanberepresentedbyasingleprecision32-bitoating-pointnumber,butotherwisethereisnodistinctionbetween`E'or`D'.3Thisrequirementdi ersfromthewordingintheoriginalFITSpa-pers.SeeAppendixH.7 Table3.IAU-recommendedbasicunits. QuantityUnitMeaningNotes SIbase&supplementaryunitslengthmmetermasskgkilogramggramallowedtimessecondplaneangleradradiansolidanglesrsteradiantemperatureKkelvinelectriccurrentAampereamountofsubstancemolmoleluminousintensitycdcandelaIAU-recognizedderivedunitsfrequencyHzhertzs1energyJjouleNmpowerWwattJs1electricpotentialVvoltJC1forceNnewtonkgms2pressure,stressPapascalNm2electricchargeCcoulombAselectricresistanceOhmohmVA1electricconductanceSsiemensAV1electriccapacitanceFfaradCV1magneticuxWbweberVsmagneticuxdensityTteslaWbm2inductanceHhenryWbA1luminousuxlmlumencdsrilluminancelxluxlmm2 4.3.UnitsWhenanumericalkeywordvaluerepresentsaphysicalquantity,itisrecommendedthatunitsbeprovided.Unitsshallberep-resentedwithastringofcharacterscomposedoftherestrictedASCIItextcharacterset.Unitstringscanbeusedasvaluesofkeywords(e.g.,forthereservedkeywordsBUNIT,andTUNITn),asanentryinacharacterstringcolumnofanASCIIorbinaryta-bleextension,oraspartofakeywordcommentstring(seeSect.4.3.2,below).TheunitsofallFITSheaderkeywordvalues,withtheexcep-tionofmeasurementsofangles,shouldconformwiththerec-ommendationsintheIAUStyleManual(McNally1988).Forangularmeasurementsgivenasoating-pointvaluesandspec-iedwithreservedkeywords,theunitsshouldbedegrees(i.e.,deg).Ifarequirementexistswithinthisstandardfortheunitsofakeyword,thenthoseunitsmustbeused.TheunitsforfundamentalphysicalquantitiesrecommendedbytheIAUaregiveninTable3,andadditionalunitsthatarecommonlyusedinastronomyaregiveninTable4.Therecom-mendedplaintextformfortheIAU-recognizedbaseunitsaregivenincolumn2ofbothtables.4Allbaseunitsstringsmaybepreceded,withnointerveningspaces,byasinglecharacter(twofordeca)takenfromTable5andrepresentingscalefactorsmostlyinstepsof103.Compoundprexes(e.g.,ZYeVfor1045eV)mustnotbeused. 4Thesetablesarereproducedfromtherstinaseriesofpapersonworldcoordinatesystems(Greisen&Calabretta2002),whichprovidesexamplesandexpandeddiscussion.4.3.1.ConstructionofunitsstringsCompoundunitsstringsmaybeformedbycombiningstringsofbaseunits(includingprexes,ifany)withtherecommendedsyntaxdescribedinTable6.Twoormorebaseunitsstrings(calledstr1andstr2inTable6)maybecombinedusingtherestrictedsetof(explicitorimplicit)operatorsthatprovideformultiplication,division,exponentiation,raisingargumentstopowers,ortakingthelogarithmorsquare-rootofanargument.Notethatfunctionssuchaslogactuallyrequiredimension-lessarguments,sothatlog(Hz),forexample,actuallymeanslog(x/1Hz).Thenalunitsstringisthecompoundstring,oracompoundofcompounds,precededbyanoptionalnumericmultiplieroftheform10**k,10ˆk,or10kwherekisaninte-ger,optionallysurroundedbyparentheseswiththesigncharacterrequiredinthethirdformintheabsenceofparentheses.CreatorsofFITSlesareencouragedtousethenumericmultiplieronlywhentheavailablestandardscalefactorsofTable5willnotsuf-ce.Parenthesesareusedforsymbolgroupingandarestronglyrecommendedwhenevertheorderofoperationsmightbesub-jecttomisinterpretation.Aspacecharacterimpliesmultiplica-tionwhichcanalsobeconveyedexplicitlywithanasteriskoraperiod.Therefore,althoughspacesareallowedassymbolsepa-rators,theiruseisdiscouraged.Notethat,perIAUconvention,caseissignicantthroughout.TheIAUstylemanualforbidstheuseofmorethanoneslash(`/')characterinaunitsstring.However,sincenormalmathematicalprecedencerulesapplyinthiscontext,morethanoneslashmaybeusedbutisdiscouraged.Aunitraisedtoapowerisindicatedbytheunitstringfol-lowed,withnointerveningspaces,bytheoptionalsymbols**or^followedbythepowergivenasanumericexpression,calledexprinTable6.Thepowermaybeasimpleinteger,withorwithoutsign,optionallysurroundedbyparentheses.Itmayalsobeadecimalnumber(e.g.,1.5,0.5)oraratiooftwointegers(e.g.,7/9),withorwithoutsign,whichmustbesurroundedbyparentheses.Thusmeterssquaredmaybeindicatedbym**(2),m**+2,m+2,m2,m^2,m^(+2),etc.andpermetercubedmaybeindicatedbym**-3,m-3,m^(-3),/m3,andsoforth.Meterstothethree-halvespowermaybeindicatedbym(1.5),m^(1.5),m**(1.5),m(3/2),m**(3/2),andm^(3/2),butnotbym^3/2orm1.5.4.3.2.UnitsincommenteldsIftheunitsofthekeywordvaluearespeciedinthecommentoftheheaderkeyword,itisrecommendedthattheunitsstringbeenclosedinsquarebrackets(i.e.,enclosedby`['and`]')atthebeginningofthecommenteld,separatedfromtheslash(`/')commentelddelimiterbyasinglespacecharacter.Anexam-ple,usinganon-standardkeyword,isEXPTIME=1200./[s]exposuretimeinsecondsThiswidespread,butoptional,practicesuggeststhatsquarebracketsshouldbeusedincommenteldsonlyforthispur-pose.Nonetheless,softwareshouldnotdependonunitsbeingexpressedinthisfashionwithinakeywordcomment,andsoft-wareshouldnotdependonanystringwithinsquarebracketsinacommenteldcontainingaproperunitsstring.8 Table4.Additionalallowedunits. QuantityUnitMeaningNotes planeangledegdegreeofarc=180radarcminminuteofarc1=60degarcsecsecondofarc1=3600degmasmilli-secondofarc1=3600000degtimeminminute60shhour60min=3600sdday86400syayear(Julian)31557600s(365.25d),petaa(Pa)forbiddenyyryear(Julian)aisIAU-styleenergyyeVelectronvolt1:60217651019Jzergerg107JRyrydberg1 22e2 hc2mec2=13:605692eVmasssolMasssolarmass1:98911030kguuniedatomicmassunit1:66053871027kgluminositysolLumSolarluminosity3:82681026WlengthzAngstromangstrom1010msolRadSolarradius6:9599108mAUastronomicalunit1:495981011mlyrlightyear9:4607301015mypcparsec3:08571016meventscountcountctcountphotonphotonphphotonuxdensityyJyjansky1026Wm2Hz1ymag(stellar)magnitudeyRrayleigh1010=(4)photonsm2s1sr1magneticeldyzGgauss104Tareapixel(image/detector)pixelpix(image/detector)pixelyzbarnbarn1028m2MiscellaneousunitsDdebye1 31029C.mSunrelativetoSune.g.,abundanceschan(detector)channelbinnumerousapplications(includingthe1-danalogueofpixel)voxel3-danalogueofpixelybitbinaryinformationunitybyte(computer)byte8bitaduAnalog-to-digitalconverterbeambeamareaofobservationasinJy/beam Notes.(y)Additionofprexesfordecimalmultiplesandsubmultiplesareallowed.(z)DeprecatedinIAUStyleManual(McNally1988)butstillinuse.()ConversionfactorsfromCODATAInternationallyrecommendedvaluesofthefundamentalphysicalconstants2002(http://physics.nist.gov/cuu/Constants/).Table5.Prexesformultiplesandsubmultiples. SubmultPrexCharMultPrexChar 101decid10decada102centic102hectoh103millim103kilok106microu106megaM109nanon109gigaG1012picop1012teraT1015femtof1015petaP1018attoa1018exaE1021zeptoz1021zettaZ1024yoctoy1024yottaY Table6.Charactersandstringsallowedtodenotemathematicaloperations. StringMeaning str1str2Multiplicationstr1*str2Multiplicationstr1.str2Multiplicationstr1/str2Divisionstr1**exprRaisedtothepowerexprstr1^exprRaisedtothepowerexprstr1exprRaisedtothepowerexprlog(str1)CommonLogarithm(tobase10)ln(str1)NaturalLogarithmexp(str1)Exponential(estr1)sqrt(str1)Squareroot 9 Table7.Mandatorykeywordsforprimaryheader. #Keyword 1SIMPLE=T2BITPIX3NAXIS4NAXISn,n=1,...,NAXIS:::(otherkeywords):::lastEND Table8.InterpretationofvalidBITPIXvalue. ValueDatarepresented 8Characterorunsignedbinaryinteger1616-bittwo'scomplementbinaryinteger3232-bittwo'scomplementbinaryinteger6464-bittwo'scomplementbinaryinteger-32IEEEsingleprecisionoatingpoint-64IEEEdoubleprecisionoatingpoint 4.4.Keywords4.4.1.MandatorykeywordsMandatorykeywordsarerequiredineveryHDUasdescribedintheremainderofthissubsection.Theymustbeusedonlyasdescribedinthisstandard.Valuesofthemandatorykeywordsmustbewritteninxed-format.4.4.1.1.PrimaryheaderTheSIMPLEkeywordisrequiredtobetherstkeywordintheprimaryheaderofallFITSles.TheprimaryheadermustcontaintheothermandatorykeywordsshowninTable7intheordergiven.OtherkeywordsmustnotintervenebetweentheSIMPLEkeywordandthelastNAXISnkeyword.SIMPLEkeyword.Thevalueeldshallcontainalogicalcon-stantwiththevalueTiftheleconformstothisstandard.Thiskeywordismandatoryfortheprimaryheaderandmustnotap-pearinextensionheaders.5AvalueofFsigniesthattheledoesnotconformtothisstandard.BITPIXkeyword.Thevalueeldshallcontainaninteger.Theabsolutevalueisusedincomputingthesizesofdatastructures.Itshallspecifythenumberofbitsthatrepresentadatavalueintheassociateddataarray.TheonlyvalidvaluesofBITPIXaregiveninTable8.WritersofFITSarraysshouldselectaBITPIXdatatypeappropriatetotheform,rangeofvalues,andaccuracyofthedatainthearray. 5Thisrequirementdi ersfromthewordingintheoriginalFITSpa-pers.SeeAppendixH.NAXISkeyword.Thevalueeldshallcontainanon-negativeintegernogreaterthan999representingthenumberofaxesintheassociateddataarray.AvalueofzerosigniesthatnodatafollowtheheaderintheHDU.NAXISnkeywords.TheNAXISnkeywordsmustbepresentforallvaluesn=1,...,NAXIS,inincreasingorderofn,andfornoothervaluesofn.Thevalueeldofthisindexedkeywordshallcontainanon-negativeintegerrepresentingthenumberofelementsalongaxisnofadataarray.AvalueofzeroforanyoftheNAXISnsigniesthatnodatafollowtheheaderintheHDU(however,therandomgroupsstructuredescribedinSect.6hasNAXIS1=0,butwillhavedatafollowingtheheaderiftheotherNAXISnkeywordsarenon-zero).IfNAXISisequalto0,thereshallnotbeanyNAXISnkeywords.ENDkeyword.Thiskeywordhasnoassociatedvalue.Bytes9through80shallbelledwithASCIIspaces(decimal32orhex-adecimal20).TheENDkeywordmarksthelogicalendoftheheaderandmustoccurinthelast2880-byteFITSblockoftheheader.Thetotalnumberofbitsintheprimarydataarray,exclusiveofllthatisneededafterthedatatocompletethelast2880-bytedatablock(Sect.3.3.2),isgivenbythefollowingexpression:Nbits=jBITPIXj(NAXIS1NAXIS2NAXISm);(1)whereNbitsmustbenon-negativeandisthenumberofbitsex-cludingll,misthevalueofNAXIS,andBITPIXandtheNAXISnrepresentthevaluesassociatedwiththosekeywords.NotethattherandomgroupsconventionintheprimaryarrayhasamorecomplicatedstructurewhosesizeisgivenbyEq.4.TheheaderoftherstFITSextensioninthele,ifpresent,shallstartwiththerstFITSblockfollowingthedatablockthatcontainsthelastbitoftheprimarydataarray.AnexampleofaprimaryarrayheaderisshowninTable9.Inadditiontotherequiredkeywords,itincludesafewofthereservedkeywordsthatarediscussedinSect.4.4.2.4.4.1.2.ConformingextensionsAllconformingextensions,whetherornotfurtherspeci-edinthisstandard,mustusethekeywordsdenedinTable10intheorderspecied.OtherkeywordsmustnotintervenebetweentheXTENSIONkeywordandtheGCOUNTkeyword.TheBITPIX,NAXIS,NAXISn,andENDkeywordsaredenedinSect.4.4.1.XTENSIONkeyword.Thevalueeldshallcontainacharacterstringgivingthenameoftheextensiontype.Thiskeywordismandatoryforanextensionheaderandmustnotappearintheprimaryheader.6Toprecludeconict,extensiontypenamesmustberegisteredwiththeIAUFWG.Thecurrentlistofreg-isteredextensionsisgiveninAppendixF.Anup-to-datelistisalsomaintainedontheFITSSupportOcewebsite. 6Thisrequirementdi ersfromthewordingintheoriginalFITSpa-pers.SeeAppendixH.10 Table9.Exampleofaprimaryarrayheader. Keywordrecords SIMPLE=T/filedoesconformtoFITSstandardBITPIX=16/numberofbitsperdatapixelNAXIS=2/numberofdataaxesNAXIS1=250/lengthofdataaxis1NAXIS2=300/lengthofdataaxis2OBJECT='CygnusX-1'DATE='2006-10-22'END PCOUNTkeyword.Thevalueeldshallcontainanintegerthatshallbeusedinanywayappropriatetodenethedatastructure,consistentwithEq.2.InIMAGE(Sect.7.1)andTABLE(Sect.7.2)extensionsthiskeywordmusthavethevalue0;inBINTABLEextensions(Sect.7.3)itisusedtospecifythenumberofbytesthatfollowthemaindatatableinthesupplementaldataareacalledtheheap.Thiskeywordisalsousedintherandomgroupsstructure(Sect.6)tospecifythenumberofparametersprecedingeacharrayinagroup.GCOUNTkeyword.Thevalueeldshallcontainanintegerthatshallbeusedinanywayappropriatetodenethedatastructure,consistentwithEq.2.Thiskeywordmusthavethevalue1intheIMAGE,TABLEandBINTABLEstandardextensionsdenedinSect.7.Thiskeywordisalsousedintherandomgroupsstructure(Sect.6)tospecifythenumberofrandomgroupspresent.Thetotalnumberofbitsintheextensiondataarray(exclu-siveofllthatisneededafterthedatatocompletethelast2880-bytedatablock)isgivenbythefollowingexpression:Nbits=jBITPIXjGCOUNT(PCOUNT+NAXIS1NAXIS2NAXISm);(2)whereNbitsmustbenon-negativeandisthenumberofbitsex-cludingll;misthevalueofNAXIS;andBITPIX,GCOUNT,PCOUNT,andtheNAXISnrepresentthevaluesassociatedwiththosekeywords.IfNbits�0,thenthedataarrayshallbecon-tainedinanintegralnumberof2880-byteFITSdatablocks.TheheaderofthenextFITSextensioninthele,ifany,shallstartwiththerstFITSblockfollowingthedatablockthatcontainsthelastbitofthecurrentextensiondataarray.4.4.2.OtherreservedkeywordsThereservedkeywordsdescribedbelowareoptional,butifpresentintheheadertheymustbeusedonlyasdenedinthisstandard.TheyapplytoanyFITSstructurewiththemeaningsandrestrictionsdenedbelow.AnyFITSstructuremayfurtherrestricttheuseofthesekeywords.4.4.2.1.GeneraldescriptivekeywordsDATEkeyword.ThevalueeldshallcontainacharacterstringgivingthedateonwhichtheHDUwascreated,intheformYYYY-MM-DD,orthedateandtimewhentheHDUwascreated,intheformYYYY-MM-DDThh:mm:ss[.sss...],whereYYYYshallbethefour-digitcalendaryearnumber,MMthetwo-digitmonthnumberwithJanuarygivenby01andDecemberby12,andDDthetwo-digitdayofthemonth.WhenbothdateandtimeareTable10.Mandatorykeywordsinconformingextensions. #Keyword 1XTENSION2BITPIX3NAXIS4NAXISn,n=1,...,NAXIS5PCOUNT6GCOUNT:::(otherkeywords):::lastEND given,theliteralTshallseparatethedateandtime,hhshallbethetwo-digithourintheday,mmthetwo-digitnumberofmin-utesafterthehour,andss[.sss...]thenumberofseconds(twodigitsfollowedbyanoptionalfraction)aftertheminute.Defaultvaluesmustnotbegiventoanyportionofthedate/timestring,andleadingzerosmustnotbeomitted.Thedecimalpartofthesecondseldisoptionalandmaybearbitrarilylong,solongasitisconsistentwiththerulesforvalueformatsofSect.4.2.ThevalueoftheDATEkeywordshallalwaysbeexpressedinUTCwheninthisformat,foralldatasetscreatedonEarth.ThefollowingformatmayappearonleswrittenbeforeJanuary1,2000.ThevalueeldcontainsacharacterstringgivingthedateonwhichtheHDUwascreated,intheformDD/MM/YY,whereDDisthedayofthemonth,MMthemonthnum-berwithJanuarygivenby01andDecemberby12,andYYthelasttwodigitsoftheyear,thersttwodigitsbeingunderstoodtobe19.SpecicationofthedateusingUniversalTimeisrec-ommendedbutnotassumed.WhenanewlycreatedHDUissubstantiallyaverbatimcopyofanotherHDU,thevalueoftheDATEkeywordintheoriginalHDUmayberetainedinthenewHDUinsteadofupdatingthevaluetothecurrentdateandtime.ORIGINkeyword.ThevalueeldshallcontainacharacterstringidentifyingtheorganizationorinstitutionresponsibleforcreatingtheFITSle.EXTENDkeyword.ThevalueeldshallcontainalogicalvalueindicatingwhethertheFITSleisallowedtocontainconform-ingextensionsfollowingtheprimaryHDU.Thiskeywordmayonlyappearintheprimaryheaderandmustnotappearinanextensionheader.IfthevalueeldisTthentheremaybecon-formingextensionsintheFITSlefollowingtheprimaryHDU.Thiskeywordisonlyadvisory,soitspresencewithavalueT11 doesnotrequirethattheFITSlecontainsextensions,nordoestheabsenceofthiskeywordnecessarilyimplythattheledoesnotcontainextensions.EarlierversionsofthisstandardstatedthattheEXTENDkeywordmustbepresentintheprimaryheaderifthelecontainedextensions,butthisisnolongerrequired.BLOCKEDkeyword.ThiskeywordisdeprecatedandshouldnotbeusedinnewFITSles.Itisreservedprimarilytopreventitsusewithothermeanings.Aspreviouslydened,thiskeyword,ifused,wasrequiredtoappearonlywithintherst36keywordsintheprimaryheader.ItspresencewiththerequiredlogicalvalueofTadvisedthatthephysicalblocksizeoftheFITSleonwhichitappearsmaybeanintegralmultipleoftheFITSblocklengthandnotnecessarilyequaltoit.4.4.2.2.KeywordsdescribingobservationsDATE-OBSkeyword.TheformatofthevalueeldforDATE-OBSkeywordsshallfollowtheprescriptionsfortheDATEkeyword(Sect.4.4.2).Eitherthefour-digityearformatorthetwo-digityearformatmaybeusedforobservationdatesfrom1900through1999althoughthefour-digitformatisrecom-mended.Whentheformatwithafour-digityearisused,thedefaultin-terpretationsfortimeshouldbeUTCfordatesbeginning1972-01-01andUTbefore.Otherdateandtimescalesarepermissible.ThevalueoftheDATE-OBSkeywordshallbeexpressedintheprincipaltimesystemortimescaleoftheHDUtowhichitbe-longs;ifthereisanychanceofambiguity,thechoiceshouldbeclariedincomments.ThevalueofDATE-OBSshallbeassumedtorefertothestartofanobservation,unlessanotherinterpreta-tionisclearlyexplainedinthecommenteld.Explicitspeci-cationofthetimescaleisrecommended.Bydefault,timesforTAIandtimesthatrunsimultaneouslywithTAI,e.,g.,UTCandTT,willbeassumedtobeasmeasuredatthedetector(or,inpracticalcases,attheobservatory).ForcoordinatetimessuchasTCG,TCBandTDB,thedefaultshallbetoincludelight-timecorrectionstotheassociatedspatialorigin,namelythegeo-centerforTCGandthesolar-systembarycenterfortheothertwo.Conventionsmaybedevelopedthatuseothertimesystems.AppendixBofthisdocumentcontainstheappendixtotheagree-mentonafour-digityear,whichdiscussestimesystemsinsomedetail.WhenthevalueofDATE-OBSisexpressedinthetwo-digityearform,allowedforleswrittenbeforeJanuary1,2000withayearintherange1900-1999,thereisnodefaultassumptionastowhetheritreferstothestart,middleorendofanobservation.DATExxxxkeywords.Thevalueeldsforallkeywordsbegin-ningwiththestringDATEwhosevaluecontainsdate,andop-tionallytime,informationshallfollowtheprescriptionsfortheDATE-OBSkeyword.TELESCOPkeyword.Thevalueeldshallcontainacharacterstringidentifyingthetelescopeusedtoacquirethedataassoci-atedwiththeheader.INSTRUMEkeyword.Thevalueeldshallcontainacharacterstringidentifyingtheinstrumentusedtoacquirethedataassoci-atedwiththeheader.OBSERVERkeyword.Thevalueeldshallcontainacharac-terstringidentifyingwhoacquiredthedataassociatedwiththeheader.OBJECTkeyword.Thevalueeldshallcontainacharacterstringgivinganamefortheobjectobserved.4.4.2.3.BibliographickeywordsAUTHORkeyword.Thevalueeldshallcontainacharacterstringidentifyingwhocompiledtheinformationinthedataas-sociatedwiththeheader.Thiskeywordisappropriatewhenthedataoriginateinapublishedpaperorarecompiledfrommanysources.REFERENCkeyword.Thevalueeldshallcontainacharac-terstringcitingareferencewherethedataassociatedwiththeheaderarepublished.Itisrecommendedthateitherthe19-digitbibliographicidentier7usedintheAstrophysicsDataSystembibliographicdatabases(http://adswww.harvard.edu/)ortheDigitalObjectIdentier(http://doi.org)beincludedinthevaluestringwhenavailable(e.g.,'1994A&AS..103..135A'or'doi:10.1006/jmbi.1998.2354').4.4.2.4.CommentarykeywordsThesekeywordsprovidecommentaryinformationaboutthecontentsorhistoryoftheFITSleandmayoccuranynumberoftimesinaheader.Thesekeywordsshallhavenoassociatedvalueevenifthevalueindicatorcharacters`= 'appearinbytes9and10(henceitisrecommendedthatthesekeywordsnotcontainthevalueindicator).Bytes9through80maycontainanyoftherestrictedsetofASCIItextcharacters,decimal32through126(hexadecimal20through7E).COMMENTkeyword.ThiskeywordmaybeusedtosupplyanycommentsregardingtheFITSle.HISTORYkeyword.Thiskeywordshouldbeusedtodescribethehistoryofstepsandproceduresassociatedwiththeprocess-ingoftheassociateddata.Keywordeldisblank.ThiskeywordmaybeusedtosupplyanycommentsregardingtheFITSle.Itisfrequentlyusedforaestheticpurposestoprovideabreakbetweengroupsofrelatedkeywordsintheheader. 7Thisbibliographicconvention(Schmitzetal.1995)wasinitiallydevelopedforusewithinNED(NASA/IPACExtragalacticDatabase)andSIMBAD(operatedatCDS,Strasbourg,France).12 4.4.2.5.KeywordsthatdescribearraysThesekeywordsareusedtodescribethecontentsofanarray,eitherintheprimaryarray,inanimageextension(Sect.7.1),orinaseriesofrandomgroups(Sect.6).Theyareoptional,butiftheyappearintheheaderdescribinganarrayorgroups,theymustbeusedasdenedinthissectionofthisstandard.Theyshallnotbeusedinheadersdescribingotherstructuresunlessthemeaningisthesameasdenedhere.BSCALEkeyword.Thiskeywordshallbeused,alongwiththeBZEROkeyword,tolinearlyscalethearraypixelvalues(i.e.,theactualvaluesstoredintheFITSle)totransformthemintothephysicalvaluesthattheyrepresentusingEq.3.physical value=BZERO+BSCALEarray value:(3)Thevalueeldshallcontainaoating-pointnumberrepresent-ingthecoecientofthelinearterminthescalingequation,theratioofphysicalvaluetoarrayvalueatzeroo set.Thedefaultvalueforthiskeywordis1.0.BeforesupportforIEEEoating-pointdatatypeswasaddedtoFITS(Wells&Grosbøl1990),thistechniqueoflinearlyscalingintegervalueswastheonlywaytorepresentthefullrangeofoating-pointvaluesinaFITSarray.Thislinearscalingtechniqueisstillcommonlyusedtoreducethesizeofthedataarraybyafactoroftwobyrepresenting32-bitoating-pointphysicalvaluesas16-bitscaledintegers.BZEROkeyword.Thiskeywordshallbeused,alongwiththeBSCALEkeyword,tolinearlyscalethearraypixelvalues(i.e.,theactualvaluesstoredintheFITSle)totransformthemintothephysicalvaluesthattheyrepresentusingEq.3.Thevalueeldshallcontainaoating-pointnumberrepresentingthephysicalvaluecorrespondingtoanarrayvalueofzero.Thedefaultvalueforthiskeywordis0.0.Besidesitsuseinrepresentingoating-pointvaluesasscaledintegers(seethedescriptionoftheBSCALEkeyword),theBZEROkeywordisalsousedwhenstoringunsignedintegervaluesintheFITSarray.InthisspecialcasetheBSCALEkeywordshallhavethedefaultvalueof1.0,andtheBZEROkeywordshallhaveoneoftheintegervaluesshowninTable11.SincetheFITSformatdoesnotsupportanativeunsignedin-tegerdatatype(exceptfortheunsigned8-bitbytedatatype),theunsignedvaluesarestoredintheFITSarrayasnativesignedin-tegerswiththeappropriateintegero setspeciedbytheBZEROkeywordvalueshowninthetable.Forthebytedatatype,theconversetechniquecanbeusedtostoresignedbytevaluesasnativeunsignedvalueswiththenegativeBZEROo set.Ineachcase,thephysicalvalueiscomputedbyaddingtheo setspeci-edbytheBZEROkeywordtothenativedatatypevaluethatisstoredintheFITSle.8BUNITkeyword.Thevalueeldshallcontainacharacterstringdescribingthephysicalunitsinwhichthequantitiesinthear- 8AmorecomputationallyecientmethodofaddingorsubtractingtheBZEROvaluesistosimplyipthemostsignicantbitofthebinaryvalue.Forexample,using8-bitintegers,thedecimalvalue248minustheBZEROvalueof128equals120.Thebinaryrepresentationof248is11111000.Flippingthemostsignicantbitgivesthebinaryvalue01111000,whichisequaltodecimal120.ray,afterapplicationofBSCALEandBZERO,areexpressed.TheseunitsmustfollowtheprescriptionsofSect.4.3.BLANKkeyword.ThiskeywordshallbeusedonlyinheaderswithpositivevaluesofBITPIX(i.e.,inarrayswithintegerdata).Bytes1through8containthestring`BLANK '(ASCIIspacesinbytes6through8).Thevalueeldshallcontainanintegerthatspeciesthevaluethatisusedwithintheintegerarraytorepresentpixelsthathaveanundenedphysicalvalue.IftheBSCALEandBZEROkeywordsdonothavethedefaultvaluesof1.0and0.0,respectively,thenthevalueoftheBLANKkeywordmustequaltheactualvalueintheFITSdataarraythatisusedtorepresentanundenedpixelandnotthecorrespond-ingphysicalvalue(computedfromEq.3).Tociteaspecic,commonexample,unsigned16-bitintegersarerepresentedinasignedintegerFITSarray(withBITPIX=16)bysettingBZERO=32768andBSCALE=1.Ifitisdesiredtousepixelsthathaveanunsignedvalue(i.e.,thephysicalvalue)equalto0torepre-sentundenedpixelsinthearray,thentheBLANKkeywordmustbesettothevalue32768becausethatistheactualvalueoftheundenedpixelsintheFITSarray.DATAMAXkeyword.Thevalueeldshallalwayscontainaoating-pointnumber,regardlessofthevalueofBITPIX.Thisnumbershallgivethemaximumvalidphysicalvaluerepresentedbythearray(fromEq.3),exclusiveofanyIEEEspecialvalues.DATAMINkeyword.Thevalueeldshallalwayscontainaoating-pointnumber,regardlessofthevalueofBITPIX.Thisnumbershallgivetheminimumvalidphysicalvaluerepresentedbythearray(fromEq.3),exclusiveofanyIEEEspecialvalues.WCSkeywords.Anextensivesetofkeywordshavebeende-nedtodescribetheworldcoordinatesassociatedwithanarray.ThesekeywordsarediscussedseparatelyinSect.8.4.4.2.6.ExtensionkeywordsAlthoughthesekeywordswereoriginallydenedforusewithintheheaderofaconformingextension,theyalsomayappearintheprimaryheaderwithananalogousmeaning.Ifthesekeywordsarepresent,itisrecommendedthattheyhaveauniquecombinationofvaluesineachHDUoftheFITSle.EXTNAMEkeyword.Thevalueeldshallcontainacharacterstringtobeusedtodistinguishamongdi erentextensionsofthesametype,i.e.,withthesamevalueofXTENSION,inaFITSle.Withinthiscontext,theprimaryarrayshouldbeconsideredasequivalenttoanIMAGEextension.EXTVERkeyword.Thevalueeldshallcontainanintegertobeusedtodistinguishamongdi erentextensionsinaFITSlewiththesametypeandname,i.e.,thesamevaluesforXTENSIONandEXTNAME.Thevaluesneednotstartwith1fortherstextensionwithaparticularvalueofEXTNAMEandneednotbeinsequenceforsubsequentvalues.IftheEXTVERkeywordisabsent,theleshouldbetreatedasifthevaluewere1.13 Table11.UsageofBZEROtorepresentnon-defaultintegerdatatypes. BITPIXNativePhysicalBZEROdatatypedatatype 8unsignedsignedbyte-128(27)16signedunsigned16-bit32768(215)32signedunsigned32-bit2147483648(231)64signedunsigned64-bit9223372036854775808(263) EXTLEVELkeyword.Thevalueeldshallcontainanintegerspecifyingthelevelinahierarchyofextensionlevelsoftheex-tensionheadercontainingit.Thevalueshallbe1forthehighestlevel;levelswithahighervalueofthiskeywordshallbesubor-dinatetolevelswithalowervalue.IftheEXTLEVELkeywordisabsent,theleshouldbetreatedasifthevaluewere1.4.4.3.AdditionalkeywordsNewkeywordsmaybedevisedinadditiontothosedescribedinthisstandard,solongastheyareconsistentwiththegener-alizedrulesforkeywordsanddonotconictwithmandatoryorreservedkeywords.AnykeywordthatreferstoordependsupontheexistenceofotherspecicHDUsinthesameorotherlesshouldbeusedwithcautionbecausethepersistenceofthoseHDUscannotalwaysbeguaranteed.5.DataRepresentationPrimaryandextensiondatashallberepresentedinoneoftheformatsdescribedinthissection.FITSdatashallbeinterpretedtobeabytestream.Bytesareinbig-endianorderofdecreasingsignicance.Thebytethatincludesthesignbitshallberst,andthebytethathastheonesbitshallbelast.5.1.CharactersEachcharactershallberepresentedbyonebyte.Acharactershallberepresentedbyits7-bitASCII(ANSI1977)codeinthelowordersevenbitsinthebyte.Thehigh-orderbitshallbezero.5.2.Integers5.2.1.Eight-bitEight-bitintegersshallbeunsignedbinaryintegers,containedinonebytewithdecimalvaluesrangingfrom0to255.5.2.2.Sixteen-bitSixteen-bitintegersshallbetwo'scomplementsignedbinaryin-tegers,containedintwobyteswithdecimalvaluesrangingfrom-32768to+32767.5.2.3.Thirty-two-bitThirty-two-bitintegersshallbetwo'scomplementsignedbinaryintegers,containedinfourbyteswithdecimalvaluesrangingfrom-2147483648to+2147483647.5.2.4.Sixty-four-bitSixty-four-bitintegersshallbetwo'scomplementsignedbinaryintegers,containedineightbyteswithdecimalvaluesrangingfrom-9223372036854775808to+9223372036854775807.5.2.5.UnsignedintegersTheFITSformatdoesnotsupportanativeunsignedintegerdatatype(exceptfortheunsigned8-bitbytedatatype)thereforeun-signed16-bit,32-bit,or64-bitbinaryintegerscannotbestoreddirectlyinaFITSdataarray.Instead,theappropriateo setmustbeappliedtotheunsignedintegertoshiftthevalueintotherangeofthecorrespondingsignedinteger,whichisthenstoredintheFITSle.TheBZEROkeywordshallrecordtheamountoftheo setneededtorestoretheoriginalunsignedvalue.TheBSCALEkeywordshallhavethedefaultvalueof1.0inthiscase,andtheappropriateBZEROvalue,asafunctionofBITPIX,isspeciedinTable11.Thissametechniquemustbeusedwhenstoringunsignedintegersinabinarytablecolumnofsignedintegers(Sect.7.3.2).InthiscasetheTSCALnkeyword(analogoustoBSCALE)shallhavethedefaultvalueof1.0,andtheappropriateTZEROnvalue(analogoustoBZERO)isspeciedinTable19.5.3.IEEE-754oatingpointTransmissionof32-and64-bitoating-pointdatawithintheFITSformatshallusetheANSI/IEEE-754standard(IEEE1985).BITPIX=-32andBITPIX=-64signify32-and64-bitIEEEoating-pointnumbers,respectively;theabsolutevalueofBITPIXisusedforcomputingthesizesofdatastructures.ThefullIEEEsetofnumberformsisallowedforFITSinterchange,includingallspecialvalues.TheBLANKkeywordshouldnotbeusedwhenBITPIX=-32or-64;rather,theIEEENaNshouldbeusedtorepresentanundenedvalue.UseoftheBSCALEandBZEROkeywordsisnotrecommended.AppendixEhasadditionaldetailsontheIEEEformat.6.RandomgroupsstructureTherandomgroupsstructureallowsacollectionof`groups',whereagroupconsistsofasubarrayofdataandasetofas-sociatedparametervalues,tobestoredwithintheFITSprimarydataarray.Randomgroupshavebeenusedalmostexclusivelyforapplicationsinradiointerferometry;outsidethiseld,thereislittlesupportforreadingorwritingdatainthisformat.Otherthantheexistinguseforradiointerferometrydata,therandomgroupsstructureisdeprecatedandshouldnotbefurtherused.Forotherapplications,thebinarytableextension(Sect.7.3)pro-videsamoreextensibleandbetterdocumentedwayofassociat-inggroupsofdatawithinasingledatastructure.14 Table12.Mandatorykeywordsinprimaryheaderprecedingran-domgroups. #Keyword 1SIMPLE=T2BITPIX3NAXIS4NAXIS1=05NAXISn,n=2,...,valueofNAXIS:::(otherkeywords,whichmustinclude...)GROUPS=TPCOUNTGCOUNT:::lastEND 6.1.Keywords6.1.1.MandatorykeywordsTheSIMPLEkeywordisrequiredtobetherstkeywordintheprimaryheaderofallFITSles,includingthosewithrandomgroupsrecords.Iftherandomgroupsformatrecordsfollowtheprimaryheader,thekeywordrecordsoftheprimaryheadermustusethekeywordsdenedinTable12intheorderspecied.NootherkeywordsmayintervenebetweentheSIMPLEkeywordandthelastNAXISnkeyword.SIMPLEkeyword.Thekeywordrecordcontainingthiskeywordisstructuredinthesamewayasifaprimarydataarraywerepresent(Sect.4.4.1).BITPIXkeyword.ThekeywordrecordcontainingthiskeywordisstructuredasprescribedinSect.4.4.1.NAXISkeyword.Thevalueeldshallcontainanintegerrang-ingfrom1to999,representingonemorethanthenumberofaxesineachdataarray.NAXIS1keyword.Thevalueeldshallcontaintheinteger0,asignatureofrandomgroupsformatindicatingthatthereisnoprimarydataarray.NAXISnkeywords(n=2,...,valueofNAXIS).TheNAXISnkeywordsmustbepresentforallvaluesn=2,...,NAXIS,inincreasingorderofn,andfornolargervaluesofn.Thevalueeldshallcontainaninteger,representingthenumberofposi-tionsalongaxisn-1ofthedataarrayineachgroup.GROUPSkeyword.Thevalueeldshallcontainthelogicalcon-stantT.ThevalueTassociatedwiththiskeywordimpliesthatrandomgroupsrecordsarepresent.PCOUNTkeyword.Thevalueeldshallcontainanintegerequaltothenumberofparametersprecedingeacharrayinagroup.GCOUNTkeyword.Thevalueeldshallcontainanintegerequaltothenumberofrandomgroupspresent.ENDkeyword.Thiskeywordhasnoassociatedvalue.Bytes9through80shallcontainASCIIspaces(decimal32orhexadec-imal20).Thetotalnumberofbitsintherandomgroupsrecordsexclu-siveofthelldescribedinSect.6.2isgivenbythefollowingexpression:Nbits=jBITPIXjGCOUNT(PCOUNT+NAXIS2NAXIS3NAXISm);(4)whereNbitsisnon-negativeandthenumberofbitsexcludingll;misthevalueofNAXIS;andBITPIX,GCOUNT,PCOUNT,andtheNAXISnrepresentthevaluesassociatedwiththosekeywords.6.1.2.ReservedkeywordsPTYPEnkeywords.Thevalueeldshallcontainacharacterstringgivingthenameofparametern.IfthePTYPEnkeywordsformorethanonevalueofnhavethesameassociatednameinthevalueeld,thenthedatavaluefortheparameterofthatnameistobeobtainedbyaddingthederiveddatavaluesofthecorre-spondingparameters.Thisruleprovidesamechanismbywhicharandomparametermayhavemoreprecisionthantheaccompa-nyingdataarrayelements;forexample,bysummingtwo16-bitvalueswiththerstscaledrelativetotheothersuchthatthesumformsanumberofupto32-bitprecision.PSCALnkeywords.Thiskeywordshallbeused,alongwiththePZEROnkeyword,whenthenthFITSgroupparametervalueisnotthetruephysicalvalue,totransformthegroupparametervaluetothetruephysicalvaluesitrepresents,usingEq.5.Thevalueeldshallcontainaoating-pointnumberrepresentingthecoecientofthelinearterminEq.5,thescalingfactorbetweentruevaluesandgroupparametervaluesatzeroo set.Thedefaultvalueforthiskeywordis1.0.PZEROnkeywords.Thiskeywordshallbeused,alongwiththePSCALnkeyword,whenthenthFITSgroupparametervalueisnotthetruephysicalvalue,totransformthegroupparame-tervaluetothephysicalvalue.Thevalueeldshallcontainaoating-pointnumber,representingthetruevaluecorrespond-ingtoagroupparametervalueofzero.Thedefaultvalueforthiskeywordis0.0.Thetransformationequationisasfollows:physical value=PZEROn+PSCALngroup parm value:(5)6.2.DatasequenceRandomgroupsdatashallconsistofasetofgroups.Thenum-berofgroupsshallbespeciedbytheGCOUNTkeywordintheassociatedheader.Eachgroupshallconsistofthenumberofpa-rametersspeciedbythePCOUNTkeywordfollowedbyanarraywiththenumberofelementsNelemgivenbythefollowingex-pression:15 Nelem=(NAXIS2NAXIS3NAXISm);(6)whereNelemisthenumberofelementsinthedataarrayinagroup,misthevalueofNAXIS,andtheNAXISnrepresentthevaluesassociatedwiththosekeywords.Therstparameteroftherstgroupshallappearintherstlocationoftherstdatablock.Therstelementofeacharrayshallimmediatelyfollowthelastparameterassociatedwiththatgroup.Therstparameterofanysubsequentgroupshallimme-diatelyfollowthelastelementofthearrayofthepreviousgroup.Thearraysshallbeorganizedinternallyinthesamewayasanordinaryprimarydataarray.Ifthegroupsdatadonotllthenaldatablock,theremainderoftheblockshallbelledwithzerovaluesinthesamewayasaprimarydataarray(Sect.3.3.2).Ifrandomgroupsrecordsarepresent,thereshallbenoprimarydataarray.6.3.DatarepresentationPermissibledatarepresentationsarethoselistedinSect.5.Parametersandelementsofassociateddataarraysshallhavethesamerepresentation.Ifmoreprecisionisrequiredforanassoci-atedparameterthanforanelementofadataarray,theparam-etershallbedividedintotwoormoreaddends,representedbythesamevalueforthePTYPEnkeyword.Thevalueshallbethesumofthephysicalvalues,whichmayhavebeenobtainedfromthegroupparametervaluesusingthePSCALnandPZEROnkey-words.7.StandardextensionsAstandardextensionisaconformingextensionwhoseorgani-zationandcontentarecompletelyspeciedinthisstandard.Thespecicationsforthe3currentlydenedstandardextensions,namely,1.'IMAGE'extensions;2.'TABLE'ASCIItableextensions;and3.'BINTABLE'binarytableextensions;aregiveninthefollowingsections.AlistofotherconformingextensionsisgiveninAppendixF.7.1.ImageextensionTheFITSimageextensionisnearlyidenticalinstructuretothetheprimaryHDUandisusedtostoreanarrayofdata.MultipleimageextensionscanbeusedtostoreanynumberofarraysinasingleFITSle.TherstkeywordinanimageextensionshallbeXTENSION= 'IMAGE '.7.1.1.MandatorykeywordsTheXTENSIONkeywordisrequiredtobetherstkeywordofallimageextensions.ThekeywordrecordsintheheaderofanimageextensionmustusethekeywordsdenedinTable13intheorderspecied.NootherkeywordsmayintervenebetweentheXTENSIONandGCOUNTkeywords.XTENSIONkeyword.Thevalueeldshallcontainthecharacterstring'IMAGE '.Table13.Mandatorykeywordsinimageextensions. #Keyword 1XTENSION= 'IMAGE '2BITPIX3NAXIS4NAXISn,n=1,...,NAXIS5PCOUNT=06GCOUNT=1:::(otherkeywords...):::lastEND BITPIXkeyword.Thevalueeldshallcontainaninteger.Theabsolutevalueisusedincomputingthesizesofdatastructures.Itshallspecifythenumberofbitsthatrepresentadatavalue.TheonlyvalidvaluesofBITPIXaregiveninTable8.WritersofIMAGEextensionsshouldselectaBITPIXdatatypeappropriatetotheform,rangeofvalues,andaccuracyofthedatainthearray.NAXISkeyword.Thevalueeldshallcontainanon-negativeintegernogreaterthan999,representingthenumberofaxesintheassociateddataarray.Ifthevalueiszerothentheimageex-tensionshallnothaveanydatablocksfollowingtheheader.NAXISnkeywords.TheNAXISnkeywordsmustbepresentforallvaluesn=1,...,NAXIS,inincreasingorderofn,andfornoothervaluesofn.Thevalueeldofthisindexedkeywordshallcontainanon-negativeinteger,representingthenumberofelementsalongaxisnofadataarray.IfthevalueofanyoftheNAXISnkeywordsiszero,thentheimageextensionshallnothaveanydatablocksfollowingtheheader.IfNAXISisequalto0,thereshouldnotbeanyNAXISnkeywords.PCOUNTkeyword.Thevalueeldshallcontaintheinteger0.GCOUNTkeyword.Thevalueeldshallcontaintheinteger1;eachimageextensioncontainsasinglearray.ENDkeyword.Thiskeywordhasnoassociatedvalue.Bytes9through80shallbelledwithASCIIspaces(decimal32orhex-adecimal20).7.1.2.OtherreservedkeywordsThereservedkeywordsdenedinSect.4.4.2(exceptforEXTENDandBLOCKED)mayappearinanimageextensionheader.Thekeywordsmustbeusedasdenedinthatsection.7.1.3.DatasequenceThedataformatshallbeidenticaltothatofaprimarydataarrayasdescribedinSect.3.3.2.16 Table14.MandatorykeywordsinASCIItableextensions. #Keyword 1XTENSION= 'TABLE '2BITPIX=83NAXIS=24NAXIS15NAXIS26PCOUNT=07GCOUNT=18TFIELDS:::(otherkeywords,including(ifTFIELDSisnotzero)...)TTYPEn,n=1,2,...,kwherekisthevalueofTFIELDS(Recommended)TBCOLn,n=1,2,...,kwherekisthevalueofTFIELDS(Required)TFORMn,n=1,2,...,kwherekisthevalueofTFIELDS(Required):::lastEND 7.2.TheASCIItableextensionTheASCIItableextensionprovidesameansofstoringcata-logsandtablesofastronomicaldatainFITSformat.Eachrowofthetableconsistsofaxed-lengthsequenceofASCIIchar-actersdividedintoeldsthatcorrespondtothecolumnsinthetable.TherstkeywordinanASCIItableextensionshallbeXTENSION= 'TABLE '.7.2.1.MandatorykeywordsTheheaderofanASCIItableextensionmustusethekey-wordsdenedinTable14.TherstkeywordmustbeXTENSION;thesevenkeywordsfollowingXTENSION(BITPIX...TFIELDS)mustbeintheorderspeciedwithnointerveningkeywords.XTENSIONkeyword.Thevalueeldshallcontainthecharacterstringvaluetext'TABLE '.BITPIXkeyword.Thevalueeldshallcontaintheinteger8,denotingthatthearraycontainsASCIIcharacters.NAXISkeyword.Thevalueeldshallcontaintheinteger2,de-notingthattheincludeddataarrayistwo-dimensional:rowsandcolumns.NAXIS1keyword.Thevalueeldshallcontainanon-negativeinteger,givingthenumberofASCIIcharactersineachrowofthetable.Thisincludesallthecharactersinthedenedeldsplusanycharactersthatarenotincludedinanyeld.NAXIS2keyword.Thevalueeldshallcontainanon-negativeinteger,givingthenumberofrowsinthetable.PCOUNTkeyword.Thevalueeldshallcontaintheinteger0.GCOUNTkeyword.Thevalueeldshallcontaintheinteger1;thedatablockscontainasingletable.Table15.ValidTFORMnformatvaluesinTABLEextensions. FieldvalueDatatype AwCharacterIwDecimalintegerFw.dFloating-point,xeddecimalnotationEw.dFloating-point,exponentialnotationDw.dFloating-point,exponentialnotation Notes.wisthewidthincharactersoftheeldanddisthenumberofdigitstotherightofthedecimal.TFIELDSkeyword.Thevalueeldshallcontainanon-negativeintegerrepresentingthenumberofeldsineachrow.Themax-imumpermissiblevalueis999.TBCOLnkeywords.TheTBCOLnkeywordsmustbepresentforallvaluesn=1,...,TFIELDSandfornoothervaluesofn.Thevalueeldofthisindexedkeywordshallcontainanintegerspecifyingthecolumninwhicheldnstarts.Therstcolumnofarowisnumbered1.TFORMnkeywords.TheTFORMnkeywordsmustbepresentforallvaluesn=1,...,TFIELDSandfornoothervaluesofn.Thevalueeldofthisindexedkeywordshallcontainacharacterstringdescribingtheformatinwhicheldnisencoded.OnlytheformatsinTable15,interpretedasFortran(ISO2004)inputfor-matsanddiscussedinmoredetailinSect.7.2.5,arepermittedforencoding.Formatcodesmustbespeciedinuppercase.OtherformateditingcodescommontoFortransuchasrepetition,po-sitionalediting,scaling,andeldterminationarenotpermitted.Allvaluesinnumericeldshaveanumberbaseoften(i.e.,theyaredecimal);binary,octal,hexadecimal,andotherrepresenta-tionsarenotpermitted.TheTDISPnkeyword,denedinSect.7.2.2,maybeusedtorecommendthatadecimalintegervalueinanASCIItablebedisplayedastheequivalentbinary,octal,orhexadecimalvalue.17 Table16.ValidTDISPnformatvaluesinTABLEextensions. FieldvalueDatatype AwCharacterIw.mIntegerBw.mBinary,integersonlyOw.mOctal,integersonlyZw.mHexadecimal,integersonlyFw.dFloating-point,xeddecimalnotationEw.dEeFloating-point,exponentialnotationENw.dEngineering;EformatwithexponentmultipleofthreeESw.dScientic;sameasENbutnon-zeroleadingdigitifnotzeroGw.dEeGeneral;appearsasFifsignicancenotlost,elseE.Dw.dEeFloating-point,exponentialnotation Notes.wisthewidthincharactersofdisplayedvalues,mistheminimumnumberofdigitsdisplayed,disthenumberofdigitstorightofdecimal,andeisnumberofdigitsinexponent.The.mandEeeldsareoptional.ENDkeyword.Thiskeywordhasnoassociatedvalue.Bytes9through80shallcontainASCIIspaces(decimal32orhexadec-imal20).7.2.2.OtherreservedkeywordsInadditiontothereservedkeywordsdenedinSect.4.4.2(ex-ceptforEXTENDandBLOCKED),thefollowingotherreservedkeywordsmaybeusedtodescribethestructureofanASCIIta-bledataarray.Theyareoptional,butiftheyappearwithinanASCIItableextensionheader,theymustbeusedasdenedinthissectionofthisstandard.TTYPEnkeywords.Thevalueeldforthisindexedkeywordshallcontainacharacterstringgivingthenameofeldn.Itisstronglyrecommendedthateveryeldofthetablebeassignedaunique,case-insensitivenamewiththiskeyword,anditisrec-ommendedthatthecharacterstringbecomposedonlyofupperandlowercaseletters,digits,andtheunderscore(` ',decimal95,hexadecimal5F)character.Useofothercharactersisnotrec-ommendedbecauseitmaybediculttomapthecolumnnamesintovariablesinsomelanguages(e.g.,anyhyphens,`*'or`+'charactersinthenamemaybeconfusedwithmathematicalop-erators).StringcomparisonswiththeTTYPEnkeywordvaluesshouldnotbecasesensitive(e.g.,'TIME'and'Time'shouldbeinterpretedasthesamename).TUNITnkeywords.Thevalueeldshallcontainacharacterstringdescribingthephysicalunitsinwhichthequantityineldn,afteranyapplicationofTSCALnandTZEROn,isexpressed.UnitsmustfollowtheprescriptionsinSect.4.3.TSCALnkeywords.Thisindexedkeywordshallbeused,alongwiththeTZEROnkeyword,tolinearlyscalethevaluesintheta-bleeldntotransformthemintothephysicalvaluesthattheyrepresentusingEq.7.Thevalueeldshallcontainaoating-pointnumberrepresentingthecoecientofthelinearterminthescalingequation.Thedefaultvalueforthiskeywordis1.0.ThiskeywordmustnotbeusedforA-formatelds.Thetransformationequationusedtocomputeatruephysicalvaluefromthequantityineldnisphysical value=TZEROn+TSCALneld value(7)wherefield valueisthevaluethatisactuallystoredinthattableeldintheFITSle.TZEROnkeywords.Thisindexedkeywordshallbeused,alongwiththeTSCALnkeyword,tolinearlyscalethevaluesintheta-bleeldntotransformthemintothephysicalvaluesthattheyrepresentusingEq.7.Thevalueeldshallcontainaoating-pointnumberrepresentingthephysicalvaluecorrespondingtoanarrayvalueofzero.Thedefaultvalueforthiskeywordis0.0.ThiskeywordmustnotbeusedforA-formatelds.TNULLnkeywords.Thevalueeldforthisindexedkeywordshallcontainthecharacterstringthatrepresentsanundenedvalueforeldn.Thestringisimplicitlyspacelledtothewidthoftheeld.TDISPnkeywords.Thevalueeldofthisindexedkeywordshallcontainacharacterstringdescribingtheformatrecom-mendedfordisplayinganASCIItextrepresentationofofthecontentsofeldn.ThiskeywordoverridesthedefaultdisplayformatgivenbytheTFORMnkeyword.Ifthetablevaluehasbeenscaled,thephysicalvalue,derivedusingEq.7,shallbedis-played.Allelementsinaeldshallbedisplayedwithasingle,repeatedformat.OnlytheformatcodesinTable16,interpretedasFortran(ISO2004)outputformats,anddiscussedinmorede-tailinSect.7.3.4,arepermittedforencoding.Theformatcodesmustbespeciedinuppercase.IftheBw.m,Ow.m,andZw.mformatsarenotreadilyavailabletothereader,theIw.mdisplayformatmaybeusedinstead,andiftheENw.dandESw.dformatsarenotavailable,Ew.dmaybeused.7.2.3.DatasequenceThetableisconstructedfromatwo-dimensionalarrayofASCIIcharacters.Therowlengthandthenumberofrowsshallbethosespecied,respectively,bytheNAXIS1andNAXIS2keywordsoftheassociatedheader.Thenumberofcharactersinarowandthenumberofrowsinthetableshalldeterminethesizeofthechar-acterarray.Everyrowinthearrayshallhavethesamenumberofcharacters.Therstcharacteroftherstrowshallbeatthestartofthedatablockimmediatelyfollowingthelastheaderblock.Therstcharacterofsubsequentrowsshallfollowimmediatelythecharacterattheendofthepreviousrow,independentofthe18 FITSblockstructure.ThepositionsinthelastdatablockafterthelastcharacterofthelastrowofthetableshallbelledwithASCIIspaces.7.2.4.FieldsEachrowinthearrayshallconsistofasequenceoffrom0to999elds,asspeciedbytheTFIELDSkeyword,withoneentryineacheld.Foreveryeld,theFortran(ISO2004)formatoftheinformationcontained(givenbytheTFORMnkeyword),thelocationintherowofthebeginningoftheeld(givenbytheTBCOLnkeyword),and(optionally,butstronglyrecommended)theeldname(givenbytheTTYPEnkeyword),shallbespeci-edintheassociatedheader.Thelocationandformatofeldsshallbethesameforeveryrow.Fieldsmayoverlap,butthisus-ageisnotrecommended.OnlyalimitedsetofASCIIcharactervaluesmayappearwithinanyeld,dependingontheeldtypeasspeciedbelow.Theremaybecharactersinatablerowthatarenotincludedinanyeld,(e.g.,betweenelds,orbeforethersteldorafterthelasteld).Any7-bitASCIIcharactermayoccurincharactersofatablerowthatarenotincludedinade-nedeld.Acommonconventionistoincludeaspacecharacterbetweeneacheldforaddedlegibilityifthetablerowisdis-playedverbatim.Itisalsopermissibletoaddcontrolcharacters,suchasacarriagereturnorlinefeedcharacter,followingthelasteldineachrowasawayofformattingthetableifitisprintedordisplayedbyatexteditingprogram.7.2.5.EntriesAlldatainanASCIItableextensioneldshallbeASCIItextinaformatthatconformstotherulesforxedeldinputinFortran(ISO2004)format,asdescribedbelow.Theonlypossiblefor-matsshallbethosespeciedinTable15.Ifvaluesof0and+0needtobedistinguished,thenthesigncharactershouldap-pearinaseparateeldincharacterformat.TNULLnkeywordsmaybeusedtospecifyacharacterstringthatrepresentsanun-denedvalueineacheld.Thecharactersrepresentinganunde-nedvaluemaydi erfromeldtoeldbutmustbethesamewithinaeld.WritersofASCIItablesshouldselectaformatforeacheldthatisappropriatetotheform,rangeofvalues,andaccuracyofthedatainthateld.Thisstandarddoesnotimposeanupperlimitonthenumberofdigitsofprecision,noranylimitontherangeofnumericvalues.Softwarepackagesthatreadorwritedataaccordingtothisstandardcouldbelimited,however,intherangeofvaluesandexponentsthataresupported(e.g.,totherangethatcanberepresentedby32-bitor64-bitbinarynumbers).Thevalueofeachentryshallbeinterpretedasdescribedinthefollowingparagraphs.Characterelds.Thevalueofacharacter-formatted(Aw)eldisacharacterstringofwidthwcontainingthecharactersincolumnsTBCOLnthroughTBCOLn+w1.ThecharacterstringshallbecomposedoftherestrictedsetofASCIItextcharacterswithdecimalvaluesintherange32through126(hexadecimal20through7E).Integerelds.Thevalueofaninteger-formatted(Iw)eldisasigneddecimalintegercontainedincolumnsTBCOLnthroughTBCOLn+w1consistingofasingleoptionalsign(`+'or`-')followedbyoneormoredecimaldigits(`0'through`9').Non-signicantspacecharactersmayprecedeand/orfollowtheinte-gervaluewithintheeld.Ablankeldhasvalue0.Allcharac-tersotherthanleadingandtrailingspaces,acontiguousstringofdecimaldigits,andasingleleadingsigncharacterareforbidden.Realelds.Thevalueofareal-formattedeld(Fw.d,Ew.d,Dw.d)isarealnumberdeterminedfromthewcharactersfromcolumnsTBCOLnthroughTBCOLn+w1.Thevalueisformedby1.discardinganytrailingspacecharactersintheeldandright-justifyingtheremainingcharacters,2.interpretingtherstnon-spacecharactersasanumericstringconsistingofasingleoptionalsign(`+'or`-')followedbyoneormoredecimaldigits(`0'through`9')optionallycontainingasingledecimalpoint(`.').Thenumericstringisterminatedbytheendoftheright-justiedeldorbytheoccurrenceofanycharacterotherthanadecimalpoint(`.')andthedecimalintegers(`0'through`9').Ifthestringcontainsnoexplicitdecimalpoint,thentheimplicitdeci-malpointistakenasimmediatelyprecedingtherightmostddigitsofthestring,withleadingzerosassumedifneces-sary.TheuseofimplicitdecimalpointsisdeprecatedandisstronglydiscouragedbecauseofthepossibilitythatFITSreadingprogramswillmisinterpretthedatavalue.Therefore,real-formattedeldsshouldalwayscontainanexplicitdeci-malpoint.3.Ifthenumericstringisterminatedbya(a)`+'or`-',interpretingthefollowingstringasanexpo-nentintheformofasigneddecimalinteger,or(b)`E',or`D',interpretingthefollowingstringasanexpo-nentoftheformEorDfollowedbyanoptionallysigneddecimalintegerconstant.4.Theexponentstring,ifpresent,isterminatedbytheendoftheright-justiedstring.5.Charactersotherthanthosespeciedabove,includingem-beddedspacecharacters,areforbidden.Thenumericvalueofthetableeldisthenthevalueofthenu-mericstringmultipliedbyten(10)tothepoweroftheexponentstring,i.e.,value=numeric string10(exponent string).Thedefaultexponentiszeroandablankeldhasvaluezero.Thereisnodif-ferencebetweentheF,D,andEformats;thecontentofthestringdeterminesitsinterpretation.Numbersrequiringmoreprecisionand/orrangethanthelocalcomputercansupportmayberep-resented.ItisgoodformtospecifyaDformatinTFORMnforacolumnofanASCIItablewhenthatcolumnwillcontainnum-bersthatcannotbeaccuratelyrepresentedin32-bitIEEEbinaryformat(seeAppendixE).7.3.BinarytableextensionThebinarytableextensionissimilartotheASCIItableinthatitprovidesameansofstoringcatalogsandtablesofastronomicaldatainFITSformat,however,ito ersmorefeaturesandpro-videsmore-ecientdatastoragethanASCIItables.Thenumer-icalvaluesinbinarytablesarestoredinmore-compactbinaryformatsratherthancodedintoASCII,andeacheldofabinarytablecancontainanarrayofvaluesratherthanasimplescalar19 Table17.Mandatorykeywordsinbinarytableextensions. #Keyword 1XTENSION= 'BINTABLE'2BITPIX=83NAXIS=24NAXIS15NAXIS26PCOUNT7GCOUNT=18TFIELDS:::(otherkeywords,including(ifTFIELDSisnotzero)...)TTYPEn,n=1,2,...,kwherekisthevalueofTFIELDS(Recommended)TFORMn,n=1,2,...,kwherekisthevalueofTFIELDS(Required):::lastEND asinASCIItables.TherstkeywordinabinarytableextensionshallbeXTENSION= 'BINTABLE'.7.3.1.MandatorykeywordsTheXTENSIONkeywordistherstkeywordofallbinarytableextensions.Thesevenkeywordsfollowing(BITPIX...TFIELDS)mustbeintheorderspeciedinTable17,withnointerveningkeywords.XTENSIONkeyword.Thevalueeldshallcontainthecharacterstring'BINTABLE'.BITPIXkeyword.Thevalueeldshallcontaintheinteger8,denotingthatthearrayisanarrayof8-bitbytes.NAXISkeyword.Thevalueeldshallcontaintheinteger2,de-notingthattheincludeddataarrayistwo-dimensional:rowsandcolumns.NAXIS1keyword.Thevalueeldshallcontainanon-negativeinteger,givingthenumberof8-bitbytesineachrowofthetable.NAXIS2keyword.Thevalueeldshallcontainanon-negativeinteger,givingthenumberofrowsinthetable.PCOUNTkeyword.Thevalueeldshallcontainthenumberofbytesthatfollowthetableinthesupplementaldataareacalledtheheap.GCOUNTkeyword.Thevalueeldshallcontaintheinteger1;thedatablockscontainasingletable.TFIELDSkeyword.Thevalueeldshallcontainanon-negativeintegerrepresentingthenumberofeldsineachrow.Themax-imumpermissiblevalueis999.TFORMnkeywords.TheTFORMnkeywordsmustbepresentforallvaluesn=1,...,TFIELDSandfornoothervaluesofn.ThevalueeldofthisindexedkeywordshallcontainacharacterstringoftheformrTa.TherepeatcountristheASCIIrepre-sentationofanon-negativeintegerspecifyingthenumberofele-mentsineldn.Thedefaultvalueofris1;therepeatcountneednotbepresentifithasthedefaultvalue.Azeroelementcount,indicatinganemptyeld,ispermitted.ThedatatypeTspeciesthedatatypeofthecontentsofeldn.OnlythedatatypesinTable18arepermitted.Theformatcodesmustbespeciedinuppercase.ForeldsoftypePorQ,theonlypermittedrepeatcountsare0and1.Theadditionalcharactersaareoptionalandarenotfurtherdenedinthisstandard.Table18liststhenumberofbyteseachdatatypeoccupiesinatablerow.Thersteldofarowisnumbered1.Thetotalnumberofbytesnrowinatablerowisgivenbynrow=TFIELDSXi=1ribi(8)whereriistherepeatcountforeldi,biisthenumberofbytesforthedatatypeineldi,andTFIELDSisthevalueofthatkey-word,mustequalthevalueofNAXIS1.ENDkeyword.Thiskeywordhasnoassociatedvalue.Bytes9through80shallcontainASCIIspaces(decimal32orhexadec-imal20).7.3.2.OtherreservedkeywordsInadditiontothereservedkeywordsdenedinSect.4.4.2(ex-ceptforEXTENDandBLOCKED),thefollowingotherreservedkeywordsmaybeusedtodescribethestructureofabinarytabledataarray.Theyareoptional,butiftheyappearwithinabinarytableextensionheader,theymustbeusedasdenedinthissec-tionofthisstandard.TTYPEnkeywords.Thevalueeldforthisindexedkeywordshallcontainacharacterstringgivingthenameofeldn.Itisstronglyrecommendedthateveryeldofthetablebeassigned20 Table18.ValidTFORMndatatypesinBINTABLEextensions. TFORMnvalueDescription8-bitBytes LLogical1XBityBUnsignedbyte1I16-bitinteger2J32-bitinteger4K64-bitinteger8ACharacter1ESingleprecisionoatingpoint4DDoubleprecisionoatingpoint8CSingleprecisioncomplex8MDoubleprecisioncomplex16PArrayDescriptor(32-bit)8QArrayDescriptor(64-bit)16 Notes.(y)Numberof8-bitbytesneededtocontainallbits.aunique,case-insensitivenamewiththiskeyword,anditisrec-ommendedthatthecharacterstringbecomposedonlyofupperandlowercaseletters,digits,andtheunderscore(` ',decimal95,hexadecimal5F)character.Useofothercharactersisnotrec-ommendedbecauseitmaybediculttomapthecolumnnamesintovariablesinsomelanguages(e.g.,anyhyphens,`*'or`+'charactersinthenamemaybeconfusedwithmathematicalop-erators).StringcomparisonswiththeTTYPEnkeywordvaluesshouldnotbecasesensitive(e.g.,'TIME'and'Time'shouldbeinterpretedasthesamename).TUNITnkeywords.Thevalueeldshallcontainacharacterstringdescribingthephysicalunitsinwhichthequantityineldn,afteranyapplicationofTSCALnandTZEROn,isexpressed.UnitsmustfollowtheprescriptionsinSect.4.3.TSCALnkeywords.Thisindexedkeywordshallbeused,alongwiththeTZEROnkeyword,tolinearlyscalethevaluesinthetableeldntotransformthemintothephysicalvaluesthattheyrepre-sentusingEq.7.ItmustnotbeusediftheformatofeldnisA,L,orX.Foreldswithallotherdatatypes,thevalueeldshallcontainaoating-pointnumberrepresentingthecoecientofthelinearterminEq.7,whichisusedtocomputethetruephys-icalvalueoftheeld,or,inthecaseofthecomplexdatatypesCandM,oftherealpartoftheeld,withtheimaginarypartofthescalingfactorsettozero.Thedefaultvalueforthiskeywordis1.0.ForeldsoftypePorQ,thevaluesofTSCALnandTZEROnaretobeappliedtothevaluesinthedataarrayintheheaparea,notthevaluesofthearraydescriptor(seeSect.7.3.5).TZEROnkeywords.Thisindexedkeywordshallbeused,alongwiththeTSCALnkeyword,tolinearlyscalethevaluesintheta-bleeldntotransformthemintothephysicalvaluesthattheyrepresentusingEq.7.ItmustnotbeusediftheformatofeldnisA,L,orX.Foreldswithallotherdatatypes,thevalueeldshallcontainaoating-pointnumberrepresentingthetruephys-icalvaluecorrespondingtoavalueofzeroineldnoftheFITSle,or,inthecaseofthecomplexdatatypesCandM,intherealpartoftheeld,withtheimaginarypartsettozero.Thedefaultvalueforthiskeywordis0.0.Equation7isusedtocomputeatruephysicalvaluefromthequantityineldn.ForeldsoftypePorQ,thevaluesofTSCALnandTZEROnaretobeappliedtothevaluesinthedataarrayintheheaparea,notthevaluesofthearraydescriptor(seeSect.7.3.5).Inadditiontoitsuseinrepresentingoating-pointvaluesasscaledintegers,theTZEROnkeywordisalsousedwhenstor-ingunsignedintegervaluesintheeld.InthisspecialcasetheTSCALnkeywordshallhavethedefaultvalueof1.0andtheTZEROnkeywordshallhaveoneoftheintegervaluesshowninTable19Sincethebinarytableformatdoesnotsupportanativeun-signedintegerdatatype(exceptfortheunsigned8-bit'B'col-umntype),theunsignedvaluesarestoredintheeldasnativesignedintegerswiththeappropriateintegero setspeciedbytheTZEROnkeywordvalueshowninthetable.Forthebytecol-umntype,theconversetechniquecanbeusedtostoresignedbytevaluesasnativeunsignedvalueswiththenegativeTZEROno set.Ineachcase,thephysicalvalueiscomputedbyaddingtheo setspeciedbytheTZEROnkeywordtothenativedatatypevaluethatisstoredinthetableeld.TNULLnkeywords.ThevalueeldforthisindexedkeywordshallcontaintheintegerthatrepresentsanundenedvalueforeldnofdatatypeB,I,JorK,orPorQarraydescriptorelds(Sect.7.3.5)thatpointtoB,I,JorKintegerarrays.Thekeywordmustnotbeusedifeldnisofanyotherdatatype.Thevalueofthiskeywordcorrespondstothetablecolumnvaluesbeforeap-plyinganytransformationindicatedbytheTSCALnandTZEROnkeywords.IftheTSCALnandTZEROnkeywordsdonothavethedefaultvaluesof1.0and0.0,respectively,thenthevalueoftheTNULLnkeywordmustequaltheactualvalueintheFITSlethatisusedtorepresentanundenedelementandnotthecorrespond-ingphysicalvalue(computedfromEq.7).Tociteaspecic,commonexample,unsigned16-bitintegersarerepresentedinasignedintegercolumn(withTFORMn='I')bysettingTZEROn=32768andTSCALn=1.Ifitisdesiredtouseelementsthathaveanunsignedvalue(i.e.,thephysicalvalue)equalto0torepresentundenedelementsintheeld,thentheTNULLnkey-wordmustbesettothevalue-32768becausethatistheactualvaluestoredintheFITSleforthoseelementsintheeld.TDISPnkeywords.Thevalueeldofthisindexedkeywordshallcontainacharacterstringdescribingtheformatrecom-mendedfordisplayinganASCIItextrepresentationofthecon-tentsofeldn.Ifthetablevaluehasbeenscaled,thephysicalvalue,derivedusingEq.7,shallbedisplayed.Allelementsinaeldshallbedisplayedwithasingle,repeatedformat.Forpur-posesofdisplay,eachbyteofbit(typeX)andbyte(typeB)ar-raysistreatedasanunsignedinteger.ArraysoftypeAmaybeterminatedwithazerobyte.OnlytheformatcodesinTable20,interpretedasFortran(ISO2004)outputformats,anddiscussedinmoredetailinSect.7.3.4,arepermittedforencoding.Theformatcodesmustbespeciedinuppercase.IftheBw.m,Ow.m,andZw.mformatsarenotreadilyavailabletothereader,theIw.mdisplayformatmaybeusedinstead,andiftheENw.dandESw.dformatsarenotavailable,Ew.dmaybeused.InthecaseofeldsoftypePorQ,theTDISPnvalueappliestothedataarraypointedtobythearraydescriptor(Sect.7.3.5),notthevaluesinthearraydescriptoritself.21 Table19.UsageofTZEROntorepresentnon-defaultintegerdatatypes. TFORMnNativePhysicalTZEROndatatypedatatype Bunsignedsignedbyte-128(27)Isignedunsigned16-bit32768(215)Jsignedunsigned32-bit2147483648(231)Ksignedunsigned64-bit9223372036854775808(263) Table20.ValidTDISPnformatvaluesinBINTABLEextensions. FieldValueDatatype AwCharacterLwLogicalIw.mIntegerBw.mBinary,integersonlyOw.mOctal,integersonlyZw.mHexadecimal,integersonlyFw.dFloating-point,xeddecimalnotationEw.dEeFloating-point,exponentialnotationENw.dEngineering;EformatwithexponentmultipleofthreeESw.dScientic;sameasENbutnon-zeroleadingdigitifnotzeroGw.dEeGeneral;appearsasFifsignicancenotlost,elseE.Dw.dEeFloating-point,exponentialnotation Notes.wisthewidthincharactersofdisplayedvalues,mistheminimumnumberofdigitsdisplayed,disthenumberofdigitstorightofdecimal,andeisnumberofdigitsinexponent.The.mandEeeldsareoptional.THEAPkeyword.Thevalueeldofthiskeywordshallcontainanintegerprovidingtheseparation,inbytes,betweenthestartofthemaindatatableandthestartofasupplementaldataareacalledtheheap.Thedefaultvalue,whichisalsotheminimumallowedvalue,shallbetheproductofthevaluesofNAXIS1andNAXIS2.ThiskeywordshallnotbeusedifthevalueofPCOUNTiszero.TheuseofthiskeywordisdescribedininSect.7.3.5.TDIMnkeywords.Thevalueeldofthisindexedkeywordshallcontainacharacterstringdescribinghowtointerpretthecon-tentsofeldnasamulti-dimensionalarraywithaformatof'(l,m,n...)'wherel,m,n,...arethedimensionsofthear-ray.Thedataareorderedsuchthatthearrayindexoftherstdimensiongiven(l)isthemostrapidlyvaryingandthatofthelastdimensiongivenistheleastrapidlyvarying.Thetotalnum-berofelementsinthearrayequalstheproductofthedimensionsspeciedintheTDIMnkeyword.ThesizemustbelessthanorequaltotherepeatcountontheTFORMnkeyword,or,inthecaseofcolumnsthathavea'P'or'Q'TFORMndatatype,lessthanorequaltothearraylengthspeciedinthevariable-lengtharrayde-scriptor(seeSect.7.3.5).Inthespecialcasewherethevariable-lengtharraydescriptorhasasizeofzero,thentheTDIMnkey-wordisnotapplicable.IfthenumberofelementsinthearrayimpliedbytheTDIMnislessthantheallocatedsizeofthear-rayintheFITSle,thentheunusedtrailingelementsshouldbeinterpretedascontainingundenedllvalues.Acharacterstringisrepresentedinabinarytablebyaone-dimensionalcharacterarray,asdescribedunder`Character'inthelistofdatatypesinSect.7.3.3.Forexample,aFortranCHARACTER*20variablecouldberepresentedinabinaryta-bleasacharacterarraydeclaredasTFORMn='20A'.Arraysofstrings,i.e.,multi-dimensionalcharacterarrays,mayberep-resentedusingtheTDIMnnotation.Forexample,ifTFORMn='60A'andTDIMn='(5,4,3)',thentheentryconsistsofa43arrayofstringsofvecharacterseach.7.3.3.DataSequenceThedatainabinarytableextensionshallconsistofamaindatatablewhichmay,butneednot,befollowedbyadditionalbytesinthesupplementaldataarea.Thepositionsinthelastdatablockafterthelastadditionalbyte,or,iftherearenoadditionalbytes,thelastcharacterofthelastrowofthemaindatatable,shallbelledbysettingallbitstozero.7.3.3.1.MaindatatableThetableisconstructedfromatwo-dimensionalbytear-ray.ThenumberofbytesinarowshallbespeciedbythevalueoftheNAXIS1keywordandthenumberofrowsshallbespeciedbytheNAXIS2keywordoftheassociatedheader.Withinarow,eldsshallbestoredinorderofincreasingcolumnnumber,asdeterminedfromthenoftheTFORMnkeywords.Thenumberofbytesinarowandthenumberofrowsinthetableshalldeterminethesizeofthebytearray.Everyrowinthearrayshallhavethesamenumberofbytes.Therstrowshallbeginatthestartofthedatablockimmediatelyfollowingthelastheaderblock.Subsequentrowsshallbeginimmediatelyfollowingtheendofthepreviousrow,withnointerveningbytes,independentoftheFITSblockstructure.Wordsneednotbealignedalongwordboundaries.Eachrowinthearrayshallconsistofasequenceoffrom0to999eldsasspeciedbytheTFIELDSkeyword.ThenumberofelementsineacheldandtheirdatatypeshallbespeciedbytheTFORMnkeywordintheassociatedheader.Aseparatefor-matkeywordmustbeprovidedforeacheld.Thelocationand22 formatofeldsshallbethesameforeveryrow.Fieldsmaybeempty,iftherepeatcountspeciedinthevalueoftheTFORMnkeywordoftheheaderis0.Writersofbinarytablesshouldselectaformatappropriatetotheform,rangeofvalues,andaccuracyofthedatainthetable.Thefollowingdatatypes,andnoothers,arepermitted.Logical.IfthevalueoftheTFORMnkeywordspeciesdatatypeL,thecontentsofeldnshallconsistofASCIITindicatingtrueorASCIIF,indicatingfalse.A0byte(hexadecimal00)indicatesaNULLvalue.Bitarray.IfthevalueoftheTFORMnkeywordspeciesdatatypeX,thecontentsofeldnshallconsistofasequenceofbitsstart-ingwiththemostsignicantbit;thebitsfollowingshallbeinorderofdecreasingsignicance,endingwiththeleastsigni-cantbit.Abitarrayshallbecomposedofanintegralnumberofbytes,withthosebitsfollowingtheendofthedatasettozero.Nonullvalueisdenedforbitarrays.Character.IfthevalueoftheTFORMnkeywordspeciesdatatypeA,eldnshallcontainacharacterstringofzeroormoremembers,composedoftherestrictedsetofASCIItextcharac-ters.ThischaracterstringmaybeterminatedbeforethelengthspeciedbytherepeatcountbyanASCIINULL(hexadecimalcode00).CharactersaftertherstASCIINULLarenotdened.AstringwiththenumberofcharactersspeciedbytherepeatcountisnotNULLterminated.NullstringsaredenedbythepresenceofanASCIINULLastherstcharacter.Unsigned8-Bitinteger.IfthevalueoftheTFORMnkeywordspeciesdatatypeB,thedataineldnshallconsistofunsigned8-bitintegers,withthemostsignicantbitrst,andsubsequentbitsinorderofdecreasingsignicance.NullvaluesaregivenbythevalueoftheassociatedTNULLnkeyword.SignedintegerscanberepresentedusingtheconventiondescribedinSect.5.2.5.16-Bitinteger.IfthevalueoftheTFORMnkeywordspeciesdatatypeI,thedataineldnshallconsistoftwo'scomplementsigned16-bitintegers,containedintwobytes.Themostsigni-cantbyteshallberst(big-endianbyteorder).Withineachbytethemostsignicantbitshallberst,andsubsequentbitsshallbeinorderofdecreasingsignicance.NullvaluesaregivenbythevalueoftheassociatedTNULLnkeyword.UnsignedintegerscanberepresentedusingtheconventiondescribedinSect.5.2.5.32-Bitinteger.IfthevalueoftheTFORMnkeywordspeciesdatatypeJ,thedataineldnshallconsistoftwo'scomple-mentsigned32-bitintegers,containedinfourbytes.Themostsignicantbyteshallberst,andsubsequentbytesshallbeinorderofdecreasingsignicance(big-endianbyteorder).Withineachbyte,themostsignicantbitshallberst,andsubsequentbitsshallbeinorderofdecreasingsignicance.NullvaluesaregivenbythevalueoftheassociatedTNULLnkeyword.UnsignedintegerscanberepresentedusingtheconventiondescribedinSect.5.2.5.64-Bitinteger.IfthevalueoftheTFORMnkeywordspeciesdatatypeK,thedataineldnshallconsistoftwo'scomple-mentsigned64-bitintegers,containedineightbytes.Themostsignicantbyteshallberst,andsubsequentbytesshallbeinorderofdecreasingsignicance.Withineachbyte,themostsig-nicantbitshallberst,andsubsequentbitsshallbeinorderofdecreasingsignicance(big-endianbyteorder).NullvaluesaregivenbythevalueoftheassociatedTNULLnkeyword.UnsignedintegerscanberepresentedusingtheconventiondescribedinSect.5.2.5.Singleprecisionoatingpoint.IfthevalueoftheTFORMnkey-wordspeciesdatatypeE,thedataineldnshallconsistofANSI/IEEE-754(IEEE1985)32-bitoating-pointnumbers,inbig-endianbyteorder,asdescribedinAppendixE.AllIEEEspecialvaluesarerecognized.TheIEEENaNisusedtorepre-sentnullvalues.Doubleprecisionoatingpoint.IfthevalueoftheTFORMnkeywordspeciesdatatypeD,thedataineldnshallcon-sistofANSI/IEEE-754(IEEE1985)64-bitdoubleprecisionoating-pointnumbers,inbig-endianbyteorder,asdescribedinAppendixE.AllIEEEspecialvaluesarerecognized.TheIEEENaNisusedtorepresentnullvalues.Singleprecisioncomplex.IfthevalueoftheTFORMnkeywordspeciesdatatypeC,thedataineldnshallconsistofase-quenceofpairsof32-bitsingleprecisionoating-pointnum-bers.Therstmemberofeachpairshallrepresenttherealpartofacomplexnumber,andthesecondmembershallrepresenttheimaginarypartofthatcomplexnumber.IfeithermembercontainsanIEEENaN,theentirecomplexvalueisnull.Doubleprecisioncomplex.IfthevalueoftheTFORMnkeywordspeciesdatatypeM,thedataineldnshallconsistofase-quenceofpairsof64-bitdoubleprecisionoating-pointnum-bers.Therstmemberofeachpairshallrepresenttherealpartofacomplexnumber,andthesecondmemberofthepairshallrepresenttheimaginarypartofthatcomplexnumber.IfeithermembercontainsanIEEENaN,theentirecomplexvalueisnull.Arraydescriptor.TherepeatcountonthePandQarraydescrip-toreldsmusteitherhaveavalueof0(denotinganemptyeldofzerobytes)or1.IfthevalueoftheTFORMnkeywordspeciesdatatype1P,thedataineldnshallconsistofonepairof32-bitintegers.IfthevalueoftheTFORMnkeywordspeciesdatatype1Q,thedataineldnshallconsistofonepairof64-bitintegers.ThemeaningoftheseintegersisdenedinSect.7.3.5.7.3.3.2.BytesfollowingmaintableThemaindatatablemaybefollowedbyasupplementaldataareacalledtheheap.Thesizeofthesupplementaldataarea,inbytes,isspeciedbythevalueofthePCOUNTkeyword.TheuseofthisdataareaisdescribedinSect.7.3.5.23 7.3.4.DatadisplayTheindexedTDISPnkeywordmaybeusedtodescribetherec-ommendedformatfordisplayinganASCIItextrepresentationofthecontentsofeldn.Thepermitteddisplayformatcodesforeachtypeofdata(i.e.,characterstrings,logical,integer,orreal)aregiveninTable20anddescribedbelow.Characterdata.Ifthetablecolumncontainsacharacterstring(withTFORMn='rA')thentheTDISPnformatcodemustbe'Aw'wherewisthenumberofcharacterstodisplay.Ifthechar-acterdatumhaslengthlessthanorequaltow,itisrepresentedonoutputright-justiedinastringofwcharacters.Ifthechar-acterdatumhaslengthgreaterthanw,therstwcharactersofthedatumarerepresentedonoutputinastringofwcharacters.Characterdataarenotsurroundedbysingleordoublequotationmarksunlessthosemarksarethemselvespartofthedatavalue.Logicaldata.Ifthetablecolumncontainslogicaldata(withTFORMn='rL')thentheTDISPnformatcodemustbe'Lw'wherewisthewidthincharactersofthedisplayeld.LogicaldataarerepresentedonoutputwiththecharacterTfortrueorFforfalseright-justiedinaspace-lledstringofwcharacters.Anullvaluemayberepresentedbyastringofwspacecharacters.Integerdata.Ifthetablecolumncontainsintegerdata(withTFORMn='rX','rB','rI','rJ',or'rK')thentheTDISPnformatcodemayhaveanyoftheseforms:Iw.m,Bw.m,Ow.m,orZw.m.Thedefaultvalueofmisoneandthe`.m'isoptional.TherstletterofthecodespeciesthenumberbasefortheencodingwithIfordecimal(10),Bforbinary(2),Oforoctal(8),andZforhexadecimal(16).Hexadecimalformatusestheupper-caselettersAthroughFtorepresentdecimalvalues10through15.Theoutputeldconsistsofwcharacterscontain-ingzeroormoreleadingspacesfollowedbyaminussigniftheinternaldatumisnegative(onlyinthecaseofdecimalencod-ingwiththeIformatcode)followedbythemagnitudeoftheinternaldatumintheformofanunsignedintegerconstantinthespeciednumberbasewithonlyasmanyleadingzerosasareneededtohaveatleastmnumericdigits.Notethatmwisal-lowedifallvaluesarepositive,butmwisrequiredifanyvaluesarenegative.Ifthenumberofdigitsrequiredtorepresentthein-tegerdatumexceedsw,thentheoutputeldconsistsofastringofwasterisk(*)characters.Realdata.Ifthetablecolumncontainsrealdata(withTFORMn='rE',or'rD')orcontainsintegerdata(withanyoftheTFORMnformatcodeslistedinthepreviousparagraph)whicharerecommendedtobedisplayedasrealvalues(i.e.,especiallyincaseswheretheintegervaluesrepresentscaledphysicalval-uesusingEq.7),thentheTDISPnformatcodemayhaveanyoftheseforms:Fw.d,Ew.dEe,Dw.dEe,ENw.d,orESw.d.Inallcases,theoutputisastringofwcharactersincludingthedeci-malpoint,anysigncharacters,andanyexponentincludingtheexponent'sindicators,signs,andvalues.Ifthenumberofdigitsrequiredtorepresenttherealdatumexceedsw,thentheoutputeldconsistsofastringofwasterisk(*)characters.Inallcases,dspeciesthenumberofdigitstoappeartotherightofthedec-imalpoint.TheFformatcodeoutputeldconsistsofwd1charac-terscontainingzeroormoreleadingspacesfollowedbyaminussigniftheinternaldatumisnegativefollowedbytheabsolutemagnitudeoftheinternaldatumintheformofanunsignedin-tegerconstant.Thesecharactersarefollowedbyadecimalpoint(`.')anddcharactersgivingthefractionalpartoftheinternaldatum,roundedbythenormalrulesofarithmetictodfractionaldigits.FortheEandDformatcodes,anexponentistakensuchthatthefraction0:1jdatumj=10exponent1:0.Thefraction(withappropriatesign)isoutputwithanFformatofwidthwe2characterswithdcharactersafterthedecimalfollowedbyanEorDfollowedbytheexponentasasignede+1characterintegerwithleadingzerosasneeded.Thedefaultvalueofeis2whentheEeportionoftheformatcodeisomitted.Iftheexponentvaluewillnottine+1charactersbutwilltine+2thentheE(orD)isomittedandthewidereldused.Iftheexponentvaluewillnott(withasigncharacter)ine+2characters,thentheentirew-characteroutputeldislledwithasterisks(*).TheESformatcodeisprocessedinthesamemannerastheEformatcodeexceptthattheexponentistakensothat1:0fraction10.TheENformatcodeisprocessedinthesamemannerastheEformatcodeexceptthattheexponentistakentobeanintegermultipleofthreeandsothat1:0fraction1000:0.Allrealformatcodeshavenumberbase10.Thereisnodi erencebe-tweenEandDformatcodesoninputotherthananimplicationwiththelatterofgreaterprecisionintheinternaldatum.TheGw.dEeformatcodemaybeusedwithdataofanytype.Fordataoftypeinteger,logical,orcharacter,itisequivalenttoIw,Lw,orAw,respectively.Fordataoftypereal,itisequivalenttoanFformat(withdi erentnumbersofcharactersafterthedecimal)whenthatformatwillaccuratelyrepresentthevalueandisequivalenttoanEformatwhenthenumber(inabsolutevalue)iseitherverysmallorverylarge.Specically,forrealvaluesoutsidetherange0:10:510d1value10d0:5,itisequivalenttoEw.dEe.Forrealvalueswithintheaboverange,itisequivalenttoFw0:d0followedby2+espaces,wherew0=we2andd0=dkfork=0;1;:::;diftherealdatumvalueliesintherange10k110:510dvalue10k10:510d.Complexdata.Ifthetablecolumncontainscomplexdata(withTFORMn='rC',or'rM')thenthemaybedisplayedwithanyoftherealdataformatsasdescribedabove.Thesameformatisusedfortherealandimaginaryparts.Itisrecommendedthatthetwovaluesbeseparatedbyacommaandenclosedinparentheseswithatotaleldwidthof2w+3.7.3.5.Variable-lengtharraysOneofthemostattractivefeaturesofbinarytablesisthatanyeldofthetablecanbeanarray.Inthestandardcasethisisaxed-sizearray,i.e.,axedamountofstorageisallocatedineachrowforthearraydata—whetheritisusedornot.Thisisnesolongasthearraysaresmalloraxedamountofarraydatawillbestoredineacheld,butifthestoredarraylengthvariesfordi erentrows,itisnecessarytoimposeaxedupperlimitonthesizeofthearraythatcanbestored.Ifthisupperlimitismadetoolargeexcessivewastedspacecanresultandthebinarytable24 mechanismbecomesseriouslyinecient.Ifthelimitissettoolowthenstoringcertaintypesofdatainthetablecouldbecomeimpossible.Thevariable-lengtharrayconstructpresentedherewasde-visedtodealwiththisproblem.Variable-lengtharraysareim-plementedinsuchawaythat,evenifatablecontainssuchar-rays,asimplereaderprogramthatdoesnotunderstandvariable-lengtharrayswillstillbeabletoreadthemaindatatable(inotherwordsatablecontainingvariable-lengtharraysconformstothebasicbinarytablestandard).Theimplementationchosenissuchthattherowsinthemaindatatableremainxedinsizeevenifthetablecontainsavariable-lengtharrayeld,allowingecientrandomaccesstothemaindatatable.Variable-lengtharraysarelogicallyequivalenttoregularstaticarrays,theonlydi erencesbeing1)thelengthofthestoredarraycandi erfordi erentrows,and2)thearraydataarenotstoreddirectlyinthemaindatatable.Sinceaeldofanydatatypecanbeastaticarray,aeldofanydatatypecanalsobeavariable-lengtharray(excludingthetypePandQvariable-lengtharraydescriptorsthemselves,whicharenotadatatypesomuchasastorage-classspecier).OtherestablishedFITSconventionsthatapplytostaticarrayswillgenerallyapplyaswelltovariable-lengtharrays.Avariable-lengtharrayisdeclaredinthetableheaderwithoneofthefollowingtwospecialelddatatypespeciersrPt(emax)rQt(emax)wherethe`P'or`Q'indicatesthepresenceofanarraydescrip-tor(describedbelow),theelementcountrshouldbe0,1,orabsent,tisacharacterdenotingthedatatypeofthearraydata(L,X,B,I,J,K,etc.,butnotPorQ),andemaxisaquantityguar-anteedtobeequaltoorgreaterthanthemaximumnumberofelementsoftypetactuallystoredinanyrowofthetable.Thereisnobuilt-inupperlimitonthesizeofastoredarray(otherthanthefundamentallimitimposedbytherangeofthearraydescrip-tor,denedbelow);emaxmerelyreectsthesizeofthelargestarrayactuallystoredinthetable,andisprovidedtoavoidtheneedtopreviewthetablewhen,forexample,readingatablecontainingvariable-lengthelementsintoadatabasethatsupportsonlyxed-sizearrays.TheremaybeadditionalcharactersintheTFORMnkeywordfollowingtheemax.Forexample,TFORM8='PB(1800)'/Variablebytearrayindicatesthateld8ofthetableisavariable-lengtharrayoftypebyte,withamaximumstoredarraylengthnottoexceed1800arrayelements(bytesinthiscase).Thedataforthevariable-lengtharraysinatablearenotstoredinthemaindatatable;theyarestoredinasupplementaldataarea,theheap,followingthemaindatatable.Whatisstoredinthemaindatatableeldisanarraydescriptor.Thisconsistsoftwo32-bitsignedintegervaluesinthecaseof`P'arrayde-scriptors,ortwo64-bitsignedintegervaluesinthecaseof`Q'arraydescriptors:thenumberofelements(arraylength)ofthestoredarray,followedbythezero-indexedbyteo setoftherstelementofthearray,measuredfromthestartoftheheaparea.Themeaningofanegativevalueforeitheroftheseintegersisnotdenedbythisstandard.Storageforthearrayiscontiguous.ThearraydescriptorforeldNasitwouldappearembeddedinatablerowisillustratedsymbolicallybelow::::[eldN–1][(nelem,o set)][eldN+1]:::Ifthestoredarraylengthiszerothereisnoarraydata,andtheo setvalueisundened(itshouldbesettozero).Thestor-agereferencedbyanarraydescriptormustlieentirelywithintheheaparea;negativeo setsarenotpermitted.Abinarytablecontainingvariable-lengtharraysconsistsofthreeprincipalsegments,asfollows:[tableheader][maindatatable](optionalgap)[heaparea]Thetableheaderconsistsofoneormore2880-byteheaderblockswiththelastblockindicatedbythekeywordENDsome-whereintheblock.ThemaindatatablebeginswiththerstdatablockfollowingthelastheaderblockandisNAXIS1NAXIS2bytesinlength.Thezeroindexedbyteo settothestartoftheheap,measuredfromthestartofthemaindatatable,maybegivenbytheTHEAPkeywordintheheader.Ifthiskey-wordismissingthentheheapbeginswiththebyteimmediatelyfollowingmaindatatable(i.e.,thedefaultvalueofTHEAPisNAXIS1NAXIS2).ThisdefaultvalueistheminimumallowedvaluefortheTHEAPkeyword,becauseanysmallervaluewouldimplythattheheapandthemaindatatableoverlap.IftheTHEAPkeywordhasavaluelargerthanthisdefaultvalue,thenthereisagapbetweentheendofthemaindatatableandthestartoftheheap.Thetotallengthinbytesofthesupplementaldataareafollowingthemaindatatable(gapplusheap)isgivenbythePCOUNTkeywordinthetableheader.Forexample,supposeatablecontainsverowswhichareeach168byteslong,withaheaparea3000byteslong,begin-ningatano setof2880,therebyaligningthemaindatatableandheapareasondatablockboundaries(thisalignmentisnotnecessarilyrecommendedbutisusefulforthisexample).Thedataportionofthetableconsistsofthree2880-bytedatablocks:therstblockcontainsthe840bytesfromtheverowsofthemaindatatablefollowedby2040llbytes;theheapcompletelyllsthesecondblock;thethirdblockcontainstheremaining120bytesoftheheapfollowedby2760llbytes.PCOUNTgivesthetotalnumberofbytesfromtheendofthemaindatata-bletotheendoftheheapandinthisexamplehasavalueof2040+2880+120=5040.Thisisexpressedinthetableheaderas:NAXIS1=168/WidthoftablerowinbytesNAXIS2=5/NumberofrowsintablePCOUNT=5040/Randomparametercount...THEAP=2880/ByteoffsetofheapareaThevaluesofTSCALnandTZEROnforvariable-lengtharraycolumnentriesaretobeappliedtothevaluesinthedataarrayintheheaparea,notthevaluesofthearraydescriptor.Thesekey-wordscanbeusedtoscaledatavaluesineitherstaticorvariable-lengtharrays.7.3.6.Variable-length-arrayguidelinesWhiletheabovedescriptionissucienttodenetherequiredfeaturesofthevariable-lengtharrayimplementation,somehintsregardingusageofthevariable-lengtharrayfacilitymightalsobeuseful.25 Programsthatreadbinarytablesshouldtakecaretonotas-sumemoreaboutthephysicallayoutofthetablethanisrequiredbythespecication.Forexample,therearenorequirementsonthealignmentofdatawithintheheap.Ifecientruntimeac-cessisaconcernonemightwanttodesignthetablesothatdataarraysarealignedtothesizeofanarrayelement.Inanothercaseonemightwanttominimizestorageandforgoanye ortsatalignment(bycarefuldesignitisoftenpossibletoachievebothgoals).Variable-lengtharraydatamaybestoredintheheapinanyorder,i.e.,thedataforrowN+1arenotnecessarilystoredatalargero setthanthatforrowN.Theremaybegapsintheheapwherenodataarestored.Pointeraliasingispermitted,i.e.,thearraydescriptorsfortwoormorearraysmaypointtothesamestoragelocation(thiscouldbeusedtosavestorageiftwoormorearraysareidentical).Bytearraysareaspecialcasebecausetheycanbeusedtostorea`typeless'datasequence.SinceFITSisamachine-independentstorageformat,someformofmachine-specicdataconversion(byteswapping,oating-pointformatconversion)isimpliedwhenaccessingstoreddatawithtypessuchasintegerandoating,butbytearraysarecopiedtoandfromexternalstor-agewithoutanyformofconversion.Animportantfeatureofvariable-lengtharraysisthatitispossiblethatthestoredarraylengthmaybezero.Thismakesitpossibletohaveacolumnofthetableforwhich,typically,nodataarepresentineachstoredrow.Whendataarepresentthestoredarraycanbeaslargeasnecessary.Thiscanbeusefulwhenstoringcomplexobjectsasrowsinatable.Accessingabinarytablestoredonarandomaccessstoragemediumisstraightforward.Sincetherowsofdatainthemaindatatablearexedinsizetheycanberandomlyaccessedgiventherownumber,bycomputingtheo set.Oncetherowhasbeenreadin,anyvariable-lengtharraydatacanbedirectlyaccessedusingtheelementcountando setgivenbythearraydescriptorstoredinthatrow.Readingabinarytablestoredonasequentialaccessstoragemediumrequiresthatatableofarraydescriptorsbebuiltupasthemaindatatablerowsarereadin.Onceallthetablerowshavebeenread,thearraydescriptorsaresortedbytheo setofthearraydataintheheap.Astheheapdataareread,arraysareextractedsequentiallyfromtheheapandstoredinthea ectedrowsusingthebackpointerstotherowandeldfromthetableofarraydescriptors.Sincearrayaliasingispermitted,itmightbenecessarytostoreagivenarrayinmorethanoneeldorrow.Variable-lengtharraysaremorecomplicatedthanregularstaticarraysandmightnotbesupportedbysomesoftwaresys-tems.TheproducersofFITSdataproductsshouldconsiderthecapabilitiesofthelikelyrecipientsoftheirleswhendecidingwhetherornottousethisformat,andasageneralruleshoulduseitonlyincaseswhereitprovidessignicantadvantagesoverthesimplerxed-lengtharrayformat.Inparticular,theuseofvariable-lengtharraysmightpresentdicultiesforapplicationsthatingesttheFITSleviaasequentialinputstreambecausetheapplicationcannotfullyprocessanyrowsinthetableuntilaftertheentirexed-lengthtableandpotentiallytheentireheaphasbeentransmittedasoutlinedinthepreviousparagraph.8.WorldcoordinatesystemsRepresentationsofthemappingbetweenimagecoordinatesandphysical(i.e.,world)coordinatesystems(WCSs)mayberepre-sentedwithinFITSHDUs.Thekeywordsthatareusedtoexpressthesemappingsarenowrigorouslydenedinaseriesofpa-personworldcoordinatesystems(Greisen&Calabretta2002),celestialcoordinatesystems(Calabretta&Greisen2002),andspectralcoordinatesystems(Greisenetal.2006).Anadditionalsphericalprojection,calledHEALPix,isdenedinreference(Calabretta&Roukema2007).TheseWCSpapershavebeenformallyapprovedbytheIAUFWGandthereforeareincor-poratedbyreferenceasanocialpartofthisStandard.Thereadershouldrefertothesepapersforadditionaldetailsandbackgroundinformationthatcannotbeincludedhere.VariousupdatesandcorrectionstotheprimaryWCSpapershavebeencompiledbytheauthors,andarereectedinthissection.Therefore,whereconictsexist,thedescriptioninthisStandardwillprevail.8.1.BasicconceptsRatherthanstoreworldcoordinatesseparatelyforeachdatum,theregularlatticestructureofaFITSimageo ersthepossibil-ityofdeningrulesforcomputingworldcoordinatesateachpoint.AsstatedinSect.3.3.2anddepictedinFig.1,imagear-raydataareaddressedviaintegralarrayindicesthatrangeinvaluefrom1toNAXISjonaxisj.Recognizingthatimagedatavaluesmayhaveanextent,forexampleanangularseparation,spectralchannelwidthortimespan,andthusthatitmaymakesensetointerpolatebetweenthem,theseintegralarrayindicesmaybegeneralizedtooating-pointpixelcoordinates.Integralpixelcoordinatevaluescoincidewiththecorrespondingarrayin-dices,whilefractionalpixelcoordinatevaluesliebetweenarrayindicesandthusimplyinterpolation.Pixelcoordinatevaluesaredenedatallpointswithintheimagelatticeandoutsideit(ex-ceptalongconventionalaxes,seeSect.8.5).TheyformthebasisoftheworldcoordinateformalisminFITSdepictedschemati-callyinFig.2.TheessenceofrepresentingworldcoordinatesystemsinFITSistheassociationofvariousreservedkeywordswithel-ementsofatransformation(oraseriesoftransformations),orwithparametersofaprojectionfunction.Theconversionfrompixelcoordinatesinthedataarraytoworldcoordinatesissim-plyamatterofapplyingthespeciedtransformations(inorder)viatheappropriatekeywordvalues;conversely,deningaWCSforanimageamountstosolvingfortheelementsofthetrans-formationmatrix(es)orcoecientsofthefunction(s)ofinterestandrecordingthemintheformofWCSkeywordvalues.ThedescriptionoftheWCSsystemsandtheirexpressioninFITSHDUsisquiteextensiveanddetailed,butisaidedbyacarefulchoiceofnotation.KeyelementsofthenotationaresummarizedinTable21,andareusedthroughoutthissection.Theformaldenitionsofthekeywordsappearinthefollowingsubsections.Theconversionofimagepixelcoordinatestoworldcoordi-natesisamulti-stepprocess,asillustratedinFig.2.Forallcoordinatetypes,therststepisalineartransfor-mationappliedviamatrixmultiplicationofthevectorofpixelcoordinateelements,pj:qi=NXj=1mij(pjrj)(9)whererjarethepixelcoordinateelementsofthereferencepoint,jindexesthepixelaxis,anditheworldaxis.Themijmatrixisanon-singular,squarematrixofdimensionNN,whereNisthe26 Table21.WCSandcelestialcoordinatesnotation. Variable(s)MeaningRelatedFITSkeywords iIndexvariableforworldcoordinatesjIndexvariableforpixelcoordinatesaAlternativeWCSversioncodepjPixelcoordinatesrjReferencepixelcoordinatesCRPIXjamijLineartransformationmatrixCDi jaorPCi jasiCoordinatescalesCDELTia(x;y)Projectionplanecoordinates(;)Nativelongitudeandlatitude( ;)Celestiallongitudeandlatitude(0;0)NativelongitudeandlatitudeoftheducialpointPVi 1ay,PVi 2ay( 0;0)CelestiallongitudeandlatitudeoftheducialpointCRVALia( p;p)Celestiallongitudeandlatitudeofthenativepole(p;p)NativelongitudeandlatitudeofthecelestialpoleLONPOLEa(=PVi 3ay),LATPOLEa(=PVi 4ay) Notes.yAssociatedwithlongitudeaxisi. PixelCoordinates Linear transformation: translation, rotation, skew, scale Rescale tophysical units IntermediatePixelCoordinates IntermediateWorldCoordinates Coordinateprojection, offset WorldCoordinates CRPIXPCi_j or CDi_jCDELTCTYPECRVALPVi_m Fig.2.Aschematicviewofconvertingpixelcoordinatestoworldcoordinates.numberofworldcoordinateaxes.Theelementsqioftheresult-ingintermediatepixelcoordinatevectorareo sets,indimen-sionlesspixelunits,fromthereferencepointalongaxescoinci-dentwiththoseoftheintermediateworldcoordinates.Thus,theconversionofqitothecorrespondingintermediateworldcoor-dinateelementxiisasimplescale:xi=siqi:(10)TherearethreeconventionsforassociatingFITSkeywordswiththeabovetransformations.Intherstformalism,thematrixelementsmijareencodedinthePCi jkeywordsandthescalefactorssiareencodedintheCDELTikeywords,whichmusthavenon-zerovalues.InthesecondformalismEqs.(9)and(10)arecombinedasxi=NXj=1(simij)(pjrj)(11)andtheCDi jkeywordsencodetheproductsimij.Thethirdcon-ventionwaswidelyusedbeforethedevelopmentofthetwopre-viouslydescribedconventionsandusestheCDELTikeywordstodenetheimagescaleandtheCROTA2keywordtodeneabulkrotationoftheimageplane.UseoftheCROTA2keywordisnowdeprecated,andinsteadthenewerPCi jorCDi jkeywordsarerecommendedbecausetheyallowforskewedaxesandfullygeneralrotationofmulti-dimensionalarrays.TheCDELTiandCROTA2keywordsmayco-existwiththeCDi jkeywords(buttheCROTA2mustnotoccurwiththePCi jkeywords)asanaidtooldFITSinterpreters,butthesekeywordsmustbeignoredbysoftwarethatsupportstheCDi jkeywordconvention.InalltheseformalismsthereferencepixelcoordinatesrjareencodedintheCRPIXikeywords,andtheworldcoordinatesattherefer-encepointareencodedintheCRVALikeywords.Foradditionaldetails,seeGreisen&Calabretta(2002).Thethirdstepoftheprocess,computingthenalworldco-ordinates,dependsonthetypeofcoordinatesystem,whichisindicatedwiththevalueoftheCTYPEikeyword.Forsomesim-ple,linearcasesanappropriatechoiceofnormalizationforthescalefactorsallowstheworldcoordinatestobetakendirectly(orbyapplyingaconstanto set)fromthexi(e.g.,somespectra).Inothercasesitismorecomplicated,andmayrequiretheap-plicationofsomenon-linearalgorithm(e.g.,aprojection,asforcelestialcoordinates),whichmayrequirethespecicationofad-ditionalparameters.Wherenecessary,numericparametervaluesfornon-linearalgorithmsmustbespeciedviaPVi mkeywordsandcharacter-valuedparameterswillbespeciedviaPSi mkey-words,wheremistheparameternumber.Theapplicationoftheseformalismstocoordinatesystemsofinterestisdiscussedinthefollowingsub-sections:Sect.8.2de-scribesgeneralWCSrepresentations(seeGreisen&Calabretta2002),Sect.8.3describescelestialcoordinatesystems(seeCalabretta&Greisen2002)),andSect.8.4describesspectralcoordinatesystems(seeGreisenetal.2006).27 8.2.WorldcoordinatesystemrepresentationsAvarietyofkeywordshavebeenreservedforcomputingthecoordinatevaluesthataretobeassociatedwithanypixello-cationwithinanarray.ThefullsetisgiveninTable22;thoseinmostcommonusagearedenedindetailbelowforconvenience.CoordinatesystemspecicationsmayappearinHDUsthatcon-tainsimpleimagesintheprimaryarrayorinanimageextension.Imagesmayalsobestoredinamulti-dimensionalvectorcellofabinarytable,orasatabulatedlistofpixellocations(andop-tionally,thepixelvalue)inatable.Intheselasttwotypesofim-agerepresentations,theWCSkeywordshaveadi erentnamingconventionwhichreectstheneedsofthetabulardatastructureandthe8-characterlimitforkeywordlengths,butotherwisefol-lowexactlythesamerulesfortype,usage,anddefaultvalues.SeereferenceCalabretta&Greisen(2002)forexampleusageofthesekeywords.AllformsofthesereservedkeywordsmustbeusedonlyasspeciedinthisStandard.Thekeywordsgivenbelowconstituteacompletesetoffun-damentalattributesforaWCSdescription.Althoughtheirinclu-sioninanHDUisoptional,FITSwritersshouldincludeacom-pletesetofkeywordswhendescribingaWCS.Intheeventthatsomekeywordsaremissing,defaultvaluesmustbeassumed,asspeciedbelow.WCSAXES–[integer;default:NAXIS,orlargerofWCSindexesiorj].NumberofaxesintheWCSdescription.Thiskeyword,ifpresent,mustprecedeallWCSkeywordsexceptNAXISintheHDU.ThevalueofWCSAXESmayexceedthenumberofpixelaxesfortheHDU.CTYPEi–[character;indexed;default:' '(i.e.alinear,un-denedaxis)].Typefortheintermediatecoordinateaxisi.AnycoordinatetypethatisnotcoveredbythisstandardoranociallyrecognizedFITSconventionshallbetakentobelinear.Allnon-linearcoordinatesystemnamesmustbeexpressedin`4–3'form:therstfourcharactersspec-ifythecoordinatetype,thefthcharacterisahyphen(`-'),andtheremainingthreecharactersspecifyanalgorithmcodeforcomputingtheworldcoordinatevalue.Coordinatetypeswithnamesoflessthanfourcharactersarepaddedontherightwithhyphens,andalgorithmcodeswithlessthanthreecharactersarepaddedontherightwithblanks9.Algorithmcodesshouldbethreecharacters.CUNITi–[character;indexed;default:' '(i.e.,undened)].PhysicalunitsofCRVALandCDELTforaxisi.Notethatunitsshouldalwaysbespecied(seeSect.4.3).UnitsforcelestialcoordinatesystemsdenedinthisStandardmustbedegrees.CRPIXj–[oatingpoint;indexed;default:0.0].LocationofthereferencepointintheimageforaxisjcorrespondingtorjinEq.(9).Notethatthereferencepointmaylieoutsidetheim-ageandthattherstpixelintheimagehaspixelcoordinates(1:0;1:0;:::).CRVALi–[oatingpoint;indexed;default:0.0].WorldCoordinatevalueatthereferencepointofaxisi.CDELTi–[oatingpoint;indexed;default:1.0].Incrementoftheworldcoordinateatthereferencepointforaxisi.Thevaluemustnotbezero.CROTAi–[oatingpoint;indexed;default:0.0].Theamountofrotationfromthestandardcoordinatesystemtoadi erent 9Example:`RA---UV'.coordinatesystem.Furtheruseofthisofthiskeywordisdep-recated,infavorofthenewerformalismsthatusetheCDi jorPCi jkeywordstodenetherotation.PCi j–[oatingpoint;defaults:1.0wheni=j,0.0otherwise].Lineartransformationmatrixbetweenpixelaxesjandin-termediatecoordinateaxesi.ThePCi jmatrixmustnotbesingular.CDi j–[oatingpoint;defaults:0.0,butseebelow].Lineartransformationmatrix(withscale)betweenpixelaxesjandintermediatecoordinateaxesi.Thisnomenclatureisequiv-alenttoPCi jwhenCDELTiisunity.TheCDi jmatrixmustnotbesingular.NotethattheCDi jformalismisanexclusivealternativetoPCi j,andtheCDi jandPCi jkeywordsmustnotappeartogetherwithinanHDU.Inadditiontotherestrictionsnotedabove,ifanyCDi jkeywordsarepresentintheHDU,allotherunspeciedCDi jkeywordsshalldefaulttozero.IfnoCDi jkeywordsarepresentthentheheadershallbeinterpretedasbeinginPCi jformwhetherornotanyPCi jkeywordsareactuallypresentintheHDU.Somenon-linearalgorithmsthatdescribethetransformationbetweenpixelandintermediatecoordinateaxesrequireparam-etervalues.Afewnon-linearalgorithmsalsorequirecharacter-valuedparameters,e.g.,tablelookupsrequirethenamesofthetableextensionandthecolumnstobeused.Wherenecessaryparametervaluesmustbespeciedviathefollowingkeywords:PVi m–[oatingpoint].Numericparametervaluesforinter-mediateworldcoordinateaxisi,wheremistheparameternumber.Leadingzerosmustnotbeused,andmmayhaveonlyvaluesintherange0through99,andthataredenedfortheparticularnon-linearalgorithm.PSi m–[character].Character-valuedparametersforinterme-diateworldcoordinateaxisi,wheremistheparameternum-ber.Leadingzerosmustnotbeused,andmmayhaveonlyvaluesintherange0through99,andthataredenedfortheparticularnon-linearalgorithm.Thefollowingkeywords,whilenotessentialforacompletespecicationofanimageWCS,canbeextremelyusefulforread-erstointerprettheaccuracyoftheWCSrepresentationoftheimage.CRDERi–[oatingpoint;default:0.0].Randomerrorincoordi-natei,whichmustbenon-negative.CSYERi–[oatingpoint;default:0.0].Systematicerrorinco-ordinatei,whichmustbenon-negative.ThesevaluesshouldgivearepresentativeaveragevalueoftheerrorovertherangeofthecoordinateintheHDU.Thetotalerrorinthecoordinateswouldbegivenbysummingtheindividualerrorsinquadrature.8.2.1.AlternativeWCSaxisdescriptionsInsomecasesitisusefultodescribeanimagewithmorethanonecoordinatetype10.AlternativeWCSdescriptionsmaybeaddedtotheheaderbyaddingtheappropriatesetsofWCSkey-words,andappendingtoallkeywordsineachsetanalphabetic 10Examplesincludethefrequency,velocity,andwavelengthalongaspectralaxis(onlyoneofwhich,ofcourse,couldbelinear),orthepo-sitionalonganimagingdetectorinbothmetersanddegreesonthesky.28 Table22.ReservedWCSkeywords. KeywordPrimaryBINTABLEvectorPixellistdescriptionarrayPrimaryAlternativePrimaryAlternative CoordinatedimensionalityWCSAXESaWCAXna...AxistypeCTYPEiaiCTYPniCTYnaTCTYPnTCTYnaAxisunitsCUNITiaiCUNIniCUNnaTCUNInTCUNnaReferencevalueCRVALiaiCRVLniCRVnaTCRVLnTCRVnaCoordinateincrementCDELTiaiCDLTniCDEnaTCDLTnTCDEnaReferencepointCRPIXjajCRPXnjCRPnaTCRPXnTCRPnaCoordinaterotation1CROTAiiCROTnTCROTnTransformationmatrix2PCi jaijPCnaTPCn kaorTPn kaTransformationmatrix2CDi jaijCDnaTCDn kaorTCn kaCoordinateparameterPVi maiPVn maoriVn maTPVn maorTVn maCoordinateparameterarray...iVn Xa...CoordinateparameterPSi maiPSn maoriSn maTPSn maorTSn maCoordinatenameWCSNAMEaWCSNnaWCSnaorTWCSnaCoordinateaxisnameCNAMEiaiCNAnaTCNAnaRandomerrorCRDERiaiCRDnaTCRDnaSystematicerrorCSYERiaiCSYnaTCSYnaWCScross-referencetarget...WCSTna...WCScrossreference...WCSXna...CoordinaterotationLONPOLEaLONPnaLONPnaCoordinaterotationLATPOLEaLATPnaLATPnaCoordinateepochEQUINOXaEQUInaEQUInaCoordinateepoch3EPOCHEPOCHEPOCHDateofobservationMJD-OBSMJDOBnMJDOBnAveragedateofobservationMJD-AVGMJDAnMJDAnDate/timeofobservationDATE-OBSDOBSnDOBSnAveragedate/timeofobsDATE-AVGDAVGnDAVGnReferenceframeRADESYSaorRADEnaRADEnaRADECSYS4Linerestfrequency(Hz)RESTFRQaorRFRQnaRFRQnaRESTFREQ4......Linerestvacuumwavelength(m)RESTWAVaRWAVnaRWAVnaSpectralreferenceframeSPECSYSaSPECnaSPECnaSpectralreferenceframeSSYSOBSaSOBSnaSOBSnaSpectralreferenceframeSSYSSRCaSSRCnaSSRCnaObservationX(m)OBSGEO-XOBSGXnOBSGXnObservationY(m)OBSGEO-YOBSGYnOBSGYnObservationZ(m)OBSGEO-ZOBSGZnOBSGZnRadialvelocity(ms1)VELOSYSaVSYSnaVSYSnaRedshiftofsourceZSOURCEaZSOUnaZSOUnaAngleoftruevelocityVELANGLaVANGnaVANGna Notes.Theindexesjandiarepixelandintermediateworldcoordinateaxisnumbers,respectively.Withinatable,theindexnreferstoacolumnnumber,andmreferstoacoordinateparameternumber.Theindexkalsoreferstoacolumnnumber.Theindicatoraiseitherblank(fortheprimarycoordinatedescription)oracharacterAthroughZthatspeciesthecoordinateversion.Seetext.(1)CROTAiformisdeprecatedbutstillinuse.ItmustnotbeusedwithPCi j,PVi m,andPSi m.(2)PCi jandCDi jformsofthetransformationmatrixaremutuallyexclusive,andmustnotappeartogetherinthesameHDU.(3)EPOCHisdeprecated.UseEQUINOXinstead.(4)These8-characterkeywordsaredeprecated;the7-characterforms,whichcanincludeanalternateversioncodeletterattheend,shouldbeusedinstead.codeintherangeAthroughZ.KeywordsthatmaybeusedinthiswaytospecifyacoordinatesystemversionareindicatedinTable22withthesuxa.Allimpliedkeywordswiththisencod-ingarereservedkeywords,andmustonlybeusedinFITSHDUsasspeciedinthisStandard.Theaxisnumbersmustlieintherange1through99,andthecoordinateparametermmustlieintherange0through99,bothwithnoleadingzeros.TheprimaryversionoftheWCSdescriptionisthatspeciedwithaastheblankcharacter11.Alternativeaxisdescriptionsareoptional,butmustnotbespeciedunlesstheprimaryWCSde- 11Thereareanumberofkeywords(e.g.ijPCna)wheretheacouldbepushedo the8-charkeywordnameforplausiblevaluesofi,j,k,n,andscriptionisalsospecied.IfanalternativeWCSdescriptionisspecied,allcoordinatekeywordsforthatversionmustbegivenevenifthevaluesdonotdi erfromthoseoftheprimaryversion.Rulesforthedefaultvaluesofalternativecoordinatedescriptionsarethesameasthosefortheprimarydescription.Thealterna-tivedescriptionsarecomputedinthesamefashionasthepri-marycoordinates.ThetypeofcoordinatedependsonthevalueofCTYPEia,andmaybelinearinoneofthealternativedescrip-tionsandnon-linearinanother. m.Insuchcasesaisstillsaidtobe`blank'althoughitisnottheblankcharacter.29 Table23.Reservedcelestialcoordinatealgorithmcodes. DefaultCode00Properties1Projectionname Zenithal(azimuthal)projectionsAZP090Sect.5.1.1ZenithalperspectiveSZP090Sect.5.1.2SlantzenithalperspectiveTAN090Sect.5.1.3GnomonicSTG090Sect.5.1.4StereographicSIN090Sect.5.1.5SlantorthographicARC090Sect.5.1.6ZenithalequidistantZPN090Sect.5.1.7ZenithalpolynomialZEA090Sect.5.1.8Zenithalequal-areaAIR090Sect.5.1.9Airy CylindricalprojectionsCYP00Sect.5.2.1.CylindricalperspectiveCEA00Sect.5.2.2CylindricalequalareaCAR00Sect.5.2.3Platecarr´eeMER00Sect.5.2.4Mercator Pseudo-cylindricalandrelatedprojectionsSFL00Sect.5.3.1Samson-FlamsteedPAR00Sect.5.3.2ParabolicMOL00Sect.5.3.3MollweideAIT00Sect.5.3.4Hammer-Aito ConicprojectionsCOP0aSect.5.4.1ConicperspectiveCOE0aSect.5.4.2Conicequal-areaCOD0aSect.5.4.3ConicequidistantCOO0aSect.5.4.4Conicorthomorphic PolyconicandpseudoconicprojectionsBON00Sect.5.5.1Bonne'sequalareaPCO00Sect.5.5.2Polyconic Quad-cubeprojectionsTSC00Sect.5.6.1TangentialsphericalcubeCSC00Sect.5.6.2COBEquadrilateralizedsphericalcubeQSC00Sect.5.6.3Quadrilateralizedsphericalcube HEALPixgridprojectionHPX00Sect.62HEALPixgrid (1)RefertotheindicatedsectioninCalabretta&Greisen(2002)foradetaileddescription.(2)ThisprojectionisdenedinCalabretta&Roukema(2007).ThealternativeversioncodesareselectedbytheFITSwriter;thereisnorequirementthatthecodesbeusedinalphabeticse-quence,northatonecoordinateversiondi erinitsparametervaluesfromanother.AnoptionalkeywordWCSNAMEaisalsode-nedtoname,andotherwisedocument,thevariousversionsofWCSdescriptions:WCSNAMEa–[character;defaultfora:' '(i.e.,blank,fortheprimaryWCS,elseacharacterAthroughZthatspeciesthecoordinateversion].NameoftheworldcoordinatesystemrepresentedbytheWCSkeywordswiththesuxa.Itspri-maryfunctionistoprovideameansbywhichtospecifyaparticularWCSifmultipleversionsaredenedintheHDU.8.3.CelestialcoordinatesystemrepresentationsTheconversionfromintermediateworldcoordinates(x;y)intheplaneofprojectiontocelestialcoordinatesinvolvestwosteps:asphericalprojectiontonativelongitudeandlatitude(;),de-nedintermsofaconvenientcoordinatesystem(i.e.,nativesphericalcoordinates),followedbyasphericalrotationofthesenativecoordinatestotherequiredcelestialcoordinatesystem( ;).Thealgorithmtobeusedtodenethesphericalprojec-tionmustbeencodedintheCTYPEikeywordasthethree-letteralgorithmcode,theallowedvaluesforwhicharespeciedinTable23anddenedinreferencesCalabretta&Greisen(2002)andCalabretta&Roukema(2007).Thetargetcelestialcoordi-natesystemisalsoencodedintotheleft-mostportionoftheCTYPEikeywordasthecoordinatetype.Forthenalstep,theparameterLONPOLEamustbespecied,whichisthenativelongitudeofthecelestialpole,p.Forcertainprojections(suchascylindricalsandconics,whicharelesscom-monlyusedinastronomy),theadditionalkeywordLATPOLEamustbeusedtospecifythenativelatitudeofthecelestialpole.SeeCalabretta&Greisen(2002)forthetransformationequa-tionsandotherdetails.Theacceptedcelestialcoordinatesystemsare:thestandardequatorial(RA--andDEC-),andothersoftheformxLONandxLATforlongitude-latitudepairs,wherexisGforGalactic,Eforecliptic,HforhelioeclipticandSforsupergalacticcoordinates.Sincetherepresentationofplanetary,lunar,andsolarcoordinatesystemscouldexceedthe26possibilitiesa ordedbythesinglecharacterx,pairsoftheformyzLNandyzLTmaybeusedaswell.RADESYSa–[character;default:FK4,FK5,orICRS:seebe-low].Nameofthereferenceframeofequatorialorecliptic30 coordinates,whosevaluemustbeoneofthosespeciedinTable24.ThedefaultvalueisFK4ifthevalueofEQUINOXa1984:0,FK5ifEQUINOXa1984:0,orICRSifEQUINOXaisnotgiven.EQUINOXa–[oatingpoint;default:seebelow].Epochofthemeanequatorandequinoxinyears,whosevaluemustbenon-negative.TheinterpretationofepochdependsuponthevalueofRADESYSaifpresent:BesselianifthevalueisFK4orFK4-NO-E,JulianifthevalueisFK5;notapplicableifthevalueisICRSorGAPPT.EPOCH–[oatingpoint].ThiskeywordisdeprecatedandshouldnotbeusedinnewFITSles.Itisreservedprimarilytopreventitsusewithothermeanings.TheEQUINOXkey-wordshallbeusedinstead.Thevalueeldofthiskeywordwaspreviouslydenedtocontainaoating-pointnumbergivingtheequinoxinyearsforthecelestialcoordinatesys-teminwhichpositionsareexpressed.DATE-OBS–[oatingpoint].ThisreservedkeywordisdenedinSect.4.4.2.MJD-OBS–[oatingpoint;default:DATE-OBSifgiven,other-wisenodefault].ModiedJulianDate(JD–2,400,000.5)oftheobservation,whosevaluecorresponds(bydefault)tothestartoftheobservation,unlessanotherinterpretationisex-plainedinthecommenteld.Nospecictimesystem(e.g.UTC,TAI,etc.)isdenedforthisoranyoftheothertime-relatedkeywords.ItisrecommendedthattheTIMESYSkey-word,asdenedinAppendixBbeusedtospecifythetimesystem.LONPOLEa–[oatingpoint;default:0if00,0+180otherwise].Longitudeinthenativecoordinatesystemofthecelestialsystem'snorthpole.Normally,0iszerounlessanon-zerovaluehasbeensetforPVi 1a,whichisassociatedwiththelongitudeaxis.Thisdefaultappliesforallvaluesof0,including0=90,althoughtheuseofnon-zerovaluesof0arediscouragedinthatcase.LATPOLEa–[oatingpoint;default:90,ornodefaultif(0;0;p0)=(0;0;90)].Latitudeinthenativecoor-dinatesystemofthecelestialsystem'snorthpole,orequiva-lently,thelatitudeinthecelestialcoordinatesystemofthenativesystem'snorthpole.MaybeignoredoromittedincaseswhereLONPOLEacompletelyspeciestherotationtothetargetcelestialsystem.8.4.SpectralcoordinatesystemrepresentationsThissectiondiscussestheconversionofintermediateworldco-ordinatestospectralcoordinateswithcommonaxessuchasfre-quency,wavelength,andapparentradialvelocity(representedherewiththecoordinatevariables;,orv).ThekeypointforconstructingspectralWCSinFITSisthatoneofthesecoordi-natesmustbesampledlinearlyinthedispersionaxis;theothersarederivedfromprescribed,usuallynon-lineartransformations.Frequencyandwavelengthaxesmayalsobesampledlinearlyintheirlogarithm.FollowingtheconventionfortheCTYPEiakeyword,wheniisthespectralaxistherstfourcharactersmustspecifyacodeforthecoordinatetype;fornon-linearalgorithmsthefthcharactermustbeahyphen,andthenextthreecharactersmustspecifyapredenedalgorithmforcomputingtheworldcoordinatesfromtheintermediatephysicalcoordinates.ThecoordinatetypemustbeoneofthosespeciedinTable25.Whenthealgorithmislin-Table24.AllowedvaluesofRADESYSa. ValueDenition ICRSInternationalCelestialReferenceSystemFK5Meanplace,new(IAU1984)systemFK41Meanplace,old(Bessel-Newcomb)systemFK4-NO-E1Meanplace:butwithouteccentricitytermsGAPPTGeocentricapparentplace,IAU1984system (1)NewFITSlesshouldavoidusingtheseolderreferencesystems.ear,theremainderoftheCTYPEiakeywordmustbeblank.Whenthealgorithmisnon-linear,the3-letteralgorithmcodemustbeoneofthosespeciedinTable26.Therelationshipsbetweenthebasicphysicalquantities;,andv,aswellastherelation-shipsbetweenvariousderivedquantitiesaregiveninreferenceGreisenetal.(2006).Thegeneralityofthealgorithmforspecifyingthespectralcoordinatesystemanditsrepresentationsuggeststhatsomead-ditionaldescriptionofthecoordinatemaybehelpfulbeyondwhatcanbeencodedintherstfourcharactersoftheCTYPEiakeyword;CNAMEiaisreservedforthispurpose.NotethatthiskeywordprovidesanameforanaxisinaparticularWCS,whiletheWCSNAMEakeywordnamestheparticularWCSasawhole.Inordertoconvertbetweensomeformofradialvelocityandeitherfrequencyorwavelength,thekeywordsRESTFRQaandRESTWAVa,respectively,arereserved.CNAMEia–[character;default:default:' '(i.e.alinear,unde-nedaxis)].Spectralcoordinatedescriptionwhichmustnotexceed68charactersinlength.RESTFRQa–[oatingpoint;default:none].Restfrequencyoftheofthespectralfeatureofinterest.ThephysicalunitmustbeHz.RESTWAVa–[oatingpoint;default:none].Vacuumrestwave-lengthoftheofthespectralfeatureofinterest.Thephysicalunitmustbem.OneortheotherofRESTFRQaorRESTWAVashouldbegivenwhenitismeaningfultodoso.8.4.1.SpectralcoordinatereferenceframesFrequencies,wavelengths,andapparentradialvelocitiesareal-waysreferredtosomeselectedstandardofrest(i.e.,referenceframe).Whilethespectraareobtainedtheyare,ofnecessity,intheobserver'srestframe.Thevelocitycorrectionfromtopocen-tric(theframeinwhichthemeasurementsareusuallymade)tostandardreferenceframes(whichmustbeoneofthosegiveninTable27)aredependentonthedotproductwithtime-variablevelocityvectors.Thatis,thevelocitywithrespecttoastandardreferenceframedependsupondirection,andthevelocity(andfrequencyandwavelength)withrespecttothelocalstandardofrestisafunctionofthecelestialcoordinatewithintheim-age.ThekeywordsSPECSYSaandSSYSOBSaarereservedand,ifused,mustdescribethereferenceframeinuseforthespectralaxiscoordinate(s)andthespectralreferenceframethatwasheldconstantduringtheobservation,respectively.Inordertocom-putethevelocitiesitisnecessarytohavethedateandtimeoftheobservation;thekeywordsDATE-AVGandMJD-AVGarereservedforthispurpose.DATE-AVG–[character;default:none].Calendardateofthemid-pointoftheobservation,expressedinthesamewayastheDATE-OBSkeyword.31 Table25.Reservedspectralcoordinatetypecodes1. CodeTypeSymbolAssoc.variableDefaultunits FREQFrequencyHzENEREnergyEJWAVNWavenumberm1VRADRadiovelocity2Vms1WAVEVacuumwavelengthmVOPTOpticalvelocity2Zms1ZOPTRedshiftz...AWAVAirwavelengthaamVELOApparentradialvelocityvvms1BETABetafactor(v=c) v... (1)Characters1through4ofthevalueofthekeywordCTYPEia.(2)Byconvention,the`radio'velocityisgivenbyc(0)=0andthe`optical'velocityisgivenbyc(0)=0.MJD-AVG–[oatingpoint;default:none].ModiedJulianDate(JD–2,400,000.5)ofthemid-pointoftheobservation.SPECSYSa–[character;default:none].Thereferenceframeinuseforthespectralaxiscoordinate(s).ValidvaluesaregiveninTable27.SSYSOBSa–[character;default:TOPOCENT].Thespectralrefer-enceframethatisconstantovertherangeofthenon-spectralworldcoordinates.ValidvaluesaregiveninTable27.ThetransformationfromtherestframeoftheobservertoastandardreferenceframerequiresaspecicationofthelocationonEarth12oftheinstrumentusedfortheobservationinordertocalculatethediurnalDopplercorrectionduetotheEarth'srota-tion.Thelocation,ifspecied,shallberepresentedasageocen-tricCartesiantriplewithrespecttoastandardellipsoidalgeoidatthetimeoftheobservation.Whilethepositioncanoftenbespeciedwithanaccuracyofameterorbetter,formostpur-posespositionalerrorsofseveralkilometerswillhavenegligibleimpactonthecomputedvelocitycorrection.Fordetails,seeref-erenceGreisenetal.(2006).OBSGEO-Xa–[oatingpoint;default:none].Xcoordinate(inmeters)ofaCartesiantripletthatspeciesthelocation,withrespecttoastandard,geocentricterrestrialreferenceframe,wheretheobservationtookplace.ThecoordinatemustbevalidattheepochMJD-AVGorDATE-AVG.OBSGEO-Ya–[oatingpoint;default:none].Ycoordinate(inmeters)ofaCartesiantripletthatspeciesthelocation,withrespecttoastandard,geocentricterrestrialreferenceframe,wheretheobservationtookplace.ThecoordinatemustbevalidattheepochMJD-AVGorDATE-AVG.OBSGEO-Za–[oatingpoint;default:none].Zcoordinate(inmeters)ofaCartesiantripletthatspeciesthelocation,withrespecttoastandard,geocentricterrestrialreferenceframe,wheretheobservationtookplace.ThecoordinatemustbevalidattheepochMJD-AVGorDATE-AVG.Informationontherelativeradialvelocitybetweentheob-serverandtheselectedstandardofrestinthedirectionofthecelestialreferencecoordinatemaybeprovided,andifsoshallbegivenbytheVELOSYSakeyword.TheframeofrestdenedwithrespecttotheemittingsourcemayberepresentedinFITS; 12Thespecicationoflocationforaninstrumentonaspacecraftinightrequiresanephemeris;keywordsthatmightberequiredinthiscircumstancearenotdenedhere.Table26.Non-linearspectralalgorithmcodes1. CodeRegularlysampledinExpressedas F2WFrequencyWavelengthF2VApparentradialvelocityF2AAirwavelengthW2FWavelengthFrequencyW2VApparentradialvelocityW2AAirwavelengthV2FApparentradialvel.FrequencyV2WWavelengthV2AAirwavelengthA2FAirwavelengthFrequencyA2WWavelengthA2VApparentradialvelocity LOGLogarithmAnyfour-lettertypecodeGRIDetectorAnytypecodefromTable25GRADetectorAnytypecodefromTable25TABNotregularAnyfour-lettertypecode (1)Characters6through8ofthevalueofthekeywordCTYPEia.forthisreferenceframeitisnecessarytodenethevelocitywithrespecttosomeotherframeofrest.ThekeywordsSPECSYSaandZSOURCEaareusedtodocumentthechoiceofreferenceframeandthevalueofthesystemicvelocityofthesource,respectively.SSYSSRCa–[character;default:none].ReferenceframeforthevalueexpressedintheZSOURCEakeywordtodocumentthesystemicvelocityoftheobservedsource.ValuemustbeoneofthosegiveninTable27exceptforSOURCE.VELOSYSa–[oatingpoint;default:none].Relativeradialve-locitybetweentheobserverandtheselectedstandardofrestinthedirectionofthecelestialreferencecoordinate.Unitsmustbems1.TheCUNITiakeywordisnotusedforthispurposesincetheWCSversionamightnotbeexpressedinvelocityunits.ZSOURCEa–[oatingpoint;default:none].Radialvelocitywithrespecttoanalternativeframeofrest,expressedasaunitlessredshift(i.e.,velocityasafractionofthespeedoflightinvacuum).UsedinconjunctionwithSSYSSRCatodocumentthesystemicvelocityoftheobservedsource.VELANGLa–[oatingpoint;default:+90:].Inthecaseofrela-tivisticvelocities(e.g.,abeamedastrophysicaljet)thetrans-versevelocitycomponentisimportant.Thiskeywordmaybeusedtoexpresstheorientationofthespacevelocityvec-torwithrespecttotheplaneofthesky.SeeAppendixAofreferenceGreisenetal.(2006)forfurtherdetails.32 Table27.Spectralreferencesystems. ValueDenition TOPOCENTTopocentricGEOCENTRGeocentricBARYCENTBarycentricHELIOCENHeliocentricLSRKLocalstandardofrest(kinematic)LSRDLocalstandardofrest(dynamic)GALACTOCGalactocentricLOCALGRPLocalGroupCMBDIPOLCosmicmicrowavebackgrounddipoleSOURCESourcerestframe Notes.ThesearetheallowedvaluesoftheSPECSYSa,SSYSOBSa,andSSYSSRCakeywords.Table28.Examplekeywordsfora100elementarrayofcomplexvalues. Keyword SIMPLE=TBITPIX=-32NAXIS=2NAXIS1=2NAXIS2=100CTYPE1='COMPLEX'CRVAL1=0.CRPIX1=0.CDELT1=1.END 8.5.ConventionalcoordinatetypesTherstFITSpaper(Wellsetal.1981)listedanumberof`sug-gestedvalues'fortheCTYPEikeyword.Twoofthesehavetheattributetheassociatedworldcoordinatescanassumeonlyinte-gervaluesandthatthemeaningoftheseintegersisonlydenedbyconvention.Therst`conventional'coordinateisCTYPEia='COMPLEX'tospecifythatcomplexvalues(i.e.,pairsofrealandimaginarycomponents)arestoredinthedataarray(alongwithanoptionalweightfactor).Thus,thecomplexaxisofthedataarraywillcontaintwovalues(orthreeiftheweightisspecied).Byconvention,therealcomponenthasacoordinatevalueof1,theimaginarycomponenthasacoordinatevalueof2,andtheweight,ifany,hasacoordinatevalueof3.Table28illustratestherequiredkeywordsforanarrayof100complexvalues(with-outweights).ThesecondconventionalcoordinateisCTYPEia='STOKES'tospecifythepolarizationofthedata.Conventionalvalues,theirsymbols,andpolarizationsaregiveninTable29.Table29.ConventionalStokesvalues. ValueSymbolPolarization 1IStandardStokesunpolarized2QStandardStokeslinear3UStandardStokeslinear4VStandardStokescircular1RRRight-rightcircular2LLLeft-leftcircular3RLRight-leftcross-circular4LRLeft-rightcross-circular5XXXparallellinear6YYYparallellinear7XYXYcrosslinear8YXYXcrosslinear 33 AppendixA:SyntaxofkeywordrecordsThisAppendixisnotpartoftheFITSstandardbutisincludedforconvenientreference.Thefollowingnotationisusedindeningtheformalsyntax.:=means`isdenedtobe'XjYmeansoneofXorY(noorderingrelationisimplied)[X]meansthatXisoptionalX...meansXisrepeatedoneormoretimes`B'meanstheASCIIcharacterB`A'–`Z'meansoneoftheASCIIcharactersAthroughZintheASCIIcollatingsequence,asshowninAppendixD\0xnnmeanstheASCIIcharacterassociatedwiththehexadecimalcodennf...gexpressesaconstraintoracomment(itimmediatelyfollowsthesyntaxrule)ThefollowingstatementsdenetheformalsyntaxusedinFITSfree-formatkeywordrecords.FITS keyword record:=FITS commentary keyword recordjFITS value keyword recordFITS commentary keyword record:=COMMENT keyword[ascii text char...]jHISTORY keyword[ascii text char...]jBLANKFIELD keyword[ascii text char...]jkeyword eldanychar but equal[ascii text char...]jkeyword eld`='anychar but space[ascii text char...]fConstraint:ThetotalnumberofcharactersinaFITS commentary keyword recordmustbeexactlyequalto80.gFITS value keyword record:=keyword eldvalue indicator[space...][value][space...][comment]fConstraint:ThetotalnumberofcharactersinaFITS value keyword recordmustbeexactlyequalto80.gfComment:Ifthevalueeldisnotpresent,thevalueoftheFITSkeywordisnotdened.gkeyword eld:=[keyword char...][space...]fConstraint:Thetotalnumberofcharactersinthekeyword eldmustbeexactlyequalto8.gkeyword char:=`A'–`Z'j`0'–`9'j` 'j`-'COMMENT keyword:=`C'`O'`M'`M'`E'`N'`T'spaceHISTORY keyword:=`H'`I'`S'`T'`O'`R'`Y'spaceBLANKFIELD keyword:=spacespacespacespacespacespacespacespacevalue indicator:=`='spacespace:=` 'comment:=`/'[ascii text char...]ascii text char:=space–`~'anychar but equal:=space–`'j`&#x-2.3;蚅'–`~'anychar but space:=`!'–`~'value:=character string valuejlogical valuejinteger valuejoating valuejcomplex integer valuejcomplex oating valuecharacter string value:=begin quote[string text char...]end quotefConstraint:Thebegin quoteandend quotearenotpartofthecharacterstringvaluebutonlyserveasdelimiters.Leadingspacesaresignicant;trailingspacesarenot.gbegin quote:=quoteend quote:=quotefConstraint:Theendingquotemustnotbeimmediatelyfollowedbyasecondquote.gquote:=\0x27string text char:=ascii text charfConstraint:Astring text charisidenticaltoanascii text charexceptforthequotechar;aquotecharisrepresentedbytwosuccessivequotechars.glogical value:=`T'j`F'integer value:=[sign]digit[digit...]fComment:Suchanintegervalueisinterpretedasasigneddecimalnumber.Itmaycontainleadingzeros.gsign:=`-'j`+'34 digit:=`0'–`9'oating value:=decimal number[exponent]decimal number:=[sign][integer part][`.'[fraction part]]fConstraint:Atleastoneoftheinteger partandfraction partmustbepresent.ginteger part:=digitj[digit...]fraction part:=digitj[digit...]exponent:=exponent letter[sign]digit[digit...]exponent letter:=`E'j`D'complex integer value:=`('[space...]real integer part[space...]`,'[space...]imaginary integer part[space...]`)'real integer part:=integer valueimaginary integer part:=integer valuecomplex oating value:=`('[space...]real oating part[space...]`,'[space...]imaginary oating part[space...]`)'real oating part:=oating valueimaginary oating part:=oating valueAppendixB:SuggestedtimescalespecicationThisAppendixisnotpartoftheFITSstandard,butisincludedforconvenientreference.1.UseofthekeywordTIMESYSissuggestedasanimple-mentationofthetimescalespecication.Itsetstheprinci-paltimesystemfortime-relatedkeywordsanddataintheHDU(i.e.,itdoesnotprecludetheadditionofkeywordsordatacolumnsthatprovideinformationfortransformationstoothertimescales,suchassiderealtimesorbarycentercorrec-tions).EachHDUshallcontainnotmorethanoneTIMESYSkeyword.Initially,ociallyallowedvaluesareshownbe-low.Forreference,see:ExplanatorySupplementtotheAstronomicalAlmanac,P.K.Seidelmann,ed.,UniversityScienceBooks,1992,ISBN0-935702-68-7,orhttp://tycho.usno.navy.mil/systime.htmlUTC–CoordinatedUniversalTime;denedsince1972.UT–UniversalTime,equaltoGreenwichMeanTime(GMT)since1925;theUTCequivalentbefore1972;see:ExplanatorySupplement,p.76.TAI–InternationalAtomicTime;`UTCwithouttheleapseconds';31saheadofUTCon1997-07-01.AT–InternationalAtomicTime;deprecatedsynonymofTAI.ET–EphemerisTime,thepredecessorofTTandTDB;validuntil1984.TT–TerrestrialTime,theIAUstandardtimescalesince1984;continuouswithETandsynchronouswith(but32.184saheadof)TAI.TDT–TerrestrialDynamicalTime;=TT.TDB–BarycentricDynamicalTime.TCG–GeocentricCoordinateTime;runsaheadofTTsince1977-01-01atarateofapproximately22ms/year.TCB–BarycentricCoordinateTime;runsaheadofTDBsince1977-01-01atarateofapproximately0.5s/year.UseofGlobalPositioningSatellite(GPS)time(19sbehindTAI)isdeprecated.2.Bydefault,timeswillbedeemedtobeasmeasuredatthedetector(orattheobservatory)fortimescalesdenedonthegeoid(i.e.,TAI,UTCandTT).InthecaseofthecoordinatetimesTCG,TCBandTDB,theobservationisassumedtohavebeenreferredtotheassociatedspatialorigin(namelythegeocenterforTCGandthesolar-systembarycenterforTCBandTDB)byallowingforlighttime.Thesedefaultsfollowcommonpractice;afutureconventionontimescaleissuesinFITSlesmayallowothercombinationsbutshallpreservethisdefaultbehavior.Therationaleisthatrawob-servationaldataaremostlikelytobetaggedbyaclockthatissynchronizedwithTAI,whileatransformationtocoor-dinatetimesorTDBisusuallyaccompaniedbyaspatialtransformation,aswell.Thisimpliesthatpathlengthdif-ferenceshavebeencorrectedfor.NotethatthesamedistanteventrecordedinaFITSleinbothTDBandUTCwillhavetimesthatdi erby(typically)severalminutes.Also,notethatwhenthelocationisnotunambiguous(suchasinthecaseofaninterferometer)precisespecicationofthelocationisstronglyencouragedin,forinstance,geocentricCartesiancoordinates.3.NotethatTTistheIAUpreferredstandard.Itcanbeconsid-eredequivalenttoTDTandET,thoughETshouldnotbeusedfordatatakenafter1984.Forreference,see:ExplanatorySupplement,pp.40-48.4.IftheTIMESYSkeywordisabsentorhasanunrecognizedvalue,thevalueUTCwillbeassumedfordatessince1972,andUTforpre-1972data.5.Examples.ThethreelegalrepresentationsofthedateofOctober14,1996,mightbewrittenas:Originalformat,means1996Oct14:DATE-OBS='14/10/96'Explicittimescalespecication:UTC.TIMESYS='UTC'DATE-OBS='1996-10-14'Dateofstartofobservation,assumedinUTCDATE-OBS='1996-10-14'Explicittimescalespecication:TT.TIMESYS='TT'35 DATE-OBS='1996-10-14T10:14:36.123'6.TheconventionsuggestedinthisAppendixispartofthemission-specicFITSconventionsadoptedfor,andusedin,theRXTEarchive,buildingonexist-ingHighEnergyAstrophysicsFITSconventions.Seethetime tutorial.htmlandtime.htmldocumentsathttp://heasarc.gsfc.nasa.gov/docs/xte/abc/.TheVLBAprojecthasadoptedaconventionwherethekeywordTIMSYS,ratherthanTIMESYS,isused,currentlyallowingthevaluesUTCandIAT.Seep.38andp.39oftheidi-format.psdocumentathttp://www.cv.nrao.edu/fits/documents/drafts.36 AppendixC:SummaryofkeywordsThisAppendixisnotpartoftheFITSstandard,butisincludedforconvenientreference.Allofthemandatoryandreservedkeywordsthataredenedinthestandard,exceptforthereservedWCSkeywordsthatarediscussedseparatelyinSect.8,arelistedinTablesC.1,C.2,andC.3.TableC.1.MandatoryFITSkeywordsforthestructuresdescribedinthisdocument. PrimaryConformingImageASCIItableBinarytableRandomgroupsHDUextensionextensionextensionextensionrecords SIMPLEXTENSIONXTENSION1XTENSION2XTENSION3SIMPLEBITPIXBITPIXBITPIXBITPIX=8BITPIX=8BITPIXNAXISNAXISNAXISNAXIS=2NAXIS=2NAXISNAXISn4NAXISn4NAXISn4NAXIS1NAXIS1NAXIS1=0ENDPCOUNTPCOUNT=0NAXIS2NAXIS2NAXISn4GCOUNTGCOUNT=1PCOUNT=0PCOUNTGROUPS=TENDENDGCOUNT=1GCOUNT=1PCOUNTTFIELDSTFIELDSGCOUNTTFORMn5TFORMn5ENDTBCOLn5ENDEND (1)XTENSION= 'IMAGE 'fortheimageextension.(2)XTENSION= 'TABLE 'fortheASCIItableextension.(3)XTENSION= 'BINTABLE'forthebinarytableextension.(4)Runsfrom1throughthevalueofNAXIS.(5)Runsfrom1throughthevalueofTFIELDS.TableC.2.ReservedFITSkeywordsforthestructuresdescribedinthisdocument. All1Array2ASCIItableBinarytableRandomgroupsHDUsHDUsextensionextensionrecords DATEEXTNAMEBSCALETSCALnTSCALnPTYPEnDATE-OBSEXTVERBZEROTZEROnTZEROnPSCALnORIGINEXTLEVELBUNITTNULLnTNULLnPZEROnAUTHOREQUINOXBLANKTTYPEnTTYPEnREFERENCEPOCH3DATAMAXTUNITnTUNITnCOMMENTBLOCKED3DATAMINTDISPnTDISPnHISTORYEXTEND4TDIMn TELESCOPTHEAPOBJECTINSTRUMEOBSERVER (1)ThesekeywordsarefurthercategorizedinTableC.3.(2)PrimaryHDU,imageextension,user-denedHDUswithsamearraystructure.(3)Deprecated.(4)OnlypermittedintheprimaryHDU.TableC.3.GeneralreservedFITSkeywordsdescribedinthisdocument. ProductionBibliographicCommentaryObservation DATEAUTHORCOMMENTDATE-OBSORIGINREFERENCHISTORYTELESCOPBLOCKED1 INSTRUMEOBSERVEROBJECTEQUINOXEPOCH1 (1)Deprecated.37 TableD.1.ASCIIcharacterset. ASCIIcontrol ASCIItext dechexchar dechexchar dechexchar dechexchar 000NUL 3220SP 6440@ 9660` 101SOH 3321! 6541A 9761a 202STX 3422" 6642B 9862b 303ETX 3523# 6743C 9963c 404EOT 3624$ 6844D 10064d 505ENQ 3725% 6945E 10165e 606ACK 3826& 7046F 10266f 707BEL 3927' 7147G 10367g 808BS 4028( 7248H 10468h 909HT 4129) 7349I 10569i 100ALF 422A* 744AJ 1066Aj 110BVT 432B+ 754BK 1076Bk 120CFF 442C, 764CL 1086Cl 130DCR 452D- 774DM 1096Dm 140ESO 462E. 784EN 1106En 150FSI 472F/ 794FO 1116Fo 1610DLE 48300 8050P 11270p 1711DC1 49311 8151Q 11371q 1812DC2 50322 8252R 11472r 1913DC3 51333 8353S 11573s 2014DC4 52344 8454T 11674t 2115NAK 53355 8555U 11775u 2216SYN 54366 8656V 11876v 2317ETB 55377 8757W 11977w 2418CAN 56388 8858X 12078x 2519EM 57399 8959Y 12179y 261ASUB 583A: 905AZ 1227Az 271BESC 593B; 915B[ 1237B{ 281CFS 603C 925C\ 1247C| 291DGS 613D= 935D] 1257D} 301ERS 623E� 945E^ 1267E~ 311FUS 633F? 955F_ 1277FDEL1 1NotASCIITextAppendixD:ASCIItextThisappendixisnotpartoftheFITSstandard;thematerialinitisbasedontheANSIstandardforASCII(ANSI1977)andisincludedhereforinformationalpurposes.)InTableD.1,therstcolumnisthedecimalandthesecondcolumnthehexadecimalvalueforthecharacterinthethirdcolumn.Thecharactershexadecimal20to7E(decimal32to126)constitutethesubsetreferredtointhisdocumentastherestrictedsetofASCIItextcharacters.AppendixE:IEEEoating-pointformatsThematerialinthisAppendixisnotpartofthisstandard;itisadaptedfromtheIEEE-754oating-pointstandard(IEEE1985)andprovidedforinformationalpurposes.ItisnotintendedtobeacomprehensivedescriptionoftheIEEEformats;readersshouldrefertotheIEEEstandard.)FITSrecognizesallIEEEbasicformats,includingthespecialvalues.E.1.BasicformatsNumbersinthesingleanddoubleformatsarecomposedofthefollowingthreeelds:1.1-bitsigns2.Biasedexponente=E+bias3.Fractionf=b1b2bp1TherangeoftheunbiasedexponentEshallincludeeveryintegerbetweentwovaluesEminandEmax,inclusive,andalsotwootherreservedvaluesEmin1toencode0anddenormalizednumbers,andEmax+1toencode1andNaNs.TheforegoingparametersaregiveninTableE.1.Eachnonzeronumericalvaluehasjustoneencoding.Theeldsareinterpretedasfollows:38 TableE.1.Summaryofformatparameters. FormatParameterSingleDoubleSingleextendedDoubleextended p24325364Emax+127+1023+1023+16383Emin1261022102216382Exponentbias+127unspecied+1023unspeciedExponentwidthinbits8111115Formatwidthinbits32436479 Fig.E.1.SingleFormat.msbmeansmostsignicantbit,lsbmeansleastsignicantbit1823....widths s e f msblsbmsblsb....orderFig.E.2.DoubleFormat.msbmeansmostsignicantbit,lsbmeansleastsignicantbit11152....widths s e f msblsbmsblsb....orderE.1.1.SingleA32-bitsingleformatnumberXisdividedasshowninFig.E.1.ThevaluevofXisinferredfromitsconstituenteldsthus1.Ife=255andf,0,thenvisNaNregardlessofs2.Ife=255andf=0,thenv=(1)s13.If0e255,thenv=(1)s2e127(1f)4.Ife=0andf,0,thenv=(1)s2e126(0f)(denormalizednumbers)5.Ife=0andf=0,thenv=(1)s0(zero)E.1.2.DoubleA64-bitdoubleformatnumberXisdividedasshowninFig.E.2.ThevaluevofXisinferredfromitsconstituenteldsthus1.Ife=2047andf,0,thenvisNaNregardlessofs2.Ife=2047andf=0,thenv=(1)s13.If0e2047,thenv=(1)s2e1023(1f)4.Ife=0andf,0,thenv=(1)s2e1022(0f)(denormalizednumbers)5.Ife=0andf=0,thenv=(1)s0(zero)E.2.BytepatternsTableE.2showsthetypesofIEEEoating-pointvalue,whetherregularorspecial,correspondingtoalldoubleandsingleprecisionhexadecimalbytepatterns.39 TableE.2.IEEEoating-pointformats. IEEEvalueDoubleprecisionSingleprecision +0000000000000000000000000denormalized000000000000000100000001toto000FFFFFFFFFFFFF007FFFFFpositiveunderow001000000000000000800000positivenumbers001000000000000100800001toto7FEFFFFFFFFFFFFE7F7FFFFEpositiveoverow7FEFFFFFFFFFFFFF7F7FFFFF+17FF00000000000007F800000NaN17FF00000000000017F800001toto7FFFFFFFFFFFFFFF7FFFFFFF0800000000000000080000000negative800000000000000180000001denormalizedtoto800FFFFFFFFFFFFF807FFFFFnegativeunderow801000000000000080800000negativenumbers801000000000000180800001totoFFEFFFFFFFFFFFFEFF7FFFFEnegativeoverowFFEFFFFFFFFFFFFFFF7FFFFF1FFF0000000000000FF800000NaN1FFF0000000000001FF800001totoFFFFFFFFFFFFFFFFFFFFFFFF 1CertainvaluesmaybedesignatedasquietNaN(nodiagnosticwhenused)orsignaling(producesdiagnosticwhenused)byparticularimplemen-tations.40 AppendixF:ReservedextensiontypenamesThisAppendixisnotpartoftheFITSstandard,butisin-cludedforinformationalpurposes.Itdescribestheextensiontypenamesregisteredasofthedatethisstandardwasissued.)AcurrentlistisavailablefromtheFITSSupportOcewebsiteathttp://fits.gsfc.nasa.gov.F.1.StandardextensionsThesethreeextensiontypeshavebeenapprovedbytheIAUFWGandaredenedinSect.7ofthisstandarddocumentaswellasintheindicatedAstronomyandAstrophysicsjournalarticles.–'IMAGE '–Thisextensiontypeprovidesameansofstor-ingamulti-dimensionalarraysimilartothatoftheFITSpri-maryheaderanddataunit.Approvedasastandardextensionin1994(Ponzetal.1994).–'TABLE '–ThisASCIItableextensiontypecontainsrowsandcolumnsofdataentriesexpressedasASCIIcharac-ters.Approvedasastandardextensionin1988(Hartenetal.1988).–'BINTABLE'–Thisbinarytableextensiontypeprovidesamoreexibleandecientmeansofstoringdatastruc-turesthanisprovidedbytheTABLEextensiontype.Thetablerowscancontainamixtureofnumerical,logicalandcharacterdataentries.Inaddition,eachentryisallowedtobeasingledimensionedarray.Numericdataarekeptinbinaryformats.Approvedasastandardextensionin1994(Cottonetal.1995).F.2.ConformingextensionsTheseconventionsmeettherequirementsforaconformingex-tensionasdenedininSect.3.4.1ofthisstandard,howevertheyhavenotbeenformallyapprovedorendorsedbytheIAUFWG.–'IUEIMAGE'–ThisnamewasgiventotheprototypeoftheIMAGEextensiontypeandwasprimarilyusedintheIUEprojectdataarchivefromapproximately1992to1994.Exceptforthename,theformatisidenticaltotheIMAGEextension.–'A3DTABLE'–ThisnamewasgiventotheprototypeoftheBINTABLEextensiontypeandwasprimarilyusedintheAIPSdataprocessingsystemdevelopedatNRAOfromabout1987untilitwasreplacedbyBINTABLEintheearly1990s.Theformatisdenedinthe`GoingAIPS'manual(Cottonetal.1990),Chapter14.ItisverysimilartotheBINTABLEtypeexceptthatitdoesnotsupportthevariable-lengtharrayconvention.–'FOREIGN '–ThisextensiontypeisusedtoputaFITSwrapperaboutanarbitraryle,allowingaleortreeoflestobewrappedupinFITSandlaterrestoredtodisk.AfulldescriptionofthisextensiontypeisgivenintheRegistryofFITSconventionsontheFITSSupportOcewebsite.–'DUMP '–Thisextensiontypecanbeusedtostoreastreamofbinarydatavalues.Theonlyknownuseofthisex-tensiontypeistorecordtelemetryheaderpacketsfordatafromtheHinodemission.ThemoregeneralFOREIGNexten-siontypecouldalsobeusedtostorethistypeofdata.F.3.OthersuggestedextensionnamesTherehavebeenoccasionalsuggestionsforotherextensionnamesthatmightbeusedforotherspecicpurposes.Thesein-cludeaCOMPRESSextensionforstoringcompressedimages,aFITSextensionforhierarchicallyembeddingentireFITSleswithinotherFITSles,andaFILEMARKextensionforrepre-sentingtheequivalentofanend-of-lemarkonmagnetictapemedia.Noneoftheseextensiontypeshavebeenimplementedorusedinpractice,thereforethesenamesarenotreserved.Theseextensionnames(oranyotherextensionnamenotspecicallymentionedintheprevioussectionsofthisappendix)shouldnotbeusedinanyFITSlewithoutrstregisteringthenamewiththeIAUFITSWorkingGroup.AppendixG:MIMEtypesThisAppendixisnotpartoftheFITSstandard,butisincludedforinformationalpurposes.RFC4047(Allen&Wells2005)describestheregistrationoftheMultipurposeInternetMailExtensions(MIME)sub-types`application/fits'and`image/fits'tobeusedbythein-ternationalastronomicalcommunityfortheinterchangeofFITSles.TheMIMEtypeservesasaelectronictagorlabelthatistransmittedalongwiththeFITSlethattellsthereceivingap-plicationwhattypeofleisbeingtransmitted.TheremainderofthisappendixhasbeenextractedverbatimfromtheRFC4047document.ThegeneralnatureofthefullFITSstandardrequirestheuseofthemediatype`application/fits'.Nevertheless,theprin-cipalintentforagreatmanyFITSlesistoconveyasingledataarrayintheprimaryHDU,andsucharraysareveryof-ten2-dimensionalimages.Severalcommonimageviewingap-plicationsalreadydisplaysingle-HDUFITSles,andthepro-totypesforvirtualobservatoryprojectsspecifythatdatapro-videdbywebservicesbeconveyedbythedataarrayinthepri-maryHDU.Theseusesjustifytheregistrationofasecondme-diatype,namely`image/fits',forleswhichusethesubsetofthestandarddescribedbytheoriginalFITSstandardpaper.TheMIMEtype`image/fits'maybeusedtodescribeFITSprimaryHDUsthathaveotherthantwodimensions,howeveritisexpectedthatmostlesdescribedas`image/fits'willhavetwo-dimensional(NAXIS=2)primaryHDUs.G.1.MIMEtype`application/fits'AFITSledescribedwiththemediatype`application/fits'shouldconformtothepublishedstandardsforFITSlesasdeterminedbyconventionandagreementwithintheinternationalFITScommunity.Nootherconstraintsareplacedonthecontentofaledescribedas`application/fits'.AFITSledescribedwiththemediatype`application/fits'mayhaveanarbitrarynumberofconformingextensionHDUsthatfollowitsmandatoryprimaryheaderanddataunit.TheextensionHDUsmaybeoneofthestandardtypes(IMAGE,TABLE,andBINTABLE)oranyothertypethatsatisesthe`RequirementsforConformingExtensions'(Sect.3.4.1).TheprimaryHDUoranyIMAGEextensionmaycontainzeroto999dimensionswithzeroormorepixelsalongeachdimension.41 TheprimaryHDUmayusetherandomgroupsconvention,inwhichthedimensionoftherstaxisiszeroandthekeywordsGROUPS,PCOUNTandGCOUNTappearintheheader.NAXIS1=0andGROUPS=Tisthesignatureofrandomgroups;seeSect.6.G.1.1.RecommendationsforapplicationwritersAnapplicationintendedtohandle`application/fits'shouldbeabletoprovideauserwithamanifestofalloftheHDUsthatarepresentintheleandwithallofthekeyword/valuepairsfromeachoftheHDUs.Anapplicationintendedtohandle`application/fits'shouldbepreparedtoencounterextensionHDUsthatcontaineitherASCIIorbinarytables,andtoprovideauserwithaccesstotheirelements.AnapplicationwhichcanmodifyFITSlesorretrieveFITSlesfromanexternalserviceshouldbecapableofwritingsuchlestoalocalstoragemedium.CompleteinterpretationofthemeaningandintendeduseofthedataineachoftheHDUstypicallyrequirestheuseofheuris-ticsthatattempttoascertainwhichlocalconventionswereusedbytheauthoroftheFITSle.Asexamples,leswithmediatype`application/fits'mightcontainanyofthefollowingcontents:–AnemptyprimaryHDU(containingzerodataelements)fol-lowedbyatableHDUthatcontainsacatalogofcelestialobjects.–AnemptyprimaryHDUfollowedbyatableHDUthaten-codesaseriesoftime-taggedphotoneventsfromanexpo-sureusinganX-raydetector.–AnemptyprimaryHDUfollowedbyaseriesofIMAGEHDUscontainingdatafromanexposuretakenbyamosaicofCCDdetectors.–AnemptyprimaryHDUfollowedbyaseriesoftableHDUsthatcontainasnapshotofthestateofarelationaldatabase.–AprimaryHDUcontainingasingleimagealongwithkey-word/valuepairsofmetadata.–AprimaryHDUwithNAXIS1=0andGROUPS=Tfol-lowedbyrandomgroupsdatarecordsofcomplexfringevis-ibilities.G.2.MIMEtype`image/fits'AFITSledescribedwiththemediatype`image/fits'shouldhaveaprimaryHDUwithpositiveintegervaluesfortheNAXISandNAXISnkeywords,andhenceshouldcontainatleastonepixel.Fileswith4ormorenon-degenerateaxes(NAXISn�1)shouldbedescribedas`application/fits',notas`image/fits'.(Inrarecasesitmaybeappropriatetode-scribeaNULLimage–adatalesscontainerforFITSkeywords,withNAXIS=0orNAXISn=0–oranimagewith4+non-degenerateaxesas`image/fits'butthisusageisdiscouragedbecausesuchlesmayconfusesimpleimageviewerapplica-tions.)FITSlesdeclaredas`image/fits'mayalsohaveoneormoreconformingextensionHDUsfollowingtheirprimaryHDUs.TheseextensionHDUsmaycontainstandard,non-linear,worldcoordinatesystem(WCS)informationintheformofta-blesorimages.TheextensionHDUsmayalsocontainother,non-standardmetadatapertainingtotheimageintheprimaryHDUintheformsofkeywordsandtables.AFITSledescribedwiththemediatype`image/fits'shouldbeprincipallyintendedtocommunicatethesingledataarrayintheprimaryHDU.Thismeansthat`image/fits'shouldnotbeappliedtoFITSlescontainingmulti-exposure-framemosaicimages.Also,randomgroupslesmustbede-scribedas`application/fits'andnotas`image/fits'.AFITSledescribedwiththemediatype`image/fits'isalsovalidasaleofmediatype`application/fits'.Thechoiceofclassicationdependsonthecontextandintendedus-age.G.2.1.RecommendationsforapplicationwritersAnapplicationthatisintendedtohandle`image/fits'shouldbeabletoprovideauserwithamanifestofalloftheHDUsthatarepresentintheleandwithallofthekeyword/valuepairsfromeachoftheHDUs.AnapplicationwritermaychoosetoignoreHDUsbeyondtheprimaryHDU,buteveninthiscasetheapplicationshouldbeabletopresenttheuserwiththekey-word/valuepairsfromtheprimaryHDU.Notethatanapplicationintendedtorender`image/fits'forviewingbyauserhassignicantlymoreresponsibilitythananapplicationintendedtohandle,e.g.,`image/tiff'or`image/gif'.FITSdataarrayscontainelementswhichtypi-callyrepresentthevaluesofaphysicalquantityatsomecoordi-natelocation.Consequentlytheyneednotcontainanypixelren-deringinformationintheformoftransferfunctions,andthereisnomechanismforcolorlook-uptables.Anapplicationshouldprovidethisfunctionality,eitherstaticallyusingamoreorlesssophisticatedalgorithm,orinteractivelyallowingauservariousdegreesofchoice.Furthermore,theelementsinaFITSdataarraymaybein-tegersoroating-pointnumbers.Thedynamicrangeofthedataarrayvaluesmayexceedthatofthedisplaymediumandtheeye,andtheirdistributionmaybehighlynonuniform.Logarithmic,square-root,andquadratictransferfunctionsalongwithhis-togramequalizationtechniqueshaveprovedhelpfulforren-deringFITSdataarrays.Someelementsofthearraymayhavevalueswhichindicatethattheirdataareundenedorin-valid;theseshouldberendereddistinctly.ViaWCSPaperI(Greisen&Calabretta2002)thestandardpermitsCTYPEn='COMPLEX'toassertthatadataarraycontainscomplexnumbers(futurerevisionsmightadmitotherelementssuchasquaternionsorgeneraltensors).Three-dimensionaldataarrays(NAXIS=3withNAXIS1,NAXIS2andNAXIS3allgreaterthan1)areofspecialinterest.Applicationsintendedtohandle`image/fits'maydefaulttodisplayingtherst2Dplaneofsuchanimagecube,ortheymaydefaulttopresentingsuchanimageinafashionakintothatusedforananimatedGIF,ortheymaypresentthedatacubeasamo-saicof`thumbnail'images.Thetime-lapsemovie-loopingdis-playtechniquecanbee ectiveinmanyinstances,andapplica-tionwritersshouldconsidero eringitforallthree-dimensionalarrays.An`image/fits'primaryHDUwithNAXIS=1isde-scribingaone-dimensionalentitysuchasaspectrumoratimeseries.Applicationsintendedtohandle`image/fits'mayde-faulttodisplayingsuchanimageasagraphicalplotratherthanasatwo-dimensionalpicturewithasinglerow.42 Anapplicationthatcannothandleanimagewithdimension-alityotherthantwoshouldgracefullyindicateitslimitationstoitsuserswhenitencountersNAXIS=1orNAXIS=3cases,whilestillprovidingaccesstothekeyword/valuepairs.FITSleswithdegenerateaxes(i.e.,oneormoreNAXISn=1)maybedescribedas`image/fits',buttherstaxesshouldbenon-degenerate(i.e.,thedegenerateaxesshouldbethehigh-estdimensions).Analgorithmdesignedtorenderonlytwo-dimensionalimageswillbecapableofdisplayingsuchanNAXIS=3orNAXIS=4FITSarraythathasoneortwooftheaxesconsistingofasinglepixel,andanapplicationwritershouldcon-sidercodingthiscapabilityintotheapplication.WritersofnewapplicationsthatgenerateFITSlesintendedtobedescribedas`image/fits'shouldconsiderusingtheWCSAXESkeyword(Greisenetal.2006)todeclarethedimensionalityofsuchde-generateaxes,sothatNAXIScanbeusedtoconveythenumberofnon-degenerateaxes.G.3.FileextensionsTheFITSstandardoriginatedintheerawhenleswerestoredandexchangedviamagnetictape;itdoesnotprescribeanynomenclatureforlesondisk.VarioussiteswithintheFITScommunityhavelong-establishedpracticeswherelesarepre-sumedtobeFITSbycontext.Fileextensionsusedatsuchsitescommonlyindicatecontentoftheleinsteadofthedataformat.Intheabsenceofotherinformationitisreasonablysafetopresumethatalenameendingin`.fits'isintendedtobeaFITSle.Nevertheless,thereareothercommonlyusedexten-sions;e.g.,``.fit',`.fts',andmanyothersnotsuitableforlistinginamediatyperegistration.AppendixH:PastchangesorclaricationstotheformaldenitionofFITSThisAppendixisnotpartoftheFITSstandard,butisincludedforinformationalpurposes.H.1.DifferencesbetweentherequirementsinthisstandardandtherequirementsintheoriginalFITSpapers.1.Sect.4.1.2:TheoriginalFITSdenitionpaper(Wellsetal.1981)disallowslowercaselettersinthekeywordname,butdoesnotspecifywhatothercharactersmayormaynotap-pearinthename.2.Sect.4.1.2:Theslashbetweenthevalueandcommentis`recommended'intheoriginalpaper(Wellsetal.1981)whereasthestandardrequiresthatitbepresent,whichiscon-sistentwiththeprescriptionofFortranlist-directedinput.3.Sect.4.2:Theoriginalpaper(Wellsetal.1981)speculatedthatFITSwouldeventuallysupportthefullrangeofexi-bilitythatisallowedbyFortranlist-directedinput,includ-ingdimensionedparameters.Thestandardrestrictsthevalueeldtoasinglevalue,notanarray.4.Sect.4.2.5andSect.4.2.6:Theoriginalpaper(Wellsetal.1981)denedaxedformatforcomplexkeywordvalues,withtherealpartrightjustiedinbytes11through30andtheimaginarypartrightjustiedinbytes31through50.TherearenoknownFITSlesthatusethisxedformat.Thestandarddoesnotdeneaxedformatforcomplexkeywordvalues.Instead,complexvaluesarerepresentedinconformancewiththerulesforFortranlist-directedinput,namely,withtherealandimaginarypartsseparatedbyacommaandenclosedinparentheses.5.Sect.4.4.1.1andSect.4.4.1.2:Thepaperthatdenesgen-eralizedextensions(Grosbøletal.1988)doesnotprohibittheappearanceoftheSIMPLEkeywordinextensionsnortheXTENSIONkeywordintheprimaryheader.H.2.ListofmodicationtotheFITSstandard,version3AftertheIAUFWGociallyapprovedversion3oftheFITSstandardin2008,thefollowingadditionalcorrections,clarica-tions,orformatmodicationshavebeenmadetothedocument.1.TwotypographicalerrorsinTable21(previouslyTable8.1)werecorrected.Thelast2linesofthethirdcolumnshouldread`LONPOLEa(=PVi 3a)'and`LATPOLEa(=PVi 4a)',insteadofPVi 1aandPVi 2a,respectively.(October2008)2.ThelatextextsourcedocumentwasreformattedtoconformtotheAstronomy&Astrophysicsjournalpagestyle(June2010).Thevisiblechangesincludethefollowing:–Thetables,gures,equations,andfootnotesarenum-beredsequentiallythroughouttheentirethedocument,insteadofsequentiallywithineachchapter.–Thecitationsusethestandard`Author(year)'formatin-steadofbeingreferencedbyasequentialnumber.Also,the`Bibliography'sectionattheendofthedocumenthasbeenreplacedbya`References'sectioninwhichtheci-tationsarelistedalphabeticallybyauthor.3.Thefollowingminorcorrectionsorclaricationsweremadeduringtherefereeingprocessaftersubmittingversion3oftheFITSstandardforpublicationintheAstronomy&Astrophysicsjournal(July2010):–AsentencewasaddedtotheendofSect.1.2:`ThiswebsitealsocontainsthecontactinformationfortheChairmanoftheIAUFWG,towhomanyquestionsorcommentsregardingthisstandardshouldbeaddressed.'–A`Section'columnwasaddedtoTable1toreferencetherelevantsectionofthedocument.–ThewordingofthesecondsentenceinSect.4.1.1wasrevisedfrom`Exceptwherespecicallystatedotherwiseinthisstandard,keywordsmayappearinanyorder.'to`Keywordsmayappearinanyorderexceptwherespecif-icallystatedotherwiseinthisstandard.'–Asentencewasaddedtotheendofthe`Keywordname'subsectioninSect.4.1.2:`Notethatkeywordnamesthatbeginwith(orconsistsolelyof)anycombinationofhy-phens,underscores,anddigitsarelegal.'–AfootnotetothedescriptionoftheREFERENCkey-wordinSect.4.4.2wasadded:`Thisbibliographiccon-vention(Schmitz1995)wasinitiallydevelopedforusewithinNED(NASA/IPACExtragalacticDatabase)andSIMBAD(operatedatCDS,Strasbourg,France).'–InSect.7.3.4,thephrase`TFORMnformatcode'wascorrectedtoread`TDISPnformatcode'(infourplaces).–Thewordinginthe`Expressedas'columninTable26forthe`LOG',`GRI',`GRA',and`TAB'spectralalgorithmcodeswasclaried.–InTableC.2theEXTNAME,EXTVER,andEXTLEVELkey-wordsweremovedunderthe`AllHDUs'columnbe-causetheyarenowallowedintheprimaryarrayheader.43 –ThelastparagraphofSect.4.1.2.3wascorrectedtostatethattheASCIItextcharactershavehexadecimalvalues20through7E,not41through7E.ReferencesNote:ManyoftheseFITSreferencesareavailableelectronicallyfromtheNASAAstrophysicsDataSystem(ADS)and/ortheFITSSupportOcewebsitesathttp://adswww.harvard.eduandhttp://fits.gsfc.nasa.gov/fits_documentation.html.Allen,S.&Wells,D.2005,IETFRFC4047,http://www.ietf.org/rfc/rfc4047.txtANSI1977,AmericanNationalStandardforInformationProcessing:CodeforInformationInterchange,ANSIX3.4–1977(ISO646)NewYork:AmericanNationalStandardsInstitute,Inc.Bradner,S.1997,IETFRFC2119,http://www.ietf.org/rfc/rfc2119.txtBunclark,P.&Rots,A.1997,Precisere-denitionofDATE-OBSKeyworden-compassingthemillennium,http://fits.gsfc.nasa.gov/year2000.htmlCalabretta,M.R.&Greisen,E.W.2002,A&A,395,1077Calabretta,M.R.&Roukema,B.F.2007,MNRAS,381,865Cotton,W.D.,Tody,D.B.,&Pence,W.D.1995,A&AS,113,159Cotton,W.D.,etal.1990,GoingAIPS:AProgrammer'sGuidetotheNRAOAstronomicalImageProcessingSystem,Charlottesville:NRAOGreisen,E.W.&Calabretta,M.R.2002,A&A,395,1061Greisen,E.W.,Calabretta,M.R.,Valdes,F.G.,&Allen,S.L.2006,A&A,446,747Greisen,E.W.&Harten,R.H.1981,A&AS,44,371Grosbøl,P.,Harten,R.H.,Greisen,E.W.,&Wells,D.C.1988,A&AS,73,359Grosbøl,P.&Wells,D.C.1994,BlockingofFixed-blockSequentialMediaandBitstreamDevices,http://fits.gsfc.nasa.gov/blocking94.htmlHanisch,R.,etal.2001,A&A,376,359Harten,R.H.,Grosbøl,P.,Greisen,E.W.,&Wells,D.C.1988,A&AS,73,365IAU1983,TransactionsoftheIAU,XVIIIB,45IAU1988,TransactionsoftheIAU,XXB,51IEEE1985,AmericanNationalStandard–IEEEStandardforBinaryFloatingPointArithmetic,ANSI/IEEE754–1985,NewYork:AmericanNationalStandardsInstitute,Inc.ISO2004,Informationtechnology–Programminglanguages–Fortran,ISO/IEC1539-1:2004,Geneva:InternationalOrganizationforStandardizationMcNally,D.,ed.1988,TransactionsoftheIAU,ProceedingsoftheTwentiethGeneralAssembly(Dordrecht:Kluwer)Ponz,J.D.,Thompson,R.W.,&Mu˜noz,J.R.1994,A&AS,105,53Schmitz,M.,etal.1995,Information&On-linedatainAstronomy,eds.D.Egret&M.A.Albrecht(KluwerAcademicPub.),259Wells,D.C.,Greisen,E.W.,&Harten,R.H.1981,A&AS,44,363Wells,D.C.&Grosbøl,P.1990,FloatingPointAgreementforFITS,http://fits.gsfc.nasa.gov/fp89.txt44 IndexNbits,10,11,15angularunits,8,28ANSI,3,38ANSI,IEEE,14,23arraydescriptor,20–23,25,26arraysize,10,11,15arrayvalue,3,4,13,18array,multi-dimensional,5,22,27,28,41array,variable-length,1,22,25,26,41ASCIIcharacter,3,14,17–19,38ASCIItable,17ASCIItext,3,4,6,12,19,23,38ASCII,ANSI,44AUTHOR,12binarytable,4,14,19,37BITPIX,10,11,13–17,20BLANK,13,14blocking,5BSCALE,13,14BUNIT,13byteorder,5,14,23BZERO,13,14casesensitivity,6,8,18,21characterstring,3,6,19,22,23COMMENT,6,12complexdata,7,21,23,24conformingextension,3–5coordinatesystems,26DATAMAX,13DATAMIN,13DATE,11DATE-OBS,12DATExxxx,12deprecate,3,4,6,9,12,14,19,27,28,31,35END,4,10,15,16,18,20,25EPOCH,31EQUINOX,31EXTEND,11extension,3–5,13,14,41,43extensionregistration,5,10extensiontypename,3,5,10,13extension,conforming,3–5extension,standard,4,5EXTLEVEL,14EXTNAME,13EXTVER,13eld,empty,20,23lesize,4ll,4–6,10,16,18,19,22,25FITSstructure,3,4,6,11oating-point,7,23,38oating-pointFITSagreement,44oating-point,complex,7,23format,data,14format,xed,6format,free,6,7,34format,keywords,6Fortran,5,17–19,21,22,44GCOUNT,11,15–17,20groupparametervalue,3,15,16GROUPS,15HDU,3,10HDU,extension,3,4HDU,primary,3–5heap,3,11,20–23,25,26HISTORY,6,12hyphen,6,18,21,28,31IAU,1,3,44IAUStyleManual,8,44IAUFWG,1,3,5,10,26,41IEEEoating-point,14IEEEspecialvalues,3,13,14,38imageextension,16INSTRUME,12integer,16-bit,14,23integer,32-bit,14,23integer,64-bit,14,23integer,8-bit,14,23integer,complex,7integer,unsigned,13,14,21,23keywordrecord,4,6keyword,commentary,6,12keyword,indexed,3,6,10keyword,mandatory,6,10,15–17,20,37keyword,new,14keyword,order,10,15,17keyword,required,4,10,15,16,20keyword,reserved,4,11,15,16,18,20,28,29,37keyword,validcharacters,6logicalvalue,7,23,24magnetictape,5NaN,IEEE,14,23,38,39NAXIS,4,5,10,11,15–17,20NAXIS1,15,17,18,20,22,25NAXIS2,17,18,20,22,25NAXISn,4,5,10,11,15,16NULL,ASCII,3,23OBJECT,12OBSERVER,12order,byte,5,14,23order,extensions,5order,keyword,6,10,15,17order,FITSstructures,4ORIGIN,11PCOUNT,11,15–17,20,2545 physicalvalue,3,4,13,15,16,18,21primarydataarray,3,4,15,16primaryheader,3,4,10,15PSCALn,15,16PTYPEn,15,16PZEROn,15,16randomgroups,3,13–15randomgroupsarray,15REFERENC,12repeatcount,4,20,23scaling,data,15,16,18,21signbit,14signcharacter,7,19SIMPLE,5,10,15slash,6,8specialrecords,3–5specialvalues,IEEE,23standardextension,4,5TABLE,17TBCOLn,17TDIMn,22TDISPn,18,21TELESCOP,12TFIELDS,17,20TFORMn,17,20,23,25THEAP,22,25time,11,12,31,35time,universal,11TNULLn,18,19,21,23TSCALn,18,21,25TTYPEn,18,20TUNITn,18,21two'scomplement,14,23TZEROn,18,21,25underscore,6,18,21units,4,8,13,18,21,28,32value,6,11value,undened,6,7,13,14,18,19,21,42variable-lengtharray,1,22,25,26,41WCS,26WCS,celestial,30WCS,spectral,31XTENSION,3,5,10,13,16,17,2046