%!PS-Adobe-2.0 %%Creator: dvips(k) 5.96.1 Copyright 2007 Radical Eye Software %%Title: cfitsio.dvi %%CreationDate: Wed Jul 18 13:51:13 2012 %%Pages: 188 %%PageOrder: Ascend %%BoundingBox: 0 0 612 792 %%DocumentFonts: CMBX12 CMR12 CMR10 CMBX10 CMSL10 CMTT10 CMSY10 CMMI10 %%+ CMTI10 %%DocumentPaperSizes: Letter %%EndComments %DVIPSWebPage: (www.radicaleye.com) %DVIPSCommandLine: dvips -o cfitsio.ps cfitsio.dvi %DVIPSParameters: dpi=600 %DVIPSSource: TeX output 2012.07.18:1350 %%BeginProcSet: tex.pro 0 0 %! /TeXDict 300 dict def TeXDict begin/N{def}def/B{bind def}N/S{exch}N/X{S N}B/A{dup}B/TR{translate}N/isls false N/vsize 11 72 mul N/hsize 8.5 72 mul N/landplus90{false}def/@rigin{isls{[0 landplus90{1 -1}{-1 1}ifelse 0 0 0]concat}if 72 Resolution div 72 VResolution div neg scale isls{ landplus90{VResolution 72 div vsize mul 0 exch}{Resolution -72 div hsize mul 0}ifelse TR}if Resolution VResolution vsize -72 div 1 add mul TR[ matrix currentmatrix{A A round sub abs 0.00001 lt{round}if}forall round exch round exch]setmatrix}N/@landscape{/isls true N}B/@manualfeed{ statusdict/manualfeed true put}B/@copies{/#copies X}B/FMat[1 0 0 -1 0 0] N/FBB[0 0 0 0]N/nn 0 N/IEn 0 N/ctr 0 N/df-tail{/nn 8 dict N nn begin /FontType 3 N/FontMatrix fntrx N/FontBBox FBB N string/base X array /BitMaps X/BuildChar{CharBuilder}N/Encoding IEn N end A{/foo setfont}2 array copy cvx N load 0 nn put/ctr 0 N[}B/sf 0 N/df{/sf 1 N/fntrx FMat N df-tail}B/dfs{div/sf X/fntrx[sf 0 0 sf neg 0 0]N df-tail}B/E{pop nn A definefont setfont}B/Cw{Cd A length 5 sub get}B/Ch{Cd A length 4 sub get }B/Cx{128 Cd A length 3 sub get sub}B/Cy{Cd A length 2 sub get 127 sub} B/Cdx{Cd A length 1 sub get}B/Ci{Cd A type/stringtype ne{ctr get/ctr ctr 1 add N}if}B/CharBuilder{save 3 1 roll S A/base get 2 index get S /BitMaps get S get/Cd X pop/ctr 0 N Cdx 0 Cx Cy Ch sub Cx Cw add Cy setcachedevice Cw Ch true[1 0 0 -1 -.1 Cx sub Cy .1 sub]{Ci}imagemask restore}B/D{/cc X A type/stringtype ne{]}if nn/base get cc ctr put nn /BitMaps get S ctr S sf 1 ne{A A length 1 sub A 2 index S get sf div put }if put/ctr ctr 1 add N}B/I{cc 1 add D}B/bop{userdict/bop-hook known{ bop-hook}if/SI save N @rigin 0 0 moveto/V matrix currentmatrix A 1 get A mul exch 0 get A mul add .99 lt{/QV}{/RV}ifelse load def pop pop}N/eop{ SI restore userdict/eop-hook known{eop-hook}if showpage}N/@start{ userdict/start-hook known{start-hook}if pop/VResolution X/Resolution X 1000 div/DVImag X/IEn 256 array N 2 string 0 1 255{IEn S A 360 add 36 4 index cvrs cvn put}for pop 65781.76 div/vsize X 65781.76 div/hsize X}N /p{show}N/RMat[1 0 0 -1 0 0]N/BDot 260 string N/Rx 0 N/Ry 0 N/V{}B/RV/v{ /Ry X/Rx X V}B statusdict begin/product where{pop false[(Display)(NeXT) (LaserWriter 16/600)]{A length product length le{A length product exch 0 exch getinterval eq{pop true exit}if}{pop}ifelse}forall}{false}ifelse end{{gsave TR -.1 .1 TR 1 1 scale Rx Ry false RMat{BDot}imagemask grestore}}{{gsave TR -.1 .1 TR Rx Ry scale 1 1 false RMat{BDot} imagemask grestore}}ifelse B/QV{gsave newpath transform round exch round exch itransform moveto Rx 0 rlineto 0 Ry neg rlineto Rx neg 0 rlineto fill grestore}B/a{moveto}B/delta 0 N/tail{A/delta X 0 rmoveto}B/M{S p delta add tail}B/b{S p tail}B/c{-4 M}B/d{-3 M}B/e{-2 M}B/f{-1 M}B/g{0 M} B/h{1 M}B/i{2 M}B/j{3 M}B/k{4 M}B/w{0 rmoveto}B/l{p -4 w}B/m{p -3 w}B/n{ p -2 w}B/o{p -1 w}B/q{p 1 w}B/r{p 2 w}B/s{p 3 w}B/t{p 4 w}B/x{0 S rmoveto}B/y{3 2 roll p a}B/bos{/SS save N}B/eos{SS restore}B end %%EndProcSet %%BeginProcSet: texps.pro 0 0 %! TeXDict begin/rf{findfont dup length 1 add dict begin{1 index/FID ne 2 index/UniqueID ne and{def}{pop pop}ifelse}forall[1 index 0 6 -1 roll exec 0 exch 5 -1 roll VResolution Resolution div mul neg 0 0]FontType 0 ne{/Metrics exch def dict begin Encoding{exch dup type/integertype ne{ pop pop 1 sub dup 0 le{pop}{[}ifelse}{FontMatrix 0 get div Metrics 0 get div def}ifelse}forall Metrics/Metrics currentdict end def}{{1 index type /nametype eq{exit}if exch pop}loop}ifelse[2 index currentdict end definefont 3 -1 roll makefont/setfont cvx]cvx def}def/ObliqueSlant{dup sin S cos div neg}B/SlantFont{4 index mul add}def/ExtendFont{3 -1 roll mul exch}def/ReEncodeFont{CharStrings rcheck{/Encoding false def dup[ exch{dup CharStrings exch known not{pop/.notdef/Encoding true def}if} forall Encoding{]exch pop}{cleartomark}ifelse}if/Encoding exch def}def end %%EndProcSet %%BeginFont: CMTI10 %!PS-AdobeFont-1.1: CMTI10 1.00B %%CreationDate: 1992 Feb 19 19:56:16 % Copyright (C) 1997 American Mathematical Society. All Rights Reserved. 11 dict begin /FontInfo 7 dict dup begin /version (1.00B) readonly def /Notice (Copyright (C) 1997 American Mathematical Society. All Rights Reserved) readonly def /FullName (CMTI10) readonly def /FamilyName (Computer Modern) readonly def /Weight (Medium) readonly def /ItalicAngle -14.04 def /isFixedPitch false def end readonly def /FontName /CMTI10 def /PaintType 0 def /FontType 1 def /FontMatrix [0.001 0 0 0.001 0 0] readonly def /Encoding 256 array 0 1 255 {1 index exch /.notdef put} for dup 68 /D put dup 72 /H put dup 85 /U put dup 97 /a put dup 98 /b put dup 101 /e put dup 103 /g put dup 105 /i put dup 108 /l put dup 109 /m put dup 110 /n put dup 111 /o put dup 112 /p put dup 114 /r put dup 115 /s put dup 116 /t put dup 117 /u put readonly def /FontBBox{-163 -250 1146 969}readonly def currentdict end currentfile eexec D9D66F633B846A97B686A97E45A3D0AA0529731C99A784CCBE85B4993B2EEBDE 3B12D472B7CF54651EF21185116A69AB1096ED4BAD2F646635E019B6417CC77B 532F85D811C70D1429A19A5307EF63EB5C5E02C89FC6C20F6D9D89E7D91FE470 B72BEFDA23F5DF76BE05AF4CE93137A219ED8A04A9D7D6FDF37E6B7FCDE0D90B 986423E5960A5D9FBB4C956556E8DF90CBFAEC476FA36FD9A5C8175C9AF513FE D919C2DDD26BDC0D99398B9F4D03D5993DFC0930297866E1CD0A319B6B1FD958 9E3948FFB0B4E70F212EC976D65099D84E0D37A7A771C3101D6AD26A0513378F 21EC3643079EECE0C9AB54B4772E5DCA82D0D4ACC7F42FB493AA04A3BF4A1BD6 06ECE186315DBE9CFDCB1A0303E8D3E83027CD3AFA8F0BD466A8E8CA0E7164CF 55B332FAD43482748DD4A1CB3F40CB1F5E67192B8216A0D8FE30F9F05BF016F5 B5CC130A4B0796EE065495422FBA55BEE9BFD99D04464D987AC4D237C208FA86 0B112E55CE7B3782A34BC22E3DE31755D9AFF19E490C8E43B85E17ECE87FA8B9 1485831624D24F37C39BF9972D74E6EC4784727AC00B9C4A3AD3DA1C22BD6961 7E0ADAF55422F22ACA5E4DCD4DF9FCD187A566B7FB661D0530454D0DD6C6C50A 7A3875C6CBF8EC7769F32A1F3F7FC1C072BADEC97794D4E90E0035282A170402 356E5A9CD9ABD80AC4342A5283E458A7269252F4541CBB6452B39ED54D336D0B 19928E9CD1AB26AD83EB209E2EC75011A2643813053B5DBB0246097C4821B5F2 C92554E9140BE35B2DBFCD98809A8EC9FC910FDE9E0D86457C70ACB056EBF90F 244DC0A5BBD455E15D6E3180311D52CF50B0BF7D0A7F64F3A1821E0AEDBC2E7B AEB549FE1D51088C153799C6E089B5D5D65E1C4E2D2B430CDF1FFA23CCB25D95 5C43C8942435D0AAA3D9055FF808F2C3C887A3C469BBD98F026D0A59E26BA9F9 C2144CFE49A9AD892D4D31764F0AE3A10644AE3966B0A790684B14D11FA49785 EC5565D2B2E584CBFD85125F3FAC133338DE35361943DCE9AF05FCF2840CE512 998D42CBEC52B57B79DD63F00985881E8463396ADA47189A94DDF951A78866F0 B8A3D9197E39335277EF2294308DA70065D910943A34F7D5F2090FB4AA42ED70 CBA469A9F64B95A6FBA4BC89DBC93765E3AE4723162DF3F9D6BDE77DD5870ADE C8900D6346957B84C3CE88A8F9A12D46B8FCA50DF4433B0B8AED6A63B3DA102B 6DF94E62408E24154BAAC66B2B249C695BC0FA37A28699D9C0F3EE94AA32E3C5 8F8D7F803B5D25014D43A353D719B14B247A87898A960DF68C0C0BAF70C83917 6E9F7B3ACC64DBAEF3FDCD3A80C0AB907EE342E543D607556CBE5A9089B86D1D E768F27D74A613F3ABF883222A8596B542EBF54E9DCE327B5682AEE5F6BCC38A 2A052EC4018AE3189DC1963BA39ACDED8F0C60C83F8873FBBF0302010956C520 A7F3F8ECD0F177EDF5F4D5522C5984A3678FF32EEEB570B69C142AB89467641F 917155D646DAF3352E27BF2AA0746E062E48532256AF364EFC0F0AAE3766F75C 5219ABA60BDFF177558536E000DE3263A4A6EAAA669F9F4E94BAB336391AF5FB 280A5B39995483E788CE4820EF77AECD73B1AE89DAC3F13E333F2628CDBA431D 2A5E547D4225E6BE13119660BEBC155823A51477647F7E07A23D7D24353F584B 2B311C4529E0E408B4E89A467BC03794CF4E7AA0A717A8247D5B60F438417D01 8155F17E09D4C4FECED18CE574D6849640E5E0592D771F026BCB0CE66FD13BC9 5A89D07EE26021FD5DF14B96AEDC02AEC3E099088C1DAE4FCA2AE841B17F5C4A D251FB56462CF050AD3CA84DA12DC1D17F80301CCFDE6C35C81FA538A389E0B6 8BFF0DDC4B97D49B485E8C6AF47F951C042D2C750748B4084B3F4AC18488EEC2 900A9672A6CA2B06A0F091E8DD9DFE504A5C6DF1537AE7F54DCFD94EF5CC663A A80E1C64CF1CD751D28858CDACA6F7CD0463A86619E87B9C03C9448B44537E78 5E60A25045FBDBEE678737FA45F029D92908443C7BB9FC87B7B280C314F39A96 B5287BA21CB3EBCF7816BC0900095F3F9F11D7774BC1D1D4A7F8098C610E3FB2 C2E2E9D9DAAA6CD1EE4F35CE854B7C79DF8318CCC10C52DE36E4AC5D75ED7D8A DD4E8A3B827DC8A7D437DD38B782929EA60CAC4930F9711087DDC18574B472FA B40DEFFED99BE0C0CA85E9FA2028152C8B6423CB94E797E3651043BE9636109E 87B70592852FD5198A7D340C0E1C419D0EBAEAF483300E41A6F6B1DFEAB071CD A4E0A596509369A4EDB66ABC883443FC615AFFA74C672922D263B5F64E861C6D C44E9C0BBBBA305C9AB04FAEB77E0C25C0D67F77639F6022D028847E796879D2 B6C4AB4313FF3568E407784F1E00503A5875DC68464A720C8E55BCD80269B4DE B3C05D49DD15B581554B61E9D6313D47C39991582BECB1EF6E959CC64167DA7E F98EB7F130EE821FF04BB4842D3B8F23E81C4DB8C4B340EC9807DA0CC2627ABE 9F1505EDA580A499BDC35E348CA6A15FB197597A5A3E519DF0B4749D5DC67B8E 2D93EA98498CA6129C0993C0A6945A5137CB4A1B4B38A008B1559D719681E6AC 09FAA1D2337E266FDC02D77AE822DC13724A0620C5ABFDA9402D3DD4DCB80CA5 28F875133862164328A59F7E58E36CA06F23E651D8BBAA490D145F3788A30BA9 C5389826A4B2F17E2B301BE89C464D9888C1E798744E815C44E68B94BABB8FC4 2872E1AFBB63CA489FB1504926C84C5F8AC7E6A93942C3B0C3250EEFAFF70449 3734AA4932BBF7B098C8287D8DD2F0E75F0F7B184BE5A24A6C9EF1C7CE86D58E 1018668396EF8842609FD4C207CF3D818DA21AB4FB96EDEDF11905E15153D319 93EF1A3297FB71AC25E9FEE544D66A2E6D94D147408033B1784D060EA8BD6807 1A2194884CBEFD552D52B7B8B63A2A9A1DE5C4B437262091089497D10E4C1678 52664B16F1FA71371BDF96D038FF88F695A02B7057DB4D97CC9AF8534518BE9E FCE87619AD6BDAFBE6EE8FDDE427D3CCD32E4143AB09B27F559E7727CEF7F39F DFB7E07E86E3512757E64C82D0FA29EB1E00E4F213B12679E2307BA8A363BBF6 B3411F4C50A8E51A11D6716CB5431B6B941B5548FCA3C85B3829F7EC05D881DE 4D2E994F6C815589CB4F5188A581FD9BE70E9D01E8F36BFBB5732F89DA7651FE 9F20A732F94035BDAB79728D559647EBC1A386F7BB3489D59BCB048910AB9D2F 38F9B3B9C0648A9AFA41B4089CE3EF93E7E8E5140532EFD745AE3F000502344B 5030FC71BAC616EF9349D5C8B336FA9A3624E1D2DDBE5C596702F778FD9FA98F 5899447510DDCDE2599939667F9831B6D06ED3CE3167D15F9C502EB035A05B86 D4AA82D68A8511BFD3312250273545C5C4355629DFEE31B5A1B078BC2C805305 22A3F4865F9C978C6E71A5F5C858E21CBA36053277190DB9D89A4B985FB916D8 DEC338E997F3226EAFA917AA18C1C9B055BB82DDDD50FFE00B93DA5C9C662760 7326F16E661443A6EDCCC04FF913605AD63E022EB96C7C9A7FA60E185073E163 0A61ADC0E39B114BE69EAA874209C8713E765D017A8D727648B0340295D56C13 34A95D3D2F40CF4CD2BBE527C433E09F00BC1BD5C7425E4DB2A17204F0B8DBA2 82CA3F37C424FC07B69C89635DFB3971894E946D928802471C2B1C40F49701FB 485186D20A803C0BA76DFED4ECB2446FF25258118E593CD1EBC8ACA718B5C9D6 C4F5AC941B28716B10B283FED21A16C94E92C431BFB9C8AC3D3F1EF7DC46ACCC A82ACCE510A3F687AAEDC6839800F48AC96A5B81A97FE4F37CAA586969AB3D58 001C8134BE160EEEDB79A780D2AA57BEEBD2FBCD9A453066B6642C459A679A84 5E3FB8F50F7C00EFDE6049D2C01893750C5F60F2DC98FC36F2E656774123DFF3 E4EEE44D085083365124889B3103DFA03F5A5648446BDDAC9FA40C69D83D2D4D 0D6017D7D840A4F7CD97EFF126F48B331CAF5DE0856F689FD0FC450005793C8A 74EC6BEF32FF405AA2F4F6ADF624E0C72CEF916ABD6BDB7C0AEECEA855F07AA7 E5BE6F7DCCE459F4F390965C9350A3060825CE22CC25905FEEE40E4973C0189E 5021FF9FC2EAB4301790F255B617638A2C44F4D71A74EE96DA5178A9296D388C 0D43CD188C0F78D9A57D78EBE390A2BCCD0AC3087AF4A1273443795EF08D0F11 ABEA3A173746C05E538D88FBC0A3A1DC82A762F951E63A135F63BC3B7E05B8E6 B89DF17BD32E871FE1C967B5DA4FCB9187747B6A30B551B9C4FE920C34E40A8B E268ED41382AD1DED7E79D18469F58305CE1275C4AFBE4770BCD87D06D7101F7 5EBF74D9F3AFF9608BE5736BF1B2B33B4B3E3C8CFD3A91CECDFCD7E0A4A586FC 699EE79D7756E49DD686C65451A58BEDCF0FEED1B23EB408845391FEE74A3628 11837485BDE72131D0EF7D0EDA3E23BCEFAFF9DC2616CBC8E52523EA157DF140 9498280EB11F1C42B05BA5281F7ACE1BF40F74F3D5D61A6B852461013F773915 0BA29094461022A1F1AD4B62CD619E6BDE7CA645914ABDFE87758C039B3C3848 04BAF878C215BBC35A1D259B2CC21AA2B7C7B43165398CF37779B31190DC8526 41E02F9361CA8E7750A39478DEAA823069009007B53FCBABBA40A98C90E603F0 C76E3383938422548A9A49CD8D9CABEFEC5D9DB27F60303DE67AAC2E79EBE12E 48A2D6B687A720D73169236DFE597514C656AACF348201B76008714FEB551241 5F2C86E06820109386E5588A7E67651C1EA9422DE9307BEEED35E87B6B61F0DE 3EE5C5B7FD94350FBB081378191539122C6A73939BA7D47AF08E54C5CC4553DA 420E9680BA4B954D9BBE82A8FC559C86861760F9B24103493A26FB55E2DC7880 5ABD36590011431ED606491093B769CA74AA6F8B91076D6D8368BB39D4C7B435 CC461A9E9FBDB28772E51AC2C563DD42C4A87F7A544C8B6D10D5D2504F9A4BBD D4F1A5A6DF8278AB6F3B10214AD75FEB1B5E32801D2631983E2735BE149FAFA1 560E57087EAEC3E45526DF9C748F42E6540CCB14DE6DD11509F3F1BD6D5B3BFD 3D59D2EDB6235DEEE1A893F522497EC38CEED07774E8B23AFC381D6432B87015 A586224B9EC36C4498624E5CF2E9BE61FBFF52F479F4CD12A717C0FCC19182B5 A5A9F8D415472F4C61E8965AE972EDAC4A17776B6EC1132CE29D6396D2B01B6D BEBA1ABD3273C62B3475E2DB8B57E61208AC63BFF8CCE2BA085321FE0C9F874C A645C234812D75E9C5C02D0B0E13D57725D105724BB2C5A916F6E82D57D005F3 9F6B1F041A2B9675AF901B171E6E896F5B8FC545BC88E183AC5E5F1B2288CC5C 7351BAD140CBFA03F2FD18298551BDB15024BCBE844B418B067208EA0A13B731 58747D1B90BB00E37FD7DF9FFAAC80DBDD92E1301DDF1ADE62ACBF169FBFD927 AA84D56E00D02D5B8A34FE3D2B1AAC470336AA02062F42F2C958307142F7C6E7 BD440AC8D8C6A46DFB2B42A32BFA4255A47F3CB3F0733F294EB47AA59DD26A03 C81A4BD18162EFCB77F3BBEC3E8B225E76BA51DE178468B529D146A544180542 6EAE3A451781F5E38DF15BB377C9FE92096E976AFC14DADD11581D29222948F9 FE23D981CEE4E5013025FF3E69E479D32A7A8D25A842FB288A0EC63E23E297E0 168D22FEC35E333A2D67A37A4EED7B59A06F21F44DC6831CAFA473E48A66EDB5 00FEC1D5399A06F51A8A67A6803FE34C1B1F2E4CA8D7EA3CFA8BD046D477777A D283296A8F181D671CBA5B9793DE178BFAF807A6F71E4FC6D69CE7CFEF11D0B6 F8B23221E627475226706C19EF519D19B80633DDBF4A1AD9E271E547CCC846B3 859CD96E495D12E3D5557A309F12949ACF5F373A29C0FD4A6456C737E6F08BDE 0A0C692D66BCE059ADB9B91F8F81975308ECB3313B34093E06462C9DA76A4BB2 1D8DEB5E4526CF73DA4D9D5CC7148E5FBABDF1D45F024469B6D84BB607BA975F 1F6EE627044A93D108427B6C14528B5C6D1568E65F3450D7F4A37EE34D619138 8B7914C63A362737025C0E57F928AB5741CB79D137249914A3CEEC0DECFF639C 0F6B8125C643EDA71F2945FC7DB555E4ED2896C49E83D4515B0DA9A72764C792 9D6A72F18F15C71BB655DD64E421EFF712865D45D2642C7E63501F3289D589FB B983626C60523142AFBEADD4019BB3C4D9C6ADD66012D0CA6AAB374FCB7FF77E 89BF30C153007F48E06EE2278BFF6F0C9AD9BCE6AF9A9171A58EA65CBA2A6A82 E35D45980D84DE7D9199344686C8F08090DF43D0051C15C4E19A9D1C76E4686D 7412DAE7F6EF4E86230C43187D1997E98010F6C8E5E8941DC837C6E73E9C0947 AD2B9E8333BE73BF30D56C31E2B76DE3F6C841F42B109270CBE04D10A9D64CE9 0FB722EC4FCC3F1EB7CCAA2C6C6B3D285D786DAC189F440F32057CFC882A6257 3068C55D4470801D8E2D6B5972D30B54C54E 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 cleartomark %%EndFont %%BeginFont: CMMI10 %!PS-AdobeFont-1.1: CMMI10 1.100 %%CreationDate: 1996 Jul 23 07:53:57 % Copyright (C) 1997 American Mathematical Society. All Rights Reserved. 11 dict begin /FontInfo 7 dict dup begin /version (1.100) readonly def /Notice (Copyright (C) 1997 American Mathematical Society. All Rights Reserved) readonly def /FullName (CMMI10) readonly def /FamilyName (Computer Modern) readonly def /Weight (Medium) readonly def /ItalicAngle -14.04 def /isFixedPitch false def end readonly def /FontName /CMMI10 def /PaintType 0 def /FontType 1 def /FontMatrix [0.001 0 0 0.001 0 0] readonly def /Encoding 256 array 0 1 255 {1 index exch /.notdef put} for dup 62 /greater put readonly def /FontBBox{-32 -250 1048 750}readonly def currentdict end currentfile eexec D9D66F633B846A97B686A97E45A3D0AA0529731C99A784CCBE85B4993B2EEBDE 3B12D472B7CF54651EF21185116A69AB1096ED4BAD2F646635E019B6417CC77B 532F85D811C70D1429A19A5307EF63EB5C5E02C89FC6C20F6D9D89E7D91FE470 B72BEFDA23F5DF76BE05AF4CE93137A219ED8A04A9D7D6FDF37E6B7FCDE0D90B 986423E5960A5D9FBB4C956556E8DF90CBFAEC476FA36FD9A5C8175C9AF513FE D919C2DDD26BDC0D99398B9F4D03D5993DFC0930297866E1CD0A319B6B1FD958 9E394A533A081C36D456A09920001A3D2199583EB9B84B4DEE08E3D12939E321 990CD249827D9648574955F61BAAA11263A91B6C3D47A5190165B0C25ABF6D3E 6EC187E4B05182126BB0D0323D943170B795255260F9FD25F2248D04F45DFBFB DEF7FF8B19BFEF637B210018AE02572B389B3F76282BEB29CC301905D388C721 59616893E774413F48DE0B408BC66DCE3FE17CB9F84D205839D58014D6A88823 D9320AE93AF96D97A02C4D5A2BB2B8C7925C4578003959C46E3CE1A2F0EAC4BF 8B9B325E46435BDE60BC54D72BC8ACB5C0A34413AC87045DC7B84646A324B808 6FD8E34217213E131C3B1510415CE45420688ED9C1D27890EC68BD7C1235FAF9 1DAB3A369DD2FC3BE5CF9655C7B7EDA7361D7E05E5831B6B8E2EEC542A7B38EE 03BE4BAC6079D038ACB3C7C916279764547C2D51976BABA94BA9866D79F13909 95AA39B0F03103A07CBDF441B8C5669F729020AF284B7FF52A29C6255FCAACF1 74109050FBA2602E72593FBCBFC26E726EE4AEF97B7632BC4F5F353B5C67FED2 3EA752A4A57B8F7FEFF1D7341D895F0A3A0BE1D8E3391970457A967EFF84F6D8 47750B1145B8CC5BD96EE7AA99DDC9E06939E383BDA41175233D58AD263EBF19 AFC0E2F840512D321166547B306C592B8A01E1FA2564B9A26DAC14256414E4C8 42616728D918C74D13C349F4186EC7B9708B86467425A6FDB3A396562F7EE4D8 40B43621744CF8A23A6E532649B66C2A0002DD04F8F39618E4F572819DD34837 B5A08E643FDCA1505AF6A1FA3DDFD1FA758013CAED8ACDDBBB334D664DFF5B53 9560176676ABB71BBD0EE56B4CC492C0652750227CEC7B86E4740EB7B8775564 332769DD30794E501BBB0E4E5CB665F3628E10B1137CC8BC5C0A64A310B5E27E 5FD6E3B04DA3914C15987E638A72790AF4073CE9CDBF6E3C749CB4DFF9C54951 A58C386C54BC4E98B102B5E91E8567D2EEEF048F2CBD5D243701D20909290B4B A3083F632D8552D42DEE0C69A4B14D8B15AA082DECC12B2ECAE6F663E6D09F81 EE2979EF41FBF12C9D8BF23B77E0A20088EBD107C5BF9DD6F03FFC3AB65B69A7 54953327E1D4AEF5A146273392BBDB321D4CC9A8FFFCFE5C515B466E21546CC7 C6209E5A76F916B03DB98BC6CED334F33E7B373D42761696F5A876CA6F93F16E 15A07E2E102148CA4F62A99C 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 cleartomark %%EndFont %%BeginFont: CMSY10 %!PS-AdobeFont-1.1: CMSY10 1.0 %%CreationDate: 1991 Aug 15 07:20:57 % Copyright (C) 1997 American Mathematical Society. All Rights Reserved. 11 dict begin /FontInfo 7 dict dup begin /version (1.0) readonly def /Notice (Copyright (C) 1997 American Mathematical Society. All Rights Reserved) readonly def /FullName (CMSY10) readonly def /FamilyName (Computer Modern) readonly def /Weight (Medium) readonly def /ItalicAngle -14.035 def /isFixedPitch false def end readonly def /FontName /CMSY10 def /PaintType 0 def /FontType 1 def /FontMatrix [0.001 0 0 0.001 0 0] readonly def /Encoding 256 array 0 1 255 {1 index exch /.notdef put} for dup 15 /bullet put dup 102 /braceleft put dup 103 /braceright put dup 106 /bar put readonly def /FontBBox{-29 -960 1116 775}readonly def currentdict end currentfile eexec D9D66F633B846A97B686A97E45A3D0AA052F09F9C8ADE9D907C058B87E9B6964 7D53359E51216774A4EAA1E2B58EC3176BD1184A633B951372B4198D4E8C5EF4 A213ACB58AA0A658908035BF2ED8531779838A960DFE2B27EA49C37156989C85 E21B3ABF72E39A89232CD9F4237FC80C9E64E8425AA3BEF7DED60B122A52922A 221A37D9A807DD01161779DDE7D31FF2B87F97C73D63EECDDA4C49501773468A 27D1663E0B62F461F6E40A5D6676D1D12B51E641C1D4E8E2771864FC104F8CBF 5B78EC1D88228725F1C453A678F58A7E1B7BD7CA700717D288EB8DA1F57C4F09 0ABF1D42C5DDD0C384C7E22F8F8047BE1D4C1CC8E33368FB1AC82B4E96146730 DE3302B2E6B819CB6AE455B1AF3187FFE8071AA57EF8A6616B9CB7941D44EC7A 71A7BB3DF755178D7D2E4BB69859EFA4BBC30BD6BB1531133FD4D9438FF99F09 4ECC068A324D75B5F696B8688EEB2F17E5ED34CCD6D047A4E3806D000C199D7C 515DB70A8D4F6146FE068DC1E5DE8BC57030ACE57A0A31C99BEDB251A0ECAD78 253AB321023D15FF7F55A3CE81514C1E7E76240C1FB36CD4874DDB761CC325F5 D588700B294849D690F93526EF438A42B9B5B0508584EA3766D35F5B8D51C458 ECB9FBD23A49576EAB06BACB7EA6D300985500835F4FE597D4A1110C8EABE6FC CE3E1F95CFD3A42446F25355381D476B2FFB6EF247BF58A6FFC5EC0E4CC207BE 46485F8E07350B37DCA8C1864E62614332A1D3C9DEDDD6492181949A2C3498C9 EC2A81C1F4FF989A4654E375F509D24D969B97D2A9940FAF43BBB286E08559C0 F8D9674B0A294B36D3A050F7DED8C80E1D230812F6B8387B17948FD29FF050E2 AAC5EBE5D96AFD0879534E2F4BB81613A1571750F9CF4215199F93813D815B5D 1C79E11A0FCBB627CDE569F88C741CD502627777BB058ECAC09B6ACCFACA69B9 8F8168B0B5A1A6EB13E884B348FBB2ACF9EB180F6E27D57F8503710CE037A34A F8B157201657C825E2A4B4A7696B58B7A988C05E43E66F0FF277A7694C555C54 AFB1D32F6DE102136FC810E1F3B5CEA42476EAC7AAFB390E3252B2169DCDEE6E 328507BD0E24734A85AAA263E0D2F64BE1607455BC855785BC27F8B30FE917B4 23AB3C812975355942E955501AF85A3C0CE836911AF679EA44AD6A7D042A6549 0C471FE294E8490024D93ADCADED460FAB7FBCDC29EFEBD2A9A127E11869E659 961B29206CE63944B6FA4B9315BCC528EB1E0223CE94C795A5D5231A7FC8545D 6B287B965F8EEDDB67A6774129DD01D5A21694ABE320BB2553043D4C42ACFF91 1009372CB03381035BEEEEFD05631E026A0980A72A67B3703323A4E7C94FFCEE 8D0B7407F9CCC043D3D184BEA4728385D6AB2FB0641DD8F5BA7E04035D30D628 7E97D31C1486DFD5B1D076B84B4ABA4829ED4310321F1F24B847C44E00185A69 37711A 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 cleartomark %%EndFont %%BeginFont: CMBX12 %!PS-AdobeFont-1.1: CMBX12 1.0 %%CreationDate: 1991 Aug 20 16:34:54 % Copyright (C) 1997 American Mathematical Society. All Rights Reserved. 11 dict begin /FontInfo 7 dict dup begin /version (1.0) readonly def /Notice (Copyright (C) 1997 American Mathematical Society. All Rights Reserved) readonly def /FullName (CMBX12) readonly def /FamilyName (Computer Modern) readonly def /Weight (Bold) readonly def /ItalicAngle 0 def /isFixedPitch false def end readonly def /FontName /CMBX12 def /PaintType 0 def /FontType 1 def /FontMatrix [0.001 0 0 0.001 0 0] readonly def /Encoding 256 array 0 1 255 {1 index exch /.notdef put} for dup 11 /ff put dup 12 /fi put dup 39 /quoteright put dup 40 /parenleft put dup 41 /parenright put dup 45 /hyphen put dup 46 /period put dup 47 /slash put dup 48 /zero put dup 49 /one put dup 50 /two put dup 51 /three put dup 52 /four put dup 53 /five put dup 54 /six put dup 55 /seven put dup 56 /eight put dup 57 /nine put dup 58 /colon put dup 65 /A put dup 66 /B put dup 67 /C put dup 68 /D put dup 69 /E put dup 70 /F put dup 71 /G put dup 72 /H put dup 73 /I put dup 75 /K put dup 76 /L put dup 77 /M put dup 78 /N put dup 79 /O put dup 80 /P put dup 82 /R put dup 83 /S put dup 84 /T put dup 85 /U put dup 86 /V put dup 87 /W put dup 97 /a put dup 98 /b put dup 99 /c put dup 100 /d put dup 101 /e put dup 102 /f put dup 103 /g put dup 104 /h put dup 105 /i put dup 107 /k put dup 108 /l put dup 109 /m put dup 110 /n put dup 111 /o put dup 112 /p put dup 113 /q put dup 114 /r put dup 115 /s put dup 116 /t put dup 117 /u put dup 118 /v put dup 119 /w put dup 120 /x put dup 121 /y put dup 122 /z put readonly def /FontBBox{-53 -251 1139 750}readonly def currentdict end currentfile eexec D9D66F633B846A97B686A97E45A3D0AA052A014267B7904EB3C0D3BD0B83D891 016CA6CA4B712ADEB258FAAB9A130EE605E61F77FC1B738ABC7C51CD46EF8171 9098D5FEE67660E69A7AB91B58F29A4D79E57022F783EB0FBBB6D4F4EC35014F D2DECBA99459A4C59DF0C6EBA150284454E707DC2100C15B76B4C19B84363758 469A6C558785B226332152109871A9883487DD7710949204DDCF837E6A8708B8 2BDBF16FBC7512FAA308A093FE5F0364CD5660F74BEE96790DE35AFA90CCF712 B1805DA88AE375A04D99598EADFC625BDC1F9C315B6CF28C9BD427F32C745C99 AEBE70DAAED49EA45AF94F081934AA47894A370D698ABABDA4215500B190AF26 7FCFB7DDA2BC68605A4EF61ECCA3D61C684B47FFB5887A3BEDE0B4D30E8EBABF 20980C23312618EB0EAF289B2924FF4A334B85D98FD68545FDADB47F991E7390 B10EE86A46A5AF8866C010225024D5E5862D49DEB5D8ECCB95D94283C50A363D 68A49071445610F03CE3600945118A6BC0B3AA4593104E727261C68C4A47F809 D77E4CF27B3681F6B6F3AC498E45361BF9E01FAF5527F5E3CC790D3084674B3E 26296F3E03321B5C555D2458578A89E72D3166A3C5D740B3ABB127CF420C316D F957873DA04CF0DB25A73574A4DE2E4F2D5D4E8E0B430654CF7F341A1BDB3E26 77C194764EAD58C585F49EF10843FE020F9FDFD9008D660DE50B9BD7A2A87299 BC319E66D781101BB956E30643A19B93C8967E1AE4719F300BFE5866F0D6DA5E C55E171A24D3B707EFA325D47F473764E99BC8B1108D815CF2ACADFA6C4663E8 30855D673CE98AB78F5F829F7FA226AB57F07B3E7D4E7CE30ED3B7EB0D3035C5 148DA8D9FA34483414FDA8E3DC9E6C479E3EEE9A11A0547FC9085FA4631AD19C E936E0598E3197207FA7BB6E55CFD5EF72AEC12D9A9675241C7A71316B2E148D E2A1732B3627109EA446CB320EBBE2E78281CDF0890E2E72B6711335857F1E23 337C75E729701E93D5BEC0630CDC7F4E957233EC09F917E5CA703C7E93841598 0E73843FC6619DE017C8473A6D1B2BE5142DEBA285B98FA1CC5E64D2ADB981E6 472971848451A245DDF6AA3B8225E9AC8E4630B0FF32D679EC27ACAD85C6394E A6F71023B660EE883D8B676837E9EBA4E42BA8F365433A900F1DC3A9F0E88A26 30F7B5CE2041568C18D8F66D36C31B003C916EC14620F67D695D846F2EF97CB8 0D569CB47D8939FE3C0009749B48D0D9856FA050F2D1BEBE2DD68DDBFEAFC2ED 7A7BA881DF4859A0F43EF10EF5DC41B5E82C630F2E3E435E37DCD10B63D3C96A 38C0C5AAE886D864E24FDD862D6957C084CC4A39623629F00DA0F035DACFEF70 4D8DF7C197095975D874B919691A7E03C56534645AB63E6B829038B435E1D2AC 2ACA8A5E4C2DBD300F7C786A9C196539C8BE8A6FFCC109193E97455DBB0B9E55 941992A110EA4BC1B01B59EA538E6AE0749C24D452C351F13B1F64EF2D199563 F88F92BB8C6C8EF4ADC5ECDA3C2BD22CCF84431E43BC5A630332184CE06454E5 0F3A369D5B7B134E0CF54E4804F28162048BA9B8A03FD837E2C37D146EB0F14E 7DD93363EA5C819AC95F2C1501909E9F4B3A09CCF2C609F0A6EE86D340A19408 6F985E999EAE40D936E3B0BF5D646941E5CE26E1AFAE1EF59329EA2E24EDBE17 8B9F15CEC308AB6169A683CB3D56DE572DA21974D80181D7BCC09E8E08FFE441 0F93897DC162D782209CC451E553232680F997451B1CB2D8AA0CBF5DBB7EF923 1C7AA87DDE43C47B188B502C42FD3F47D73811469BC954267ADDAA9CD18D49D3 2FB55FC5555338B4522F0A7309E487DBAE445E3FB3489EF7E396835B3FED2044 5CCCAC17D69B0A1434958B658891E8AB16A992B77357BD4BD58A9251F50AB71C B930D4652578C79C77D9083C420C895C83660D7FE13611BC7ABE5014C7CB5E37 62E71B7D3E215A8A7E51F9E4F3AAAB983FF93E49CBC1EFBBB2FD7150FA3E4745 5F8FC1DFD4A245586A56DE187584046746119E1F5770D83B0785427BDA36111A 881107BD4CDA253D2972687F010989B6FA7EED5836B377EA92906BFF453EA308 B4BF3287D966E98262724C896177F042966FA9666CD0C628C648AD6D8CBD23B6 6124005200490FB59E771E158055E93489A2D4D2447AF36988086AD21E8737E7 37B21FF521B78B92B5DAB8685B1249B8E82915B06DE48E1979EAEB8E02952345 53EA9181FD43C6F136FEE9286525F50ACC9236F602B542A36B51D511CE03EA9D 7F4E668FE9B7BB18A828DDD511C9AD2AF80B1D2F3D895D262C5FB883B36A4407 671EDDD228337CCE4DEEB68FFF6D46D9C87F577F60445962A97BD61549A5F2B4 F70E95DCCE8DA63DFB836F5A7901110B51B950872C8AFEC0495F51691B13DB31 B84E89B8C7E6D0132A26A348C2804887685803DB72B8C3223AB655830BCBAC24 2A3E989E13C38FD950B03977C2DE7BC27392A24DB30AD71D26E0969AE9D637C4 4247FF262AA189818067A8D3FE7F042E4DC47CF6D21504A9F06E440F79851826 ACDC43F89F482C220786BD85AF276D394B8D523C7675F57BE80E28F29A81EA0C 9875EE70C69D47EAF98963FC3DD370FC270A606BBD9FC16DC1B93B1179D810AC F634883A2661B3B2DD26E0C24A6D8B3AD223FDC7251296A614D88F8860EE5031 7E5CFCC7233D3397830A27DE6E5306EB074FA6698087E86A8E1F144F43FD3937 0006B492CB5455EBEF58A9AA34FE66F5FF36B04A7CFAFE68F490854E2ED08EC3 1E5DA648A76CF178AFC6C05813E88E1C84D9AF826DC9583A04EFEEBFCC351B65 1C79FF12BD7D2879D8F4521E448757B3B2B9E7265FCD9D57D24A633E04676DAB AC9B44A4406714856791692D23208139BC39147D57E4B1A9CC0CAFDBE4F2F6F8 87315413CC58B8ADA31B15A17226AE0AC8F047F7C7D9550D820B23994438FACB CC4C65A302F033D1ABF788848EE63E6DF1590B586DF40050A800AB7E535963A9 18CD7F6DA52414A4EBBEBC24B83F824C0B85C3BD21401722E16307553617B597 0DBDEFE85B9086F522FDA0C43FB27C14CB9621C75D8254B05E24C87D754B347C C9BEA9F2BCA71B37E3F6A67B0879BD67E8509B5786DBB025AE6159A7CE5143C8 0903EB0D6E6E40C36474093076EA17C554021D4C95A9B1AB6FDC30F5BAB2DC99 CF5699757E036207867F75F7FF2266A806E6581724493EF360694831C58925BB E271C8202068A9B9EECEFF854DB4D744102A902B913A1770A2A628B9B85048AF 697CB3CBEEF4F8064DC93E093A6D9637179265FD5ACDD5E3A9C406E8BE70F30D EDAF394FCB91BDA810D1C5E4B472F60E900DFEB45AAF82983A714E860548B737 BBE318EEBEE76B2063CEF47D7FA895A0237BA314DBF4E3A589B0DA21BD79F475 52E5F674985E38B21D07175B9CADCD3B5FF64E5A4ABC1D21D9E50B6C33A1828A 05E23D11398E7B56C1F8C5636575AB08CAD336F2DC2F9418BB0FBCC0166C5D85 FC062E82DC0E55C41C6C682ED75A78195C6FB552B19637B53467429726264132 943CA57A8C30D1E31A67387B679827443A52C4557DB9DD719D9FEC539CA09D07 47495060C8BFF195E7770D0B2F4DA353D7E755C853A7B9E9DDE5AED20A7DBECE 8569A8D9E5AF4D15388D65A10D055DE7EBC2E295073A86D082C2FFB2CCA7206A 7577BFD6E506D29F19452C3B2AF45D5531C0E1419B434F30ED32657A9DEE4C73 604C3E5F239137F49958F5CA638964DB763BBDE618818BD4EB23E57F1B250D11 B185093107056D2D4B6D53AD2BA245E121E3E206770CC01D0E07DDB5D00CF858 48F23AD1CCC23C42DD9F25AEDF3029ECFD31821A734F83B7C9F94AF3E6EBDEB5 686B484475F0AA7350856F9BFAFA0EEB9BFFA02E5CD0D8FDD562909539F89BA4 505A45D79CD2E7587EFC5E579EDFAD3661ABA956C7AABC46DED840EE00370EEF 87C3C48F109BF3FE0CCDD17E2B9974F817A08A8BEC4CDDEBC43F32F685F33D20 F3106584C83714D82D494C4721400FB88D7E5FACB331DFAA524553B401184571 E7F2C4F954D586D03F4685CA6ADC774B8E24FFCEF33094842A5F226E7D681B27 330F84BE13747EACEC6CA5D94F7A2C2E9C47EDD05B163A1A25FF78361F3FEB44 20D6BD2DE10AD0F093365AF1C00CC88D15443A21EEAC4EAF1F50D5ACA6ADCD81 D39D91A142999F33FCE4DC572BE9FBEA9F0BFA142976F2BCA7A6897135AC6E7E D0435DABB724E2193489F87A87D54384B3CBA6395E7DE36AF07DB326C77AC61B C9CD52C77A5A82A27C19D32D18B6FC17C1E6D38044A9DB4BCEFD8E05C1B5042B 4697173EA5ADCE6780871152B742AA7CEE0220663CC5C3AC3292C660FFF93286 1E50DB297296156955D18DA85931CCC9AB9E0BE2157ADC1343066050C7B735FE 130364B736F6521BC4560D44437C0D45427C207AB54F70E2FB9A0C2EA2436191 0F87B91BD3596F690335206069FA66A6BB08DE89C799966DA5C9857AC2F1339E E6EFF63FCAF48D50CC130AA95B9B1EDE2DE8E19A98E9A8C93E2EBF60889081E2 5C5D4C9AB8F800A784F1174595874A39239E74F3F5F8816E024F631CAF136E99 39FF5D4F7FB5A4CDE1B57DA67AEABD4A41FFFA0AA4B210351EC5EEC22B857397 9CC04CDAEA7D7FF4BB3C3D771AF80E630D7AB58097BDD1A037E40194452DDCD7 376AE54B39206F76767460B9AD86530743BC63884C46F4577ADC62F19D38232F 1D80EC752DA6B4C8455A26574DF01D2D9686B7E75F19BE1A5A8758AB7B827ACF 0F8D395E6C18A6D591E01863DDB7BB7179FAB3F2C82D24F46151CFB8AE22F53F 4177189C80B26FA893E006321BBC6D9AC9817A1FBE4918F8A1B8658C35AC32D5 335531F4F907143CF7F190991DB7E243F4CE9199E6E46F26F16E00325C395670 330829D5AEDEA76337D4A9AD1C3A30AA28E56B40019C0836B4FC6BC22097FE3E 86175F36C3A5A879B9C700C50FFFFB6B7BE1361211E1D3F3BEB39A2267875463 CDD79C44BEE54CC30F78BD48BC1D2B3C96C6D2D1D2A8484703C4727657E6C544 C27C4ECFCB7090EC465D3E0C34BED015A0B017EA94FE7903C021580B83AA25A8 307E13BE4FE137FD505749F447C2FF77F3039DDDFC476D9553BE3D3884E81C4C 03123E78FFAE5151D3CBB0473CDB4F083AA5FB0B1BA99A3AD5F49AA87B73282B 5084873CA47BAA9D1E0385C9D4EA3498AACECDF6A6A0EC09EE0520C9FDE792C3 07FABCBCEC2B7474A6241099D6362C9436F32FBAF1D6CC11D933D4A64E0CB9E2 0943E082F4335F23E7E2C719ABFB70D7C9F48C6B88E980CA8A980958A308E898 BCC7C4E085167F33BC36349C0CC23B004C805DF196581DB0C551C2B53C82E948 EFFC164541AD80E6014A723760ED548F3FB0C47F4459D855211824B04D28D3DC 18E204F3A43C5F8D489920CAEBE3FB9800061827656FEC3C43BAA4219978FBFF 85507FF60CD5020365D73914861254547B36171070053498052CA13E1CCE5C70 B9ED44737D747DC28DA6FBB7791082C572BF8362C3D3E34FFB285AAFFBC1311B ADF12AF9444E47D85B0169E851C2C35D8D089A5ACF6A2E9C94085ACDE361FAD2 B54B901EF8ADD09B1835B37CC6A5509872AE193541685EEA1EEA3770A1FD6318 DD7328E8CC51F099858659BFAA708541AB9E21CF1632458164B5E8659F6C23C6 88C0FFE47B820388404D0E9FE6CB06195BF2B2444582D4B7B38F45E18B604639 A0750219065C18492E2CDEF4BF96E2222A5D11DA68C6765565F9DBDED8F95F3E 7F2EB79DCE1C679D0743C5BDB832AD24C9B747AC4FA27D1279419E732DEEB543 BEE45F538A500AE50151C16C81346B88AC63D707E50958536C3CAE834A27E77B AD95CEBDCE16FAB65DF308A0D34EF798078BF8FB0D03DFC782449C0BEDBC4AD2 5FDDF493FBDA5CA3641F4392487887D324A047904B1E033027143232A40D5014 DE1EB3E58C535A317733EA1D93C33A252CF750A9EEAEDF6313B9CE44373A288C EA8DF423F248E3DAE7DC96A211659305C9B97946AFDB3ACFA2B79F05CCD03E05 2E372943C4F676BB72472D3EA1B0F566757FC5CFFF8F81F128995EEF12CBA8C3 5C0450BFF4B9C68E93C1638A70509FB6BD34ABFD2C0B7C0A238E98FD8FBEACC1 2539AA00D2B64D7C19AA45C3F1B17B9050546D751B2B346E19DE3359F02F5F1A 893148BA91ED8BD68A0BD5657F0001DB75E71F2A0160A7DDC39C773EBFB10458 A1BA0DA0CF4976AA41063B2FBE875FF0DA96FBAFD6AF0DF9652AA0EEBC1AA768 087B8CDD4883A044694186BBA78043EF79007FFCBCCA9606B0C132BBCF835ED5 2A7F459264147B460E5C9A487911146939166679E6A193A4AC979653DD2B8522 F6EB14CDED27F108C47D32E25D40FCCDA830D38B4AAEC9C6CDB212A1D8012AD8 17BDFEEDEA83194DB3369B8E0FF2BC5BF2FB83EDD20248820FEFB41278A7DC96 D47B40E6EE3F85FF38642B9C52CFA1F85FEF0DE3637BEBB66C1BDB2A8ACACB97 9CDABA4F994E1656812B0321D999339A2384E07D19388ACB8FB4A86FC98A2E73 3809461D8681C619766696A02A9099445CF756A6BD1ED778A4909D36839F7E91 153C0BC25297495E3EC490B189AA7C7B64480362764F6B89753B0EFEF35C86F4 65122B04CB43675EBE03A3026F4212D521AD81FC3E2D3575B1C6BBDF35E54199 0FAA02480892DAE8DEB52A4E1C8E5995A67D2B3652CAFC5FB0BB108A40019896 664ED1974AD21CABA4279BCC7D2E3DBFE7A70087CCBEA75FC65218C5ADF0D174 436BB02AAD79BF172589C03D0C1D4DECCD14F98AE90A86B4A7BEEC0F1CDF724E 0912CCC14AEDB5EC8E297CE357ECFAA0CE69B16F93EF2B214AA9BE98DED441D8 8DF022DD63C0AB8143A082073AE8FDD50DC7DD5BFF35F9BECE79C5188BF11056 D8D61F9D5FB03CAEFB421682269D8F6DC6637F277E0C97D7639553644B59FA30 DB3DF2B7B6633BA02AF683654FC048412F29BBA8872987BBF26FE15E4AAFD133 E2A61425C364F7A22C201039D5D765C1B14A06C1FB3C2BDC517FD2D0CD1280DE 6973B6365CB32BA2D5B60E1CA37398A37B7951E74D201140CC5DAE4FC0D66418 751EDA5A7D77D6CC9B4ED206B36A8CD4061E848500B284F1EFC5BC73CA717354 5F1C96C3B176937070F8DEDAC70ACA1504A0557C7BCE23A8FCD4E179AE4C3375 2A3099C9FAB588A0A47FA213030117F9455907169F00302E592A6B2D97CDF3F0 E0441B0DB0FF1324F99FCF21119336CB7570B488B31A0F8FD3DB110733DDDAC0 C9C994BD2AA5D5F4B3ED418205D8803C3EB6C591F7A5C34E00388A9E88DD8727 C76F347D5B35F5D59EAAA48B62D575ED3CE9F3F61170A376AAEB825ECA1A20A7 82C69F6BB354CA870717815F083067B7662A8950B85F64F693D58E17F1E35A39 44E491D46C73775BA837DE6498334594C554C7FDFECC828E3728057E3AD3FFC0 A1E63E94532B09CB28F5E50919A00A5AC50B0C6856A3697847314D8B9B8CCB52 76E4A1FD2A075CB2E9B9929D1EC55F5EF9518437738BEC7B300C19038AD2DD8C 6AC399A0D71867B943B1B197E884B9DA58D5C175E1AE398EBC0B5AEBCF2AB1FD A960D13F12E423B2DC17C8DA6DDD431219A0427EC28E1E4D708B4DB0C90B8A87 738A2E4C6B8C49BE14091797A5CCE7A081485EBB8B2C629842DCBE25F5EAD1A0 D546F57455B532A9DE145CDE4841B08B2DA52906FF16F53180FE42B2C53066DC 0926AE1BAEF441FEEFA91F722FE6CF5E0B2A0875F71DD42095DFEB5851C82792 C5574EA07DDBD8D702B6AC0C82311A0490D5B57463389672933EC83FE646DAE6 AE8BEBD6B5CBA53FA936F88A4E4F556CBC56B47B8393457C9D5E9FD8BBF800E9 87CBC0C77CDDD9EE7768EA4A23E2B92ADB37BE882CD842D55EF629F6AB8E9C80 13BB6E37014B2DA56FC65071B345789BA7D3C193D3579C6FD98DF997D8F1903E D53670E6030D2ABA91DB82DA54B97D0D8D3C56E08A3C21DFC15FCC12DAF6CECF 6D085C337F6CDCD044EB3E7F1D4C29344DE105C7CBA03E211E3244C2365A4ABA 88D9E17389FE2161A6D9A2BFB14554B0071614A301741D6F604EC3788236D782 152E3F41F8ACF4B04156EBA71CA125126C31FEDF066A474CCB8A76083B67EFA5 9C34E8BC213AA01B1862D866CA2C7F9CA3444464EAF496186CBAF607A0E7A60E 4D8959DE9DD6B42E3995F0D92A7AEF7C6E5C3BD7DB1DBCB1E6EA19B10709F709 40DC949106E454D9225606EEC9231D1694F71E350B8A8895016AAE4B44367EDA F9E9FE18A201A08368AC00409F5FAFCE72DF38D27462875F0586E8631ECC090F CE3DDB814193A5C154DDBCC1CCAAC3658BC4BE562DD1A5C3098BB32EA36D01E0 345A00F76E722736BE3762177A1EBC5390457316FC105A26440011C3A3505DAD DF4586C826B71A7E08291F1864BB50A422DCB42C15CC6EA2B93C5C8312EF4EAC 025AE0A87C6E8C824D6E0564037A3F2DF3507923D31501B9B8FDEE3A06761DA8 25D1F3E7E4BFB11DC9C1981C0B1E878DEECDA57A367FCDE89B88707A07F1017C CA88CB190F02CFD3541F27DE81A644E5B4318543740DF9D69CFA10EBAE0C487E 577ABD2155ADBAE841DA9C2FD0CB6D3FB4C8A109B7862A04B9976FE920B94318 21B7D6DF66D1812E0D07257A5E354946D59E9F162FA611B1CDC737E2B60D52B3 C82ADEAAC401B6C2D6DB473992B9E45B08A20744D53FC385E3F6D30C997F3FBB 7847C5B1ABB7AE53FD6616D7F23393E0AD34490AAFF9027168B5492145F5071F DE0E6DD8E31277B3D3588B36372E4EA4F0107CC391DD3D0D5FE8970AD5FC5789 17DCE9CA706164456BB7A18A68638403621251B60213B46971CE3434C70487E0 6CA529999AEF89CCEA57A711290764C6E168E75EB756E0337081EDD6CC70FFB2 9632D22FB3A400774642B85F576F1B73CA52E7F5A23591229C0B0AE6408059E1 0427DA5122C7BAAFABE4ACAEDF7F5BDC3FE21909E7B474A52EEF3D98BF267FF2 B3803AEE0D1392F5418E84759FCE4310048C9124824A5976B09B56F8BED6EC68 D640A56126260FB5BD6D5AC13BFD5D0B0AEF252CD5FC1FA48A926F55885C6382 99B48123231F416C19CC5FF196D13371DD5D33CDB23ECE5256EE5760471EDCE4 26AF7FA95D468F2609FD64C6DE142E4961EC3156ACE3DC207C04CB4019CDB4AC CE6013FD84D5B6887390A6C46F0F1A43FC0B1BA6AA6B5B44F23C9C360A20A1EF E94366DA2A92098D60AEBDACB8D7B4736E4E17C4818DBD5398D8384CBE7CC1D4 A28B28BA328202F087E841206B35D89E26C2FDEA77DA957A5759CDEA30AAEE94 F6F5FFC1B3820C5E907CD6587295DDE110226E4DB1E46BA8DAA93EA2D135B635 23F6B1A98F3F165C0EA13B809CCE4D64B942137BD1D3F98EC2AD678F26CAB779 D9F8291DD64A677011B4B9604B8E4AC1F22B96A98760DB2FF1F47EEFB880814F 1200A077279EDF1BE39867C45DEC3596E4ACBDB1E200C27126AEC4366CB1A354 F4660DF153B940679229990358B4942D6DFC7625273857445C967C24FC51C804 3EDA0EDE8841235AF5F78B50368F80B3497E39F3EB0094F139D42BAA0831D6A4 200538253A922BD5CD0FA548C2241F1442C1E35636014F7CE5C1D2294AEB4502 F5248606EDEF0F33F998D05D95196AAF94039803898A673AFBB9873A1CC11045 A01D174F8CCB0482F6EEF5D5879C16A4D7B573D84FD0CD5960672E6515CA1BC1 BA40AF1D76501C06548399DA7D2662A61D03BC3BD75D012B30621D0C6A052213 B3390976661462DA6E60DB0CEB9CA555AD3785E99AB8AEED42E70305BF90ABFC C56C390EFA417FBE2FB82E9AEA03B36811B408CD5F90D706EF81DE9A75ED5B15 6D726DCB2AFCE0E855DE25D23DF8E5D4EAA5364EBFF47C12481747F97B4826EA 2D639E00F037551E7A5EA6421BE789D54E1D5D30370196A35E65DF159E2C7FB3 8057ACF28035C9EFFD9907D566937228062B07CAE8E2B199512529B71EA8AC90 600AA84AEE684DD0EEB00CCE2355D089F6DFA6C0F18D138A7907615496D8A998 5974A956A524FD8EE5E6A82798C7FA1B71FB68271A0C0FB71CA17036064CA597 19F882FEE87C727ADF36872A0C05BA8D9FE0424CFFB637B1E85AA99B9572BEC8 031F44D8E24FCAD7833E27372F06233E805B8FA976FF30CBE858F5FE88FC54EA CD09B4F56E6A0A48049D84C1A124028072A0C6A1AD032F0D8194F5191F53DB6B 07B65F9EF3A59248C055EC60A2CF7CBEE5CFAD31E6C0B26937E7AD0991A1F0E1 EAE9EF6F0D70E6C8649C460161EF09754C7246658454E44337119681342D7CCC 6438CBDA49130D072E2F49F1ED66B3A3BE6FDC93E573DF56748FD2F12E031DCF 2B0AD2F85D92AA9F31CA398D81572A05198E18DFDA86B817CB5F244AAB2A0039 6FE7ABFD61675119D606D8432B84010B80ACFBD917782C45787C3F6E20616FA0 301164B4386BC5A0D43732238A26553222C130A5981415B8DFF4467AF95C9605 CF63D0DFAF6D7E2D05DB0FD260E5C28838B3D8AD910DFE029F3B1BF9D43C38F4 5A6E3FE7DF3C1467C1D5C902EF9123C05F46EAAA8F17C380DF04B3F164C2180D EA4EDE36FCF64AE318D8D13D0B307F668E3160A052639174F266116D4C6005C1 4588F003B07A68BEEA3B5719F331A58BC4DFAF393B487599A0307A37235D83AE DFC96552E2238FD4D4F1AC215A8ABD6F928C96EA7E1437230F12E7D6B0EC4B62 40494113CFC38EF265418F4495020007B8F997875368D2F7EF8446CB30D370EE DE8F36D195727C4A381F48F29B42AB70CC5211272822827868E958351B6E98F5 26576770A833A726586A6FA59A42D2780FFE5AC3DE9358953261B31DE9FE468F CC8DB501C0F41B8A218076D77579B4C437C564534EE5646151ECC37C58E1B32A 6BD702518C4A0BAD79B5CF825CAE60104D0838A4F15FB9E005507BAABABDDC2D F0E67F620F9920A83890DDF699308ED3BE657C51214DBDA6412EAB1906DAD9AD 0422DC9DE4648D9E106990EC08FCB54A09A931A7A91121C7E5AC976D56907E84 30B361DC13E62AA8CE37D255BA04EF9A2FC2D47484516B15C48BAF399DC489BA 68D0B7E973734FF9B17EF07AF4D5C93143EBE3E439717816F998A2AF4F7C684D 3CC1F9181C458A1D947F8A34C266882E62358F106EE81E02007C08C1A4F278A9 8AD244A30F74B17408244FB69ECD2238705F5C2927C51C8698AC10B593C4A651 04D5B601AB872D51288B5397165992E4CCB67B43F19E572472B6F804B309BA9A 1891C775EBC866CAE897FCBAA0DDB72469C51775E6C68EAEB4A0E0046F22013B 2E01213E604F9DE2DCE26273351A572C6408C264387CCEF8BE1CDE9DFA4E7F37 55B7BD1ACAFE9422AFC886D6A27C8F9BECFDD6612C29DDD4F45DE8C9C0582C8A 0406CA4253ABFD29307E143CD843C666B567AEFFB5D9B0FAD58AC3F7D1545075 8BFB2881035407A347E2CA572B4DF2266610A05B6FA34B59A54E0AD74A143F66 64B35A58DFE2A5351683243FBEE5CC314995BCD1F918F581304CBD363EF21C91 193428EB1CF98430D8BEB8D11E55E7A577B23BFA8609DA01593A6E53DB8756E6 8C3645521BA08AF58442946E70A655DF2D7A9C1CC40060F7D413D73B751D48E0 6D583969C3EA48526FC009311209D1600D9BEFCDC2F1A3F783D2A01B92F9F3DA 1BA6847BCE41847E6A991F54FEDE9D76DDF63E7D8312FDC6B308A6F5A1375EA2 2280F3C1480E3CB9C38CFC536FFFA3A357AAE845B00EF45230EA00CEC2FF06B3 670A87AC8CF3624898E4E240130AC15B8C573DCFB0B92E07D33B36CB5FFE70E1 9E14DE5562F968CDEBEA75721B8B087C698F009454DFCA91DD29C261D60871DC FF6142EB798849E9166F3D61E021CC30D4B5DF371400A697BDCB9A78ED973DB7 8D8EB2DD13995F13C8653BC197F7D37F80F81C441DBF046E9CFA444CC1E189F5 494BD128B24BFFC8F517A12CDC18846958B8C69D41FFCFBD2F5A09AD965EE8B1 9E542E5AC2F5ADAB6A2C6EF31485D656CFD0B50720C5F3DFA642BCC1667BC298 A76FAF7DB441D6877A8B53A450ABDD299B9315EBAD0DD48A933867DC86811DDE 0B5EED686655AB00EF4A6DF7B0EE644D578C6DEF011D47AFB8E8C9B8715BEA1A 20EFAC19F11808A6CF93074686496830676CDE3EF843A2D3EF68CB004C3CB472 99E4DA5F2733B314FF90701AEA65130D1A18FADC67424526368158AE2D82079A 7E8078D9CE0C77AB16E582C16D0E5ACD1E12CF70A4A20689E33F9045781111AC EDE1E3C25313D7DF52DBCC09303A0B2704C05CBB8F8C7226822F391C802BF293 106D58D1C37D35CF48F3518B25EDD50CFF51055D22778A7FC5FD0C62E9EF6B4A C43B814B5E0A12A49AAF20BE95F6FE037277FC4860A60714BC367D28C9B237FC 87E58A07AB03E869B9FA79989733DC3E929BF36ED0B71DD9A9D2614299426E5F 4EE3F63BF07C3186FE7FCF2E8041C0F685D01D7BC5CF84661899EA0AE20CB1A9 3E37F28A6366D87B43FA2B9D256528A3E3442FC1F4AC3EDF8F074F8DDA4DA417 4F7D9F14ECE3D16771406CBE27E7379B4DA0C2BEFB217BF112735F94E3A543FF F21CF6BE56DA34313D637F19FFDE7E1C9E84A4F24541307575D6C1B13A9BA39A 619A67E81A1B09B02D1BEA936EA12FC8F11247235211060F9F076DD604D307AB 3DA4D7A02A2E8443EB55EE6205DA626E163C51945990C2CE68D8DB41F361A2A4 1125C5C3CB75E039253C68EABD01F42012DEC2098B98EA479B510BE89967B61A 4AB9A5488A0FE103DA30872FF137B1D18DE85E083BF6D923D69A25FB315D432D FA0F0A283231B5FD23FCF4EFE5EAF45EAEE63FD98132D68779943FA2D1A45576 1118A3210CA455BE0CE81CD9BFF04B3D9B2DDFDC5A239757FBAB6A4FEE94ADEB F0466FE94E22680A09CC0A81D4CFCD3B9BBC91E4ED0A4AB0BAE58EAB103A6074 D0DA9D52DCE4931DDDD9451C1CB5B1669E518795C430C0AEFA33CB169692BBAA 4024E40CB5911215B4717530D9B2B937E8F86AB146A6C58B89F53403704ABA91 C860CE9916AB4CD468D10EE5ACDCCC8E75C8AFF0AEEEFDCA43682480BAD0DD2D B7D3DFAA55C59CDF224977840A8A7881FC89332DA667CA62C3804116E4E541C1 1F7889D1CF79277EA29712531AB02D539B1FE27206F688765EB81716C41A3799 FF72F5DAA298AB30152954822C77F3B66FC54A51D6BC7AB6AEFF7CD93FA94ED5 66F0124F219ECEA72E6AEB15D5DD7EAA366128A54E43350B006CF47642900E0B B4577DD12358BDF9C8E4C2C93444B9A29D442FEC36E40BF684D64594951EF807 D587786C2E636CBCC165B63D8DDE01A0EEA0FBE2DCA45C4EAA1A1CB164B05A3D 4B594249D0A0BF0CB2AEA95A71A483A179E77A11A49B73CA88C81F763950C6CB C4702FF7F4A58665C23D73F00F55C48527464B453150CA6E5B99D1BA08D3DDFB B5B304DE4E6CABFF791CF2FB9912908029A383E8EE39F7EA2CCEFE949B536D90 BC0D4D791582743075C21E37625DCD219364A71FB21476A2E559A9711F662F48 AEEEE7E73B1DDF6BBA199A66C60CC2166FF9B4C4309D096C0B13C011D3ED30B9 374210DC96CB26FB201EA9CDDF94DD9FAFF39732B4B6A71E86611FBDC8742D4A C7E661E18DDE503C94DE0E6DADBB1AD6C7771D1AF783D504F2513FFB87C4B3B3 90AFE5B8A8969CEDD65B59085A2C2D11E826D1AE484253E4B31EEE0C6583DFE4 D482EAF253505DF691DE72EC54913AB5EAD1F051204DAFC9C6720157B67D883E 0D04B4D7412F0F854EC44CC4D83F8EA2A7DBE940F580DF77FC0B7F1687EA5FF6 DC8AC26C07052E011A10738CC7FA1104FCC60AF85B66D2294484B391267CCACD 9F50661526250FAF134A8C487B1BE57F01D08E06AB5E1689CA9ECC8B6062B568 0E43EDCB4C74EAADDFC3BB1D309C2BF166BA3E2E3F276E99A288D291630EA951 E63D256587E54FC0E731E43AEEBF68ED71BD85D95C957FE1C2D78EB5CE3A2FC3 B31F528FEE1B2B9EABF43AB591749CDEDDE9D83C2238E5541061E88C5B3E56D6 3B5E1EDABC2C238682705B8BD673B383284AA5E8B4AFE1B05913D1BBE8ECE2AF E5B96CB431D77065D35AF5EA0FF1B84B47655A45286E4D6EEA94D0C7C1BA6BD7 9DD1943B5CA1D503CB10FC3F51FFC53E556893D280B1384F81599249F32BE524 9439734EA7DAD4A6C7C0CE41FBA832EC6D4B3E54EDF0AF02AC694949F425BE49 DAB43F2930D321A349023FBD4CFA05D9C8E1399E48F9EE7E3C61EF5833E89159 423F3A8155FE9441C9172E51C9552ADEEF047312BADE124C8BD0A0FD2A2E0DD1 A6F3D338598A3836AD46BEC0966499F558053D5DF15585DECA93339718037518 DD8DB8E9D7303BFFDE3AE50902CD27A97388460424CB79BB1348D2C0E6DD71DC 0147D980E94B4DD28F3BFFBFC356EDE6220076D2E0F9286D7E6E0ADFB03FD673 9095CB3696F5AB10F9CD2036CE9B88F51A3DE177DD9C6A82AD0D45DD6EA8B8AB D8B7D1D5AB032EE378E5FB62E5C967F170590B0A9AD94E038C621902C674F43E FC637BAD1B9EAC2206A29F6C7FD4448442BE438F688584192FDB60BB7524DEDF 0541CA37DC5E70A1776D62D5261425E17671E98C45070852192211D947627E8D 26195090547FAAC5D8763FA76353934B64DED4B01BB73A72131F60036CD7B86B 15B593959F997F7CB38189F00FD5BF1E90E7F419D163A57CEC5AF1ED84115741 3C176C863F8D53C6AB667E141B13B4D07C822D461840C8F7F8D2C46EF4D10F12 359C7C9EE4B4D7802C857544E4CCDEE30947593A474A87C81902983062345748 370F307C3D91785239E17215291863C565D2F737E4B1C2E44E85E098EACEAB72 0E31F40655E97175DF31035E66C73DD753561EB2F91FBAD13A4E1035775A4AA8 6E2994505069A011CB338779D4C3859CCB24EB8F787435C959AB36D83F04EEA6 50308A38CD3688C04A146DD15D2FE97716304CB6FECE9B748F9A5053DE280366 A94C14C0D642D169AB4185673C97C2F1D864E72C18A44D8D7D5498D3BD1F17D9 94A56AA314BB0BE57ACFEB16AE42FAA2DCD563CD67A9890B9AC072818838DB0A F4A099C2DD 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 cleartomark %%EndFont %%BeginFont: CMTT10 %!PS-AdobeFont-1.1: CMTT10 1.00B %%CreationDate: 1992 Apr 26 10:42:42 % Copyright (C) 1997 American Mathematical Society. All Rights Reserved. 11 dict begin /FontInfo 7 dict dup begin /version (1.00B) readonly def /Notice (Copyright (C) 1997 American Mathematical Society. All Rights Reserved) readonly def /FullName (CMTT10) readonly def /FamilyName (Computer Modern) readonly def /Weight (Medium) readonly def /ItalicAngle 0 def /isFixedPitch true def end readonly def /FontName /CMTT10 def /PaintType 0 def /FontType 1 def /FontMatrix [0.001 0 0 0.001 0 0] readonly def /Encoding 256 array 0 1 255 {1 index exch /.notdef put} for dup 33 /exclam put dup 34 /quotedbl put dup 35 /numbersign put dup 36 /dollar put dup 37 /percent put dup 38 /ampersand put dup 39 /quoteright put dup 40 /parenleft put dup 41 /parenright put dup 42 /asterisk put dup 43 /plus put dup 44 /comma put dup 45 /hyphen put dup 46 /period put dup 47 /slash put dup 48 /zero put dup 49 /one put dup 50 /two put dup 51 /three put dup 52 /four put dup 53 /five put dup 54 /six put dup 55 /seven put dup 56 /eight put dup 57 /nine put dup 58 /colon put dup 59 /semicolon put dup 60 /less put dup 61 /equal put dup 62 /greater put dup 63 /question put dup 64 /at put dup 65 /A put dup 66 /B put dup 67 /C put dup 68 /D put dup 69 /E put dup 70 /F put dup 71 /G put dup 72 /H put dup 73 /I put dup 74 /J put dup 75 /K put dup 76 /L put dup 77 /M put dup 78 /N put dup 79 /O put dup 80 /P put dup 81 /Q put dup 82 /R put dup 83 /S put dup 84 /T put dup 85 /U put dup 86 /V put dup 87 /W put dup 88 /X put dup 89 /Y put dup 90 /Z put dup 91 /bracketleft put dup 92 /backslash put dup 93 /bracketright put dup 94 /asciicircum put dup 95 /underscore put dup 97 /a put dup 98 /b put dup 99 /c put dup 100 /d put dup 101 /e put dup 102 /f put dup 103 /g put dup 104 /h put dup 105 /i put dup 106 /j put dup 107 /k put dup 108 /l put dup 109 /m put dup 110 /n put dup 111 /o put dup 112 /p put dup 113 /q put dup 114 /r put dup 115 /s put dup 116 /t put dup 117 /u put dup 118 /v put dup 119 /w put dup 120 /x put dup 121 /y put dup 122 /z put dup 123 /braceleft put dup 124 /bar put dup 125 /braceright put dup 126 /asciitilde put readonly def /FontBBox{-4 -235 731 800}readonly def currentdict end currentfile eexec D9D66F633B846A97B686A97E45A3D0AA052A014267B7904EB3C0D3BD0B83D891 016CA6CA4B712ADEB258FAAB9A130EE605E61F77FC1B738ABC7C51CD46EF8171 9098D5FEE67660E69A7AB91B58F29A4D79E57022F783EB0FBBB6D4F4EC35014F D2DECBA99459A4C59DF0C6EBA150284454E707DC2100C15B76B4C19B84363758 469A6C558785B226332152109871A9883487DD7710949204DDCF837E6A8708B8 2BDBF16FBC7512FAA308A093FE5F00F963068B8232429ED8B7CF6A3D879A2D19 38DD5C4467F9DD8C5D1A2000B3A6BF2F25629BAEC199AE8BD4BA6ED9BBF7DABF D0E153BAB1C17900D4FCE209622ACD19E7C74C2807D0397357ED07AB460D5204 EB3A45B7AC4D106B7303AD8348853032A745F417943F9B4FED652B835AA49727 A8B4117AFF1D4BCE831EB510B6851796D0BE6982B76620CB3CE0C22CACDD4593 F244C14EEC0E5A7C4AC42392F81C01BC4257FE12AF33F4BFEA9108FF11CF9714 4DD6EC70A2C4C1E4F328A1EB25E43525FB1E16C07E28CC359DF61F426B7D41EA 6A0C84DD63275395A503AAE908E1C82D389FD12A21E86999799E7F24A994472E A10EAE77096709BE0D11AAD24A30D96E15A51D720AFB3B10D2E0AC8DC1A1204B E8725E00D7E3A96F9978BC19377034D93D080C4391E579C34FF9FC2379CB119F 1E5BBEA91AE20F343C6420BE1E2BD0636B04FCCC0BEE0DC2D56D66F06DB22438 452822CBEAF03EE9EAA8398F276EC0D92A7FB978C17805DB2F4A7DFBA56FD6AF 8670EB364F01DE8FCAFBAF657D68C3A03112915736CEABAA8BA5C0AC25288369 5D49BD891FABEFE8699A0AE3ED85B48ACB22229E15623399C93DE7D935734ADA DA7A1462C111D44AD53EA35B57E5D0B5FC0B481820E43222DB8EFCD5D30E15F9 BA304FA879392EE0BCC0E1A61E74B3A1FC3A3D170218D7244580C7AA0DC65D19 741FA5FE6F8CBF60250ACC27454BBF0897CA4B909C83A56672958752ED4B5E79 E18660764F155E86F09EFA9F7685F2F5027EC85A775287B30E2069DE4E4D5712 E7D033481A53A2702BA7542C71062173039030CF28D8B9C63B5596A9B42B33E7 D922944A38713383D3648A4AF160A3B0C8F3379BA4372BE2E7EA49AABA75AEEE C5DDE1D8BF68483C3D21271280ABB91D54CC819680322EAB72E1250A760BC8DA 726405EFE420635B5B7F0B48752C06083E92BDE06401C42A2C528C8A60381227 CEBEF0C9440DC034DAD9C19FB27DB399BDAEE22053591D6538587C768C1B7B0B 7D1E222D2D8AF3A6473CC4C0D6C3E0DB49068CEB8C9BD1C5CD486A50DAA10BC7 7D6286142355E3F21DD254E27C00C442728A0BAEC9D3F17AE9CE320D365152E9 EB0D5E3874F2BCEDA98521D23FCFC30B4B69DAD2ADBE80E5964ED0ABEF6C73B6 DAD30E2C5061E3747FE536E1A5D190D028F2130AF608F5DDF9DDDF1E77DC8437 ECB3EC93B33505DF47884DDBD1DC6BBE4098DF04A29AF6FA3AE344600D0AAB53 B3820DD7ECB600A3B8001C51AF2CA7A39AE1485A087FD1752DF68F55B52B4DA7 48030F2AA7E570B3D56C4EAD367B9B73FBC0A7356253233006178B9A6BC19081 B815B5988AE76FE6FAFD7AC239072B1106A3F509381AAEE79B2F2154CAC4727B D199CDC8B4D05DF4BA006982512ABD7539E28D937B0F87FF79A3F84C29ECF943 A8DCB8BDF8EA9E7A0E7CD60BC2308C96B3E889C797D0FF28FF4847016B3DA141 E76FC6BE78A6EE9CE07E651FF86E720A1A1F075972D36E5C55162E3FE26BCE3A 814BFEB12D4C5FD24340CFFED499C7CA183E57EC4F12CFFBE3291D43F7270575 C6C3306F832EF182ADD0AA14C4D8669A17C09F632406AFA195F90C4DDC39779E EC0A77E590211592D6EE19563963225C06C2F13265EBB5A6CFB7C17D9E77650D 11958305727AF662AE73AD0E3ED5F7E7086C5A0C3548A8129575980B06C715AF DD55C8DF869BED0A7883491030B1A7E82C5EB04E5A7D952E716DD8F2EF6275EE 087614CFAB55FCE2BBECD7E8D9C90FD8359E929D5E0A416A23BD58158318B4FF 87B095EB63F7F052B3A77F136FD66EB2C52BD46CD7DB3091A4B78A607112B12C 4D171B2A00B78B0E1C44B0D90C20D9244281F5123DC1F6063F91E9E3E48DE78B C862D848BAD073A4FCB5EEC9FF54B5AB8E234CCC3C7439C62ABC4A13EF1B8897 ABBF21F900C564C9A305FC36FC7224932F766E6E72C2EBB55953DFE2AFC2E3FD 33A0C6F0FDFF086E9FD796E7242596AE85B877223532667625E371D2156E4C04 0D7FFCD3337B93DF066CB6FE1E13960719EB7CB409EE805C08ACD2C06303ED9C E34C898787A43C1B428B896551C6FEB50A831C6F8CE2073EFC662EC286CB7555 A3B42E58772E82FEE206948B8C439FEC5E4ECB9E11DC3A4CBC7611E30890E408 637A01A2118441B4F9467A98BB2A1B03BB2F5D8E3DB7D1D15C188D9E856088EC B762F07B1C06024F7EF53A2FBD60C0A1F4C0275D07164545250ECEEF8CB15B04 A2D8AC44DDE818C4E3CBD2A5FA0FE49750886CD7CFAAF8B780255F89DF7F4F5C BB594FE7C1597DA71813C2952AD3E811524459EB71D29696B450C924B6A5C843 8F36A0F1D7DFE796FB9564333666D74AE614D0D698FAFF20F83C86524C894BB0 272221C060544F3B653CB0E4E4F82B20D7530B3806E6A5830852C58070177815 E287C847F19F64E854F1463C23DDD80093D6FEB8BAA22C5F05C21F99FBA7193A EB7CD49CFDF4308C6C68CC955A45FCFB54FCADA9A3BFBDE086B057DE88BE335D 280F5338D7E66AD39FD08F9B55884F1F377FB6869FBABE3EAA4B7ACCD85BE672 724B4B8F236B0889B6E7049CBA558A89F17863E82DF145DB8C7ED1F36332DE23 3C0053B74E850FA14F9EC9EFC23AF18E153CC96FB0FFD910347370E57F0D81E9 4A83E2D189EE5635E85A2BEAB5B1CB974546BFB2FC2ABA1E15DC0EC1BB3AF1DB B2F93538B92F504CBD7AAFE36F5F3AD45EB16378F169B17869FE81464CB826CB 400D2F5441A496B6C60A4F15FD20ECCAC1F8F91015E7E1C1A10B7992A1554E52 9FBEE905A3005336E49CB04BA7223F1674C0BBDFA06ACA34F7BFDA56906E04A7 4DD79EC7E79B021A5008F3B1E04712D689366F520B0FA66A558F957011992728 561BF4B75C2BE07C4024C172085E51CCC5CFA439F570297154CDDBB3AA25CD6A 3004B936488851BA1E814260C06CD5479DCAB1A6AE21A5F4563024F973D738B4 0DDB6C6DD2E3AC21B4F6D95CF9AACA782919F5D3E613D61F3224A982AF485C8D EA0037410EB70AB7D3EC174C6D5DE5C9C5A1220EF7C2B74499ADCEEFF077D1D3 50C1124535F88C3C3F66477E42F1932665AD323E06B398D2805B9CEA632F5B1E 50FA587B102A35E2F15EC22DD66E4DF06A3F4BB717A3ED7FBBE2458EB4D896DD AF00D1BC71FE1CCA27890ECBF9F0AF01D3E65CAA29427FAF06B3BE1E640522E0 73B213D04491B93DB29113EF72211E31F4C5A7FD58451946CFC15FD805112FE2 547D1131A46710DFB75659A33695FFAF3CDD40AE5260AD6766DA81DAB0A6E96B E89D57AAEF32B5EDBBE9F7CC033BB2595CA3FEDA2ABAC8E5395EBC35BC112FE9 67EAF1F123228538091483050847F8FB5194203609502D3A09CDE811EADC18B9 F039593782C27EFA7697182D6367E88E326AD5622C5A457FE2644FEADA88615D 9DE3E483BFD9329667953CDB86F9D2F0D4F02DAB8A98FDEB1D17CAAED9B6E2E6 0C55C1FEE25AB98FF59FC235876029CE03E4A713B75B3163BE3B2DC0D4472DBC 473E10400C0F57E627AE97FD0C1CB0F78FD8E2FA831A3D2B1C2BB3F2D4E812A4 194C8732B0C525361DC8480CB27C30CD4DCFF01318D2EB4F5234B4A42EA8C23E 7B3EECA41B8E4F54D5458B37EF0FB2F49EB19F4EA8AD2B53820FA36E93DD309E 48847F5C01B1118ECE7D0186E6B8953344EB775D655AAAD7BCDA642EA2E39A15 855C027CBC0E3FA752900EEB464E2D39404D1B85072B40834748C6F9C74C5B6C 3CEDE988343FD984CFE4B856A481E60E2E65D3BB41BAF2FA80AC0BFE381071C4 573C6ED65C524FF777F34D82E9661E4A75E3878CC77BC59218244612219C5A92 E95B90EC2C38614665550026F1730D11162F19D841681C04C401E102C047541B 97B9264D86F47E25A347696AE5EF0FF3ECD9BA32C92901DEDD816F7D73ED1216 0A98771892472CD625A8F7F19DEFCF5CA2AE57F8AD3898F2C1005B187DEC6F2A A31C32720EBC934178E0E9979013B3C9AEDA4051DF63D8C903A399DC88F83DCB A73F1B2083819D1BBEA5235F8FE1D098F32A2BA6274424A99A4975FE4BFD59AD 79B40A8003CC0AA728EA79D6BDCBBD73DF45B7918BC099C5BE4A068BF64A30B1 C39442CED98AAE1BD495F6CA32D564A72E3BF753B49E4178927E4BBC0F06048F 96DE7C30AF580B0BFFDB330B3B87D7F6532A24F403680BD9F15E758CDF04EB94 E83C7E644FDE5BEE7CE73EFAC75669E41BDFB20A5B8ADE1137378DD8102A0DBE 19499A623770417CBF5211395A6BA9F4490F4707A46F1F9B3FBE642DEA0CA053 9ABC307B1E71DC2B069DDDBB4EAE378BCC75AD61DA900AF8BA6DF0E27A8D2258 DC80205305AB6ABFE3726703E60869BFAFF1874F3C0E05FAD9C05D7D89ECECA9 DD2AF5F777D7514208697E712B52448B364D3ECEFD8127043DDC9D0757B7CC37 5CDE8001D007A6E961EA24D7FFC92410F3B13A32946F12A50DFFA256249BC8D7 C1842FB84AD51B41008EC4604F6B70990510EE13E6DA34F864A572D99A13FFC7 3609EF2BB1FCDEDF37A6018248C545E086EAD1BA1143E74AC60B684E755E59E7 36557B915F92EF78FC177621D49F777A2AF39F3C2AA6EC74750AAAE08BCC21CA A71CCDC91DD45E6050D83ABA49ECE425B55EEE137C55619037F1C30530BD0A6E CD2004B6A040405064D7E87C55536680364E09248BFAA3FDF95CDA0708E55F4C F7D0A92A93DEE0C7B69638F171B28B7F854CCC6EBC6AEE14864BF5144EA36D46 A9C297225AB0325E28EF6BD06D7E40E3A724EA1E50C4C6163B195CFFD5DD291D D7BBE9AF4324A69394117EFD62F08D6BA6A8F0AC3E2353492999AF28FBA758C3 A50B6840CC72054355E6CBDBD86F683537A4115049BC1616BA35C2B0B6F5CC32 3F6831DE4E6029310738DE23D36D2C6E82F04EB675FB89789F74AFE3B8854250 51812FBEFBCF162947554324FADAB765C74B6DA89F60A734076D44BBE45263B1 3FEFEEA90EC7948F23F34D4049087AF6563692417DDBCDD5A9552A373C2528F8 0318D3C0669279F292127CBA40B0ABE08A1476BC9EBFA8BD5D622BC5CE7DBA20 C689BDAF50D5B1EAA89E296787CC53845DB2BA54FDE363DCC98A7BA256663869 E9E02E09077884DF1A2A41AA698B7EDE8DAFA621B552DDA91AD1E671D636FB36 91C62B4D2D4112F2C169E0023EB7521F570CECC54ECA5EBA462049AABBE2ADEF E3234BFD71B26DFDD9D34DFA69E5E80FD90406E6505A6798F030A4B5172A7BC2 C9B765A86ED55C0590E0432719BCD7BDE7CCC7F6B33BD467063D886276C8879D E04897A4623111C14A1EDBBF69E2FEDDFEAEB2A785C6D2F0711DF4B93AAA291E 7F4E0CF9CC3FF0D31953C594DAD014097DA02CBD5AE8828C7E7B5BDA09188B05 0D7263F164E1E78CC430ACAD1E8FA71001E9BCEFAE47C79846916A5F819CA366 5734089BCDD458CA1A9E8E17BFF357A91F9A7A8A6E1DEFB121353AA80F1906A5 AF7CD2E59EE6776FC0DA6574DA0DE522918CAC4E566F13FB9B64EFE79F3A3BC0 689E3B0676741C90FF3BF85C7A0FA9716F4ED0E329512B66BFB8AEB56C3DD6B2 24F8D6E23751A8485F7EB46719E9D22618FEE86D5E01ECCF4C6E74368A8E9B49 245D80E7484DFBC916FB2447852B36EF3F99A82B6C106F786707D7689DCD7AEC A0C51AC1A3F67034C16B74994403FAE7743BF02149BEBEF554814BEF31B79184 3FAB4D2C887E1BEE81B465D12DCDDAD03DE5ABE9E763C440B2CFD42FD16D96EB C21FE788C8C2688F79F148AA7090BE64B0EA710D376222FD1590301BA9A2E715 D33B8C1D95F2589AB0EE476F7046537E27DBBCDADEA1E7357C9D7FA92C2F93A6 7BDDF58A44966590821023380C97CDE37EF6D449E35EF32BCA6E69DC8458511E 8DC8AB63171A6018AC9A334829E5978484C4C6E917A5F1C254E6669F4037C691 36980250A80673E0F18C9E0FBA1E5CCA3BE30B8E7B7188062B25F8E1E16528A2 F217C18D6A1955482E5463FBF097ABAF7314E449C6FEE56E2695407A8AA9648C 61AC2BF3B2D9CB6317A9B16CE931D318C8BC9676CD908505568C197D90C2BB46 06431C999EB68C8216409E4CABACB2BB34A05B697B9DD1E91471A404B4969519 E25209EF4EDD420944BED17B18DB3566FCB8059699FE416789191EC2B35086AA 2E10C139E3C9FA0A535DEE9255A867A26656213E85851DE5F51F9780D3A6E572 F1F5CE64DA176CA810799DC1C60A8FD2A5ED42E613021A19928EC4572059B2C1 EE441E79CDF7DD4AF7B6E3D3230419ACAED329388044B107DCB4DE91B71EB838 904B1F969738BBDA064FFE75C6623639BE9924602DDF0C166B433B9D54ACDA5E 018680477FB8F10621FF32319E58DB672D744959A33E7314A1B3CDE0C038F7D6 0C8A195AF191E36B0325334A711CD8E25D9C1D257E46A734779E486567481108 E0281DE96907D460546578DE83A0A01A9ABF64402B48DEF739F4308E14145753 719CEF720FE5CF8DAD7845E74D502B69DC18D172C3A27411259B8042F3FF82C3 B157BE242C351830255CF0EDA96577375A70657BD9A2E9FFC54AF0AE563D73F2 E510279FEF48D79F5F7745DBB492F1D74DA738E6A4FE4364799B5BEC93B4CAF6 B06B9B8C8D164F8FA1FBBA693204064F2C1806C39910910E02ECA8D092558CB8 33338B359D56483B7B99A1D8137204EC1AE70ED3D75881FC3B00BB9349AD934C 81A9F285312FDDC77FA923B18B1873D288C2AAF2E6D0AF90BF25A982B843789D 5662D6A2DD58E065026885601ABED4B09CAAA3116DEE6B430B15BE0A121FC1BB FDEA5A501F0798CFFFFEAB5101E707F1A00C8E014A3561FD39972EA9AB108EBB 960AEA7FF60C301AD6CBFCAA7D35CBF6F8462A4D76C4FBA6F3DF6BB762DF7900 9F69529AB4EAF96C2866444B257160E8822533A7A1240C83EC18C364F577407B 4CB314678D2511735308A1660AD94B8B818CEA4A3DC00C5A1C978F8BB4E0491C 49328F6CDF95BF620AE53056364423841D84418B23C2A447B0CCF8D8633FE2E8 4A4AC1C6C74627EECDC994059F1BAE9E6B10FA80D767B3FE97BFFAD413DCB0A8 495039744B48266278194D60422D6E7C74D0DB45ACF217797D0C0678EEB60759 6231438CFEFB346553A7A447B50807EBB6E885B5A49CA9A350EC4A8C76EDFBB3 A4DA1C9E3EFA193CDF08553302998F20055C84420A4C5252F764CC4B7A4BEF6A A09170EC417B296DD9E2301CD8EABE4A087E648E0525A9FFAF26374C47FDC123 82F18C9884843864F418ACB08041E7896FDD395225532460A8194A8DB4DBD824 1C68C6665F85059E365EC0972EC6465E2D8867449907DA6692A021F026F437BD D02654BC11381BB6557663E0B0B8C4F2FF69E4776F4EABA69311BC1AF8155F7D 6D3A418BDC912CC7CF1A4BBC8A1376D8B4DEEB6585416959BCA4AA08D4520C33 EB054DE53140992D0707210593BE62B3659E3E493C4562C2E99CECA143791DAC 679896BCDA0699E405957E17DDBD243E65CDD7C9C8629F29A2078658746A7779 0F75BE24E2DDBB672B95F26366BAF036B3C23BE4132D7362E76D4183A469E0F7 29174711ECAF4FD9A923E72FE58DF2854C5537E3626317D471D1E8A922C9BBA4 CE9163A4086AC4A231C2BF35FBC39A5BBCFE41843CAC7D81A054509D31572BE1 596E0B0B563DF2BF0E57DB4943DAEE35CA26C8433FEE4FC61145C77F65DADE75 62DA18DFABC7F4194906F53884E62E77D8AB3E099776AB93B2B4D0C98FA44C71 597202A2643942795EE8CE098FE26F1AF8134F1E75FAE18D563B1FF43A511C9E EAFB9EFCF61490A1A4FD2CF354927B72C5EDD5D62B2F3F5006D6130562A13BCB 1B988A994A8D68B051A5A821CCD5D0F8D9D49FE7CD04EECCFD7A554CCDFFD77E 27AC4AB5BF9FE40F90EBD066C483796CE1A364E95C5E0CF2154834760522F128 B2DBD1F4F73347D42635B2875A23597C35A0823CC6F71E49598125411BC9B2C2 72470D36DD967C947AFB031BFCF770FE50551A134DF8C5D1AB1F09819569A57E E23D4E87C0B52CD02B0A2E3FAA7D27A94359E82AF047756BB769BC5950A75207 78ABD49D174F2F69810AFFA9336A52D6B93B004DCA5CDE58475C0210E0BA1D20 FD4FFD6838EC56A0922472D4C4EE0CC481574BC30618179E733EA40A48847E14 A75BE7717CC5DDCB5B0718074EAB6FF07CFFE794D335B3A13EB968EA8FC5B08A 13B38AD1C2C964E4B07E90B9732C458216B028E07DD593A5B767A2B415EFE7DA 951FC07800F11C7E2EF9BDD152BC6815B7F32117F49FE08BD79BEB949003512A 327F3F8FAE1767E7842348BA4373649F1A21DB2C56C081BCF9FA4EA86C8DFF00 FF45C4F1386CF8C2C4120F3F6019CEBB639F2D272D08C1763A470D4BF6330DC8 43C069A6333113C3A0C93471486EFE9BFC02B760C7CBB2E9156087D09EE8A178 5EF50B34994094C3F0015EA2ADB6C920F4302FDEF128711994875551C4E883E2 DDEFFAAE11F2234AFDD96400BB69C1B4E6EFD75734C586A10A54A98E7D790F28 DEF7C7DF61FB23BF91AA700AE585EBDE74E215DA49F4ED466F46129022722086 8884D8E026F35C4BEE7E866DF8E0846D5EC3534069B713FAB02D4B4EE3B44E1B 656F30D629D40AA1337786C1FDA08EA1217AFA4A6E2498B334DAB5461A70DFBB 5AA5686C89FFA4EE82D81CE2B28334DC5C032487CCE998616F48150BA1281911 076E626E5BFCC56A0A4CDC559F878F14C2BD7A5148C1D8CC303FF9EC473354D2 D4FB0F0F2AD0CF182A28074ED6552E179222570DE0E0D44E8FF4DB36C3AD6487 C4BA53C8548714A69FCF8E3E5202F09469D7447C6519AE902C1D611A720BAFB5 59E27A6DBA73624F44B4ABE0988BA3450F82E03521CCE8EDE8BE7EE1223B575A DF9A52650E85545525E6F121FF2D1531F156EA9D5594239AEA2CD09EE28ACB15 A445E11FD1C031188DB61881F474D49425C084489A88A47D681EA68E7FC4B1F9 DBB552063A02A0EB51125E9B2CC646B940D46FF457415F9565892DEAC030F08B E4C10DC38D825C7597394C844CB863CE6C843F67F2E1C42C4EF86AC7FB727BF0 224B5E91BAD99CC6638AB2C64469A81D8B1789981872ED037B3A34BDF3130137 80FE80FDA65EFBC11A08B98A1AE595F980B577E22D3CB7FED1D4016F5290ADF5 47D7D9BAFE39F294582F2C084003E9C83FDB9EBC87C8B477CB8BB359EDD9BBC9 9368D6605E1468A20909831BF602EFCEC0D5EBA99A2223E5A269275C8B221B3A F9226654185929F794E1979ED18B4CD36152F973433AC67BE24B9D953254FBBD B644CDF3BF0E29A2C72113DC486E46DED2CE8F8DFA8B0F8478D1F18C9AA8E054 A31C3DBE84ECEDD85DF6AF9467AC2990ECAA3384FBCA1BBE598AA0D6813C859E 1520B88BF30ADA910A6AC3068A5B8CFD76B7F0F6F4AF4C32450D628B5320C384 F23A2B5E8756895584155226A30F8B0437E028978491DCD00E79C0ED58DF261E 79B9DA17E57AEE03EE92102EAB2D63E69A88EE0B1E2087ED0C0CF6475EBDC3BE 0324D1FC8F7B90D8D807533E5436F2C2583B9629EC390403437FDAC908557894 03054A6DD6A3586043A9C8BFD0C7EDE1229DBB9F69F7A5D20F55664D061F6517 0051C6B3CD7338241FB403F2AF77DAB1A8EBE1650156D40863EC1957372BFDEA BA8D0BB1193CC5BEB5A68C8274802E14FFA3ADCEBE19070325B1BDB960CF2988 C0F5A9BFD843C515ADEC8B8AB02B2891EDD7502D9F28F4E58D8F67D1ACAFD0C3 3531E0C7D1554344CCF90AC8696E83A3F968252981CAC09653956F4343B99D3D 4F17CB8BBE4506B354439B70F2024871D16668F9DECD8EDB872BE5E6ACC406F1 1DF4E3ADF60EFED57D1C426292970199BB663405236C6A907B6891C6190E87F2 78D9142220FF295C7BF44AF61470798FB8CFBEE6973C69DA1CC24ECB058AA753 DDBFD92FBB15560EA19D5D92F0005B74F06F0EA5901D231996E0866389DCA433 E62BE48479687084C1D67BC592E592939F806FA8BF5F0D3F644B1FA6F056DE0D 51D3F212C6818CB6166317058C2A0C07AE2E324CD90D4EC83CF4819B10CC348C 6DBABA024A5FCDAE6E288F82DA060BCD16437F07DCA43BF1E5A1B402F16C78FC 075BEE900B4021A1019C4A5ADC33230047FF11FDE8FB775DDA267040A22B4E5D 6012F7E72B8BC8DD3A81369A08FB81C6C4873C2147D03D4181D6D8032DD2B610 9C44CAB50C5BD8F489EBF01C72D4198B66EEA4E976462F8874143640B82AE57C A51EDEDE75A9A55D31587C14F8DEFFE69F75EA7B95BF725CE9991FB2F07AF568 5AFEB39447B728B99BE0502BF28DE1D92B15926BE4E3DA2E7BB44A24836A97C6 EE3A2080E01DC6514180DAF9C055F4C94929D34F193920020505E62804461630 9F42C652F9D5681C91BE23DCB0C634247E739135F925EF3D5424767D5F5C5879 C46F2E32C7B3BE9E90FD6ABE693A6016AB77670129B58B8FE719FA97FE320842 6488CB85B6BCC0012975D22E75A2E086131DE676AB825A386C086FBE1B65DDDD A19F06AA4C1D3EC84751C649F4A62CFDC48A7CF88CFEC68B959C211B60DCB045 6BFF922FD7349B98E1769394E6CEA4F764AC4B6536AAE4E6BE69099A39A6A33C 97671C3AB4E7A94DCB829FBA97DFE5F71B1728FC81F826699DFDB0ACE9BC60E0 6EC15D35EC479F3F53EE4D0398BAC138FED504A84A13B78568E3F9C86BAE8B88 61830A80F8B994D0D66A8FA3FCD6C5099C29FC285ABF096EF9A3BFDBB522157C DCE9F0D6AAFB1F8D7B0A3C573D0C170357175DD56EAF37BAAEF4C92FBE17E26C 7D2BDAACB9B8F33D09651FBE0D49A8BE66B78D075485BCD38DED5056FCE48A12 D28E9670EC7CF4E9A277D6ABC2F7AB30BFF290B5452582F372FC9DE6CEA9EC0B 84328269F14FE7F47620B1042B283C54161AFCF84B46E6B1410587295E4F8958 C1800F120B59639C85D46D46A4C64309931A8C91F138EB52F779189EF75B9157 D624045F4B8846856ADF0AD735FC6FA41F7B6C002E9D1EBD92468E86C843AFB7 4D78E3D54D866029DE5DF865EE3F7313AC358EDA70A792E22F2F806EF86A6B57 64AAD565C57E64B1A6635B7394B4B5729189319FCAC8529ADE30633B9BDEE0D2 AF1F8944EFDC7C408FD8FC270822CC01E7BA355C856219B3AC5D05CA37EB0EF1 6766D62383AEDDA1F7CDAD1DF0172E766BB46C5FCCDDD61BB019D283EDEF312A B2DBA38C9BB0928FB93F50E8516AB353BE04403D132805B5AAAA17163AB9C847 F1B54946B0775FD21325C82E4EC7F2186C54B4396BC4B0B913A59E4444D11B39 8AB56F2FD5788A9BA45DA5499A50BA74D28707F62086907BF8342E0C753A31A8 DE293B592F51D74DECA52858CCF76C69BAF2224F640069BEF2604983FB478173 792D68030D7A6E3FE083AFFE9488D872897ABFC88CA8BFE484A75201D73058D4 72A8A26A50BA1F2B50CBF98D46DFED0BA057619BF370E435A0400147928D7C06 28DF2A03527E3BE925D6A664E4640E63BD22D54A038D934B3DB5B500E075B8AB 06DB5279274E65FF870F1E5106E190AB0FD8849EEE2D605FD4F0DED2C3F86831 4EECBFAAD8B2A895F08DBA692A8176F9080045519CC6C46B52F0F31DF112AD79 8E46B9899C5527A011AB63FA443ACE90F09434C295A5D9E6753AF2645407488E D29E7711546F87265C130B76B4632242E43962A5C886D4DB6316A2F3420FCAEA 3055AB5A9E1325EA870CE87F34BB2B3110E4919E1AFEE67606B00B03DD6824F0 20BA42968B81DAE198C88057438E36056D46C550E3E5E03A99BD4B07E66A2179 BBC5B3FB06D5D72022C53A3F3A1B759472D5A50D7F7A1F4E31D3F7A30EDC1D45 4B00AEB5DF680145A123CCA3BBD801CA64B2CBEEA99842720F8DCE432909AE78 5AD3F29AC69D302C62256CC4D47AC92EE11D2A3E1C666CEA24876491BB167548 9E3A990252DF8254CB5E7141F57B78FD1FEB38BE135815C6FC86EF81B5994711 E43083C3234C55DAD97CCCE4FF3F55C5A6C22ADD2C549513A465CFA3D8A9AEB6 331374DC05A4F496BE33F9263172FB6FE1CCD19EE9515C5155ABECA9492DC743 BE4142D63FB5E17D55C9FE642F07995502AECD9D555603D15B5BE420A65A6E98 4F341BA13E44DBBC1DC8CF0D561198A2B40FAF35F7ED5FEB4429BF71F5C88637 CB114F1377FD3227EDF592733EC68F4EFEAB14FE7C26DA7031075E04289FA6DC 8A79F81E4E18CAE8380CC585E7DA3DCDA3FCB53929AA8D772D53FC6D821EBB14 EB472017FB56CE9410FEEFF14EA69C188993922DAFEC805F4C8028537A9D6365 AE1A6BEF37CE8E02B995C41382984802AD3D12AA9FAA36837F9F9F8F60D16B81 474238F136F442CA9B14620F83E4046E41EB0FD02BD04DA7863DF26624B5489A B8BA35B0B3A8D128FA10E01DC9B622C26CC57CA79CCDEEB7E174698EFDCC0CBE 879AE1434B3EC5AF48E6C2EC5652DEFE0ECD7415FA46BC0C80FCC57CC808B3DE CBE4CC7B62AD3B092487F7A23C38A2D9102DEBB1CF4C1EE7FEDE1E8BBCDF7F73 54CAB1E591F9B3B3159D879A9492394B32F2CC43EE7EBA6E293AF12D7FC4ADF4 DAF8F2F48A777E927A915DE1FD9125B52D406BACB0BEA149F6F6D79D92D06413 5D68461A772D531F2E76D1947D2ED5BFFCD758E062B5435BFD180F7E3734D5DD ABD86A1C2BA643955A36C482BEBAC608F588C43E6EA7EA2AE01D0346D28F50CD BA8F9FD23674AB19A2B879E0DD19029EAC5D74D16B186CF4BE3382E74E361427 536A00347E536701808C1D31A617D1F9269110B76A0D59C7B84D98C8FE308733 C9497B807A77D244FEE03ED7FB5EB4D6ABB74A7129F23AF628BC01BEC6C43ED2 D62F4E2133006FDB94D33CD31F9FFE57C8C9E31DC6D7A81A2C6ABF1D971EE222 96A4D79F7232190EB796A43ECEB88F1C64A88A10C3AE8E98711EFDF984BF270B 55C5B9082D54DA7D32B168CE573597DC5A453D76953DBDDDBC1798F8A645AEB3 78B6B5BAF60C9AFA9D5F818740EDAA977EBEA0F68E531550E607E6FCB04F3E22 BC9D6440E1E153C8D780213DAB08CF8CFEB03018942AF980642745D711C7DB1D BEFD825627798897ED8185D80234B6C087FBB602ADB1263C2A2A0F59AFCA7B09 EA4ED3BCF936C2DAEA9C8DDAA90130C24AD1A1BA47711CC760FF72EB3F27C165 CA1FDCF1250C6CA4A788AAEEE08902AB4EB03C6EDF281CA2F5B074C859DE3963 27F7CFC53CC91C80F779ABB25F7A6601453DF5606B72EC562F615A92C1DCED58 3911BE7784B6E8B17F8993E4D5693A327F9C289701F39ADCF583BB4EFDE1F835 1A59BBC2E6B73CF422D877B0B423E4E8FD116F5C66A4BEB706A3D42E7EFBB5E5 E73CD03D7A91719337CC8E13F9D8DA255185FBE3F4FB6DBE8EA90AF036A09BE3 5047B59BC18C1C3658ACE003B6535E42043E4D7E6D79E0B48B3D0DCA36C046D1 D5ACE0B6F91CB78BCBD144F3FAA3D9D711C9D11EC30B6CCDBF43CD490E9AC229 9ED2CFAC4F53927040CC8FD26004450889A1167FA34247B7C283A46E4C0A8C20 AB43314A34EF0BC02C5558746D35F2315624FB9D4A8ED13E3D1A8B80B872798E CCB9775F985E31E8228B03949B4E35DCF7A41C834E53CE3C163EEECE81A8278C FEA3A9E3264627D33738170C12F4EB23EF8F00811723FA4FE56A0EFE8ED5EBE4 90455B690EAE1E8F1092C1AAC07FC418A6790C2DDA6DF739B9B586B68263EB63 718EAD2B11037C5D26FF31FB2E56AB82773921B00EF07DECAEE2A8FD71AB232C 86865012F1FCC80CBDC4B0E881819601CE2FC5AC36875F2FB5C088436BB11159 813020F0433EDF6D96FD162F5E3241F88BA7025F2B010208DD1DF737FFF1185B 812864C3049CE325E06610404C8DE9322187DAA7FD90FFDF2DF3C86D94E8E792 377C1C1F10FDC78E1FDEAF718A2857C4922FA300C8D3FAC136BA2957C675FBDD 21E3A9E29C797142BA6D30FABB0D5E97AABB49D113A55C4838B253AB8D7443E7 15596B3BDF01C88C17135A74AF78551CEB6B0041BD17ECAF89321E6948E1C531 B227A1F071FC3558501BFFC842A4F8B80C14D9213E0633485A66F899BCB473D7 3C72329610575B6279C781714761468C785E426DC9393564979B1D6A6D55AE9B 4954010208883EC964F35E8363129682AAFA2D40E1ED08A4A1DF27F3DB5474E2 92B917B45D9473AC94EE40662DF06AC9D004541B6F88DF5AA4A36756620CBE83 1254ED1C3C9CA39B09E0D4148DA552B00FC60FF68E7159F556998EB8A66C8EC3 3B7842ACEE888BCBD1FA183BAB95B06B245ACEA49F8CC51A2EB01053E99E9A87 A5198C2FC26E270961FFF61A093A084594E6C0298CF96B251C5F8395ACDA26FC 461E6DB774F6220F8FA04C68519E19CF69EFA73E9A1BDFFE833B228DC19571BA 34B7AC21EB2BF8B1876BD11E128F002AC9AD6A9785CBBFE2D5FBAC307BE7CE5B DDA7C12820028FBDBEF1343638CE166E43B95E6518A83828AA3C3628779FB2E4 CE32DED584715FD18C95D38FA85772DC8650EFC42F980A1ADC012ACD93B7E1E5 FA6453179ADC6F17C94FEA1F4CC2EF6A2A975C687ED81DEB7111F0897742B373 30720766409C534C5E0A42D7221337FF3C4C59BBD239518F3976DC55FDBB8C1C 8DB9CB4B05B1D9AFBAF0FA1D82B1564AD7FC92B6CB3582F7DA309403EB78916B BFDC6F918E26A39755E5AD6394D985C92F7927FB1287FAFF2F60248236F918DC 2E8557C6805B01090A037E8D5C529E2D70976A9CBF3785F4BAFAF9923DB40756 7B6CE8EE83559893E3930790E5917EC3421FEB042C0CBF6CE74F16C44FA08025 82EDA0833C0486CDA66ACB450094BB65F54C83829B47DAAAC9E4CF115FC275C8 6BE583008180F2E2C9B003712ECE32333199BBF9772A471EADE59355FF264DD7 ADFD42FECCD00892FB545DFE555AAA4B273B82BD2740CB8C9ACD144DEEA94188 D1AFEDFA1FC63557F9E527C00AE7D14762FEC2814487CB60E406F8D4A47365B1 F7B0E0A56CEF011CC11345674611EBFB5A7C587C34F786498FEE4F0F999AF42F D955CF2ECC5B64BB1C100310DE5B6C7D106A80FA4ACE0184A6E18FAC544EEDCF 307334E1C2A0CB6E488B21DA3BDDC5B593D5ABD6006D1E2BB56336EA88D56DAA 62DAFDDC379B06EF80E9F3661C6B7AA6787ADD06155F3DBCABAB6BA3A46C9047 5D295774447BC007D5423B9840E2ABACB5B811B30ABFF547A8A6E2C18A92DEF5 D30890D49388E80E6EC7626FE3236AABBF64B21E5525FFB7C802511129EBFAD3 D1E19814500A465DA92054F93FF77864698288510AB599237D0DBE1EECF81C46 F706515DF10A1D0FB06939473BC72429A42CE6E15BA2C97720756D80DDDC171E 7E8202D385C2E5B4A5A011933CE920E98A09527DDBF49FB4DAF2E736B1E42F57 354C91CAACB68BEE8FDD10F4DECF25ABA4EFFC4588DFDB9E98640737C015EA04 A33D5AAAF9AC4A7D288BC9D4A8AAB9B852516E215DF7614B10BEF003EE1D0572 E4654DBA4D71959D403B936339D41C381FC1A206BFA6505DF3082D9FF767EF67 437E8C2A14A8B6F0FB98C80DCC42A30C57C8AC3FE83570A1B4AB404374B85F45 A1056E389A7148CAF714CF6DC26A04E3DE8E2E7FD26F6CDE3E836AE65E593A9D 3FA7A24A32E3E99A152009C8713FF8960FC93A2E49B8F442B81A90F98B99E140 5F0E0253DE8ACE69F1248040510DEAEE069307FBD02B821D1DAEADE6C41111E8 37A80AB702B8D79977DD73429695C13DF81ED3B562FF4C168AE03ECD24909A41 22C579987CBB22700D1D34BB16E5D0B4BEDB4660D34EF5CF0A4FE507198EE14D 9FAF7C97CF769EA9159E1D8210B063141913DD402BAFD515CD746A7CBC061A74 CD6D6DF78AA722FF543C5379A1AF5102B75C06F73E075BD8531353892E1733D5 8143315C0C780BBB21D6954119C0AB1D4C89EA67C0AFDD4607AF07D509F481A9 9045776F08003CB429316307E66E1F9490E8547FE0336BDD8B070290558E0DCE DB08FCF371A8A9FE905E9C3BA4CBD4F12BB2F512838D395BBCAB1488C58122C0 CD6D3634C0F6E193E2F2E8C632BB9185B20D94503E02244938D4400F0DD8FB81 3AB0CBCF32E462A223F9680A14AC8876917ADEDCC9B181D584AA307CFF3B66B6 F59FC840A9E8D1BE101AA1DE41934C22A1017A8AF69D257433C2D2C5A0474F9D 362A669B4044B3990BF83E8906C5B7E2B45D688CF12CC1FF38F2EA47743676CB 55FCD3C6261C6F5AF002869128882E39E089A6FA108195A8B86CB07913FFFA6F 6D8F8D5C9E897D63C174825286953B9DCB09B8475D0675E09C1D26286107E89C C75F92D14002B1289A5E11F059F28FA27DF23FF395EEDFD5F22374FF67F0B60E 81D249898A228A6A89141B23918E977BA79C5F5E6CE84FD35F51B136D81428E4 E4D205612F6DEEC1CE6AE571B30A33DE004A8F096656A3BFAF8BAE8A2C73AA53 D7984D6777540082F3674304D2C3F17775BDF86A27563CC2BF95F190DB3E28E9 FBD0716C0F1B0D56A96E2E870882F03A3E160621FB469355859954858C9CC2AB 06EA8F87EA163B9ABC176D704D3C17A37508864381659070B071B80C79D6D60C 7858A32F5DE87B1F818E78048CE81E229FD7BD91286ECD773147F94E7A184450 D1060F0FBC5A8DB06BB4009B3F5F50EFEECEF8FE970E3FBFEB5ADEDE9EAC6A49 AECCEB5378A9CE274BC7F25D03CF477C2054D313FD988A4D913D20ED3981CE47 8674501E487FEFE5DD91CB0E5ED24BE1D2D45C88DBE1378B11F6B7076FE56BF4 8E8925E65FBF23330B9C4A943CD96EEC06A6073AED304CDF520CD2AC1CFFAC7A 6B8D8FFB7327834C9DADF578F250A51BE64D27A2B65A16DD0204635560B47075 3A054F7159EE483CA06345D3D55EFACD47AD32A9D7D7404ED0CB742A3AB8C47C 2C5CC71EA3E1405D6E114DD53D85C2350D46A8E4BDFD1667C65A8152D9F3331D 6235F40AE36EDB507325E21496725F3351C239207C0C4BBAEE2DC7D2797B8818 BEBAFCA4FEDBBBBBF3FDB633A0C21A8BBA856D4A3119394FB00AD092E314558B 99CD5B138D4A42BB7B621DFCC2A2E2AD262479E878D8F26195A643BA0D13F9C9 FCF3B6BE5774DE6F4564FB82BA3B2B9BA29A5F406F1A135D46DB10C80CA11E1C 39C9A74A18D8EEE86C85556F8B9203E00DE0B1A164134E48FCE7F37AAB98A79B EAD809EA81192ADD3D3C6B35E521AC99E190262E5454C7170B081CB8AE338D09 D489BB694D228CE9C05DA95297BF106A3B71A99A5F199F122971F5C4B0B9C53A 4344FD111B92AF456697E0B85142B71FA56802C392C886A408558A297EC3C717 FB803CA1002361034D40420699FFE3C149800137EBA3AD99AAAD74B471038675 8B073F692D278E0A088D3F51360C2C79A83FCDABE9963A4D636631310E7C6D35 EF02828CD45CEBF9892C2761D934E07AF32BE74852C13FE63BD3DFF3619CEFA1 25F5FAC01306FD99A573F0F5F29116967FFA22C9236EE8EB052488C4CC204855 EEDB80B30838AEF66DD960389684231FAAB83750575E4C9BAE860D9B0F838927 791AE22921BAF254FE561771B7A9164362D6BD462A82763F6D19737ADA1C2B92 BD72443D7521795F9D3702F83B04BCF992667CA255A3AA539CB71F25F2D0ED57 9E0B180D1C199211FBC17EE282E7CA9E078593E6340BA651AB949482A0760790 E4C3F1446653CFF964B9A3142FF4FBE8C75CFBAEFFEEE1810D38033CBDA2FE9F B42BBD97740EF0C118C7954FBE81FDDDC74608D036A3BBB75EEED4E1A4A56381 0F57C993C4651E4753A27684D170EBC495D09202AC0CDC5F10267EF26EF4E7D0 908F4524C91AD27F43737253BF0617559F2EB99EB26643D8C28B61F8968CEE7A A79A818887ED9BC3AECE4A35AB15752A368D09594F93B7A741282DB5C6E42144 EAD79AADE23733A43500563C3AD34E0421D1E3B4642EC1D70F0054E3DB6CC218 FF930B11B1CCC3E4C90BC523D4635161C89CD9FF8F2C4F6E4127ABF479914610 4D95589775902AE3993E1CE3D4868A1055BFF961CCB244AE25C76C4CE556B8AF 98129765EA10B35FFF3D24DE1CA68BA55E133084CD2562832630E302C3823EB2 5D7293D0C760EC1788BA6BC9ADB7AF6DA83C951E0A23AD98EFAD64AD387F7764 21320EAA8DD04EFC4C2BC011185DAC3DC1FEF1461F3F9ED515E2240433D855E2 0229E1D5269092D0FF790539D2946A608E82E1FCA5E3A1254B27AA134C300FFE C7C724824AE8B8436577129608078274BB69FB6A026D0CA48B97314F596EB375 390574158057D3E1C3EA4AC61BEC73F81C706A6C7A9B42EEACD6A4B5C4E69FD2 C68AB11CF02CE3D9B7148BAEC69F92FD7DAF6C9D772BE60AD4579BCE18396E4B 60EED65E6E2E62B283F135675C188F58C831B3A7ADCACACD39871EF8905B3264 567AEEE25FB31D64C6596D60597315F1AD8F74E5577E6C966F8F65B001850D1F 39F0234F0478F6DB136F17F20262CC072B25202BCC8A67EECB03A2834136EE5E 8FDF55397F3572922DF82D25376DA73083419420003E99A020198ED0ECA44A72 DCFF31392F59E14720BA027A5A5E81B3C32BE7DBEE039CEA50AFD5CF9CB9080B 3952949A3165C5AE1EF9D8C76E0C901DF5013469D55C8AFE1554A74D6C565533 FD00D77FAA0311910C9C191ECBE1A0FE30A4FCDC3909D4F6322DE2DE90865099 ABAA1A087DE9B4642DB649ECA28D40631EBA0B3902EA6D70F9260EA9DACBCE35 8EFFA26B2E8BF4567406788443950D8A71339F595C83E28111FC90181AF60EC8 9A7EDDE1989A2678B8C570F5D0BC178C4018626B9AC851604F03C98469EFDFCB BC34589B59973E918756A2C1BB7D1811BEAA17D193DEA92EB273D50AE5C0FC30 661B330B083311E5D971D70DE46E2239532FAC9A6D8FD913E6DD03F42ED6148C 4F04E6D136D41C24BD9B973109A9B63233E51176EE64D247DE1C5CBB43F568BC DBD5A6AEDFB68E5A0C8DC465E9949A96665AB78F41132F96F3680B5A9A79DC44 828FBDA04368F277C40F629961EAA9F3B253276EE252478A9F409C2FB6447C65 37AB9FC9A216970D7BF6912FAFC92BA0C000A58950291FB3E47F0DFD493EC7CC A99555CACEB7EC87F4250AB92E7136500138087A19053E9152B6F007B8D3DE8C 96224FF8D464BD3289C08AD1E05B9D063375F38FD42CE97ADAC4E5B83B8A88D2 B2634B95A0DC0AE6A407E62D153BFC434B42680FD0F62F5FCF0818182F182D1D 6B9EBD47149F8506CF38BA61D8AE460A8B660F40DEFBC9243154E5683EA8D574 8D48276FE5128F972D96E42D89E374F7D8C72E70F84F028263507BC96F6B2B92 EF4B992CA46361BA3EDB888A6E5C57688198EF10A616F7DCCA55B4E1645FFBEA C2201D5503101C400B147CA23A805AA95FF059120C677C32ADC486DCA6E775EC 23BB704624D3755E09505C395CC3AB83D68F10E2D6E1497BC179F3CA82A3DFC2 38275D10D3253264BA9C32DA47C0088660037C7A789C1DAF75D0476BA9ED5B62 CD30BA0E268DF3537F8298BDDCA16B1C970C2863B21CD839FF6B713438447A4C C58C1F0ECE39E126AAC2353E31B6FB808253501CF26AA3AC48433D4CE5A946BF 10347C814A195929213655345791FAEB7986B1DD4F2B0C9E7116B11A4F1157CB 933B48B488B7DFE700423AD4FAA7E26F003B87B6255BB607A3A639830D68D663 A3350CDD992B528E3D2176DAF79AC03F6455B1BD626ED15299042B46F03BB46B 992109329C6F67F1CD92A620FB4D806558D6CFDD75DE4F7D6C558CD5325302BF ABBF40001F90CC940511F63F32F112EB958944E37A603642C0CDFC7941D9EC65 F1F5B2805EC17A6662FABEAC3F1A7CE8A4958D64FCD57759F5CA294236B5834B 0071972DBCFAE0D89A1BA76FA1EEF2C8ACB12E45C8D8939B3EF1DA3970ECD2A3 30AE415757A89E44CED997FFF9F6378FDB532ADAFB25872A690137609D91405F 4FDA7B432D432325F1467A7C85363A9E2825F86D5B9F9523E53FC5B58D82CB28 90D43D172B2CBABDA71E5B83928A6271468C197108584BE45647AF5C9BD930E4 18E321AE20B3D28980B1CA53F8B2696043BCC4C925F218B0AFF8E8C2BC1B85A9 134BD28FC51E5F4E803761720601C5D9D87921116C342D832BB14EFA08032E5D 7C0C4F14F118883DBB1CA0313B6658E3BB5A7ABBA4970CAB64E66515031BEEA7 F0311CD7DF8CCADCB38103DBB1D60CE59FEF567B2755D0A65100C8F8EA622025 4AFEC5D179796C4F87808A76B3F420A228544CC12427AE7A5E2FB6CD76D4668D BD5A22FF8161EF3FB20EE9FE64EFC4D1E466DEF81D20A395B020BDB7358E80D0 6CCBBB8725B9AB973B060770E4CB902F429D75295D1E5ADA0BDC01D0DA7A4ED2 A21346CC735F3E6662B87BCDED41C39EB2174C5ABD9C89A4A6554B3523E08BAD F208FFE1095E6641C548DC0B7116851695AE8813E691347526DA61EC59DB43E1 03BD503968825F7EA207E22EA04656780C15E1E9D0A00CF8CEEC4D3FD48A4E93 7E82A2D0F952F5ED616618739ADDA48480DA4665526260E4269F135C89C2F28C 28B435A1A40C924B79934D6CC536A58D2F102CB46E4C3F6F5390008A7C7B5E28 4044E385A5D6FBE641B6FB074C4E15DB9D25152E503EB7DB52F45913FBD962C4 550310BC3592CF1C56A7E19A73261219812CA9A818856901E9F0FC46FA53FD67 20A7AF35375DC845C8A9BC82F46C061F46233CE3F963C6AC49CCE0936A1813CC F7904CBE756A07106AC3D9B58C28EB405FE50A12710C7FA7B4F6900E163125DC 43672E2C565C6959C412F7CC333F49E0FF5B1AE666E0770255C43E1779A67D7A BD794057140D8D1478B7B3C43C84C2C2E56DCA12A1A536F80B16BF9C5244FFB6 906F2729E0D6C3A6AE9A837CF39F81668CE7B299F4EC9825892A961935E4C81D 7A9FE5D9431283C53770E41DB77A70500A9B21D63B2F073D75D8E11579FF7C63 3D1BD1D11EA3C49A594D1D83A733ADB8D887AABCB81C32E3913FC4B2DD1DFF11 10C193CD5D5D5FDC8080F9B99C9B29A86ACFD94EAC9E052790D6A46E5A5E946F 6AB9541056CC23323C09CBA556F1B0F28BA2C30E039B3552DDBAC17B9311BF1F 648D3527E8650B3FC89CF81256E9A4A9054D9F1A9839BF7E0B875D25EAC8AFA8 2B5663DAD7CC7DED3206BF5957291DF837535DB23BA63F9F7ACA7141E1490A68 327E35FB7888C160C2D47BC4A7CD84194FF52646DF43AC83A51489481CBA4D20 1E5094E7AC3EE66A5828BF1D87A530D7786577F164AC3D5C0D624FC6CF1DDFFF C2 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 cleartomark %%EndFont %%BeginFont: CMSL10 %!PS-AdobeFont-1.1: CMSL10 1.0 %%CreationDate: 1991 Aug 20 16:40:20 % Copyright (C) 1997 American Mathematical Society. All Rights Reserved. 11 dict begin /FontInfo 7 dict dup begin /version (1.0) readonly def /Notice (Copyright (C) 1997 American Mathematical Society. All Rights Reserved) readonly def /FullName (CMSL10) readonly def /FamilyName (Computer Modern) readonly def /Weight (Medium) readonly def /ItalicAngle -9.46 def /isFixedPitch false def end readonly def /FontName /CMSL10 def /PaintType 0 def /FontType 1 def /FontMatrix [0.001 0 0 0.001 0 0] readonly def /Encoding 256 array 0 1 255 {1 index exch /.notdef put} for dup 40 /parenleft put dup 41 /parenright put dup 45 /hyphen put dup 46 /period put dup 47 /slash put dup 48 /zero put dup 49 /one put dup 50 /two put dup 51 /three put dup 52 /four put dup 53 /five put dup 54 /six put dup 55 /seven put dup 56 /eight put dup 57 /nine put dup 65 /A put dup 66 /B put dup 67 /C put dup 68 /D put dup 69 /E put dup 70 /F put dup 71 /G put dup 72 /H put dup 73 /I put dup 75 /K put dup 76 /L put dup 77 /M put dup 78 /N put dup 79 /O put dup 80 /P put dup 82 /R put dup 83 /S put dup 84 /T put dup 85 /U put dup 86 /V put dup 87 /W put dup 88 /X put dup 89 /Y put dup 90 /Z put readonly def /FontBBox{-62 -250 1123 750}readonly def currentdict end currentfile eexec D9D66F633B846A97B686A97E45A3D0AA0529731C99A784CCBE85B4993B2EEBDE 3B12D472B7CF54651EF21185116A69AB1096ED4BAD2F646635E019B6417CC77B 532F85D811C70D1429A19A5307EF63EB5C5E02C89FC6C20F6D9D89E7D91FE470 B72BEFDA23F5DF76BE05AF4CE93137A219ED8A04A9D7D6FDF37E6B7FCDE0D90B 986423E5960A5D9FBB4C956556E8DF90CBFAEC476FA36FD9A5C8175C9AF513FE D919C2DDD26BDC0D99398B9F4D03D5993DFC0930297866E1CD0A319B6B1FD958 9429B9D40924DC059325D9D4CC0344F3F997A99E6CC0676735EBCD685AAC9142 08DAFEC78BB41AFC2F1C219910BDF41D6279284EF600B69776CA15BC8A34347C 30783C52AFA60FBE3E353E2AE354CF87B558776A22C776C7A0B5AB5CE1F941EF C2D9CAC37294BF407A671F10E4743BF842143F4F7DFEE643BA3BBD8BB9E3F24A BCCF7F0ADF8BA500620C81033EAE8C4EF2C1DEF13AC575F1B3BBB66F093D3B78 5412B82B67FFA087AF57182B2230F9F2137180CA58A7D9B2C822FF04BE6CD01D 43B2CA7058C7B953F6D9B5D6E91ECBAA5CDE1159B0E59C83DBAD96D6C8C8BAB1 374EF652D10C0F3EE7104472C98DD3572AAF2D45A70BF7061447E21EE3C3BF23 DF39C2D1B35B42CD5297BEBE6BC94F7C9DC6E61EC67E4F677256FED9064BD3E4 B51A71B1D27CA4E5AA9E1D8080E6DAB5310711EEF87C40859FA935B19524AE83 63B163FA8397BDFF443227FEDF7DB27DC35D89FB1C5E435DA0619A5C88AFC73B 89A2DF5E767C5B536BC7167A840A0C32BD57A14DE69A7D0D819AC36FF32F908A 5070F32983BB007437E3500799DF5E0AD3710A4C0000F0098D5BE99F2EB9C1C2 C444FD9552D0DCA098A94B3BF176F511CEE13DB7EFFAED7C47B5ADCF8D4700F5 7A5FD1B49560969BF5C44F3749370663A04776F749DDD7B50674D93254426C4B EFE264BEE7810EC93784B7C01A7F29EFD92547E13A2C7851A2E709FBD5B87850 4A44F08F56A542DBE072D2FBC58D9E6468E1AB858DC35240E30D31C7AC13D6C5 7D2BB634BEE96FA0E10F842B11A789F72A333DD6DDCB1BC23227EBC406E50B40 30AF0C48E6359AB0C46898CDAF1118E46BFF8B00F54EACBC2AC262AB898C42B9 2E080C10DE923C18AD2A2BE7ABFE6A00500618FACABBD844A515F5D7C7F7213D 7084E7361377127944EB80BD687ACC3F3400538570CFA3A299054F000E0390FF 5478FADAE4484DB8477D6E5E843DA9465F52C8CB88994A2DCD7BACB89D10EE84 516D7ABC25A54AC996D6EBDCA47306CE267AF8AD5BB041EEB9F4B2CE4EAACFD1 5D1DB53C1F07287450201D43E3AD980A644F39FB1FCDCE21711FD48169A9BA08 EC2A65050703540945FEFDD28556DDA2FC55F7D7CAE89F4D176FBCB9A08A7BB0 9F6F402A5087641EC7DB75D2CBCACADA9A373AC28AA030584C930A4F787C0D6A 2E1F7B837C949DDCF59E188349BEE6721335A3AA15FD72464171B978C66C24BA 5F94014AD374ACC4DB2D6C93D3C8FE5091397FBE134513AE4AC018EF044AD529 02E2336906FE185C146C54EDCB967A7619E4403F9CE78491DE897A99715E0724 028CB94B23C8141063150EE57F90A6BE0994D689C8545D763A8C60BF8A14AB1A 74FFD3FE096003CFD3A7C4BB8AF842BEBCF18CB9A22A575383956D85181EAB6E C2D44AAB62708F00DEDF1488344F09D1D08B3EDB11D617A161A473A7570E15D5 600868BFFFE8400320EF767806653ED6857CD72B6F038133C56AD7CD47A7B38C 9B2D909F4EAF9958CA3CDE2A6227254D968E72E24D3005E97C89927193F648D2 D2FE80F2845860B7C3B3F23570A2C1C5BD6348B905969E3322E72510696FCFF2 901F55946BB66CFD2472A24C3093964C546ECFDAD7FD28B24EFA1ACA58EC7BBF 470572D51E602B8AF8F42F8043D9A39D7598B61CFB7EC1E09E1FDE59A3AF2EE0 6E402EC1335C147FC7050081CB486676A355508563FCF063646D7AE6224E0C0F 397CDB78934CA760E52E113AEB044F20AF17AC32AA85C319A58541BB43313032 7374EFFD2DB344A77995A00ECB28192C3D65124F40A37E8CB3F6660204FBF2AB CD193C8A1F199F1E92196742CA88926F6CEB7F72BEA0182365AAAE458A163A41 3A9F6E8EC5AB9F8A73BBB46591F87371178741A97AE3B39EBD8280491FDF2584 1F412CC3BCC22F2F7892A194E548D4B5712F7AC3CA4C5D43088FAFF53ECA3892 65C6AD135E9D3B75B7606E259DEEA083CB2E9C3822B2B02C4A42A965DA50C3BD 7355FB5738E25881777111280AE04BC1273698F7BE40E33151055C8DB4E2F38D F6A6BA5DF17D13494B2739328FE2544C893A43759C9D615C41E85B423DAA600B 4DEBFAF52824B3D296E1F47B666E2326FBE1CE1802252939F6EF819BE3A9338A EF3DCC2B84E3DAF00E7C0D45E44840F8793BABB055C561E0928F7AA01B5955CE E3D94A281F2D47B024D2DDFD1BE0D39263D097FF18662A63EEA49594BCB4F66E 0AD12249D6FBD2F0B4B51411884C235A64AE1E698CDFEED19765749F1FC5C9E7 BFCDBCDD7F23D394EE73F2B73C65F0EE1C1FBB4000D63A2D1947CD869575A429 65A8B30EB7019F74B2B2048898B27B0650E2D291C8D3337EE09BEE0A8421E2DF 0D986E66F97EFCCA660606F0B0A7B18339FC44C75134D8630C74FD296232B686 47F3EFC94CBEE564EFA1CE4BD13947B32AE6C18C198FF5E3250F0BCE7A292004 6DF7BD82592128AF3EB9DA27AFEF27878C75AAC551A9DD748DB7F58160C33C51 3B28D39C1783DAB4696FD05D00D9A676083EA828D833649055CCBC47D14234AD F2CE3C0A887655FC28EEACA2EA3258DD0237E1693F9E6B59815639757EF4D63E 837AD18BDD32B8E75D6AA862A057AEEB7201F5FED012C2C1FB3D9CEC057D3E23 5723187BF8E37A6C8E7C0A4D19A78654D07C72725AABEB05958EC35617411FB0 E66D2BBB10216B9AAAAC186CAD162E0F9D9953871816F1FD1A5423F43B2BFB5E 1AAE96834566EF0297E2D69CD19D6232CA6D5B6E9E9B7855796817F0DDCBA391 B523F461C746120683CA7F7D123BC715A1D1C4567EBCB3B27CC2F66CC022555C 53AE7E06DE7B967D6F0708224EAF72EA3C4C349C6C1DBF4E3F9EEDD8D344FF26 E0587F50407EF2F96B9FE5D4D1EED501BBABB525E43B9E34B1ABE4B4EE73C296 CE2883BCDDADF33E48C8A879065E0079A820107AC5321F61F7A1BE6A9706EFB6 598C0FA5F0C81C9E48CA22F86A9F437068711CB834D90CF79515BC7074C0E2BA 30E0486B9EA0B3DA075D6FA4BA44ACE3031E166F9BC8D293683C1D3B94A2653F 442958E6508B00EE81D879DD8EA003AA418A09893AD298C4708BC328A0A21A55 62177339C36961B86AFC97EDB88206DA6712353887FC431D60344E483212AD4A DF9EA4632745674A51067E5F308343E5D1B5845FA6A623BF4ECD000B368BA9B5 9400034817AF11E3E4A5F8D00368A93E5D6F1FDBC3CC4B0065208B275B9858BB 40E57BF7C98A4E8158E84538E7541FD3FDFB11A015951187F875A0D8C9B7FDD1 BB3FDB57F4C1D89B547369E1D52CF180C7C57F1F4ED0F93E98BDD54DE02B2064 30D15CAC1DC1FB2ADA7D048AEFE4290B7F7E2AEBFB3C7D41EA1CFA52EA515C07 520A359529A88CCBCA53FEB15FB263D01CF5DAC4096A00E5C6482841CC42AF26 601A8101647FC35955587C768B7FBC7214098B01C53092C4869F65CD1E0E8616 D6166662CCD0E2DBCED327A7C8A65F2BE7A6F2F5AF70C6722D3717C150F4BEA2 C50CFD52C8473E80197084FD6220447C562981C6ACC17A833B6D88E3539D02EB 84AB15E42E4DDDC5A8F8EC091BA226888EBE1985A465DADE44B283B7EC620986 1D6C8B22D7D7B5FFD77185643146D49B6A5EC171969360AD890CBDA38F7DA67A AEB2ADDBA1EAACAF16A2C76080764DEC104C99359AC7B606197DEC3F91985097 0B173D6DA02759B3406B1F05DB46A51DCA1B6A4D1BB709F5EE1C071553478ABF AD71F1A99A6A8E488B32D0575ACA020AA97D9E107FCB5C7BA9428CCD04EDBB48 A1346168107718F3C98978CEC898A3494D96C724C355F01C04FD608CF1B9206E 8507257264443BEECE2C8AD2986A5ED9CF5BC20F779856E29BC9D0E44CECAF16 38483464B050DF21DB51C9AC852B60362F3FEE49F54152E794DA4BB628F1F1FC 0C7700599029ACDAC782DB220CFC678E82C09E51694EE72E821ED4CE5B524F38 05ADFD38982E5B91313757B55FF58873F8FF594E177301904C33BD54DBD196EC 437060F04CEFD4648EC5D6CC04522885ED6F1887393B6E6836F3768C9207EA1D 9CCA8B396BBF77D4FBFBCD401206B629AB96091B729FF137A152BBC0485E49C9 A0BA737BAFD17F53F319C202A90CC8153EDE244AB5EE452687C496C2E77FAD68 21DDA15C279714E0F6864882FB357599424BC7BE8695089F89C76F12818825AA 8E1BCE2EEB1E038B02ACDDDE39C803DF4C8C0D38228F852A1DCDCA97912C59B6 6C3CC7E533CCC630DA6920C04217E141E2F32AFEFC294A58AB3C95B326EF98EB 56E3F430BC78AF90D61BD5E810C9887877E93DC4D95DB2DC1D2C3C07D9BEF1CF EE6FE5786CA88765C0899133AED7429395326A22D822027A4BC0475FE2F74EB8 BDF61C69C950CB72F45A45F95920E2412B8D776C6E8BD6338D3AFBA07793F4D6 7AD4CEDA52B8CA8BB8CB29DB49F8D5A920D1E167242F26C7D51FEE79677FC4E7 0E711ED65A8FF70517BB5283E057D8C8B1175934F9567C4C7BF479839C2CFC76 D990522E64E93579625F51A8D85B5CA4E3DC5ADBFE802F0B835F664572A2AA40 2EBC631BF40F7F53C12E1156048ECAE68DEE3BFAAECB70013B7DC4C2ACD5DDE7 D64C094E0FAACAC86246C5B9D522F483189D359DD65337DDCC6C4438615A99DC 1936E0C20D2109B3E7023F019BE2F006D12B5AA643C7B5443D73B7A3F28B5B7A D8B8417E5B747A27FCF19B5263D542D6F2E02918E0B7A3574050641104FE2711 33E011619A91AC3D293D98EE25C2549C895FA14F749E76BD4E81F4FB055B8FD3 F2F65DA710EBEEA9AFFA46EBD7193F90D3112397A2AFAFE84CCF9DE1EA2147D1 907C47480FBECB6A6EE3BDE00C63187143E74F35C2027714B30FD5F09D80C412 BB820C5A8A30F3F11D395480FB43C20ABCCA913E6EDAACF7338A68EC3277A344 D571E1D2CA0675C197BFDE9B37EA3AE6A43DF326E0AFD91D9514A962E44617C9 AF848839DFEE22086E4EE1077403E9916D32348D4810FD973B7EBC4086700F29 2F62B0D59571A52A88E6E8A64193228349E288173F794312189F2BD2E1FDCC97 6881C1921FAB253BADE378D303BF2277DF8BE6D1C7A56C36C6CF3D74C6520AA2 37333C8C0F4A8F1BBDA2FE5920997235C8C8651519DE875BBEA6BA56C065AE5C 6F8C1C6227971E3DA49BE96C70263FE2173A3363585096B304DA49E46BBF6E34 715C7F41D56722C326CEA609CB72907D0732EBF080B538518CF0CB0635B0F97B 625F051EEDE437AD14A05A84DAD051E3425871065E4A2615874C30C0149837D6 B5A2893A49D062658008FAB040D27101F1571AC352ECD9672E2A30027E204EE9 433676723D012E8CC81569EC240B50C4902C5D4B30259BA95B69E82D1B81597F CC48B22EC65F7237AF0B0A1595707489AC4452D40456E1247080B58A98419EE4 4BC1937D64008ED2B1E7C13D7FD261BF3B63F65D7EBB05A00F057D78554AB6A0 9AD437F65A25158A55155A9CBB0866DE98A2EDD5550590EEF0E1333DF5A974CF 39E4A61FF9F8802F030DEBF5039F962133D952073494FDBDB161DE14A84C6B62 C54A5C749AE60EBD07A0C29842706B74B75BD54D5092694B1325A58D5CDED356 CC6C8F81133915F05995EE1885991D3B14CE0794804F3BF58D5CE83BAFA05D5E A005736C32E209E08555E88798A225113FAFB91F3946B290859B52D94C011F9A 295A554C3793C20ED3E3A6B5BE57B533E8FD92A5DB0F67A048743EF6C1BABD9B FE787A1282E24B098F1276CDE25C6686E5455C8C84B19BEC816D58A5642E1660 8DC4BF1D7EB903042F6B57687E6D9A25058DFFDD5A55D27B4E8E30ACA5C11A90 CBE71DCD014E3ECBA954DE2EAE0E96BA275E6D5FBB2114BBA5D4AB02F9693545 A2F3307783FC641D1767C8AC174B98876767E4ED9F6E22DEF90BF7BA35CE7173 C7471745C7E3FFC15D15C135A87F38E96ADBDF35A36E86A8C30BA572A4A22FB0 365A02B3EFFA2491C3A9CED6D76E9293AEC8724E46DA15312444FF8EEC21077A 26E54E8CD9B077C81EFD5745973DC67C072BE37D4B9B7C6C3E6DE4E74C035022 52ADA17568968E18CE102CC748D679219D070864B2A465D6F4A2A0A4A08887D2 BDF4865CEE5BBAE5C764373A5B44EC9B399387F79B84F5A85A5DAF403F64CD29 6497560F918AB1D65397363498FDE113D1C43085B70F3761D6CFF81C64343B55 113754EA46D2CC06ABA93EE3D388AD8514579CCE2CDE11E14C9C1FAD283F57AC 607BD42A8DBDFFBC679BC1B858A95F2A1F2BDF280E8A19C98EA5E5FFAD402AA3 F03F1806AF305F072CE35F644BB0C095D38FECCAE226C00B63D26E367234E1C2 12DD8D4D9CD3264A39749A76EAC7E03D389D6AE33B068B2D42A947C2CAA69295 CFC49CF12D9898F5A54F12525B668555F97EDCFB8B0701A14DD5EADC49BB8531 5D6D7A1A4C78C895154F4762BD3F34DA3A3836F1B52695A064530984FDBD32A1 D064359695307BD42FF880489735008C405B63214F58EE970DA4F171BA941499 EB22232F4EE7B4E3D6063CB4FD10DF9D6EABA14220B994E5BD8CF96E21F966B4 9CD5A96EA1DF4430C46B043BDA6DB7A3C581A67AAA1773E8208E45F43DE3AE95 8ECF8210DF6A0C3A69FDED35554CFAC2403BBF4BB808DE0DA9BC3EC57604F150 17169E5A4BA101C020203EBC7CB27168348087687BA16096105BBCC82A0529EB 6E39BEC21BB348A074A0F2532307ABE656A0051F1B87C2B762074F7EA6A2611C 42244AC5AC971E43753FBCA6C025A5B9C03E573E0A9B42B43C2CD0E9FAE39E49 62490710A8175427337E393F80DF3AC43BF179CB829DE6331AB86422FA498833 D1C14F83E443DE738C7A9BAF36531D6FE7274FCF51A152B6447B15275AC70345 A51815AEB0C014299B15E880D593BA8631D656F33A56B5FC851AFCE74EB8640C 0094ED50A6931FADB9C20C453690BA4D6EC88ED660AF05316DF2186757B7CDC6 FF37755B746DC9FE45100117F1B8093F96254973D54B9DC21AC8B430DB9A6A5D 6CD60B3C822958C48EAD747F3C8AB10F47B29382BECC04D96B24B343CE86E7BB C0926A6D6DED8F9F5E9B05F1CDFD07501315DBF2522EDB572B5724413A8051F5 D84DE87C7D8C505256194D083FA9887166547D96576ADCB15D9A6A1A5886CBA0 46372FCB670C6E95E2EA81DFB3511134C0CEC3C9280944958B7FA2B00D6A87C0 D28A8C30A8F6D5FD6C61B152DA5D43F5525FAD3A004055212BBB225AB5601B65 D684E9B4CB5DB6493BDF74B1F75B12F33ECDD0AD8103F865A36F2309ADDD8BE6 229CDB25B3A922B591322257AB8A5BD62312758C5185D34B109317A6893CCC3F BC668B9E0EDB1885D9EF6A6F1077CC9B025C66F4E20C0BD2326F82BC6097A63E E332543684D7433A7FA613E82CFBE7D081B484E71B5A938FEE191AC8C9C79A2A 929E58EAA236E4FCAF87EF1A1DDE828A84D5D43C25F0CCCF3977C79DCDFEC056 EFB75D03777F00F5AE7833F0EB91BBC1B6EE60B9CB8D6E774F72745D21FDC5D9 472332B20CE5A9887550310CBA5DD35532E4E7A5C810041165CA595B2285572B 29AAAAF676D81B1A028B7D9503BD9EB46B4C2FDF24CE4FD5926E4FE2E53A0D75 167FBF24100706E09CDA5B76C4650F9CF9A44E95560CFDF63672DEDCA589D737 F4E48F28CB42582D4ADB35494B41A4D37CD59986AE9298E1B191538253677D54 E0DE24266E195A6EDD88B9A5FF4C6A64B20194E86C551953458637878E41B944 8299B195E848D4A51EF3AAB030AC0048C780A12440CBFAF8531859586C97E826 9FFAF28E8BCF0AA7188CD31FA9F1A4C4D96B01C8F1E64895F16CA9EEDE3B1E05 963CC6B45F0E5C5C5C62BFE4522E30CA010DD477C61FA989F6D0F1D3A17ACC9F 5A43F41A6015A9F942DBF8FDDDCD7C27B4FAC601C0415982E6FE6CEFA3F7C1E5 9A182EB2235D4136F11D6F408BADA58654A928B58A24145E1F4B0B996D93635E AFCDA40907CC13D1C1199ABB4F08E015C8B204A3A6EBCA8EA9A2A7D3ABFB00B9 BBD42CCAB8753DB0CC5968081A27F638831E8A78EE7CD3FB1D74C9355517A1D9 3AE0BD6ED674F581B398F1ADAF2AC848413BD4AB04B606C7D45C55B736E3F7F0 17E77DE215FAD7AEFC628062E0E5513C9F7E629CFAB25E14B4E04C0E96689AA6 8F6034FDE0E206CBAA6ED4D0799A99B41105A5C136CE05CBE2700B7B0283D376 782D3518644FE0AAD2993CCA0CA08A70A6D42ABA5EEB4B0F8BC6F729608BAB40 9D046BE1BDA44A9FAE8D534C365D0B8E6F39092461029CE88B843E33F93DC572 B49C727AF0127907FCAA339808291BDD960A1D65F83A8AB8137D48BE5D0C7496 439E9952B2667D999916C770FF0F8833FF9FEFFA76FDBD8DBFBD8673D95CA735 28452636631B8717E5081A8B41A192836A9BE01B60D545EEAC2FFB961D0EB73E 7E0C5230E9AE38CF6754B6C6C9BCA4B819FA08CC989430B849FFA13260691523 A03EB48C15A50A3A044C29BE621C4F8C124B53B09425AB326CFCB449759EA353 B569DC0D6D1D7DC29C8B23A31F35A94CC47148033635C787E406037B1C618E31 E3B43A9402E60720457F60BB4D5A31FFE1777644B053CD2BAF0D55DEA14434B2 F230DD01934F90C7D3A20363058D96056ADE53FF93A84B6DCAD0CA78132BD6CB 8C3C2C02F569DE5FD19ECE80891582B445B9D2EBD93A8402948A2BCB5940C75A 9B7E35BA0A2F8D51F41D89D1D221887023521F707DBBFC51D3935137B07EBDB7 FFFD435DA22425413DF92F516AFEB3F40BDE4BF90556AEAA944DBC5D8F17BAEA 67DD983C2ADD85D37289932A6462B632725EA66E3A335AEFDC40C5533EEA296F CCA86531DB67AC517090633AB4DD8CBD7D8AA219FB1D58BE0B12E85D10E618CD 0FC6A362B042C6B9FCABAB9EFDCE81702A0F8AD3C64E4ADE4DF40E88197752C7 C89B8481FA463C3845A4226DC7E7F613197D689A6956906D487195C167EEDDA1 F4761DED3428B835AFC14E6683D7B4AB3CD54E3EF8D0CD312D29AABE4A31DA9A 1E488867F8B981E11207ECD854E55DB368A9A5BC9AB5FDCAAB67C9F0B5C27EC9 EE29FBA4B8E195B8CD9D53D9B24E1830494B6085540F5467341D23C581FEB427 52AF14F88D590F71F3A43407521FEB0F6F6D3885BDF79C8EE7414346853CECE8 1AB8B35728A13632371CF9456A68C760155FFCD23D2029770AFE5DFECABE6571 15FB24827CED98A2E39C9F3D3C6BC168191F0A32E1D4A3A6EFEFE5331555CE4B AEF8502F2D20F1B561AEF8DDF61FE9A9C0DE17E1847B8C18342682BCEA1481B4 2E03967B9393ED8F64262CE87F5732B2A8F5C8BBA53068CE14AC143A41AFE6FF 7D1BBD08CF1C89C3F9DA27436745AC6117B9C68A3410C1C0143A97F62FF7EE55 4D23E7ED7EE9C31EC1913BC091E45E29E2EE681FDE83C55EBEA07BA7BE6A8883 80E50B0820C2537995E2AFA62782DE1E30EA87A569AB931838BD7024D297A690 106179136110A244859F1D5ABC6DBA94EC87C9DB9DE843AD2F05840D4F90E9F1 91C41D5FD756E25FAD3492C463315A556A63D97F4CEE0971B8B9D1BB30A58665 FD37B4D59A10F5365E3455A3DD3A732E5734279B6FDA63FE903CD70BC04D1358 2AC8F9DBBAEEE92A8A933410493F9F186EC52F3304D50037C96A419A281541B2 ACC0E5A9BAC9B7FAA8E0BD99B5251259A1A6EC8D3BA47974B9613948516857BD A3B84DF70AFEB122B14982FB1C3E88F6EC2284DB4B4C943A2854FF29B4AF65E6 974332441DD5C83163CCC2F174AC761B7C702AB6C9754836E8BC1EF7B6A5E7FF 9A86F51EA594E2C7CB13DABD156B477FFEE840EEA55129C3994A424F69AF08B3 97D1663E33175B1159446831411E2F8C8CCD531FC46BDB0C1B590A396A3780F2 FC055C5C752BC9DD17B1A4962727D4D255E5D6080661263244E38E1BE17043CF 4DB4CCA19DA7CDDD94988886604746B49BC36C73E168FE7CC628C9F6376D3DCB B4DB779C0F29537FC2F22A5FF5DBDC8738D32973A64CDBDBD0FC8E956431E871 8DD8E33DF06557E28B064CE7A7342FB658016BD92EE67A6E1F5389E977A95AC7 29BA4581090B2E4D7D53B20F56FD9311D86A9CCD61D42CAAC4977674C8683193 948DEB37FE15675B798F176632D7ECC56D9D48CFBD3EF0DCCB540BC072F887E1 2BAF8767F80C248CA2843E9BD7D3ED9C693B6B2BF7769821A6E813518A810780 EE9E13CC85358098797A1B19CE476831D3775D0DF7C7B90A8754E3D91FDA2873 858030879318D96CBD2220402A008ED4040241138F4A7A0AB8E9356F6D53F819 DDEF5FA13FB03DCC0C82CAE070E54A17C72B04A66EED7E6CF236C9CEA7E0BBC0 29F6AC55678C3469F15189A585AE48156F620A2FA122B4F028E936CF5710591D 17C0BB7B6BC53208849952DC5184245FA6CDDB9AE599CA076F3AB8CE856E5B0E 9EEDE67AA13E8F5089C2130ED6A053979E0C62A104CACB2741089189F627099F 42C3B82D792D7ED93CD0D63C87F0FC5FBB74CE9AD5DE2D81CCBF067BBBD2C323 411F1845C287B87BCFC5CCD50DDFC6B906E8D89D4994C8188D1DC5A40B0AF52E 5E8FF0F22280DDB503EEFED2236826F2EB9F5C3A23F343DD129A3D534D28548B F2B08FCD34D33AA861266F62EBA0AA48C85A0D4869805F235278E49D9BCDDDB6 7C293B8BE5EABB67E64247AD01451912A522BA99F82A1C50087474F2C2020CED DED7584E3356566100B06A492BF76E6D0914D9A684ACF99AFDDF909DBCA11A87 72FDDAB73425D666F55884D53D8E6DA6B8C1D6842B809A01BD806B648652949E A7D352FCC8BCFEBCDD860DC736CFE87B09D47267912558F15560328573F1E163 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 cleartomark %%EndFont %%BeginFont: CMBX10 %!PS-AdobeFont-1.1: CMBX10 1.00B %%CreationDate: 1992 Feb 19 19:54:06 % Copyright (C) 1997 American Mathematical Society. All Rights Reserved. 11 dict begin /FontInfo 7 dict dup begin /version (1.00B) readonly def /Notice (Copyright (C) 1997 American Mathematical Society. All Rights Reserved) readonly def /FullName (CMBX10) readonly def /FamilyName (Computer Modern) readonly def /Weight (Bold) readonly def /ItalicAngle 0 def /isFixedPitch false def end readonly def /FontName /CMBX10 def /PaintType 0 def /FontType 1 def /FontMatrix [0.001 0 0 0.001 0 0] readonly def /Encoding 256 array 0 1 255 {1 index exch /.notdef put} for dup 12 /fi put dup 45 /hyphen put dup 48 /zero put dup 49 /one put dup 50 /two put dup 51 /three put dup 52 /four put dup 53 /five put dup 54 /six put dup 55 /seven put dup 56 /eight put dup 57 /nine put dup 65 /A put dup 66 /B put dup 67 /C put dup 68 /D put dup 69 /E put dup 70 /F put dup 71 /G put dup 72 /H put dup 73 /I put dup 76 /L put dup 78 /N put dup 79 /O put dup 80 /P put dup 82 /R put dup 83 /S put dup 84 /T put dup 87 /W put dup 97 /a put dup 98 /b put dup 99 /c put dup 100 /d put dup 101 /e put dup 102 /f put dup 103 /g put dup 104 /h put dup 105 /i put dup 108 /l put dup 109 /m put dup 110 /n put dup 111 /o put dup 112 /p put dup 114 /r put dup 115 /s put dup 116 /t put dup 117 /u put dup 118 /v put dup 120 /x put dup 121 /y put dup 122 /z put readonly def /FontBBox{-301 -250 1164 946}readonly def currentdict end currentfile eexec D9D66F633B846A97B686A97E45A3D0AA052A014267B7904EB3C0D3BD0B83D891 016CA6CA4B712ADEB258FAAB9A130EE605E61F77FC1B738ABC7C51CD46EF8171 9098D5FEE67660E69A7AB91B58F29A4D79E57022F783EB0FBBB6D4F4EC35014F D2DECBA99459A4C59DF0C6EBA150284454E707DC2100C15B76B4C19B84363758 469A6C558785B226332152109871A9883487DD7710949204DDCF837E6A8708B8 2BDBF16FBC7512FAA308A093FE5F00F963068B8B731A88D7740B0DDAED1B3F82 7DB9DFB4372D3935C286E39EE7AC9FB6A9B5CE4D2FAE1BC0E55AE02BFC464378 77B9F65C23E3BAB41EFAE344DDC9AB1B3CCBC0618290D83DC756F9D5BEFECB18 2DB0E39997F264D408BD076F65A50E7E94C9C88D849AB2E92005CFA316ACCD91 FF524AAD7262B10351C50EBAD08FB4CD55D2E369F6E836C82C591606E1E5C73F DE3FA3CAD272C67C6CBF43B66FE4B8677DAFEEA19288428D07FEB1F4001BAA68 7AAD6DDBE432714E799CFA49D8A1A128F32E8B280524BC8041F1E64ECE4053C4 9F0AEC699A75B827002E9F95826DB3F643338F858011008E338A899020962176 CF66A62E3AEF046D91C88C87DEB03CE6CCDF4FB651990F0E86D17409F121773D 6877DF0085DFB269A3C07AA6660419BD0F0EF3C53DA2318BA1860AB34E28BAC6 E82DDB1C43E5203AC9DF9277098F2E42C0F7BD03C6D90B629DE97730245B8E8E 8903B9225098079C55A37E4E59AE2A9E36B6349FA2C09BB1F5F4433E4EEFC75E 3F9830EB085E7E6FBE2666AC5A398C2DF228062ACF9FCA5656390A15837C4A99 EC3740D873CFEF2E248B44CA134693A782594DD0692B4DBF1F16C4CDECA692C4 0E44FDBEF704101118BC53575BF22731E7F7717934AD715AC33B5D3679B784C9 4046E6CD3C0AD80ED1F65626B14E33CFDA6EB2825DC444FA6209615BC08173FF 1805BDFCCA4B11F50D6BD483FD8639F9E8D0245B463D65A0F12C26C8A8EE2910 757696C3F13144D8EA5649816AAD61A949C3A723ABB585990593F20A35CD6B7E 0FA0AD8551CEE41F61924DC36A464A10A1B14C33FAFB04862E30C66C1BC55665 6D07D93B8C0D596E109EE2B1AAB479F7FAA35279ADB468A624BE26D527BFF5ED E067598E1B8B78188FA4BCFB0B51692D07B0BEBB930C6F0997B437E2C51B876B 61A563A2673932C2045833FAA35DB22ADE12102335D5DC734AE3AC5EEE6658D7 92EB62131E1DFBA441F53EFF9021D9D4C491F26BE8F54C61165CAD778CE8695C EEAF70E3B20C64D4C2B34A084B5770BAB2A974E898F62BFE90F132A37E2DCA4F 43E13DB13C94DFA8ECE2B7374827AE168634FA007F8981ADA046CED3448BF453 FCD9A4F194FA648F9FC0971734BB69CB73439CB0DD021D44A7C11BF295E81733 4DFBA460FF3D654F9FB337E99E6D66FBA87A817EB9CA1536C84833870E3626DA 55D48DE850D3E6F6B29DA0E7C9D681283586F208DB8D58042E3A7CE55BE84822 C98237911453E479EAB65AFEBA3F61A763B40E74535BE56C9D8D06DDF9441741 5C9D9D917439368736619717FAB4F06E2C329AE0BA411F3FD522D9C33AD8369B D7DCC9DF993778482F35F965973DE876FA19E109AA198A00658AB3F0D8E3DDD1 08A573F2D525202AFC57E05D141E6C0BB811E1FE280EEA002B7A45BB363AD06C 318D320D2C81AA5DCC842CEF66E7DF7670588CB39C9F42EE7763A3A17372432A 173BDEF7ECCEA297CCDD76A835C36DCE9DB8F8CB66CC71B4920CF5BF055A5260 5B41A5373BA6E4F63C85671D979EA5EC30D22163E6D206168A3827F465279870 CA80E6632872F721BBCC622EE4214BF723551C846765495FA9921E11FE1A950A 53150C3F5D8595958A47E0B16064CC3AFD65DA294FFD111153F4F233BC5468AE 69585C16CFBFCA32C4B96C161F47B56661DF84FCD8ADD3EC086CFB6BB5179BC3 A5469A1CFBC8620BC711F42D0D3139BCE4E38698D9C574450DB43B5A19FA6D54 0368BA9F7A8DBF96DCD0B8968CD194264E6DD10A958846C278B8C2BAFE7AAF8B 44C84C955F1A89A13E62A054BC76CABBBF6296DE00A79CD7C8C61C70F127618E 9975B59A880685E126F57AD80F8F4D376E1B476BDFDAC868FB6AFAD9D694B561 001623C4D9F55366D053B52F2B09EC08B81901AE0986C5350312E626006038AD AC15FE313FCEE1A2E61F8992AC00CA7BB7F997707EA377D37EA6FF35BFBC2866 A572B31491F9B80445685DBA5E62F166E80589F768FC95BBC79158C23B2F1BD1 25816F1486A64F76D99A638AC0DC101FDF390811B3C118C2D972B2E7587F6F24 7F1DB2DD922D237A7D18FF08FD665355CFBBEE799D3BFF11CD94CFFDBA3E725E DCF4CDE4307E3B199D91893A365D04F43A5305BDD2538E28A0788E061F3A621A B4A04E5063B47F0109C1693A284FA43E8F1EA9B68145FF51C005D3FA40713BA8 1879BFC3CAA881B9D885A0C1AA8BB9A8C848963020A5B15F862E7DCC78F25D7C 56437215999EB78142C128C6CB1E6E75EBCBB1E4614E8516FEB1E68400C61326 D9F9E8A41216901F77D9466455E2A0B45FF50B27B55A1E1DD4F243C92BA6B175 8F7695CFA1E91CDD8651AEBA3D258FFABA6280BF2420A98FA7CECD552D152CFD A8CCC94C032087A28D68332769DD2CB4ECECB15717C245BA305CB616CC72644D C78326E77FA602364A7B1630CA0BD0282FA781E14282982C1AD13479B6178D28 1CAA541FD3F4316F4FF81C53496DCDF5F86E0D7C870FFCD85B36C936B1E08D78 CEF3823546BE4329B97EFA4E2880AF3361C0DD67F77C8BA6F1CE3822B7FBE567 064ED0477949BDA06483F8DD04F891473C8FBF73A61F7C06B20FB8B5F0BF4B77 1429190979A4BDB29D77E94D5FB486A93B8B61DBC84AE06B4E06CBDA3A942043 9F9926F541DDE4E9B73606C3DE3E4E957C91D74BAA629641A6BA8E053FFA10E5 581F14FAA575EEAFA39C6534A94D0B1BD7A8ADD7B219900B9F300BF1752C4236 81CA46AEF5361701257648AB2ACC9825BD79FD6663507BED21CC7724BE327C32 5223DCD4A92411BD7FEBC5C99BFD4C77DFE394FB6D190CBFF7C94837CF66EE0F 0D98EF9BF9CC9B14365F33C78320085E763FC27DA1E52B0006A0019F56E35236 C5D3C182F26D23353CBAB3DF0625BA335B5B965A15119F1240E2D757837B195F 5B089B39BC8AE493CA98A6151FF1228EF46924021498A17AC49B68B8B555FAED 73449B45A818BB4BBD8A0D5910790C9824F13F5A0D0C07634CBF077840537E38 E7B5D57B328D192C48DFDF345B485B9ABF6664FB147256268155E04BEB5E2D3C B3635D6821066F8118281285E3DE0E31DCD1DD130171BDA0792ED9E4588D5A33 E9703E3A82240D7CB225D971B91F4457AE9A119DCE5670CD46344C1E9367F1D1 CF9FB36C5541128BEA31BD0E609170433D0092487F28845A5B234434B01BB2C0 FA3F2E8562D927A5B25BE0DC8313029969C9AC313947C924800EC92FF63127F3 0AC6801EC1B0FCB6C82CBF7370973B21C9C77CBDE9226278A4B5CC752FFECF16 8CF30E7B81CE53C3933AC580D848F9CC7F3377E0BA5BD88905DAE82BFD42E1C1 069C8AE5FEA017F4C8C9AED30585050FBDE9F530EFF051A780E5A7F7897B12BB E968204D5654BF09156BAFB7DF7ADEB7AE2C0B05416D085ACAB40333D10926F3 F5734F57F0ABAE2ACFFDD09DB497EFC9E66BEBBEF18ECCD13B09650857925716 B4ACDABA324721422EEC2DF66005CA076F3657A12537DD5AA5E456FFFD52633F 12B352800E09339568D2F9BAC471B58E108C990AA8C481002C442932469EFA8D 67FD87C9F4DD28C62EDE5C0D58EA1E0911FDF9ED05E032E3D138D01B63F27988 471935C56A7C7E77DB9E6A3044FE2EF9F721486F229836C139FD92D82057EFD7 E7FBD5DCF2F9889F31ABF09F119DB6C0A9C2D56FAE51962FA345E78D873BA145 A1CD40DF061187115093C6DADAD21C1925A83BEBE4279DEA1B78A0183E68DB58 70409542168F86094825DE53480D281324FF58158658D21B48104B83D6347488 819B637A785A8D353B506DFC8D58F57ADABD4B70BE468558A73CFC5D0FCBD1D7 ECD18F93FB4B5125C5DA18FE220B12CBD50A1ADEA8158B4C48E2DB42DC80537E 4DA231CE0464C56CAB8F59FE60393C4C305F6E1724126F765B54652B93C96768 15F572F786700305087B798177719B112B67BDF3EF0E708A48E8D6296BF3B937 A9288AA57C8243C6D28DFA1B31C331FE72BECA3916FD0513E85709684D3C77C6 4392980F0F2859D40903C3AB70270ACDCF7644032510BFDF0965B30E5FA47CA6 61B6A7D3A467FFB5405A7FC00134B2D5570C74C1E27F5433FEDB15A29C7729C4 AE8C7F7517718CD8BA705D76008CB471D250A77F7529AD67103FA172B2B482D6 E6FBEB44DE62F956839E878A52588454DD72377A0CE7DF791C2EB04D559C0B4B 5BC9CD13D4B0082F29D8C2EBC6678050F0C6982DE10D3295086ECFE64255679F EF0C90170EEE04D0DBC091DAD7472590E5D471239B1E9B8477B0EAF113B6DEE6 54F55398F7DA7C64092F33FC1DBFADE12B23FE70BA4C9538DBF1C19F4B947603 6D0B7049820B90804D19A22B8A9C3452CA601AE21204DB55787A53AAD6D42AD4 9F2A2E849AB4B1F4FC726D0776520D3AF92AB14F3B76AD31E91D47E8FA5EF826 642BB26EB6FE1BC93675AA40494148AD957B2077BBE240C1DC145C43F53C6DAA 4C5EAB2C91D2D3C63956160CB99ABF21C74C7930D7C9207E4B515293DC8B4BC1 42DD53FB3DB8F793BC0298044BB2D9F7F8588F267646F0C72181B900B8840743 A87717DE9694EABF10976EA2FC141DF70BBDAA4E1AED08ABA4E2C386ED629E24 AB9157BBC4CA7AC1B4016F927473F787DDE44BEAB16319C8694BA592A1426213 4DFE7039D154E7A5A969FCC2799A7ACA0174CADD74EE4B85AC4D62E1965FB298 EACF6FCC737604E71381B924D00BF62CABE5421C98211C3C01CA517D4A3984D0 0F5A24306C30224967BCFF64516137BE52BA47B283A62816C84205A296DD2CA0 9F39B6FD01BD2AFBD06F66A45645662F5FFA5A3E0C35E6627211181152CCD857 B2037555F204FA5B7E321873BCF4D84B1FC7C2942EA9F943D199AB7C7B12692F 77D30BF33B3F90905C1CF6AA6CF7FE2D7E7ACD6C296FF0AC39F9EC0335D1B1DF B812CE8A9D64B833E0DD307DDAF65E9A2B4E7E03E79229F4E183540846A3C337 B00DD353ABF3538EE6AE68D4DD7BDD3DA51B5097331BD48AE31EB303B66689B8 2794A8D350F0B588B45632725BB6E7B14D89336E71D744C2E3E3453BA5407BB8 8E9898D3D4D24A3DA0962FAA7BB24A66379FFB6F0AA077E3B01F2612BDC8DEA3 CE1BCB25ACC872A6C0A98576F9EA016F723A0AE79BCC936BEDF4C091BA9F4764 4C7D026ECEE22AC2FAA631FE4EA642570CD3AA905DD810F08F7FC8A9C26F17CF 95C05142A1ECE12979BBCD0F52C0E6CE766C904C0B0F37ADDD3D97154A2B3728 F09C77809BF1CF46E09AFF024993E7C825A777815B420E3B8997B48E969DBDC7 4127CF29407C0089ECB3D63F6FA89AAEB2E4AD2D8622A3E245C854AF13062EFA C52C7929CC42FF622C13B8C13631D09E9BCA05B113896E559DE7CACDD2655C67 BD760BF29FA4C51BF674A0D5DCA5DA2EC73E6C6101149DF9FFCDC152E7142CA8 49F9A6277FAB6B35F42A35DB82A564EA0C5989282966A92EF9CD1A37264207BA 59EE7146905948A128002F70022748117950E2A706EA9851B337B3C54F6B948B B4E92AC726D48C214924C86F27AA8D054FE6C9C471B0D7140CE08319EFA54510 6DD42EA378FD0FFFCE2458630632AD8130DFD8701080D5F73A0CBE281EE5C3BD 81F49BCB11458164A061EFB788F7D2FBA00FC53E40A99CEBA0D4A6D1FA5D0FEE 07F08CF70575185902C77FF048E67B00440115054959D952CCD88580C590EA35 6A0EDB91E90F8E0AEE102C2A4AB460257090496809AB12276D3A262608F356B0 45D393DD4DF0031335BC278C2992866FFBF0CCCA02BC37C82680888C95E51917 368167ACAC86ED36FD3FB26B2D17E375089C699AEEDA5B0F68D87C8EB6BE46FE C4CB0F4FC636F6DFF435CFD510EAAFDD266D9BD57D33F71AE47584805E14979A 3A374DC19A43E1065D5E4ED4C2FBCCA6C3BCE0EE791BC30630E08AB40452DBF4 9D2A21B4B01F5F210F3BB42FF8C9F869115E7A0D78F9D2AF68C91F9BEA8DC210 03870231F666E31899B1A24A0757EFDCD4E16C2E383D690D04D3D57E1F2CC85F D23AF5BE23B1D4AFFEE6F66C684B93916B91B64DD85D1231E3D60C8E2FBEEAE7 81C58E0BE8A0016CE39EF705F76D628FB8C08013D25B925150B95F7D0B814D1A A25C71C654D4F1B5213E05CABDCAC794BA0A1B9251A123ED53C36AF2177EFDFC 6AE748CFAA85A25946B2A72D599A076F5A515E3D741BD7119FC61C2C75C8589D CCD57D7A9B15E7279ED49EE50A9B5AFA22B902074B5D471A8ED71187982AECA7 EA542C62EC41C509D2B13609A07CFB15FB2520D04D6EBC1BCA3B0DD51C1EDEF8 CCFE5B0B5123AE854AA7BE938A8F8D809047DF93499938EABC1614C7714600F8 862C14E0A4C1767686DFC884E39A1C63B17870FBB98FD39041539E12338EC4FA 0BB682BFBFA5B748CDF535DEBA2828BA26BEC55B96868BC4FA6E288F3E1ED920 EEFC42896CC017F618D19B63DF610CA08FF6721446B8AB73D536BD3F5BD1794E F89F380D0E3EB181E0A675230FC8353B32A1DF6E7DE4EECD1EA87DF72F3033A3 B48097F10AF413BB5BE98852AF7E62F088E885A86BB07C15B1A4497AB0C7E181 7BAF23D1B31696AD74AF642F36ADB05A14F004EDB1CE6734E7FFC8CA049AB6C9 5408F91DCDA00C4B5022C29DE7B6A2D1C41C244E771DA6D050B14C08A8E3C8B0 D089BB4B68164EF281EEA9B6CF58A7B74B598A1E30DAD1F73D05D1E77647A6D5 673C6B83A012B15F373079C30E72523B591D29CF5F7615DF4B5F6726915A5D03 6D8233D313B1F8DCEE93FA749EEC483DDD9AF0FC7EB8C879930BE3BC58515B84 BEFBD90CD57E8377E2EB2984DF2B1BDA6A6CB3926BA821F58F9BCBA8317C56D2 6D37DF6AE562900695DC31004AF4506FEFDF6E8D5804A63A59D176517910C784 BDD6B7729337C7668EC4E393FFE08A158F0592B746D6754F5A97E4312AA7D376 A29C7D43BBBB8DB4CAE338FD76D8139D6D97F97F95905909490B48D37B7BBBA8 D9A98555961E734822D846EBC665DE1792F0F0D942BD7DA2D8DD9AB29470AA75 7D3078C021DF4BD24F5CC9B12F0C3D1DEF9CC10B47B7A12AD9558742B47484F2 DEFA8B5077ED0191C15E89FE58490107733572AA95D643F4FBA761C5AF8E0D6C 3250D597317FE0BAAC5CE4072E688B388FFD7D7F6D1792985768AEDD8A20255B 44F26FB215A666FAE804204C23472876169608AFE831886F8EBBF3F84A9CB38C D80226FBBB3C2B60EEF75F0E2C9A9A30F5618D13F0DD84B36F4F30A211896FA5 858248862E9F422E9E31231DE72A628EA00EABA81C59567D86F0E66BBA8587D8 A3A0133BDB30C74F2652CF75C7F247C7F5B01ACB9E8F892676A67CB7FA879D9C 6034BD216AA626EEF69C718CF5AE2B9215D949FB4566E39169C803A4122D7D8A 2F5D2A7B903E7A5013EEFE0558D472CCEAB9827620333E4B44BF44ACC1CC0E8D 689C9202A9E972D34ACBF7A1C7C97EF057D5575957272934E0E5800153C8DB88 E771DC89C0407DD9C806EEBF6BAC5A15632C1A72EBB047F2C6C1583A2D4F8F08 58D680B3F48738CBDC2E4E81B0BCE80470960073B5B0F69C62435F10FDD73C06 80A0FCCD1B3BB0629A62F1EFC982C4328B6486FC222133091D4AC153D72C3A7F C1ACF5B02AF85F63590D95DFA6B1F887B96505AB280053663AA8E9A0A8D446F2 CEB9778334A1C8469F5DAA99734EA85DFF2929FC6C1CDA3D1984283D4F3C8E5A D3DE3D61040654C0958F49FE50F737312B1B8B53FD77EA34B8CBE290BF448661 F76CE5533613360094C37932A6A7AD06E63FD8D02B359688E345E548DF53DC86 B16692D707E2901C0721DB5BADBFB271A7BF00F2F3F0EF70918E322E4F343CEA D18FC6504C697E69EA7D6BEB73EA87AD51AB32BABF794F1B22A6955B6455C114 9A438671F30970682719974FD0B71B2B4A699D0430027B3D3E6D8478CE522408 BFC9FD0A559944D24955742BAFF646C98004AFBDD735D457CA34B400B5D5D14E 55466E7F6476C54F49D9C240917AC429E534C51C92A9B4E52F5CCA11E3E5D3EC 6A0A28B39C2C7AC684FA169914A7ADDA925851D8DE6C750222591B9D98E4A209 0ECCF91AA890AAB75CF3D8F0651DD9440C5123C7F81446112B4B556CF001682C C660950D870234A2E96B373C97AF166027AFEB6697748F952C87360540B26105 E958B8A1C306BC1CEA926496C9ED819AF00EC1DD7AAA64E6EE21BE8A65A99CF7 86746F3D155D79AC812E1F2A5CF3C6F5FB9716CA5C9A8AC7E580522C311B2990 E289ADEE82099F2187F37CAEE490F807BAA4B520977A62DD017A7CF836CDE5A5 6AA4A7862E11757B5D67A28BB35E3989BBDA1AE77AB80C7E33117D6A9A353593 687B60BAE871DDC7B0E9A10758CFC7E3E972B51A8F1DD50546AF7C498EA487DD FF5E9AC8D87F2485A4E680909C07CED7254B5FF9E5433C3CFC55286B1431E39D D4912DC8BECBBDCE1B7FA21AEF907D5CFC56685FC47116F7F20629747F766974 95D75B64D0A6657FD0CFE9B56B912E7FBA38AE10EDD1E8C427772EC42CC100BF 5ED34DFC3093EE90D7CFD9E2ACD55D1FF31118B86BFC8ADCB490499F71946C1F 57477E88574FAE17B4DAEBFC8E100BEECB1E473C5A2F882A63F61B7826C3CA7E 44363CB33E5D8BF5E88F27F626B3EBB0C313D34B0BC69CE395DF99983E35D77A 2193C441E0107DFCCF424F49E3C7995B8A2C6EED7ADA45A1A33895E07F9ECE8A DD91AA4F5758CC030D3BB0D7C2E86A1531E9F1EDE5AE52F12AF9E91EDF021030 6E69FFE765CE505C617E6ACAC1B3D2021F1DDF82B3CE0B7E9A68EECD246AA818 2BBC9992E440BF3B96384125EF21BF56BF673D0256BF647CBA2A538438CA8292 89464AA423C9438EE2235BFE98B57CF89B1B1CAAAC22343324A63F913D1432DD 44FDB2E1F60FB78653DAF52BA657E5A48DE5FA5B4A419B83D52EBDED19355B5C FE6A57303C33413039B9C074187F2ED11E52074A6EDE22482DF46B624FA64A70 B2FDCE4D657CD67EB327D5ACA3460815649AB144744DA5C51BC6EC5E94B3ED1E 4F88997E850E1ACC9544239CA85A7D5C28EE249B966081BCFDB0D51B81EE6D56 DCB2FA5AB76D47BA98896B0D52934577760E231FE276629D9BEEF1179CDAE173 BA3E480FD2E2D1AF8D73509D1AA108C56E668E8A7EBA8B6BD4FF4CA54FF2D202 DE60493D82588C215EEFE423619700C3FD2BB73DFDC0CE2EB6EFE7C2184657D7 33692854C0DB7DBC388D061CDC20060E4076889A01D0FC9D6368F0227FA1183C 3E68DD3AE54B28808C93FCEF4F7C0B3555234C1B700EF5F9906B871B2A33F656 74FF5C9BA74ADE3B7DD08EACFD8252E5F7E00349EF090A0CB375E8E16C035BB7 9C25D612AA75843EEC123998AD8AF43960D55DED6653D8E881C6D6B6DE9624C9 6E9FF1D74AF8B3BB39CEA0F74E13B65A171F1816FC514A32D56A0F6D2947EB44 FF916B467361A185C9D3337A26901BFB6137903D9A89359F3DFDCF4F74FE20ED C37A1B1FA70E64B910E9E234F92CC6AFB9CD343E14C360C9A4D8349C125ED130 EE506B5E53C74FD4DB539C4038A5E99CAA46429F02E3DD462F5D2A078E2E8880 3AC7B4618454A08C8B3C994489449A5DA7ECA6B80FC084053C65B4574A75A1A7 4A9E7F86FEBEAFAAE9EB8F10B6FD73DF6E6B1638CD6F73FA2B3AFA49EA56A2CE 751D167118B3073746FC301F5E5F97C0EAB8B7B5DF5BB27958312CE8792281B9 D62301C147101F32634E7730E1697F6C76FF342770D635F417B26682E70FE88E A5178BC9F1604681EF2E5BD37937B5EE0AFDAF9845F25A3454F30BE34BD516AC 7E104033A567B4445B5BD6ECB3D71EF454E349BAF12C059A90B9BED8A006CFC9 A927BFFE206AD54351CB3772A33A83EEFEAC789492C95A15CF6ED00C9016E642 3D474AAF77F5E968CED1637F7B96225C7D769FDDD18B385E78AA60089D2BE218 14F2E47DCB504026811C1E1966754072525FC8554943EC9817AD0A7511F21CBC 49BA61D493584866C5FE4BCB22000E1F72D6320C7A6449559A9E085C10C3C1C1 3C69C0C355385948C822CB4CE2726DB4A78BC3225FC1EDA373C64DFDD4F3A932 C99C34F0048A3C8412B0660BC8E435D8AA311487E6766F203149941CE19B48E8 724916A0250AEEB0EA527CB9D7DC48EC31BFD11190F329FD642D18A4BB0E01A2 E6C59C2AD964A3EDDAC052FB2479401777E6A5AD02BF93FB0D3D4C02B8771CFE 95502A45F1E36516BE1715B4AF4B73021771E4808E5C95CF68E472DA9DD4C429 936DE6A73825DBFB6CBFB3287A2922926B80CCB38D51612027440CC1CF53EAA5 278D9AA61490D705A0F4F912C72EBC8E8FCF6A51AD580D483E3C5B830AB6A41E 4DF559E9E61B92D183B62B7EE4DDFB9AD14F244B19F6467B2BF210327845F1C3 B77577E2E2A206913AA4FE0D5574230B54936A34ABDAF521F64DD42274A8DFC2 46896952479D9498448B59DF3B31A4BF20AB11B425DF82F11024A09AA89D9BA9 44E7E118D80E61DBB935B2EE788E0A79FC95BF18E264413186533EF5F24C4518 BC7C75E83E12660CE2B2087851BB4DEF2263D647BCB2383429FA0239DD08CC2F B60EBD65000D268A1EF12570FD0777405DB67FAB4529A3E4C4AF4093FD6A0A66 5684568035B9B6B39C8B7263AAB848007FD44692A4D9C1DC972CA488D8979F78 D984BBBBBA63594EAA2147190E82EBDE64C2B4116D43A9809A2133B6F79999B9 22FC69623EC865A27A601351B1CD9F2534FB692DC570611FA8C87EAA4380637F 7939E2ECF4DE7E78E253AB42DA597D724ADACD23163F41DC48ADFCE89E241923 4F45B563D56816079967D165BB8E6747CF9C2CAE63438D6EB7AFEFADA73C53A3 524B8F33D53205E2C22C857836E2C71A87C3CE545814EDFB4007A69E5786B8DB 54B91E072C602898DF9CF4D93AB699101220A7B7A68192BFCDAB82947F7E1A77 7B5D8B2CABE483B87D0DCE7C9AE04DBEB4EC3ED1C74BC5B4ACA1EE89E1F879F7 89D81AC3BE8A1F61C0F0316DBD0363D193149EBA185CE7C561DE05C3E3FBBA9B 9BBE1C82E1D4BFA1F38F7CA850D101BF3C4B6D26D981CC71C7C9035809D17297 3293D1C5030219DF943C42B8947D2D8DD8E1D63EA94F4E1429FA6AE178D317AF 242D813B967B677CBEA4197A3418D647A90BC15F13C5E448C74E6D3563D7399E 8EDA835684ED87775CD3955D69BA7E87A5DEDDEB53E898A30F9ACC5707067968 90091B8862F83E3214191165AC4FE1F820A8DC9301A12E0C9B1706F0E655AD9D 3863E0D6B5700C23E47F17ED9F8D99296D4B84CF381C5BA776D5C210D193D22B 43ECC441368D803F4DF51BB88721F2765FA2DDFE5227846AF185745222E10BE0 95C282B5BE11FD21DD470705221403C776CD2199AB378A1B808A8D8378B554C6 41FD8C08EF663DC9B69BE65E4DA7E784D5C009E5F5E339DE43ACEAA8606ED98E F88C13CF6B104463E048B405BC87A01C776CE1E6DD3BD14DCBF84C4F04F2DC70 90B8D8FB1A7C23829AF0B4AEF88FBD330B5CA2C122FF88D5308C003ABAB85CE4 283382B16DCBFAA56FC90BEC0390D4E9D159B27FC4359560F0B3F2D2A66E5957 451D6A81889B299614E39F6F5DC8D2CDCD2AD0B2045804304FE4093DB8024F49 095952867EE708A43684090C3C08325950E5B6E31614FCB9BE4530EA4F7C85AB CEB8DCC3CA496E59DEF5F4D159B576C67D0F4E261D67F8D63446643C4AFDD11F 2D0B1A625F93E45A43A507D6137AE4D25A6AB887BDF403CFCAA4BE8B4F3433B5 0492A4E82FCF71F0F81DF6CF1412420BF8B7B74C3510E4D057A6490BA235DBA7 E2EAF838F9F6338EB93F5A5EBAABCCC73612D0EE7CAA32FBBC06F269D44429FB 9C9F270E8A461ED57EFE97D5620F357B37031C17DD01C129E42B7C09BEF447D6 363162F1A326EF50C9339C532FCA859F155ADDA8A614EC8E083863D68084655B B9D22E3198EF1476E7179201594ABF6AB55D9C58D3C27AD95A6ED28D89E30A0F 00896350907820CFD6E25B7B6A8D45614E3D92AA93D6795ABF514A58F1512D31 C97E1588372BF8F0D3A25E86926EE1F546A1A9049F01186A2E057C26730B2DDE EC28EB6A9F6A29EB6F6888C822AD5A1413FDA1990737E554056ACAA6358B8894 26EE5AED75B3582E857A487A954390629DAFB8DDA976CA79970C1486F80C7C11 F4FC26EE0B8B18BD9AC1ABC684E546D2FA829DA2BC619EA1BDFC27492CC0CC28 C232399559A1D5706909228BF0CA06301B36B87C0B5C761B1AD05EBE4A7FC4DA BE7C55BD3ABAC5095192FFD33D441120A6560F12D886AE15B0B1FDAC9730A7EB E54A1FAD362ABFCF5B72EEB279A86A0495B78A8FE5338C3BCF5F0105C66C2674 1DC8919CC9BF9F6BDDB04F42D18965C6D1C525E3E45ECE744F722BD6EA835732 DD72EEC69CB42B634D5FAD83C295B184110CD718BE52B7BD4A170FCE27ABABA4 74B32012F20F359D3F3D0C1818AE641D5DC4722221609DC3A78E826D68061EB8 EC734E42B9469B715D78CB2BE74E1599A47ECAE1234F8D278633FB1EE2D83B52 A7AA6B7E588819CEE90BEC43EBAE93E511E4BE18436657F174C2ED5957590800 F35AD6671FC0A352B1562E042140D3668E1239C90FF717CFCA0EA4BBF2679B86 B179F2717C27263E31DCF3788EE038D4C6FEFBC918C5313546C8AEFA73FCAB0D FA055D120659BFD99937CCC34D533A10B67BF498E2A52E9DCCF38ED40F7FC380 9F869127773514D198C61031EC04E916126227BC4611B8528362C78429C897E5 8943F4B4DD8C590FC1AAABD603D9FF15133B1729FFBB1A2B0975BFDA92A30CDB 3C3A59B7A6B5255460A7AB1F01DB3C651DB95A3FA4D79E8EF704954A8F52343E DDF4AD0DC6FF258118274C23A470844E58385F135D812D1EDB742CE6E33855EC 53EBEE6F4BFFD48A2230CBA4F30DCFC8F86037F942E6A253F03C2711002FF4F4 7027D7D1C0475487527D316FA6AB9E1B1D04A56E818CCC1D106BD5D9D2858522 92E832FD5718FBF7EC656CA84FE2B2794DBEE834BA2145EB1148FC5D57E818B9 B7AFF6D2F2B0816C301175E6DAF7F276FF495C0D0E647F4028C94D9610EE2B7A A81E66E07D2A9726CD469EDA81858F8C269797EA3A8CC018B7A6C2DBDD71E261 90E903120EC01015CA59F444BA8D7137D57E68672C5CED88EAE80FCF9E67C3D7 9B86FD5734278233C8E264C53C88CB7BEFE88BCC5384095154E3FC528520B6E8 94BE6C714F9E8D97E2EE980FC6EC8AB86006D9F9D24F90D58BE98982ACB96F71 C2D5B94CBB00AB07A1B132606A87B1BF710C9419EE196753E24E544DF7EE0766 D2DCB7CF6A2934B96D66CDE5CDBDD23DD60F163217F3372138E7B8A7FD206843 CA23986600CB3CB287BAFEA5D94479FA9ED24AFA727EB872CDF44C43E870E43E 0C9688D426F0C86794ECE9D133A7C32229ED93313AD008730C3000D053962330 C8D100E7F5FE25E31D0C590010427CF42A6AA682AB43A082B52EA29C6C5BEE05 2D69BD0400954CEF43016B51ED03B80A28A8A427A89F099EB2162E688373D231 E7E9660ECAE039EF1F61CCE716589A9BC2DE32CDA7C2D72292608975DE5B5F5A 41F6169DC5A8097530BB4AB624ADCF9900247498756A91AF1257A7C980A5272A 3C6BD101D2706E53202682D16518C0B9B221A90EAA867ECA1FAEA87205AC8648 413801CA4376CE0C7EB38A816C54402513E68A0CC783B352F0D5ACEB7E7F344D 557C8E732E089D7329DD8ED63F2A22AF3E66914F8907789972E8D5CF72865E68 43783B11F75566F28081B5B74C56F44C05BE7DF015143E9F05ED154EB1CFDD7B A99F2F535A258A9C6C0E6E0A2D4B91DF0CA6284C5EEA3263C3BFEE493E21F66F A68B008DD39AEEB566C4F4FAB93E8172FD9EB0E00C93D057534C2FC2DFA4E92B BEB8F33F1B685044467019470184DDDC1EA9A16F63DF5BF240EFC7B3DC53D8F0 8C2C168C317757418EA33ECC81B136A3DAF4A7625DBB9DBA43D053364B910BAE 537FE379B65ABF70D6A5DE9613FAC4 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 cleartomark %%EndFont %%BeginFont: CMR10 %!PS-AdobeFont-1.1: CMR10 1.00B %%CreationDate: 1992 Feb 19 19:54:52 % Copyright (C) 1997 American Mathematical Society. All Rights Reserved. 11 dict begin /FontInfo 7 dict dup begin /version (1.00B) readonly def /Notice (Copyright (C) 1997 American Mathematical Society. All Rights Reserved) readonly def /FullName (CMR10) readonly def /FamilyName (Computer Modern) readonly def /Weight (Medium) readonly def /ItalicAngle 0 def /isFixedPitch false def end readonly def /FontName /CMR10 def /PaintType 0 def /FontType 1 def /FontMatrix [0.001 0 0 0.001 0 0] readonly def /Encoding 256 array 0 1 255 {1 index exch /.notdef put} for dup 11 /ff put dup 12 /fi put dup 13 /fl put dup 14 /ffi put dup 33 /exclam put dup 34 /quotedblright put dup 35 /numbersign put dup 36 /dollar put dup 37 /percent put dup 38 /ampersand put dup 39 /quoteright put dup 40 /parenleft put dup 41 /parenright put dup 42 /asterisk put dup 43 /plus put dup 44 /comma put dup 45 /hyphen put dup 46 /period put dup 47 /slash put dup 48 /zero put dup 49 /one put dup 50 /two put dup 51 /three put dup 52 /four put dup 53 /five put dup 54 /six put dup 55 /seven put dup 56 /eight put dup 57 /nine put dup 58 /colon put dup 59 /semicolon put dup 61 /equal put dup 63 /question put dup 64 /at put dup 65 /A put dup 66 /B put dup 67 /C put dup 68 /D put dup 69 /E put dup 70 /F put dup 71 /G put dup 72 /H put dup 73 /I put dup 74 /J put dup 75 /K put dup 76 /L put dup 77 /M put dup 78 /N put dup 79 /O put dup 80 /P put dup 81 /Q put dup 82 /R put dup 83 /S put dup 84 /T put dup 85 /U put dup 86 /V put dup 87 /W put dup 88 /X put dup 89 /Y put dup 90 /Z put dup 91 /bracketleft put dup 92 /quotedblleft put dup 93 /bracketright put dup 96 /quoteleft put dup 97 /a put dup 98 /b put dup 99 /c put dup 100 /d put dup 101 /e put dup 102 /f put dup 103 /g put dup 104 /h put dup 105 /i put dup 106 /j put dup 107 /k put dup 108 /l put dup 109 /m put dup 110 /n put dup 111 /o put dup 112 /p put dup 113 /q put dup 114 /r put dup 115 /s put dup 116 /t put dup 117 /u put dup 118 /v put dup 119 /w put dup 120 /x put dup 121 /y put dup 122 /z put dup 123 /endash put readonly def /FontBBox{-251 -250 1009 969}readonly def currentdict end currentfile eexec D9D66F633B846A97B686A97E45A3D0AA052A014267B7904EB3C0D3BD0B83D891 016CA6CA4B712ADEB258FAAB9A130EE605E61F77FC1B738ABC7C51CD46EF8171 9098D5FEE67660E69A7AB91B58F29A4D79E57022F783EB0FBBB6D4F4EC35014F D2DECBA99459A4C59DF0C6EBA150284454E707DC2100C15B76B4C19B84363758 469A6C558785B226332152109871A9883487DD7710949204DDCF837E6A8708B8 2BDBF16FBC7512FAA308A093FE5CF7158F1163BC1F3352E22A1452E73FECA8A4 87100FB1FFC4C8AF409B2067537220E605DA0852CA49839E1386AF9D7A1A455F D1F017CE45884D76EF2CB9BC5821FD25365DDEA6E45F332B5F68A44AD8A530F0 92A36FAC8D27F9087AFEEA2096F839A2BC4B937F24E080EF7C0F9374A18D565C 295A05210DB96A23175AC59A9BD0147A310EF49C551A417E0A22703F94FF7B75 409A5D417DA6730A69E310FA6A4229FC7E4F620B0FC4C63C50E99E179EB51E4C 4BC45217722F1E8E40F1E1428E792EAFE05C5A50D38C52114DFCD24D54027CBF 2512DD116F0463DE4052A7AD53B641A27E81E481947884CE35661B49153FA19E 0A2A860C7B61558671303DE6AE06A80E4E450E17067676E6BBB42A9A24ACBC3E B0CA7B7A3BFEA84FED39CCFB6D545BB2BCC49E5E16976407AB9D94556CD4F008 24EF579B6800B6DC3AAF840B3FC6822872368E3B4274DD06CA36AF8F6346C11B 43C772CC242F3B212C4BD7018D71A1A74C9A94ED0093A5FB6557F4E0751047AF D72098ECA301B8AE68110F983796E581F106144951DF5B750432A230FDA3B575 5A38B5E7972AABC12306A01A99FCF8189D71B8DBF49550BAEA9CF1B97CBFC7CC 96498ECC938B1A1710B670657DE923A659DB8757147B140A48067328E7E3F9C3 7D1888B284904301450CE0BC15EEEA00E48CCD6388F3FC3BEFD8D9C400015B65 0F2F536D035626B1FF0A69D732C7A1836D635C30C06BED4327737029E5BA5830 B9E88A4024C3326AD2F34F47B54739B48825AD6699F7D117EA4C4AEC4440BF6D AA0099DEFD326235965C63647921828BF269ECC87A2B1C8CAD6C78B6E561B007 97BE2BC7CA32B4534075F6491BE959D1F635463E71679E527F4F456F774B2AF8 FEF3D8C63B2F8B99FE0F73BA44B3CF15A613471EA3C7A1CD783D3EB41F4ACEE5 20759B6A4C4466E2D80EF7C7866BAD06E5DF0434D2C607FC82C9EBD4D8902EE4 0A7617C3AEACCB7CCE00319D0677AA6DB7E0250B51908F966977BD8C8D07FDBD F4D058444E7D7D91788DEA997CBE0545902E67194B7BA3CD0BF454FCA60B9A20 3E6BB526D2D5B5321EE18DD2A0B15E53BCB8E3E01067B30ED2DD2CB9B06D3122 A737435305D42DE9C6B614926BFD44DF10D14402EBEDFF0B144B1C9BD22D7379 5262FEEAFE31C8A721C2D46AA00C10681BA9970D09F1EA4FA77428025D4059BA 2988AC2E3D7246BAAAFB89745F0E38580546045527C8779A254DB08DCC6FB9B9 0E172209FBE3857AF495A7F2B34BC895A39A30F903DC6E3202D29AC110D868F4 7184CB78407B8B9D42F6375F67FD4B828592E4A977B9E71854D143CD1A9EDCD1 767CC2929E071FBA4C3D17500E28A23F697B5D5CC68D5F56EAD14BD504E07182 3FDC12F5404E74EC1C02AF00C1A6A17F958770ED4A024F5B3644DEFB61F2578E 56013D0B4E7CA3AD255E23DD63369A921D427EEE0E098E8148B16E8A5613A8F8 A5F1099E15AD16EC554B644DF306F0CF3571055A81F1B464529DB49E919F88E7 581066BEC4765E31BBE28C245BBF0B74610DBA30C63A71A4F3B60593A6B41C6C 636C980828CFE9A3362FBC02F1967F0F770A4790F90DEF9D56E0A76B0703FC58 2841E6E8D984FB476D4FEB960FFB6B386EC6CBB9EB83704B0AF63F38C77090A8 DAA165E6C6BC86601B14F8E9F504A9D578AF05128D8C1BCEA9D21057958D5DCF 63459352EAD6B4A2A666CC5D85855641CB31507F9E30405977B74356FE985A6D 541884CB65A4F5A8D4C82CB9D82846CC510CBD243E98A0011AD37A81047021DF 46F69D7C3DFAF2F10F1F0CCEFBE12EB70420BE90C450975434E223C67D24226E 8B62BCA6BF93B0B1373AF55E4ADD92775B2DF199B6599CB02DB64B2D6160BEBE 449C057B5B2D226E0F5D7CFB5C9A4A7184FB29A595E91252AE787861A6331FC2 6605C995D55120121CB463473A7CBD22F270D56CA8E0DA99832A468D399CB9F5 A1CBCF0031D99F3C4F4B78A0944BED5A7B1AE23E3A66EED453917F9296077306 06CFA772BE60854A30885DC5FB8417E0D3F7AB45ABFE186D877A377F5D17DD35 0FAB81745294E35A5DCAB20321C6ECAE276B63BB17366867F346CAD53E06AD96 091CAC75465BCDDFDE9C4364B2A8EF496C4CDF76B058E4BC1F616F6CF62FB60A 64F81BABA7A729B8CF679CEE01B1C985558E8D1493C03B834F3696E5511A1917 2AE7E16AA8FC516CD2CEDE020BC5777598165B6EF2310F4DBD54FE14071101EB 47F4B2B59778B1EA7DE13ADF46393E07DBE2082C2487944A71CEDD4ED7D3D877 749D2500636C3996A34EE0CBA770F6B6A655DCB9840AA8236EF3F6182E1C8997 395077D9DB15B9D0A2DF9A3F6042C94E6E492C965E4E8542AC4AF5B21906B6E8 4AE2B01C0810E38BFAE99DD83EBFF8E145D09F763B6B134A25A1CC067C6DC1D0 7286045CE90BA968598D83E5602ED96C72A424848E211C028CB344D95DA04ADE 4C5DADCE9009A72B6EC01E7B5CF8C52BDFD2B416F5E1833F514659D94BB2F452 EC4F2E65CE71AAF79106A0468D76D283ADD44D7DB5760AA429D61C1DC2E912C7 9446C19557A1D12E7116B765BE522EA166E8F0B604807215323DC5C2DB1F2E05 246873CE189E03FA291A961E4AD90563A8F7B0E08A67DE4CB3607C6ECA114DD0 DCE97976E208615F3CA13FC44041360086A4A173D5441D9C33A38013099F73E9 0FBC96808F7442FD4D56DF7C4F2D4C9B2301F7CE626B4C6C1617B8F1584DF195 F92FC6385070EB02BF2541307E4EA34C131815FB9028C118F4B792C4338F02A0 F6B5FFA3E4CD9AA4C95E7FE26CA24BB2B34C48857055B8EB53480A6CDA79B587 3FE3E719924EC7D32A92D77221F13F3C4ADCCAE9A13BCFCB5FD72DC40F90F396 ACED5022449E600D9F12A63C094F3E26531ECF9AAC13D3FD80F25E37A9FF12FE EEF0EA34D23081DE8674EA19431153CEC8E96702138A31C19C05246995EDC3AA 6C98E2316BF65DD696EFC55816C09C7F969FFBDD771250D41657BC81F95A6D6D 9FCF05E485ECD7C6F69CD8755197834EC8DAB8C390F161F74832525690D5A443 B2E63941267E719C53CE707F9C0B7FEF30A238A88EC1BDB8ED7D379225EF7122 3B7C8CF4C130B89A5DB4513F11B8D3333C4FD9B33CE874C104517553E6DD37BE 320318774481CF4EEEC3E43FFE81EC9C5043AA9DF67293D72FA76353412F321D 1A80076C42EE240D3E65912F94578B8A2B4DA42880469451907FFEAFB59F265E 80AA5D5C32348F9B7CE6A6855CDEBB4990938417ABF998E4B433556BFC31219B C2D8ECA502C967DF8FE4206274E389B52AD065E9AEDB067F2E6595D5989C4788 41BF327A1AF644D3C3C1426270168E28CF38AB046EE4893970D0566367650CE0 9656CAB7CE1FB66A23CD3841E0F37D4DA2BD4520ABEC9B781A2B9E934B50D554 BFFE5D2EC1A5D1FD36B1208365FBE15516FAD517FE5ABCB086DCBCEB50B7918C E324EC58BC736F594FA4789B528265B51B79B486AEC5252471D5EAD0C552628F 988EE219BB95D00123D475E96A268E8793B053343FE518C86FF4A0371D394E87 9CD9890B65DD3B714FF8AEBEEBB77FBC08B867B64E4086FF917B8AA277E1B3DA 65E05E5BE4941717FBC76966656A5EE7CC4E1488ED1B4388DAC813D1D25C1308 1B220AB8A036DA4A3104B552EE21330DC917B9458699100283BBED7DE5634B08 E1E8A1275815A358B4C0D3787313C850999DF7330A5165A70BB5B5104415A5F9 733160B501075FC60DAF1C8C6DA3A674331DDE8854DE916DDD0491906F4EBB7F 6AC56C4A9D6132320E2E021CFEA843F7C56203E943D3A9B12D8321EAABAE3580 BD58D81B6C551BB86D2FB83A3E6B4924EE0D07E961E5235E7D473647322CC62C 69EB8DDEA11AAED833A80339E58330BD4AC7BC67B692ABA6A34D4D2D7A1A279A 4591974DF964E64592E3856B6D72B26D6E16241437159F3A09A5F30A43600835 30C76CD71780CC61C31DDE51A144E6E656F62A579D808F5FA729F1A66382EABA 98B6E376765D96FF4015BF46B3314B72C007A8DAE08A2E29F3461FA56B4BA6DB AF6AC06F4C94FE3F2D692913E13F99B6AFABF801C0119625C51F8015E35BA453 E58AD266F5BE4EA6E839C605AFCA7F11B673E51FF62A17D6BC824119A89599F8 6E04D3DF374382132A2F1FB1F9E307DB10AB21E627C4356DBEB97C0A6205AADC 1122176F33DEA813908601A242263A845256234C6A3C9242AA2811F9E43BAB93 4A024BDEDA3CB1E7DBE07BD210EA3341582B6D2A1577185C01E6F38CBE50E63D C50C27D22533C60F2FA74E15A9098F5B0AB07B31A098A88C9629F2BFE3E51379 F443E54F4AC11B6134C39EA3F16B0AD01160792AEE382FA08C171DE8FE8D78B8 BFAF4B630DCC09B8C548ABF9AC0ECE250D4F18F481EFD5AF1F00B23DF090B57B C57825A72FB1E529CAC192DC16ACD2D77E8FC158921B4E9073108E69D69E191B 7E8E1840F83F758C840A0DA59252EA309DF1828E5C01FB9528AF8EED2A5DBCE0 B98CFAEED4BE7BB81293E49C382F8662548F7CB5579C809007E665A50BBDD51B 2CE1756BA9E84AB65F970FE5E4282417D5006EF7786C02D0817D3841DF95E00C 87CA35863F66C06860C9117A4E7E5008D45B70584AE3154BFDCA49006E9548C9 78D25EB10052885AEDD07F8A050E5A64C5BE3270EA594D79CCECC92996C2FFB2 E5FA947080F1EF2335799A8DD8BFA215877BE32C2B5A633153F1F8EA8C93B836 2BA3C7452B8D0AB8E6EDB16FEEBE51B64FCD0601F8F9FA99EF4241CEB58F8291 28F21AAD148D8D681F84E51F5A53F6C13E5CAFEABB18CCF22180C0B911A37624 E25FB908863CC80ED9C93B93AA72997D13FE0C71F0F38F274B638D461A441421 4253CF8EA0F89FF54F775FBAF2540C02E895D0BD75B6F03DBB65124BB41F8743 FBB668587AE9359136D860FC3E09458570DE498CAEB9068F44BBF24C77D46395 96A3F22907F8A0C508C083FFF396ACFBFB26F6FDB2F28FE49053FF2FBB643CB2 50B37C1C917466C323ADDD9C246DF9F7D7B4AFA75BB0571D5DEBE80565F81ABF 02EB769F35EA6E2319FEA269303A7F72F754C81311A5A22F6C4927EA2B1EC35F B804811735EF39249E020EC76AD775FFE4593CFCF5C6739AB35528E02C863668 48AB1521C4FF943E544E42E33DE193867A715D1F6ECAD74F1F5890369D6A1375 C468417352E9765AF21B9C0822494026EF63D63D5BB61200149FC2AA8F7CBBCB 7A7D5E7BF9EAF67987DE4F41ABD8B52D9978C70CCEE6550B42D14A6DC5D3DCA2 2AF30D02C0732B97A1E818C11C4818D35F55E45EF64F74C5BCAA9E58B7686DE9 51A29D0CF5CEB3AB6A1F280E893672BE474A173A6AB7E11D3BF82641AB1EC067 AC9F2175B1E324F9DB03DC91928081303FAB31002BE72A3541D91C86B3FB16CD DA1F9440D6E67951640DB487D9C14B9A7DD41F2F450026CB7B311AB3E578E513 CBC2DEA9E8442DA882001486101C232581E3C287EA8B1B045D594EF81A715ADB CCD68BE8EE8288D4FE53F1720A6E0F25FF0BA9B85D0BE1AFB9CFD76EADC35429 05FAA1D36BBEEB637B9514BDD2DD2C0C4366597F4A6DFA681F6524407F0082B7 73F05A553A57C15855D524588D46DDAB160AE72C99B6DD13B820B17A807DC197 7CDC6D8F5141167915F8965A57DFCA7FAF941502F6C00A1CE8AE03C8382D5041 3F0400089F18F9F8437D0AF632520F94F4BF2464B50A1AB0CDCD94F8BB75EE4B 9150F660BCDBE851879ABD99A35E9F75E52F859837B93410444E8E58CB9C4B9E C7518E7AECD56AA1B04B3E89584919B6A84974A4B8F01F6B2E9D12F13F913479 710046D5AD2C9862B71E9384969AF640436C630796A0453E9735FE8F96D3CEDC 7FCD4A0DE65945A0205DF90B9E7FD31A3020B6E87756C41CBCFAD1B99D910E44 7D4E55730848EAA86C349C6E4051E7CCDF94DAE8E38D1406696C2F7B312EB45C C8AE6400CC1B1E9613726751F1B66689F58DBFE9DD4435DD20D3164CE9551382 0C56E69322D6A55F9F84A67944A3AF8FC8A0FEBEC541B24140C17510A35A9483 FC9916389A93C8A6E7204087D167C15A3B3CD306B5EA0BA1A652FE4C0F4A63F3 00C706FF2069B4D1A74EBF169D3E550EDFB283EBFEEAA6BEC1161A363E3791C1 4DB5DAC83AAE1F922427127793255A482A6FB51E93A36ED4004D32FF21AC74EE ECC545D1D9CB445C23FD6D3AB380E49F630A289060FE2F128CFF54F2E91F3693 A9E34F1B0DD6A078AB015C55DC52BA002FB1C597C3CF2A0C1F05C1ED15A173DC EF084B375F84F9749187C633C3A2275BD9AB6C714884ED37C6CB144CE0035343 5D65C2CBE7CC790F4F6DEC3B40999F9F1FA1E2E552AF0CD0F913077E37D8E3F8 2B77C80134B6163034B8A8B54B13D1A75D4E21638188C1403F5376EC67341F0B B69D18331EC9C4A6B85AAC493FBB73C1396A3CAA5A330AD45F074DD0A975F02F A30A31820CF85BAD947252DCDC801992EC112A76E8E693AA911352B32F2C2C79 9E611ADD6329C6E258D293C5334C8DAA9B74247E8E138C377D563A10F1A64BAA 82B9F1E319AEA437E4895502CB8BCCD7EE3046E67A46E255CA5D34D049ADB2FD AEB2725B5C13ED0335CE3AFFF946B913F5000376949348F3541E09A226D8AB43 D9B96D5DBB7FEBE52E13FDF86D8303A4A2753B6F3DF0DF97B885D5C6F6EEE3EB A60967FA4B2FCBE6F039F6D2A6C79422D4F38CAEB72074C704DDA845A4544291 7BEEECF8A4AFE80143FAE28C27DDEB1E5CB0EFB1B017D42AFB5CAD9365A77F1D AE6EAE307026390084C8C9DA9131A46487C410235020F12591168C41B6C4BF2A 5AA04581F532F15F27501295FE091BCAF8641FFB901434AE4847BD08FBD94A34 93B9A0FC241B152E0F1677D1F6A4CC955CA533A4E9CEC00782D9000AA325CA1A 8CBD580A18F9431BB20CEB8120814EEB48F9123279F26F7DDBA577D6F08E9F1D 42339C59A4D913AF2FC11E40632695D460AD1E2220F3E951754FB8807C90667D 6BC9ED16A6B96C2CEFFF8F84AB02B5619B53C9DA4237F2D51841044E55C591D2 F71F94A5D6B098EBEE8F535A84FA1EFF618D9E682F74C2B24F6B7492EE264485 D41FC1B135A3F78F7DBFE730B2862B9EBB76E50647C22B92421355D354C3305C FFE93186364D9F3EBF9100C563388C426FC6B8A37F535A79D1DBA9858ECCA6AB 8B39A321815354F1FDCDE71B64D2429155C97D5906A2F9A2B8854C80045566F8 11E2A2205BB47FABB6207F0AA74F099B5DA39FEABE06D6B9748FDEEF7D2E977C 089F437B42450C9EBC6FE89D876F8DF6E58C20D2B147638252C63B4E84B61FDA 69EA7692FC1369369CBA019D16B6F6D28356835999BCC24DC6B0F0897E798426 84EAE64D0EEEA2CD568CD124810D330AE06D623259D22D2F977D51962A498898 89E0E19C928DCE67DA94C2B0C86CA257E453798DDD111791E29D6A2BBABF4580 1861D8D940D70EA3B431CC20F8A602B67C528381449DC8353343D1F205D016D0 538179F3AC9F4ECBE73D892692DD528DB2D3AF1D31E7248B5A4EA0343556CBE5 B619A19EC1F04FB65CEECC60D7B2C68A1D88347D2730A2819B3331006EB854C3 3A41FD0AD0DCD40235E8585077B41A6AD9678D87F7E14928F74F316BE123DDFC 47811C5E052E82410D52D0B13EA86E20942F4988466B0BA666321848F1B00174 457A338694C9B4115F0476E0B934B6A4F43B82505690836128266B686CAD4DB1 DF53574837271BC9B28F0E8439DFC8917EA393E6B15DF5E38571835A3209EFB3 7841AF4BFDC3B7F29CCD26CD41B14EBA0FB3B4860C4168C88160575983C511C6 45CC50FE11082DD88D9C74B28B72E133DBC714FA1F028C633118850D7282D719 2C7C2EC7CE1685DFED43816A34151A02FD6F78864758903A5CDDD5F0BAC32B42 FE53F2547BA1C0CE4BDE807CCA6E2738EC2C3D25165546FA8FBB46F8FF1E64B4 7714EC2C4C8978CB1EDD6B0C7F9341AD12E63D46DDA9DFE8D2239721E2E2C2DC 249FBD8AB460390D5BD7C3B9B68111FD3466E11BA596E769E39372C3CD1BC8D7 565C38FE1FE65FB3C26B3BF58AFBE54C6DAD2E3E3086B1B39F4BB496F08E7887 A992C7FAE9281E609989EC45652A3A2F13817AEBEA23F7C71077CAB9CF2E6191 F343BAD93C12D420E0AA5F706F917B7119FEA746269144F67AFEE8C66048ED78 0E024635A608692E1A31BBEA0D87DD37C41D4E29B7C36D26539B121B2004A706 999399ED1621854369C0856B5A3602E54FA53488B70CA8F7340F009D69BAB228 2D210498C0632E60DB02546D0A8F28E93AEF943BB8A19D6572365BB9B8786B38 B5A172834A3E651069084CF475ADF6BC436962580A06F5AE5BBE05753ACDF0E2 545E9D7404787D328725ACB7D10E4AFBF0EA921E2E1EB0A2FB36A60B94086554 FC6CF4AEE2E3166DB6FEF1412D5758A140FFE0210DD7EA7F5ED6CAB1064D4E0F B8C5FCD936DA5BDD3051EA1E212F5ABEA7DE611D7019CB62FEC5C97F348FF947 E49768D88B45D2DF72EDD41E7AEE598E3BFF8BE8E6722D3AF05F991BA5FC7955 48F2C7149CF4F33B2B62856851149528F80498EB5A835D02BC7F15137950CCD5 8EBD57FF3BBEA46491E7E94C367856E6F8175864E895FF3DF53E37C3437A7268 DF442EBACDD073AD234E66BDD8AAAE748A5B49C251647F384E843C93C0724F2D CE55E19CC28C2E0975EF4517C8E45D6B794C31ADBF7DA1832F286C9071FECCE7 9E2A81BE0C11B0BEA840775C1F5F094FCD44E22BF193BE278131F6E6398E021F F1BCFAC298C92D1B3B63A2EC163885443D4B0BFE99A468A9586DF8E634AC5EE1 4FEFB7BFAAB04A9A5C21354B37B32A055913422E85D86C13D0CC6407F0294680 FB8BFC01749DF59401C258A44F5B8F9AA6F75910FA93786406D6C28C15067201 56D8C65DC1DDE24CFE365B0CA10698F999263311EE6E3A4C0B10DB6C938795D3 8073EF0652385A902915890966B8A95C081F36CCAD79492E4C43373719E3F49A 816C289AB5E1A3490098EED8D755822D25C97EE39FD9BDE82FBA7D3A7A988A6D B00FE58376F725FF49E9D8D93CAE42AFFB48D01455A8934DBAC290EDFDFC06AF F38139C11D57F29C8D0B562321AC107331ECD505634A54B3F7E7C70278B1578F D4FE9EC16FAA9308DA077E973ACF872DBC9569C30BE9464EF647EE9E3EF7E057 56F95E8FD465FF0148689A7ECCCF65E53DCDC0E3750D226E92CE155380D314A7 896E8E3F079BF9ABDD45E47358DECFDF5B39B5DDF9A62FFB556AF17DEE47432C 2CB8E2B48AE6C4E7099794700D4E33CB7419020AC5BD616C13A53D7A6152C6F8 8BF5872FE600F44A245F884A0E2DBD44BDD1F3E81660C63A19A5E51571909146 A293FA884908938E3B59A33590D870800ECA676A70B97C55A02452AB5CA13128 E68C7119DFCB11213DA64985F54D038CE3A49363249867241246FC2C5DDEC532 1B3067F6BBB1BEA9B359D5FBC186CF19A965DFF5CF117823A614FA43AE5856B9 CFAF6EB0900741D3A2CBA1DF9E5F92503B128C878C2BF35973C8B67F7356328F 065AECFAA6750C633A435BF27EC5A815C5A50733DCBAAC59EA0629A79CB2C55E 349C802A8783FEA51C7254B52C563C2C3952739107ED219CCC9FF776F6BE85A7 0BBD47696B6E2A2118644B12B39C3C47EBBFCCEF7A47FAC7B048D7FA3BDB2EDB DCEEA6E1806791D24CF1A933F97C4E0B4FBB8D8AB396CA6D9DFAC6A6C5F9D5B6 D84F203E506857F5EBE68DA4D3ACE0FAB800673B1CDA565BE75C96348A056256 E4E55820F5A3E92B3B54767283F69B7CDED30F43E13890C28EA5EB8044E781A1 E556B8BC14F4DF6A662CC960CA2D84E4E82E884A2993A2C4F72455E64C82426E A3A06212E274881248106BBA6BB1912D9798CF18834A0B8A6AF0AB7D9C4CFD70 0755F3027E6B8B8CC92C3739550A25B53430E8233A38DC43058CA991BE39A049 E9C4F0738EBBFD64CAB93EB3CCEBB15873CBE1D3FDD0A2010D84772F026BEECE 457DD1F178024CDC317F7A4358415D187907DA789FA3F5CDD2DF409A4F560082 D866BAA86C282BB59661B780E305DBCBA141F8C31626FB8A2D96FE36D0BB6E0C 818A510EC286E339B272D134BCBCEAB20EA54E008749C987843A35E0BC4FC6F4 51C69156A5FBA0919F097703A589F0AC7CC1636BAD443ADBC14D1CEEC8CAAF7A DFC003A9BB6D647564C31C9F8B634F08D902AA74CD31E78BEA3D1F7B48A76EF1 5EBDFFEA47A0AB6E112B0F4E9F8181915C38E764DF5A0AED0C0B6DA0A36C94DF 1E46D4E71FD152F2173E4CB14E2EFF13A5256E4459284EEDCF91BF2D468E5B69 B27E25AA8111D71FFEB0A233BB9E9111767D6A96C37A12E913C80EFFAF872D09 C247B13B4AB649AFEE4052B2A912799A1A64241E2FE836BF67E1FC57C6EE3D89 A60E4AD8024696519E1C831C6C3782D74274E57E11838AFD681034BEA8220243 17D634FBA59776051EE9845E682139F82DBEF57602655D2CEFED4CBA8734EB26 ECD5A8A187F47F9172B837B42DBC23ABC46E37B10AD31A12C78F6FAD29DC33DD C9569882A60C2D47BEA5F1E1FA4C7444A5076BB2FAE7D890BF059E68EA743F14 3DBB31DFE65D661AA351455786DC4956EC6B41720C596E75703C2B3D2A243014 1C7A148BFE8074817026499A35908B25907706F05738206A1927DE3780F3055A 4257D086D5B2C16F9595C0102D03F9227AC82FC961BDFC923DB0ADE61517AE94 D5A6F5CF4692733707A90EDBCE9CF2C1702C891EE107328ACCBF406AE86F15CD 7DA45BE141F59F964BF11B6453CD9ACF6CF8255D3385219FE1F473811BF1A3AD C1236F69DF20A21A2E7809D2D3B4E5C48CEC01FE0BE8A7E000EDBEC6D3BB8635 D88B61038CA583B986C4B8026EC737A22A1323096424ACF1940374D50097B613 F59D2EE1FCCA68247BFE459329CBF8B3946D71515FFD94989A22377F1C614197 A33F4BF7AA477EF83D2BF4C2B84AC30D082DA46B352AB2E4DDF79CFA06ACF6B3 F5B5276CF19AF172561D47A92C392A039E4A0C1602EFE1C2A4A7D12FFA4DF8E0 0D0735FA17211AF8E9EDC44E1B5AAA782755A91C57226130BD16381A96D7CFFE B45E1DC5F25FD2DDF260D35A6A91ACC1D14FE619D78865E5D3CBB766BE1615EB A972648777E55B847487DF5E1542FEAC876B2F3DCE15ADD69130FDCCF8DF2F0A 1280EB86A8575B9716EEA60F65469F928EBB5CA63364D24ACB1061134D4D1ADF 0F5E690C6B098898C1970E8B85DEFD65DADDE104D9486B1FC68E2E6E7AF84EF3 0184986F1C35C71C43BB1E22633D6AB97DCE2AADD8CD2AA6A4BD653964EFE00F 45777F2E211037281C3EE0529B11A53682E7D6A283DEF258FBC29F845D6698EE 9CEF1F691F80FE9CC15B6D49E4E65162F520908B3209C5F56F54D242FCD6FE14 FCCCF023938E9AD1FB75B47EE1CF65EAE507E0796018DACC8ECB7B7409EAC387 DFEC49F88B238CB1F58A988F096C9CD38D4DDF98ED5A1534EDC35045C0126172 7B9687C65C9B53A0BCF38A1AFDFCC09C70338876614FD4B94E0C5ED6DB2210F0 DD1493EFD84B0DBABC54349C7665785D534B0E62E0D60B826B9697A977DE2D10 7AB9C0FC1DF6B9C22374A768D1A83BBE3EB5A1AFF968612D252C38FF1E6DF43B 600BCE109770E4B72169D887D63ED4A99D42BBAC4A6D1040C236B9620A82B3C9 16E4867189B23C2CF3A4C74F2B6BA1A872A99321A2F83E2F4645AB26FCB722AD 69CD91A39BA3B80DB61E1F39B442182B4E5356F910D5D2B2A302D5E0A84F14F8 4A307FEB5F2B7C8AFEBC7E0E11F64E473E682E95182D19C62377CE3925B47D97 5BED80079258FB004E8DD0FAC627FA3B8419D2CDB57B691D4F5747D3C6F82D51 EF17725EE9D94221696AA7B7E22A2B761418CB71B2B022DD7B78BE7CE61D77C7 2B24EA281583002286742650CBE59383CE62A51B345D93A230BA5620B7B99C1B 01A653B8AE03CF79067FA259FB4C924C23FE19460BB276A5BC129BA8D10025A7 6BC48467B76E8DFB656D2E50FBAEEB148894F9808574A27F478BFC1AE5A06CC1 CB9B8DBA1649BAD8D945AC2CE7D42D995E44EA9482ABB7FAA7CCE140F9845344 C1B78999AFED6D23C668453074C2AFF1307DC40C80261321372C4A2AB9A9C2A8 9DBC33ABED76502F09099F2055D18974C2E0FB8AB6749CBE851A4DC97E3A8E04 EB48A390E99C541A59F2ECDC0CB3D5DE991DAEA6AA1368228898C8A69B90304C FA18E275321266D06C32DB43390591CD41DD1E0CD7FD83129E89E3FA3D7D6E9C FA3CC4C3FACEB55817D9D9457B559309A5DF56EDE46F4C4B99BA10C302245D51 F0D9660A99D01B5125349E1390B7D636E49D40A153A291B2B2A881CF8D9D0EE9 5A3AE6EFF61B01D926CA46AE78B8D8670DB0160A154AFA587DAAFDC88B1F07E3 5A09FB939FD04B0C49C891F4DEEDD67C300888829BD13645D1F3131C97CC39E2 4B076A76FEFA86C65BD3AD836C70FFE6239657B02686D4CF2EAEAE0C28222ABC 266508088A7A14C4F973C648C5EB3740144D6B1FE1B99CA2C3ACE458800C33CE 10EA2636874D5DB56A15EF7A416903E830F8A80AAB5A324D55A90B5133B750D7 15F6E7B057AF8861628364A577B0611D3CDA76CD0D1D0494FA66929CF31F0281 AD662396C8E6B960E63E454B1FEB22DAEC770F4558CDA9A88EF7528C8BAD10D8 400BD93BDE9DE519C516CEC04C0F4A04A2CBA8B20EBCA04E92427FD53C04BF6A 089A5291366162BCF9BDD5DF7D5EBF2814F62E440CE1C9A4545559D0805FBB15 D1478B4ADDB586ECA220567426C04EE77AFD804EAD66495589BBF59B99CBC118 FB84AFCAF626F16A0F9D3306F0D32C98C19A9D24433B1C0100564B3B67A0CD76 7BC54463440766C923C660C521ACA51CEC94F8426AA3F014B86C2818B61D68E8 27B1EF085993D82E66CB100AAD4B6F1F649D8EFF6AB9E70595CE158470F6A2C9 987A4EBC5CCFADAB433CC914EBAC83E6877C3E2FF6FBC7BA3D27173A5C3FE3D3 849C54452CC6EC6A49EB4888AE8704CAEBD788509DAB1AC5CF42F600855E068D 81E4FC6103002D0A3958665CB0C925FBB0DFD793573481ECFE3C47677BE59D1E 87753B9A476D791EC30B3271C26D164282472B9A9700B7B7B52B59743245D24E 9F9137BB2AE6397C1C983480DE0817D74667ACD338F22450A8E7A3CB2B0F8FAF E62AE44F230FCF3AAB64313B9C71CFDD9FCBC61826B31C36E7673BBD5DB7B944 E1C47C7ECA5AC813D6C9A59AAFE306B8F9F3AD6159D77038542FFE1FBF307DFD B72C26E5834B30E3B30456ED51D9068DC7C5610E07696D880000EA5EB33944F6 91C08157D9B9C094AF0CEC1269F1C75EADCB784503612B9F1CBB2E9ED8C75568 34BB8736888AF7BF9CBCEDDEF078C06DE0A39F605CCA03649EA2288646A53A86 48B4909E264892E3902F9049C63BD1B9FAED0F86B4E2A48BFFABEBDF03DF493E 7129A6DFE8745BF260F0E781CBDFBF82B8C0D675B30BD68A8920747A9F8BD67E 9225836B9D376803647BEBA6A793620A5B6E655F6E804BCC13AC9DC7523E8A37 B527C5B2C5678B2CEFC06BB34F1C717077E5EB2247C2ED7F1C8E799C9CFCD0C2 1981966D6B538AF1CA6A45E60DB3B56B3673388DDC88F4999AD320902EA4662A C7AC86E9BC9846A8AD6C70243CB3F0CD76B8D85FB28459C6C934F1BDC914E1E6 05386FFB1FE419E92673185C4078C778C504926A3EF633F626C1E915A255CC19 0B5491D633E6C55EFBB14D331ACD310E05AF9255CF9D5F4A5366165FCB102D0E 82E350B6D1D7CA627C2B9364FA3CF6365E89F1F6A8B3EC62959723EA69947A8C 06E7FADD9E8F77306801886FC458D468D428EA661B177DD11EA9EB262E35C1CD F2459040FD4FB56413E3D476175115466E86E86A48D37B7055091B34CA71175B C7D3B92738747D9278171BD2B6D90FFAB0CA0C8A2059602BBCD576AEC8B22BAF 03B3D5166AF750BFC75E96DE08CD03D758A7D0D890733BB90B83B43D891C7C95 882EBA8CB11C8BC17CFC77D92425878C391825157792922E98BFE8E388CB7C34 E0864B35E46A66A76BE4AD49843DC8D7749EB3C75B4A9151D2D3BA2043144114 CE0790F3666D8247B193FF496C1FE74671DC0395472CCAC82964B06D06F0B5EA FA826241D5C83D632A2E95B0155FDF99C3D9782813D74243BF5B2AFF49A9A2E6 7DBFEAD8071D41699398EF82AF074C6D36E2A958C7C22BFB7D244E23A9135803 1152C0F496F880192FC7D4291BE9ECCA4DA0B78329012146F9CDD5F13AE6BC64 1FA4AA0627D9BAAE5E94931A75956703502CD4AA005BDA838EEF2C8E2D9C86FE C478840C67F0C3653E6761FA9E3D32699B87A5EA25E15A8586569A0A4C0B0355 F55C8EEA5972AD04D9D259483276957317A895EAE1A9051C2F50D8D8F2574C20 61BA0DFAAB062487915BBAC3F94D68597336D2CECBDDE91114397CA140304BBE 1F29BC4D399CA8294CCD1AF86F7154C35C2BDBD522D1E2B50C83F8A3653AF4FC 67E8DDD986C66AAF93DE1658EC602ADD39F149B4754F82047F31CAED0D16CB1B D6432783BA32462770F2BF25CCAD21FF0BF63356D02BF65F609DFEFE2A6A49F0 3A99A28B4C956965831A5B4D7134E56DD49036A0BE4BF4FDC529C2E61C40CE36 527E593B4AC66EB306DCC8B7F9C5F03E51DF3E6CEB90360692EA4F1CA8507B0C 7E741318B8F27DA7B124DA9C6880200487003EBED5684CA278C9CAF90DC9512B CF0C4EDE8E22E97DD209CDE76215ED9034C6DAA5FBF0CF0A69BE243DA3DC4C53 9409B184657FDB99EDDBD18E3D4875232E9CD7733DA08E917020D36EF8EE0DED DC9748565E2FC6DB1A828931533EFE23C6E45D7D51B753F9651EBD911A7526BD 5800ECAFF7AA226EF9A77EEC33545BF089C1CBABCE64B535C8807CAE576DE6AB DC87B761759CA53BBF81425076CB1A3E80E59E69871EADC7568217A647620647 F6E4DBE8C73D3CD572737DAD56D7C7CF8E0E29E4BE702FD3690917EABE0E0243 D6C0BEB85A7CE6B358C03B168B7498D5865E9EA0147AE2D0C03FE89FDE7D345F 170DDD1234AC758D038AAD707C8737A42C6CA8673A2BE06E822E7F810279F60C 6FEBFA60457F2B9FD4B8F0739845DCBE70A8917249D1DA0D0D6F689F19F88606 EE480B0E20AD4BC9C1FC6A69D7D8EEC59C9CE8BF5AA1F80EB16E71C9C729683C C4BAEAAC8BBAC6CFFD75C6E263C3B5E0EC37915818DB6B5DCBA0E7642BC15A7C 25BED64854AD9EF87E641A6486ACE5D8E5985A12F641023BA4CF2A91B071592F 585BC2A5700FB7E78EC79B97F440FFD7D8BFED7A614AAABE8A02F96733C04489 4AD85C7D0A16D149CCBBEF1BFBF4681C8997D4B082BF6C23865BFDE1572BF747 D563A7CBC031FD1F31F87AB0360A3A19A4B0692DBB21D2870B213C2579A0468C 2C116720B51C9C05FA21C8926FB5C56C9A01592921EA6ACE28083A15ABFA09C7 F26F6718B5DD19C49136BD67889D92CD8EB170A390AF147CD77486E02AFBA609 FC026062588F302DBE927C81CC7181FEB421C9BD6F7EBF384351A76FF78F3FD0 CCDE2DA3A920F1E3ADB898C5F6FB17C1A2C9D916B150BB8D47E3F454FD9F5E6B 91AF2AE713B7F5699A87716DB11ECEE2DF4FD6AEA2338B4AABDC2AA4D5F2C3D1 95628214615DE31B258A69DCC8B0439D3834E704E4CA690583C4E044FECE3EA4 D2FAF665D893A7EFA74B37CAC3E6B9531D45C26ECC4B563F6052BE495D2F15F3 F4E243BC1365EB9C5D324B339B47589B835E74247E1A9880E689032D74C97D19 279A2DA845E3919355FF5473C3B63556A627A8062EA281BCACA002B910E513DB E10D4487A38A21543F1BA8039C6832B40599D0E6167B7B3460D74BE10605EA47 3EE399C32A1406704534D419D26E15E8A66DDD88B7B3BF653D2BE8FC63CAD30A FFDC877FA3A3E7E1A23CB44B70E7E203DCB586D7B81D1E3A1C1E500FBE3DEB6F BF80C00DB97BB19DAFC0FB38270822331035AB82BB6B43D12B9CC5B0076AAA04 560E62C55017054BF01441F2DC393F44D1A4F37584D929EF7E0B801D4F5D1CF7 C0E8A6D6BA9F74051E614FA33AB7F00DEA6F138D03614573460D878BC25C3D72 07EF46D27D26F4755953ACCB841C30ABE706C4A28AC01204A6756215214361AB E929409274B089DA1FCA4BF9A6FB7CEE925FC86FB1C4C018403204B1076E1857 B81233ACF6920D29DFD2C5E01310D4B41A5DD73E9EFD409202D87EAA7465F15B 2FEF5FAC46E012F7218982BB213A006B7756CB42A37E39700DA1961420E9FFAA 2FD4295D243A79ACA04E14729EE32B4B5E38F419FB1C4450C072B7F228017A94 118EEAD4DCF50896EB5AB380130E2E4C139C911FDE6036F6D1A36920CF4D8EDD 23449F8BBD9E7F0572895C444AAC65743AF93639680E85C27CD4D2CB53D16CEA DFB66E6BCA776DA3E0B6722E64EC5951DB230346BE53B09EA0FEA4FCF8E86D27 A190FAB3B3277C158357BB542DD8DBF741912884523C16982125B85BBC746E65 3D0F0A1D7041383C4EED67B039674652D864F216B9141B6FAE8FE901AA46BC12 6D815BE37692B5CA665004FD4D23F148652657A35DDD97652B50D2C1973CBA05 DBA70EF4498B15541C27C528C081D492734D7C92F717A09EDE796C7986C5F3F6 21D1941B2A183B6D34B3695DE39527EE244B9533ACAA37805E79879810048820 D46FE34A3E25E1BADAFBA9F606B07EB20FDDA9775DFE883AFAA932088BF0CF68 DBA888D32E2CC0D3DC135DC5F537387E91D85B860F5FC7C268E7BDCB58BBBB4E 49114D3EF54271517E762CD5B38A43AA96E2CB38EC43BDC408B2BE858019C731 6266C735623E072450A46DB7F7100E75A52A6DF1C9034732268699EC5D5DB448 2B6CD8CE5508301801548A13E7192AB4C860D218A8B9197486F4393C9D1F63A6 23B74D2709C14379B2CF6A03C9078A49907D6F3D8A77103F0907D0B91AE09BAC EF02774D74FD2A7B5FF5457F0C9EDB1AB6FA13232E1A2D7D9F135A7DE264857E 2EF7A190A73AA423042F8942E3E91A0E7A0A305201366693CC35F9517DC38B7E B24E733C6068666C782C8D41CD27CD463559449A3BA4586AE7D07146FBE9EFDA BCD23880A5CA2C1D45E07B12B1FE4877074B4BDD05F24B54307B736B0FC49AFF 60356E954E33130A60877DBAEECBCCA5619E5447FBE42C47AFB9B4D379690BBA 60BB3B6763BE9C12F3C05CBFE973D5D0D2F10CB0D75F6DD3A2875D200AEC5DF3 99805230170E8341F297E1C8F4CA0B72F6C4B4DD5808A658309DBF3709FC7F7F B60BA3C59C1DD179348413107B935550DAF2413778CE356EA8F34DC3E7D64E23 8918F6EACCB7B2E80AA9180EBAF176B14313DF50B522AE0B0D7D243B5CA08033 507DE4F93087EE6F4C8FBE31D9C689622FB66F260CD29219EB2DF4C649B111BB AA0E26AFB6972DF09FEBCCF00248BE2A7E8029BA08EBCE8A7B0E1CF310F74D24 100E8E5D51CFAFF984610A38CB1095B89EE7767DFE323E476B69E4800391B44A 5C51A7CC2C94200A5AB216EF0EDE3C26252BB664802D0858E722A8FDBEF4688F 00E5D12E69D5963B48AC1A26355AF9995BD566A6EA68675C5A0CBF7C179E297E 574993035D0B22B7FF7DA5717310707E6832696FB4020D0BAA41F247AAE332C1 80AF204E5972B4D399282C06BD1D6371F6CE17635A70339AE79DC85681D25B2F 67EDB43C4310BA00C6DB8C65F2D277D10E96EA4C06FA24E4D252E0144DEC8FB5 18EE43D5C71720E83F39B4B400E8787189ABCFF863F2692AFCE4388B41CDB171 B148102A5F4A50BB162866644EDCC4C7E6A615FA4B73FE735EBD5BB4C8B2A72B E47ABF1B0D5EA995E28FB0F758E4F484B5227BA3E7A22F441122BB1CD07422D8 559CCBDB9D17068D0ACA47795E76CE25819875027FE4954924F7023216F1A526 75E0DBCDBA26AB40B39C740439B5643268E7B533AE8E4AE23DFDA57428AF1E95 33872479E12DC1022205AF91184D566D8C8A2A10F08E6475307A3E39EBFCFA38 1A11C110AC615378DCA70493B05837F5DFC80498DB0B8546B8A5D64B48683831 3CDC5B4E301CF298681CAA6D3AE1DD97113CBC7D009FECDCEC0D7F7A3D774DE8 C15EF3AB6F520C9C14BEE41D57D352ECEFAC66FBB95815C8626BC59A20068401 4E499E9388D5AA912097891EB8793F0A231478F9759B69C58F64E1338C00D12A 58BD7DC5A5164A287AE82301E96EC471F69EE38593C6D8D10107DB36728DEB2D 15E7D16DB331890DFB63A7328A14E5583C303F4AEF34A0FC41E0388E09126ABD C9E2C2A7E1770EE0F894B8BBF22B4AEFE3E35B86AE9F7A75169EAA24FB17CFD1 C14ECFC0302AED2198ACDD642FF224DB45F96CB869C856FB51D6F2739F6C6D15 5740E9E4515DA13460C6330710E62BF93E65E4730BFA48BD01C55D78C616484F D200AFAA5F1BEB2BD962E1D00FC806DFD6CE3304CF661B139BF9FA18B2222CA3 05F26D43C3469A8856D4FCA1CE3D400FABA0B6EFEF31E077F1C08022388E17C3 B82FF34A1EB9D25F9A7D930310A6DB534564CF7EDA5CF9032752A3E3262438C7 B16508E739F02EFB5A5651975A08C494E53872B6CD97AD868259EF95F3A4054F 9DA61DFAC94722F68A242B0E1278FEFBCD43F21087A82FD0CD09CAECC7FB4F3C FE441938379EFB10D45E41C6E63DB2C2876810097200A1D9057F861561CCEEEB 0604AFF0DB4EA4869EA9FF6E7CD8F930A8DDBF82C800BE2626F46FD93F361D7F 9A3D3C138AC8B12CFC4734851697CE8F1673D8D43DFDD3AB2DFEA03B2C06B565 72FD751653A3DC6DDA4048760A1A4443903F3B039C2268220F2B580570A302D6 751FA82C884669AE49AE2A6D1EE377B96D125B47EE3E7DF66C33542A70ECE4DD 67F35081E2CEF1D28EED41A53EA61013B5C433B39532135352F2A94D59313328 FBE57D6FE410E64B1E846B03FE0A30422F4E5D5C8146128BB4AA8C2C630B9499 C910C05D206610438F4FA65DAD327282E3C58C3957101B20AFDBD864581875C9 DE2C3AC55C343137BC4D1B909629A2EF9135EC4BAC0BF29018A82A0C84142457 1F71A2A27E2D9484AA47784EB92EAC52573900E14F6925721406FDB8F9A2FD68 ADD352B5FA039D2390DFF4E0F72A078931A750411E9E035053B457E600314660 B50320B70934D4E94E4D3B308D7DBC2388A77FF084DD83F8884F309ADCF4EB87 66A7CAEE25C6E20824BF2C76068850C2B5FCBD07BC7CB7B4B7BC0E46A4092E08 2867CCC3184B02C3F04D18121275F250FD3E075C7A3810734B7D9ACBD4AD0D1C DFEBF5037B035F0B74378B25F367DBF7C26E489B06E024EC80B473217B54C24B D0F998E21732CB608D2477EE18CE7CE18FB417C0790B16BFB9F892033B97EC54 BD85AB9344F1BAB2A9BFA8DA80E33D589256F43A4257FD46F37C2F0592A48831 3DE6049C649ED4FA4E83A8CCD93B2247146F20D01018924FA8D188B03A5D3B44 413DB76A508EEA254DA3CEF3B03C0E624264A9E9D572ED479C3FA76FEDA23D0D 9887AD60469474764EEA04DD4B5DAAD669C14186D9678424A091D0FEAD822699 718F7D23B05076DED3C883404712226EB7E52ABB3DFF9FD907B4B5B7665A9865 1FD41E0F66E70B5CFA97DB81151B96FEB4B33A09720199082B46BF9C6E715C2B D6345B45AB3F553D3F20E7D19CDE669F858ED0489DA8A09A3A95AF704F605176 3163DDDAF1D31B22DF8A5BFB4C0EBD69A6BB12C2DC74940E1BAEA5D954479566 029ECDAB26EC6D15DACCF75DCCECC4386DB0D86D2802726822FC04E6C676B7F4 3589EB5E53B57AFAD12C29B777266E0714FB0FB476CCA6FFA25F713CC5E27BC8 786B114EE2327D16DE9C0E0D42D018388D2F7B940279726ACA3ACCEC31F0852E 9EFE3419CB37660562658CF54E7843B8D70D62A7AF1C812017E7C826E58F3EFE AFA779379127642BE0A60705400EDB133CCC8BA30965D09938D22C267D064296 85DE334C38DFAB31BC4F0CC33D8F3D93EBF3BFDCB0C43F77007B9C1E666C6713 DF254F5E19F655F8EFEA367E10BE74A282F909989D865C8B6D52D39B114A729C A7F11D538920E61DF08EB89A48D59FDBCF4AEA67CF8CE990E1BAF5AF145CA80B 81C16BDDD9B2BD1A6B153137930D69ED680EA892ADD867B393F6501EE5A67316 DB3665BA3036321743415AB1A784A9D1464E245AAB0F9EC455254FB0DF049DC9 B83D67D7947A3FCA600745E4696190800752BCF657B656C19AFDE528940B059C 56B09D9A5D692576A746DF0214F0F8045A649351BBE92695C93866C060031350 9A85807EE23FAA86CABAC8C35EE8F8F87430298A9B2890DBFE87E520120F3D9F 25F4076B09619B7CAC6E1DA280637862B87DA391DAE17A768B82798BFB40FE82 72D6F288B8BC577CDB1D0E907729312C7F412FA1A6B568840B04B7F0ED55DEA3 71551E02D3451ADD0F0D46D697C7CF1CD8A6C4A372D11B4CB39A435CC350FD01 434914C1F9EF60E2296B5557EFCBC15AF21E4C82D9A52B0763128A6A9CF83D5C F7C5F36B001C5E77C00ACED958E35AF237C055E27F26ED00FDACC250E8716574 D50B9DC810293430695F4D9270B981081E49C47A915B42039DCB36D3CE5555FC 26FCE46B2D996CEE6AB80454CBBB35F9F53A4E939C82BCF2477BA0AF6F88E574 D83B92F7081B0E1F5B0CCBF6BF9675AE7B9DBBD107120481737D28E2FFB6AAB6 DA6601EDFAD88E2BE75C12569E4B8551D4869DC5A36BB6E2AE00E1E141DB4A43 A6B4A90A334BCBACB678FCC647D25BEE140449033160EC5C363F9E575618C223 ECE6A79C1EB76FECA1578E151984914439AEDA51C3E86167E3D63552168B9B8D E77901E3291E2C4DD5376F051EABC76D9127EE146B8BAC22857914B71D77475F 209F54B80B5F55A9D23913B5002394A1526B9492FEC352B05CE461F71C8CE490 47D9796810CC96290FDD9BE5D4350637F6F8C8870FEFECEED33C129FC5CD0602 BEE07534E254D181C89AEF245AC1D1BED915F4CDBB0B9B745B82049FE6762D6D 1E4CCE1886C823947623FD46E39E957B3CB503E93596921E75F4E8181B799D6A 277B64201D325B280564BDAA7CB7132F16F48EDC386E5285C1A5E3088EA7647B 92E39EDCDDEA3D554E3406C6E411C22313033C7AEAB9E4DB2A1A1A4B03F75D0D C8F1B5B2E09B2C22FF062BB1F017BB7E383D444F6530B487BAD96C594CCB9685 C3C905398225E045A40F86717AE3B78234B3774D4B445EFBD95C26F2CBD98EA1 C95A2A88D21B4415A0DF1A724385AAD2115CEEC3EA9AEA9203ABDD304388EA0B 7C3B76DA1382D38AF01325D88FF9168028DA9353BAB23F67E960A5428F3107B5 5CF7221175F1810BF0D07343BE59584B6D06F9D9B5D171F1D6BB167B020C5039 C36EC1CB1AAC41773065BC7991D712ACEA5D7F627B02611FCDCE21711EC7EC74 AB0BFC57B1CCED1884BB9B18868A2053AF58F621016AE639ED6D58EABC42FF0F A5F76685634C85F3BAC77EAB39C23707518CAAFC7DCBC9F9D27B8BE49E85D335 4A74F0A8D93CB7C2EC5A9982804BF24ED1832C549EC8B2AB2B1A212B14E04F26 BFBF1811C51029CF134633B62E08C3F88C615157DBCC5D336057548711630253 C97F950490F0A2479405C6D88896D9715A139D0D365EEF1F65254616DE309AAC 8C708FD30001B3AB61A07630C8A5ED420D286442FFB6729DF0BFA47BE2C87480 62BA997499C1CA63131F3AEA492C2292E8F1B87011932640FA023A1C022D98B9 2397BF2C01709CB33B012E69B928ED9E78B5157CC3A5E6F504267421EEA08A95 A5B3062D0AA95CA6411F51C3ABD548B82F47D3A759B3B1C5D8F8A227BA4A23C7 77B7C36721C2DAF57426DD1A5538DEAF00B432D8E839C15C33B2762320295E2D CDF4F1277FA2319433F4249B246D4BEBAA57DB6378C96576881B855717AD5BE0 949882C4BCE64C7E037FD8161CFBF8E7212C23BAF8C9CDD6E194483436B69C59 CBE7AF01B041FA9507CF9EEA2272A8E90F4E8EE8D0EE8BE355369BABC289855A 10A2E0C23A146E9394BAAD955E6F55E44127003E6976DD267BCFC1BC14130D1B 5841165507F65D0599FA44E81329A04EC5B71BA7D4050071CA65421C0457D6BF F4E361666041C197E2594BF098E6AD3212A1075DBB2815903464E2070A54ED33 C29B0B92254C9ABF5AD9A8B92F050D2B02244B09DBE3AE43920A0714CCFD525C C5E5594E3E1B6C58AE380F3E680B96127F48C00A5CD25D09A4768FC25E0FA213 5662DDEA45A533F68B0B77E7938E03C304927D597C9925A925BEF5762DBE6951 2FB9C0D5E9D85704B2762D3A8E49DE2920E533A2A2B3A6B5910D0210D51B77F1 D4A7CCCC264DCB4D138E4157F9931A376785A4963EC4754BEE642C6A9953711F 9235407EAC877A53491706029B42562370A3776CD6E00664291BA8253644B031 8C1A997FB81F7D88B33D51939C7AA6833BE8B9E22BFE9960897299C357CA4244 A0F42A92156CBFC0C46E9F76C9210239D9B116BC8F0D1E024FCF879349137D86 10AAB7DF3EBAB12F3B087076146D0B4E0800ABE190175F877E67037E1C4D5DD2 B1F53957CFF1C51C349248F68FE367E451E7685F104482D3B9DD4D7930E63CAB E8A97DE032E9B4ECCB6744C2FF3A796530603D9B1645A144EF9B78F832EF35D9 5F04CA48482BC44B56626F80195C2E34D5ABB6EC46B5CDD1051B1121C06BD2AE 633FA5F7EBBF4C54C9FDF19ED3165B0E176E3DFD22B2CD6B9376CCC6C862A13E 3A7316D6CDE2B598F22D3D3935A888146BA654907EFD4EBB93E16C1691127ADF 44D0D01061E29E58D102A537C84A694341595DE48E29D2928F067B7091C0E711 68EED7D9FE14B3F495CE41BF7BC7CCDBFABF97D8C9FA5FD21604698A1C8700D6 692774BF8A0A723B868BF8E80F82468FD097639C571C3A0EE0C154DE9FB11B7E 89979087BED793DE89F2B4B3C6A267E4FE3C8A02EA38847E2A4CB03E2B73AACE 332836D739D1C4B14C71E5E5E110DE20DBDCA5916E4E33D1B5037B55F991FD0F 12B91E669A6DBA12DC98B4CF9E160BAA103BBA643E25275BC32BFBA19AD5401B EAF813FAC17F67B0B9F222D03A080813DC68EFF4CF745E42A0423A3A76A639A1 3C1217D84E62AEB0495FF3D9F9557D3EEADB4CF622232B6AE4FE2DC7A95AE179 6788BCEE6421FDF76448F0462B79F1612E83774EF10D5F62A5A275420F2E8590 3EF5ECFB398574DDED563876110507B87067F349E123010D781F9ED5EDAD8F07 443E8F84ADDA31121DB3D1414B540ECF9897476FD351A6EBDD5490EDDE270312 0234293E6B8293830F57F1B8AB65EAD8FF7EA3F0A3E02C38F927318FC492105E F2AD9DB49BD49922F6F54B21DD1E5B8885C19424927CE4DF58754DD387A29CF6 11E2CC20B3B726B22A0D46C709FFEA147ED78FA7F874119B11D63CF78C54F6C0 E77AEB656B5F3318531CEF393C1860E69AE5EEB179C2C8E01E10D2A594FB29EB B9F897CC3A7F0C3D9022D80197166552F2BEDEAE8459EB15821A9CE4CC97C7F1 3E588FA18BE5FE27953BE6E6C754E0C25BA394A62888B49B636661C69B5848F8 5E6F9C5516928D6C2BFE046A8E6E9DC127CBA203391D1DE19BFEF942A07AE4D2 5A6AADE9DED198F55D0E2BCC220C64DADDEDFAFF96CFC4A4BA1AE98605E81E66 96DF11D0DCB551701A4B76C64A7601D3B1B2C0A558F04FE5289C5EE052EED2DE D72459CA00DD31AFA2AFAFFE05165E51D29F93C27891AA3829286C5EDE807583 D1F6B621B7BFC9A0158F6EEC63BD5FB85215891A22B8ABCFE02A1412F34A4B50 6C85476ACEE743051AD048FA3733791A0BBA0CC7A980E04C6845E8F771A07F0C 81BB3D93EE17BB943036396179D8118C00CA7BAACEB386B7C29D555A2AE07162 6BFAD2F69AB89542C2F3C1A1877B8D44EF6631AB459974B4987D4007C8CEB06F D226E0845E190A170D2C8A84A579D9D171EFD7E29CA9B31CD1CD3CCCC95C1FC8 0625DC4C76F91E9066BD5E6094CE3072AAEF99DB5E6E10950FC342FEA8777404 ECD78AFA3565 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 cleartomark %%EndFont %%BeginFont: CMR12 %!PS-AdobeFont-1.1: CMR12 1.0 %%CreationDate: 1991 Aug 20 16:38:05 % Copyright (C) 1997 American Mathematical Society. All Rights Reserved. 11 dict begin /FontInfo 7 dict dup begin /version (1.0) readonly def /Notice (Copyright (C) 1997 American Mathematical Society. All Rights Reserved) readonly def /FullName (CMR12) readonly def /FamilyName (Computer Modern) readonly def /Weight (Medium) readonly def /ItalicAngle 0 def /isFixedPitch false def end readonly def /FontName /CMR12 def /PaintType 0 def /FontType 1 def /FontMatrix [0.001 0 0 0.001 0 0] readonly def /Encoding 256 array 0 1 255 {1 index exch /.notdef put} for dup 46 /period put dup 48 /zero put dup 49 /one put dup 50 /two put dup 51 /three put dup 65 /A put dup 86 /V put dup 101 /e put dup 105 /i put dup 108 /l put dup 110 /n put dup 111 /o put dup 112 /p put dup 114 /r put dup 115 /s put readonly def /FontBBox{-34 -251 988 750}readonly def currentdict end currentfile eexec D9D66F633B846A97B686A97E45A3D0AA052A014267B7904EB3C0D3BD0B83D891 016CA6CA4B712ADEB258FAAB9A130EE605E61F77FC1B738ABC7C51CD46EF8171 9098D5FEE67660E69A7AB91B58F29A4D79E57022F783EB0FBBB6D4F4EC35014F D2DECBA99459A4C59DF0C6EBA150284454E707DC2100C15B76B4C19B84363758 469A6C558785B226332152109871A9883487DD7710949204DDCF837E6A8708B8 2BDBF16FBC7512FAA308A093FE5CF4E9D2405B169CD5365D6ECED5D768D66D6C 68618B8C482B341F8CA38E9BB9BAFCFAAD9C2F3FD033B62690986ED43D9C9361 3645B82392D5CAE11A7CB49D7E2E82DCD485CBA04C77322EB2E6A79D73DC194E 59C120A2DABB9BF72E2CF256DD6EB54EECBA588101ABD933B57CE8A3A0D16B28 51D7494F73096DF53BDC66BBF896B587DF9643317D5F610CD9088F9849126F23 DDE030F7B277DD99055C8B119CAE9C99158AC4E150CDFC2C66ED92EBB4CC092A AA078CE16247A1335AD332DAA950D20395A7384C33FF72EAA31A5B89766E635F 45C4C068AD7EE867398F0381B07CB94D29FF097D59FF9961D195A948E3D87C31 821E9295A56D21875B41988F7A16A1587050C3C71B4E4355BB37F255D6B237CE 96F25467F70FA19E0F85785FF49068949CCC79F2F8AE57D5F79BB9C5CF5EED5D 9857B9967D9B96CDCF73D5D65FF75AFABB66734018BAE264597220C89FD17379 26764A9302D078B4EB0E29178C878FD61007EEA2DDB119AE88C57ECFEF4B71E4 140A34951DDC3568A84CC92371A789021A103A1A347050FDA6ECF7903F67D213 1D0C7C474A9053866E9C88E65E6932BA87A73686EAB0019389F84D159809C498 1E7A30ED942EB211B00DBFF5BCC720F4E276C3339B31B6EABBB078430E6A09BB 377D3061A20B1EB98796B8607EECBC699445EAA866C38E02DF59F5EDD378303A 0733B90E7835C0AAF32BA04F1566D8161EA89CD4D14DDB953F8B910BFC8A7F03 5020F55EF8FC2640ADADA156F6CF8F2EB6610F7EE8874A26CBE7CD154469B9F4 ED76886B3FB679FFDEB59BB6C55AF7087BA48B75EE2FB374B19BCC421A963E15 FE05ECAAF9EECDF4B2715010A320102E6F8CCAA342FA11532671CEBFCF38BC60 5BF06A0E01053B7F105ED5140FA4FA37A4F45ABFB58DD41780629C7FA7594F8E 9488B074D45BA0E761190A94DBFF4CF204D5812EB1DFBC0C456D6A044C558945 8DF6D6AF8A51131AB5913EF2544E475F489FE776FA45E7C0EB62096CF4517450 8A57DD2B80EF97DBD17036EB9B73FCB82DC4F671BCFEF06A6F86189A2012F53C E518466A9385D08942279391EF5C2B3567F2E53B2148AAA0625BDB358ECD2C9B 730A59F8DF70FD3E09378E24AEE772A69C96E09C0D0703350A75F3843DEDD822 B364988376CE8027EF12F0453575AE9AE46296E13925BACECA8B8808DA388222 BA35B431F56BC3C349B8CA6D4AB83664A991FED51478BFE25B0399B54EF27B18 65E2E39E57DFC5F57371FB4643D7EC0AD41840CA7C682EE7A1B4FE3E06E40238 B07A2E7A7FB3F35502F1CCA283F9420F2FAB9EC0A8C8982BF4AFE69A3D2690B3 CF5DB716B3CB9936C49A12944973F14C2D9A368E4067BDBF91E413A3321B3BFA B84463D3C680604A4C4E4B49D0F9F9B59D5B68ECD3891FEEDE9B29B9C432212D 82505A8D423BA734A53DEB930A392BA6011C6EA6EBA7ABAA6AAC003721FB34A6 1544EEE16F6AD73E6C5743EFF09975C186A9C769A4732F78AA09218AE576FB14 70E1697B813AC1B09FFAB762678BA9320043C256766AF1BACD3702CED1228B94 57E353589810F99AF74109EFDA0740CB0475DE7870AA7218120462B23441BB1A 60ACAF3B8B171E7509854D1C05C8FBF62979D2B52030B4C91F9D038EF26F2C11 346D0E9955B491C3168E030B9CCE2964883B824F0DCF27EECA6C6E0478CF6B36 AF2D33C9265A5F8D76FCC46AA30E6093E3822CE70C1ED22CDB8A8F910F5BCF45 2C9D2D41B342B43DB5FE5EFCFEB5D378F78684296CAED9A39FC3834929073B6E A934014457B89A61253E0924D3C6BB4FE4ADFBD0C9B3C61D08E3DB2B26785A1D 3B5E0E23258AE12276B63E9D79B2EAB305B8108A0987216C0EBF033A839BF611 CB208A97C18AD434B4AA716C57905AF301C24DD78EC659F2398D46BAC7C30682 F7E21FFC8370880EB1C9A98807FB05BD23F160F1567070B644C2C0F08C981C81 3D472A623CBA7ADB80D118D51BF4F2D139CD7F27753F38007D4831760CD2077C 23643D8F0C038E949E11415E9C570E6CBEDBB60B480B9892731D073C3357902B 40415292F69357C1AA0C94780336DB4702E659DF67225B2B25811EFE3FBAAA3C E06C49CC4591E5E347925A62079C501D27DAB6205E3162D86152476602386329 0476AB5766DBE6936974CA9B133459886FA5FF402BE911036A9CA31BB71B6C92 01E5270681E15AC6F3999C114610B08B91FD22B4A4843D0B90276EC2F4FC347A C814329239DB5C15CD43DB9A894C666F5121D37B7C6428FF061CBE3974D78B54 CD74069DCD42AF4734AB5D4239AB83CBBF751DBBD320BEEAB8F31B6036CAC31D 99C15FBCEA633DA4CDABC8FFEE5E634766C00D4CA8D81F7205A77EC394486032 57C8547EDB7FF10B3CC9ABB2BCBDD51E304153DEF8BD8EE3591005CC1013BB68 B579080881221360FF4A62C4D5235D9EF35E09BB44FEB0E41FFCFBF4F654BEFB D273339665FAEA9167AE154EC7243623D74A9D2A60883D948DB4127B11F95F0E 2F5ADB3DDA9D8B9EFB7D32096C0562E81868F9B8277ED54053A37E9EA94C922D C42F22136F3E33F63D819C4F8424ACD9C868CCEEFED00274B00A825E61837A2D 5DA162379664177CFBCD0D4CACE49044160B5275684CAD4C336B730FA4CA49B2 BC2A450D504857287F9D575884130AEB50F8F14B153C615CA8C3D2AF1EBD84A3 F158F2EB29BBD92095A15FFE4C6F40E06658A3A52B61EBFE9F3EE3F7E37AC477 BA24CD27BBFFC121478133B200731F4AF2032B6B6D4F03D113AD8F2391DA0DEE 27653D82D4838E4CF541CC922E141153BE8DD305D1F89C753180D11DAF0C792D 56F3674DEEEEDE6494EF766D2453232DF32A80DE36D626594CA73E0F5058B571 97CE052CA8364A3BE32FD595306A7177DF9BBA06B1B670BBF54D49446E913E64 E630478AABFCEBEDCA6BB1B1C8DC776E6E253D163DA2B6EE9E5C650F0E172EAD A2082D2C14CC270C7E08D213BFEE4596BA64487C447528013F4015A3080FEC41 DBC11EDBDDA0746B228F45AE86F0A4DF2CEDF61602E7895F3CE32CE145756822 2E9629AD492BE60B91A0EFAFCD3CF61F019C134EC31A31B61715F7258453E321 10D09772F56CC4B267D7773BE2B2836C8882561DB6B76E1D40BA3C5A8745D6AA ADF93F52BC563A6E27C5456D88F5861DD4E674B4046FFB51B1694C593D3A7D4E E9C38ACB2DC0102AEB761556EB9C3C71D13737013D4AD5825FCA260C52F34370 DB85657F23087DA39702E64FAB15079224B181E9B6C45207DD6271F5F88A0F8C 3984186804B501D5F0B8EB83C9ABA185AB12A625A364B35857729DFC9EC85908 0E69DBC9DB97DED2FC244C5386AB7A5DD6C2F6D7B58D00BB3397E74AD5339E8F C901FAAEF60492AAACF12C8FDF612DFE5383F98D49BE25BF19E6D21BC7AC3C1F 857497A5909CE313DA186A628C5437BCE75EEF0144D444B3B9213975D86FAB42 BEBD3B979136CA744374DC7047970A85744BBC7B15ECA6298819C3CFD43E2F5B 66FB7F7EF295784CF4BB97EC59C232BB33507366DFC3FAB358B45AC3A1A41F66 7511D9E06C0D1058A3A36FBB63A6CB58E2FFCA728B488D00FEF055B194963716 F4C638CD29B7B266C55714EC054CCD7FC211C6989A7DA04429CFA85F7A48036D 5B0C0C7448CAE051D9B40D9D5FC7CED07DBC1A729F5EB884A07494FC3CD32B25 C056499909ADB2C51C1B716593E71DDFA245C6F061FA75C47BA92BA3AB974098 4C597BF9360A45DAB32CED234C3DDB4F087295B191BAFA8601FA938220A208F8 7E69991199BD1AA04CE35AB4485C5D3F778ED3D98F7F7D60606BADBB9BE61A81 016CC2AB7F35D5F6C46CDE336F260E46F09BC0C8ABD019BEB8C2BCFC1492D5FC 2E5D7096FE60880690C7029E848F290AEDB43E2DADF66135CCF79C63FFE522C9 0A9F283C9CC4B5D4DD9982360EB2F3E07B0FA2E9A9790249D811A3DA5A27239D E581D249898A648CA8E33C7273AF4D846C1FF578FF809782618227B2533EB859 40E2E3BE6ED0997FECECC84404014E3CD692A7CE3967C905B6C7CDE743EBCF5D 001F22C147C8F5B58D2C6FF35599022A8164F83D85172C5F294F0EF3F7EFCD42 9A5F91890146261D37F2213784AA79FE9EC56CFFE4DA2CC29B35146F3775E714 31F07B6673ED2E2AC1 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 cleartomark %%EndFont TeXDict begin 40258431 52099146 1000 600 600 (cfitsio.dvi) @start /Fa 138[49 30 37 38 1[46 46 51 74 23 2[28 1[42 1[42 2[42 46 11[68 12[68 3[69 68[{}17 90.9091 /CMTI10 rf /Fb 193[71 62[{}1 90.9091 /CMMI10 rf /Fc 149[25 2[45 45 86[45 15[{}4 90.9091 /CMSY10 rf /Fd 134[59 59 81 59 62 44 44 46 59 62 56 62 93 31 59 1[31 62 56 34 51 62 50 62 54 9[116 85 86 78 62 84 1[77 1[88 106 67 88 1[42 88 88 70 74 86 81 80 85 6[31 56 56 56 56 56 56 56 56 56 56 1[31 37 32[62 12[{}58 99.6264 /CMBX12 rf /Fe 129[48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 1[48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 33[{}93 90.9091 /CMTT10 rf /Ff 133[60 71 71 97 71 75 52 53 55 1[75 67 75 112 37 71 1[37 75 67 41 61 75 60 75 65 9[139 102 103 94 75 100 1[92 101 105 128 81 105 1[50 105 106 85 88 103 97 96 102 7[67 67 67 67 67 67 67 67 67 67 67 37 45 3[52 52 27[75 78 11[{}62 119.552 /CMBX12 rf /Fg 135[102 3[75 1[79 1[108 1[108 4[54 108 2[88 108 2[94 29[140 138 146 7[97 97 97 97 97 97 97 97 97 97 48[{}23 172.188 /CMBX12 rf /Fh 165[56 68 68 93 68 68 66 51 67 1[62 71 68 83 57 71 1[33 68 71 59 62 69 66 64 68 7[45 45 45 45 45 45 45 45 45 45 45 25 30 3[35 35 40[{}39 90.9091 /CMSL10 rf /Fi 133[46 55 55 1[55 58 41 41 43 1[58 52 58 87 29 2[29 58 52 32 48 58 46 58 51 9[108 2[73 58 78 1[71 79 82 1[63 2[40 82 82 66 69 80 76 74 79 7[52 52 52 52 52 52 52 52 52 52 2[35 32[58 12[{}51 90.9091 /CMBX10 rf /Fj 132[45 40 48 48 66 48 51 35 36 36 48 51 45 51 76 25 48 28 25 51 45 28 40 51 40 51 45 25 2[25 45 25 56 68 68 93 68 68 66 51 67 71 62 71 68 83 57 71 47 33 68 71 59 62 69 66 64 68 71 43 1[71 1[25 25 45 45 45 45 45 45 45 45 45 45 45 25 30 25 71 45 35 35 25 71 76 45 76 45 25 18[76 51 51 53 11[{}91 90.9091 /CMR10 rf /Fk 140[46 46 1[65 59 65 1[33 2[33 3[52 14[88 20[88 13[59 59 59 59 1[33 46[{}15 119.552 /CMR12 rf /Fl 139[63 64 66 2[81 90 134 45 2[45 1[81 49 74 1[72 1[78 12[112 90 2[110 6[60 2[101 2[117 1[122 65[{}20 143.462 /CMBX12 rf /Fm 133[103 123 123 1[123 129 90 92 95 1[129 116 129 194 65 2[65 129 116 71 106 129 103 129 113 9[240 1[179 162 129 173 1[159 175 182 1[140 2[87 182 183 146 153 178 168 165 175 25[65 26[129 12[{}42 206.559 /CMBX12 rf end %%EndProlog %%BeginSetup %%Feature: *Resolution 600dpi TeXDict begin %%BeginPaperSize: Letter letter %%EndPaperSize end %%EndSetup %%Page: 1 1 TeXDict begin 1 0 bop 240 1799 a Fm(CFITSIO)76 b(User's)g(Reference)i (Guide)727 2258 y Fl(An)53 b(In)l(terface)f(to)i(FITS)g(F)-13 b(ormat)54 b(Files)1263 2518 y(for)g(C)f(Programmers)1667 3013 y Fk(V)-10 b(ersion)38 b(3.3)1727 3916 y Fj(HEASAR)m(C)1764 4029 y(Co)s(de)30 b(662)1363 4142 y(Go)s(ddard)f(Space)i(Fligh)m(t)h (Cen)m(ter)1522 4255 y(Green)m(b)s(elt,)f(MD)h(20771)1857 4367 y(USA)1682 5227 y Fk(April)37 b(2012)p eop end %%Page: 2 2 TeXDict begin 2 1 bop 0 299 a Fj(ii)p eop end %%Page: 3 3 TeXDict begin 3 2 bop 0 1267 a Fm(Con)-6 b(ten)g(ts)0 1858 y Fi(1)84 b(In)m(tro)s(duction)3136 b(1)136 2020 y Fj(1.1)125 b(A)30 b(Brief)h(Ov)m(erview)85 b(.)46 b(.)f(.)h(.)g(.)g (.)f(.)h(.)g(.)f(.)h(.)g(.)f(.)h(.)g(.)g(.)f(.)h(.)g(.)f(.)h(.)g(.)g(.) f(.)h(.)g(.)f(.)h(.)g(.)g(.)f(.)h(.)g(.)f(.)h(.)g(.)f(.)131 b(1)136 2182 y(1.2)94 b(Sources)30 b(of)h(FITS)f(Soft)m(w)m(are)h(and)f (Information)38 b(.)46 b(.)g(.)f(.)h(.)g(.)f(.)h(.)g(.)g(.)f(.)h(.)g(.) f(.)h(.)g(.)g(.)f(.)h(.)g(.)f(.)h(.)g(.)f(.)131 b(1)136 2344 y(1.3)94 b(Ac)m(kno)m(wledgmen)m(ts)30 b(.)46 b(.)g(.)f(.)h(.)g(.) g(.)f(.)h(.)g(.)f(.)h(.)g(.)f(.)h(.)g(.)g(.)f(.)h(.)g(.)f(.)h(.)g(.)g (.)f(.)h(.)g(.)f(.)h(.)g(.)g(.)f(.)h(.)g(.)f(.)h(.)g(.)f(.)131 b(2)136 2506 y(1.4)94 b(Legal)32 b(Stu\013)92 b(.)46 b(.)g(.)f(.)h(.)g(.)f(.)h(.)g(.)g(.)f(.)h(.)g(.)f(.)h(.)g(.)f(.)h(.)g (.)g(.)f(.)h(.)g(.)f(.)h(.)g(.)g(.)f(.)h(.)g(.)f(.)h(.)g(.)g(.)f(.)h(.) g(.)f(.)h(.)g(.)f(.)131 b(4)0 2766 y Fi(2)119 b(Creating)34 b(the)h(CFITSIO)e(Library)2256 b(5)136 2928 y Fj(2.1)94 b(Building)31 b(the)f(Library)58 b(.)45 b(.)h(.)g(.)g(.)f(.)h(.)g(.)f (.)h(.)g(.)f(.)h(.)g(.)g(.)f(.)h(.)g(.)f(.)h(.)g(.)g(.)f(.)h(.)g(.)f(.) h(.)g(.)g(.)f(.)h(.)g(.)f(.)h(.)g(.)f(.)131 b(5)345 3090 y(2.1.1)106 b(Unix)31 b(Systems)44 b(.)h(.)h(.)g(.)g(.)f(.)h(.)g(.)f(.) h(.)g(.)f(.)h(.)g(.)g(.)f(.)h(.)g(.)f(.)h(.)g(.)g(.)f(.)h(.)g(.)f(.)h (.)g(.)g(.)f(.)h(.)g(.)f(.)h(.)g(.)f(.)131 b(5)345 3252 y(2.1.2)106 b(VMS)33 b(.)46 b(.)g(.)f(.)h(.)g(.)f(.)h(.)g(.)g(.)f(.)h (.)g(.)f(.)h(.)g(.)f(.)h(.)g(.)g(.)f(.)h(.)g(.)f(.)h(.)g(.)g(.)f(.)h(.) g(.)f(.)h(.)g(.)g(.)f(.)h(.)g(.)f(.)h(.)g(.)f(.)131 b(7)345 3413 y(2.1.3)106 b(Windo)m(ws)31 b(PCs)f(.)45 b(.)h(.)g(.)g(.)f(.)h(.)g (.)f(.)h(.)g(.)f(.)h(.)g(.)g(.)f(.)h(.)g(.)f(.)h(.)g(.)g(.)f(.)h(.)g(.) f(.)h(.)g(.)g(.)f(.)h(.)g(.)f(.)h(.)g(.)f(.)131 b(7)345 3575 y(2.1.4)106 b(Macin)m(tosh)32 b(PCs)55 b(.)46 b(.)g(.)g(.)f(.)h(.) g(.)f(.)h(.)g(.)f(.)h(.)g(.)g(.)f(.)h(.)g(.)f(.)h(.)g(.)g(.)f(.)h(.)g (.)f(.)h(.)g(.)g(.)f(.)h(.)g(.)f(.)h(.)g(.)f(.)131 b(7)136 3737 y(2.2)94 b(T)-8 b(esting)32 b(the)e(Library)j(.)46 b(.)f(.)h(.)g(.)g(.)f(.)h(.)g(.)f(.)h(.)g(.)f(.)h(.)g(.)g(.)f(.)h(.)g (.)f(.)h(.)g(.)g(.)f(.)h(.)g(.)f(.)h(.)g(.)g(.)f(.)h(.)g(.)f(.)h(.)g(.) f(.)131 b(8)136 3899 y(2.3)94 b(Linking)31 b(Programs)f(with)g(CFITSIO) 45 b(.)g(.)h(.)g(.)f(.)h(.)g(.)g(.)f(.)h(.)g(.)f(.)h(.)g(.)g(.)f(.)h(.) g(.)f(.)h(.)g(.)g(.)f(.)h(.)g(.)f(.)h(.)g(.)f(.)131 b(9)136 4061 y(2.4)94 b(Using)31 b(CFITSIO)e(in)h(Multi-threaded)h(En)m (vironmen)m(ts)62 b(.)46 b(.)f(.)h(.)g(.)g(.)f(.)h(.)g(.)f(.)h(.)g(.)g (.)f(.)h(.)g(.)f(.)h(.)g(.)f(.)131 b(9)136 4223 y(2.5)94 b(Getting)32 b(Started)f(with)f(CFITSIO)60 b(.)46 b(.)f(.)h(.)g(.)f(.)h (.)g(.)g(.)f(.)h(.)g(.)f(.)h(.)g(.)g(.)f(.)h(.)g(.)f(.)h(.)g(.)g(.)f(.) h(.)g(.)f(.)h(.)g(.)f(.)85 b(10)136 4385 y(2.6)94 b(Example)31 b(Program)86 b(.)46 b(.)f(.)h(.)g(.)g(.)f(.)h(.)g(.)f(.)h(.)g(.)f(.)h (.)g(.)g(.)f(.)h(.)g(.)f(.)h(.)g(.)g(.)f(.)h(.)g(.)f(.)h(.)g(.)g(.)f(.) h(.)g(.)f(.)h(.)g(.)f(.)85 b(10)0 4645 y Fi(3)119 b(A)35 b(FITS)f(Primer)2918 b(13)0 4904 y(4)119 b(Programming)37 b(Guidelines)2482 b(15)136 5066 y Fj(4.1)94 b(CFITSIO)29 b(De\014nitions)44 b(.)h(.)h(.)g(.)g(.)f(.)h(.)g(.)f(.)h(.)g(.)f(.)h(.) g(.)g(.)f(.)h(.)g(.)f(.)h(.)g(.)g(.)f(.)h(.)g(.)f(.)h(.)g(.)g(.)f(.)h (.)g(.)f(.)h(.)g(.)f(.)85 b(15)136 5228 y(4.2)94 b(Curren)m(t)30 b(Header)h(Data)h(Unit)e(\(CHDU\))87 b(.)46 b(.)f(.)h(.)g(.)g(.)f(.)h (.)g(.)f(.)h(.)g(.)g(.)f(.)h(.)g(.)f(.)h(.)g(.)g(.)f(.)h(.)g(.)f(.)h(.) g(.)f(.)85 b(17)136 5390 y(4.3)94 b(F)-8 b(unction)32 b(Names)e(and)g(V)-8 b(ariable)32 b(Datat)m(yp)s(es)41 b(.)46 b(.)g(.)g(.)f(.)h(.)g(.)f(.)h(.)g(.)g(.)f(.)h(.)g(.)f(.)h(.)g(.) g(.)f(.)h(.)g(.)f(.)h(.)g(.)f(.)85 b(18)136 5552 y(4.4)94 b(Supp)s(ort)29 b(for)h(Unsigned)g(In)m(tegers)h(and)f(Signed)g(Bytes) 86 b(.)46 b(.)f(.)h(.)g(.)g(.)f(.)h(.)g(.)f(.)h(.)g(.)g(.)f(.)h(.)g(.)f (.)h(.)g(.)f(.)85 b(20)136 5714 y(4.5)94 b(Dealing)33 b(with)d(Character)g(Strings)61 b(.)46 b(.)f(.)h(.)g(.)f(.)h(.)g(.)g(.) f(.)h(.)g(.)f(.)h(.)g(.)g(.)f(.)h(.)g(.)f(.)h(.)g(.)g(.)f(.)h(.)g(.)f (.)h(.)g(.)f(.)85 b(22)1912 5942 y(iii)p eop end %%Page: 4 4 TeXDict begin 4 3 bop 0 299 a Fj(iv)3311 b Fh(CONTENTS)136 555 y Fj(4.6)94 b(Implicit)31 b(Data)h(T)m(yp)s(e)e(Con)m(v)m(ersion)65 b(.)46 b(.)f(.)h(.)g(.)f(.)h(.)g(.)g(.)f(.)h(.)g(.)f(.)h(.)g(.)g(.)f(.) h(.)g(.)f(.)h(.)g(.)g(.)f(.)h(.)g(.)f(.)h(.)g(.)f(.)85 b(23)136 716 y(4.7)94 b(Data)32 b(Scaling)89 b(.)46 b(.)f(.)h(.)g(.)f (.)h(.)g(.)g(.)f(.)h(.)g(.)f(.)h(.)g(.)f(.)h(.)g(.)g(.)f(.)h(.)g(.)f(.) h(.)g(.)g(.)f(.)h(.)g(.)f(.)h(.)g(.)g(.)f(.)h(.)g(.)f(.)h(.)g(.)f(.)85 b(23)136 876 y(4.8)94 b(Supp)s(ort)29 b(for)h(IEEE)g(Sp)s(ecial)g(V)-8 b(alues)68 b(.)45 b(.)h(.)g(.)f(.)h(.)g(.)g(.)f(.)h(.)g(.)f(.)h(.)g(.)g (.)f(.)h(.)g(.)f(.)h(.)g(.)g(.)f(.)h(.)g(.)f(.)h(.)g(.)f(.)85 b(24)136 1037 y(4.9)94 b(Error)30 b(Status)g(V)-8 b(alues)32 b(and)d(the)i(Error)e(Message)j(Stac)m(k)44 b(.)i(.)f(.)h(.)g(.)g(.)f (.)h(.)g(.)f(.)h(.)g(.)g(.)f(.)h(.)g(.)f(.)h(.)g(.)f(.)85 b(24)136 1197 y(4.10)49 b(V)-8 b(ariable-Length)33 b(Arra)m(ys)d(in)g (Binary)h(T)-8 b(ables)31 b(.)46 b(.)g(.)g(.)f(.)h(.)g(.)f(.)h(.)g(.)g (.)f(.)h(.)g(.)f(.)h(.)g(.)g(.)f(.)h(.)g(.)f(.)h(.)g(.)f(.)85 b(25)136 1358 y(4.11)49 b(Multiple)32 b(Access)f(to)g(the)g(Same)f (FITS)g(File)h(.)45 b(.)h(.)g(.)g(.)f(.)h(.)g(.)f(.)h(.)g(.)g(.)f(.)h (.)g(.)f(.)h(.)g(.)g(.)f(.)h(.)g(.)f(.)h(.)g(.)f(.)85 b(26)136 1518 y(4.12)49 b(When)31 b(the)f(Final)h(Size)g(of)g(the)f (FITS)g(HDU)h(is)f(Unkno)m(wn)k(.)45 b(.)h(.)g(.)g(.)f(.)h(.)g(.)f(.)h (.)g(.)g(.)f(.)h(.)g(.)f(.)h(.)g(.)f(.)85 b(27)136 1678 y(4.13)49 b(CFITSIO)29 b(Size)i(Limitations)42 b(.)k(.)f(.)h(.)g(.)f(.) h(.)g(.)f(.)h(.)g(.)g(.)f(.)h(.)g(.)f(.)h(.)g(.)g(.)f(.)h(.)g(.)f(.)h (.)g(.)g(.)f(.)h(.)g(.)f(.)h(.)g(.)f(.)85 b(27)0 1931 y Fi(5)f(Basic)36 b(CFITSIO)d(In)m(terface)h(Routines)2074 b(29)136 2092 y Fj(5.1)94 b(CFITSIO)29 b(Error)h(Status)g(Routines)89 b(.)45 b(.)h(.)g(.)f(.)h(.)g(.)g(.)f(.)h(.)g(.)f(.)h(.)g(.)g(.)f(.)h(.) g(.)f(.)h(.)g(.)g(.)f(.)h(.)g(.)f(.)h(.)g(.)f(.)85 b(29)136 2252 y(5.2)94 b(FITS)30 b(File)i(Access)f(Routines)g(.)46 b(.)f(.)h(.)g(.)f(.)h(.)g(.)f(.)h(.)g(.)g(.)f(.)h(.)g(.)f(.)h(.)g(.)g (.)f(.)h(.)g(.)f(.)h(.)g(.)g(.)f(.)h(.)g(.)f(.)h(.)g(.)f(.)85 b(30)136 2412 y(5.3)94 b(HDU)32 b(Access)f(Routines)72 b(.)46 b(.)g(.)g(.)f(.)h(.)g(.)f(.)h(.)g(.)f(.)h(.)g(.)g(.)f(.)h(.)g(.) f(.)h(.)g(.)g(.)f(.)h(.)g(.)f(.)h(.)g(.)g(.)f(.)h(.)g(.)f(.)h(.)g(.)f (.)85 b(33)136 2573 y(5.4)94 b(Header)31 b(Keyw)m(ord)f(Read/W)-8 b(rite)33 b(Routines)40 b(.)45 b(.)h(.)g(.)g(.)f(.)h(.)g(.)f(.)h(.)g(.) g(.)f(.)h(.)g(.)f(.)h(.)g(.)g(.)f(.)h(.)g(.)f(.)h(.)g(.)f(.)85 b(35)345 2733 y(5.4.1)106 b(Keyw)m(ord)30 b(Reading)h(Routines)65 b(.)46 b(.)g(.)f(.)h(.)g(.)g(.)f(.)h(.)g(.)f(.)h(.)g(.)g(.)f(.)h(.)g(.) f(.)h(.)g(.)g(.)f(.)h(.)g(.)f(.)h(.)g(.)f(.)85 b(35)345 2894 y(5.4.2)106 b(Keyw)m(ord)30 b(W)-8 b(riting)32 b(Routines)86 b(.)46 b(.)g(.)f(.)h(.)g(.)g(.)f(.)h(.)g(.)f(.)h(.)g(.)g(.)f(.)h(.)g(.) f(.)h(.)g(.)g(.)f(.)h(.)g(.)f(.)h(.)g(.)f(.)85 b(38)136 3054 y(5.5)94 b(Primary)30 b(Arra)m(y)h(or)f(IMA)m(GE)i(Extension)e (I/O)g(Routines)54 b(.)45 b(.)h(.)g(.)g(.)f(.)h(.)g(.)f(.)h(.)g(.)g(.)f (.)h(.)g(.)f(.)h(.)g(.)f(.)85 b(40)136 3215 y(5.6)94 b(Image)32 b(Compression)f(.)46 b(.)f(.)h(.)g(.)g(.)f(.)h(.)g(.)f(.)h (.)g(.)f(.)h(.)g(.)g(.)f(.)h(.)g(.)f(.)h(.)g(.)g(.)f(.)h(.)g(.)f(.)h(.) g(.)g(.)f(.)h(.)g(.)f(.)h(.)g(.)f(.)85 b(44)136 3375 y(5.7)94 b(ASCI)s(I)29 b(and)h(Binary)h(T)-8 b(able)31 b(Routines)85 b(.)46 b(.)g(.)f(.)h(.)g(.)g(.)f(.)h(.)g(.)f(.)h(.)g(.)g (.)f(.)h(.)g(.)f(.)h(.)g(.)g(.)f(.)h(.)g(.)f(.)h(.)g(.)f(.)85 b(48)345 3536 y(5.7.1)106 b(Create)32 b(New)e(T)-8 b(able)84 b(.)46 b(.)f(.)h(.)g(.)f(.)h(.)g(.)f(.)h(.)g(.)g(.)f(.)h(.)g(.)f(.)h(.) g(.)g(.)f(.)h(.)g(.)f(.)h(.)g(.)g(.)f(.)h(.)g(.)f(.)h(.)g(.)f(.)85 b(48)345 3696 y(5.7.2)106 b(Column)30 b(Information)g(Routines)h(.)46 b(.)f(.)h(.)g(.)g(.)f(.)h(.)g(.)f(.)h(.)g(.)g(.)f(.)h(.)g(.)f(.)h(.)g (.)g(.)f(.)h(.)g(.)f(.)h(.)g(.)f(.)85 b(49)345 3857 y(5.7.3)106 b(Routines)31 b(to)g(Edit)f(Ro)m(ws)h(or)f(Columns)39 b(.)46 b(.)g(.)f(.)h(.)g(.)f(.)h(.)g(.)g(.)f(.)h(.)g(.)f(.)h(.)g(.)g(.) f(.)h(.)g(.)f(.)h(.)g(.)f(.)85 b(52)345 4017 y(5.7.4)106 b(Read)31 b(and)f(W)-8 b(rite)31 b(Column)f(Data)i(Routines)66 b(.)46 b(.)g(.)f(.)h(.)g(.)g(.)f(.)h(.)g(.)f(.)h(.)g(.)g(.)f(.)h(.)g(.) f(.)h(.)g(.)f(.)85 b(53)345 4178 y(5.7.5)106 b(Ro)m(w)31 b(Selection)h(and)e(Calculator)h(Routines)88 b(.)46 b(.)g(.)f(.)h(.)g (.)g(.)f(.)h(.)g(.)f(.)h(.)g(.)g(.)f(.)h(.)g(.)f(.)h(.)g(.)f(.)85 b(56)345 4338 y(5.7.6)106 b(Column)30 b(Binning)g(or)g(Histogramming)i (Routines)74 b(.)46 b(.)g(.)g(.)f(.)h(.)g(.)f(.)h(.)g(.)g(.)f(.)h(.)g (.)f(.)h(.)g(.)f(.)85 b(57)136 4498 y(5.8)94 b(Utilit)m(y)33 b(Routines)27 b(.)45 b(.)h(.)g(.)f(.)h(.)g(.)g(.)f(.)h(.)g(.)f(.)h(.)g (.)f(.)h(.)g(.)g(.)f(.)h(.)g(.)f(.)h(.)g(.)g(.)f(.)h(.)g(.)f(.)h(.)g(.) g(.)f(.)h(.)g(.)f(.)h(.)g(.)f(.)85 b(60)345 4659 y(5.8.1)106 b(File)32 b(Chec)m(ksum)e(Routines)47 b(.)f(.)f(.)h(.)g(.)f(.)h(.)g(.)g (.)f(.)h(.)g(.)f(.)h(.)g(.)g(.)f(.)h(.)g(.)f(.)h(.)g(.)g(.)f(.)h(.)g(.) f(.)h(.)g(.)f(.)85 b(60)345 4819 y(5.8.2)106 b(Date)32 b(and)e(Time)g(Utilit)m(y)j(Routines)90 b(.)46 b(.)g(.)g(.)f(.)h(.)g(.) f(.)h(.)g(.)g(.)f(.)h(.)g(.)f(.)h(.)g(.)g(.)f(.)h(.)g(.)f(.)h(.)g(.)f (.)85 b(61)345 4980 y(5.8.3)106 b(General)32 b(Utilit)m(y)g(Routines)h (.)46 b(.)f(.)h(.)g(.)f(.)h(.)g(.)g(.)f(.)h(.)g(.)f(.)h(.)g(.)g(.)f(.)h (.)g(.)f(.)h(.)g(.)g(.)f(.)h(.)g(.)f(.)h(.)g(.)f(.)85 b(62)0 5232 y Fi(6)119 b(The)35 b(CFITSIO)e(Iterator)g(F)-9 b(unction)2154 b(73)136 5393 y Fj(6.1)94 b(The)30 b(Iterator)i(W)-8 b(ork)31 b(F)-8 b(unction)45 b(.)g(.)h(.)g(.)f(.)h(.)g(.)f(.)h(.)g(.)g (.)f(.)h(.)g(.)f(.)h(.)g(.)g(.)f(.)h(.)g(.)f(.)h(.)g(.)g(.)f(.)h(.)g(.) f(.)h(.)g(.)f(.)85 b(74)136 5553 y(6.2)94 b(The)30 b(Iterator)i(Driv)m (er)f(F)-8 b(unction)78 b(.)46 b(.)g(.)f(.)h(.)g(.)f(.)h(.)g(.)g(.)f(.) h(.)g(.)f(.)h(.)g(.)g(.)f(.)h(.)g(.)f(.)h(.)g(.)g(.)f(.)h(.)g(.)f(.)h (.)g(.)f(.)85 b(76)136 5714 y(6.3)94 b(Guidelines)31 b(for)f(Using)h(the)f(Iterator)i(F)-8 b(unction)45 b(.)h(.)g(.)f(.)h(.) g(.)f(.)h(.)g(.)g(.)f(.)h(.)g(.)f(.)h(.)g(.)g(.)f(.)h(.)g(.)f(.)h(.)g (.)f(.)85 b(77)p eop end %%Page: 5 5 TeXDict begin 5 4 bop 0 299 a Fh(CONTENTS)3334 b Fj(v)136 555 y(6.4)94 b(Complete)32 b(List)e(of)h(Iterator)g(Routines)62 b(.)46 b(.)g(.)f(.)h(.)g(.)g(.)f(.)h(.)g(.)f(.)h(.)g(.)g(.)f(.)h(.)g(.) f(.)h(.)g(.)g(.)f(.)h(.)g(.)f(.)h(.)g(.)f(.)85 b(78)0 823 y Fi(7)119 b(W)-9 b(orld)36 b(Co)s(ordinate)e(System)h(Routines) 1992 b(81)136 986 y Fj(7.1)125 b(Self-con)m(tained)32 b(W)m(CS)e(Routines)f(.)46 b(.)g(.)f(.)h(.)g(.)f(.)h(.)g(.)g(.)f(.)h(.) g(.)f(.)h(.)g(.)g(.)f(.)h(.)g(.)f(.)h(.)g(.)g(.)f(.)h(.)g(.)f(.)h(.)g (.)f(.)85 b(82)0 1254 y Fi(8)119 b(Hierarc)m(hical)36 b(Grouping)g(Routines)2163 b(85)136 1418 y Fj(8.1)94 b(Grouping)30 b(T)-8 b(able)31 b(Routines)87 b(.)46 b(.)f(.)h(.)g(.)f (.)h(.)g(.)f(.)h(.)g(.)g(.)f(.)h(.)g(.)f(.)h(.)g(.)g(.)f(.)h(.)g(.)f(.) h(.)g(.)g(.)f(.)h(.)g(.)f(.)h(.)g(.)f(.)85 b(86)136 1581 y(8.2)94 b(Group)30 b(Mem)m(b)s(er)g(Routines)h(.)46 b(.)g(.)f(.)h(.)g(.)f(.)h(.)g(.)f(.)h(.)g(.)g(.)f(.)h(.)g(.)f(.)h(.)g (.)g(.)f(.)h(.)g(.)f(.)h(.)g(.)g(.)f(.)h(.)g(.)f(.)h(.)g(.)f(.)85 b(88)0 1849 y Fi(9)119 b(Sp)s(ecialized)36 b(CFITSIO)d(In)m(terface)h (Routines)1777 b(91)136 2013 y Fj(9.1)94 b(FITS)30 b(File)i(Access)f (Routines)g(.)46 b(.)f(.)h(.)g(.)f(.)h(.)g(.)f(.)h(.)g(.)g(.)f(.)h(.)g (.)f(.)h(.)g(.)g(.)f(.)h(.)g(.)f(.)h(.)g(.)g(.)f(.)h(.)g(.)f(.)h(.)g(.) f(.)85 b(91)136 2176 y(9.2)94 b(HDU)32 b(Access)f(Routines)72 b(.)46 b(.)g(.)g(.)f(.)h(.)g(.)f(.)h(.)g(.)f(.)h(.)g(.)g(.)f(.)h(.)g(.) f(.)h(.)g(.)g(.)f(.)h(.)g(.)f(.)h(.)g(.)g(.)f(.)h(.)g(.)f(.)h(.)g(.)f (.)85 b(95)136 2340 y(9.3)94 b(Sp)s(ecialized)32 b(Header)e(Keyw)m(ord) h(Routines)74 b(.)45 b(.)h(.)g(.)g(.)f(.)h(.)g(.)f(.)h(.)g(.)g(.)f(.)h (.)g(.)f(.)h(.)g(.)g(.)f(.)h(.)g(.)f(.)h(.)g(.)f(.)85 b(97)345 2503 y(9.3.1)106 b(Header)31 b(Information)f(Routines)64 b(.)46 b(.)f(.)h(.)g(.)g(.)f(.)h(.)g(.)f(.)h(.)g(.)g(.)f(.)h(.)g(.)f(.) h(.)g(.)g(.)f(.)h(.)g(.)f(.)h(.)g(.)f(.)85 b(97)345 2667 y(9.3.2)106 b(Read)31 b(and)f(W)-8 b(rite)31 b(the)g(Required)f(Keyw)m (ords)51 b(.)46 b(.)g(.)f(.)h(.)g(.)g(.)f(.)h(.)g(.)f(.)h(.)g(.)g(.)f (.)h(.)g(.)f(.)h(.)g(.)f(.)85 b(97)345 2830 y(9.3.3)106 b(W)-8 b(rite)32 b(Keyw)m(ord)e(Routines)c(.)46 b(.)f(.)h(.)g(.)f(.)h (.)g(.)g(.)f(.)h(.)g(.)f(.)h(.)g(.)g(.)f(.)h(.)g(.)f(.)h(.)g(.)g(.)f(.) h(.)g(.)f(.)h(.)g(.)f(.)85 b(99)345 2994 y(9.3.4)106 b(Insert)30 b(Keyw)m(ord)g(Routines)89 b(.)45 b(.)h(.)g(.)f(.)h(.)g(.)g (.)f(.)h(.)g(.)f(.)h(.)g(.)g(.)f(.)h(.)g(.)f(.)h(.)g(.)g(.)f(.)h(.)g(.) f(.)h(.)g(.)f(.)40 b(101)345 3157 y(9.3.5)106 b(Read)31 b(Keyw)m(ord)f(Routines)45 b(.)h(.)f(.)h(.)g(.)f(.)h(.)g(.)g(.)f(.)h(.) g(.)f(.)h(.)g(.)g(.)f(.)h(.)g(.)f(.)h(.)g(.)g(.)f(.)h(.)g(.)f(.)h(.)g (.)f(.)40 b(102)345 3321 y(9.3.6)106 b(Mo)s(dify)30 b(Keyw)m(ord)h (Routines)36 b(.)45 b(.)h(.)g(.)f(.)h(.)g(.)g(.)f(.)h(.)g(.)f(.)h(.)g (.)g(.)f(.)h(.)g(.)f(.)h(.)g(.)g(.)f(.)h(.)g(.)f(.)h(.)g(.)f(.)40 b(104)345 3484 y(9.3.7)106 b(Up)s(date)31 b(Keyw)m(ord)f(Routines)c(.) 45 b(.)h(.)g(.)f(.)h(.)g(.)g(.)f(.)h(.)g(.)f(.)h(.)g(.)g(.)f(.)h(.)g(.) f(.)h(.)g(.)g(.)f(.)h(.)g(.)f(.)h(.)g(.)f(.)40 b(105)136 3648 y(9.4)94 b(De\014ne)31 b(Data)h(Scaling)f(and)f(Unde\014ned)f (Pixel)i(P)m(arameters)43 b(.)j(.)g(.)g(.)f(.)h(.)g(.)f(.)h(.)g(.)g(.)f (.)h(.)g(.)f(.)h(.)g(.)f(.)40 b(106)136 3811 y(9.5)94 b(Sp)s(ecialized)32 b(FITS)d(Primary)h(Arra)m(y)h(or)f(IMA)m(GE)h (Extension)g(I/O)f(Routines)55 b(.)46 b(.)f(.)h(.)g(.)f(.)h(.)g(.)f(.) 40 b(107)136 3975 y(9.6)94 b(Sp)s(ecialized)32 b(FITS)d(ASCI)s(I)g(and) h(Binary)g(T)-8 b(able)31 b(Routines)87 b(.)46 b(.)g(.)g(.)f(.)h(.)g(.) f(.)h(.)g(.)g(.)f(.)h(.)g(.)f(.)h(.)g(.)f(.)40 b(110)345 4138 y(9.6.1)106 b(General)32 b(Column)d(Routines)51 b(.)45 b(.)h(.)g(.)f(.)h(.)g(.)g(.)f(.)h(.)g(.)f(.)h(.)g(.)g(.)f(.)h(.) g(.)f(.)h(.)g(.)g(.)f(.)h(.)g(.)f(.)h(.)g(.)f(.)40 b(110)345 4302 y(9.6.2)106 b(Lo)m(w-Lev)m(el)33 b(T)-8 b(able)31 b(Access)g(Routines)40 b(.)46 b(.)g(.)g(.)f(.)h(.)g(.)f(.)h(.)g(.)g(.)f (.)h(.)g(.)f(.)h(.)g(.)g(.)f(.)h(.)g(.)f(.)h(.)g(.)f(.)40 b(112)345 4465 y(9.6.3)106 b(W)-8 b(rite)32 b(Column)e(Data)i(Routines) 52 b(.)46 b(.)f(.)h(.)g(.)g(.)f(.)h(.)g(.)f(.)h(.)g(.)g(.)f(.)h(.)g(.)f (.)h(.)g(.)g(.)f(.)h(.)g(.)f(.)h(.)g(.)f(.)40 b(112)345 4629 y(9.6.4)106 b(Read)31 b(Column)e(Data)j(Routines)72 b(.)46 b(.)f(.)h(.)g(.)g(.)f(.)h(.)g(.)f(.)h(.)g(.)g(.)f(.)h(.)g(.)f(.) h(.)g(.)g(.)f(.)h(.)g(.)f(.)h(.)g(.)f(.)40 b(113)0 4896 y Fi(10)67 b(Extended)35 b(File)f(Name)h(Syn)m(tax)2278 b(117)136 5060 y Fj(10.1)49 b(Ov)m(erview)84 b(.)46 b(.)g(.)g(.)f(.)h (.)g(.)f(.)h(.)g(.)g(.)f(.)h(.)g(.)f(.)h(.)g(.)f(.)h(.)g(.)g(.)f(.)h(.) g(.)f(.)h(.)g(.)g(.)f(.)h(.)g(.)f(.)h(.)g(.)g(.)f(.)h(.)g(.)f(.)h(.)g (.)f(.)40 b(117)136 5223 y(10.2)49 b(Filet)m(yp)s(e)62 b(.)45 b(.)h(.)g(.)g(.)f(.)h(.)g(.)f(.)h(.)g(.)g(.)f(.)h(.)g(.)f(.)h(.) g(.)f(.)h(.)g(.)g(.)f(.)h(.)g(.)f(.)h(.)g(.)g(.)f(.)h(.)g(.)f(.)h(.)g (.)g(.)f(.)h(.)g(.)f(.)h(.)g(.)f(.)40 b(120)345 5387 y(10.2.1)61 b(Notes)32 b(ab)s(out)e(HTTP)g(pro)m(xy)g(serv)m(ers)k(.)46 b(.)g(.)g(.)f(.)h(.)g(.)f(.)h(.)g(.)g(.)f(.)h(.)g(.)f(.)h(.)g(.)g(.)f (.)h(.)g(.)f(.)h(.)g(.)f(.)40 b(120)345 5550 y(10.2.2)61 b(Notes)32 b(ab)s(out)e(the)h(stream)f(\014let)m(yp)s(e)h(driv)m(er)54 b(.)45 b(.)h(.)g(.)f(.)h(.)g(.)g(.)f(.)h(.)g(.)f(.)h(.)g(.)g(.)f(.)h(.) g(.)f(.)h(.)g(.)f(.)40 b(121)345 5714 y(10.2.3)61 b(Notes)32 b(ab)s(out)e(the)h(gsiftp)f(\014let)m(yp)s(e)83 b(.)45 b(.)h(.)g(.)g(.)f(.)h(.)g(.)f(.)h(.)g(.)g(.)f(.)h(.)g(.)f(.)h(.)g(.)g (.)f(.)h(.)g(.)f(.)h(.)g(.)f(.)40 b(122)p eop end %%Page: 6 6 TeXDict begin 6 5 bop 0 299 a Fj(vi)3311 b Fh(CONTENTS)345 555 y Fj(10.2.4)61 b(Notes)32 b(ab)s(out)e(the)h(ro)s(ot)f(\014let)m (yp)s(e)68 b(.)46 b(.)f(.)h(.)g(.)g(.)f(.)h(.)g(.)f(.)h(.)g(.)g(.)f(.)h (.)g(.)f(.)h(.)g(.)g(.)f(.)h(.)g(.)f(.)h(.)g(.)f(.)40 b(122)345 716 y(10.2.5)61 b(Notes)32 b(ab)s(out)e(the)h(shmem)e (\014let)m(yp)s(e:)70 b(.)46 b(.)g(.)g(.)f(.)h(.)g(.)f(.)h(.)g(.)g(.)f (.)h(.)g(.)f(.)h(.)g(.)g(.)f(.)h(.)g(.)f(.)h(.)g(.)f(.)40 b(124)136 876 y(10.3)49 b(Base)32 b(Filename)90 b(.)45 b(.)h(.)g(.)f(.)h(.)g(.)g(.)f(.)h(.)g(.)f(.)h(.)g(.)f(.)h(.)g(.)g(.)f (.)h(.)g(.)f(.)h(.)g(.)g(.)f(.)h(.)g(.)f(.)h(.)g(.)g(.)f(.)h(.)g(.)f(.) h(.)g(.)f(.)40 b(124)136 1037 y(10.4)49 b(Output)30 b(File)h(Name)g (when)f(Op)s(ening)f(an)h(Existing)h(File)81 b(.)45 b(.)h(.)g(.)g(.)f (.)h(.)g(.)f(.)h(.)g(.)g(.)f(.)h(.)g(.)f(.)h(.)g(.)f(.)40 b(126)136 1197 y(10.5)49 b(T)-8 b(emplate)32 b(File)g(Name)f(when)e (Creating)i(a)g(New)f(File)57 b(.)46 b(.)g(.)f(.)h(.)g(.)g(.)f(.)h(.)g (.)f(.)h(.)g(.)g(.)f(.)h(.)g(.)f(.)h(.)g(.)f(.)40 b(128)136 1358 y(10.6)49 b(Image)32 b(Tile-Compression)e(Sp)s(eci\014cation)91 b(.)45 b(.)h(.)g(.)g(.)f(.)h(.)g(.)f(.)h(.)g(.)g(.)f(.)h(.)g(.)f(.)h(.) g(.)g(.)f(.)h(.)g(.)f(.)h(.)g(.)f(.)40 b(128)136 1518 y(10.7)49 b(HDU)32 b(Lo)s(cation)f(Sp)s(eci\014cation)47 b(.)e(.)h(.)g(.)f(.)h(.)g(.)f(.)h(.)g(.)g(.)f(.)h(.)g(.)f(.)h(.)g(.)g (.)f(.)h(.)g(.)f(.)h(.)g(.)g(.)f(.)h(.)g(.)f(.)h(.)g(.)f(.)40 b(128)136 1678 y(10.8)49 b(Image)32 b(Section)39 b(.)46 b(.)f(.)h(.)g(.)f(.)h(.)g(.)g(.)f(.)h(.)g(.)f(.)h(.)g(.)f(.)h(.)g(.)g (.)f(.)h(.)g(.)f(.)h(.)g(.)g(.)f(.)h(.)g(.)f(.)h(.)g(.)g(.)f(.)h(.)g(.) f(.)h(.)g(.)f(.)40 b(130)136 1839 y(10.9)49 b(Image)32 b(T)-8 b(ransform)29 b(Filters)54 b(.)46 b(.)g(.)f(.)h(.)g(.)f(.)h(.)g (.)f(.)h(.)g(.)g(.)f(.)h(.)g(.)f(.)h(.)g(.)g(.)f(.)h(.)g(.)f(.)h(.)g(.) g(.)f(.)h(.)g(.)f(.)h(.)g(.)f(.)40 b(131)136 1999 y(10.10)t(Column)30 b(and)g(Keyw)m(ord)g(Filtering)h(Sp)s(eci\014cation)91 b(.)45 b(.)h(.)g(.)f(.)h(.)g(.)g(.)f(.)h(.)g(.)f(.)h(.)g(.)g(.)f(.)h(.) g(.)f(.)h(.)g(.)f(.)40 b(132)136 2160 y(10.11)t(Ro)m(w)31 b(Filtering)h(Sp)s(eci\014cation)82 b(.)45 b(.)h(.)g(.)f(.)h(.)g(.)f(.) h(.)g(.)g(.)f(.)h(.)g(.)f(.)h(.)g(.)g(.)f(.)h(.)g(.)f(.)h(.)g(.)g(.)f (.)h(.)g(.)f(.)h(.)g(.)f(.)40 b(134)345 2320 y(10.11.1)16 b(General)32 b(Syn)m(tax)44 b(.)i(.)g(.)g(.)f(.)h(.)g(.)f(.)h(.)g(.)f (.)h(.)g(.)g(.)f(.)h(.)g(.)f(.)h(.)g(.)g(.)f(.)h(.)g(.)f(.)h(.)g(.)g(.) f(.)h(.)g(.)f(.)h(.)g(.)f(.)40 b(135)345 2481 y(10.11.2)16 b(Bit)32 b(Masks)43 b(.)j(.)g(.)f(.)h(.)g(.)g(.)f(.)h(.)g(.)f(.)h(.)g (.)f(.)h(.)g(.)g(.)f(.)h(.)g(.)f(.)h(.)g(.)g(.)f(.)h(.)g(.)f(.)h(.)g(.) g(.)f(.)h(.)g(.)f(.)h(.)g(.)f(.)40 b(138)345 2641 y(10.11.3)16 b(V)-8 b(ector)32 b(Columns)92 b(.)46 b(.)g(.)f(.)h(.)g(.)f(.)h(.)g(.)f (.)h(.)g(.)g(.)f(.)h(.)g(.)f(.)h(.)g(.)g(.)f(.)h(.)g(.)f(.)h(.)g(.)g(.) f(.)h(.)g(.)f(.)h(.)g(.)f(.)40 b(138)345 2802 y(10.11.4)16 b(Go)s(o)s(d)30 b(Time)h(In)m(terv)-5 b(al)31 b(Filtering)62 b(.)46 b(.)f(.)h(.)g(.)g(.)f(.)h(.)g(.)f(.)h(.)g(.)g(.)f(.)h(.)g(.)f(.) h(.)g(.)g(.)f(.)h(.)g(.)f(.)h(.)g(.)f(.)40 b(140)345 2962 y(10.11.5)16 b(Spatial)31 b(Region)h(Filtering)59 b(.)46 b(.)f(.)h(.)g(.)f(.)h(.)g(.)g(.)f(.)h(.)g(.)f(.)h(.)g(.)g(.)f(.) h(.)g(.)f(.)h(.)g(.)g(.)f(.)h(.)g(.)f(.)h(.)g(.)f(.)40 b(141)345 3123 y(10.11.6)16 b(Example)31 b(Ro)m(w)g(Filters)h(.)45 b(.)h(.)g(.)f(.)h(.)g(.)f(.)h(.)g(.)g(.)f(.)h(.)g(.)f(.)h(.)g(.)g(.)f (.)h(.)g(.)f(.)h(.)g(.)g(.)f(.)h(.)g(.)f(.)h(.)g(.)f(.)40 b(143)136 3283 y(10.12)35 b(Binning)30 b(or)g(Histogramming)i(Sp)s (eci\014cation)f(.)46 b(.)g(.)g(.)f(.)h(.)g(.)f(.)h(.)g(.)g(.)f(.)h(.)g (.)f(.)h(.)g(.)g(.)f(.)h(.)g(.)f(.)h(.)g(.)f(.)40 b(144)0 3536 y Fi(11)32 b(T)-9 b(emplate)35 b(Files)2933 b(147)136 3696 y Fj(11.1)49 b(Detailed)33 b(T)-8 b(emplate)31 b(Line)g(F)-8 b(ormat)48 b(.)e(.)f(.)h(.)g(.)f(.)h(.)g(.)g(.)f(.)h(.)g(.)f(.)h(.)g(.) g(.)f(.)h(.)g(.)f(.)h(.)g(.)g(.)f(.)h(.)g(.)f(.)h(.)g(.)f(.)40 b(147)136 3857 y(11.2)49 b(Auto-indexing)31 b(of)g(Keyw)m(ords)73 b(.)45 b(.)h(.)g(.)f(.)h(.)g(.)f(.)h(.)g(.)g(.)f(.)h(.)g(.)f(.)h(.)g(.) g(.)f(.)h(.)g(.)f(.)h(.)g(.)g(.)f(.)h(.)g(.)f(.)h(.)g(.)f(.)40 b(148)136 4017 y(11.3)49 b(T)-8 b(emplate)32 b(P)m(arser)f(Directiv)m (es)87 b(.)45 b(.)h(.)g(.)f(.)h(.)g(.)f(.)h(.)g(.)g(.)f(.)h(.)g(.)f(.)h (.)g(.)g(.)f(.)h(.)g(.)f(.)h(.)g(.)g(.)f(.)h(.)g(.)f(.)h(.)g(.)f(.)40 b(149)136 4178 y(11.4)49 b(F)-8 b(ormal)32 b(T)-8 b(emplate)32 b(Syn)m(tax)i(.)46 b(.)g(.)f(.)h(.)g(.)f(.)h(.)g(.)f(.)h(.)g(.)g(.)f(.) h(.)g(.)f(.)h(.)g(.)g(.)f(.)h(.)g(.)f(.)h(.)g(.)g(.)f(.)h(.)g(.)f(.)h (.)g(.)f(.)40 b(149)136 4338 y(11.5)49 b(Errors)63 b(.)46 b(.)f(.)h(.)g(.)g(.)f(.)h(.)g(.)f(.)h(.)g(.)g(.)f(.)h(.)g(.)f(.)h(.)g (.)f(.)h(.)g(.)g(.)f(.)h(.)g(.)f(.)h(.)g(.)g(.)f(.)h(.)g(.)f(.)h(.)g(.) g(.)f(.)h(.)g(.)f(.)h(.)g(.)f(.)40 b(150)136 4498 y(11.6)49 b(Examples)72 b(.)46 b(.)g(.)g(.)f(.)h(.)g(.)f(.)h(.)g(.)g(.)f(.)h(.)g (.)f(.)h(.)g(.)f(.)h(.)g(.)g(.)f(.)h(.)g(.)f(.)h(.)g(.)g(.)f(.)h(.)g(.) f(.)h(.)g(.)g(.)f(.)h(.)g(.)f(.)h(.)g(.)f(.)40 b(150)0 4751 y Fi(12)67 b(Lo)s(cal)35 b(FITS)g(Con)m(v)m(en)m(tions)2462 b(153)136 4912 y Fj(12.1)49 b(64-Bit)33 b(Long)e(In)m(tegers)61 b(.)45 b(.)h(.)g(.)g(.)f(.)h(.)g(.)f(.)h(.)g(.)f(.)h(.)g(.)g(.)f(.)h(.) g(.)f(.)h(.)g(.)g(.)f(.)h(.)g(.)f(.)h(.)g(.)g(.)f(.)h(.)g(.)f(.)h(.)g (.)f(.)40 b(153)136 5072 y(12.2)49 b(Long)31 b(String)f(Keyw)m(ord)g(V) -8 b(alues.)65 b(.)46 b(.)g(.)f(.)h(.)g(.)f(.)h(.)g(.)g(.)f(.)h(.)g(.)f (.)h(.)g(.)g(.)f(.)h(.)g(.)f(.)h(.)g(.)g(.)f(.)h(.)g(.)f(.)h(.)g(.)f(.) 40 b(153)136 5232 y(12.3)49 b(Arra)m(ys)31 b(of)f(Fixed-Length)i (Strings)d(in)h(Binary)h(T)-8 b(ables)78 b(.)46 b(.)f(.)h(.)g(.)g(.)f (.)h(.)g(.)f(.)h(.)g(.)g(.)f(.)h(.)g(.)f(.)h(.)g(.)f(.)40 b(155)136 5393 y(12.4)49 b(Keyw)m(ord)31 b(Units)f(Strings)41 b(.)46 b(.)g(.)g(.)f(.)h(.)g(.)f(.)h(.)g(.)f(.)h(.)g(.)g(.)f(.)h(.)g(.) f(.)h(.)g(.)g(.)f(.)h(.)g(.)f(.)h(.)g(.)g(.)f(.)h(.)g(.)f(.)h(.)g(.)f (.)40 b(155)136 5553 y(12.5)49 b(HIERAR)m(CH)31 b(Con)m(v)m(en)m(tion)h (for)e(Extended)g(Keyw)m(ord)g(Names)91 b(.)46 b(.)f(.)h(.)g(.)f(.)h(.) g(.)g(.)f(.)h(.)g(.)f(.)h(.)g(.)f(.)40 b(156)136 5714 y(12.6)49 b(Tile-Compressed)31 b(Image)g(F)-8 b(ormat)52 b(.)46 b(.)f(.)h(.)g(.)f(.)h(.)g(.)g(.)f(.)h(.)g(.)f(.)h(.)g(.)g(.)f(.) h(.)g(.)f(.)h(.)g(.)g(.)f(.)h(.)g(.)f(.)h(.)g(.)f(.)40 b(156)p eop end %%Page: 7 7 TeXDict begin 7 6 bop 0 299 a Fh(CONTENTS)3284 b Fj(vii)0 555 y Fi(13)67 b(Optimizing)35 b(Programs)2589 b(159)136 715 y Fj(13.1)49 b(Ho)m(w)32 b(CFITSIO)c(Manages)k(Data)g(I/O)78 b(.)46 b(.)g(.)f(.)h(.)g(.)g(.)f(.)h(.)g(.)f(.)h(.)g(.)g(.)f(.)h(.)g(.) f(.)h(.)g(.)g(.)f(.)h(.)g(.)f(.)h(.)g(.)f(.)40 b(159)136 876 y(13.2)49 b(Optimization)32 b(Strategies)77 b(.)46 b(.)g(.)f(.)h(.)g(.)f(.)h(.)g(.)f(.)h(.)g(.)g(.)f(.)h(.)g(.)f(.)h(.)g (.)g(.)f(.)h(.)g(.)f(.)h(.)g(.)g(.)f(.)h(.)g(.)f(.)h(.)g(.)f(.)40 b(160)0 1127 y Fi(A)57 b(Index)35 b(of)g(Routines)2789 b(165)0 1378 y(B)62 b(P)m(arameter)35 b(De\014nitions)2598 b(171)0 1629 y(C)60 b(CFITSIO)33 b(Error)i(Status)f(Co)s(des)2255 b(177)p eop end %%Page: 8 8 TeXDict begin 8 7 bop 0 299 a Fj(viii)3261 b Fh(CONTENTS)p eop end %%Page: 1 9 TeXDict begin 1 8 bop 0 1225 a Fg(Chapter)65 b(1)0 1687 y Fm(In)-6 b(tro)6 b(duction)0 2216 y Ff(1.1)180 b(A)45 b(Brief)g(Ov)l(erview)0 2495 y Fj(CFITSIO)38 b(is)i(a)g(mac)m (hine-indep)s(enden)m(t)g(library)f(of)h(routines)f(for)h(reading)g (and)f(writing)g(data)i(\014les)e(in)h(the)0 2608 y(FITS)35 b(\(Flexible)i(Image)f(T)-8 b(ransp)s(ort)34 b(System\))h(data)h (format.)56 b(It)35 b(can)h(also)g(read)f(IRAF)h(format)f(image)i (\014les)0 2721 y(and)f(ra)m(w)h(binary)f(data)h(arra)m(ys)g(b)m(y)g (con)m(v)m(erting)i(them)d(on)h(the)g(\015y)f(in)m(to)i(a)f(virtual)g (FITS)f(format)h(\014le.)60 b(This)0 2833 y(library)32 b(is)h(written)g(in)f(ANSI)h(C)f(and)g(pro)m(vides)h(a)g(p)s(o)m(w)m (erful)f(y)m(et)i(simple)f(in)m(terface)h(for)f(accessing)h(FITS)e (\014les)0 2946 y(whic)m(h)k(will)h(run)e(on)h(most)h(commonly)g(used)f (computers)g(and)g(w)m(orkstations.)60 b(CFITSIO)35 b(supp)s(orts)f (all)k(the)0 3059 y(features)26 b(describ)s(ed)e(in)h(the)g(o\016cial)i (NOST)d(de\014nition)h(of)h(the)f(FITS)g(format)h(and)e(can)i(read)f (and)g(write)h(all)g(the)0 3172 y(curren)m(tly)c(de\014ned)e(t)m(yp)s (es)i(of)g(extensions,)i(including)d(ASCI)s(I)g(tables)h(\(T)-8 b(ABLE\),)23 b(Binary)f(tables)h(\(BINT)-8 b(ABLE\))0 3285 y(and)27 b(IMA)m(GE)h(extensions.)40 b(The)27 b(CFITSIO)f (routines)h(insulate)h(the)f(programmer)g(from)g(ha)m(ving)g(to)h(deal) g(with)0 3398 y(the)d(complicated)h(formatting)g(details)f(in)f(the)h (FITS)f(\014le,)i(ho)m(w)m(ev)m(er,)i(it)d(is)f(assumed)g(that)h(users) f(ha)m(v)m(e)i(a)f(general)0 3511 y(kno)m(wledge)31 b(ab)s(out)f(the)h (structure)f(and)g(usage)h(of)f(FITS)g(\014les.)0 3671 y(CFITSIO)k(also)j(con)m(tains)h(a)e(set)h(of)f(F)-8 b(ortran)36 b(callable)i(wrapp)s(er)d(routines)g(whic)m(h)h(allo)m(w)i (F)-8 b(ortran)36 b(programs)0 3784 y(to)31 b(call)g(the)f(CFITSIO)e (routines.)41 b(See)30 b(the)g(companion)g(\\FITSIO)f(User's)h(Guide")g (for)g(the)g(de\014nition)g(of)g(the)0 3897 y(F)-8 b(ortran)39 b(subroutine)d(calling)k(sequences.)63 b(These)38 b(wrapp)s(ers)e (replace)j(the)f(older)g(F)-8 b(ortran)39 b(FITSIO)d(library)0 4010 y(whic)m(h)30 b(is)h(no)f(longer)h(supp)s(orted.)0 4170 y(The)20 b(CFITSIO)f(pac)m(k)-5 b(age)23 b(w)m(as)e(initially)i (dev)m(elop)s(ed)e(b)m(y)f(the)h(HEASAR)m(C)g(\(High)h(Energy)e (Astroph)m(ysics)h(Science)0 4283 y(Arc)m(hiv)m(e)35 b(Researc)m(h)g(Cen)m(ter\))f(at)h(the)f(NASA)g(Go)s(ddard)e(Space)j (Fligh)m(t)g(Cen)m(ter)f(to)h(con)m(v)m(ert)g(v)-5 b(arious)34 b(existing)0 4396 y(and)25 b(newly)h(acquired)g(astronomical)i(data)e (sets)h(in)m(to)g(FITS)e(format)h(and)f(to)i(further)e(analyze)i(data)g (already)f(in)0 4509 y(FITS)h(format.)41 b(New)28 b(features)g(con)m (tin)m(ue)h(to)g(b)s(e)e(added)h(to)g(CFITSIO)f(in)g(large)i(part)f (due)g(to)g(con)m(tributions)h(of)0 4622 y(ideas)k(or)g(actual)h(co)s (de)f(from)f(users)g(of)h(the)g(pac)m(k)-5 b(age.)49 b(The)33 b(In)m(tegral)h(Science)f(Data)h(Cen)m(ter)f(in)g (Switzerland,)0 4734 y(and)g(the)g(XMM/ESTEC)h(pro)5 b(ject)34 b(in)f(The)g(Netherlands)g(made)g(esp)s(ecially)i (signi\014can)m(t)f(con)m(tributions)g(that)0 4847 y(resulted)c(in)g (man)m(y)h(of)f(the)h(new)f(features)g(that)h(app)s(eared)f(in)g(v2.0)i (of)e(CFITSIO.)0 5322 y Ff(1.2)135 b(Sources)45 b(of)g(FITS)f(Soft)l(w) l(are)i(and)f(Information)0 5601 y Fj(The)22 b(latest)i(v)m(ersion)f (of)g(the)f(CFITSIO)f(source)i(co)s(de,)h(do)s(cumen)m(tation,)i(and)21 b(example)j(programs)e(are)h(a)m(v)-5 b(ailable)0 5714 y(on)30 b(the)h(W)-8 b(orld-Wide)32 b(W)-8 b(eb)31 b(or)f(via)h(anon)m (ymous)f(ftp)g(from:)1927 5942 y(1)p eop end %%Page: 2 10 TeXDict begin 2 9 bop 0 299 a Fj(2)2452 b Fh(CHAPTER)30 b(1.)71 b(INTR)m(ODUCTION)382 555 y Fe(http://heasarc.gsfc.nasa)o(.go)o (v/fi)o(tsio)382 668 y(ftp://legacy.gsfc.nasa.g)o(ov/)o(soft)o(ware)o (/fi)o(tsio)o(/c)0 959 y Fj(An)m(y)28 b(questions,)g(bug)f(rep)s(orts,) h(or)f(suggested)i(enhancemen)m(ts)f(related)g(to)h(the)e(CFITSIO)f (pac)m(k)-5 b(age)30 b(should)d(b)s(e)0 1072 y(sen)m(t)k(to)g(the)g (primary)e(author:)382 1362 y Fe(Dr.)47 b(William)f(Pence)810 b(Telephone:)92 b(\(301\))47 b(286-4599)382 1475 y(HEASARC,)e(Code)i (662)811 b(E-mail:)45 b(William.D.Pence@nasa.gov)382 1588 y(NASA/Goddard)f(Space)j(Flight)f(Center)382 1701 y(Greenbelt,)f(MD)i(20771,)f(USA)0 1992 y Fj(This)40 b(User's)i(Guide)f(assumes)g(that)h(readers)f(already)g(ha)m(v)m(e)i(a) f(general)g(understanding)d(of)j(the)f(de\014nition)0 2104 y(and)31 b(structure)g(of)h(FITS)e(format)i(\014les.)44 b(F)-8 b(urther)32 b(information)f(ab)s(out)h(FITS)f(formats)g(is)h(a)m (v)-5 b(ailable)34 b(from)d(the)0 2217 y(FITS)h(Supp)s(ort)f(O\016ce)i (at)g Fe(http://fits.gsfc.nasa.gov)o Fj(.)42 b(In)32 b(particular,)i(the)f('NOST)f(FITS)g(Standard')0 2330 y(giv)m(es)j(the)g(authoritativ)m(e)h(de\014nition)e(of)g(the)g(FITS)g (data)h(format,)g(and)f(the)g(`FITS)g(User's)g(Guide')g(pro)m(vides)0 2443 y(additional)d(historical)h(bac)m(kground)e(and)g(practical)i (advice)f(on)f(using)g(FITS)g(\014les.)0 2603 y(The)38 b(HEASAR)m(C)g(also)i(pro)m(vides)e(a)h(v)m(ery)g(sophisticated)h(FITS) d(\014le)i(analysis)g(program)f(called)i(`Fv')f(whic)m(h)0 2716 y(can)34 b(b)s(e)f(used)g(to)h(displa)m(y)g(and)f(edit)h(the)g (con)m(ten)m(ts)i(of)e(an)m(y)g(FITS)f(\014le)g(as)h(w)m(ell)h(as)f (construct)g(new)f(FITS)g(\014les)0 2829 y(from)j(scratc)m(h.)61 b(The)36 b(displa)m(y)h(functions)f(in)g(Fv)h(allo)m(w)h(users)e(to)i (in)m(teractiv)m(ely)h(adjust)d(the)h(brigh)m(tness)g(and)0 2942 y(con)m(trast)h(of)f(images,)i(pan,)f(zo)s(om,)h(and)d(blink)g (images,)k(and)c(measure)h(the)f(p)s(ositions)h(and)f(brigh)m(tnesses)h (of)0 3055 y(ob)5 b(jects)33 b(within)f(images.)47 b(FITS)31 b(tables)i(can)g(b)s(e)e(displa)m(y)m(ed)i(lik)m(e)h(a)e(spread)g (sheet,)h(and)f(then)f(mo)s(di\014ed)g(using)0 3168 y(p)s(o)m(w)m (erful)26 b(calculator)j(and)c(sorting)i(functions.)39 b(Fv)27 b(is)f(freely)h(a)m(v)-5 b(ailable)29 b(for)d(most)h(Unix)f (platforms,)i(Mac)f(PCs,)0 3281 y(and)34 b(Windo)m(ws)g(PCs.)52 b(CFITSIO)33 b(users)h(ma)m(y)h(also)g(b)s(e)f(in)m(terested)i(in)e (the)g(FTOOLS)f(pac)m(k)-5 b(age)37 b(of)d(programs)0 3394 y(that)27 b(can)f(b)s(e)g(used)f(to)i(manipulate)g(and)e(analyze)j (FITS)d(format)i(\014les.)39 b(Fv)27 b(and)e(FTOOLS)g(are)i(a)m(v)-5 b(ailable)28 b(from)0 3507 y(their)i(resp)s(ectiv)m(e)i(W)-8 b(eb)31 b(sites)g(at:)382 3797 y Fe(http://fv.gsfc.nasa.gov)382 3910 y(http://heasarc.gsfc.nasa)o(.go)o(v/ft)o(ools)0 4280 y Ff(1.3)135 b(Ac)l(kno)l(wledgmen)l(ts)0 4538 y Fj(The)27 b(dev)m(elopmen)m(t)h(of)g(the)f(man)m(y)g(p)s(o)m(w)m(erful) g(features)h(in)f(CFITSIO)e(w)m(as)j(made)f(p)s(ossible)g(through)f (collab)s(ora-)0 4650 y(tions)33 b(with)e(man)m(y)i(p)s(eople)f(or)g (organizations)i(from)e(around)f(the)h(w)m(orld.)46 b(The)32 b(follo)m(wing)h(in)f(particular)h(ha)m(v)m(e)0 4763 y(made)d(esp)s(ecially)i(signi\014can)m(t)f(con)m(tributions:)0 4924 y(Programmers)25 b(from)h(the)f(In)m(tegral)i(Science)g(Data)g (Cen)m(ter,)g(Switzerland)f(\(namely)-8 b(,)28 b(Jurek)c(Bork)m(o)m (wski,)29 b(Bruce)0 5036 y(O'Neel,)34 b(and)e(Don)h(Jennings\),)f (designed)g(the)h(concept)g(for)f(the)h(plug-in)f(I/O)g(driv)m(ers)g (that)h(w)m(as)g(in)m(tro)s(duced)0 5149 y(with)i(CFITSIO)e(2.0.)56 b(The)34 b(use)h(of)g(`driv)m(ers')g(greatly)h(simpli\014ed)f(the)g(lo) m(w-lev)m(el)j(I/O,)d(whic)m(h)f(in)h(turn)f(made)0 5262 y(other)40 b(new)f(features)i(in)e(CFITSIO)f(\(e.g.,)45 b(supp)s(ort)38 b(for)h(compressed)h(FITS)f(\014les)h(and)f(supp)s(ort) f(for)i(IRAF)0 5375 y(format)32 b(image)g(\014les\))g(m)m(uc)m(h)f (easier)i(to)f(implemen)m(t.)44 b(Jurek)31 b(Bork)m(o)m(wski)h(wrote)g (the)g(Shared)e(Memory)i(driv)m(er,)0 5488 y(and)23 b(Bruce)i(O'Neel)g (wrote)f(the)g(driv)m(ers)g(for)f(accessing)j(FITS)d(\014les)h(o)m(v)m (er)h(the)f(net)m(w)m(ork)h(using)e(the)i(FTP)-8 b(,)24 b(HTTP)-8 b(,)0 5601 y(and)26 b(R)m(OOT)g(proto)s(cols.)41 b(Also,)28 b(in)e(2009,)k(Bruce)d(O'Neel)h(w)m(as)f(the)g(k)m(ey)g(dev) m(elop)s(er)g(of)g(the)g(thread-safe)g(v)m(ersion)0 5714 y(of)k(CFITSIO.)p eop end %%Page: 3 11 TeXDict begin 3 10 bop 0 299 a Fh(1.3.)72 b(A)m(CKNO)m(WLEDGMENTS)2623 b Fj(3)0 555 y(The)45 b(ISDC)g(also)h(pro)m(vided)f(the)h(template)h (parsing)e(routines)g(\(written)h(b)m(y)f(Jurek)g(Bork)m(o)m(wski\))i (and)e(the)0 668 y(hierarc)m(hical)39 b(grouping)d(routines)h (\(written)h(b)m(y)f(Don)h(Jennings\).)60 b(The)37 b(ISDC)f(D)m(AL)i (\(Data)h(Access)f(La)m(y)m(er\))0 781 y(routines)30 b(are)h(la)m(y)m(ered)h(on)e(top)h(of)f(CFITSIO)f(and)h(mak)m(e)h (extensiv)m(e)h(use)e(of)h(these)g(features.)0 941 y(Giuliano)g(T)-8 b(a\013oni)31 b(and)f(Andrea)g(Barisani,)i(at)f(INAF,)g(Univ)m(ersit)m (y)h(of)e(T)-8 b(rieste,)32 b(Italy)-8 b(,)32 b(implemen)m(ted)e(the)h (I/O)0 1054 y(driv)m(er)f(routines)g(for)h(accessing)g(FITS)f(\014les)g (on)h(the)f(computational)i(grids)e(using)g(the)h(gridftp)e(proto)s (col.)0 1214 y(Uw)m(e)c(Lammers)e(\(XMM/ESA/ESTEC,)h(The)g (Netherlands\))g(designed)g(the)g(high-p)s(erformance)f(lexical)j (pars-)0 1327 y(ing)42 b(algorithm)h(that)f(is)g(used)f(to)i(do)e (on-the-\015y)h(\014ltering)g(of)g(FITS)f(tables.)76 b(This)41 b(algorithm)i(essen)m(tially)0 1440 y(pre-compiles)36 b(the)g(user-supplied)e(selection)k(expression)d(in)m(to)i(a)f(form)g (that)g(can)g(b)s(e)f(rapidly)g(ev)-5 b(aluated)37 b(for)0 1553 y(eac)m(h)31 b(ro)m(w.)40 b(P)m(eter)31 b(Wilson)f(\(RSTX,)f (NASA/GSF)m(C\))i(then)e(wrote)h(the)g(parsing)f(routines)g(used)g(b)m (y)g(CFITSIO)0 1666 y(based)i(on)f(Lammers')h(design,)g(com)m(bined)g (with)g(other)g(tec)m(hniques)g(suc)m(h)g(as)g(the)g(CFITSIO)f (iterator)i(routine)0 1779 y(to)g(further)e(enhance)h(the)h(data)g(pro) s(cessing)f(throughput.)42 b(This)31 b(e\013ort)h(also)g(b)s (ene\014ted)e(from)h(a)h(m)m(uc)m(h)f(earlier)0 1892 y(lexical)25 b(parsing)f(routine)f(that)h(w)m(as)g(dev)m(elop)s(ed)g(b) m(y)g(Ken)m(t)g(Blac)m(kburn)f(\(NASA/GSF)m(C\).)i(More)g(recen)m(tly) -8 b(,)27 b(Craig)0 2005 y(Markw)m(ardt)i(\(NASA/GSF)m(C\))g(implemen)m (ted)g(additional)g(functions)f(\(median,)h(a)m(v)m(erage,)j(stddev\))c (and)g(other)0 2118 y(enhancemen)m(ts)j(to)g(the)g(lexical)h(parser.)0 2278 y(The)40 b(CFITSIO)g(iterator)i(function)e(is)h(lo)s(osely)h (based)f(on)f(similar)i(ideas)f(dev)m(elop)s(ed)g(for)g(the)g(XMM)g (Data)0 2391 y(Access)31 b(La)m(y)m(er.)0 2551 y(P)m(eter)25 b(Wilson)g(\(RSTX,)f(NASA/GSF)m(C\))h(wrote)g(the)f(complete)i(set)e (of)h(F)-8 b(ortran-callable)27 b(wrapp)s(ers)22 b(for)i(all)h(the)0 2664 y(CFITSIO)k(routines,)h(whic)m(h)g(in)g(turn)g(rely)g(on)h(the)f (CF)m(OR)-8 b(TRAN)31 b(macro)g(dev)m(elop)s(ed)g(b)m(y)f(Burkhard)f (Buro)m(w.)0 2824 y(The)h(syn)m(tax)i(used)e(b)m(y)h(CFITSIO)f(for)g (\014ltering)i(or)f(binning)e(input)h(FITS)h(\014les)g(is)g(based)f(on) h(ideas)h(dev)m(elop)s(ed)0 2937 y(for)41 b(the)g(AXAF)h(Science)g(Cen) m(ter)g(Data)h(Mo)s(del)e(b)m(y)g(Jonathan)g(McDo)m(w)m(ell,)47 b(An)m(tonella)c(F)-8 b(ruscione,)45 b(Aneta)0 3050 y(Siemigino)m(wsk) -5 b(a)27 b(and)e(Bill)i(Jo)m(y)m(e.)41 b(See)26 b(h)m (ttp://heasarc.gsfc.nasa.go)m(v/do)s(cs/journal/axa)q(f7.h)m(t)q(ml)32 b(for)25 b(further)0 3163 y(description)30 b(of)h(the)g(AXAF)g(Data)h (Mo)s(del.)0 3323 y(The)j(\014le)g(decompression)g(co)s(de)g(w)m(ere)h (tak)m(en)g(directly)g(from)e(the)i(gzip)f(\(GNU)h(zip\))g(program)f (dev)m(elop)s(ed)g(b)m(y)0 3436 y(Jean-loup)30 b(Gailly)i(and)e (others.)0 3596 y(The)e(new)h(compressed)g(image)h(data)g(format)f (\(where)g(the)g(image)h(is)f(tiled)h(and)e(the)h(compressed)g(b)m(yte) h(stream)0 3709 y(from)k(eac)m(h)i(tile)h(is)d(stored)h(in)g(a)g (binary)f(table\))j(w)m(as)e(implemen)m(ted)g(in)g(collab)s(oration)i (with)d(Ric)m(hard)h(White)0 3822 y(\(STScI\),)30 b(P)m(erry)g (Green\014eld)h(\(STScI\))f(and)f(Doug)i(T)-8 b(o)s(dy)30 b(\(NO)m(A)m(O\).)0 3982 y(Doug)h(Mink)g(\(SA)m(O\))f(pro)m(vided)g (the)h(routines)f(for)g(con)m(v)m(erting)j(IRAF)d(format)h(images)g(in) m(to)h(FITS)d(format.)0 4142 y(Martin)k(Reinec)m(k)m(e)i(\(Max)f(Planc) m(k)f(Institute,)h(Garc)m(hing\)\))g(pro)m(vided)f(the)g(mo)s (di\014cations)f(to)i(cfortran.h)e(that)0 4255 y(are)d(necessary)h(to)f (supp)s(ort)e(64-bit)k(in)m(teger)f(v)-5 b(alues)29 b(when)f(calling)i (C)f(routines)g(from)f(fortran)h(programs.)39 b(The)0 4368 y(cfortran.h)30 b(macros)h(w)m(ere)g(originally)h(dev)m(elop)s(ed) e(b)m(y)h(Burkhard)e(Buro)m(w)h(\(CERN\).)0 4528 y(Julian)f(T)-8 b(a)m(ylor)31 b(\(ESO,)e(Garc)m(hing\))i(pro)m(vided)e(the)g(fast)h(b)m (yte-sw)m(apping)g(algorithms)h(that)f(use)f(the)h(SSE2)f(and)0 4641 y(SSSE3)g(mac)m(hine)i(instructions)f(a)m(v)-5 b(ailable)33 b(on)d(x86)p 1784 4641 28 4 v 34 w(64)h(CPUs.)0 4801 y(In)c(addition,)i(man)m(y)f(other)g(p)s(eople)g(ha)m(v)m(e)h(made)f(v) -5 b(aluable)29 b(con)m(tributions)f(to)h(the)f(dev)m(elopmen)m(t)h(of) f(CFITSIO.)0 4914 y(These)i(include)g(\(with)h(ap)s(ologies)h(to)f (others)f(that)h(ma)m(y)g(ha)m(v)m(e)h(inadv)m(erten)m(tly)g(b)s(een)d (omitted\):)0 5074 y(Stev)m(e)g(Allen,)g(Carl)f(Ak)m(erlof,)h(Keith)f (Arnaud,)g(Morten)g(Krabb)s(e)e(Barfo)s(ed,)j(Ken)m(t)f(Blac)m(kburn,)h (G)f(Bo)s(dammer,)0 5187 y(Romk)m(e)h(Bon)m(tek)m(o)s(e,)i(Lucio)d (Chiapp)s(etti,)g(Keith)g(Costorf,)g(Robin)g(Corb)s(et,)g(John)e(Da)m (vis,)k(Ric)m(hard)e(Fink,)h(Ning)0 5300 y(Gan,)i(Emily)f(Greene,)h (Gretc)m(hen)g(Green,)f(Jo)s(e)g(Harrington,)h(Cheng)f(Ho,)h(Phil)f(Ho) s(dge,)g(Jim)g(Ingham,)g(Y)-8 b(oshi-)0 5413 y(tak)j(a)44 b(Ishisaki,)i(Diab)e(Jerius,)h(Mark)f(Levine,)i(T)-8 b(o)s(dd)42 b(Karak)-5 b(askian,)47 b(Edw)m(ard)42 b(King,)k(Scott)e (Ko)s(c)m(h,)i(Claire)0 5526 y(Larkin,)32 b(Rob)g(Managan,)i(Eric)e (Mandel,)h(Ric)m(hard)f(Mathar,)h(John)e(Matto)m(x,)k(Carsten)d(Mey)m (er,)i(Emi)d(Miy)m(ata,)0 5639 y(Stefan)39 b(Mo)s(c)m(hnac)m(ki,)k(Mik) m(e)e(Noble,)h(Oliv)m(er)e(Ob)s(erdorf,)f(Cliv)m(e)i(P)m(age,)i(Arvind) 38 b(P)m(armar,)j(Je\013)f(P)m(edelt)m(y)-8 b(,)43 b(Tim)p eop end %%Page: 4 12 TeXDict begin 4 11 bop 0 299 a Fj(4)2452 b Fh(CHAPTER)30 b(1.)71 b(INTR)m(ODUCTION)0 555 y Fj(P)m(earson,)40 b(Philipp)s(e)c (Prugniel,)j(Maren)e(Purv)m(es,)i(Scott)g(Randall,)g(Chris)d(Rogers,)k (Arnold)d(Rots,)i(Rob)e(Sea-)0 668 y(man,)23 b(Barry)e(Sc)m(hlesinger,) i(Robin)e(Stebbins,)h(Andrew)d(Szymk)m(o)m(wiak,)25 b(Allyn)c(T)-8 b(ennan)m(t,)23 b(P)m(eter)f(T)-8 b(eub)s(en,)22 b(James)0 781 y(Theiler,)k(Doug)g(T)-8 b(o)s(dy)g(,)25 b(Shiro)f(Ueno,)j(Stev)m (e)f(W)-8 b(alton,)28 b(Arc)m(hie)d(W)-8 b(arno)s(c)m(k,)27 b(Alan)e(W)-8 b(atson,)28 b(Dan)d(Whipple,)h(Wim)0 894 y(Wimmers,)31 b(P)m(eter)g(Y)-8 b(oung,)31 b(Jianjun)e(Xu,)h(and)g (Nelson)h(Zarate.)0 1228 y Ff(1.4)135 b(Legal)46 b(Stu\013)0 1478 y Fj(Cop)m(yrigh)m(t)37 b(\(Unpublished{all)g(righ)m(ts)g(reserv)m (ed)g(under)e(the)i(cop)m(yrigh)m(t)h(la)m(ws)f(of)g(the)g(United)g (States\),)j(U.S.)0 1591 y(Go)m(v)m(ernmen)m(t)30 b(as)g(represen)m (ted)e(b)m(y)h(the)g(Administrator)g(of)g(the)g(National)h(Aeronautics) g(and)e(Space)h(Adminis-)0 1704 y(tration.)42 b(No)31 b(cop)m(yrigh)m(t)g(is)g(claimed)g(in)f(the)h(United)f(States)h(under)e (Title)j(17,)f(U.S.)f(Co)s(de.)0 1864 y(P)m(ermission)g(to)g(freely)f (use,)h(cop)m(y)-8 b(,)31 b(mo)s(dify)-8 b(,)29 b(and)g(distribute)g (this)g(soft)m(w)m(are)i(and)e(its)h(do)s(cumen)m(tation)g(without)0 1977 y(fee)f(is)f(hereb)m(y)g(gran)m(ted,)i(pro)m(vided)e(that)h(this)f (cop)m(yrigh)m(t)i(notice)f(and)f(disclaimer)h(of)f(w)m(arran)m(t)m(y)i (app)s(ears)d(in)h(all)0 2090 y(copies.)0 2250 y(DISCLAIMER:)0 2410 y(THE)33 b(SOFTW)-10 b(ARE)32 b(IS)g(PR)m(O)m(VIDED)i('AS)f(IS')g (WITHOUT)f(ANY)i(W)-10 b(ARRANTY)33 b(OF)g(ANY)h(KIND,)f(EI-)0 2523 y(THER)42 b(EXPRESSED,)f(IMPLIED,)i(OR)e(ST)-8 b(A)g(TUTOR)g(Y,)43 b(INCLUDING,)f(BUT)h(NOT)e(LIMITED)h(TO,)0 2636 y(ANY)33 b(W)-10 b(ARRANTY)33 b(THA)-8 b(T)32 b(THE)g(SOFTW)-10 b(ARE)32 b(WILL)g(CONF)m(ORM)g(TO)g(SPECIFICA)-8 b(TIONS,)30 b(ANY)0 2749 y(IMPLIED)38 b(W)-10 b(ARRANTIES)37 b(OF)h(MER)m(CHANT)-8 b(ABILITY,)38 b(FITNESS)f(F)m(OR)h(A)g(P)-8 b(AR)g(TICULAR)38 b(PUR-)0 2862 y(POSE,)24 b(AND)i(FREEDOM)f(FR)m(OM)h(INFRINGEMENT,)g (AND)f(ANY)h(W)-10 b(ARRANTY)25 b(THA)-8 b(T)25 b(THE)g(DOC-)0 2974 y(UMENT)-8 b(A)g(TION)31 b(WILL)f(CONF)m(ORM)h(TO)e(THE)h(SOFTW) -10 b(ARE,)30 b(OR)g(ANY)h(W)-10 b(ARRANTY)31 b(THA)-8 b(T)30 b(THE)0 3087 y(SOFTW)-10 b(ARE)31 b(WILL)h(BE)g(ERR)m(OR)g (FREE.)g(IN)g(NO)g(EVENT)f(SHALL)g(NASA)h(BE)g(LIABLE)g(F)m(OR)g(ANY)0 3200 y(D)m(AMA)m(GES,)26 b(INCLUDING,)e(BUT)f(NOT)g(LIMITED)h(TO,)f (DIRECT,)g(INDIRECT,)g(SPECIAL)f(OR)h(CON-)0 3313 y(SEQUENTIAL)28 b(D)m(AMA)m(GES,)k(ARISING)d(OUT)g(OF,)h(RESUL)-8 b(TING)29 b(FR)m(OM,)h(OR)f(IN)h(ANY)g(W)-10 b(A)i(Y)30 b(CON-)0 3426 y(NECTED)25 b(WITH)g(THIS)f(SOFTW)-10 b(ARE,)25 b(WHETHER)g(OR)g(NOT)g(BASED)g(UPON)g(W)-10 b(ARRANTY,)26 b(CON-)0 3539 y(TRA)m(CT,)d(TOR)-8 b(T)23 b(,)g(OR)g(OTHER)-10 b(WISE,)22 b(WHETHER)i(OR)f(NOT)f(INJUR)-8 b(Y)24 b(W)-10 b(AS)23 b(SUST)-8 b(AINED)23 b(BY)h(PER-)0 3652 y(SONS)h(OR)i(PR)m (OPER)-8 b(TY)26 b(OR)g(OTHER)-10 b(WISE,)26 b(AND)h(WHETHER)g(OR)f (NOT)g(LOSS)f(W)-10 b(AS)26 b(SUST)-8 b(AINED)0 3765 y(FR)m(OM,)37 b(OR)e(AR)m(OSE)h(OUT)f(OF)h(THE)g(RESUL)-8 b(TS)35 b(OF,)h(OR)f(USE)h(OF,)g(THE)g(SOFTW)-10 b(ARE)35 b(OR)g(SER-)0 3878 y(VICES)29 b(PR)m(O)m(VIDED)j(HEREUNDER.")p eop end %%Page: 5 13 TeXDict begin 5 12 bop 0 1225 a Fg(Chapter)65 b(2)0 1687 y Fm(Creating)77 b(the)h(CFITSIO)e(Library)0 2216 y Ff(2.1)135 b(Building)45 b(the)h(Library)0 2466 y Fj(The)h(CFITSIO)f(co)s(de)h(is) h(con)m(tained)g(in)f(ab)s(out)g(40)h(C)f(source)h(\014les)f(\(*.c\))i (and)e(header)g(\014les)g(\(*.h\).)93 b(On)0 2579 y(V)-10 b(AX/VMS)31 b(systems)g(2)f(assem)m(bly-co)s(de)i(\014les)e (\(vmsieeed.mar)h(and)f(vmsieeer.mar\))i(are)e(also)i(needed.)0 2739 y(CFITSIO)d(has)h(curren)m(tly)g(b)s(een)g(tested)h(on)f(the)h (follo)m(wing)h(platforms)e(\(not)h(up-to-date\):)95 2959 y Fe(OPERATING)46 b(SYSTEM)523 b(COMPILER)143 3072 y(Sun)47 b(OS)1002 b(gcc)47 b(and)g(cc)g(\(3.0.1\))143 3185 y(Sun)g(Solaris)762 b(gcc)47 b(and)g(cc)143 3298 y(Silicon)f(Graphics)g(IRIX)285 b(gcc)47 b(and)g(cc)143 3411 y(Silicon)f(Graphics)g(IRIX64)189 b(MIPS)143 3523 y(Dec)47 b(Alpha)f(OSF/1)572 b(gcc)47 b(and)g(cc)143 3636 y(DECstation)93 b(Ultrix)428 b(gcc)143 3749 y(Dec)47 b(Alpha)f(OpenVMS)476 b(cc)143 3862 y(DEC)47 b(VAX/VMS)762 b(gcc)47 b(and)g(cc)143 3975 y(HP-UX)1049 b(gcc)143 4088 y(IBM)47 b(AIX)954 b(gcc)143 4201 y(Linux)1049 b(gcc)143 4314 y(MkLinux)953 b(DR3)143 4427 y(Windows)46 b(95/98/NT)523 b(Borland)46 b(C++)h(V4.5)143 4540 y(Windows)f(95/98/NT/ME/XP)235 b(Microsoft/Compaq)43 b(Visual)j(C++)h(v5.0,)g(v6.0)143 4653 y(Windows)f(95/98/NT)523 b(Cygwin)46 b(gcc)143 4765 y(MacOS)h(7.1)f(or)i(greater)332 b(Metrowerks)45 b(10.+)143 4878 y(MacOS-X)h(10.1)h(or)g(greater)189 b(cc)47 b(\(gcc\))0 5098 y Fj(CFITSIO)26 b(will)j(probably)e(run)f(on)i(most)g(other)h (Unix)e(platforms.)40 b(Cra)m(y)28 b(sup)s(ercomputers)e(are)j(curren)m (tly)f(not)0 5211 y(supp)s(orted.)0 5495 y Fd(2.1.1)112 b(Unix)39 b(Systems)0 5714 y Fj(The)30 b(CFITSIO)f(library)h(is)g (built)g(on)h(Unix)f(systems)g(b)m(y)g(t)m(yping:)1927 5942 y(5)p eop end %%Page: 6 14 TeXDict begin 6 13 bop 0 299 a Fj(6)1580 b Fh(CHAPTER)30 b(2.)112 b(CREA)-8 b(TING)30 b(THE)g(CFITSIO)f(LIBRAR)-8 b(Y)48 555 y Fe(>)95 b(./configure)45 b([--prefix=/target/insta)o(llat) o(ion)o(/pat)o(h])d([--enable-reentrant])764 668 y([--enable-sse2])h ([--enable-ssse3])48 781 y(>)95 b(make)476 b(\(or)95 b('make)46 b(shared'\))48 894 y(>)95 b(make)47 b(install)93 b(\(this)46 b(step)h(is)g(optional\))0 1128 y Fj(at)24 b(the)g(op)s(erating)g(system)g(prompt.)38 b(The)23 b(con\014gure)g (command)g(customizes)i(the)f(Mak)m(e\014le)h(for)f(the)g(particular)0 1241 y(system,)g(then)d(the)g(`mak)m(e')i(command)e(compiles)h(the)f (source)h(\014les)f(and)g(builds)f(the)h(library)-8 b(.)38 b(T)m(yp)s(e)21 b(`./con\014gure')0 1354 y(and)34 b(not)h(simply)f (`con\014gure')h(to)h(ensure)e(that)h(the)g(con\014gure)g(script)f(in)h (the)g(curren)m(t)f(directory)h(is)g(run)f(and)0 1467 y(not)29 b(some)g(other)g(system-wide)g(con\014gure)f(script.)40 b(The)29 b(optional)h('pre\014x')e(argumen)m(t)h(to)g(con\014gure)g (giv)m(es)h(the)0 1580 y(path)e(to)i(the)f(directory)g(where)f(the)h (CFITSIO)f(library)g(and)g(include)h(\014les)f(should)g(b)s(e)g (installed)i(via)f(the)g(later)0 1692 y('mak)m(e)j(install')f(command.) 41 b(F)-8 b(or)31 b(example,)143 1926 y Fe(>)48 b(./configure)c (--prefix=/usr1/local)0 2160 y Fj(will)25 b(cause)h(the)f('mak)m(e)h (install')g(command)f(to)h(cop)m(y)g(the)f(CFITSIO)e(lib)s(c\014tsio)i (\014le)h(to)f(/usr1/lo)s(cal/lib)i(and)e(the)0 2273 y(necessary)33 b(include)e(\014les)i(to)f(/usr1/lo)s(cal/include)j (\(assuming)d(of)g(course)g(that)h(the)f(pro)s(cess)g(has)g(p)s (ermission)0 2386 y(to)f(write)g(to)g(these)g(directories\).)0 2546 y(The)42 b(optional)i({enable-reen)m(tran)m(t)g(\015ag)f(will)g (attempt)h(to)f(con\014gure)f(CFITSIO)f(so)i(that)g(it)g(can)g(b)s(e)f (used)0 2659 y(in)35 b(m)m(ulti-threaded)g(programs.)54 b(See)35 b(the)g("Using)g(CFITSIO)e(in)i(Multi-threaded)g(En)m (vironmen)m(ts")h(section,)0 2772 y(b)s(elo)m(w,)31 b(for)f(more)0 2932 y(The)24 b(optional)i({enable-sse2)g(and)e({enable-ssse3)i (\015ags)e(will)h(cause)g(con\014gure)f(to)h(attempt)h(to)f(build)e (CFITSIO)0 3045 y(using)29 b(faster)i(b)m(yte-sw)m(apping)f (algorithms.)42 b(See)30 b(the)g("Optimizing)h(Programs")f(c)m(hapter)h (of)f(this)g(man)m(ual)g(for)0 3158 y(more)h(information)f(ab)s(out)g (these)h(options.)0 3318 y(The)d('mak)m(e)h(shared')f(option)h(builds)e (a)i(shared)e(or)i(dynamic)f(v)m(ersion)h(of)f(the)h(CFITSIO)d(library) -8 b(.)40 b(When)28 b(using)0 3431 y(the)f(shared)f(library)h(the)g (executable)h(co)s(de)f(is)g(not)g(copied)g(in)m(to)h(y)m(our)f (program)g(at)g(link)g(time)g(and)g(instead)g(the)0 3544 y(program)g(lo)s(cates)i(the)f(necessary)g(library)f(co)s(de)h(at)g (run)e(time,)j(normally)f(through)e(LD)p 3065 3544 28 4 v 33 w(LIBRAR)-8 b(Y)p 3514 3544 V 34 w(P)g(A)g(TH)28 b(or)0 3657 y(some)j(other)f(metho)s(d.)41 b(The)29 b(adv)-5 b(an)m(tages)33 b(of)d(using)g(a)h(shared)e(library)h(are:)143 3891 y Fe(1.)95 b(Less)47 b(disk)f(space)h(if)g(you)g(build)f(more)h (than)f(1)i(program)143 4004 y(2.)95 b(Less)47 b(memory)f(if)h(more)g (than)f(one)h(copy)g(of)g(a)g(program)f(using)h(the)g(shared)334 4117 y(library)f(is)h(running)f(at)h(the)g(same)g(time)f(since)h(the)g (system)f(is)h(smart)334 4230 y(enough)f(to)h(share)g(copies)f(of)h (the)g(shared)f(library)g(at)h(run)g(time.)143 4343 y(3.)95 b(Possibly)46 b(easier)g(maintenance)e(since)j(a)g(new)g(version)f(of)h (the)g(shared)334 4456 y(library)f(can)h(be)g(installed)e(without)h (relinking)f(all)i(the)g(software)334 4568 y(that)g(uses)f(it)i(\(as)e (long)h(as)g(the)g(subroutine)e(names)i(and)f(calling)334 4681 y(sequences)f(remain)h(unchanged\).)143 4794 y(4.)95 b(No)47 b(run-time)f(penalty.)0 5028 y Fj(The)30 b(disadv)-5 b(an)m(tages)32 b(are:)143 5262 y Fe(1.)47 b(More)g(hassle)f(at)h (runtime.)94 b(You)46 b(have)h(to)g(either)f(build)h(the)g(programs)286 5375 y(specially)f(or)h(have)f(LD_LIBRARY_PATH)e(set)j(right.)143 5488 y(2.)g(There)g(may)g(be)g(a)g(slight)f(start)h(up)g(penalty,)e (depending)h(on)h(where)f(you)h(are)286 5601 y(reading)f(the)h(shared)f (library)g(and)h(the)g(program)f(from)g(and)h(if)g(your)g(CPU)g(is)286 5714 y(either)f(really)h(slow)f(or)h(really)f(heavily)g(loaded.)p eop end %%Page: 7 15 TeXDict begin 7 14 bop 0 299 a Fh(2.1.)72 b(BUILDING)31 b(THE)f(LIBRAR)-8 b(Y)2507 b Fj(7)0 555 y(On)32 b(Mac)i(OS)e(X)i (platforms)f(the)g('mak)m(e)h(shared')f(command)f(w)m(orks)h(lik)m(e)i (on)e(other)g(UNIX)g(platforms,)h(but)f(a)0 668 y(.dylib)f(\014le)g (will)g(b)s(e)f(created)i(instead)g(of)f(.so.)46 b(If)31 b(installed)i(in)f(a)g(nonstandard)f(lo)s(cation,)j(add)d(its)i(lo)s (cation)g(to)0 781 y(the)e(D)m(YLD)p 422 781 28 4 v 34 w(LIBRAR)-8 b(Y)p 872 781 V 33 w(P)g(A)g(TH)31 b(en)m(vironmen)m(t)g(v) -5 b(ariable)31 b(so)g(that)g(the)f(library)g(can)h(b)s(e)f(found)f(at) i(run)e(time.)0 941 y(On)h(HP/UX)i(systems,)g(the)f(en)m(vironmen)m(t)h (v)-5 b(ariable)32 b(CFLA)m(GS)f(should)f(b)s(e)h(set)g(to)h(-Ae)g(b)s (efore)f(running)e(con-)0 1054 y(\014gure)h(to)h(enable)g("extended)g (ANSI")f(features.)0 1214 y(By)h(default,)h(a)f(set)h(of)f(F)-8 b(ortran-callable)34 b(wrapp)s(er)29 b(routines)i(are)g(also)h(built)f (and)f(included)h(in)f(the)h(CFITSIO)0 1327 y(library)-8 b(.)70 b(If)40 b(these)g(wrapp)s(er)f(routines)h(are)g(not)h(needed)e (\(i.e.,)45 b(the)40 b(CFITSIO)f(library)g(will)i(not)f(b)s(e)g(link)m (ed)0 1440 y(to)d(an)m(y)f(F)-8 b(ortran)37 b(applications)g(whic)m(h)f (call)h(FITSIO)e(subroutines\))g(then)h(they)g(ma)m(y)h(b)s(e)e (omitted)i(from)f(the)0 1553 y(build)28 b(b)m(y)i(t)m(yping)g('mak)m(e) g(all-no\014tsio')i(instead)d(of)h(simply)f(t)m(yping)h('mak)m(e'.)42 b(This)28 b(will)i(reduce)f(the)h(size)g(of)g(the)0 1666 y(CFITSIO)f(library)h(sligh)m(tly)-8 b(.)0 1826 y(It)33 b(ma)m(y)g(not)g(b)s(e)f(p)s(ossible)g(to)h(statically)i(link)e (programs)f(that)h(use)g(CFITSIO)e(on)h(some)h(platforms)g(\(namely)-8 b(,)0 1939 y(on)28 b(Solaris)h(2.6\))h(due)e(to)h(the)g(net)m(w)m(ork)g (driv)m(ers)f(\(whic)m(h)h(pro)m(vide)g(FTP)f(and)g(HTTP)g(access)h(to) h(FITS)d(\014les\).)41 b(It)0 2052 y(is)33 b(p)s(ossible)f(to)i(mak)m (e)f(b)s(oth)g(a)g(dynamic)f(and)g(a)i(static)g(v)m(ersion)f(of)g(the)g (CFITSIO)e(library)-8 b(,)34 b(but)e(net)m(w)m(ork)i(\014le)0 2165 y(access)e(will)e(not)h(b)s(e)f(p)s(ossible)g(using)g(the)g (static)i(v)m(ersion.)0 2627 y Fd(2.1.2)112 b(VMS)0 2880 y Fj(On)28 b(V)-10 b(AX/VMS)31 b(and)d(ALPHA/VMS)i(systems)f(the)h(mak) m(e)p 2100 2880 V 34 w(g\015oat.com)h(command)e(\014le)g(ma)m(y)h(b)s (e)f(executed)h(to)0 2993 y(build)35 b(the)i(c\014tsio.olb)g(ob)5 b(ject)37 b(library)f(using)g(the)g(default)h(G-\015oating)g(p)s(oin)m (t)g(option)f(for)g(double)g(v)-5 b(ariables.)0 3106 y(The)37 b(mak)m(e)p 405 3106 V 33 w(d\015oat.com)i(and)d(mak)m(e)p 1279 3106 V 34 w(ieee.com)j(\014les)f(ma)m(y)f(b)s(e)g(used)f(instead)i (to)g(build)e(the)h(library)g(with)g(the)0 3219 y(other)26 b(\015oating)i(p)s(oin)m(t)e(options.)39 b(Note)28 b(that)f(the)f (getcwd)h(function)f(that)h(is)f(used)f(in)h(the)h(group.c)f(mo)s(dule) f(ma)m(y)0 3332 y(require)44 b(that)i(programs)e(using)g(CFITSIO)f(b)s (e)h(link)m(ed)i(with)e(the)h(ALPHA$LIBRAR)-8 b(Y:V)e(AX)m(CR)i(TL.OLB) 0 3445 y(library)g(.)41 b(See)30 b(the)h(example)g(link)f(line)h(in)f (the)h(next)f(section)i(of)e(this)h(do)s(cumen)m(t.)0 3907 y Fd(2.1.3)112 b(Windo)m(ws)38 b(PCs)0 4161 y Fj(A)28 b(precompiled)g(DLL)g(v)m(ersion)g(of)g(CFITSIO)e(is)i(a)m(v)-5 b(ailable)31 b(for)c(IBM-PC)h(users)g(of)g(the)g(Borland)g(or)g (Microsoft)0 4274 y(Visual)46 b(C++)e(compilers)i(in)f(the)h(\014les)f (c\014tsio)s(dll)p 1799 4274 V 34 w(3xxx)p 2022 4274 V 33 w(b)s(orland.zip)f(and)h(c\014tsio)s(dll)p 3075 4274 V 33 w(3xxx)p 3297 4274 V 33 w(v)m(cc.zip,)51 b(where)0 4386 y('3xxx')45 b(represen)m(ts)f(the)g(curren)m(t)g(release)i(n)m(um) m(b)s(er.)81 b(These)44 b(zip)g(arc)m(hiv)m(es)h(also)h(con)m(tains)f (other)f(\014les)h(and)0 4499 y(instructions)30 b(on)g(ho)m(w)h(to)g (use)f(the)h(CFITSIO)d(DLL)j(library)-8 b(.)0 4659 y(The)28 b(CFITSIO)g(library)g(ma)m(y)h(also)h(b)s(e)e(built)h(from)f(the)h (source)g(co)s(de)g(using)g(the)g(mak)m(e\014le.b)s(c)g(or)g(mak)m (e\014le.v)m(cc)0 4772 y(\014les.)55 b(Finally)-8 b(,)38 b(the)d(mak)m(ep)s(c.bat)h(\014le)f(giv)m(es)i(an)e(example)h(of)f (building)f(CFITSIO)g(with)g(the)i(Borland)f(C++)0 4885 y(v4.5)c(or)g(v5.5)g(compiler)g(using)f(older)h(DOS)f(commands.)0 5348 y Fd(2.1.4)112 b(Macin)m(tosh)39 b(PCs)0 5601 y Fj(When)20 b(building)f(on)i(Mac)g(OS-X,)f(users)g(should)f(follo)m(w)i (the)g(Unix)f(instructions,)i(ab)s(o)m(v)m(e.)39 b(See)20 b(the)h(README.MacOS)0 5714 y(\014le)30 b(for)h(instructions)f(on)g (building)g(a)g(Univ)m(ersal)i(Binary)e(that)h(supp)s(orts)e(b)s(oth)g (In)m(tel)i(and)f(P)m(o)m(w)m(erPC)h(CPUs.)p eop end %%Page: 8 16 TeXDict begin 8 15 bop 0 299 a Fj(8)1580 b Fh(CHAPTER)30 b(2.)112 b(CREA)-8 b(TING)30 b(THE)g(CFITSIO)f(LIBRAR)-8 b(Y)0 555 y Ff(2.2)135 b(T)-11 b(esting)46 b(the)f(Library)0 805 y Fj(The)40 b(CFITSIO)e(library)i(should)f(b)s(e)g(tested)i(b)m(y)f (building)f(and)g(running)g(the)h(testprog.c)h(program)f(that)h(is)0 918 y(included)30 b(with)g(the)g(release.)42 b(On)30 b(Unix)g(systems,)h(t)m(yp)s(e:)191 1148 y Fe(\045)47 b(make)g(testprog)191 1261 y(\045)g(testprog)f(>)h(testprog.lis)191 1374 y(\045)g(diff)g(testprog.lis)d(testprog.out)191 1487 y(\045)j(cmp)g(testprog.fit)e(testprog.std)0 1717 y Fj(On)30 b(VMS)g(systems,)g(\(assuming)h(cc)g(is)f(the)h(name)f(of)h (the)f(C)g(compiler)h(command\),)g(t)m(yp)s(e:)191 1947 y Fe($)47 b(cc)h(testprog.c)191 2060 y($)f(link)g(testprog,)e (cfitsio/lib,)g(alpha$library:vaxcrtl/l)o(ib)191 2173 y($)i(run)g(testprog)0 2402 y Fj(The)42 b(test)h(program)f(should)f (pro)s(duce)g(a)i(FITS)e(\014le)i(called)g(`testprog.\014t')h(that)f (is)f(iden)m(tical)i(to)f(the)f(`test-)0 2515 y(prog.std')35 b(FITS)e(\014le)i(included)e(with)h(this)g(release.)54 b(The)34 b(diagnostic)i(messages)f(\(whic)m(h)g(w)m(ere)g(pip)s(ed)e (to)i(the)0 2628 y(\014le)h(testprog.lis)i(in)e(the)h(Unix)f(example\)) h(should)e(b)s(e)h(iden)m(tical)i(to)f(the)f(listing)h(con)m(tained)h (in)e(the)g(\014le)h(test-)0 2741 y(prog.out.)63 b(The)37 b('di\013)7 b(')38 b(and)f('cmp')h(commands)g(sho)m(wn)f(ab)s(o)m(v)m (e)i(should)d(not)i(rep)s(ort)f(an)m(y)h(di\013erences)g(in)g(the)0 2854 y(\014les.)65 b(\(There)38 b(ma)m(y)h(b)s(e)f(some)h(minor)f (format)h(di\013erences,)i(suc)m(h)d(as)h(the)g(presence)f(or)h (absence)g(of)f(leading)0 2967 y(zeros,)31 b(or)g(3)f(digit)i(exp)s (onen)m(ts)e(in)g(n)m(um)m(b)s(ers,)f(whic)m(h)h(can)h(b)s(e)f (ignored\).)0 3127 y(The)e(F)-8 b(ortran)30 b(wrapp)s(ers)d(in)h (CFITSIO)f(ma)m(y)j(b)s(e)e(tested)h(with)g(the)g(testf77)h(program)f (on)g(Unix)f(systems)h(with:)191 3357 y Fe(\045)47 b(f77)g(-o)g (testf77)f(testf77.f)g(-L.)g(-lcfitsio)g(-lnsl)g(-lsocket)95 3470 y(or)191 3583 y(\045)h(f77)g(-f)g(-o)h(testf77)d(testf77.f)h(-L.)h (-lcfitsio)188 b(\(under)46 b(SUN)h(O/S\))95 3696 y(or)191 3809 y(\045)g(f77)g(-o)g(testf77)f(testf77.f)g(-Wl,-L.)f(-lcfitsio)h (-lm)h(-lnsl)f(-lsocket)f(\(HP/UX\))191 4035 y(\045)i(testf77)f(>)i (testf77.lis)191 4147 y(\045)f(diff)g(testf77.lis)e(testf77.out)191 4260 y(\045)i(cmp)g(testf77.fit)e(testf77.std)0 4490 y Fj(On)31 b(mac)m(hines)h(running)f(SUN)g(O/S,)h(F)-8 b(ortran)33 b(programs)e(m)m(ust)h(b)s(e)f(compiled)h(with)g(the)g('-f) 7 b(')32 b(option)h(to)f(force)0 4603 y(double)25 b(precision)h(v)-5 b(ariables)26 b(to)g(b)s(e)f(aligned)h(on)g(8-b)m(yte)h(b)s(oundarys)c (to)j(mak)m(e)h(the)e(fortran-declared)h(v)-5 b(ariables)0 4716 y(compatible)34 b(with)e(C.)g(A)h(similar)g(compiler)g(option)g (ma)m(y)g(b)s(e)f(required)g(on)g(other)h(platforms.)48 b(F)-8 b(ailing)34 b(to)f(use)0 4829 y(this)26 b(option)g(ma)m(y)g (cause)h(the)f(program)f(to)i(crash)e(on)h(FITSIO)f(routines)g(that)i (read)f(or)f(write)h(double)g(precision)0 4942 y(v)-5 b(ariables.)0 5102 y(Also)31 b(note)g(that)f(on)g(some)h(systems,)f (the)h(output)e(listing)i(of)g(the)f(testf77)i(program)d(ma)m(y)i (di\013er)f(sligh)m(tly)h(from)0 5215 y(the)g(testf77.std)h(template,)g (if)f(leading)g(zeros)g(are)g(not)g(prin)m(ted)f(b)m(y)h(default)g(b)s (efore)f(the)h(decimal)g(p)s(oin)m(t)g(when)0 5328 y(using)f(F)h (format.)0 5488 y(A)37 b(few)f(other)g(utilit)m(y)i(programs)e(are)h (included)f(with)g(CFITSIO;)f(the)i(\014rst)e(four)h(of)g(this)h (programs)f(can)h(b)s(e)0 5601 y(compiled)e(an)g(link)m(ed)g(b)m(y)g(t) m(yping)g(`mak)m(e)h(program)p 1815 5601 28 4 v 33 w(name')f(where)f (`program)p 2746 5601 V 33 w(name')h(is)g(the)g(actual)h(name)f(of)0 5714 y(the)c(program:)p eop end %%Page: 9 17 TeXDict begin 9 16 bop 0 299 a Fh(2.3.)72 b(LINKING)30 b(PR)m(OGRAMS)h(WITH)f(CFITSIO)1975 b Fj(9)191 555 y Fe(speed)46 b(-)i(measures)d(the)i(maximum)f(throughput)f(\(in)i(MB)g (per)g(second\))668 668 y(for)g(writing)f(and)h(reading)f(FITS)g(files) h(with)f(CFITSIO.)191 894 y(listhead)f(-)j(lists)e(all)h(the)g(header)f (keywords)g(in)h(any)g(FITS)f(file)191 1120 y(fitscopy)f(-)j(copies)e (any)h(FITS)g(file)f(\(especially)f(useful)h(in)h(conjunction)811 1233 y(with)g(the)g(CFITSIO's)e(extended)h(input)g(filename)g (syntax\).)191 1458 y(cookbook)f(-)j(a)f(sample)f(program)g(that)h (performs)e(common)i(read)f(and)811 1571 y(write)h(operations)e(on)i(a) g(FITS)g(file.)191 1797 y(iter_a,)f(iter_b,)g(iter_c)g(-)h(examples)f (of)h(the)g(CFITSIO)f(iterator)f(routine)0 2167 y Ff(2.3)135 b(Linking)45 b(Programs)h(with)f(CFITSIO)0 2425 y Fj(When)25 b(linking)h(applications)h(soft)m(w)m(are)g(with)e(the)h(CFITSIO)e (library)-8 b(,)27 b(sev)m(eral)g(system)f(libraries)g(usually)f(need)0 2538 y(to)36 b(b)s(e)f(sp)s(eci\014ed)g(on)g(the)g(link)h(command)f (line.)56 b(On)34 b(Unix)i(systems,)h(the)e(most)h(reliable)g(w)m(a)m (y)h(to)f(determine)0 2651 y(what)26 b(libraries)h(are)f(required)g(is) g(to)h(t)m(yp)s(e)f('mak)m(e)i(testprog')f(and)f(see)h(what)f (libraries)h(the)f(con\014gure)g(script)g(has)0 2764 y(added.)39 b(The)25 b(t)m(ypical)j(libraries)e(that)g(need)g(to)g(b)s (e)g(added)f(are)h(-lm)h(\(the)f(math)g(library\))g(and)f(-lnsl)h(and)g (-lso)s(c)m(k)m(et)0 2877 y(\(needed)k(only)g(for)g(FTP)g(and)f(HTTP)g (\014le)h(access\).)43 b(These)30 b(latter)h(2)f(libraries)g(are)h(not) f(needed)g(on)g(VMS)g(and)0 2989 y(Windo)m(ws)g(platforms,)h(b)s (ecause)f(FTP)h(\014le)f(access)i(is)e(not)h(curren)m(tly)f(supp)s (orted)f(on)h(those)h(platforms.)0 3150 y(Note)i(that)g(when)e (upgrading)g(to)i(a)f(new)m(er)g(v)m(ersion)g(of)g(CFITSIO)f(it)h(is)g (usually)g(necessary)g(to)h(recompile,)h(as)0 3263 y(w)m(ell)d(as)g (relink,)g(the)f(programs)g(that)h(use)f(CFITSIO,)f(b)s(ecause)i(the)f (de\014nitions)g(in)g(\014tsio.h)h(often)f(c)m(hange.)0 3633 y Ff(2.4)135 b(Using)46 b(CFITSIO)e(in)h(Multi-threaded)g(En)l (vironmen)l(ts)0 3890 y Fj(CFITSIO)d(can)h(b)s(e)g(used)f(either)i (with)e(the)i(POSIX)e(pthreads)g(in)m(terface)j(or)e(the)h(Op)s(enMP)d (in)m(terface)k(for)0 4003 y(m)m(ulti-threaded)g(parallel)g(programs.) 81 b(When)43 b(used)h(in)f(a)i(m)m(ulti-threaded)f(en)m(vironmen)m(t,)k (the)c(CFITSIO)0 4116 y(library)26 b(*m)m(ust*)h(b)s(e)e(built)h(using) g(the)g(-D)p 1426 4116 28 4 v 34 w(REENTRANT)f(compiler)i(directiv)m (e.)41 b(This)25 b(can)i(b)s(e)e(done)h(using)g(the)0 4229 y(follo)m(wing)32 b(build)d(commands:)95 4520 y Fe(>./configure)45 b(--enable-reentrant)95 4633 y(>)j(make)0 4924 y Fj(A)32 b(function)g(called)i(\014ts)p 845 4924 V 32 w(is)p 938 4924 V 33 w(reen)m(tran)m(t)f(is)g(a)m(v)-5 b(ailable)34 b(to)f(test)h(whether)d(or)i(not)f(CFITSIO)f(w)m(as)h (compiled)h(with)0 5036 y(the)28 b(-D)p 258 5036 V 34 w(REENTRANT)f(directiv)m(e.)42 b(When)28 b(this)g(feature)g(is)g (enabled,)h(m)m(ultiple)g(threads)e(can)i(call)g(an)m(y)g(of)f(the)0 5149 y(CFITSIO)k(routines)h(to)h(sim)m(ultaneously)g(read)f(or)h(write) f(separate)h(FITS)f(\014les.)49 b(Multiple)34 b(threads)f(can)h(also)0 5262 y(read)29 b(data)h(from)e(the)h(same)h(FITS)e(\014le)h(sim)m (ultaneously)-8 b(,)31 b(as)e(long)h(as)f(the)g(\014le)g(w)m(as)h(op)s (ened)e(indep)s(enden)m(tly)g(b)m(y)0 5375 y(eac)m(h)37 b(thread.)58 b(This)35 b(relies)i(on)f(the)g(op)s(erating)h(system)f (to)h(correctly)g(deal)g(with)f(reading)g(the)g(same)h(\014le)f(b)m(y)0 5488 y(m)m(ultiple)30 b(pro)s(cesses.)41 b(Di\013eren)m(t)30 b(threads)g(should)e(not)i(share)f(the)h(same)g('\014ts\014le')g(p)s (oin)m(ter)f(to)i(read)e(an)h(op)s(ened)0 5601 y(FITS)40 b(\014le,)j(unless)d(lo)s(c)m(ks)h(are)g(placed)f(around)g(the)g(calls) i(to)f(the)g(CFITSIO)d(reading)j(routines.)71 b(Di\013eren)m(t)0 5714 y(threads)30 b(should)f(nev)m(er)i(try)f(to)h(write)g(to)g(the)g (same)f(FITS)g(\014le.)p eop end %%Page: 10 18 TeXDict begin 10 17 bop 0 299 a Fj(10)1535 b Fh(CHAPTER)30 b(2.)112 b(CREA)-8 b(TING)30 b(THE)g(CFITSIO)f(LIBRAR)-8 b(Y)0 555 y Ff(2.5)135 b(Getting)46 b(Started)g(with)f(CFITSIO)0 810 y Fj(In)27 b(order)h(to)g(e\013ectiv)m(ely)j(use)d(the)g(CFITSIO)e (library)i(it)g(is)g(recommended)g(that)g(new)f(users)h(b)s(egin)f(b)m (y)h(reading)0 923 y(the)g(\\CFITSIO)g(Quic)m(k)g(Start)g(Guide".)41 b(It)28 b(con)m(tains)h(all)h(the)e(basic)h(information)f(needed)g(to)h (write)f(programs)0 1036 y(that)c(p)s(erform)f(most)h(t)m(yp)s(es)g(of) g(op)s(erations)g(on)g(FITS)f(\014les.)39 b(The)23 b(set)i(of)f (example)g(FITS)g(utilit)m(y)h(programs)e(that)0 1149 y(are)29 b(a)m(v)-5 b(ailable)31 b(from)d(the)g(CFITSIO)f(w)m(eb)i (site)g(are)g(also)g(v)m(ery)g(useful)f(for)g(learning)h(ho)m(w)f(to)h (use)f(CFITSIO.)f(T)-8 b(o)0 1262 y(learn)23 b(ev)m(en)g(more)g(ab)s (out)f(the)h(capabilities)h(of)f(the)g(CFITSIO)e(library)h(the)h(follo) m(wing)h(steps)e(are)h(recommended:)0 1422 y(1.)41 b(Read)31 b(the)f(follo)m(wing)i(short)e(`FITS)g(Primer')g(c)m(hapter)h(for)f(an) h(o)m(v)m(erview)h(of)e(the)h(structure)f(of)g(FITS)g(\014les.)0 1582 y(2.)40 b(Review)28 b(the)f(Programming)g(Guidelines)h(in)f (Chapter)f(4)i(to)g(b)s(ecome)f(familiar)h(with)f(the)h(con)m(v)m(en)m (tions)h(used)0 1695 y(b)m(y)h(the)h(CFITSIO)e(in)m(terface.)0 1855 y(3.)74 b(Refer)41 b(to)h(the)g(co)s(okb)s(o)s(ok.c,)j (listhead.c,)h(and)40 b(\014tscop)m(y)-8 b(.c)43 b(programs)e(that)h (are)g(included)e(with)h(this)h(re-)0 1968 y(lease)g(for)e(examples)h (of)g(routines)f(that)h(p)s(erform)e(v)-5 b(arious)41 b(common)g(FITS)f(\014le)g(op)s(erations.)72 b(T)m(yp)s(e)40 b('mak)m(e)0 2081 y(program)p 339 2081 28 4 v 33 w(name')30 b(to)h(compile)h(and)d(link)i(these)g(programs)f(on)g(Unix)g(systems.)0 2241 y(4.)40 b(W)-8 b(rite)30 b(a)e(simple)g(program)g(to)g(read)g(or)g (write)g(a)h(FITS)e(\014le)h(using)g(the)g(Basic)h(In)m(terface)g (routines)f(describ)s(ed)0 2354 y(in)i(Chapter)g(5.)0 2514 y(5.)79 b(Scan)43 b(through)f(the)h(more)g(sp)s(ecialized)i (routines)d(that)i(are)f(describ)s(ed)f(in)h(the)g(follo)m(wing)i(c)m (hapters)e(to)0 2627 y(b)s(ecome)31 b(familiar)g(with)f(the)h (functionalit)m(y)g(that)g(they)g(pro)m(vide.)0 2986 y Ff(2.6)135 b(Example)46 b(Program)0 3241 y Fj(The)c(follo)m(wing)j (listing)f(sho)m(ws)e(an)h(example)h(of)f(ho)m(w)g(to)g(use)g(the)g (CFITSIO)f(routines)g(in)h(a)g(C)g(program.)0 3354 y(Refer)26 b(to)g(the)g(co)s(okb)s(o)s(ok.c)g(program)f(that)i(is)e(included)g (with)g(the)h(CFITSIO)e(distribution)h(for)g(other)h(example)0 3466 y(routines.)0 3627 y(This)38 b(program)h(creates)h(a)f(new)f(FITS) g(\014le,)k(con)m(taining)e(a)f(FITS)f(image.)68 b(An)38 b(`EXPOSURE')h(k)m(eyw)m(ord)g(is)0 3740 y(written)27 b(to)g(the)f(header,)i(then)e(the)h(image)g(data)h(are)f(written)f(to)h (the)g(FITS)f(\014le)g(b)s(efore)h(closing)g(the)g(FITS)f(\014le.)0 4020 y Fe(#include)46 b("fitsio.h")92 b(/*)47 b(required)f(by)h(every)g (program)e(that)i(uses)g(CFITSIO)93 b(*/)0 4133 y(main\(\))0 4246 y({)191 4359 y(fitsfile)45 b(*fptr;)333 b(/*)47 b(pointer)f(to)h(the)g(FITS)g(file;)f(defined)g(in)h(fitsio.h)f(*/)191 4472 y(int)h(status,)f(ii,)h(jj;)191 4585 y(long)94 b(fpixel)46 b(=)i(1,)f(naxis)f(=)i(2,)f(nelements,)e(exposure;)191 4698 y(long)i(naxes[2])e(=)j({)f(300,)g(200)g(};)142 b(/*)47 b(image)g(is)g(300)g(pixels)f(wide)h(by)g(200)g(rows)f(*/)191 4811 y(short)g(array[200][300];)191 5036 y(status)g(=)h(0;)429 b(/*)48 b(initialize)d(status)h(before)g(calling)g(fitsio)g(routines)f (*/)191 5149 y(fits_create_file\(&fptr,)c("testfile.fits",)j (&status\);)140 b(/*)48 b(create)e(new)h(file)f(*/)191 5375 y(/*)h(Create)f(the)h(primary)f(array)g(image)h(\(16-bit)e(short)i (integer)f(pixels)g(*/)191 5488 y(fits_create_img\(fptr,)c(SHORT_IMG,)j (naxis,)h(naxes,)g(&status\);)191 5714 y(/*)h(Write)f(a)i(keyword;)d (must)i(pass)g(the)g(ADDRESS)e(of)j(the)f(value)f(*/)p eop end %%Page: 11 19 TeXDict begin 11 18 bop 0 299 a Fh(2.6.)72 b(EXAMPLE)31 b(PR)m(OGRAM)2618 b Fj(11)191 555 y Fe(exposure)45 b(=)j(1500.;)191 668 y(fits_update_key\(fptr,)42 b(TLONG,)k("EXPOSURE",)f(&exposure,)430 781 y("Total)h(Exposure)f(Time",)h(&status\);)191 1007 y(/*)h(Initialize)e(the)i(values)f(in)h(the)g(image)g(with)f(a)i (linear)e(ramp)g(function)g(*/)191 1120 y(for)h(\(jj)g(=)g(0;)g(jj)h(<) f(naxes[1];)e(jj++\))382 1233 y(for)i(\(ii)g(=)g(0;)g(ii)g(<)h (naxes[0];)d(ii++\))573 1346 y(array[jj][ii])f(=)j(ii)h(+)f(jj;)191 1571 y(nelements)e(=)j(naxes[0])d(*)j(naxes[1];)474 b(/*)48 b(number)e(of)h(pixels)f(to)h(write)g(*/)191 1797 y(/*)g(Write)f(the)h (array)g(of)g(integers)e(to)j(the)f(image)f(*/)191 1910 y(fits_write_img\(fptr,)c(TSHORT,)k(fpixel,)g(nelements,)f(array[0],)g (&status\);)191 2136 y(fits_close_file\(fptr,)d(&status\);)570 b(/*)47 b(close)g(the)g(file)f(*/)191 2362 y(fits_report_error\(stderr) o(,)c(status\);)93 b(/*)47 b(print)g(out)g(any)f(error)h(messages)e(*/) 191 2475 y(return\()h(status)g(\);)0 2588 y(})p eop end %%Page: 12 20 TeXDict begin 12 19 bop 0 299 a Fj(12)1535 b Fh(CHAPTER)30 b(2.)112 b(CREA)-8 b(TING)30 b(THE)g(CFITSIO)f(LIBRAR)-8 b(Y)p eop end %%Page: 13 21 TeXDict begin 13 20 bop 0 1225 a Fg(Chapter)65 b(3)0 1687 y Fm(A)78 b(FITS)f(Primer)0 2180 y Fj(This)23 b(section)j(giv)m (es)f(a)g(brief)e(o)m(v)m(erview)j(of)e(the)h(structure)e(of)i(FITS)e (\014les.)38 b(Users)24 b(should)g(refer)f(to)i(the)g(do)s(cumen-)0 2293 y(tation)j(a)m(v)-5 b(ailable)30 b(from)d(the)g(NOST,)f(as)i (describ)s(ed)e(in)h(the)g(in)m(tro)s(duction,)h(for)f(more)g(detailed) i(information)e(on)0 2406 y(FITS)j(formats.)0 2566 y(FITS)e(w)m(as)h (\014rst)g(dev)m(elop)s(ed)g(in)f(the)h(late)i(1970's)g(as)e(a)g (standard)f(data)i(in)m(terc)m(hange)g(format)f(b)s(et)m(w)m(een)h(v)-5 b(arious)0 2679 y(astronomical)36 b(observ)-5 b(atories.)52 b(Since)34 b(then)g(FITS)f(has)h(b)s(ecome)g(the)h(standard)e(data)i (format)f(supp)s(orted)e(b)m(y)0 2791 y(most)f(astronomical)h(data)f (analysis)g(soft)m(w)m(are)h(pac)m(k)-5 b(ages.)0 2952 y(A)34 b(FITS)f(\014le)g(consists)h(of)g(one)g(or)g(more)g(Header)g(+)f (Data)i(Units)f(\(HDUs\),)i(where)d(the)h(\014rst)f(HDU)h(is)g(called)0 3065 y(the)j(`Primary)f(HDU',)i(or)f(`Primary)f(Arra)m(y'.)60 b(The)36 b(primary)g(arra)m(y)h(con)m(tains)h(an)e(N-dimensional)i (arra)m(y)f(of)0 3177 y(pixels,)30 b(suc)m(h)g(as)g(a)h(1-D)g(sp)s (ectrum,)e(a)h(2-D)h(image,)h(or)e(a)g(3-D)i(data)e(cub)s(e.)40 b(Six)30 b(di\013eren)m(t)g(primary)f(data)i(t)m(yp)s(es)0 3290 y(are)j(supp)s(orted:)44 b(Unsigned)33 b(8-bit)h(b)m(ytes,)h (16-bit,)g(32-bit,)h(and)c(64-bit)j(signed)e(in)m(tegers,)i(and)e(32)h (and)f(64-bit)0 3403 y(\015oating)28 b(p)s(oin)m(t)e(reals.)40 b(FITS)27 b(also)g(has)g(a)g(con)m(v)m(en)m(tion)i(for)d(storing)i(16)f (and)f(32-bit)i(unsigned)e(in)m(tegers)i(\(see)g(the)0 3516 y(later)k(section)h(en)m(titled)g(`Unsigned)e(In)m(tegers')h(for)f (more)h(details\).)44 b(The)31 b(primary)g(HDU)h(ma)m(y)g(also)g (consist)g(of)0 3629 y(only)e(a)h(header)f(with)h(a)f(n)m(ull)h(arra)m (y)f(con)m(taining)i(no)f(data)g(pixels.)0 3789 y(An)m(y)i(n)m(um)m(b)s (er)e(of)h(additional)i(HDUs)f(ma)m(y)g(follo)m(w)h(the)e(primary)g (arra)m(y;)i(these)f(additional)h(HDUs)f(are)g(called)0 3902 y(FITS)d(`extensions'.)41 b(There)30 b(are)h(curren)m(tly)f(3)h(t) m(yp)s(es)g(of)f(extensions)h(de\014ned)e(b)m(y)h(the)h(FITS)f (standard:)136 4171 y Fc(\017)46 b Fj(Image)31 b(Extension)g(-)g(a)f (N-dimensional)h(arra)m(y)g(of)g(pixels,)g(lik)m(e)g(in)f(a)h(primary)e (arra)m(y)136 4368 y Fc(\017)46 b Fj(ASCI)s(I)29 b(T)-8 b(able)31 b(Extension)g(-)f(ro)m(ws)h(and)e(columns)h(of)h(data)g(in)f (ASCI)s(I)f(c)m(haracter)j(format)136 4564 y Fc(\017)46 b Fj(Binary)31 b(T)-8 b(able)31 b(Extension)f(-)h(ro)m(ws)f(and)g (columns)g(of)h(data)g(in)f(binary)f(represen)m(tation)0 4833 y(In)k(eac)m(h)i(case)g(the)f(HDU)h(consists)g(of)f(an)g(ASCI)s(I) e(Header)i(Unit)h(follo)m(w)m(ed)g(b)m(y)f(an)g(optional)h(Data)g (Unit.)52 b(F)-8 b(or)0 4946 y(historical)37 b(reasons,)g(eac)m(h)f (Header)g(or)g(Data)h(unit)e(m)m(ust)g(b)s(e)g(an)g(exact)i(m)m (ultiple)f(of)g(2880)h(8-bit)f(b)m(ytes)g(long.)0 5059 y(An)m(y)30 b(un)m(used)g(space)g(is)h(padded)e(with)h(\014ll)g(c)m (haracters)i(\(ASCI)s(I)d(blanks)h(or)h(zeros\).)0 5219 y(Eac)m(h)i(Header)f(Unit)h(consists)g(of)f(an)m(y)g(n)m(um)m(b)s(er)f (of)i(80-c)m(haracter)i(k)m(eyw)m(ord)d(records)g(or)g(`card)h(images') g(whic)m(h)0 5332 y(ha)m(v)m(e)f(the)e(general)i(form:)95 5601 y Fe(KEYNAME)46 b(=)i(value)e(/)i(comment)d(string)95 5714 y(NULLKEY)h(=)334 b(/)48 b(comment:)d(This)i(keyword)f(has)g(no)i (value)1905 5942 y Fj(13)p eop end %%Page: 14 22 TeXDict begin 14 21 bop 0 299 a Fj(14)2398 b Fh(CHAPTER)30 b(3.)112 b(A)30 b(FITS)g(PRIMER)0 555 y Fj(The)35 b(k)m(eyw)m(ord)i (names)f(ma)m(y)g(b)s(e)g(up)f(to)h(8)h(c)m(haracters)g(long)g(and)e (can)h(only)h(con)m(tain)g(upp)s(ercase)e(letters,)k(the)0 668 y(digits)25 b(0-9,)i(the)e(h)m(yphen,)g(and)f(the)h(underscore)e(c) m(haracter.)41 b(The)24 b(k)m(eyw)m(ord)h(name)g(is)f(\(usually\))h (follo)m(w)m(ed)i(b)m(y)d(an)0 781 y(equals)29 b(sign)g(and)f(a)g (space)i(c)m(haracter)g(\(=)e(\))h(in)f(columns)h(9)g(-)f(10)i(of)f (the)f(record,)h(follo)m(w)m(ed)i(b)m(y)d(the)h(v)-5 b(alue)29 b(of)g(the)0 894 y(k)m(eyw)m(ord)34 b(whic)m(h)g(ma)m(y)g(b)s (e)f(either)h(an)g(in)m(teger,)i(a)e(\015oating)g(p)s(oin)m(t)g(n)m(um) m(b)s(er,)g(a)g(c)m(haracter)h(string)e(\(enclosed)i(in)0 1007 y(single)28 b(quotes\),)i(or)e(a)g(b)s(o)s(olean)g(v)-5 b(alue)28 b(\(the)g(letter)h(T)f(or)f(F\).)i(A)f(k)m(eyw)m(ord)g(ma)m (y)h(also)f(ha)m(v)m(e)h(a)g(n)m(ull)e(or)h(unde\014ned)0 1120 y(v)-5 b(alue)31 b(if)f(there)h(is)f(no)g(sp)s(eci\014ed)g(v)-5 b(alue)31 b(string,)g(as)f(in)g(the)h(second)f(example,)i(ab)s(o)m(v)m (e)0 1280 y(The)42 b(last)h(k)m(eyw)m(ord)g(in)f(the)h(header)f(is)g (alw)m(a)m(ys)i(the)f(`END')g(k)m(eyw)m(ord)g(whic)m(h)f(has)g(no)h(v) -5 b(alue)42 b(or)h(commen)m(t)0 1393 y(\014elds.)d(There)30 b(are)h(man)m(y)f(rules)g(go)m(v)m(erning)i(the)e(exact)i(format)f(of)f (a)h(k)m(eyw)m(ord)f(record)h(\(see)g(the)f(NOST)g(FITS)0 1506 y(Standard\))c(so)i(it)f(is)h(b)s(etter)f(to)h(rely)f(on)g (standard)g(in)m(terface)h(soft)m(w)m(are)h(lik)m(e)f(CFITSIO)e(to)i (correctly)h(construct)0 1619 y(or)h(to)h(parse)g(the)f(k)m(eyw)m(ord)h (records)f(rather)g(than)h(try)f(to)h(deal)g(directly)g(with)f(the)g (ra)m(w)h(FITS)f(formats.)0 1779 y(Eac)m(h)37 b(Header)g(Unit)f(b)s (egins)g(with)g(a)g(series)h(of)f(required)g(k)m(eyw)m(ords)g(whic)m(h) g(dep)s(end)f(on)h(the)g(t)m(yp)s(e)h(of)f(HDU.)0 1892 y(These)31 b(required)g(k)m(eyw)m(ords)h(sp)s(ecify)g(the)f(size)i(and) e(format)h(of)g(the)g(follo)m(wing)h(Data)g(Unit.)45 b(The)31 b(header)g(ma)m(y)0 2005 y(con)m(tain)h(other)f(optional)g(k)m (eyw)m(ords)g(to)h(describ)s(e)e(other)g(asp)s(ects)h(of)g(the)g(data,) g(suc)m(h)g(as)g(the)f(units)g(or)h(scaling)0 2118 y(v)-5 b(alues.)44 b(Other)31 b(COMMENT)g(or)g(HISTOR)-8 b(Y)30 b(k)m(eyw)m(ords)i(are)g(also)g(frequen)m(tly)g(added)e(to)i(further)e (do)s(cumen)m(t)0 2230 y(the)h(data)g(\014le.)0 2391 y(The)36 b(optional)h(Data)h(Unit)f(immediately)g(follo)m(ws)h(the)e (last)h(2880-b)m(yte)i(blo)s(c)m(k)e(in)f(the)g(Header)h(Unit.)59 b(Some)0 2503 y(HDUs)31 b(do)f(not)h(ha)m(v)m(e)g(a)g(Data)h(Unit)f (and)f(only)g(consist)h(of)g(the)f(Header)h(Unit.)0 2664 y(If)24 b(there)i(is)f(more)g(than)f(one)h(HDU)h(in)f(the)g(FITS)f (\014le,)i(then)f(the)g(Header)h(Unit)f(of)g(the)g(next)g(HDU)h (immediately)0 2777 y(follo)m(ws)g(the)e(last)i(2880-b)m(yte)h(blo)s(c) m(k)e(of)g(the)f(previous)g(Data)j(Unit)d(\(or)h(Header)g(Unit)g(if)f (there)h(is)g(no)f(Data)i(Unit\).)0 2937 y(The)k(main)g(required)g(k)m (eyw)m(ords)g(in)g(FITS)g(primary)g(arra)m(ys)g(or)h(image)g (extensions)g(are:)136 3172 y Fc(\017)46 b Fj(BITPIX)32 b({)g(de\014nes)e(the)i(data)g(t)m(yp)s(e)g(of)g(the)g(arra)m(y:)43 b(8,)33 b(16,)g(32,)g(64,)g(-32,)g(-64)g(for)e(unsigned)f(8{bit)j(b)m (yte,)227 3284 y(16{bit)41 b(signed)f(in)m(teger,)j(32{bit)f(signed)d (in)m(teger,)44 b(32{bit)d(IEEE)e(\015oating)h(p)s(oin)m(t,)i(and)e (64{bit)h(IEEE)227 3397 y(double)30 b(precision)h(\015oating)g(p)s(oin) m(t,)g(resp)s(ectiv)m(ely)-8 b(.)136 3585 y Fc(\017)46 b Fj(NAXIS)30 b({)h(the)g(n)m(um)m(b)s(er)e(of)h(dimensions)g(in)g(the) h(arra)m(y)-8 b(,)31 b(usually)f(0,)h(1,)g(2,)g(3,)g(or)g(4.)136 3773 y Fc(\017)46 b Fj(NAXISn)30 b({)h(\(n)f(ranges)g(from)g(1)h(to)g (NAXIS\))g(de\014nes)e(the)i(size)g(of)g(eac)m(h)g(dimension.)0 4008 y(FITS)e(tables)i(start)g(with)f(the)g(k)m(eyw)m(ord)g(XTENSION)g (=)f(`T)-8 b(ABLE')31 b(\(for)f(ASCI)s(I)f(tables\))i(or)f(XTENSION)f (=)0 4120 y(`BINT)-8 b(ABLE')32 b(\(for)e(binary)g(tables\))h(and)f(ha) m(v)m(e)i(the)e(follo)m(wing)i(main)e(k)m(eyw)m(ords:)136 4355 y Fc(\017)46 b Fj(TFIELDS)30 b({)h(n)m(um)m(b)s(er)e(of)h (\014elds)g(or)h(columns)f(in)g(the)g(table)136 4543 y Fc(\017)46 b Fj(NAXIS2)31 b({)g(n)m(um)m(b)s(er)e(of)h(ro)m(ws)h(in)f (the)g(table)136 4731 y Fc(\017)46 b Fj(TTYPEn)29 b({)i(for)f(eac)m(h)i (column)e(\(n)g(ranges)h(from)f(1)g(to)h(TFIELDS\))g(giv)m(es)g(the)g (name)f(of)h(the)f(column)136 4918 y Fc(\017)46 b Fj(TF)m(ORMn)31 b({)f(the)h(data)g(t)m(yp)s(e)f(of)h(the)g(column)136 5106 y Fc(\017)46 b Fj(TUNITn)30 b({)g(the)h(ph)m(ysical)g(units)f(of)g (the)h(column)f(\(optional\))0 5341 y(Users)k(should)f(refer)h(to)h (the)f(FITS)g(Supp)s(ort)e(O\016ce)i(at)h Fe(http://fits.gsfc.nasa.gov) 27 b Fj(for)34 b(further)f(infor-)0 5454 y(mation)e(ab)s(out)f(the)h (FITS)e(format)i(and)f(related)h(soft)m(w)m(are)h(pac)m(k)-5 b(ages.)p eop end %%Page: 15 23 TeXDict begin 15 22 bop 0 1225 a Fg(Chapter)65 b(4)0 1687 y Fm(Programming)77 b(Guidelines)0 2216 y Ff(4.1)135 b(CFITSIO)44 b(De\014nitions)0 2466 y Fj(An)m(y)30 b(program)g(that)h (uses)f(the)h(CFITSIO)d(in)m(terface)k(m)m(ust)e(include)g(the)h (\014tsio.h)f(header)g(\014le)h(with)f(the)g(state-)0 2579 y(men)m(t)95 2818 y Fe(#include)46 b("fitsio.h")0 3057 y Fj(This)30 b(header)h(\014le)h(con)m(tains)g(the)f(protot)m(yp)s (es)h(for)f(all)h(the)f(CFITSIO)f(user)g(in)m(terface)j(routines)e(as)g (w)m(ell)h(as)g(the)0 3170 y(de\014nitions)g(of)g(v)-5 b(arious)32 b(constan)m(ts)h(used)e(in)h(the)h(in)m(terface.)47 b(It)32 b(also)h(de\014nes)e(a)i(C)f(structure)f(of)h(t)m(yp)s(e)h (`\014ts\014le')0 3283 y(that)j(is)g(used)f(b)m(y)g(CFITSIO)f(to)j (store)f(the)g(relev)-5 b(an)m(t)37 b(parameters)f(that)g(de\014ne)f (the)h(format)g(of)g(a)g(particular)0 3396 y(FITS)c(\014le.)48 b(Application)34 b(programs)f(m)m(ust)g(de\014ne)f(a)h(p)s(oin)m(ter)g (to)g(this)g(structure)g(for)f(eac)m(h)i(FITS)e(\014le)h(that)h(is)0 3508 y(to)i(b)s(e)f(op)s(ened.)56 b(This)35 b(structure)g(is)h (initialized)h(\(i.e.,)i(memory)c(is)h(allo)s(cated)h(for)f(the)g (structure\))f(when)g(the)0 3621 y(FITS)h(\014le)g(is)h(\014rst)e(op)s (ened)h(or)g(created)i(with)e(the)g(\014ts)p 1949 3621 28 4 v 33 w(op)s(en)p 2172 3621 V 32 w(\014le)g(or)h(\014ts)p 2596 3621 V 32 w(create)p 2864 3621 V 34 w(\014le)g(routines.)59 b(This)35 b(\014ts\014le)0 3734 y(p)s(oin)m(ter)c(is)h(then)f(passed)g (as)g(the)h(\014rst)e(argumen)m(t)i(to)g(ev)m(ery)g(other)g(CFITSIO)d (routine)j(that)g(op)s(erates)g(on)f(the)0 3847 y(FITS)h(\014le.)48 b(Application)34 b(programs)f(m)m(ust)g(not)g(directly)g(read)g(or)g (write)g(elemen)m(ts)h(in)f(this)g(\014ts\014le)f(structure)0 3960 y(b)s(ecause)e(the)h(de\014nition)f(of)h(the)f(structure)g(ma)m(y) h(c)m(hange)g(in)g(future)e(v)m(ersions)i(of)f(CFITSIO.)0 4120 y(A)45 b(n)m(um)m(b)s(er)e(of)i(sym)m(b)s(olic)g(constan)m(ts)h (are)f(also)g(de\014ned)f(in)g(\014tsio.h)h(for)f(the)h(con)m(v)m (enience)i(of)e(application)0 4233 y(programmers.)55 b(Use)35 b(of)h(these)f(sym)m(b)s(olic)h(constan)m(ts)g(rather)f(than)g (the)h(actual)g(n)m(umeric)f(v)-5 b(alue)36 b(will)f(help)g(to)0 4346 y(mak)m(e)c(the)g(source)f(co)s(de)h(more)g(readable)f(and)g (easier)i(for)e(others)g(to)h(understand.)0 4585 y Fe(String)46 b(Lengths,)g(for)h(use)f(when)h(allocating)e(character)g(arrays:)95 4811 y(#define)h(FLEN_FILENAME)e(1025)j(/*)g(max)g(length)f(of)h(a)h (filename)857 b(*/)95 4924 y(#define)46 b(FLEN_KEYWORD)140 b(72)95 b(/*)47 b(max)g(length)f(of)h(a)h(keyword)905 b(*/)95 5036 y(#define)46 b(FLEN_CARD)284 b(81)95 b(/*)47 b(max)g(length)f(of)h(a)h(FITS)f(header)f(card)476 b(*/)95 5149 y(#define)46 b(FLEN_VALUE)236 b(71)95 b(/*)47 b(max)g(length)f(of) h(a)h(keyword)e(value)g(string)285 b(*/)95 5262 y(#define)46 b(FLEN_COMMENT)140 b(73)95 b(/*)47 b(max)g(length)f(of)h(a)h(keyword)e (comment)g(string)189 b(*/)95 5375 y(#define)46 b(FLEN_ERRMSG)188 b(81)95 b(/*)47 b(max)g(length)f(of)h(a)h(CFITSIO)e(error)g(message)237 b(*/)95 5488 y(#define)46 b(FLEN_STATUS)188 b(31)95 b(/*)47 b(max)g(length)f(of)h(a)h(CFITSIO)e(status)g(text)g(string)h(*/)95 5714 y(Note)g(that)g(FLEN_KEYWORD)d(is)j(longer)f(than)h(the)g(nominal) f(8-character)f(keyword)1905 5942 y Fj(15)p eop end %%Page: 16 24 TeXDict begin 16 23 bop 0 299 a Fj(16)1763 b Fh(CHAPTER)29 b(4.)112 b(PR)m(OGRAMMING)32 b(GUIDELINES)95 555 y Fe(name)47 b(length)f(because)g(the)h(HIERARCH)e(convention)g(supports)h(longer)g (keyword)g(names.)0 781 y(Access)g(modes)g(when)h(opening)f(a)h(FITS)g (file:)95 1007 y(#define)f(READONLY)94 b(0)95 1120 y(#define)46 b(READWRITE)g(1)0 1346 y(BITPIX)g(data)h(type)f(code)h(values)f(for)h (FITS)g(images:)95 1571 y(#define)f(BYTE_IMG)284 b(8)96 b(/*)f(8-bit)46 b(unsigned)f(integers)h(*/)95 1684 y(#define)g (SHORT_IMG)189 b(16)95 b(/*)47 b(16-bit)141 b(signed)46 b(integers)g(*/)95 1797 y(#define)g(LONG_IMG)237 b(32)95 b(/*)47 b(32-bit)141 b(signed)46 b(integers)g(*/)95 1910 y(#define)g(LONGLONG_IMG)f(64)95 b(/*)47 b(64-bit)141 b(signed)46 b(integers)g(*/)95 2023 y(#define)g(FLOAT_IMG)141 b(-32)95 b(/*)47 b(32-bit)f(single)g(precision)f(floating)h(point)g(*/) 95 2136 y(#define)g(DOUBLE_IMG)93 b(-64)i(/*)47 b(64-bit)f(double)g (precision)f(floating)h(point)g(*/)95 2362 y(The)h(following)f(4)h (data)g(type)f(codes)h(are)g(also)f(supported)g(by)h(CFITSIO:)95 2475 y(#define)f(SBYTE_IMG)93 b(10)143 b(/*)95 b(8-bit)46 b(signed)g(integers,)g(equivalent)f(to)i(*/)1241 2588 y(/*)95 b(BITPIX)46 b(=)h(8,)h(BSCALE)e(=)h(1,)g(BZERO)g(=)g(-128)g(*/) 95 2700 y(#define)f(USHORT_IMG)93 b(20)i(/*)47 b(16-bit)f(unsigned)g (integers,)f(equivalent)g(to)i(*/)1241 2813 y(/*)95 b(BITPIX)46 b(=)h(16,)g(BSCALE)f(=)i(1,)f(BZERO)f(=)i(32768)e(*/)95 2926 y(#define)g(ULONG_IMG)141 b(40)95 b(/*)47 b(32-bit)f(unsigned)g (integers,)f(equivalent)g(to)i(*/)1241 3039 y(/*)95 b(BITPIX)46 b(=)h(32,)g(BSCALE)f(=)i(1,)f(BZERO)f(=)i(2147483648)d(*/)0 3265 y(Codes)h(for)h(the)g(data)g(type)f(of)i(binary)e(table)g(columns) g(and/or)g(for)h(the)0 3378 y(data)g(type)f(of)h(variables)f(when)g (reading)g(or)h(writing)f(keywords)g(or)h(data:)1432 3604 y(DATATYPE)714 b(TFORM)46 b(CODE)95 3717 y(#define)g(TBIT)476 b(1)96 b(/*)1335 b('X')47 b(*/)95 3830 y(#define)f(TBYTE)381 b(11)95 b(/*)47 b(8-bit)f(unsigned)g(byte,)332 b('B')47 b(*/)95 3942 y(#define)f(TLOGICAL)237 b(14)95 b(/*)47 b(logicals)e(\(int)i(for)g(keywords)236 b(*/)1289 4055 y(/*)95 b(and)46 b(char)h(for)g(table)f(cols)142 b('L')47 b(*/)95 4168 y(#define)f(TSTRING)285 b(16)95 b(/*)47 b(ASCII)f(string,)666 b('A')47 b(*/)95 4281 y(#define)f(TSHORT)333 b(21)95 b(/*)47 b(signed)f(short,)666 b('I')47 b(*/)95 4394 y(#define)f(TLONG)381 b(41)95 b(/*)47 b(signed)f(long,)905 b(*/)95 4507 y(#define)46 b(TLONGLONG)189 b(81)95 b(/*)47 b(64-bit)f(long)h(signed)f(integer)f('K')i(*/)95 4620 y(#define)f(TFLOAT)333 b(42)95 b(/*)47 b(single)f(precision)f(float,) 189 b('E')47 b(*/)95 4733 y(#define)f(TDOUBLE)285 b(82)95 b(/*)47 b(double)f(precision)f(float,)189 b('D')47 b(*/)95 4846 y(#define)f(TCOMPLEX)237 b(83)95 b(/*)47 b(complex)f(\(pair)g(of)h (floats\))141 b('C')47 b(*/)95 4959 y(#define)f(TDBLCOMPLEX)f(163)95 b(/*)47 b(double)f(complex)g(\(2)h(doubles\))e('M')i(*/)95 5185 y(The)g(following)f(data)g(type)h(codes)f(are)h(also)g(supported)e (by)i(CFITSIO:)95 5297 y(#define)f(TINT)429 b(31)95 b(/*)47 b(int)1335 b(*/)95 5410 y(#define)46 b(TSBYTE)333 b(12)95 b(/*)47 b(8-bit)f(signed)g(byte,)428 b('S')47 b(*/)95 5523 y(#define)f(TUINT)381 b(30)95 b(/*)47 b(unsigned)e(int)715 b('V')47 b(*/)95 5636 y(#define)f(TUSHORT)285 b(20)95 b(/*)47 b(unsigned)e(short)619 b('U')95 b(*/)p eop end %%Page: 17 25 TeXDict begin 17 24 bop 0 299 a Fh(4.2.)72 b(CURRENT)30 b(HEADER)h(D)m(A)-8 b(T)g(A)32 b(UNIT)e(\(CHDU\))1786 b Fj(17)95 555 y Fe(#define)46 b(TULONG)333 b(40)95 b(/*)47 b(unsigned)e(long)858 b(*/)95 781 y(The)47 b(following)f(data)g(type)h (code)g(is)g(only)f(for)h(use)g(with)g(fits\\_get\\_coltype)95 894 y(#define)f(TINT32BIT)189 b(41)95 b(/*)47 b(signed)f(32-bit)g(int,) 428 b('J')47 b(*/)0 1233 y(HDU)g(type)g(code)f(values)g(\(value)g (returned)g(when)h(moving)f(to)h(new)g(HDU\):)95 1458 y(#define)f(IMAGE_HDU)93 b(0)i(/*)48 b(Primary)d(Array)i(or)g(IMAGE)f (HDU)h(*/)95 1571 y(#define)f(ASCII_TBL)93 b(1)i(/*)48 b(ASCII)94 b(table)46 b(HDU)h(*/)95 1684 y(#define)f(BINARY_TBL)f(2)95 b(/*)48 b(Binary)e(table)g(HDU)h(*/)95 1797 y(#define)f(ANY_HDU)142 b(-1)94 b(/*)48 b(matches)d(any)i(type)g(of)g(HDU)g(*/)0 2023 y(Column)f(name)h(and)g(string)f(matching)f(case-sensitivity:)95 2249 y(#define)h(CASESEN)142 b(1)g(/*)48 b(do)f(case-sensitive)d (string)i(match)g(*/)95 2362 y(#define)g(CASEINSEN)g(0)142 b(/*)48 b(do)f(case-insensitive)c(string)j(match)h(*/)0 2588 y(Logical)f(states)g(\(if)h(TRUE)f(and)h(FALSE)g(are)g(not)g (already)e(defined\):)95 2813 y(#define)h(TRUE)h(1)95 2926 y(#define)f(FALSE)h(0)0 3152 y(Values)f(to)h(represent)f (undefined)f(floating)g(point)i(numbers:)95 3378 y(#define)f (FLOATNULLVALUE)92 b(-9.11912E-36F)95 3491 y(#define)46 b(DOUBLENULLVALUE)e(-9.1191291391491E-36)0 3717 y(Image)i(compression)f (algorithm)g(definitions)95 3942 y(#define)h(RICE_1)333 b(11)95 4055 y(#define)46 b(GZIP_1)333 b(21)95 4168 y(#define)46 b(PLIO_1)333 b(31)95 4281 y(#define)46 b(HCOMPRESS_1)93 b(41)0 4664 y Ff(4.2)135 b(Curren)l(t)46 b(Header)f(Data)h(Unit)g (\(CHDU\))0 4924 y Fj(The)37 b(concept)h(of)g(the)f(Curren)m(t)g (Header)g(and)g(Data)i(Unit,)h(or)d(CHDU,)h(is)f(fundamen)m(tal)h(to)g (the)f(use)g(of)h(the)0 5036 y(CFITSIO)31 b(library)-8 b(.)46 b(A)32 b(simple)h(FITS)e(image)j(ma)m(y)f(only)f(con)m(tain)i(a) e(single)h(Header)g(and)f(Data)h(unit)f(\(HDU\),)0 5149 y(but)39 b(in)g(general)i(FITS)e(\014les)h(can)g(con)m(tain)h(m)m (ultiple)g(Header)f(Data)h(Units)f(\(also)h(kno)m(wn)e(as)h (`extensions'\),)0 5262 y(concatenated)c(one)f(after)f(the)h(other)f (in)g(the)g(\014le.)53 b(The)33 b(user)h(can)g(sp)s(ecify)g(whic)m(h)g (HDU)h(should)e(b)s(e)g(initially)0 5375 y(op)s(ened)j(at)i(run)d(time) j(b)m(y)f(giving)h(the)f(HDU)h(name)f(or)g(n)m(um)m(b)s(er)f(after)h (the)g(ro)s(ot)h(\014le)f(name.)60 b(F)-8 b(or)38 b(example,)0 5488 y('m)m(y\014le.\014ts[4]')i(op)s(ens)d(the)h(5th)h(HDU)g(in)f(the) g(\014le)g(\(note)h(that)g(the)f(n)m(um)m(b)s(ering)f(starts)i(with)f (0\),)j(and)c('m)m(y-)0 5601 y(\014le.\014ts[EVENTS])k(op)s(ens)f(the)h (HDU)h(with)e(the)h(name)g('EVENTS')g(\(as)g(de\014ned)f(b)m(y)h(the)g (EXTNAME)g(or)0 5714 y(HDUNAME)35 b(k)m(eyw)m(ords\).)50 b(If)33 b(no)g(HDU)h(is)f(sp)s(eci\014ed)g(then)g(CFITSIO)e(op)s(ens)i (the)g(\014rst)g(HDU)h(\(the)g(primary)p eop end %%Page: 18 26 TeXDict begin 18 25 bop 0 299 a Fj(18)1763 b Fh(CHAPTER)29 b(4.)112 b(PR)m(OGRAMMING)32 b(GUIDELINES)0 555 y Fj(arra)m(y\))24 b(b)m(y)e(default.)39 b(The)22 b(CFITSIO)f(routines)i(whic)m(h)g(read)f (and)g(write)i(data)f(only)g(op)s(erate)g(within)g(the)g(op)s(ened)0 668 y(HDU,)32 b(Other)e(CFITSIO)f(routines)i(are)g(pro)m(vided)f(to)i (mo)m(v)m(e)g(to)f(and)f(op)s(en)g(an)m(y)h(other)g(existing)h(HDU)f (within)0 781 y(the)g(FITS)e(\014le)i(or)f(to)h(app)s(end)e(or)h (insert)g(new)g(HDUs)h(in)f(the)h(FITS)f(\014le.)0 1111 y Ff(4.3)135 b(F)-11 b(unction)44 b(Names)i(and)f(V)-11 b(ariable)46 b(Datat)l(yp)t(es)0 1361 y Fj(Most)33 b(of)f(the)g (CFITSIO)f(routines)h(ha)m(v)m(e)h(b)s(oth)e(a)i(short)e(name)h(as)h(w) m(ell)g(as)f(a)g(longer)h(descriptiv)m(e)g(name.)45 b(The)0 1474 y(short)32 b(name)g(is)g(only)g(5)h(or)f(6)g(c)m(haracters)h(long) g(and)f(is)g(similar)g(to)h(the)f(subroutine)f(name)h(in)g(the)g(F)-8 b(ortran-77)0 1587 y(v)m(ersion)38 b(of)g(FITSIO.)f(The)h(longer)g (name)g(is)g(more)g(descriptiv)m(e)h(and)e(it)h(is)g(recommended)g (that)g(it)h(b)s(e)e(used)0 1699 y(instead)31 b(of)f(the)h(short)f (name)g(to)h(more)g(clearly)h(do)s(cumen)m(t)e(the)g(source)h(co)s(de.) 0 1860 y(Man)m(y)c(of)f(the)g(CFITSIO)f(routines)h(come)h(in)e (families)i(whic)m(h)f(di\013er)g(only)g(in)g(the)g(data)h(t)m(yp)s(e)f (of)g(the)g(asso)s(ciated)0 1973 y(parameter\(s\).)45 b(The)31 b(data)h(t)m(yp)s(e)g(of)g(these)g(routines)f(is)h(indicated)g (b)m(y)f(the)h(su\016x)e(of)i(the)g(routine)f(name.)44 b(The)0 2085 y(short)27 b(routine)h(names)g(ha)m(v)m(e)h(a)f(1)g(or)f (2)h(c)m(haracter)i(su\016x)c(\(e.g.,)31 b('j')c(in)h('\013pkyj'\))g (while)f(the)h(long)g(routine)g(names)0 2198 y(ha)m(v)m(e)k(a)e(4)h(c)m (haracter)h(or)e(longer)h(su\016x)f(as)g(sho)m(wn)g(in)g(the)h(follo)m (wing)h(table:)191 2432 y Fe(Long)285 b(Short)94 b(Data)191 2545 y(Names)237 b(Names)94 b(Type)191 2658 y(-----)237 b(-----)94 b(----)191 2771 y(_bit)381 b(x)190 b(bit)191 2883 y(_byt)381 b(b)190 b(unsigned)46 b(byte)191 2996 y(_sbyt)333 b(sb)142 b(signed)46 b(byte)191 3109 y(_sht)381 b(i)190 b(short)47 b(integer)191 3222 y(_lng)381 b(j)190 b(long)47 b(integer)191 3335 y(_lnglng)237 b(jj)142 b(8-byte)46 b(LONGLONG)g(integer)g(\(see)g(note)h(below\))191 3448 y(_usht)333 b(ui)142 b(unsigned)46 b(short)g(integer)191 3561 y(_ulng)333 b(uj)142 b(unsigned)46 b(long)g(integer)191 3674 y(_uint)333 b(uk)142 b(unsigned)46 b(int)h(integer)191 3787 y(_int)381 b(k)190 b(int)47 b(integer)191 3900 y(_flt)381 b(e)190 b(real)47 b(exponential)e(floating)g(point)i(\(float\))191 4013 y(_fixflt)237 b(f)190 b(real)47 b(fixed-decimal)d(format)i (floating)g(point)g(\(float\))191 4125 y(_dbl)381 b(d)190 b(double)46 b(precision)g(real)g(floating-point)e(\(double\))191 4238 y(_fixdbl)237 b(g)190 b(double)46 b(precision)g(fixed-format)e (floating)i(point)g(\(double\))191 4351 y(_cmp)381 b(c)190 b(complex)46 b(reals)g(\(pairs)h(of)g(float)f(values\))191 4464 y(_fixcmp)237 b(fc)142 b(complex)46 b(reals,)g(fixed-format)f (floating)g(point)191 4577 y(_dblcmp)237 b(m)190 b(double)46 b(precision)g(complex)f(\(pairs)i(of)g(double)f(values\))191 4690 y(_fixdblcmp)93 b(fm)142 b(double)46 b(precision)g(complex,)f (fixed-format)g(floating)g(point)191 4803 y(_log)381 b(l)190 b(logical)46 b(\(int\))191 4916 y(_str)381 b(s)190 b(character)46 b(string)0 5149 y Fj(The)32 b(logical)j(data)f(t)m(yp)s (e)f(corresp)s(onds)e(to)j(`in)m(t')f(for)g(logical)i(k)m(eyw)m(ord)e (v)-5 b(alues,)34 b(and)e(`b)m(yte')i(for)f(logical)i(binary)0 5262 y(table)40 b(columns.)67 b(In)39 b(other)g(w)m(ords,)i(the)f(v)-5 b(alue)39 b(when)g(writing)g(a)h(logical)h(k)m(eyw)m(ord)f(m)m(ust)f(b) s(e)g(stored)g(in)g(an)0 5375 y(`in)m(t')g(v)-5 b(ariable,)40 b(and)e(m)m(ust)f(b)s(e)g(stored)h(in)g(a)g(`c)m(har')h(arra)m(y)f (when)f(reading)h(or)f(writing)h(to)h(`L')f(columns)f(in)h(a)0 5488 y(binary)c(table.)56 b(Implicit)35 b(data)h(t)m(yp)s(e)f(con)m(v)m (ersion)i(is)e(not)g(supp)s(orted)e(for)i(logical)j(table)e(columns,)g (but)e(is)h(for)0 5601 y(k)m(eyw)m(ords,)30 b(so)f(a)h(logical)h(k)m (eyw)m(ord)f(ma)m(y)f(b)s(e)g(read)f(and)h(cast)h(to)g(an)m(y)f(n)m (umerical)h(data)f(t)m(yp)s(e;)h(a)g(returned)d(v)-5 b(alue)0 5714 y(=)30 b(0)h(indicates)g(false,)g(and)f(an)m(y)h(other)f (v)-5 b(alue)31 b(=)f(true.)p eop end %%Page: 19 27 TeXDict begin 19 26 bop 0 299 a Fh(4.3.)72 b(FUNCTION)30 b(NAMES)h(AND)g(V)-10 b(ARIABLE)30 b(D)m(A)-8 b(T)g(A)g(TYPES)1409 b Fj(19)0 555 y(The)24 b(`in)m(t')i(data)g(t)m(yp)s(e)f(ma)m(y)h(b)s(e) e(2)h(b)m(ytes)h(long)f(on)g(some)g(old)g(PC)g(compilers,)h(but)f (otherwise)g(it)g(is)g(nearly)g(alw)m(a)m(ys)0 668 y(4)i(b)m(ytes)g (long.)40 b(Some)27 b(64-bit)h(mac)m(hines,)g(lik)m(e)g(the)f (Alpha/OSF,)g(de\014ne)f(the)h(`short',)h(`in)m(t',)h(and)d(`long')i (in)m(teger)0 781 y(data)j(t)m(yp)s(es)f(to)i(b)s(e)d(2,)i(4,)g(and)f (8)h(b)m(ytes)g(long,)g(resp)s(ectiv)m(ely)-8 b(.)0 941 y(Because)40 b(there)e(is)h(no)f(univ)m(ersal)h(C)f(compiler)g (standard)g(for)g(the)h(name)f(of)h(the)f(8-b)m(yte)i(in)m(teger)g (datat)m(yp)s(e,)0 1054 y(the)33 b(\014tsio.h)h(include)f(\014le)g(t)m (yp)s(edef)7 b('s)33 b('LONGLONG')h(to)g(b)s(e)e(equiv)-5 b(alen)m(t)35 b(to)f(an)f(appropriate)g(8-b)m(yte)i(in)m(teger)0 1167 y(data)c(t)m(yp)s(e)g(on)f(eac)m(h)i(supp)s(orted)d(platform.)41 b(F)-8 b(or)31 b(maxim)m(um)f(soft)m(w)m(are)i(p)s(ortabilit)m(y)g(it)f (is)f(recommended)g(that)0 1280 y(this)g(LONGLONG)g(datat)m(yp)s(e)h(b) s(e)e(used)g(to)i(de\014ne)e(8-b)m(yte)i(in)m(teger)h(v)-5 b(ariables)30 b(rather)g(than)g(using)f(the)i(nativ)m(e)0 1393 y(data)h(t)m(yp)s(e)g(name)f(on)h(a)f(particular)h(platform.)44 b(On)31 b(most)h(32-bit)g(Unix)g(and)e(Mac)j(OS-X)e(op)s(erating)h (systems)0 1506 y(LONGLONG)h(is)f(equiv)-5 b(alen)m(t)34 b(to)f(the)g(in)m(trinsic)g('long)g(long')h(8-b)m(yte)g(in)m(teger)f (datat)m(yp)s(e.)49 b(On)31 b(64-bit)j(systems)0 1619 y(\(whic)m(h)e(curren)m(tly)g(includes)f(Alpha)h(OSF/1,)g(64-bit)h(Sun) e(Solaris,)h(64-bit)h(SGI)f(MIPS,)f(and)g(64-bit)i(Itanium)0 1732 y(and)28 b(Opteron)g(PC)h(systems\),)g(LONGLONG)g(is)g(simply)f(t) m(yp)s(edef)7 b('ed)29 b(to)g(b)s(e)g(equiv)-5 b(alen)m(t)30 b(to)f('long'.)42 b(Microsoft)0 1844 y(Visual)33 b(C++)e(V)-8 b(ersion)33 b(6.0)g(do)s(es)f(not)g(de\014ne)g(a)h('long)g(long')g (data)g(t)m(yp)s(e,)g(so)f(LONGLONG)h(is)f(t)m(yp)s(edef)7 b('ed)32 b(to)0 1957 y(b)s(e)e(equiv)-5 b(alen)m(t)32 b(to)f(the)f(')p 853 1957 28 4 v 887 1957 V 66 w(in)m(t64')i(data)f(t)m (yp)s(e)g(on)f(32-bit)h(windo)m(ws)f(systems)h(when)e(using)h(Visual)h (C++.)0 2118 y(A)j(related)h(issue)e(that)i(a\013ects)g(the)f(p)s (ortabilit)m(y)g(of)g(soft)m(w)m(are)i(is)d(ho)m(w)h(to)h(prin)m(t)e (out)h(the)g(v)-5 b(alue)34 b(of)g(a)g('LONG-)0 2230 y(LONG')e(v)-5 b(ariable)32 b(with)f(prin)m(tf.)44 b(Dev)m(elop)s(ers) 33 b(ma)m(y)f(\014nd)e(it)i(con)m(v)m(enien)m(t)h(to)g(use)e(the)h (follo)m(wing)h(prepro)s(cessing)0 2343 y(statemen)m(ts)f(in)e(their)h (C)f(programs)g(to)h(handle)f(this)g(in)g(a)h(mac)m(hine-p)s(ortable)g (manner:)0 2593 y Fe(#if)47 b(defined\(_MSC_VER\))c(/*)k(Microsoft)e (Visual)i(C++)f(*/)477 2706 y(printf\("\045I64d",)e(longlongvalue\);)0 2932 y(#elif)i(\(USE_LL_SUFFIX)e(==)j(1\))477 3045 y (printf\("\045lld",)d(longlongvalue\);)0 3271 y(#else)477 3384 y(printf\("\045ld",)g(longlongvalue\);)0 3496 y(#endif)0 3746 y Fj(Similarly)-8 b(,)32 b(the)f(name)g(of)g(the)h(C)e(utilit)m(y) j(routine)e(that)g(con)m(v)m(erts)i(a)e(c)m(haracter)i(string)d(of)i (digits)f(in)m(to)h(a)g(8-b)m(yte)0 3859 y(in)m(teger)g(v)-5 b(alue)31 b(is)f(platform)g(dep)s(enden)m(t:)0 4109 y Fe(#if)47 b(defined\(_MSC_VER\))c(/*)k(Microsoft)e(Visual)i(C++)f(*/) 286 4222 y(/*)i(VC++)e(6.0)h(does)g(not)g(seem)f(to)h(have)g(an)g (8-byte)f(conversion)f(routine)h(*/)0 4448 y(#elif)g(\(USE_LL_SUFFIX)e (==)j(1\))477 4561 y(longlongvalue)d(=)k(atoll\(*string\);)0 4787 y(#else)477 4899 y(longlongvalue)c(=)k(atol\(*string\);)0 5012 y(#endif)0 5262 y Fj(When)23 b(dealing)h(with)f(the)h(FITS)f(b)m (yte)h(data)g(t)m(yp)s(e)f(it)h(is)g(imp)s(ortan)m(t)f(to)h(remem)m(b)s (er)f(that)h(the)g(ra)m(w)f(v)-5 b(alues)24 b(\(b)s(efore)0 5375 y(an)m(y)h(scaling)g(b)m(y)f(the)h(BSCALE)e(and)h(BZER)m(O,)g(or)h (TSCALn)d(and)i(TZER)m(On)f(k)m(eyw)m(ord)i(v)-5 b(alues\))25 b(in)f(b)m(yte)h(arra)m(ys)0 5488 y(\(BITPIX)37 b(=)f(8\))h(or)f(b)m (yte)i(columns)e(\(TF)m(ORMn)h(=)f('B'\))h(are)g(in)m(terpreted)g(as)g (unsigned)e(b)m(ytes)i(with)g(v)-5 b(alues)0 5601 y(ranging)34 b(from)g(0)g(to)h(255.)53 b(Some)34 b(C)g(compilers)h(de\014ne)e(a)h ('c)m(har')h(v)-5 b(ariable)35 b(as)g(signed,)g(so)f(it)h(is)f(imp)s (ortan)m(t)g(to)0 5714 y(explicitly)e(declare)f(a)g(n)m(umeric)f(c)m (har)h(v)-5 b(ariable)31 b(as)g('unsigned)e(c)m(har')i(to)g(a)m(v)m (oid)h(an)m(y)f(am)m(biguit)m(y)p eop end %%Page: 20 28 TeXDict begin 20 27 bop 0 299 a Fj(20)1763 b Fh(CHAPTER)29 b(4.)112 b(PR)m(OGRAMMING)32 b(GUIDELINES)0 555 y Fj(One)22 b(feature)h(of)g(the)g(CFITSIO)e(routines)i(is)f(that)i(they)f(can)g (op)s(erate)g(on)f(a)h(`X')h(\(bit\))f(column)g(in)f(a)h(binary)f (table)0 668 y(as)33 b(though)f(it)h(w)m(ere)g(a)g(`B')g(\(b)m(yte\))h (column.)47 b(F)-8 b(or)33 b(example)g(a)g(`11X')h(data)f(t)m(yp)s(e)g (column)f(can)h(b)s(e)f(in)m(terpreted)0 781 y(the)c(same)h(as)f(a)g (`2B')i(column)e(\(i.e.,)i(2)e(unsigned)f(8-bit)i(b)m(ytes\).)41 b(In)27 b(some)i(instances,)g(it)f(can)h(b)s(e)e(more)h(e\016cien)m(t)0 894 y(to)j(read)f(and)g(write)h(whole)f(b)m(ytes)h(at)g(a)g(time,)g (rather)g(than)f(reading)g(or)h(writing)f(eac)m(h)i(individual)d(bit.)0 1054 y(The)36 b(complex)i(and)e(double)h(precision)g(complex)h(data)g (t)m(yp)s(es)f(are)g(not)g(directly)h(supp)s(orted)d(in)i(ANSI)f(C)h (so)0 1167 y(these)g(data)g(t)m(yp)s(es)f(should)f(b)s(e)h(in)m (terpreted)h(as)f(pairs)g(of)h(\015oat)g(or)f(double)g(v)-5 b(alues,)38 b(resp)s(ectiv)m(ely)-8 b(,)40 b(where)c(the)0 1280 y(\014rst)30 b(v)-5 b(alue)30 b(in)h(eac)m(h)g(pair)f(is)h(the)f (real)h(part,)g(and)e(the)i(second)f(is)h(the)f(imaginary)h(part.)0 1606 y Ff(4.4)135 b(Supp)t(ort)44 b(for)h(Unsigned)h(In)l(tegers)g(and) f(Signed)g(Bytes)0 1856 y Fj(Although)33 b(FITS)f(do)s(es)g(not)h (directly)h(supp)s(ort)d(unsigned)g(in)m(tegers)j(as)f(one)g(of)g(its)h (fundamen)m(tal)e(data)i(t)m(yp)s(es,)0 1969 y(FITS)27 b(can)h(still)h(b)s(e)e(used)g(to)i(e\016cien)m(tly)h(store)e(unsigned) f(in)m(teger)i(data)g(v)-5 b(alues)28 b(in)g(images)h(and)e(binary)g (tables.)0 2082 y(The)42 b(con)m(v)m(en)m(tion)j(used)d(in)g(FITS)g (\014les)h(is)f(to)i(store)f(the)g(unsigned)e(in)m(tegers)j(as)f (signed)g(in)m(tegers)h(with)e(an)0 2195 y(asso)s(ciated)34 b(o\013set)f(\(sp)s(eci\014ed)f(b)m(y)g(the)g(BZER)m(O)g(or)g(TZER)m (On)f(k)m(eyw)m(ord\).)47 b(F)-8 b(or)33 b(example,)g(to)g(store)g (unsigned)0 2308 y(16-bit)g(in)m(teger)g(v)-5 b(alues)32 b(in)f(a)h(FITS)f(image)i(the)e(image)i(w)m(ould)f(b)s(e)e(de\014ned)h (as)h(a)g(signed)f(16-bit)i(in)m(teger)g(\(with)0 2421 y(BITPIX)c(k)m(eyw)m(ord)g(=)g(SHOR)-8 b(T)p 1132 2421 28 4 v 32 w(IMG)30 b(=)e(16\))j(with)d(the)i(k)m(eyw)m(ords)f(BSCALE)f (=)h(1.0)h(and)f(BZER)m(O)g(=)f(32768.)0 2534 y(Th)m(us)34 b(the)h(unsigned)f(v)-5 b(alues)35 b(of)g(0,)i(32768,)h(and)d(65535,)j (for)d(example,)i(are)e(ph)m(ysically)h(stored)f(in)g(the)g(FITS)0 2647 y(image)40 b(as)e(-32768,)43 b(0,)e(and)d(32767,)k(resp)s(ectiv)m (ely;)i(CFITSIO)37 b(automatically)k(adds)c(the)i(BZER)m(O)f(o\013set)h (to)0 2759 y(these)g(v)-5 b(alues)39 b(when)f(they)g(are)h(read.)65 b(Similarly)-8 b(,)42 b(in)c(the)h(case)h(of)e(unsigned)g(32-bit)i(in)m (tegers)f(the)g(BITPIX)0 2872 y(k)m(eyw)m(ord)c(w)m(ould)f(b)s(e)g (equal)h(to)h(LONG)p 1392 2872 V 32 w(IMG)f(=)g(32)g(and)f(BZER)m(O)g (w)m(ould)h(b)s(e)f(equal)h(to)g(2147483648)k(\(i.e.)55 b(2)0 2985 y(raised)30 b(to)h(the)g(31st)g(p)s(o)m(w)m(er\).)0 3145 y(The)j(CFITSIO)g(in)m(terface)i(routines)f(will)g(e\016cien)m (tly)i(and)d(transparen)m(tly)i(apply)e(the)h(appropriate)g(o\013set)h (in)0 3258 y(these)29 b(cases)h(so)f(in)g(general)h(application)g (programs)f(do)g(not)g(need)f(to)i(b)s(e)e(concerned)h(with)g(ho)m(w)g (the)g(unsigned)0 3371 y(v)-5 b(alues)44 b(are)h(actually)h(stored)e (in)f(the)i(FITS)e(\014le.)82 b(As)44 b(a)g(con)m(v)m(enience)j(for)c (users,)k(CFITSIO)c(has)h(sev)m(eral)0 3484 y(prede\014ned)19 b(constan)m(ts)j(for)f(the)g(v)-5 b(alue)21 b(of)g(BITPIX)g(\(USHOR)-8 b(T)p 2189 3484 V 33 w(IMG,)21 b(ULONG)p 2790 3484 V 33 w(IMG\))h(and)e(for)h(the)g(TF)m(ORMn)0 3597 y(v)-5 b(alue)36 b(in)f(the)h(case)g(of)g(binary)f(tables)h(\(`U')h(and)e (`V'\))h(whic)m(h)f(programmers)g(can)h(use)f(when)g(creating)i(FITS)0 3710 y(\014les)i(con)m(taining)h(unsigned)e(in)m(teger)i(v)-5 b(alues.)66 b(The)39 b(follo)m(wing)h(co)s(de)f(fragmen)m(t)g (illustrates)h(ho)m(w)f(to)h(write)f(a)0 3823 y(FITS)30 b(1-D)h(primary)f(arra)m(y)g(of)h(unsigned)e(16-bit)j(in)m(tegers:)286 4034 y Fe(unsigned)46 b(short)g(uarray[100];)286 4147 y(int)h(naxis,)f(status;)286 4260 y(long)h(naxes[10],)e(group,)h (firstelem,)f(nelements;)334 4373 y(...)286 4486 y(status)h(=)i(0;)286 4599 y(naxis)f(=)g(1;)286 4712 y(naxes[0])f(=)h(100;)286 4825 y(fits_create_img\(fptr,)42 b(USHORT_IMG,)j(naxis,)h(naxes,)g (&status\);)286 5051 y(firstelem)g(=)h(1;)286 5164 y(nelements)f(=)h (100;)286 5276 y(fits_write_img\(fptr,)c(TUSHORT,)i(firstelem,)g (nelements,)1241 5389 y(uarray,)h(&status\);)334 5502 y(...)0 5714 y Fj(In)40 b(the)h(ab)s(o)m(v)m(e)i(example,)h(the)e(2nd)e (parameter)h(in)g(\014ts)p 1998 5714 V 33 w(create)p 2267 5714 V 34 w(img)g(tells)h(CFITSIO)e(to)i(write)f(the)g(header)p eop end %%Page: 21 29 TeXDict begin 21 28 bop 0 299 a Fh(4.4.)72 b(SUPPOR)-8 b(T)30 b(F)m(OR)g(UNSIGNED)h(INTEGERS)f(AND)h(SIGNED)f(BYTES)942 b Fj(21)0 555 y(k)m(eyw)m(ords)34 b(appropriate)g(for)f(an)g(arra)m(y)i (of)e(16-bit)i(unsigned)e(in)m(tegers)i(\(i.e.,)h(BITPIX)d(=)g(16)i (and)e(BZER)m(O)g(=)0 668 y(32768\).)41 b(Then)23 b(the)h(\014ts)p 834 668 28 4 v 32 w(write)p 1068 668 V 33 w(img)h(routine)f(writes)f (the)i(arra)m(y)f(of)g(unsigned)f(short)g(in)m(tegers)i(\(uarra)m(y\))g (in)m(to)g(the)0 781 y(primary)f(arra)m(y)h(of)g(the)g(FITS)f(\014le.) 39 b(Similarly)-8 b(,)27 b(a)e(32-bit)i(unsigned)c(in)m(teger)j(image)h (ma)m(y)e(b)s(e)f(created)i(b)m(y)f(setting)0 894 y(the)34 b(second)f(parameter)h(in)f(\014ts)p 1130 894 V 33 w(create)p 1399 894 V 34 w(img)h(equal)g(to)g(`ULONG)p 2330 894 V 33 w(IMG')g(and)f(b)m(y)h(calling)g(the)g(\014ts)p 3491 894 V 33 w(write)p 3726 894 V 33 w(img)0 1007 y(routine)j(with)f (the)h(second)f(parameter)h(=)f(TULONG)h(to)g(write)g(the)f(arra)m(y)h (of)g(unsigned)f(long)h(image)h(pixel)0 1120 y(v)-5 b(alues.)0 1280 y(An)27 b(analogous)h(set)f(of)g(routines)g(are)g(a)m(v)-5 b(ailable)30 b(for)c(reading)h(or)g(writing)g(unsigned)f(in)m(teger)i (v)-5 b(alues)28 b(and)e(signed)0 1393 y(b)m(yte)i(v)-5 b(alues)28 b(in)g(a)g(FITS)f(binary)g(table)i(extension.)40 b(When)28 b(sp)s(ecifying)f(the)h(TF)m(ORMn)g(k)m(eyw)m(ord)g(v)-5 b(alue)28 b(whic)m(h)0 1506 y(de\014nes)36 b(the)h(format)g(of)g(a)h (column,)g(CFITSIO)d(recognized)k(3)e(additional)h(data)f(t)m(yp)s(e)g (co)s(des)g(b)s(esides)f(those)0 1619 y(already)30 b(de\014ned)f(in)g (the)h(FITS)f(standard:)40 b(`U')30 b(meaning)g(a)g(16-bit)h(unsigned)e (in)m(teger)i(column,)f(`V')g(for)g(a)g(32-)0 1732 y(bit)c(unsigned)e (in)m(teger)j(column,)g(and)e('S')g(for)g(a)h(signed)g(b)m(yte)g (column.)39 b(These)25 b(non-standard)g(data)h(t)m(yp)s(e)g(co)s(des)0 1844 y(are)36 b(not)g(actually)i(written)e(in)m(to)g(the)g(FITS)g (\014le)f(but)h(instead)g(are)g(just)f(used)g(in)m(ternally)i(within)e (CFITSIO.)0 1957 y(The)30 b(follo)m(wing)i(co)s(de)e(fragmen)m(t)h (illustrates)h(ho)m(w)e(to)h(use)f(these)h(features:)286 2214 y Fe(unsigned)46 b(short)g(uarray[100];)286 2327 y(unsigned)g(int)95 b(varray[100];)286 2552 y(int)47 b(colnum,)f(tfields,)g(status;)286 2665 y(long)h(nrows,)f(firstrow,)f (firstelem,)g(nelements,)g(pcount;)286 2891 y(char)i(extname[])e(=)j ("Test_table";)521 b(/*)47 b(extension)f(name)g(*/)286 3117 y(/*)i(define)e(the)h(name,)f(data)h(type,)f(and)h(physical)e (units)i(for)g(the)g(2)g(columns)f(*/)286 3230 y(char)h(*ttype[])f(=)h ({)g("Col_1",)f("Col_2",)g("Col_3")f(};)286 3343 y(char)i(*tform[])f(=) h({)g("1U",)285 b("1V",)190 b("1S"};)94 b(/*)47 b(special)f(CFITSIO)g (codes)g(*/)286 3456 y(char)h(*tunit[])f(=)h({)g(")h(",)381 b(")48 b(",)190 b(")47 b(")h(};)334 3569 y(...)525 3794 y(/*)f(write)g(the)f(header)h(keywords)e(*/)286 3907 y(status)94 b(=)48 b(0;)286 4020 y(nrows)142 b(=)48 b(1;)286 4133 y(tfields)e(=)i(3)286 4246 y(pcount)94 b(=)48 b(0;)286 4359 y(fits_create_tbl\(fptr,)42 b(BINARY_TBL,)j(nrows,)h(tfields,)g (ttype,)g(tform,)764 4472 y(tunit,)g(extname,)f(&status\);)525 4698 y(/*)i(write)g(the)f(unsigned)g(shorts)g(to)h(the)g(1st)g(column)f (*/)286 4811 y(colnum)190 b(=)47 b(1;)286 4924 y(firstrow)94 b(=)47 b(1;)286 5036 y(firstelem)f(=)h(1;)286 5149 y(nelements)f(=)h (100;)286 5262 y(fits_write_col\(fptr,)c(TUSHORT,)i(colnum,)h (firstrow,)f(firstelem,)668 5375 y(nelements,)g(uarray,)h(&status\);) 525 5601 y(/*)h(now)g(write)f(the)h(unsigned)f(longs)g(to)h(the)g(2nd)g (column)f(*/)286 5714 y(colnum)190 b(=)47 b(2;)p eop end %%Page: 22 30 TeXDict begin 22 29 bop 0 299 a Fj(22)1763 b Fh(CHAPTER)29 b(4.)112 b(PR)m(OGRAMMING)32 b(GUIDELINES)286 555 y Fe (fits_write_col\(fptr,)43 b(TUINT,)j(colnum,)g(firstrow,)f(firstelem,) 668 668 y(nelements,)g(varray,)h(&status\);)334 781 y(...)0 1027 y Fj(Note)22 b(that)g(the)f(non-standard)f(TF)m(ORM)h(v)-5 b(alues)21 b(for)g(the)g(3)g(columns,)i(`U')e(and)g(`V',)h(tell)g (CFITSIO)d(to)j(write)f(the)0 1140 y(k)m(eyw)m(ords)27 b(appropriate)f(for)g(unsigned)f(16-bit)j(and)d(unsigned)h(32-bit)h(in) m(tegers,)i(resp)s(ectiv)m(ely)e(\(i.e.,)i(TF)m(ORMn)0 1252 y(=)39 b('1I')i(and)e(TZER)m(On)f(=)h(32678)j(for)e(unsigned)e (16-bit)j(in)m(tegers,)j(and)39 b(TF)m(ORMn)h(=)f('1J')h(and)f(TZER)m (On)0 1365 y(=)c(2147483648)40 b(for)35 b(unsigned)f(32-bit)i(in)m (tegers\).)57 b(The)35 b('S')g(TF)m(ORMn)g(v)-5 b(alue)36 b(tells)h(CFITSIO)c(to)j(write)g(the)0 1478 y(k)m(eyw)m(ords)30 b(appropriate)g(for)g(a)g(signed)g(8-bit)h(b)m(yte)f(column)g(with)f (TF)m(ORMn)h(=)g('1B')h(and)e(TZER)m(On)g(=)g(-128.)0 1591 y(The)h(calls)h(to)h(\014ts)p 628 1591 28 4 v 32 w(write)p 862 1591 V 33 w(col)f(then)f(write)h(the)g(arra)m(ys)f(of)h (unsigned)e(in)m(teger)j(v)-5 b(alues)31 b(to)g(the)f(columns.)0 1923 y Ff(4.5)135 b(Dealing)47 b(with)e(Character)h(Strings)0 2173 y Fj(The)36 b(c)m(haracter)j(string)d(v)-5 b(alues)38 b(in)e(a)h(FITS)f(header)h(or)g(in)f(an)h(ASCI)s(I)e(column)i(in)f(a)i (FITS)e(table)h(extension)0 2286 y(are)i(generally)i(padded)d(out)h (with)g(non-signi\014can)m(t)h(space)f(c)m(haracters)i(\(ASCI)s(I)d (32\))i(to)g(\014ll)f(up)f(the)h(header)0 2399 y(record)33 b(or)h(the)f(column)h(width.)49 b(When)33 b(reading)h(a)g(FITS)e (string)i(v)-5 b(alue,)35 b(the)e(CFITSIO)f(routines)i(will)f(strip)0 2512 y(o\013)38 b(these)f(non-signi\014can)m(t)h(trailing)g(spaces)f (and)g(will)g(return)f(a)i(n)m(ull-terminated)g(string)f(v)-5 b(alue)37 b(con)m(taining)0 2624 y(only)d(the)g(signi\014can)m(t)g(c)m (haracters.)52 b(Leading)34 b(spaces)g(in)g(a)g(FITS)f(string)g(are)h (considered)g(signi\014can)m(t.)52 b(If)33 b(the)0 2737 y(string)i(con)m(tains)h(all)g(blanks,)g(then)e(CFITSIO)g(will)h (return)f(a)h(single)g(blank)g(c)m(haracter,)j(i.e,)f(the)e(\014rst)f (blank)0 2850 y(is)c(considered)f(to)i(b)s(e)e(signi\014can)m(t,)i (since)f(it)g(distinguishes)g(the)g(string)f(from)h(a)g(n)m(ull)f(or)h (unde\014ned)e(string,)i(but)0 2963 y(the)h(remaining)f(trailing)h (spaces)g(are)g(not)g(signi\014can)m(t.)0 3123 y(Similarly)-8 b(,)41 b(when)c(writing)h(string)g(v)-5 b(alues)38 b(to)h(a)g(FITS)e (\014le)h(the)g(CFITSIO)f(routines)h(exp)s(ect)g(to)h(get)g(a)g(n)m (ull-)0 3236 y(terminated)33 b(string)g(as)g(input;)g(CFITSIO)e(will)i (pad)f(the)h(string)g(with)f(blanks)g(if)h(necessary)g(when)f(writing)g (it)0 3349 y(to)f(the)g(FITS)e(\014le.)0 3509 y(When)j(calling)i (CFITSIO)d(routines)i(that)g(return)e(a)i(c)m(haracter)h(string)f(it)g (is)f(vital)i(that)f(the)g(size)g(of)g(the)g(c)m(har)0 3622 y(arra)m(y)38 b(b)s(e)g(large)h(enough)e(to)i(hold)e(the)h(en)m (tire)h(string)f(of)g(c)m(haracters,)k(otherwise)c(CFITSIO)e(will)i(o)m (v)m(erwrite)0 3735 y(whatev)m(er)d(memory)e(lo)s(cations)i(follo)m(w)g (the)f(c)m(har)h(arra)m(y)-8 b(,)35 b(p)s(ossibly)e(causing)h(the)g (program)g(to)g(execute)h(incor-)0 3848 y(rectly)-8 b(.)42 b(This)30 b(t)m(yp)s(e)g(of)h(error)f(can)h(b)s(e)f(di\016cult)g(to)h (debug,)f(so)h(programmers)f(should)f(alw)m(a)m(ys)j(ensure)e(that)h (the)0 3961 y(c)m(har)c(arra)m(ys)g(are)g(allo)s(cated)i(enough)d (space)i(to)f(hold)g(the)f(longest)i(p)s(ossible)f(string,)g Fi(including)h Fj(the)f(terminat-)0 4074 y(ing)k(NULL)g(c)m(haracter.) 45 b(The)30 b(\014tsio.h)h(\014le)h(con)m(tains)g(the)f(follo)m(wing)i (de\014ned)d(constan)m(ts)i(whic)m(h)f(programmers)0 4187 y(are)g(strongly)g(encouraged)g(to)g(use)f(whenev)m(er)g(they)h (are)f(allo)s(cating)j(space)e(for)f(c)m(har)h(arra)m(ys:)0 4432 y Fe(#define)46 b(FLEN_FILENAME)e(1025)j(/*)g(max)g(length)f(of)h (a)g(filename)f(*/)0 4545 y(#define)g(FLEN_KEYWORD)140 b(72)95 b(/*)47 b(max)g(length)f(of)h(a)g(keyword)94 b(*/)0 4658 y(#define)46 b(FLEN_CARD)284 b(81)95 b(/*)47 b(length)f(of)h(a)h(FITS)e(header)g(card)h(*/)0 4771 y(#define)f(FLEN_VALUE)236 b(71)95 b(/*)47 b(max)g(length)f(of)h(a)g (keyword)f(value)h(string)f(*/)0 4884 y(#define)g(FLEN_COMMENT)140 b(73)95 b(/*)47 b(max)g(length)f(of)h(a)g(keyword)f(comment)g(string)g (*/)0 4997 y(#define)g(FLEN_ERRMSG)188 b(81)95 b(/*)47 b(max)g(length)f(of)h(a)g(CFITSIO)f(error)h(message)e(*/)0 5110 y(#define)h(FLEN_STATUS)188 b(31)95 b(/*)47 b(max)g(length)f(of)h (a)g(CFITSIO)f(status)g(text)h(string)f(*/)0 5355 y Fj(F)-8 b(or)23 b(example,)h(when)d(declaring)i(a)f(c)m(har)g(arra)m(y)h(to)f (hold)g(the)g(v)-5 b(alue)22 b(string)g(of)g(FITS)f(k)m(eyw)m(ord,)k (use)c(the)h(follo)m(wing)0 5468 y(statemen)m(t:)191 5714 y Fe(char)47 b(value[FLEN_VALUE];)p eop end %%Page: 23 31 TeXDict begin 23 30 bop 0 299 a Fh(4.6.)72 b(IMPLICIT)29 b(D)m(A)-8 b(T)g(A)32 b(TYPE)e(CONVERSION)1938 b Fj(23)0 555 y(Note)41 b(that)f(FLEN)p 686 555 28 4 v 33 w(KEYW)m(ORD)g(is)f (longer)h(than)f(needed)g(for)g(the)h(nominal)f(8-c)m(haracter)j(k)m (eyw)m(ord)e(name)0 668 y(b)s(ecause)30 b(the)h(HIERAR)m(CH)f(con)m(v)m (en)m(tion)j(supp)s(orts)28 b(longer)j(k)m(eyw)m(ord)g(names.)0 999 y Ff(4.6)135 b(Implicit)46 b(Data)g(T)l(yp)t(e)f(Con)l(v)l(ersion)0 1249 y Fj(The)29 b(CFITSIO)e(routines)i(that)h(read)f(and)f(write)i(n)m (umerical)f(data)h(can)g(p)s(erform)d(implicit)j(data)g(t)m(yp)s(e)f (con)m(v)m(er-)0 1362 y(sion.)39 b(This)25 b(means)h(that)g(the)g(data) g(t)m(yp)s(e)g(of)g(the)g(v)-5 b(ariable)26 b(or)g(arra)m(y)g(in)f(the) h(program)g(do)s(es)f(not)h(need)f(to)i(b)s(e)e(the)0 1475 y(same)g(as)f(the)h(data)g(t)m(yp)s(e)g(of)f(the)h(v)-5 b(alue)25 b(in)f(the)g(FITS)g(\014le.)39 b(Data)26 b(t)m(yp)s(e)f(con)m (v)m(ersion)g(is)g(supp)s(orted)d(for)i(n)m(umerical)0 1588 y(and)37 b(string)g(data)g(t)m(yp)s(es)h(\(if)f(the)g(string)g (con)m(tains)i(a)e(v)-5 b(alid)38 b(n)m(um)m(b)s(er)e(enclosed)h(in)g (quotes\))h(when)e(reading)i(a)0 1701 y(FITS)30 b(header)h(k)m(eyw)m (ord)g(v)-5 b(alue)31 b(and)f(for)h(n)m(umeric)g(v)-5 b(alues)31 b(when)f(reading)h(or)f(writing)h(v)-5 b(alues)31 b(in)g(the)g(primary)0 1814 y(arra)m(y)24 b(or)g(a)h(table)f(column.)39 b(CFITSIO)22 b(returns)h(status)h(=)f(NUM)p 2267 1814 V 34 w(O)m(VERFLO)m(W)i(if)e(the)h(con)m(v)m(erted)i(data)e(v)-5 b(alue)0 1927 y(exceeds)33 b(the)g(range)g(of)g(the)f(output)g(data)i (t)m(yp)s(e.)47 b(Implicit)33 b(data)g(t)m(yp)s(e)g(con)m(v)m(ersion)h (is)e(not)h(supp)s(orted)d(within)0 2039 y(binary)g(tables)h(for)f (string,)g(logical,)k(complex,)d(or)f(double)g(complex)h(data)g(t)m(yp) s(es.)0 2200 y(In)g(addition,)h(an)m(y)f(table)h(column)f(ma)m(y)h(b)s (e)f(read)g(as)h(if)f(it)h(con)m(tained)g(string)f(v)-5 b(alues.)44 b(In)31 b(the)g(case)i(of)e(n)m(umeric)0 2313 y(columns)f(the)h(returned)e(string)h(will)h(b)s(e)f(formatted)h (using)e(the)i(TDISPn)e(displa)m(y)i(format)f(if)h(it)g(exists.)0 2643 y Ff(4.7)135 b(Data)46 b(Scaling)0 2894 y Fj(When)38 b(reading)f(n)m(umerical)i(data)f(v)-5 b(alues)38 b(in)f(the)h(primary) f(arra)m(y)h(or)g(a)g(table)h(column,)h(the)d(v)-5 b(alues)38 b(will)h(b)s(e)0 3006 y(scaled)f(automatically)j(b)m(y)c(the)g(BSCALE)g (and)g(BZER)m(O)g(\(or)h(TSCALn)e(and)h(TZER)m(On\))f(header)h(v)-5 b(alues)38 b(if)0 3119 y(they)31 b(are)f(presen)m(t)h(in)f(the)g (header.)41 b(The)30 b(scaled)h(data)g(that)g(is)f(returned)g(to)h(the) f(reading)h(program)f(will)h(ha)m(v)m(e)382 3361 y Fe(output)46 b(value)g(=)i(\(FITS)e(value\))g(*)i(BSCALE)e(+)h(BZERO)0 3603 y Fj(\(a)30 b(corresp)s(onding)e(form)m(ula)h(using)g(TSCALn)e (and)i(TZER)m(On)e(is)i(used)g(when)f(reading)h(from)g(table)h (columns\).)0 3716 y(In)h(the)i(case)g(of)f(in)m(teger)h(output)f(v)-5 b(alues)32 b(the)h(\015oating)g(p)s(oin)m(t)f(scaled)g(v)-5 b(alue)33 b(is)f(truncated)g(to)h(an)f(in)m(teger)h(\(not)0 3828 y(rounded)i(to)j(the)f(nearest)h(in)m(teger\).)62 b(The)36 b(\014ts)p 1673 3828 V 32 w(set)p 1816 3828 V 34 w(bscale)i(and)e(\014ts)p 2430 3828 V 32 w(set)p 2573 3828 V 34 w(tscale)i(routines)f(\(describ)s(ed)f(in)h(the)0 3941 y(`Adv)-5 b(anced')29 b(c)m(hapter\))h(ma)m(y)g(b)s(e)e(used)h(to) g(o)m(v)m(erride)i(the)e(scaling)h(parameters)f(de\014ned)f(in)h(the)g (header)g(\(e.g.,)i(to)0 4054 y(turn)e(o\013)i(the)g(scaling)g(so)g (that)g(the)f(program)g(can)h(read)f(the)h(ra)m(w)f(unscaled)h(v)-5 b(alues)30 b(from)g(the)h(FITS)e(\014le\).)0 4214 y(When)44 b(writing)h(n)m(umerical)g(data)g(to)g(the)g(primary)f(arra)m(y)h(or)f (to)h(a)g(table)h(column)e(the)h(data)g(v)-5 b(alues)45 b(will)0 4327 y(generally)29 b(b)s(e)f(automatically)j(in)m(v)m(ersely) f(scaled)f(b)m(y)f(the)g(v)-5 b(alue)29 b(of)f(the)h(BSCALE)e(and)h (BZER)m(O)g(\(or)h(TSCALn)0 4440 y(and)35 b(TZER)m(On\))f(k)m(eyw)m (ord)i(v)-5 b(alues)35 b(if)h(they)f(they)g(exist)i(in)e(the)g(header.) 55 b(These)35 b(k)m(eyw)m(ords)h(m)m(ust)f(ha)m(v)m(e)i(b)s(een)0 4553 y(written)31 b(to)h(the)g(header)f(b)s(efore)g(an)m(y)g(data)h(is) g(written)f(for)g(them)g(to)h(ha)m(v)m(e)h(an)m(y)e(immediate)i (e\013ect.)45 b(One)30 b(ma)m(y)0 4666 y(also)h(use)g(the)f(\014ts)p 623 4666 V 33 w(set)p 767 4666 V 33 w(bscale)i(and)d(\014ts)p 1367 4666 V 33 w(set)p 1511 4666 V 33 w(tscale)j(routines)f(to)g (de\014ne)f(or)g(o)m(v)m(erride)i(the)f(scaling)g(k)m(eyw)m(ords)g(in)0 4779 y(the)e(header)g(\(e.g.,)i(to)e(turn)f(o\013)h(the)g(scaling)h(so) f(that)h(the)f(program)f(can)h(write)g(the)g(ra)m(w)g(unscaled)g(v)-5 b(alues)29 b(in)m(to)0 4892 y(the)d(FITS)g(\014le\).)40 b(If)25 b(scaling)i(is)g(p)s(erformed,)e(the)i(in)m(v)m(erse)g(scaled)g (output)e(v)-5 b(alue)27 b(that)g(is)f(written)g(in)m(to)h(the)g(FITS)0 5005 y(\014le)j(will)h(ha)m(v)m(e)430 5246 y Fe(FITS)46 b(value)h(=)g(\(\(input)f(value\))g(-)h(BZERO\))f(/)i(BSCALE)0 5488 y Fj(\(a)39 b(corresp)s(onding)d(form)m(ula)i(using)g(TSCALn)e (and)h(TZER)m(On)g(is)h(used)f(when)f(writing)i(to)h(table)g (columns\).)0 5601 y(Rounding)34 b(to)i(the)g(nearest)g(in)m(teger,)i (rather)d(than)g(truncation,)j(is)d(p)s(erformed)f(when)g(writing)h(in) m(teger)i(data)0 5714 y(t)m(yp)s(es)30 b(to)i(the)e(FITS)g(\014le.)p eop end %%Page: 24 32 TeXDict begin 24 31 bop 0 299 a Fj(24)1763 b Fh(CHAPTER)29 b(4.)112 b(PR)m(OGRAMMING)32 b(GUIDELINES)0 555 y Ff(4.8)135 b(Supp)t(ort)44 b(for)h(IEEE)h(Sp)t(ecial)f(V)-11 b(alues)0 807 y Fj(The)26 b(ANSI/IEEE-754)h(\015oating-p)s(oin)m(t)h(n)m(um)m(b)s (er)d(standard)g(de\014nes)h(certain)h(sp)s(ecial)g(v)-5 b(alues)26 b(that)h(are)g(used)e(to)0 920 y(represen)m(t)j(suc)m(h)g (quan)m(tities)h(as)f(Not-a-Num)m(b)s(er)h(\(NaN\),)h(denormalized,)f (under\015o)m(w,)e(o)m(v)m(er\015o)m(w,)j(and)d(in\014nit)m(y)-8 b(.)0 1033 y(\(See)29 b(the)f(App)s(endix)e(in)i(the)g(NOST)g(FITS)f (standard)g(or)h(the)g(NOST)g(FITS)f(User's)h(Guide)g(for)g(a)g(list)h (of)f(these)0 1146 y(v)-5 b(alues\).)55 b(The)34 b(CFITSIO)f(routines)i (that)g(read)g(\015oating)g(p)s(oin)m(t)g(data)h(in)e(FITS)g(\014les)h (recognize)h(these)g(IEEE)0 1259 y(sp)s(ecial)k(v)-5 b(alues)39 b(and)g(b)m(y)g(default)g(in)m(terpret)h(the)f(o)m(v)m (er\015o)m(w)i(and)d(in\014nit)m(y)h(v)-5 b(alues)40 b(as)f(b)s(eing)g(equiv)-5 b(alen)m(t)41 b(to)f(a)0 1372 y(NaN,)35 b(and)e(con)m(v)m(ert)i(the)f(under\015o)m(w)e(and)h (denormalized)h(v)-5 b(alues)34 b(in)m(to)h(zeros.)51 b(In)33 b(some)h(cases)h(programmers)0 1485 y(ma)m(y)42 b(w)m(an)m(t)g(access)g(to)g(the)g(ra)m(w)f(IEEE)g(v)-5 b(alues,)44 b(without)d(an)m(y)h(mo)s(di\014cation)g(b)m(y)f(CFITSIO.)f (This)g(can)i(b)s(e)0 1598 y(done)35 b(b)m(y)h(calling)h(the)e(\014ts)p 935 1598 28 4 v 33 w(read)p 1140 1598 V 32 w(img)h(or)g(\014ts)p 1593 1598 V 32 w(read)p 1797 1598 V 33 w(col)g(routines)g(while)f(sp)s (ecifying)g(0.0)i(as)f(the)f(v)-5 b(alue)36 b(of)g(the)0 1711 y(NULL)-10 b(V)g(AL)37 b(parameter.)63 b(This)36 b(will)i(force)g(CFITSIO)e(to)i(simply)f(pass)g(the)g(IEEE)g(v)-5 b(alues)38 b(through)f(to)h(the)0 1824 y(application)24 b(program)f(without)g(an)m(y)h(mo)s(di\014cation.)38 b(This)23 b(is)g(not)g(fully)g(supp)s(orted)e(on)i(V)-10 b(AX/VMS)24 b(mac)m(hines,)0 1937 y(ho)m(w)m(ev)m(er,)k(where)c(there)h (is)g(no)f(easy)i(w)m(a)m(y)g(to)f(b)m(ypass)g(the)g(default)g(in)m (terpretation)h(of)f(the)g(IEEE)f(sp)s(ecial)h(v)-5 b(alues.)0 2049 y(This)27 b(is)i(also)g(not)f(supp)s(orted)e(when)i(reading)g (\015oating-p)s(oin)m(t)h(images)g(that)g(ha)m(v)m(e)h(b)s(een)d (compressed)h(with)g(the)0 2162 y(FITS)33 b(tiled)h(image)g (compression)f(con)m(v)m(en)m(tion)j(that)e(is)f(discussed)g(in)g (section)h(5.6;)i(the)e(pixels)f(v)-5 b(alues)34 b(in)f(tile)0 2275 y(compressed)d(images)i(are)f(represen)m(ted)g(b)m(y)g(scaled)g (in)m(tegers,)h(and)e(a)i(reserv)m(ed)e(in)m(teger)j(v)-5 b(alue)31 b(\(not)g(a)g(NaN\))h(is)0 2388 y(used)e(to)h(represen)m(t)f (unde\014ned)e(pixels.)0 2732 y Ff(4.9)135 b(Error)46 b(Status)f(V)-11 b(alues)45 b(and)g(the)g(Error)g(Message)h(Stac)l(k)0 2984 y Fj(Nearly)36 b(all)g(the)g(CFITSIO)e(routines)h(return)f(an)h (error)g(status)h(v)-5 b(alue)35 b(in)g(2)h(w)m(a)m(ys:)51 b(as)36 b(the)f(v)-5 b(alue)36 b(of)g(the)f(last)0 3097 y(parameter)29 b(in)f(the)g(function)g(call,)j(and)d(as)g(the)h (returned)e(v)-5 b(alue)29 b(of)f(the)h(function)f(itself.)41 b(This)27 b(pro)m(vides)i(some)0 3210 y(\015exibilit)m(y)37 b(in)e(the)h(w)m(a)m(y)h(programmers)e(can)h(test)h(if)f(an)f(error)h (o)s(ccurred,)g(as)g(illustrated)h(in)e(the)h(follo)m(wing)i(2)0 3323 y(co)s(de)31 b(fragmen)m(ts:)191 3592 y Fe(if)47 b(\()h(fits_write_record\(fptr,)41 b(card,)46 b(&status\))g(\))430 3704 y(printf\(")f(Error)h(occurred)g(while)g(writing)g(keyword."\);)0 3930 y(or,)191 4156 y(fits_write_record\(fptr,)41 b(card,)47 b(&status\);)191 4269 y(if)g(\()h(status)e(\))430 4382 y(printf\(")f(Error)h(occurred)g(while)g(writing)g(keyword."\);)0 4650 y Fj(A)27 b(listing)h(of)g(all)g(the)f(CFITSIO)f(status)i(co)s(de) f(v)-5 b(alues)28 b(is)f(giv)m(en)h(at)g(the)g(end)e(of)i(this)f(do)s (cumen)m(t.)39 b(Programmers)0 4763 y(are)33 b(encouraged)g(to)g(use)f (the)h(sym)m(b)s(olic)f(mnemonics)g(\(de\014ned)g(in)g(\014tsio.h\))h (rather)f(than)g(the)h(actual)h(in)m(teger)0 4876 y(status)d(v)-5 b(alues)30 b(to)i(impro)m(v)m(e)f(the)f(readabilit)m(y)i(of)f(their)f (co)s(de.)0 5036 y(The)i(CFITSIO)f(library)g(uses)h(an)g(`inherited)h (status')g(con)m(v)m(en)m(tion)h(for)e(the)h(status)f(parameter)h(whic) m(h)f(means)0 5149 y(that)37 b(if)f(a)h(routine)f(is)h(called)g(with)f (a)h(p)s(ositiv)m(e)g(input)f(v)-5 b(alue)36 b(of)h(the)g(status)f (parameter)h(as)g(input,)g(then)f(the)0 5262 y(routine)j(will)f(exit)i (immediately)g(without)e(c)m(hanging)i(the)e(v)-5 b(alue)39 b(of)g(the)g(status)g(parameter.)65 b(Th)m(us,)40 b(if)f(one)0 5375 y(passes)24 b(the)h(status)g(v)-5 b(alue)25 b(returned)f(from)g (eac)m(h)i(CFITSIO)d(routine)h(as)h(input)f(to)h(the)g(next)g(CFITSIO)e (routine,)0 5488 y(then)28 b(whenev)m(er)g(an)g(error)g(is)h(detected)g (all)h(further)d(CFITSIO)f(pro)s(cessing)i(will)h(cease.)42 b(This)27 b(con)m(v)m(en)m(tion)k(can)0 5601 y(simplify)h(the)h(error)f (c)m(hec)m(king)j(in)d(application)i(programs)e(b)s(ecause)h(it)g(is)g (not)g(necessary)g(to)g(c)m(hec)m(k)i(the)d(v)-5 b(alue)0 5714 y(of)30 b(the)g(status)h(parameter)f(after)h(ev)m(ery)g(single)f (CFITSIO)f(routine)h(call.)42 b(If)30 b(a)g(program)g(con)m(tains)h(a)g (sequence)p eop end %%Page: 25 33 TeXDict begin 25 32 bop 0 299 a Fh(4.10.)73 b(V)-10 b(ARIABLE-LENGTH)31 b(ARRA)-8 b(YS)30 b(IN)g(BINAR)-8 b(Y)32 b(T)-8 b(ABLES)1327 b Fj(25)0 555 y(of)28 b(sev)m(eral)i(CFITSIO)d(calls,)j(one)e(can)h (just)e(c)m(hec)m(k)j(the)f(status)f(v)-5 b(alue)29 b(after)g(the)f (last)h(call.)41 b(Since)29 b(the)f(returned)0 668 y(status)33 b(v)-5 b(alues)33 b(are)g(generally)h(distinctiv)m(e,)h(it)f(should)d (b)s(e)i(p)s(ossible)f(to)h(determine)g(whic)m(h)g(routine)g (originally)0 781 y(returned)c(the)i(error)f(status.)0 941 y(CFITSIO)c(also)i(main)m(tains)h(an)e(in)m(ternal)h(stac)m(k)h(of) f(error)f(messages)h(\(80-c)m(haracter)j(maxim)m(um)c(length\))h(whic)m (h)0 1054 y(in)36 b(man)m(y)g(cases)h(pro)m(vide)f(a)g(more)g(detailed) i(explanation)f(of)f(the)g(cause)h(of)f(the)g(error)g(than)f(is)h(pro)m (vided)g(b)m(y)0 1167 y(the)k(error)e(status)i(n)m(um)m(b)s(er)e (alone.)69 b(It)39 b(is)h(recommended)f(that)g(the)h(error)f(message)h (stac)m(k)h(b)s(e)e(prin)m(ted)g(out)0 1280 y(whenev)m(er)g(a)g (program)g(detects)h(a)f(CFITSIO)e(error.)66 b(The)38 b(function)h(\014ts)p 2653 1280 28 4 v 32 w(rep)s(ort)p 2931 1280 V 32 w(error)g(will)g(prin)m(t)g(out)g(the)0 1393 y(en)m(tire)31 b(error)e(message)h(stac)m(k,)i(or)d(alternativ)m (ely)k(one)d(ma)m(y)g(call)h(\014ts)p 2376 1393 V 32 w(read)p 2580 1393 V 33 w(errmsg)e(to)h(get)h(the)f(error)f(messages)0 1506 y(one)i(at)g(a)g(time.)0 1879 y Ff(4.10)136 b(V)-11 b(ariable-Length)45 b(Arra)l(ys)g(in)g(Binary)g(T)-11 b(ables)0 2138 y Fj(CFITSIO)33 b(pro)m(vides)i(easy-to-use)h(supp)s (ort)d(for)i(reading)g(and)f(writing)h(data)g(in)g(v)-5 b(ariable)35 b(length)g(\014elds)g(of)g(a)0 2251 y(binary)g(table.)56 b(The)35 b(v)-5 b(ariable)36 b(length)f(columns)g(ha)m(v)m(e)i(TF)m (ORMn)e(k)m(eyw)m(ord)h(v)-5 b(alues)35 b(of)h(the)f(form)g (`1Pt\(len\)')0 2363 y(where)25 b(`t')i(is)e(the)h(data)g(t)m(yp)s(e)g (co)s(de)g(\(e.g.,)j(I,)c(J,)h(E,)f(D,)i(etc.\))40 b(and)25 b(`len')i(is)e(an)h(in)m(teger)h(sp)s(ecifying)e(the)h(maxim)m(um)0 2476 y(length)k(of)f(the)h(v)m(ector)h(in)e(the)h(table.)41 b(\(CFITSIO)28 b(also)j(supp)s(orts)c(the)j(exp)s(erimen)m(tal)g('Q')g (datat)m(yp)s(e,)h(whic)m(h)e(is)0 2589 y(iden)m(tical)37 b(to)e(the)g('P')g(t)m(yp)s(e)g(except)h(that)g(is)f(supp)s(orts)e(is)h (a)i(64-bit)g(address)e(space)h(and)f(hence)h(m)m(uc)m(h)g(larger)0 2702 y(data)28 b(structures\).)40 b(If)27 b(the)h(v)-5 b(alue)28 b(of)g(`len')g(is)f(not)h(sp)s(eci\014ed)f(when)g(the)g (table)i(is)f(created)g(\(e.g.,)i(if)e(the)g(TF)m(ORM)0 2815 y(k)m(eyw)m(ord)d(v)-5 b(alue)26 b(is)f(simply)g(sp)s(eci\014ed)f (as)h('1PE')h(instead)f(of)g('1PE\(400\))j(\),)e(then)f(CFITSIO)f(will) h(automatically)0 2928 y(scan)34 b(the)g(table)h(when)e(it)h(is)g (closed)h(to)f(determine)g(the)g(maxim)m(um)g(length)h(of)f(the)g(v)m (ector)h(and)e(will)i(app)s(end)0 3041 y(this)30 b(v)-5 b(alue)31 b(to)g(the)g(TF)m(ORMn)f(v)-5 b(alue.)0 3201 y(The)29 b(same)h(routines)g(that)g(read)f(and)g(write)h(data)g(in)g (an)f(ordinary)g(\014xed)g(length)h(binary)f(table)h(extension)h(are)0 3314 y(also)41 b(used)d(for)i(v)-5 b(ariable)40 b(length)g(\014elds,)h (ho)m(w)m(ev)m(er,)j(the)c(routine)f(parameters)h(tak)m(e)h(on)f(a)g (sligh)m(tly)g(di\013eren)m(t)0 3427 y(in)m(terpretation)32 b(as)e(describ)s(ed)g(b)s(elo)m(w.)0 3587 y(All)37 b(the)f(data)h(in)f (a)h(v)-5 b(ariable)37 b(length)f(\014eld)g(is)g(written)h(in)m(to)g (an)f(area)h(called)h(the)e(`heap')g(whic)m(h)g(follo)m(ws)i(the)0 3700 y(main)31 b(\014xed-length)h(FITS)e(binary)h(table.)44 b(The)31 b(size)h(of)f(the)h(heap,)f(in)g(b)m(ytes,)h(is)g(sp)s (eci\014ed)e(b)m(y)h(the)h(PCOUNT)0 3813 y(k)m(eyw)m(ord)21 b(in)f(the)h(FITS)f(header.)37 b(When)20 b(creating)i(a)f(new)f(binary) g(table,)j(the)e(initial)h(v)-5 b(alue)21 b(of)f(PCOUNT)g(should)0 3926 y(usually)27 b(b)s(e)h(set)g(to)g(zero.)41 b(CFITSIO)26 b(will)i(recompute)g(the)g(size)g(of)g(the)g(heap)g(as)g(the)g(data)g (is)g(written)f(and)h(will)0 4039 y(automatically)g(up)s(date)c(the)i (PCOUNT)e(k)m(eyw)m(ord)h(v)-5 b(alue)26 b(when)e(the)h(table)h(is)f (closed.)40 b(When)25 b(writing)g(v)-5 b(ariable)0 4152 y(length)34 b(data)g(to)g(a)g(table,)i(CFITSIO)c(will)h(automatically)k (extend)c(the)h(size)g(of)g(the)g(heap)f(area)h(if)g(necessary)-8 b(,)0 4264 y(so)31 b(that)g(an)m(y)f(follo)m(wing)i(HDUs)f(do)f(not)h (get)h(o)m(v)m(erwritten.)0 4425 y(By)e(default)f(the)h(heap)f(data)i (area)f(starts)g(immediately)h(after)f(the)f(last)i(ro)m(w)e(of)h(the)g (\014xed-length)f(table.)42 b(This)0 4538 y(default)27 b(starting)g(lo)s(cation)i(ma)m(y)e(b)s(e)f(o)m(v)m(erridden)h(b)m(y)g (the)g(THEAP)f(k)m(eyw)m(ord,)i(but)f(this)f(is)h(not)g(recommended.)0 4650 y(If)34 b(additional)h(ro)m(ws)f(of)g(data)h(are)g(added)e(to)i (the)f(table,)j(CFITSIO)32 b(will)j(automatically)i(shift)c(the)i(the)f (heap)0 4763 y(do)m(wn)g(to)i(mak)m(e)f(ro)s(om)g(for)f(the)h(new)f(ro) m(ws,)i(but)e(it)i(is)e(ob)m(viously)i(b)s(e)e(more)h(e\016cien)m(t)h (to)f(initially)h(create)h(the)0 4876 y(table)31 b(with)e(the)h (necessary)g(n)m(um)m(b)s(er)f(of)h(blank)f(ro)m(ws,)h(so)g(that)g(the) g(heap)g(do)s(es)f(not)h(needed)g(to)g(b)s(e)f(constan)m(tly)0 4989 y(mo)m(v)m(ed.)0 5149 y(When)36 b(writing)g(ro)m(w)g(of)h(data)f (to)h(a)g(v)-5 b(ariable)37 b(length)f(\014eld)g(the)g(en)m(tire)i (arra)m(y)e(of)g(v)-5 b(alues)37 b(for)f(a)g(giv)m(en)i(ro)m(w)e(of)0 5262 y(the)30 b(table)h(m)m(ust)e(b)s(e)h(written)g(with)f(a)h(single)h (call)g(to)f(\014ts)p 1986 5262 V 33 w(write)p 2221 5262 V 33 w(col.)42 b(The)29 b(total)i(length)g(of)f(the)g(arra)m(y)g(is)g (giv)m(en)0 5375 y(b)m(y)j(nelemen)m(ts)h(+)f(\014rstelem)g(-)g(1.)49 b(Additional)34 b(elemen)m(ts)h(cannot)e(b)s(e)g(app)s(ended)e(to)j(an) f(existing)h(v)m(ector)h(at)f(a)0 5488 y(later)c(time)g(since)g(an)m(y) g(attempt)g(to)g(do)g(so)f(will)h(simply)f(o)m(v)m(erwrite)i(all)f(the) f(previously)h(written)f(data)h(and)f(the)0 5601 y(new)36 b(data)h(will)g(b)s(e)f(written)g(to)h(a)g(new)f(area)h(of)g(the)g (heap.)58 b(The)36 b(\014ts)p 2496 5601 V 33 w(compress)p 2889 5601 V 32 w(heap)g(routine)h(is)f(pro)m(vided)0 5714 y(to)h(compress)g(the)g(heap)g(and)f(reco)m(v)m(er)i(an)m(y)f(un)m (used)f(space.)60 b(T)-8 b(o)37 b(a)m(v)m(oid)i(ha)m(ving)e(to)h(deal)f (with)f(this)h(issue,)h(it)p eop end %%Page: 26 34 TeXDict begin 26 33 bop 0 299 a Fj(26)1763 b Fh(CHAPTER)29 b(4.)112 b(PR)m(OGRAMMING)32 b(GUIDELINES)0 555 y Fj(is)f(recommended)h (that)g(ro)m(ws)f(in)g(a)h(v)-5 b(ariable)32 b(length)g(\014eld)f (should)f(only)i(b)s(e)f(written)g(once.)45 b(An)31 b(exception)h(to)0 668 y(this)e(general)h(rule)f(o)s(ccurs)g(when)f(setting)i(elemen)m(ts) h(of)e(an)g(arra)m(y)g(as)h(unde\014ned.)38 b(It)30 b(is)h(allo)m(w)m (ed)h(to)e(\014rst)g(write)0 781 y(a)e(dumm)m(y)f(v)-5 b(alue)28 b(in)m(to)h(the)f(arra)m(y)h(with)e(\014ts)p 1534 781 28 4 v 33 w(write)p 1769 781 V 33 w(col,)j(and)d(then)g(call)j (\014ts)p 2632 781 V 32 w(write)p 2866 781 V 33 w(col)p 3009 781 V 34 w(n)m(ul)d(to)i(\015ag)f(the)g(desired)0 894 y(elemen)m(ts)h(as)f(unde\014ned.)38 b(Note)29 b(that)g(the)f(ro)m (ws)g(of)g(a)g(table,)i(whether)d(\014xed)g(or)h(v)-5 b(ariable)29 b(length,)g(do)f(not)g(ha)m(v)m(e)0 1007 y(to)j(b)s(e)f(written)g(consecutiv)m(ely)j(and)d(ma)m(y)h(b)s(e)e (written)i(in)f(an)m(y)h(order.)0 1167 y(When)40 b(writing)h(to)g(a)g (v)-5 b(ariable)41 b(length)g(ASCI)s(I)e(c)m(haracter)j(\014eld)e (\(e.g.,)45 b(TF)m(ORM)c(=)f('1P)-8 b(A'\))43 b(only)d(a)h(single)0 1280 y(c)m(haracter)22 b(string)e(can)h(b)s(e)e(written.)38 b(The)20 b(`\014rstelem')g(and)g(`nelemen)m(ts')i(parameter)e(v)-5 b(alues)21 b(in)f(the)g(\014ts)p 3526 1280 V 33 w(write)p 3761 1280 V 33 w(col)0 1393 y(routine)35 b(are)h(ignored)f(and)f(the)i (n)m(um)m(b)s(er)d(of)j(c)m(haracters)g(to)g(write)f(is)h(simply)e (determined)h(b)m(y)g(the)g(length)h(of)0 1506 y(the)31 b(input)e(n)m(ull-terminated)i(c)m(haracter)h(string.)0 1666 y(The)21 b(\014ts)p 305 1666 V 33 w(write)p 540 1666 V 33 w(descript)g(routine)h(is)f(useful)g(in)g(situations)i(where) e(m)m(ultiple)h(ro)m(ws)g(of)g(a)g(v)-5 b(ariable)22 b(length)g(column)0 1779 y(ha)m(v)m(e)32 b(the)e(iden)m(tical)i(arra)m (y)f(of)g(v)-5 b(alues.)41 b(One)30 b(can)g(simply)g(write)h(the)f (arra)m(y)h(once)g(for)g(the)f(\014rst)g(ro)m(w,)g(and)g(then)0 1892 y(use)c(\014ts)p 280 1892 V 32 w(write)p 514 1892 V 33 w(descript)g(to)g(write)g(the)g(same)h(descriptor)e(v)-5 b(alues)27 b(in)m(to)g(the)f(other)g(ro)m(ws;)h(all)g(the)f(ro)m(ws)g (will)g(then)0 2005 y(p)s(oin)m(t)k(to)h(the)g(same)g(storage)h(lo)s (cation)g(th)m(us)e(sa)m(ving)h(disk)f(space.)0 2165 y(When)35 b(reading)g(from)f(a)i(v)-5 b(ariable)35 b(length)h(arra)m(y) f(\014eld)g(one)g(can)g(only)h(read)e(as)i(man)m(y)f(elemen)m(ts)h(as)f (actually)0 2278 y(exist)i(in)e(that)i(ro)m(w)e(of)h(the)g(table;)k (reading)c(do)s(es)g(not)g(automatically)i(con)m(tin)m(ue)f(with)f(the) g(next)g(ro)m(w)g(of)g(the)0 2391 y(table)29 b(as)f(o)s(ccurs)g(when)f (reading)h(an)g(ordinary)g(\014xed)f(length)h(table)h(\014eld.)40 b(A)m(ttempts)29 b(to)g(read)f(more)g(than)g(this)0 2503 y(will)k(cause)h(an)e(error)h(status)g(to)g(b)s(e)f(returned.)44 b(One)32 b(can)g(determine)g(the)g(n)m(um)m(b)s(er)e(of)i(elemen)m(ts)h (in)f(eac)m(h)h(ro)m(w)0 2616 y(of)e(a)f(v)-5 b(ariable)31 b(column)g(with)f(the)g(\014ts)p 1329 2616 V 33 w(read)p 1534 2616 V 32 w(descript)h(routine.)0 3218 y Ff(4.11)136 b(Multiple)45 b(Access)g(to)g(the)g(Same)h(FITS)d(File)0 3521 y Fj(CFITSIO)35 b(supp)s(orts)g(sim)m(ultaneous)i(read)f(and)g (write)h(access)g(to)h(m)m(ultiple)f(HDUs)g(in)f(the)h(same)g(FITS)f (\014le.)0 3634 y(Th)m(us,)26 b(one)f(can)h(op)s(en)f(the)h(same)f (FITS)g(\014le)h(t)m(wice)h(within)d(a)i(single)g(program)g(and)e(mo)m (v)m(e)j(to)g(2)e(di\013eren)m(t)h(HDUs)0 3747 y(in)d(the)h(\014le,)h (and)e(then)g(read)h(and)f(write)h(data)g(or)f(k)m(eyw)m(ords)h(to)h (the)e(2)h(extensions)g(just)f(as)h(if)g(one)f(w)m(ere)h(accessing)0 3860 y(2)k(completely)h(separate)g(FITS)e(\014les.)40 b(Since)27 b(in)h(general)g(it)g(is)g(not)g(p)s(ossible)f(to)i(ph)m (ysically)f(op)s(en)f(the)h(same)g(\014le)0 3973 y(t)m(wice)e(and)e (then)g(exp)s(ect)h(to)g(b)s(e)f(able)h(to)h(sim)m(ultaneously)f(\(or)g (in)f(alternating)i(succession\))g(write)e(to)i(2)e(di\013eren)m(t)0 4086 y(lo)s(cations)35 b(in)f(the)g(\014le,)h(CFITSIO)d(recognizes)k (when)d(the)h(\014le)f(to)i(b)s(e)e(op)s(ened)g(\(in)h(the)g(call)h(to) g(\014ts)p 3499 4086 V 32 w(op)s(en)p 3721 4086 V 32 w(\014le\))0 4199 y(has)29 b(already)g(b)s(een)f(op)s(ened)g(and)h (instead)g(of)g(actually)h(op)s(ening)e(the)i(\014le)e(again,)j(just)d (logically)k(links)c(the)h(new)0 4312 y(\014le)e(to)h(the)f(old)h (\014le.)39 b(\(This)27 b(of)g(course)h(do)s(es)e(not)i(prev)m(en)m(t)f (the)h(same)f(\014le)g(from)g(b)s(eing)g(sim)m(ultaneously)h(op)s(ened) 0 4425 y(b)m(y)g(more)h(than)f(one)g(program\).)40 b(Then)28 b(b)s(efore)g(CFITSIO)e(reads)i(or)h(writes)f(to)h(either)g (\(logical\))i(\014le,)e(it)g(mak)m(es)0 4538 y(sure)i(that)h(an)m(y)g (mo)s(di\014cations)g(made)g(to)g(the)g(other)g(\014le)f(ha)m(v)m(e)i (b)s(een)e(completely)i(\015ushed)d(from)h(the)h(in)m(ternal)0 4650 y(bu\013ers)f(to)h(the)h(\014le.)45 b(Th)m(us,)31 b(in)h(principle,)g(one)g(could)g(op)s(en)g(a)g(\014le)g(t)m(wice,)i (in)e(one)g(case)h(p)s(oin)m(ting)f(to)h(the)f(\014rst)0 4763 y(extension)27 b(and)e(in)h(the)g(other)h(p)s(oin)m(ting)f(to)h (the)f(2nd)f(extension)i(and)f(then)f(write)i(data)f(to)h(b)s(oth)f (extensions,)h(in)0 4876 y(an)m(y)33 b(order,)f(without)h(danger)f(of)g (corrupting)g(the)h(\014le.)46 b(There)32 b(ma)m(y)h(b)s(e)f(some)h (e\016ciency)g(p)s(enalties)g(in)f(doing)0 4989 y(this)26 b(ho)m(w)m(ev)m(er,)j(since)e(CFITSIO)e(has)i(to)g(\015ush)e(all)i(the) g(in)m(ternal)g(bu\013ers)f(related)h(to)h(one)e(\014le)h(b)s(efore)f (switc)m(hing)0 5102 y(to)33 b(the)g(other,)h(so)f(it)h(w)m(ould)e (still)i(b)s(e)e(pruden)m(t)f(to)j(minimize)f(the)g(n)m(um)m(b)s(er)e (of)i(times)h(one)f(switc)m(hes)g(bac)m(k)h(and)0 5215 y(forth)c(b)s(et)m(w)m(een)h(doing)f(I/O)h(to)g(di\013eren)m(t)g(HDUs)g (in)f(the)g(same)h(\014le.)0 5375 y(Some)f(restriction)h(apply:)40 b(a)30 b(FITS)f(\014le)h(cannot)g(b)s(e)f(op)s(ened)h(the)g(\014rst)f (time)h(with)g(READONL)-8 b(Y)30 b(access,)i(and)0 5488 y(then)i(op)s(ened)g(a)h(second)g(time)g(with)g(READ)m(WRITE)g(access,) i(b)s(ecause)e(this)f(ma)m(y)i(b)s(e)e(ph)m(yically)h(imp)s(ossible)0 5601 y(\(e.g.,)g(if)e(the)g(\014le)f(resides)h(on)f(read-only)h(media)g (suc)m(h)g(as)g(a)g(CDR)m(OM\).)g(Also,)h(in)f(m)m(ulti-threaded)g(en)m (virono-)0 5714 y(men)m(ts,)e(one)g(should)e(nev)m(er)i(op)s(en)e(the)i (same)g(\014le)f(with)g(write)h(access)g(in)g(di\013eren)m(t)f (threads.)p eop end %%Page: 27 35 TeXDict begin 27 34 bop 0 299 a Fh(4.12.)73 b(WHEN)31 b(THE)f(FINAL)g(SIZE)f(OF)i(THE)f(FITS)f(HDU)i(IS)f(UNKNO)m(WN)978 b Fj(27)0 555 y Ff(4.12)136 b(When)44 b(the)h(Final)h(Size)f(of)g(the)g (FITS)f(HDU)h(is)g(Unkno)l(wn)0 816 y Fj(It)27 b(is)h(not)f(required)f (to)i(kno)m(w)f(the)h(total)h(size)f(of)f(a)h(FITS)e(data)i(arra)m(y)g (or)f(table)h(b)s(efore)f(b)s(eginning)f(to)i(write)g(the)0 928 y(data)k(to)f(the)g(FITS)f(\014le.)43 b(In)30 b(the)h(case)h(of)f (the)g(primary)f(arra)m(y)h(or)g(an)f(image)j(extension,)e(one)h (should)d(initially)0 1041 y(create)i(the)e(arra)m(y)h(with)e(the)i (size)g(of)f(the)g(highest)g(dimension)g(\(largest)i(NAXISn)d(k)m(eyw)m (ord\))i(set)g(to)g(a)f(dumm)m(y)0 1154 y(v)-5 b(alue,)26 b(suc)m(h)e(as)g(1.)39 b(Then)23 b(after)i(all)g(the)g(data)f(ha)m(v)m (e)i(b)s(een)d(written)h(and)g(the)g(true)g(dimensions)g(are)g(kno)m (wn,)h(then)0 1267 y(the)33 b(NAXISn)f(v)-5 b(alue)33 b(should)f(b)s(e)g(up)s(dated)g(using)g(the)h(\014ts)p 2069 1267 28 4 v 33 w(up)s(date)p 2378 1267 V 32 w(k)m(ey)g(routine)g (b)s(efore)g(mo)m(ving)g(to)h(another)0 1380 y(extension)d(or)f (closing)i(the)e(FITS)g(\014le.)0 1540 y(When)f(writing)g(to)g(FITS)g (tables,)h(CFITSIO)d(automatically)32 b(k)m(eeps)e(trac)m(k)g(of)f(the) g(highest)h(ro)m(w)f(n)m(um)m(b)s(er)e(that)0 1653 y(is)32 b(written)g(to,)h(and)e(will)h(increase)h(the)f(size)h(of)f(the)g (table)g(if)g(necessary)-8 b(.)46 b(CFITSIO)30 b(will)i(also)h (automatically)0 1766 y(insert)j(space)h(in)f(the)g(FITS)f(\014le)i(if) f(necessary)-8 b(,)39 b(to)e(ensure)e(that)i(the)f(data)h('heap',)h(if) e(it)h(exists,)h(and/or)f(an)m(y)0 1879 y(additional)29 b(HDUs)g(that)g(follo)m(w)g(the)g(table)g(do)f(not)h(get)g(o)m(v)m (erwritten)h(as)e(new)g(ro)m(ws)g(are)h(written)f(to)h(the)g(table.)0 2039 y(As)37 b(a)h(general)g(rule)f(it)h(is)f(b)s(est)g(to)h(sp)s (ecify)f(the)h(initial)g(n)m(um)m(b)s(er)e(of)i(ro)m(ws)f(=)g(0)g(when) g(the)g(table)h(is)g(created,)0 2152 y(then)g(let)h(CFITSIO)e(k)m(eep)i (trac)m(k)g(of)g(the)f(n)m(um)m(b)s(er)f(of)i(ro)m(ws)f(that)h(are)f (actually)i(written.)65 b(The)38 b(application)0 2265 y(program)e(should)f(not)i(man)m(ually)g(up)s(date)e(the)i(n)m(um)m(b)s (er)e(of)h(ro)m(ws)g(in)g(the)h(table)g(\(as)g(giv)m(en)g(b)m(y)f(the)h (NAXIS2)0 2378 y(k)m(eyw)m(ord\))j(since)f(CFITSIO)e(do)s(es)i(this)g (automatically)-8 b(.)69 b(If)38 b(a)i(table)f(is)g(initially)i (created)f(with)e(more)h(than)0 2491 y(zero)i(ro)m(ws,)j(then)c(this)h (will)f(usually)h(b)s(e)f(considered)g(as)h(the)g(minim)m(um)f(size)h (of)g(the)g(table,)j(ev)m(en)d(if)g(few)m(er)0 2604 y(ro)m(ws)30 b(are)g(actually)h(written)f(to)h(the)f(table.)41 b(Th)m(us,)30 b(if)f(a)i(table)f(is)g(initially)h(created)g(with)f(NAXIS2)g(=)g(20,)h (and)0 2717 y(CFITSIO)g(only)i(writes)f(10)i(ro)m(ws)e(of)h(data)g(b)s (efore)f(closing)i(the)f(table,)h(then)e(NAXIS2)h(will)g(remain)f (equal)h(to)0 2829 y(20.)50 b(If)33 b(ho)m(w)m(ev)m(er,)i(30)g(ro)m(ws) e(of)g(data)h(are)g(written)f(to)h(this)f(table,)i(then)e(NAXIS2)h (will)f(b)s(e)g(increased)g(from)g(20)0 2942 y(to)f(30.)44 b(The)31 b(one)g(exception)i(to)f(this)f(automatic)i(up)s(dating)d(of)h (the)h(NAXIS2)f(k)m(eyw)m(ord)h(is)f(if)g(the)h(application)0 3055 y(program)c(directly)g(mo)s(di\014es)f(the)i(v)-5 b(alue)28 b(of)g(NAXIS2)g(\(up)f(or)h(do)m(wn\))g(itself)h(just)e(b)s (efore)h(closing)h(the)f(table.)41 b(In)0 3168 y(this)28 b(case,)i(CFITSIO)d(do)s(es)h(not)h(up)s(date)e(NAXIS2)i(again,)h (since)f(it)g(assumes)f(that)h(the)f(application)i(program)0 3281 y(m)m(ust)i(ha)m(v)m(e)h(had)f(a)g(go)s(o)s(d)g(reason)h(for)f(c)m (hanging)h(the)f(v)-5 b(alue)33 b(directly)-8 b(.)47 b(This)31 b(is)h(not)h(recommended,)f(ho)m(w)m(ev)m(er,)0 3394 y(and)j(is)h(only)g(pro)m(vided)g(for)f(bac)m(kw)m(ard)h (compatibilit)m(y)i(with)e(soft)m(w)m(are)h(that)g(initially)g(creates) g(a)f(table)h(with)0 3507 y(a)d(large)h(n)m(um)m(b)s(er)e(of)h(ro)m (ws,)h(than)f(decreases)g(the)h(NAXIS2)f(v)-5 b(alue)34 b(to)h(the)f(actual)h(smaller)g(v)-5 b(alue)34 b(just)f(b)s(efore)0 3620 y(closing)e(the)g(table.)0 4004 y Ff(4.13)136 b(CFITSIO)44 b(Size)h(Limitations)0 4264 y Fj(CFITSIO)29 b(places)j(v)m(ery)f(few)g (restrictions)g(on)g(the)g(size)g(of)g(FITS)f(\014les)h(that)g(it)h (reads)e(or)h(writes.)42 b(There)30 b(are)i(a)0 4377 y(few)e(limits,)h(ho)m(w)m(ev)m(er,)h(that)f(ma)m(y)g(a\013ect)h(some)f (extreme)g(cases:)0 4538 y(1.)43 b(The)31 b(maxim)m(um)g(n)m(um)m(b)s (er)f(of)h(FITS)f(\014les)h(that)h(ma)m(y)g(b)s(e)e(sim)m(ultaneously)i (op)s(ened)f(b)m(y)g(CFITSIO)e(is)i(set)h(b)m(y)0 4650 y(NMAXFILES)i(as)g(de\014ned)f(in)h(\014tsio2.h.)52 b(It)34 b(is)g(curren)m(tly)g(set)h(=)f(300)h(b)m(y)f(default.)52 b(CFITSIO)32 b(will)i(allo)s(cate)0 4763 y(ab)s(out)f(80)g(*)h (NMAXFILES)f(b)m(ytes)g(of)g(memory)g(for)g(in)m(ternal)g(use.)48 b(Note)34 b(that)g(the)f(underlying)f(C)g(compiler)0 4876 y(or)39 b(op)s(erating)h(system,)j(ma)m(y)d(ha)m(v)m(e)g(a)g (smaller)g(limit)h(on)e(the)h(n)m(um)m(b)s(er)e(of)i(op)s(ened)e (\014les.)68 b(The)39 b(C)h(sym)m(b)s(olic)0 4989 y(constan)m(t)31 b(F)m(OPEN)p 690 4989 V 34 w(MAX)f(is)g(in)m(tended)g(to)h(de\014ne)e (the)i(maxim)m(um)f(n)m(um)m(b)s(er)e(of)j(\014les)f(that)g(ma)m(y)h (op)s(en)e(at)i(once)0 5102 y(\(including)g(an)m(y)g(other)g(text)h(or) f(binary)f(\014les)h(that)h(ma)m(y)f(b)s(e)g(op)s(en,)f(not)h(just)g (FITS)f(\014les\).)43 b(On)30 b(some)h(systems)0 5215 y(it)g(has)f(b)s(een)g(found)f(that)i(gcc)g(supp)s(orts)e(a)h(maxim)m (um)h(of)f(255)i(op)s(ened)e(\014les.)0 5375 y(2.)67 b(It)40 b(used)e(to)i(b)s(e)e(common)i(for)f(computer)g(systems)g(to)h (only)f(supp)s(ort)f(disk)g(\014les)h(up)f(to)i(2**31)i(b)m(ytes)d(=)0 5488 y(2.1)k(GB)g(in)f(size,)47 b(but)41 b(most)i(systems)f(no)m(w)g (supp)s(ort)f(larger)i(\014les.)76 b(CFITSIO)41 b(can)i(optionally)g (read)g(and)0 5601 y(write)37 b(these)h(so-called)h('large)f(\014les')g (that)f(are)h(greater)g(than)f(2.1)h(GB)g(on)f(platforms)g(where)g (they)g(are)h(sup-)0 5714 y(p)s(orted,)43 b(but)d(this)g(usually)h (requires)f(that)i(sp)s(ecial)f(compiler)g(option)g(\015ags)g(b)s(e)f (sp)s(eci\014ed)g(to)i(turn)d(on)i(this)p eop end %%Page: 28 36 TeXDict begin 28 35 bop 0 299 a Fj(28)1763 b Fh(CHAPTER)29 b(4.)112 b(PR)m(OGRAMMING)32 b(GUIDELINES)0 555 y Fj(option.)69 b(On)39 b(lin)m(ux)h(and)f(solaris)i(systems)f(the)g(compiler)g (\015ags)g(are)g('-D)p 2617 555 28 4 v 34 w(LAR)m(GEFILE)p 3184 555 V 33 w(SOUR)m(CE')f(and)g(`-)0 668 y(D)p 74 668 V 33 w(FILE)p 318 668 V 33 w(OFFSET)p 719 668 V 32 w(BITS=64'.)i(These)29 b(\015ags)h(ma)m(y)g(also)h(w)m(ork)f(on)g (other)g(platforms)f(but)g(this)h(has)g(not)g(b)s(een)0 781 y(tested.)43 b(Starting)31 b(with)f(v)m(ersion)h(3.0)h(of)f (CFITSIO,)f(the)h(default)f(Mak)m(e\014le)j(that)e(is)g(distributed)f (with)g(CFIT-)0 894 y(SIO)h(will)h(include)g(these)g(2)g(compiler)h (\015ags)f(when)e(building)h(on)h(Solaris)g(and)g(Lin)m(ux)f(PC)g (systems.)45 b(Users)32 b(on)0 1007 y(other)g(platforms)g(will)g(need)f (to)i(add)e(these)h(compiler)h(\015ags)f(man)m(ually)g(if)g(they)g(w)m (an)m(t)g(to)h(supp)s(ort)d(large)j(\014les.)0 1120 y(In)j(most)i (cases)g(it)g(app)s(ears)e(that)i(it)g(is)f(not)h(necessary)f(to)h (include)f(these)h(compiler)g(\015ags)f(when)f(compiling)0 1233 y(application)c(co)s(de)e(that)h(call)h(the)e(CFITSIO)f(library)h (routines.)0 1393 y(When)i(CFITSIO)e(is)i(built)g(with)g(large)h (\014le)f(supp)s(ort)e(\(e.g.,)35 b(on)d(Solaris)g(and)f(Lin)m(ux)h(PC) f(system)h(b)m(y)g(default\))0 1506 y(then)e(it)h(can)g(read)f(and)g (write)g(FITS)g(data)h(\014les)f(on)h(disk)e(that)i(ha)m(v)m(e)h(an)m (y)f(of)f(these)h(conditions:)136 1766 y Fc(\017)46 b Fj(FITS)30 b(\014les)g(larger)h(than)f(2.1)i(GB)f(in)f(size)136 1953 y Fc(\017)46 b Fj(FITS)30 b(images)h(con)m(taining)h(greater)g (than)e(2.1)h(G)g(pixels)136 2141 y Fc(\017)46 b Fj(FITS)34 b(images)i(that)g(ha)m(v)m(e)g(one)f(dimension)f(with)g(more)h(than)g (2.1)h(G)f(pixels)g(\(as)g(giv)m(en)h(b)m(y)f(one)g(of)g(the)227 2254 y(NAXISn)30 b(k)m(eyw)m(ord\))136 2441 y Fc(\017)46 b Fj(FITS)26 b(tables)h(con)m(taining)g(more)g(than)f(2.1E09)i(ro)m(ws) e(\(giv)m(en)i(b)m(y)e(the)g(NAXIS2)h(k)m(eyw)m(ord\),)h(or)e(with)g (ro)m(ws)227 2554 y(that)31 b(are)g(more)g(than)f(2.1)h(GB)g(wide)f (\(giv)m(en)i(b)m(y)e(the)h(NAXIS1)f(k)m(eyw)m(ord\))136 2742 y Fc(\017)46 b Fj(FITS)36 b(binary)f(tables)i(with)f(a)h(v)-5 b(ariable-length)38 b(arra)m(y)f(heap)f(that)h(is)f(larger)h(than)f (2.1)h(GB)g(\(giv)m(en)h(b)m(y)227 2855 y(the)31 b(PCOUNT)e(k)m(eyw)m (ord\))0 3115 y(The)c(curren)m(t)g(maxim)m(um)g(FITS)f(\014le)h(size)h (supp)s(orted)e(b)m(y)h(CFITSIO)e(is)j(ab)s(out)f(6)g(terab)m(ytes)i (\(con)m(taining)g(2**31)0 3227 y(FITS)d(blo)s(c)m(ks,)i(eac)m(h)g (2880)h(b)m(ytes)e(in)f(size\).)40 b(Curren)m(tly)-8 b(,)26 b(supp)s(ort)d(for)i(large)g(\014les)g(in)g(CFITSIO)e(has)h(b)s (een)g(tested)0 3340 y(on)30 b(the)h(Lin)m(ux,)f(Solaris,)h(and)f(IBM)g (AIX)h(op)s(erating)g(systems.)0 3501 y(Note)26 b(that)f(when)e (writing)h(application)i(programs)e(that)h(are)f(in)m(tended)g(to)h (supp)s(ort)e(large)i(\014les)g(it)f(is)h(imp)s(ortan)m(t)0 3613 y(to)31 b(use)g(64-bit)g(in)m(teger)h(v)-5 b(ariables)31 b(to)h(store)f(quan)m(tities)h(suc)m(h)e(as)h(the)f(dimensions)g(of)h (images,)h(or)f(the)f(n)m(um)m(b)s(er)0 3726 y(of)38 b(ro)m(ws)f(in)h(a)g(table.)63 b(These)38 b(programs)f(m)m(ust)g(also)i (call)g(the)f(sp)s(ecial)g(v)m(ersions)g(of)g(some)g(of)g(the)f (CFITSIO)0 3839 y(routines)28 b(that)h(ha)m(v)m(e)h(b)s(een)d(adapted)i (to)g(supp)s(ort)e(64-bit)i(in)m(tegers.)42 b(The)27 b(names)i(of)f(these)h(routines)f(end)g(in)g('ll')0 3952 y(\('el')k('el'\))g(to)f(distinguish)e(them)i(from)f(the)g(32-bit)i(in) m(teger)g(v)m(ersion)e(\(e.g.,)j(\014ts)p 2766 3952 V 32 w(get)p 2918 3952 V 34 w(n)m(um)p 3127 3952 V 32 w(ro)m(wsll\).)p eop end %%Page: 29 37 TeXDict begin 29 36 bop 0 1225 a Fg(Chapter)65 b(5)0 1687 y Fm(Basic)77 b(CFITSIO)f(In)-6 b(terface)77 b(Routines)0 2180 y Fj(This)30 b(c)m(hapter)i(describ)s(es)e(the)i(basic)f(routines) g(in)g(the)g(CFITSIO)e(user)i(in)m(terface)h(that)g(pro)m(vide)f(all)h (the)g(func-)0 2293 y(tions)j(normally)g(needed)g(to)g(read)g(and)f (write)h(most)h(FITS)e(\014les.)54 b(It)35 b(is)g(recommended)f(that)i (these)f(routines)0 2406 y(b)s(e)d(used)g(for)g(most)h(applications)h (and)e(that)h(the)f(more)h(adv)-5 b(anced)33 b(routines)f(describ)s(ed) g(in)g(the)h(next)f(c)m(hapter)0 2518 y(only)e(b)s(e)g(used)g(in)g(sp)s (ecial)h(circumstances)g(when)e(necessary)-8 b(.)0 2679 y(The)30 b(follo)m(wing)i(con)m(v)m(en)m(tions)g(are)f(used)e(in)i (this)f(c)m(hapter)h(in)f(the)g(description)h(of)f(eac)m(h)i(function:) 0 2839 y(1.)39 b(Most)25 b(functions)e(ha)m(v)m(e)i(2)f(names:)37 b(a)24 b(long)h(descriptiv)m(e)f(name)g(and)f(a)i(short)e(concise)i (name.)38 b(Both)25 b(names)f(are)0 2952 y(listed)g(on)f(the)g(\014rst) f(line)i(of)f(the)h(follo)m(wing)g(descriptions,)h(separated)e(b)m(y)h (a)f(slash)g(\(/\))h(c)m(haracter.)40 b(Programmers)0 3065 y(ma)m(y)27 b(use)g(either)g(name)g(in)f(their)h(programs)g(but)f (the)h(long)g(names)g(are)g(recommended)f(to)i(help)e(do)s(cumen)m(t)h (the)0 3177 y(co)s(de)k(and)e(mak)m(e)j(it)f(easier)g(to)g(read.)0 3338 y(2.)42 b(A)30 b(righ)m(t)h(arro)m(w)g(sym)m(b)s(ol)f(\()p Fb(>)p Fj(\))h(is)g(used)f(in)g(the)h(function)f(descriptions)g(to)i (separate)f(the)g(input)f(parameters)0 3451 y(from)j(the)g(output)f (parameters)i(in)f(the)g(de\014nition)g(of)g(eac)m(h)h(routine.)49 b(This)32 b(sym)m(b)s(ol)h(is)g(not)g(actually)i(part)e(of)0 3563 y(the)e(C)f(calling)h(sequence.)0 3724 y(3.)41 b(The)30 b(function)g(parameters)h(are)g(de\014ned)e(in)h(more)g(detail)i(in)e (the)g(alphab)s(etical)i(listing)f(in)f(App)s(endix)f(B.)0 3884 y(4.)39 b(The)23 b(\014rst)g(argumen)m(t)g(in)h(almost)g(all)h (the)e(functions)g(is)h(a)g(p)s(oin)m(ter)f(to)h(a)g(structure)f(of)h (t)m(yp)s(e)g(`\014ts\014le'.)38 b(Memory)0 3997 y(for)26 b(this)g(structure)f(is)h(allo)s(cated)i(b)m(y)e(CFITSIO)e(when)h(the)h (FITS)g(\014le)g(is)g(\014rst)f(op)s(ened)g(or)h(created)h(and)e(is)h (freed)0 4110 y(when)j(the)i(FITS)f(\014le)g(is)g(closed.)0 4270 y(5.)53 b(The)34 b(last)h(argumen)m(t)f(in)g(almost)i(all)f(the)f (functions)g(is)g(the)h(error)f(status)g(parameter.)53 b(It)35 b(m)m(ust)f(b)s(e)f(equal)0 4383 y(to)k(0)g(on)f(input,)h (otherwise)g(the)f(function)g(will)h(immediately)g(exit)g(without)g (doing)f(an)m(ything.)59 b(A)36 b(non-zero)0 4496 y(output)27 b(v)-5 b(alue)27 b(indicates)i(that)e(an)g(error)g(o)s(ccurred)g(in)g (the)g(function.)39 b(In)27 b(most)g(cases)h(the)g(status)f(v)-5 b(alue)28 b(is)f(also)0 4608 y(returned)i(as)i(the)f(v)-5 b(alue)31 b(of)g(the)f(function)g(itself.)0 4935 y Ff(5.1)135 b(CFITSIO)44 b(Error)h(Status)h(Routines)0 5168 y Fi(1)81 b Fj(Return)27 b(a)j(descriptiv)m(e)f(text)h(string)e(\(30)i(c)m(har)f (max.\))41 b(corresp)s(onding)28 b(to)h(a)g(CFITSIO)e(error)h(status)h (co)s(de.)95 5385 y Fe(void)47 b(fits_get_errstatus)c(/)k(ffgerr)f (\(int)h(status,)f(>)h(char)g(*err_text\))0 5601 y Fi(2)81 b Fj(Return)35 b(the)h(top)g(\(oldest\))h(80-c)m(haracter)i(error)c (message)i(from)e(the)h(in)m(ternal)h(CFITSIO)d(stac)m(k)j(of)f(error) 227 5714 y(messages)45 b(and)e(shift)h(an)m(y)g(remaining)g(messages)h (on)f(the)g(stac)m(k)h(up)e(one)h(lev)m(el.)83 b(Call)44 b(this)g(routine)1905 5942 y(29)p eop end %%Page: 30 38 TeXDict begin 30 37 bop 0 299 a Fj(30)1379 b Fh(CHAPTER)30 b(5.)71 b(BASIC)30 b(CFITSIO)f(INTERF)-10 b(A)m(CE)30 b(R)m(OUTINES)227 555 y Fj(rep)s(eatedly)c(to)h(get)g(eac)m(h)g (message)f(in)g(sequence.)39 b(The)26 b(function)f(returns)g(a)h(v)-5 b(alue)26 b(=)f(0)h(and)g(a)g(n)m(ull)f(error)227 668 y(message)32 b(when)d(the)i(error)f(stac)m(k)i(is)e(empt)m(y)-8 b(.)95 923 y Fe(int)47 b(fits_read_errmsg)d(/)j(ffgmsg)f(\(char)h (*err_msg\))0 1178 y Fi(3)81 b Fj(Prin)m(t)30 b(out)h(the)g(error)f (message)i(corresp)s(onding)e(to)h(the)g(input)f(status)h(v)-5 b(alue)31 b(and)f(all)i(the)f(error)f(messages)227 1291 y(on)d(the)h(CFITSIO)e(stac)m(k)j(to)f(the)f(sp)s(eci\014ed)g(\014le)g (stream)h(\(normally)g(to)g(stdout)f(or)g(stderr\).)40 b(If)26 b(the)i(input)227 1404 y(status)j(v)-5 b(alue)31 b(=)f(0)h(then)f(this)g(routine)g(do)s(es)g(nothing.)95 1659 y Fe(void)47 b(fits_report_error)c(/)48 b(ffrprt)e(\(FILE)g (*stream,)g(status\))0 1914 y Fi(4)81 b Fj(The)44 b(\014ts)p 461 1914 28 4 v 32 w(write)p 695 1914 V 33 w(errmark)g(routine)h(puts)f (an)h(in)m(visible)g(mark)m(er)g(on)g(the)g(CFITSIO)e(error)h(stac)m (k.)85 b(The)227 2027 y(\014ts)p 354 2027 V 33 w(clear)p 573 2027 V 34 w(errmark)31 b(routine)i(can)g(then)f(b)s(e)f(used)h(to)h (delete)h(an)m(y)f(more)f(recen)m(t)i(error)e(messages)h(on)g(the)227 2140 y(stac)m(k,)42 b(bac)m(k)c(to)g(the)g(p)s(osition)g(of)g(the)g (mark)m(er.)63 b(This)37 b(preserv)m(es)g(an)m(y)h(older)g(error)f (messages)i(on)f(the)227 2253 y(stac)m(k.)77 b(The)41 b(\014ts)p 855 2253 V 32 w(clear)p 1073 2253 V 34 w(errmsg)g(routine)h (simply)f(clears)i(all)g(the)f(messages)g(\(and)g(marks\))f(from)h(the) 227 2365 y(stac)m(k.)g(These)31 b(routines)f(are)h(called)g(without)g (an)m(y)f(argumen)m(ts.)95 2620 y Fe(void)47 b(fits_write_errmark)c(/)k (ffpmrk)f(\(void\))95 2733 y(void)h(fits_clear_errmark)c(/)k(ffcmrk)f (\(void\))95 2846 y(void)h(fits_clear_errmsg)c(/)48 b(ffcmsg)e (\(void\))0 3179 y Ff(5.2)135 b(FITS)44 b(File)i(Access)e(Routines)0 3419 y Fi(1)81 b Fj(Op)s(en)29 b(an)h(existing)h(data)g(\014le.)227 3663 y Fe(int)47 b(fits_open_file)d(/)k(ffopen)418 3776 y(\(fitsfile)d(**fptr,)h(char)h(*filename,)e(int)i(iomode,)f(>)h(int)g (*status\))227 4002 y(int)g(fits_open_diskfile)c(/)k(ffdkopen)418 4115 y(\(fitsfile)e(**fptr,)h(char)h(*filename,)e(int)i(iomode,)f(>)h (int)g(*status\))227 4340 y(int)g(fits_open_data)d(/)k(ffdopn)418 4453 y(\(fitsfile)d(**fptr,)h(char)h(*filename,)e(int)i(iomode,)f(>)h (int)g(*status\))227 4679 y(int)g(fits_open_table)d(/)j(fftopn)418 4792 y(\(fitsfile)e(**fptr,)h(char)h(*filename,)e(int)i(iomode,)f(>)h (int)g(*status\))227 5018 y(int)g(fits_open_image)d(/)j(ffiopn)418 5131 y(\(fitsfile)e(**fptr,)h(char)h(*filename,)e(int)i(iomode,)f(>)h (int)g(*status\))227 5375 y Fj(The)41 b(iomo)s(de)h(parameter)g (determines)g(the)f(read/write)h(access)h(allo)m(w)m(ed)h(in)d(the)g (\014le)h(and)f(can)h(ha)m(v)m(e)227 5488 y(v)-5 b(alues)32 b(of)g(READONL)-8 b(Y)32 b(\(0\))g(or)g(READ)m(WRITE)g(\(1\).)44 b(The)31 b(\014lename)h(parameter)g(giv)m(es)h(the)e(name)h(of)227 5601 y(the)f(\014le)g(to)g(b)s(e)f(op)s(ened,)h(follo)m(w)m(ed)h(b)m(y) f(an)f(optional)i(argumen)m(t)f(giving)h(the)f(name)f(or)h(index)f(n)m (um)m(b)s(er)g(of)227 5714 y(the)d(extension)g(within)g(the)f(FITS)g (\014le)h(that)g(should)f(b)s(e)g(mo)m(v)m(ed)i(to)f(and)f(op)s(ened)g (\(e.g.,)k Fe(myfile.fits+3)p eop end %%Page: 31 39 TeXDict begin 31 38 bop 0 299 a Fh(5.2.)72 b(FITS)30 b(FILE)g(A)m(CCESS)f(R)m(OUTINES)2244 b Fj(31)227 555 y(or)36 b Fe(myfile.fits[3])d Fj(mo)m(v)m(es)k(to)g(the)g(3rd)f (extension)g(within)g(the)h(\014le,)h(and)d Fe(myfile.fits[events])227 668 y Fj(mo)m(v)m(es)d(to)f(the)g(extension)g(with)f(the)g(k)m(eyw)m (ord)h(EXTNAME)g(=)f('EVENTS'\).)227 816 y(The)37 b(\014ts)p 548 816 28 4 v 32 w(op)s(en)p 770 816 V 32 w(disk\014le)g(routine)g(is) g(similar)g(to)h(the)f(\014ts)p 2241 816 V 33 w(op)s(en)p 2464 816 V 32 w(\014le)g(routine)g(except)h(that)f(it)h(do)s(es)f(not) 227 929 y(supp)s(ort)22 b(the)h(extended)h(\014lename)f(syn)m(tax)h(in) f(the)h(input)e(\014le)i(name.)38 b(This)23 b(routine)g(simply)g(tries) h(to)g(op)s(en)227 1042 y(the)36 b(sp)s(eci\014ed)e(input)h(\014le)g (on)g(magnetic)i(disk.)55 b(This)34 b(routine)h(is)h(mainly)f(for)g (use)g(in)g(cases)h(where)f(the)227 1155 y(\014lename)f(\(or)h (directory)f(path\))g(con)m(tains)h(square)f(or)g(curly)f(brac)m(k)m (et)j(c)m(haracters)f(that)f(w)m(ould)g(confuse)227 1268 y(the)d(extended)f(\014lename)h(parser.)227 1416 y(The)i(\014ts)p 544 1416 V 32 w(op)s(en)p 766 1416 V 32 w(data)h(routine)e(is)h (similar)g(to)h(the)f(\014ts)p 2113 1416 V 32 w(op)s(en)p 2335 1416 V 33 w(\014le)f(routine)h(except)h(that)f(it)h(will)f(mo)m(v) m(e)h(to)227 1529 y(the)23 b(\014rst)f(HDU)h(con)m(taining)h (signi\014can)m(t)f(data,)i(if)e(a)g(HDU)g(name)f(or)h(n)m(um)m(b)s(er) e(to)i(op)s(en)f(w)m(as)h(not)f(explicitly)227 1642 y(sp)s(eci\014ed)37 b(as)g(part)h(of)f(the)h(\014lename.)61 b(In)37 b(this)g(case,)j(it)e (will)g(lo)s(ok)g(for)f(the)g(\014rst)g(IMA)m(GE)h(HDU)g(with)227 1755 y(NAXIS)29 b(greater)h(than)e(0,)i(or)f(the)f(\014rst)g(table)i (that)f(do)s(es)g(not)g(con)m(tain)h(the)f(strings)f(`GTI')h(\(Go)s(o)s (d)g(Time)227 1868 y(In)m(terv)-5 b(al)31 b(extension\))h(or)e(`OBST)-8 b(ABLE')31 b(in)f(the)h(EXTNAME)f(k)m(eyw)m(ord)h(v)-5 b(alue.)227 2016 y(The)25 b(\014ts)p 536 2016 V 32 w(op)s(en)p 758 2016 V 32 w(table)h(and)e(\014ts)p 1305 2016 V 33 w(op)s(en)p 1528 2016 V 32 w(image)i(routines)f(are)g(similar)h(to)f (\014ts)p 2828 2016 V 33 w(op)s(en)p 3051 2016 V 32 w(data)h(except)f (they)h(will)227 2129 y(mo)m(v)m(e)h(to)g(the)f(\014rst)f(signi\014can) m(t)h(table)h(HDU)f(or)g(image)h(HDU)f(in)f(the)h(\014le,)h(resp)s (ectiv)m(ely)-8 b(,)29 b(if)c(a)h(HDU)h(name)227 2242 y(or)k(n)m(um)m(b)s(er)e(is)h(not)h(sp)s(eci\014ed)e(as)i(part)f(of)h (the)f(\014lename.)227 2390 y(IRAF)c(images)g(\(.imh)g(format)g (\014les\))f(and)g(ra)m(w)h(binary)e(data)j(arra)m(ys)e(ma)m(y)h(also)h (b)s(e)e(op)s(ened)f(with)h(READ-)227 2503 y(ONL)-8 b(Y)37 b(access.)60 b(CFITSIO)35 b(will)i(automatically)i(test)f(if)e(the)h (input)e(\014le)i(is)f(an)h(IRAF)f(image,)k(and)c(if,)227 2616 y(so)c(will)g(con)m(v)m(ert)h(it)f(on)f(the)h(\015y)f(in)m(to)i(a) f(virtual)f(FITS)g(image)i(b)s(efore)e(it)h(is)g(op)s(ened)e(b)m(y)i (the)g(application)227 2729 y(program.)64 b(If)37 b(the)h(input)g (\014le)g(is)g(a)g(ra)m(w)g(binary)g(data)g(arra)m(y)h(of)f(n)m(um)m(b) s(ers,)h(then)e(the)i(data)f(t)m(yp)s(e)h(and)227 2842 y(dimensions)d(of)g(the)g(arra)m(y)h(m)m(ust)f(b)s(e)f(sp)s(eci\014ed)g (in)h(square)g(brac)m(k)m(ets)h(follo)m(wing)h(the)e(name)g(of)h(the)f (\014le)227 2955 y(\(e.g.)56 b('ra)m(w\014le.dat[i512,512]')40 b(op)s(ens)34 b(a)i(512)g(x)f(512)h(short)e(in)m(teger)j(image\).)56 b(See)35 b(the)g(`Extended)g(File)227 3068 y(Name)k(Syn)m(tax')g(c)m (hapter)g(for)e(more)i(details)g(on)f(ho)m(w)g(to)h(sp)s(ecify)f(the)g (ra)m(w)h(\014le)f(name.)64 b(The)38 b(ra)m(w)g(\014le)227 3181 y(is)k(con)m(v)m(erted)g(on)f(the)h(\015y)f(in)m(to)h(a)f(virtual) h(FITS)e(image)j(in)e(memory)g(that)h(is)f(then)g(op)s(ened)g(b)m(y)g (the)227 3294 y(application)32 b(program)e(with)g(READONL)-8 b(Y)31 b(access.)227 3442 y(Programs)g(can)g(read)f(the)h(input)e (\014le)i(from)f(the)h('stdin')f(\014le)h(stream)g(if)f(a)h(dash)f(c)m (haracter)i(\('-'\))g(is)f(giv)m(en)227 3555 y(as)e(the)f(\014lename.) 40 b(Files)30 b(can)e(also)h(b)s(e)f(op)s(ened)f(o)m(v)m(er)j(the)e (net)m(w)m(ork)h(using)f(FTP)g(or)g(HTTP)g(proto)s(cols)h(b)m(y)227 3668 y(supplying)g(the)i(appropriate)f(URL)h(as)f(the)h(\014lename.)227 3816 y(The)43 b(input)f(\014le)h(can)h(b)s(e)f(mo)s(di\014ed)f(in)g(v) -5 b(arious)44 b(w)m(a)m(ys)g(to)g(create)g(a)g(virtual)f(\014le)h (\(usually)f(stored)g(in)227 3929 y(memory\))31 b(that)g(is)g(then)f (op)s(ened)f(b)m(y)i(the)f(application)i(program)e(b)m(y)h(supplying)e (a)i(\014ltering)g(or)f(binning)227 4042 y(sp)s(eci\014er)e(in)g (square)g(brac)m(k)m(ets)h(follo)m(wing)h(the)e(\014lename.)40 b(Some)29 b(of)f(the)g(more)h(common)f(\014ltering)h(meth-)227 4155 y(o)s(ds)j(are)h(illustrated)h(in)e(the)h(follo)m(wing)i (paragraphs,)e(but)f(users)g(should)f(refer)i(to)g(the)g('Extended)g (File)227 4268 y(Name)e(Syn)m(tax')g(c)m(hapter)g(for)f(a)h(complete)h (description)e(of)h(the)f(full)h(\014le)f(\014ltering)h(syn)m(tax.)227 4416 y(When)c(op)s(ening)f(an)h(image,)h(a)g(rectangular)f(subset)f(of) h(the)g(ph)m(ysical)g(image)h(ma)m(y)g(b)s(e)e(op)s(ened)f(b)m(y)i (listing)227 4529 y(the)k(\014rst)e(and)h(last)h(pixel)g(in)f(eac)m(h)i (dimension)e(\(and)g(optional)h(pixel)g(skipping)f(factor\):)227 4765 y Fe(myimage.fits[101:200,301:)o(400])227 5001 y Fj(will)g(create)h(and)e(op)s(en)f(a)i(100x100)i(pixel)e(virtual)g (image)g(of)g(that)g(section)g(of)g(the)f(ph)m(ysical)h(image,)i(and) 227 5114 y Fe(myimage.fits[*,-*])c Fj(op)s(ens)k(a)h(virtual)g(image)h (that)f(is)g(the)g(same)g(size)h(as)e(the)h(ph)m(ysical)h(image)g(but) 227 5227 y(has)c(b)s(een)g(\015ipp)s(ed)f(in)h(the)g(v)m(ertical)j (direction.)227 5375 y(When)28 b(op)s(ening)g(a)g(table,)i(the)e (\014ltering)g(syn)m(tax)h(can)f(b)s(e)f(used)h(to)g(add)g(or)g(delete) h(columns)f(or)g(k)m(eyw)m(ords)227 5488 y(in)g(the)g(virtual)h(table:) 40 b Fe(myfile.fits[events][col)i(!time;)k(PI)h(=)h(PHA*1.2])26 b Fj(op)s(ens)h(a)h(virtual)h(ta-)227 5601 y(ble)j(in)f(whic)m(h)g(the) h(TIME)f(column)g(has)g(b)s(een)g(deleted)h(and)f(a)g(new)g(PI)g (column)h(has)f(b)s(een)g(added)f(with)227 5714 y(a)41 b(v)-5 b(alue)40 b(1.2)i(times)e(that)h(of)f(the)h(PHA)f(column.)70 b(Similarly)-8 b(,)43 b(one)e(can)f(\014lter)h(a)f(table)h(to)g(k)m (eep)g(only)p eop end %%Page: 32 40 TeXDict begin 32 39 bop 0 299 a Fj(32)1379 b Fh(CHAPTER)30 b(5.)71 b(BASIC)30 b(CFITSIO)f(INTERF)-10 b(A)m(CE)30 b(R)m(OUTINES)227 555 y Fj(those)35 b(ro)m(ws)e(that)i(satisfy)f(a)g (selection)i(criterion:)48 b Fe(myfile.fits[events][pha)42 b(>)47 b(50])33 b Fj(creates)j(and)227 668 y(op)s(ens)31 b(a)g(virtual)h(table)g(con)m(taining)h(only)e(those)h(ro)m(ws)f(with)g (a)g(PHA)h(v)-5 b(alue)31 b(greater)i(than)e(50.)44 b(A)31 b(large)227 781 y(n)m(um)m(b)s(er)d(of)h(b)s(o)s(olean)h(and)e (mathematical)k(op)s(erators)d(can)g(b)s(e)g(used)f(in)h(the)g (selection)i(expression.)40 b(One)227 894 y(can)25 b(also)g(\014lter)g (table)g(ro)m(ws)f(using)g('Go)s(o)s(d)h(Time)f(In)m(terv)-5 b(al')26 b(extensions,)g(and)e(spatial)h(region)g(\014lters)g(as)f(in) 227 1007 y Fe(myfile.fits[events][gtifi)o(lter)o(\(\)])14 b Fj(and)19 b Fe(myfile.fits[events][regfil)o(ter)o(\()42 b("stars.rng"\)])p Fj(.)227 1167 y(Finally)-8 b(,)34 b(table)e(columns)f(ma)m(y)h(b)s(e)f(binned)f(or)h(histogrammed)h(to)g (generate)h(a)e(virtual)h(image.)45 b(F)-8 b(or)32 b(ex-)227 1280 y(ample,)d Fe(myfile.fits[events][bin)41 b(\(X,Y\)=4])26 b Fj(will)h(result)h(in)f(a)h(2-dimensional)g(image)h(calculated)227 1393 y(b)m(y)35 b(binning)e(the)i(X)f(and)g(Y)h(columns)f(in)g(the)h (ev)m(en)m(t)h(table)f(with)f(a)h(bin)f(size)h(of)g(4)f(in)h(eac)m(h)g (dimension.)227 1506 y(The)30 b(TLMINn)g(and)f(TLMAXn)h(k)m(eyw)m(ords) h(will)g(b)s(e)e(used)h(b)m(y)g(default)h(to)g(determine)f(the)h(range) f(of)h(the)227 1619 y(image.)227 1779 y(A)j(single)g(program)f(can)g (op)s(en)g(the)h(same)f(FITS)g(\014le)g(more)h(than)f(once)h(and)f (then)g(treat)h(the)g(resulting)227 1892 y(\014ts\014le)c(p)s(oin)m (ters)g(as)g(though)g(they)g(w)m(ere)h(completely)h(indep)s(enden)m(t)d (FITS)g(\014les.)40 b(Using)31 b(this)f(facilit)m(y)-8 b(,)33 b(a)227 2005 y(program)f(can)f(op)s(en)g(a)h(FITS)f(\014le)g(t)m (wice,)j(mo)m(v)m(e)f(to)f(2)g(di\013eren)m(t)g(extensions)g(within)f (the)g(\014le,)h(and)f(then)227 2118 y(read)g(and)e(write)i(data)g(in)f (those)h(extensions)g(in)f(an)m(y)h(order.)0 2397 y Fi(2)81 b Fj(Create)31 b(and)f(op)s(en)f(a)i(new)f(empt)m(y)h(output)f(FITS)f (\014le.)227 2677 y Fe(int)47 b(fits_create_file)d(/)j(ffinit)418 2790 y(\(fitsfile)e(**fptr,)h(char)h(*filename,)e(>)i(int)g(*status\)) 227 3016 y(int)g(fits_create_diskfile)42 b(/)48 b(ffdkinit)418 3129 y(\(fitsfile)d(**fptr,)h(char)h(*filename,)e(>)i(int)g(*status\)) 227 3409 y Fj(An)36 b(error)h(will)g(b)s(e)f(returned)f(if)h(the)h(sp)s (eci\014ed)f(\014le)h(already)g(exists,)i(unless)d(the)h(\014lename)f (is)h(pre\014xed)227 3522 y(with)30 b(an)g(exclamation)i(p)s(oin)m(t)e (\(!\).)42 b(In)29 b(that)i(case)g(CFITSIO)d(will)j(o)m(v)m(erwrite)g (\(delete\))h(an)m(y)f(existing)g(\014le)227 3635 y(with)36 b(the)g(same)h(name.)57 b(Note)38 b(that)e(the)h(exclamation)h(p)s(oin) m(t)e(is)g(a)h(sp)s(ecial)f(UNIX)g(c)m(haracter)i(so)e(if)g(it)227 3748 y(is)d(used)e(on)h(the)h(command)f(line)h(it)g(m)m(ust)f(b)s(e)g (preceded)g(b)m(y)g(a)g(bac)m(kslash)h(to)h(force)e(the)h(UNIX)g(shell) f(to)227 3860 y(accept)g(the)f(c)m(haracter)h(as)e(part)g(of)h(the)g (\014lename.)227 4021 y(The)26 b(output)h(\014le)g(will)g(b)s(e)f (written)h(to)g(the)g('stdout')g(\014le)g(stream)g(if)g(a)g(dash)f(c)m (haracter)i(\('-'\))g(or)f(the)g(string)227 4134 y('stdout')34 b(is)f(giv)m(en)h(as)g(the)f(\014lename.)49 b(Similarly)-8 b(,)35 b('-.gz')g(or)e('stdout.gz')i(will)f(cause)f(the)h(\014le)f(to)h (b)s(e)e(gzip)227 4247 y(compressed)e(b)s(efore)g(it)h(is)g(written)f (out)h(to)g(the)f(stdout)h(stream.)227 4407 y(Optionally)-8 b(,)41 b(the)c(name)h(of)f(a)h(template)h(\014le)e(that)h(is)f(used)g (to)h(de\014ne)f(the)g(structure)g(of)g(the)h(new)f(\014le)227 4520 y(ma)m(y)i(b)s(e)f(sp)s(eci\014ed)f(in)h(paren)m(theses)h(follo)m (wing)g(the)g(output)e(\014le)i(name.)64 b(The)38 b(template)h(\014le)g (ma)m(y)g(b)s(e)227 4633 y(another)32 b(FITS)e(\014le,)i(in)f(whic)m(h) g(case)i(the)e(new)g(\014le,)h(at)g(the)g(time)g(it)f(is)h(op)s(ened,)f (will)g(b)s(e)g(an)g(exact)i(cop)m(y)227 4746 y(of)38 b(the)g(template)i(\014le)e(except)g(that)h(the)f(data)g(structures)g (\(images)h(and)e(tables\))i(will)f(b)s(e)g(\014lled)f(with)227 4858 y(zeros.)k(Alternativ)m(ely)-8 b(,)32 b(the)d(template)i(\014le)e (ma)m(y)g(b)s(e)f(an)h(ASCI)s(I)e(format)i(text)h(\014le)f(con)m (taining)i(directiv)m(es)227 4971 y(that)e(de\014ne)e(the)h(k)m(eyw)m (ords)g(to)g(b)s(e)g(created)h(in)e(eac)m(h)i(HDU)g(of)f(the)g(\014le.) 40 b(See)28 b(the)g('Extended)f(File)i(Name)227 5084 y(Syn)m(tax')i(section)h(for)e(a)h(complete)g(description)g(of)f(the)h (template)h(\014le)e(syn)m(tax.)227 5245 y(The)f(\014ts)p 540 5245 28 4 v 33 w(create)p 809 5245 V 34 w(disk\014le)g(routine)h (is)g(similar)g(to)g(the)g(\014ts)p 2238 5245 V 32 w(create)p 2506 5245 V 34 w(\014le)g(routine)g(except)g(that)g(it)g(do)s(es)g(not) 227 5357 y(supp)s(ort)36 b(the)i(extended)g(\014lename)g(syn)m(tax)g (in)g(the)g(input)f(\014le)h(name.)63 b(This)37 b(routine)h(simply)f (tries)h(to)227 5470 y(create)e(the)e(sp)s(eci\014ed)f(\014le)h(on)f (magnetic)j(disk.)50 b(This)33 b(routine)h(is)g(mainly)g(for)g(use)f (in)h(cases)g(where)g(the)227 5583 y(\014lename)g(\(or)h(directory)f (path\))g(con)m(tains)h(square)f(or)g(curly)f(brac)m(k)m(et)j(c)m (haracters)f(that)f(w)m(ould)g(confuse)227 5696 y(the)d(extended)f (\014lename)h(parser.)p eop end %%Page: 33 41 TeXDict begin 33 40 bop 0 299 a Fh(5.3.)72 b(HDU)31 b(A)m(CCESS)e(R)m (OUTINES)2488 b Fj(33)0 555 y Fi(3)81 b Fj(Close)28 b(a)f(previously)g (op)s(ened)g(FITS)g(\014le.)40 b(The)27 b(\014rst)f(routine)i(simply)f (closes)h(the)g(\014le,)g(whereas)f(the)h(second)227 668 y(one)41 b(also)g(DELETES)e(THE)h(FILE,)g(whic)m(h)g(can)h(b)s(e)e (useful)h(in)g(cases)h(where)e(a)i(FITS)e(\014le)i(has)f(b)s(een)227 781 y(partially)32 b(created,)f(but)f(then)g(an)g(error)g(o)s(ccurs)g (whic)m(h)h(prev)m(en)m(ts)f(it)h(from)f(b)s(eing)g(completed.)95 1017 y Fe(int)47 b(fits_close_file)d(/)j(ffclos)g(\(fitsfile)e(*fptr,)h (>)h(int)g(*status\))95 1243 y(int)g(fits_delete_file)d(/)j(ffdelt)f (\(fitsfile)g(*fptr,)g(>)h(int)g(*status\))0 1479 y Fi(4)81 b Fj(Return)21 b(the)i(name,)h(I/O)e(mo)s(de)g(\(READONL)-8 b(Y)24 b(or)e(READ)m(WRITE\),)i(and/or)e(the)g(\014le)h(t)m(yp)s(e)f (\(e.g.)40 b('\014le://',)227 1592 y('ftp://'\))32 b(of)f(the)f(op)s (ened)g(FITS)g(\014le.)95 1828 y Fe(int)47 b(fits_file_name)d(/)k (ffflnm)e(\(fitsfile)f(*fptr,)h(>)i(char)e(*filename,)f(int)i (*status\))95 2054 y(int)g(fits_file_mode)d(/)k(ffflmd)e(\(fitsfile)f (*fptr,)h(>)i(int)f(*iomode,)e(int)i(*status\))95 2280 y(int)g(fits_url_type)e(/)i(ffurlt)f(\(fitsfile)f(*fptr,)h(>)i(char)f (*urltype,)e(int)i(*status\))0 2610 y Ff(5.3)135 b(HDU)46 b(Access)e(Routines)0 2860 y Fj(The)30 b(follo)m(wing)i(functions)e(p)s (erform)f(op)s(erations)h(on)h(Header-Data)h(Units)f(\(HDUs\))h(as)e(a) h(whole.)0 3096 y Fi(1)81 b Fj(Mo)m(v)m(e)44 b(to)g(a)f(di\013eren)m(t) g(HDU)g(in)g(the)g(\014le.)77 b(The)43 b(\014rst)f(routine)g(mo)m(v)m (es)i(to)g(a)f(sp)s(eci\014ed)f(absolute)h(HDU)227 3209 y(n)m(um)m(b)s(er)f(\(starting)h(with)g(1)f(for)h(the)g(primary)e(arra) m(y\))j(in)e(the)h(FITS)f(\014le,)k(and)c(the)g(second)h(routine)227 3322 y(mo)m(v)m(es)35 b(a)e(relativ)m(e)i(n)m(um)m(b)s(er)d(HDUs)i (forw)m(ard)e(or)h(bac)m(kw)m(ard)h(from)f(the)g(curren)m(t)g(HDU.)h(A) f(n)m(ull)g(p)s(oin)m(ter)227 3435 y(ma)m(y)e(b)s(e)f(giv)m(en)h(for)f (the)g(hdut)m(yp)s(e)f(parameter)i(if)f(it's)h(v)-5 b(alue)31 b(is)f(not)h(needed.)40 b(The)30 b(third)f(routine)i(mo)m(v)m(es)227 3548 y(to)39 b(the)g(\(\014rst\))f(HDU)i(whic)m(h)e(has)g(the)h(sp)s (eci\014ed)e(extension)i(t)m(yp)s(e)g(and)f(EXTNAME)g(and)g(EXTVER)227 3661 y(k)m(eyw)m(ord)26 b(v)-5 b(alues)26 b(\(or)g(HDUNAME)h(and)e (HDUVER)h(k)m(eyw)m(ords\).)40 b(The)24 b(hdut)m(yp)s(e)h(parameter)h (ma)m(y)g(ha)m(v)m(e)227 3774 y(a)d(v)-5 b(alue)22 b(of)g(IMA)m(GE)p 935 3774 28 4 v 34 w(HDU,)h(ASCI)s(I)p 1476 3774 V 31 w(TBL,)f(BINAR)-8 b(Y)p 2101 3774 V 34 w(TBL,)22 b(or)g(ANY)p 2676 3774 V 34 w(HDU)g(where)g(ANY)p 3396 3774 V 33 w(HDU)h(means)227 3887 y(that)33 b(only)g(the)f(extname)i(and)d(extv)m(er)j(v)-5 b(alues)33 b(will)f(b)s(e)g(used)g(to)h(lo)s(cate)h(the)f(correct)g (extension.)48 b(If)32 b(the)227 4000 y(input)i(v)-5 b(alue)36 b(of)f(extv)m(er)h(is)f(0)h(then)e(the)i(EXTVER)e(k)m(eyw)m (ord)i(is)f(ignored)g(and)g(the)g(\014rst)f(HDU)i(with)f(a)227 4112 y(matc)m(hing)28 b(EXTNAME)g(\(or)f(HDUNAME\))i(k)m(eyw)m(ord)e (will)g(b)s(e)g(found.)38 b(If)27 b(no)f(matc)m(hing)i(HDU)g(is)f (found)227 4225 y(in)f(the)g(\014le)g(then)g(the)g(curren)m(t)g(HDU)g (will)h(remain)f(unc)m(hanged)f(and)h(a)g(status)g(=)g(BAD)p 3246 4225 V 33 w(HDU)p 3484 4225 V 34 w(NUM)h(will)227 4338 y(b)s(e)j(returned.)95 4574 y Fe(int)47 b(fits_movabs_hdu)d(/)j (ffmahd)286 4687 y(\(fitsfile)f(*fptr,)g(int)h(hdunum,)e(>)j(int)f (*hdutype,)e(int)i(*status\))95 4913 y(int)g(fits_movrel_hdu)d(/)j (ffmrhd)286 5026 y(\(fitsfile)f(*fptr,)g(int)h(nmove,)f(>)h(int)g (*hdutype,)e(int)i(*status\))95 5252 y(int)g(fits_movnam_hdu)d(/)j (ffmnhd)286 5365 y(\(fitsfile)f(*fptr,)g(int)h(hdutype,)e(char)i (*extname,)e(int)i(extver,)f(>)h(int)g(*status\))0 5601 y Fi(2)81 b Fj(Return)38 b(the)i(total)h(n)m(um)m(b)s(er)d(of)i(HDUs)g (in)f(the)h(FITS)f(\014le.)68 b(This)39 b(returns)f(the)h(n)m(um)m(b)s (er)g(of)g(completely)227 5714 y(de\014ned)30 b(HDUs)h(in)f(the)h (\014le.)42 b(If)30 b(a)h(new)f(HDU)h(has)g(just)f(b)s(een)g(added)f (to)j(the)f(FITS)f(\014le,)h(then)f(that)h(last)p eop end %%Page: 34 42 TeXDict begin 34 41 bop 0 299 a Fj(34)1379 b Fh(CHAPTER)30 b(5.)71 b(BASIC)30 b(CFITSIO)f(INTERF)-10 b(A)m(CE)30 b(R)m(OUTINES)227 555 y Fj(HDU)g(will)f(only)g(b)s(e)g(coun)m(ted)g(if) g(it)h(has)e(b)s(een)h(closed,)h(or)f(if)g(data)h(has)e(b)s(een)h (written)g(to)g(the)g(HDU.)h(The)227 668 y(curren)m(t)g(HDU)i(remains)e (unc)m(hanged)g(b)m(y)g(this)g(routine.)95 900 y Fe(int)47 b(fits_get_num_hdus)c(/)48 b(ffthdu)286 1013 y(\(fitsfile)e(*fptr,)g(>) h(int)g(*hdunum,)f(int)h(*status\))0 1246 y Fi(3)81 b Fj(Return)31 b(the)h(n)m(um)m(b)s(er)f(of)h(the)h(curren)m(t)e(HDU)i (\(CHDU\))h(in)d(the)i(FITS)e(\014le)h(\(where)g(the)g(primary)g(arra)m (y)g(=)227 1359 y(1\).)42 b(This)29 b(function)h(returns)g(the)g(HDU)h (n)m(um)m(b)s(er)e(rather)h(than)h(a)f(status)h(v)-5 b(alue.)95 1591 y Fe(int)47 b(fits_get_hdu_num)d(/)j(ffghdn)286 1704 y(\(fitsfile)f(*fptr,)g(>)h(int)g(*hdunum\))0 1936 y Fi(4)81 b Fj(Return)38 b(the)h(t)m(yp)s(e)h(of)f(the)h(curren)m(t)f (HDU)h(in)f(the)g(FITS)g(\014le.)67 b(The)39 b(p)s(ossible)g(v)-5 b(alues)39 b(for)g(hdut)m(yp)s(e)f(are:)227 2049 y(IMA)m(GE)p 546 2049 28 4 v 34 w(HDU,)31 b(ASCI)s(I)p 1095 2049 V 32 w(TBL,)f(or)g(BINAR)-8 b(Y)p 1840 2049 V 34 w(TBL.)95 2281 y Fe(int)47 b(fits_get_hdu_type)c(/)48 b(ffghdt)286 2394 y(\(fitsfile)e(*fptr,)g(>)h(int)g(*hdutype,)e(int)i(*status\))0 2626 y Fi(5)81 b Fj(Cop)m(y)24 b(all)h(or)f(part)g(of)g(the)g(HDUs)h (in)f(the)g(FITS)g(\014le)g(asso)s(ciated)h(with)f(infptr)f(and)h(app)s (end)e(them)i(to)h(the)g(end)227 2739 y(of)f(the)f(FITS)f(\014le)i (asso)s(ciated)g(with)f(outfptr.)38 b(If)23 b('previous')g(is)g(true)g (\(not)h(0\),)i(then)d(an)m(y)g(HDUs)h(preceding)227 2852 y(the)35 b(curren)m(t)f(HDU)g(in)g(the)h(input)e(\014le)h(will)h (b)s(e)e(copied)i(to)g(the)f(output)g(\014le.)52 b(Similarly)-8 b(,)36 b('curren)m(t')f(and)227 2965 y('follo)m(wing')c(determine)e (whether)f(the)h(curren)m(t)g(HDU,)g(and/or)g(an)m(y)g(follo)m(wing)h (HDUs)g(in)e(the)h(input)f(\014le)227 3078 y(will)i(b)s(e)f(copied)i (to)f(the)g(output)f(\014le.)41 b(Th)m(us,)29 b(if)g(all)i(3)f (parameters)g(are)g(true,)g(then)g(the)f(en)m(tire)i(input)e(\014le)227 3191 y(will)36 b(b)s(e)e(copied.)56 b(On)35 b(exit,)i(the)f(curren)m(t) f(HDU)h(in)e(the)i(input)e(\014le)i(will)f(b)s(e)g(unc)m(hanged,)h(and) f(the)g(last)227 3304 y(HDU)c(in)f(the)h(output)f(\014le)g(will)h(b)s (e)f(the)g(curren)m(t)h(HDU.)95 3536 y Fe(int)47 b(fits_copy_file)d(/)k (ffcpfl)286 3649 y(\(fitsfile)e(*infptr,)f(fitsfile)h(*outfptr,)f(int)i (previous,)e(int)i(current,)477 3762 y(int)g(following,)e(>)j(int)f (*status\))0 3994 y Fi(6)81 b Fj(Cop)m(y)34 b(the)h(curren)m(t)f(HDU)h (from)f(the)g(FITS)g(\014le)h(asso)s(ciated)g(with)g(infptr)e(and)h (app)s(end)e(it)j(to)g(the)g(end)f(of)227 4107 y(the)39 b(FITS)e(\014le)h(asso)s(ciated)i(with)e(outfptr.)64 b(Space)38 b(ma)m(y)h(b)s(e)e(reserv)m(ed)i(for)f(MOREKEYS)f (additional)227 4220 y(k)m(eyw)m(ords)31 b(in)f(the)h(output)f(header.) 95 4452 y Fe(int)47 b(fits_copy_hdu)e(/)i(ffcopy)286 4565 y(\(fitsfile)f(*infptr,)f(fitsfile)h(*outfptr,)f(int)i(morekeys,)e (>)j(int)f(*status\))0 4798 y Fi(7)81 b Fj(W)-8 b(rite)31 b(the)g(curren)m(t)f(HDU)h(in)f(the)h(input)e(FITS)h(\014le)g(to)h(the) g(output)f(FILE)g(stream)h(\(e.g.,)h(to)f(stdout\).)95 5030 y Fe(int)47 b(fits_write_hdu)d(/)k(ffwrhdu)286 5143 y(\(fitsfile)e(*infptr,)f(FILE)i(*stream,)e(>)j(int)f(*status\))0 5375 y Fi(8)81 b Fj(Cop)m(y)43 b(the)h(header)g(\(and)f(not)h(the)g (data\))h(from)e(the)h(CHDU)g(asso)s(ciated)h(with)f(infptr)e(to)j(the) f(CHDU)227 5488 y(asso)s(ciated)28 b(with)e(outfptr.)39 b(If)26 b(the)h(curren)m(t)f(output)g(HDU)h(is)g(not)f(completely)i (empt)m(y)-8 b(,)29 b(then)d(the)h(CHDU)227 5601 y(will)35 b(b)s(e)f(closed)h(and)f(a)h(new)f(HDU)h(will)g(b)s(e)f(app)s(ended)e (to)j(the)g(output)f(\014le.)53 b(An)34 b(empt)m(y)h(output)f(data)227 5714 y(unit)c(will)h(b)s(e)f(created)h(with)f(all)h(v)-5 b(alues)31 b(initially)h(=)e(0\).)p eop end %%Page: 35 43 TeXDict begin 35 42 bop 0 299 a Fh(5.4.)72 b(HEADER)31 b(KEYW)m(ORD)g(READ/WRITE)g(R)m(OUTINES)1495 b Fj(35)95 555 y Fe(int)47 b(fits_copy_header)d(/)j(ffcphd)286 668 y(\(fitsfile)f(*infptr,)f(fitsfile)h(*outfptr,)f(>)i(int)g(*status\))0 942 y Fi(9)81 b Fj(Delete)35 b(the)e(CHDU)h(in)f(the)g(FITS)f(\014le.) 50 b(An)m(y)33 b(follo)m(wing)i(HDUs)e(will)h(b)s(e)e(shifted)h(forw)m (ard)g(in)g(the)g(\014le,)h(to)227 1054 y(\014ll)k(in)f(the)g(gap)h (created)g(b)m(y)g(the)f(deleted)h(HDU.)h(In)d(the)i(case)g(of)g (deleting)g(the)g(primary)e(arra)m(y)i(\(the)227 1167 y(\014rst)30 b(HDU)h(in)f(the)h(\014le\))g(then)f(the)h(curren)m(t)f (primary)f(arra)m(y)i(will)g(b)s(e)f(replace)h(b)m(y)g(a)g(n)m(ull)f (primary)f(arra)m(y)227 1280 y(con)m(taining)k(the)f(minim)m(um)e(set)i (of)g(required)e(k)m(eyw)m(ords)i(and)e(no)i(data.)44 b(If)31 b(there)g(are)h(more)f(extensions)227 1393 y(in)f(the)g(\014le) g(follo)m(wing)i(the)e(one)g(that)h(is)f(deleted,)h(then)f(the)g(the)g (CHDU)h(will)f(b)s(e)g(rede\014ned)e(to)j(p)s(oin)m(t)f(to)227 1506 y(the)d(follo)m(wing)h(extension.)41 b(If)26 b(there)h(are)g(no)g (follo)m(wing)h(extensions)f(then)g(the)g(CHDU)g(will)g(b)s(e)f (rede\014ned)227 1619 y(to)36 b(p)s(oin)m(t)f(to)g(the)g(previous)f (HDU.)i(The)e(output)h(hdut)m(yp)s(e)e(parameter)i(returns)f(the)h(t)m (yp)s(e)g(of)f(the)h(new)227 1732 y(CHDU.)c(A)g(n)m(ull)f(p)s(oin)m (ter)g(ma)m(y)h(b)s(e)f(giv)m(en)i(for)e(hdut)m(yp)s(e)f(if)h(the)h (returned)e(v)-5 b(alue)31 b(is)f(not)h(needed.)95 2005 y Fe(int)47 b(fits_delete_hdu)d(/)j(ffdhdu)286 2118 y(\(fitsfile)f (*fptr,)g(>)h(int)g(*hdutype,)e(int)i(*status\))0 2468 y Ff(5.4)135 b(Header)46 b(Keyw)l(ord)g(Read/W)-11 b(rite)46 b(Routines)0 2722 y Fj(These)35 b(routines)g(read)f(or)h(write)h(k)m (eyw)m(ords)f(in)g(the)g(Curren)m(t)f(Header)h(Unit)g(\(CHU\).)h(Wild)g (card)e(c)m(haracters)0 2834 y(\(*,)28 b(?,)g(or)e(#\))h(ma)m(y)g(b)s (e)f(used)g(when)f(sp)s(ecifying)i(the)g(name)f(of)h(the)g(k)m(eyw)m (ord)g(to)g(b)s(e)f(read:)39 b(a)27 b(')10 b(?')39 b(will)27 b(matc)m(h)h(an)m(y)0 2947 y(single)35 b(c)m(haracter)g(at)g(that)f(p)s (osition)g(in)g(the)g(k)m(eyw)m(ord)h(name)f(and)f(a)h('*')h(will)g (matc)m(h)f(an)m(y)h(length)f(\(including)0 3060 y(zero\))c(string)f (of)g(c)m(haracters.)42 b(The)28 b('#')h(c)m(haracter)i(will)e(matc)m (h)h(an)m(y)f(consecutiv)m(e)i(string)e(of)g(decimal)h(digits)f(\(0)0 3173 y(-)35 b(9\).)55 b(When)35 b(a)g(wild)g(card)g(is)g(used)f(the)h (routine)g(will)g(only)g(searc)m(h)h(for)f(a)g(matc)m(h)h(from)e(the)h (curren)m(t)g(header)0 3286 y(p)s(osition)27 b(to)h(the)f(end)f(of)h (the)g(header)g(and)f(will)h(not)g(resume)g(the)g(searc)m(h)g(from)g (the)g(top)g(of)g(the)g(header)g(bac)m(k)g(to)0 3399 y(the)k(original)i(header)e(p)s(osition)g(as)h(is)f(done)g(when)f(no)h (wildcards)g(are)h(included)e(in)h(the)g(k)m(eyw)m(ord)h(name.)43 b(The)0 3512 y(\014ts)p 127 3512 28 4 v 32 w(read)p 331 3512 V 33 w(record)29 b(routine)h(ma)m(y)g(b)s(e)f(used)f(to)i(set)g (the)g(starting)g(p)s(osition)f(when)g(doing)g(wild)g(card)h(searc)m (hes.)41 b(A)0 3625 y(status)29 b(v)-5 b(alue)30 b(of)f(KEY)p 809 3625 V 32 w(NO)p 980 3625 V 33 w(EXIST)f(is)h(returned)e(if)i(the)g (sp)s(eci\014ed)f(k)m(eyw)m(ord)i(to)f(b)s(e)g(read)f(is)h(not)h(found) d(in)i(the)0 3738 y(header.)0 4045 y Fd(5.4.1)112 b(Keyw)m(ord)38 b(Reading)g(Routines)0 4264 y Fi(1)81 b Fj(Return)33 b(the)h(n)m(um)m(b)s(er)e(of)i(existing)h(k)m(eyw)m(ords)g(\(not)f (coun)m(ting)h(the)f(END)g(k)m(eyw)m(ord\))h(and)e(the)h(amoun)m(t)h (of)227 4377 y(space)e(curren)m(tly)f(a)m(v)-5 b(ailable)34 b(for)e(more)g(k)m(eyw)m(ords.)46 b(It)32 b(returns)e(morek)m(eys)j(=)f (-1)g(if)g(the)g(header)g(has)g(not)227 4489 y(y)m(et)27 b(b)s(een)d(closed.)40 b(Note)26 b(that)g(CFITSIO)d(will)j(dynamically) g(add)e(space)i(if)f(required)f(when)g(writing)h(new)227 4602 y(k)m(eyw)m(ords)32 b(to)g(a)f(header)g(so)h(in)f(practice)h (there)g(is)f(no)g(limit)h(to)g(the)f(n)m(um)m(b)s(er)f(of)i(k)m(eyw)m (ords)f(that)h(can)g(b)s(e)227 4715 y(added)e(to)h(a)f(header.)41 b(A)30 b(n)m(ull)g(p)s(oin)m(ter)h(ma)m(y)f(b)s(e)g(en)m(tered)h(for)f (the)g(morek)m(eys)h(parameter)g(if)f(it's)h(v)-5 b(alue)31 b(is)227 4828 y(not)g(needed.)95 5102 y Fe(int)47 b(fits_get_hdrspace)c (/)48 b(ffghsp)286 5215 y(\(fitsfile)e(*fptr,)g(>)h(int)g(*keysexist,)e (int)i(*morekeys,)e(int)i(*status\))0 5488 y Fi(2)81 b Fj(Return)28 b(the)h(sp)s(eci\014ed)f(k)m(eyw)m(ord.)41 b(In)29 b(the)g(\014rst)f(routine,)i(the)f(datat)m(yp)s(e)h(parameter)g (sp)s(eci\014es)e(the)h(desired)227 5601 y(returned)e(data)h(t)m(yp)s (e)g(of)g(the)g(k)m(eyw)m(ord)h(v)-5 b(alue)28 b(and)f(can)h(ha)m(v)m (e)h(one)f(of)g(the)g(follo)m(wing)h(sym)m(b)s(olic)g(constan)m(t)227 5714 y(v)-5 b(alues:)47 b(TSTRING,)33 b(TLOGICAL)f(\(==)h(in)m(t\),)j (TBYTE,)d(TSHOR)-8 b(T,)33 b(TUSHOR)-8 b(T,)32 b(TINT,)h(TUINT,)p eop end %%Page: 36 44 TeXDict begin 36 43 bop 0 299 a Fj(36)1379 b Fh(CHAPTER)30 b(5.)71 b(BASIC)30 b(CFITSIO)f(INTERF)-10 b(A)m(CE)30 b(R)m(OUTINES)227 555 y Fj(TLONG,)24 b(TULONG,)g(TLONGLONG,)g(TFLO)m(A) -8 b(T,)25 b(TDOUBLE,)f(TCOMPLEX,)f(and)h(TDBLCOM-)227 668 y(PLEX.)j(Within)f(the)h(con)m(text)h(of)f(this)g(routine,)g (TSTRING)f(corresp)s(onds)f(to)i(a)g('c)m(har*')h(data)f(t)m(yp)s(e,)h (i.e.,)227 781 y(a)k(p)s(oin)m(ter)g(to)g(a)g(c)m(haracter)i(arra)m(y) -8 b(.)45 b(Data)33 b(t)m(yp)s(e)f(con)m(v)m(ersion)h(will)f(b)s(e)f(p) s(erformed)f(for)i(n)m(umeric)f(v)-5 b(alues)32 b(if)227 894 y(the)27 b(k)m(eyw)m(ord)g(v)-5 b(alue)27 b(do)s(es)f(not)h(ha)m(v) m(e)h(the)f(same)g(data)g(t)m(yp)s(e.)40 b(If)26 b(the)h(v)-5 b(alue)27 b(of)g(the)f(k)m(eyw)m(ord)i(is)e(unde\014ned)227 1007 y(\(i.e.,)31 b(the)e(v)-5 b(alue)30 b(\014eld)e(is)h(blank\))g (then)f(an)h(error)g(status)g(=)f(V)-10 b(ALUE)p 2627 1007 28 4 v 33 w(UNDEFINED)30 b(will)g(b)s(e)e(returned.)227 1156 y(The)c(second)f(routine)h(returns)f(the)h(k)m(eyw)m(ord)g(v)-5 b(alue)24 b(as)g(a)g(c)m(haracter)i(string)d(\(a)i(literal)g(cop)m(y)g (of)f(what)f(is)h(in)227 1269 y(the)j(v)-5 b(alue)26 b(\014eld\))g(regardless)h(of)f(the)g(in)m(trinsic)h(data)g(t)m(yp)s(e) f(of)g(the)g(k)m(eyw)m(ord.)40 b(The)26 b(third)f(routine)h(returns)227 1382 y(the)45 b(en)m(tire)h(80-c)m(haracter)i(header)c(record)h(of)g (the)g(k)m(eyw)m(ord,)k(with)c(an)m(y)g(trailing)h(blank)e(c)m (haracters)227 1495 y(stripp)s(ed)37 b(o\013.)64 b(The)38 b(fourth)f(routine)h(returns)f(the)h(\(next\))h(header)f(record)g(that) h(con)m(tains)g(the)f(literal)227 1608 y(string)31 b(of)f(c)m (haracters)i(sp)s(eci\014ed)e(b)m(y)g(the)g('string')h(argumen)m(t.)227 1757 y(If)f(a)h(NULL)f(commen)m(t)i(p)s(oin)m(ter)e(is)g(supplied)g (then)g(the)g(commen)m(t)i(string)e(will)h(not)f(b)s(e)g(returned.)95 2013 y Fe(int)47 b(fits_read_key)e(/)i(ffgky)286 2126 y(\(fitsfile)f(*fptr,)g(int)h(datatype,)e(char)i(*keyname,)e(>)i(DTYPE) g(*value,)334 2238 y(char)g(*comment,)e(int)i(*status\))95 2464 y(int)g(fits_read_keyword)c(/)48 b(ffgkey)286 2577 y(\(fitsfile)e(*fptr,)g(char)g(*keyname,)g(>)h(char)g(*value,)f(char)g (*comment,)334 2690 y(int)h(*status\))95 2916 y(int)g(fits_read_card)d (/)k(ffgcrd)286 3029 y(\(fitsfile)e(*fptr,)g(char)g(*keyname,)g(>)h (char)g(*card,)f(int)h(*status\))95 3255 y(int)g(fits_read_str)e(/)i (ffgstr)286 3368 y(\(fitsfile)f(*fptr,)g(char)g(*string,)g(>)h(char)g (*card,)f(int)h(*status\))0 3623 y Fi(3)81 b Fj(Return)38 b(the)h(n)m(th)f(header)h(record)g(in)f(the)i(CHU.)f(The)f(\014rst)g(k) m(eyw)m(ord)i(in)e(the)h(header)g(is)g(at)g(k)m(eyn)m(um)g(=)227 3736 y(1;)53 b(if)45 b(k)m(eyn)m(um)g(=)f(0)h(then)g(these)g(routines)g (simply)f(reset)h(the)h(in)m(ternal)f(CFITSIO)e(p)s(oin)m(ter)i(to)h (the)227 3849 y(b)s(eginning)35 b(of)h(the)g(header)f(so)h(that)g (subsequen)m(t)f(k)m(eyw)m(ord)h(op)s(erations)g(will)g(start)g(at)g (the)g(top)g(of)g(the)227 3962 y(header)26 b(\(e.g.,)j(prior)c(to)h (searc)m(hing)h(for)f(k)m(eyw)m(ords)g(using)f(wild)g(cards)h(in)f(the) h(k)m(eyw)m(ord)h(name\).)39 b(The)26 b(\014rst)227 4074 y(routine)32 b(returns)e(the)i(en)m(tire)h(80-c)m(haracter)h(header)e (record)g(\(with)f(trailing)i(blanks)e(truncated\),)i(while)227 4187 y(the)41 b(second)f(routine)g(parses)g(the)g(record)h(and)e (returns)g(the)i(name,)i(v)-5 b(alue,)43 b(and)d(commen)m(t)h(\014elds) f(as)227 4300 y(separate)32 b(\(blank)f(truncated\))g(c)m(haracter)i (strings.)42 b(If)30 b(a)h(NULL)g(commen)m(t)h(p)s(oin)m(ter)f(is)g (giv)m(en)h(on)f(input,)227 4413 y(then)f(the)h(commen)m(t)g(string)g (will)f(not)h(b)s(e)f(returned.)95 4668 y Fe(int)47 b(fits_read_record) d(/)j(ffgrec)286 4781 y(\(fitsfile)f(*fptr,)g(int)h(keynum,)e(>)j(char) f(*card,)f(int)h(*status\))95 5007 y(int)g(fits_read_keyn)d(/)k(ffgkyn) 286 5120 y(\(fitsfile)e(*fptr,)g(int)h(keynum,)e(>)j(char)f(*keyname,)e (char)h(*value,)334 5233 y(char)h(*comment,)e(int)i(*status\))0 5488 y Fi(4)81 b Fj(Return)44 b(the)i(next)g(k)m(eyw)m(ord)g(whose)f (name)h(matc)m(hes)g(one)g(of)g(the)f(strings)h(in)f('inclist')i(but)e (do)s(es)g(not)227 5601 y(matc)m(h)31 b(an)m(y)g(of)g(the)f(strings)g (in)g('exclist'.)43 b(The)30 b(strings)g(in)g(inclist)h(and)f(exclist)i (ma)m(y)e(con)m(tain)i(wild)e(card)227 5714 y(c)m(haracters)k(\(*,)f (?,)f(and)f(#\))h(as)g(describ)s(ed)f(at)i(the)f(b)s(eginning)f(of)h (this)g(section.)46 b(This)31 b(routine)h(searc)m(hes)p eop end %%Page: 37 45 TeXDict begin 37 44 bop 0 299 a Fh(5.4.)72 b(HEADER)31 b(KEYW)m(ORD)g(READ/WRITE)g(R)m(OUTINES)1495 b Fj(37)227 555 y(from)35 b(the)g(curren)m(t)g(header)g(p)s(osition)g(to)h(the)f (end)f(of)h(the)h(header,)g(only)-8 b(,)37 b(and)d(do)s(es)h(not)g(con) m(tin)m(ue)i(the)227 668 y(searc)m(h)32 b(from)e(the)h(top)g(of)g(the)g (header)g(bac)m(k)g(to)h(the)f(original)h(p)s(osition.)42 b(The)31 b(curren)m(t)f(header)h(p)s(osition)227 781 y(ma)m(y)e(b)s(e)e(reset)h(with)g(the)g(\013grec)g(routine.)40 b(Note)29 b(that)g(nexc)f(ma)m(y)g(b)s(e)f(set)h(=)g(0)g(if)g(there)g (are)g(no)g(k)m(eyw)m(ords)227 894 y(to)h(b)s(e)f(excluded.)39 b(This)28 b(routine)g(returns)f(status)h(=)g(KEY)p 2268 894 28 4 v 32 w(NO)p 2439 894 V 33 w(EXIST)f(if)h(a)h(matc)m(hing)g(k)m (eyw)m(ord)g(is)f(not)227 1007 y(found.)95 1226 y Fe(int)47 b(fits_find_nextkey)c(/)48 b(ffgnxk)286 1339 y(\(fitsfile)e(*fptr,)g (char)g(**inclist,)f(int)i(ninc,)g(char)f(**exclist,)334 1452 y(int)h(nexc,)f(>)i(char)e(*card,)h(int)94 b(*status\))0 1671 y Fi(5)81 b Fj(Return)25 b(the)h(ph)m(ysical)g(units)g(string)g (from)f(an)h(existing)h(k)m(eyw)m(ord.)39 b(This)26 b(routine)g(uses)f (a)h(lo)s(cal)i(con)m(v)m(en)m(tion,)227 1784 y(sho)m(wn)d(in)g(the)g (follo)m(wing)i(example,)g(in)e(whic)m(h)g(the)h(k)m(eyw)m(ord)f(units) g(are)h(enclosed)g(in)f(square)g(brac)m(k)m(ets)h(in)227 1896 y(the)k(b)s(eginning)f(of)h(the)g(k)m(eyw)m(ord)g(commen)m(t)g (\014eld.)40 b(A)30 b(n)m(ull)g(string)f(is)h(returned)e(if)i(no)f (units)g(are)h(de\014ned)227 2009 y(for)g(the)h(k)m(eyw)m(ord.)239 2228 y Fe(VELOCITY=)809 b(12.3)46 b(/)i([km/s])e(orbital)g(speed)95 2454 y(int)h(fits_read_key_unit)c(/)48 b(ffgunt)286 2567 y(\(fitsfile)e(*fptr,)g(char)g(*keyname,)g(>)h(char)g(*unit,)f(int)h (*status\))0 2786 y Fi(6)81 b Fj(Concatenate)39 b(the)f(header)f(k)m (eyw)m(ords)h(in)g(the)f(CHDU)h(in)m(to)h(a)f(single)g(long)g(string)g (of)g(c)m(haracters.)64 b(This)227 2899 y(pro)m(vides)28 b(a)h(con)m(v)m(enien)m(t)h(w)m(a)m(y)f(of)g(passing)f(all)h(or)f(part) g(of)g(the)h(header)f(information)g(in)g(a)h(FITS)e(HDU)i(to)227 3012 y(other)i(subroutines.)39 b(Eac)m(h)31 b(80-c)m(haracter)h (\014xed-length)f(k)m(eyw)m(ord)f(record)g(is)g(app)s(ended)e(to)j(the) f(output)227 3125 y(c)m(haracter)j(string,)f(in)f(order,)g(with)g(no)g (in)m(terv)m(ening)i(separator)f(or)f(terminating)h(c)m(haracters.)45 b(The)31 b(last)227 3238 y(header)e(record)g(is)g(terminated)h(with)f (a)g(NULL)g(c)m(haracter.)42 b(These)29 b(routine)g(allo)s(cates)j (memory)d(for)g(the)227 3351 y(returned)k(c)m(haracter)j(arra)m(y)-8 b(,)37 b(so)d(the)h(calling)h(program)e(m)m(ust)g(free)g(the)h(memory)f (when)f(\014nished.)51 b(The)227 3464 y(cleanest)32 b(w)m(a)m(y)g(to)f (do)f(this)g(is)h(to)g(call)g(the)g(\014ts)p 1823 3464 V 32 w(free)p 1999 3464 V 33 w(memory)g(routine.)227 3607 y(There)38 b(are)h(2)g(related)g(routines:)57 b(\014ts)p 1581 3607 V 32 w(hdr2str)37 b(simply)h(concatenates)j(all)f(the)e (existing)i(k)m(eyw)m(ords)e(in)227 3720 y(the)44 b(header;)51 b(\014ts)p 863 3720 V 33 w(con)m(v)m(ert)p 1185 3720 V 34 w(hdr2str)43 b(is)h(similar,)k(except)d(that)f(if)g(the)g(CHDU)h (is)f(a)g(tile)h(compressed)227 3833 y(image)c(\(stored)f(in)f(a)h (binary)e(table\))j(then)e(it)h(will)f(\014rst)g(con)m(v)m(ert)i(that)f (header)f(bac)m(k)h(to)g(that)g(of)g(the)227 3946 y(corresp)s(onding)30 b(normal)g(FITS)g(image)h(b)s(efore)f(concatenating)j(the)e(k)m(eyw)m (ords.)227 4089 y(Selected)f(k)m(eyw)m(ords)e(ma)m(y)h(b)s(e)e (excluded)h(from)g(the)g(returned)f(c)m(haracter)j(string.)40 b(If)27 b(the)i(second)f(param-)227 4202 y(eter)h(\(no)s(commen)m(ts\)) g(is)f(TR)m(UE)g(\(nonzero\))h(then)e(an)m(y)i(COMMENT,)f(HISTOR)-8 b(Y,)27 b(or)h(blank)g(k)m(eyw)m(ords)227 4315 y(in)i(the)h(header)f (will)h(not)f(b)s(e)g(copied)h(to)g(the)g(output)f(string.)227 4458 y(The)25 b('exclist')j(parameter)e(ma)m(y)g(b)s(e)f(used)g(to)h (supply)e(a)i(list)h(of)e(k)m(eyw)m(ords)h(that)h(are)f(to)g(b)s(e)f (excluded)g(from)227 4571 y(the)k(output)g(c)m(haracter)h(string.)41 b(Wild)29 b(card)g(c)m(haracters)h(\(*,)g(?,)f(and)g(#\))g(ma)m(y)g(b)s (e)f(used)g(in)h(the)g(excluded)227 4684 y(k)m(eyw)m(ord)h(names.)41 b(If)29 b(no)g(additional)i(k)m(eyw)m(ords)f(are)g(to)g(b)s(e)f (excluded,)h(then)f(set)h(nexc)g(=)f(0)h(and)f(sp)s(ecify)227 4797 y(NULL)i(for)f(the)g(the)h(**exclist)i(parameter.)95 5016 y Fe(int)47 b(fits_hdr2str)e(/)i(ffhdr2str)286 5129 y(\(fitsfile)f(*fptr,)g(int)h(nocomments,)d(char)j(**exclist,)e(int)i (nexc,)286 5242 y(>)h(char)e(**header,)g(int)h(*nkeys,)e(int)i (*status\))95 5468 y(int)g(fits_convert_hdr2str)c(/)k(ffcnvthdr2str)286 5581 y(\(fitsfile)f(*fptr,)g(int)h(nocomments,)d(char)j(**exclist,)e (int)i(nexc,)286 5694 y(>)h(char)e(**header,)g(int)h(*nkeys,)e(int)i (*status\))p eop end %%Page: 38 46 TeXDict begin 38 45 bop 0 299 a Fj(38)1379 b Fh(CHAPTER)30 b(5.)71 b(BASIC)30 b(CFITSIO)f(INTERF)-10 b(A)m(CE)30 b(R)m(OUTINES)0 555 y Fd(5.4.2)112 b(Keyw)m(ord)38 b(W)-9 b(riting)37 b(Routines)0 775 y Fi(1)81 b Fj(W)-8 b(rite)32 b(a)g(k)m(eyw)m(ord)g(of)f(the)h(appropriate)f(data)h(t)m(yp)s(e)g(in)m (to)g(the)g(CHU.)f(The)g(\014rst)g(routine)g(simply)g(app)s(ends)227 888 y(a)j(new)f(k)m(eyw)m(ord)h(whereas)f(the)g(second)h(routine)f (will)h(up)s(date)e(the)i(v)-5 b(alue)33 b(and)g(commen)m(t)h(\014elds) f(of)h(the)227 1001 y(k)m(eyw)m(ord)g(if)g(it)g(already)g(exists,)h (otherwise)f(it)g(app)s(ends)e(a)i(new)f(k)m(eyw)m(ord.)51 b(Note)35 b(that)f(the)g(address)e(to)227 1114 y(the)37 b(v)-5 b(alue,)38 b(and)d(not)i(the)f(v)-5 b(alue)36 b(itself,)j(m)m(ust)d(b)s(e)f(en)m(tered.)59 b(The)35 b(datat)m(yp)s(e)i(parameter)g(sp)s(eci\014es)f(the)227 1227 y(data)25 b(t)m(yp)s(e)f(of)g(the)g(k)m(eyw)m(ord)g(v)-5 b(alue)25 b(with)e(one)h(of)g(the)g(follo)m(wing)i(v)-5 b(alues:)37 b(TSTRING,)23 b(TLOGICAL)g(\(==)227 1340 y(in)m(t\),)38 b(TBYTE,)d(TSHOR)-8 b(T,)34 b(TUSHOR)-8 b(T,)35 b(TINT,)f(TUINT,)h(TLONG,)g(TLONGLONG,)g(TULONG,)227 1452 y(TFLO)m(A)-8 b(T,)24 b(TDOUBLE.)f(Within)h(the)f(con)m(text)i(of) f(this)f(routine,)i(TSTRING)d(corresp)s(onds)g(to)i(a)g('c)m(har*')227 1565 y(data)j(t)m(yp)s(e,)h(i.e.,)g(a)f(p)s(oin)m(ter)f(to)i(a)e(c)m (haracter)i(arra)m(y)-8 b(.)41 b(A)26 b(n)m(ull)g(p)s(oin)m(ter)h(ma)m (y)g(b)s(e)e(en)m(tered)i(for)f(the)h(commen)m(t)227 1678 y(parameter)k(in)f(whic)m(h)g(case)i(the)e(k)m(eyw)m(ord)h(commen) m(t)h(\014eld)d(will)i(b)s(e)f(unmo)s(di\014ed)e(or)j(left)g(blank.)95 1953 y Fe(int)47 b(fits_write_key)d(/)k(ffpky)286 2066 y(\(fitsfile)e(*fptr,)g(int)h(datatype,)e(char)i(*keyname,)e(DTYPE)h (*value,)477 2179 y(char)h(*comment,)e(>)j(int)f(*status\))95 2404 y(int)g(fits_update_key)d(/)j(ffuky)286 2517 y(\(fitsfile)f (*fptr,)g(int)h(datatype,)e(char)i(*keyname,)e(DTYPE)h(*value,)477 2630 y(char)h(*comment,)e(>)j(int)f(*status\))0 2905 y Fi(2)81 b Fj(W)-8 b(rite)44 b(a)g(k)m(eyw)m(ord)f(with)g(a)h(n)m(ull) f(or)g(unde\014ned)e(v)-5 b(alue)43 b(\(i.e.,)48 b(the)c(v)-5 b(alue)43 b(\014eld)g(in)g(the)g(k)m(eyw)m(ord)h(is)f(left)227 3018 y(blank\).)70 b(The)40 b(\014rst)f(routine)h(simply)g(app)s(ends)e (a)j(new)e(k)m(eyw)m(ord)i(whereas)f(the)g(second)g(routine)h(will)227 3130 y(up)s(date)27 b(the)h(v)-5 b(alue)29 b(and)e(commen)m(t)i (\014elds)e(of)h(the)g(k)m(eyw)m(ord)g(if)g(it)g(already)h(exists,)g (otherwise)f(it)h(app)s(ends)227 3243 y(a)g(new)g(k)m(eyw)m(ord.)40 b(A)29 b(n)m(ull)g(p)s(oin)m(ter)g(ma)m(y)g(b)s(e)g(en)m(tered)g(for)g (the)g(commen)m(t)g(parameter)h(in)e(whic)m(h)h(case)h(the)227 3356 y(k)m(eyw)m(ord)h(commen)m(t)h(\014eld)d(will)i(b)s(e)f(unmo)s (di\014ed)e(or)j(left)g(blank.)95 3631 y Fe(int)47 b (fits_write_key_null)c(/)k(ffpkyu)286 3744 y(\(fitsfile)f(*fptr,)g (char)g(*keyname,)g(char)g(*comment,)g(>)h(int)g(*status\))95 3970 y(int)g(fits_update_key_null)c(/)k(ffukyu)286 4082 y(\(fitsfile)f(*fptr,)g(char)g(*keyname,)g(char)g(*comment,)g(>)h(int)g (*status\))0 4357 y Fi(3)81 b Fj(W)-8 b(rite)40 b(\(app)s(end\))e(a)h (COMMENT)g(or)g(HISTOR)-8 b(Y)38 b(k)m(eyw)m(ord)i(to)f(the)g(CHU.)h (The)e(commen)m(t)i(or)f(history)227 4470 y(string)31 b(will)f(b)s(e)g(con)m(tin)m(ued)h(o)m(v)m(er)h(m)m(ultiple)f(k)m(eyw)m (ords)g(if)f(it)h(is)f(longer)h(than)f(70)i(c)m(haracters.)95 4744 y Fe(int)47 b(fits_write_comment)c(/)48 b(ffpcom)286 4857 y(\(fitsfile)e(*fptr,)g(char)g(*comment,)g(>)h(int)g(*status\))95 5083 y(int)g(fits_write_history)c(/)48 b(ffphis)286 5196 y(\(fitsfile)e(*fptr,)g(char)g(*history,)g(>)h(int)g(*status\))0 5470 y Fi(4)81 b Fj(W)-8 b(rite)29 b(the)g(D)m(A)-8 b(TE)29 b(k)m(eyw)m(ord)g(to)g(the)g(CHU.)f(The)g(k)m(eyw)m(ord)h(v)-5 b(alue)29 b(will)f(con)m(tain)i(the)f(curren)m(t)f(system)g(date)227 5583 y(as)k(a)g(c)m(haracter)h(string)e(in)g('yyyy-mm-ddThh:mm:ss')e (format.)44 b(If)31 b(a)h(D)m(A)-8 b(TE)32 b(k)m(eyw)m(ord)g(already)g (exists)227 5696 y(in)c(the)f(header,)i(then)e(this)g(routine)h(will)g (simply)f(up)s(date)g(the)h(k)m(eyw)m(ord)g(v)-5 b(alue)28 b(with)f(the)h(curren)m(t)g(date.)p eop end %%Page: 39 47 TeXDict begin 39 46 bop 0 299 a Fh(5.4.)72 b(HEADER)31 b(KEYW)m(ORD)g(READ/WRITE)g(R)m(OUTINES)1495 b Fj(39)95 555 y Fe(int)47 b(fits_write_date)d(/)j(ffpdat)286 668 y(\(fitsfile)f(*fptr,)g(>)h(int)g(*status\))0 930 y Fi(5)81 b Fj(W)-8 b(rite)34 b(a)g(user)f(sp)s(eci\014ed)g(k)m(eyw)m(ord)h (record)f(in)m(to)h(the)g(CHU.)g(This)e(is)i(a)g(lo)m(w{lev)m(el)i (routine)e(whic)m(h)f(can)h(b)s(e)227 1043 y(used)f(to)h(write)f(an)m (y)h(arbitrary)f(record)g(in)m(to)i(the)e(header.)50 b(The)32 b(record)i(m)m(ust)f(conform)g(to)h(the)g(all)g(the)227 1156 y(FITS)c(format)h(requiremen)m(ts.)95 1418 y Fe(int)47 b(fits_write_record)c(/)48 b(ffprec)286 1531 y(\(fitsfile)e(*fptr,)g (char)g(*card,)g(>)i(int)f(*status\))0 1793 y Fi(6)81 b Fj(Up)s(date)34 b(an)g(80-c)m(haracter)j(record)e(in)f(the)g(CHU.)h (If)f(a)h(k)m(eyw)m(ord)f(with)h(the)f(input)g(name)g(already)h (exists,)227 1906 y(then)e(it)h(is)f(o)m(v)m(erwritten)h(b)m(y)f(the)g (v)-5 b(alue)34 b(of)f(card.)49 b(This)32 b(could)h(mo)s(dify)f(the)i (k)m(eyw)m(ord)f(name)g(as)h(w)m(ell)g(as)227 2019 y(the)c(v)-5 b(alue)30 b(and)e(commen)m(t)j(\014elds.)40 b(If)29 b(the)g(k)m(eyw)m (ord)h(do)s(esn't)f(already)h(exist)g(then)g(a)f(new)g(k)m(eyw)m(ord)h (card)227 2132 y(is)h(app)s(ended)d(to)j(the)g(header.)95 2394 y Fe(int)47 b(fits_update_card)d(/)j(ffucrd)286 2507 y(\(fitsfile)f(*fptr,)g(char)g(*keyname,)g(char)g(*card,)g(>)i (int)f(*status\))0 2769 y Fi(7)81 b Fj(Mo)s(dify)30 b(\(o)m(v)m (erwrite\))i(the)f(commen)m(t)g(\014eld)f(of)h(an)f(existing)h(k)m(eyw) m(ord.)95 3031 y Fe(int)47 b(fits_modify_comment)c(/)k(ffmcom)286 3144 y(\(fitsfile)f(*fptr,)g(char)g(*keyname,)g(char)g(*comment,)g(>)h (int)g(*status\))0 3406 y Fi(8)81 b Fj(W)-8 b(rite)33 b(the)f(ph)m(ysical)h(units)f(string)g(in)m(to)h(an)f(existing)h(k)m (eyw)m(ord.)46 b(This)32 b(routine)g(uses)g(a)g(lo)s(cal)i(con)m(v)m (en)m(tion,)227 3519 y(sho)m(wn)e(in)g(the)h(follo)m(wing)h(example,)g (in)e(whic)m(h)g(the)h(k)m(eyw)m(ord)g(units)f(are)h(enclosed)g(in)f (square)g(brac)m(k)m(ets)227 3632 y(in)e(the)h(b)s(eginning)f(of)g(the) h(k)m(eyw)m(ord)g(commen)m(t)g(\014eld.)239 3894 y Fe(VELOCITY=)809 b(12.3)46 b(/)i([km/s])e(orbital)g(speed)95 4120 y(int)h (fits_write_key_unit)c(/)k(ffpunt)286 4233 y(\(fitsfile)f(*fptr,)g (char)g(*keyname,)g(char)g(*unit,)g(>)i(int)f(*status\))0 4495 y Fi(9)81 b Fj(Rename)30 b(an)h(existing)g(k)m(eyw)m(ord,)g (preserving)f(the)g(curren)m(t)h(v)-5 b(alue)30 b(and)g(commen)m(t)i (\014elds.)95 4757 y Fe(int)47 b(fits_modify_name)d(/)j(ffmnam)286 4870 y(\(fitsfile)f(*fptr,)g(char)g(*oldname,)g(char)g(*newname,)g(>)h (int)g(*status\))0 5132 y Fi(10)f Fj(Delete)37 b(a)e(k)m(eyw)m(ord)g (record.)54 b(The)34 b(space)i(o)s(ccupied)e(b)m(y)h(the)g(k)m(eyw)m (ord)g(is)g(reclaimed)h(b)m(y)e(mo)m(ving)i(all)g(the)227 5245 y(follo)m(wing)e(header)f(records)f(up)g(one)h(ro)m(w)f(in)h(the)f (header.)48 b(The)32 b(\014rst)g(routine)g(deletes)i(a)f(k)m(eyw)m(ord) g(at)h(a)227 5357 y(sp)s(eci\014ed)23 b(p)s(osition)h(in)g(the)g (header)f(\(the)i(\014rst)e(k)m(eyw)m(ord)h(is)g(at)g(p)s(osition)g (1\),)i(whereas)e(the)g(second)g(routine)227 5470 y(deletes)30 b(a)f(sp)s(eci\014cally)g(named)f(k)m(eyw)m(ord.)41 b(Wild)29 b(card)f(c)m(haracters)i(ma)m(y)f(b)s(e)f(used)g(when)f(sp)s(ecifying)i (the)227 5583 y(name)23 b(of)g(the)f(k)m(eyw)m(ord)h(to)h(b)s(e)e (deleted.)38 b(The)22 b(third)g(routine)h(deletes)g(the)g(\(next\))h(k) m(eyw)m(ord)f(that)g(con)m(tains)227 5696 y(the)31 b(literal)h(c)m (haracter)g(string)e(sp)s(eci\014ed)g(b)m(y)g(the)h('string')f(argumen) m(t.)p eop end %%Page: 40 48 TeXDict begin 40 47 bop 0 299 a Fj(40)1379 b Fh(CHAPTER)30 b(5.)71 b(BASIC)30 b(CFITSIO)f(INTERF)-10 b(A)m(CE)30 b(R)m(OUTINES)95 555 y Fe(int)47 b(fits_delete_record)c(/)48 b(ffdrec)286 668 y(\(fitsfile)e(*fptr,)g(int)142 b(keynum,)94 b(>)47 b(int)g(*status\))95 894 y(int)g(fits_delete_key)d(/)j(ffdkey) 286 1007 y(\(fitsfile)f(*fptr,)g(char)g(*keyname,)g(>)h(int)g (*status\))95 1233 y(int)g(fits_delete_str)d(/)j(ffdstr)286 1346 y(\(fitsfile)f(*fptr,)g(char)g(*string,)g(>)h(int)g(*status\))0 1678 y Ff(5.5)135 b(Primary)46 b(Arra)l(y)f(or)g(IMA)l(GE)f(Extension)i (I/O)f(Routines)0 1929 y Fj(These)22 b(routines)g(read)h(or)f(write)h (data)g(v)-5 b(alues)23 b(in)f(the)g(primary)g(data)h(arra)m(y)g (\(i.e.,)j(the)c(\014rst)g(HDU)h(in)f(a)h(FITS)e(\014le\))0 2042 y(or)32 b(an)g(IMA)m(GE)h(extension.)47 b(There)31 b(are)i(also)g(routines)f(to)h(get)g(information)f(ab)s(out)g(the)g (data)h(t)m(yp)s(e)g(and)e(size)0 2154 y(of)c(the)g(image.)41 b(Users)27 b(should)f(also)i(read)f(the)g(follo)m(wing)h(c)m(hapter)g (on)f(the)g(CFITSIO)e(iterator)k(function)d(whic)m(h)0 2267 y(pro)m(vides)33 b(a)h(more)f(`ob)5 b(ject)35 b(orien)m(ted')f (metho)s(d)f(of)g(reading)g(and)g(writing)g(images.)51 b(The)32 b(iterator)j(function)e(is)0 2380 y(a)e(little)i(more)e (complicated)h(to)g(use,)f(but)f(the)h(adv)-5 b(an)m(tages)32 b(are)f(that)h(it)f(usually)g(tak)m(es)h(less)f(co)s(de)g(to)g(p)s (erform)0 2493 y(the)37 b(same)f(op)s(eration,)j(and)c(the)i(resulting) f(program)g(often)h(runs)e(faster)i(b)s(ecause)f(the)g(FITS)g(\014les)g (are)h(read)0 2606 y(and)30 b(written)g(using)g(the)h(most)f(e\016cien) m(t)i(blo)s(c)m(k)f(size.)0 2766 y(C)25 b(programmers)h(should)f(note)h (that)g(the)h(ordering)e(of)h(arra)m(ys)g(in)g(FITS)f(\014les,)i(and)e (hence)h(in)g(all)g(the)g(CFITSIO)0 2879 y(calls,)40 b(is)d(more)g(similar)h(to)f(the)h(dimensionalit)m(y)g(of)f(arra)m(ys)g (in)g(F)-8 b(ortran)38 b(rather)f(than)f(C.)h(F)-8 b(or)38 b(instance)g(if)f(a)0 2992 y(FITS)28 b(image)i(has)e(NAXIS1)h(=)f(100)i (and)e(NAXIS2)h(=)f(50,)i(then)e(a)h(2-D)h(arra)m(y)f(just)f(large)i (enough)e(to)i(hold)e(the)0 3105 y(image)k(should)d(b)s(e)h(declared)h (as)f(arra)m(y[50][100])k(and)c(not)h(as)f(arra)m(y[100][50].)0 3265 y(The)h(`datat)m(yp)s(e')h(parameter)g(sp)s(eci\014es)e(the)i (data)g(t)m(yp)s(e)f(of)g(the)g(`n)m(ulv)-5 b(al')32 b(and)f(`arra)m(y')h(p)s(oin)m(ters)f(and)f(can)i(ha)m(v)m(e)0 3378 y(one)h(of)g(the)g(follo)m(wing)h(v)-5 b(alues:)46 b(TBYTE,)33 b(TSBYTE,)f(TSHOR)-8 b(T,)32 b(TUSHOR)-8 b(T,)32 b(TINT,)h(TUINT,)f(TLONG,)0 3491 y(TLONGLONG,)26 b(TULONG,)g(TFLO)m(A)-8 b(T,)27 b(TDOUBLE.)f(Automatic)i(data)f(t)m(yp) s(e)g(con)m(v)m(ersion)g(is)f(p)s(erformed)f(if)0 3604 y(the)j(data)h(t)m(yp)s(e)f(of)f(the)i(FITS)e(arra)m(y)h(\(as)g (de\014ned)f(b)m(y)h(the)g(BITPIX)f(k)m(eyw)m(ord\))i(di\013ers)e(from) h(that)g(sp)s(eci\014ed)f(b)m(y)0 3717 y('datat)m(yp)s(e'.)54 b(The)34 b(data)h(v)-5 b(alues)35 b(are)f(also)i(automatically)h (scaled)e(b)m(y)f(the)h(BSCALE)f(and)f(BZER)m(O)h(k)m(eyw)m(ord)0 3830 y(v)-5 b(alues)31 b(as)f(they)h(are)g(b)s(eing)f(read)g(or)g (written)h(in)f(the)g(FITS)g(arra)m(y)-8 b(.)0 4084 y Fi(1)81 b Fj(Get)33 b(the)f(data)h(t)m(yp)s(e)f(or)g(equiv)-5 b(alen)m(t)34 b(data)f(t)m(yp)s(e)f(of)g(the)h(image.)47 b(The)32 b(\014rst)f(routine)h(returns)f(the)h(ph)m(ysical)227 4197 y(data)46 b(t)m(yp)s(e)f(of)h(the)f(FITS)f(image,)51 b(as)45 b(giv)m(en)h(b)m(y)f(the)g(BITPIX)g(k)m(eyw)m(ord,)50 b(with)44 b(allo)m(w)m(ed)j(v)-5 b(alues)46 b(of)227 4310 y(BYTE)p 492 4310 28 4 v 33 w(IMG)23 b(\(8\),)i(SHOR)-8 b(T)p 1215 4310 V 32 w(IMG)23 b(\(16\),)i(LONG)p 1934 4310 V 33 w(IMG)e(\(32\),)i(LONGLONG)p 2921 4310 V 33 w(IMG)e(\(64\),)i(FLO)m(A)-8 b(T)p 3684 4310 V 33 w(IMG)227 4423 y(\(-32\),)31 b(and)c(DOUBLE)p 1043 4423 V 33 w(IMG)h(\(-64\).)42 b(The)27 b(second)h(routine)f(is)h(similar,)h(except)g(that)f(if)g(the) g(image)h(pixel)227 4536 y(v)-5 b(alues)33 b(are)g(scaled,)g(with)f (non-default)h(v)-5 b(alues)32 b(for)g(the)h(BZER)m(O)f(and)g(BSCALE)f (k)m(eyw)m(ords,)j(then)e(the)227 4649 y(routine)j(will)g(return)e(the) i('equiv)-5 b(alen)m(t')36 b(data)f(t)m(yp)s(e)g(that)g(is)f(needed)h (to)g(store)g(the)g(scaled)g(v)-5 b(alues.)53 b(F)-8 b(or)227 4762 y(example,)29 b(if)e(BITPIX)g(=)g(16)h(and)f(BSCALE)f(=)h (0.1)h(then)f(the)h(equiv)-5 b(alen)m(t)28 b(data)g(t)m(yp)s(e)g(is)f (FLO)m(A)-8 b(T)p 3659 4762 V 33 w(IMG.)227 4875 y(Similarly)25 b(if)f(BITPIX)g(=)g(16,)i(BSCALE)e(=)g(1,)i(and)d(BZER)m(O)h(=)g (32768,)k(then)c(the)g(the)h(pixel)f(v)-5 b(alues)25 b(span)227 4987 y(the)31 b(range)g(of)f(an)g(unsigned)g(short)g(in)m (teger)h(and)f(the)h(returned)e(data)i(t)m(yp)s(e)g(will)f(b)s(e)g (USHOR)-8 b(T)p 3572 4987 V 32 w(IMG.)95 5242 y Fe(int)47 b(fits_get_img_type)c(/)48 b(ffgidt)286 5355 y(\(fitsfile)e(*fptr,)g(>) h(int)g(*bitpix,)f(int)h(*status\))95 5581 y(int)g (fits_get_img_equivtype)42 b(/)48 b(ffgiet)286 5694 y(\(fitsfile)e (*fptr,)g(>)h(int)g(*bitpix,)f(int)h(*status\))p eop end %%Page: 41 49 TeXDict begin 41 48 bop 0 299 a Fh(5.5.)72 b(PRIMAR)-8 b(Y)31 b(ARRA)-8 b(Y)31 b(OR)f(IMA)m(GE)h(EXTENSION)f(I/O)g(R)m (OUTINES)1011 b Fj(41)0 555 y Fi(2)81 b Fj(Get)34 b(the)g(n)m(um)m(b)s (er)e(of)i(dimensions,)g(and/or)g(the)g(size)g(of)g(eac)m(h)h (dimension)e(in)g(the)h(image)h(.)50 b(The)33 b(n)m(um)m(b)s(er)227 668 y(of)h(axes)f(in)g(the)g(image)i(is)e(giv)m(en)h(b)m(y)f(naxis,)h (and)f(the)g(size)h(of)f(eac)m(h)i(dimension)d(is)h(giv)m(en)h(b)m(y)f (the)h(naxes)227 781 y(arra)m(y)d(\(a)g(maxim)m(um)g(of)f(maxdim)g (dimensions)g(will)g(b)s(e)g(returned\).)95 1036 y Fe(int)47 b(fits_get_img_dim)d(/)j(ffgidm)286 1149 y(\(fitsfile)f(*fptr,)g(>)h (int)g(*naxis,)f(int)h(*status\))95 1375 y(int)g(fits_get_img_size)c(/) 48 b(ffgisz)286 1488 y(\(fitsfile)e(*fptr,)g(int)h(maxdim,)e(>)j(long)f (*naxes,)e(int)i(*status\))95 1714 y(int)g(fits_get_img_sizell)c(/)k (ffgiszll)286 1827 y(\(fitsfile)f(*fptr,)g(int)h(maxdim,)e(>)j (LONGLONG)d(*naxes,)h(int)h(*status\))95 2052 y(int)g (fits_get_img_param)c(/)48 b(ffgipr)286 2165 y(\(fitsfile)e(*fptr,)g (int)h(maxdim,)e(>)j(int)f(*bitpix,)e(int)i(*naxis,)f(long)h(*naxes,) 334 2278 y(int)g(*status\))95 2504 y(int)g(fits_get_img_paramll)c(/)k (ffgiprll)286 2617 y(\(fitsfile)f(*fptr,)g(int)h(maxdim,)e(>)j(int)f (*bitpix,)e(int)i(*naxis,)f(LONGLONG)g(*naxes,)334 2730 y(int)h(*status\))0 2985 y Fi(3)81 b Fj(Create)23 b(a)f(new)g(primary)f (arra)m(y)i(or)f(IMA)m(GE)i(extension)e(with)g(a)h(sp)s(eci\014ed)f (data)h(t)m(yp)s(e)f(and)g(size.)38 b(If)22 b(the)h(FITS)227 3098 y(\014le)30 b(is)g(curren)m(tly)f(empt)m(y)h(then)g(a)g(primary)f (arra)m(y)h(is)g(created,)h(otherwise)f(a)g(new)f(IMA)m(GE)i(extension) f(is)227 3211 y(app)s(ended)f(to)i(the)g(\014le.)95 3466 y Fe(int)47 b(fits_create_img)d(/)j(ffcrim)286 3579 y(\()h(fitsfile)d (*fptr,)h(int)h(bitpix,)f(int)h(naxis,)f(long)h(*naxes,)f(>)h(int)g (*status\))95 3805 y(int)g(fits_create_imgll)c(/)48 b(ffcrimll)286 3918 y(\()g(fitsfile)d(*fptr,)h(int)h(bitpix,)f(int)h(naxis,)f (LONGLONG)g(*naxes,)g(>)h(int)g(*status\))0 4173 y Fi(4)81 b Fj(Cop)m(y)39 b(an)f(n-dimensional)h(image)h(in)f(a)g(particular)h (ro)m(w)f(and)f(column)h(of)g(a)g(binary)f(table)i(\(in)f(a)g(v)m (ector)227 4286 y(column\))31 b(to)g(or)f(from)g(a)h(primary)e(arra)m (y)i(or)g(image)g(extension.)227 4435 y(The)c('cell2image')k(routine)d (will)g(app)s(end)e(a)i(new)f(image)i(extension)f(\(or)g(primary)f (arra)m(y\))h(to)h(the)e(output)227 4548 y(\014le.)43 b(An)m(y)31 b(W)m(CS)g(k)m(eyw)m(ords)g(asso)s(ciated)h(with)f(the)g (input)f(column)h(image)h(will)f(b)s(e)f(translated)i(in)m(to)g(the)227 4661 y(appropriate)j(form)g(for)g(an)f(image)j(extension.)55 b(An)m(y)35 b(other)g(k)m(eyw)m(ords)g(in)g(the)g(table)h(header)f (that)h(are)227 4774 y(not)28 b(sp)s(eci\014cally)h(related)f(to)h (de\014ning)e(the)g(binary)g(table)i(structure)e(or)h(to)g(other)g (columns)g(in)f(the)h(table)227 4887 y(will)j(also)g(b)s(e)f(copied)h (to)g(the)g(header)f(of)g(the)h(output)f(image.)227 5036 y(The)i('image2cell')k(routine)c(will)h(cop)m(y)g(the)g(input)e(image)j (in)m(to)f(the)g(sp)s(eci\014ed)f(ro)m(w)g(and)g(column)g(of)h(the)227 5149 y(curren)m(t)e(binary)g(table)h(in)f(the)h(output)f(\014le.)44 b(The)31 b(binary)f(table)j(HDU)f(m)m(ust)f(exist)h(b)s(efore)f (calling)i(this)227 5262 y(routine,)h(but)f(it)h(ma)m(y)f(b)s(e)g(empt) m(y)-8 b(,)35 b(with)e(no)g(ro)m(ws)g(or)g(columns)g(of)g(data.)50 b(The)33 b(sp)s(eci\014ed)f(column)h(\(and)227 5375 y(ro)m(w\))e(will)h (b)s(e)e(created)h(if)g(it)g(do)s(es)g(not)g(already)g(exist.)43 b(The)30 b('cop)m(yk)m(ey\015ag')j(parameter)e(con)m(trols)h(whic)m(h) 227 5488 y(k)m(eyw)m(ords)26 b(are)g(copied)g(from)f(the)g(input)g (image)h(to)g(the)g(header)f(of)h(the)f(output)g(table:)39 b(0)26 b(=)f(no)h(k)m(eyw)m(ords)227 5601 y(will)k(b)s(e)g(copied,)g(1) h(=)e(all)i(k)m(eyw)m(ords)f(will)g(b)s(e)f(copied)h(\(except)i(those)e (k)m(eyw)m(ords)g(that)h(w)m(ould)e(b)s(e)g(in)m(v)-5 b(alid)227 5714 y(in)30 b(the)h(table)g(header\),)g(and)f(2)g(=)g(cop)m (y)i(only)e(the)h(W)m(CS)f(k)m(eyw)m(ords.)p eop end %%Page: 42 50 TeXDict begin 42 49 bop 0 299 a Fj(42)1379 b Fh(CHAPTER)30 b(5.)71 b(BASIC)30 b(CFITSIO)f(INTERF)-10 b(A)m(CE)30 b(R)m(OUTINES)95 555 y Fe(int)47 b(fits_copy_cell2image)286 668 y(\(fitsfile)f(*infptr,)f(fitsfile)h(*outfptr,)f(char)i(*colname,)e (long)i(rownum,)334 781 y(>)h(int)e(*status\))95 1007 y(int)h(fits_copy_image2cell)286 1120 y(\(fitsfile)f(*infptr,)f (fitsfile)h(*outfptr,)f(char)i(*colname,)e(long)i(rownum,)334 1233 y(int)g(copykeyflag)e(>)i(int)g(*status\))0 1474 y Fi(5)81 b Fj(W)-8 b(rite)40 b(a)f(rectangular)g(subimage)g(\(or)g (the)g(whole)g(image\))h(to)f(the)g(FITS)f(data)h(arra)m(y)-8 b(.)67 b(The)38 b(fpixel)h(and)227 1587 y(lpixel)30 b(arra)m(ys)g(giv)m (e)h(the)f(co)s(ordinates)g(of)f(the)h(\014rst)f(\(lo)m(w)m(er)i(left)f (corner\))g(and)f(last)h(\(upp)s(er)e(righ)m(t)i(corner\))227 1700 y(pixels)h(in)f(FITS)g(image)h(to)g(b)s(e)f(written)g(to.)95 1941 y Fe(int)47 b(fits_write_subset)c(/)48 b(ffpss)286 2054 y(\(fitsfile)e(*fptr,)g(int)h(datatype,)e(long)i(*fpixel,)e(long)i (*lpixel,)334 2167 y(DTYPE)f(*array,)g(>)i(int)f(*status\))0 2408 y Fi(6)81 b Fj(W)-8 b(rite)39 b(pixels)g(in)m(to)g(the)g(FITS)f (data)h(arra)m(y)-8 b(.)66 b('fpixel')39 b(is)f(an)g(arra)m(y)h(of)g (length)g(NAXIS)f(whic)m(h)g(giv)m(es)i(the)227 2521 y(co)s(ordinate)k(of)f(the)g(starting)g(pixel)g(to)h(b)s(e)e(written)h (to,)j(suc)m(h)d(that)g(fpixel[0])h(is)f(in)f(the)h(range)g(1)g(to)227 2634 y(NAXIS1,)34 b(fpixel[1])f(is)g(in)f(the)g(range)h(1)g(to)g (NAXIS2,)g(etc.)48 b(The)32 b(\014rst)g(pair)g(of)h(routines)f(simply)g (writes)227 2747 y(the)40 b(arra)m(y)g(of)g(pixels)f(to)i(the)e(FITS)g (\014le)h(\(doing)g(data)g(t)m(yp)s(e)g(con)m(v)m(ersion)h(if)e (necessary\))h(whereas)g(the)227 2860 y(second)c(routines)g(will)g (substitute)f(the)h(appropriate)g(FITS)f(n)m(ull)g(v)-5 b(alue)37 b(for)e(an)m(y)h(elemen)m(ts)h(whic)m(h)f(are)227 2973 y(equal)41 b(to)g(the)f(input)g(v)-5 b(alue)40 b(of)h(n)m(ulv)-5 b(al)40 b(\(note)h(that)g(this)f(parameter)h(giv)m(es)h(the)e(address)f (of)i(the)f(n)m(ull)227 3086 y(v)-5 b(alue,)36 b(not)f(the)f(n)m(ull)g (v)-5 b(alue)35 b(itself)7 b(\).)53 b(F)-8 b(or)35 b(in)m(teger)h(FITS) d(arra)m(ys,)j(the)f(FITS)e(n)m(ull)h(v)-5 b(alue)35 b(is)f(de\014ned)f(b)m(y)227 3199 y(the)26 b(BLANK)f(k)m(eyw)m(ord)h (\(an)g(error)f(is)g(returned)f(if)i(the)f(BLANK)h(k)m(eyw)m(ord)g(do)s (esn't)f(exist\).)40 b(F)-8 b(or)26 b(\015oating)227 3312 y(p)s(oin)m(t)g(FITS)f(arra)m(ys)h(the)g(sp)s(ecial)g(IEEE)f(NaN)i (\(Not-a-Num)m(b)s(er\))g(v)-5 b(alue)26 b(will)g(b)s(e)f(written)h(in) m(to)h(the)f(FITS)227 3425 y(\014le.)66 b(If)38 b(a)h(n)m(ull)f(p)s (oin)m(ter)h(is)f(en)m(tered)h(for)g(n)m(ulv)-5 b(al,)41 b(then)d(the)h(n)m(ull)f(v)-5 b(alue)39 b(is)g(ignored)g(and)e(this)i (routine)227 3537 y(b)s(eha)m(v)m(es)31 b(the)g(same)g(as)f(\014ts)p 1189 3537 28 4 v 33 w(write)p 1424 3537 V 33 w(pix.)95 3779 y Fe(int)47 b(fits_write_pix)d(/)k(ffppx)286 3892 y(\(fitsfile)e(*fptr,)g(int)h(datatype,)e(long)i(*fpixel,)e(LONGLONG)h (nelements,)334 4005 y(DTYPE)g(*array,)g(int)h(*status\);)95 4231 y(int)g(fits_write_pixll)d(/)j(ffppxll)286 4343 y(\(fitsfile)f(*fptr,)g(int)h(datatype,)e(LONGLONG)g(*fpixel,)h (LONGLONG)g(nelements,)334 4456 y(DTYPE)g(*array,)g(int)h(*status\);)95 4682 y(int)g(fits_write_pixnull)c(/)48 b(ffppxn)286 4795 y(\(fitsfile)e(*fptr,)g(int)h(datatype,)e(long)i(*fpixel,)e(LONGLONG)h (nelements,)334 4908 y(DTYPE)g(*array,)g(DTYPE)h(*nulval,)e(>)j(int)f (*status\);)95 5134 y(int)g(fits_write_pixnullll)c(/)k(ffppxnll)286 5247 y(\(fitsfile)f(*fptr,)g(int)h(datatype,)e(LONGLONG)g(*fpixel,)h (LONGLONG)g(nelements,)334 5360 y(DTYPE)g(*array,)g(DTYPE)h(*nulval,)e (>)j(int)f(*status\);)0 5601 y Fi(7)81 b Fj(Set)24 b(FITS)g(data)i (arra)m(y)f(elemen)m(ts)h(equal)f(to)g(the)g(appropriate)f(n)m(ull)h (pixel)g(v)-5 b(alue.)39 b(F)-8 b(or)25 b(in)m(teger)h(FITS)e(arra)m (ys,)227 5714 y(the)34 b(FITS)e(n)m(ull)h(v)-5 b(alue)34 b(is)f(de\014ned)f(b)m(y)h(the)h(BLANK)f(k)m(eyw)m(ord)h(\(an)f(error)g (is)g(returned)f(if)h(the)h(BLANK)p eop end %%Page: 43 51 TeXDict begin 43 50 bop 0 299 a Fh(5.5.)72 b(PRIMAR)-8 b(Y)31 b(ARRA)-8 b(Y)31 b(OR)f(IMA)m(GE)h(EXTENSION)f(I/O)g(R)m (OUTINES)1011 b Fj(43)227 555 y(k)m(eyw)m(ord)23 b(do)s(esn't)g (exist\).)39 b(F)-8 b(or)23 b(\015oating)g(p)s(oin)m(t)g(FITS)f(arra)m (ys)g(the)h(sp)s(ecial)g(IEEE)f(NaN)h(\(Not-a-Num)m(b)s(er\))227 668 y(v)-5 b(alue)34 b(will)f(b)s(e)g(written)g(in)m(to)h(the)g(FITS)e (\014le.)49 b(Note)34 b(that)g('\014rstelem')g(is)f(a)h(scalar)g (giving)g(the)f(o\013set)h(to)227 781 y(the)d(\014rst)e(pixel)i(to)g(b) s(e)f(written)g(in)h(the)f(equiv)-5 b(alen)m(t)32 b(1-dimensional)f (arra)m(y)g(of)g(image)g(pixels.)95 1034 y Fe(int)47 b(fits_write_null_img)c(/)k(ffpprn)286 1147 y(\(fitsfile)f(*fptr,)g (LONGLONG)f(firstelem,)g(LONGLONG)h(nelements,)f(>)i(int)g(*status\))0 1399 y Fi(8)81 b Fj(Read)33 b(a)h(rectangular)h(subimage)f(\(or)g(the)g (whole)g(image\))h(from)e(the)h(FITS)f(data)h(arra)m(y)-8 b(.)52 b(The)33 b(fpixel)h(and)227 1512 y(lpixel)c(arra)m(ys)g(giv)m(e) h(the)f(co)s(ordinates)g(of)f(the)h(\014rst)f(\(lo)m(w)m(er)i(left)f (corner\))g(and)f(last)h(\(upp)s(er)e(righ)m(t)i(corner\))227 1625 y(pixels)d(to)h(b)s(e)e(read)h(from)g(the)g(FITS)f(image.)41 b(Unde\014ned)25 b(FITS)h(arra)m(y)i(elemen)m(ts)g(will)f(b)s(e)f (returned)g(with)227 1738 y(a)k(v)-5 b(alue)30 b(=)e(*n)m(ullv)-5 b(al,)31 b(\(note)f(that)g(this)f(parameter)h(giv)m(es)g(the)g(address) e(of)h(the)h(n)m(ull)f(v)-5 b(alue,)30 b(not)g(the)f(n)m(ull)227 1851 y(v)-5 b(alue)36 b(itself)7 b(\))37 b(unless)e(n)m(ulv)-5 b(al)36 b(=)g(0)g(or)f(*n)m(ulv)-5 b(al)37 b(=)e(0,)j(in)d(whic)m(h)g (case)i(no)f(c)m(hec)m(ks)h(for)e(unde\014ned)f(pixels)227 1964 y(will)d(b)s(e)f(p)s(erformed.)95 2216 y Fe(int)47 b(fits_read_subset)d(/)j(ffgsv)286 2329 y(\(fitsfile)f(*fptr,)g(int)94 b(datatype,)46 b(long)g(*fpixel,)g(long)g(*lpixel,)g(long)h(*inc,)334 2442 y(DTYPE)f(*nulval,)g(>)h(DTYPE)g(*array,)f(int)h(*anynul,)e(int)i (*status\))0 2695 y Fi(9)81 b Fj(Read)32 b(pixels)h(from)f(the)g(FITS)g (data)h(arra)m(y)-8 b(.)48 b('fpixel')33 b(is)g(the)f(starting)h(pixel) g(lo)s(cation)h(and)e(is)h(an)f(arra)m(y)h(of)227 2808 y(length)h(NAXIS)f(suc)m(h)g(that)h(fpixel[0])g(is)f(in)g(the)h(range)f (1)h(to)g(NAXIS1,)g(fpixel[1])g(is)g(in)f(the)g(range)h(1)f(to)227 2921 y(NAXIS2,)c(etc.)41 b(The)28 b(nelemen)m(ts)h(parameter)f(sp)s (eci\014es)g(the)g(n)m(um)m(b)s(er)f(of)h(pixels)h(to)g(read.)39 b(If)28 b(fpixel)g(is)g(set)227 3034 y(to)36 b(the)f(\014rst)f(pixel,)j (and)e(nelemen)m(ts)g(is)g(set)h(equal)g(to)f(the)g(NAXIS1)h(v)-5 b(alue,)37 b(then)d(this)h(routine)g(w)m(ould)227 3147 y(read)28 b(the)g(\014rst)f(ro)m(w)h(of)g(the)h(image.)41 b(Alternativ)m(ely)-8 b(,)31 b(if)d(nelemen)m(ts)h(is)f(set)g(equal)h (to)f(NAXIS1)g(*)h(NAXIS2)227 3260 y(then)h(it)h(w)m(ould)f(read)h(an)f (en)m(tire)h(2D)g(image,)h(or)f(the)f(\014rst)g(plane)g(of)h(a)g(3-D)g (datacub)s(e.)227 3409 y(The)38 b(\014rst)g(2)h(routines)f(will)h (return)f(an)m(y)h(unde\014ned)d(pixels)j(in)f(the)h(FITS)e(arra)m(y)i (equal)g(to)h(the)e(v)-5 b(alue)227 3522 y(of)36 b(*n)m(ullv)-5 b(al)36 b(\(note)g(that)g(this)f(parameter)h(giv)m(es)g(the)g(address)e (of)i(the)f(n)m(ull)g(v)-5 b(alue,)37 b(not)f(the)f(n)m(ull)g(v)-5 b(alue)227 3634 y(itself)7 b(\))34 b(unless)d(n)m(ulv)-5 b(al)32 b(=)g(0)g(or)h(*n)m(ulv)-5 b(al)32 b(=)g(0,)h(in)f(whic)m(h)g (case)h(no)f(c)m(hec)m(ks)h(for)f(unde\014ned)e(pixels)i(will)h(b)s(e) 227 3747 y(p)s(erformed.)42 b(The)31 b(second)h(2)f(routines)h(are)f (similar)h(except)g(that)g(an)m(y)g(unde\014ned)d(pixels)i(will)h(ha)m (v)m(e)h(the)227 3860 y(corresp)s(onding)d(n)m(ullarra)m(y)g(elemen)m (t)i(set)f(equal)g(to)g(TR)m(UE)g(\(=)f(1\).)95 4113 y Fe(int)47 b(fits_read_pix)e(/)i(ffgpxv)286 4226 y(\(fitsfile)f (*fptr,)g(int)94 b(datatype,)46 b(long)g(*fpixel,)g(LONGLONG)f (nelements,)334 4339 y(DTYPE)h(*nulval,)g(>)h(DTYPE)g(*array,)f(int)h (*anynul,)e(int)i(*status\))95 4565 y(int)g(fits_read_pixll)d(/)j (ffgpxvll)286 4677 y(\(fitsfile)f(*fptr,)g(int)94 b(datatype,)46 b(LONGLONG)f(*fpixel,)h(LONGLONG)f(nelements,)334 4790 y(DTYPE)h(*nulval,)g(>)h(DTYPE)g(*array,)f(int)h(*anynul,)e(int)i (*status\))95 5016 y(int)g(fits_read_pixnull)c(/)48 b(ffgpxf)286 5129 y(\(fitsfile)e(*fptr,)g(int)94 b(datatype,)46 b(long)g(*fpixel,)g (LONGLONG)f(nelements,)334 5242 y(>)j(DTYPE)e(*array,)g(char)g (*nullarray,)f(int)i(*anynul,)f(int)g(*status\))95 5468 y(int)h(fits_read_pixnullll)c(/)k(ffgpxfll)286 5581 y(\(fitsfile)f (*fptr,)g(int)94 b(datatype,)46 b(LONGLONG)f(*fpixel,)h(LONGLONG)f (nelements,)334 5694 y(>)j(DTYPE)e(*array,)g(char)g(*nullarray,)f(int)i (*anynul,)f(int)g(*status\))p eop end %%Page: 44 52 TeXDict begin 44 51 bop 0 299 a Fj(44)1379 b Fh(CHAPTER)30 b(5.)71 b(BASIC)30 b(CFITSIO)f(INTERF)-10 b(A)m(CE)30 b(R)m(OUTINES)0 555 y Fi(10)46 b Fj(Cop)m(y)36 b(a)g(rectangular)h (section)g(of)g(an)e(image)j(and)d(write)h(it)h(to)f(a)h(new)e(FITS)g (primary)g(image)j(or)e(image)227 668 y(extension.)49 b(The)32 b(new)g(image)i(HDU)g(is)e(app)s(ended)f(to)j(the)f(end)f(of)h (the)g(output)f(\014le;)i(all)g(the)f(k)m(eyw)m(ords)227 781 y(in)39 b(the)f(input)g(image)i(will)f(b)s(e)f(copied)h(to)g(the)g (output)f(image.)66 b(The)38 b(common)h(W)m(CS)g(k)m(eyw)m(ords)g(will) 227 894 y(b)s(e)34 b(up)s(dated)f(if)i(necessary)g(to)g(corresp)s(ond)e (to)j(the)e(co)s(ordinates)h(of)g(the)g(section.)54 b(The)34 b(format)h(of)g(the)227 1007 y(section)29 b(expression)e(is)g(same)g (as)h(sp)s(ecifying)f(an)g(image)h(section)h(using)d(the)i(extended)f (\014le)g(name)g(syn)m(tax)227 1120 y(\(see)32 b("Image)f(Section")h (in)e(Chapter)g(10\).)42 b(\(Examples:)f("1:100,1:200",)36 b("1:100:2,)d(1:*:2",)g("*,)f(-*"\).)95 1405 y Fe(int)47 b(fits_copy_image_section)42 b(/)47 b(ffcpimg)286 1518 y(\(fitsfile)f(*infptr,)f(fitsfile)h(*outfptr,)f(char)i(*section,)e (int)i(*status\))0 1881 y Ff(5.6)135 b(Image)46 b(Compression)0 2138 y Fj(CFITSIO)29 b(transparen)m(tly)h(supp)s(orts)f(the)h(2)h (metho)s(ds)f(of)g(image)i(compression)e(describ)s(ed)g(b)s(elo)m(w.)0 2298 y(1\))45 b(The)f(en)m(tire)i(FITS)e(\014le)h(ma)m(y)g(b)s(e)f (externally)i(compressed)e(with)g(the)h(gzip)g(or)g(Unix)f(compress)h (utilit)m(y)0 2411 y(programs,)37 b(pro)s(ducing)d(a)j(*.gz)g(or)f(*.Z) g(\014le,)h(resp)s(ectiv)m(ely)-8 b(.)59 b(When)36 b(reading)g (compressed)f(\014les)h(of)g(this)g(t)m(yp)s(e,)0 2524 y(CFITSIO)43 b(\014rst)h(uncompresses)f(the)i(en)m(tire)g(\014le)g(in)m (to)g(memory)g(b)s(efore)f(p)s(erforming)f(the)i(requested)f(read)0 2636 y(op)s(erations.)c(Output)28 b(\014les)g(can)h(b)s(e)f(directly)i (written)e(in)g(the)h(gzip)g(compressed)g(format)g(if)f(the)h(user-sp)s (eci\014ed)0 2749 y(\014lename)35 b(ends)e(with)i(`.gz'.)54 b(In)34 b(this)g(case,)j(CFITSIO)c(initially)j(writes)e(the)h (uncompressed)e(\014le)i(in)f(memory)0 2862 y(and)j(then)g(compresses)g (it)h(and)f(writes)g(it)h(to)g(disk)f(when)f(the)i(FITS)f(\014le)g(is)g (closed,)k(th)m(us)36 b(sa)m(ving)j(user)d(disk)0 2975 y(space.)59 b(Read)36 b(and)g(write)h(access)g(to)g(these)g(compressed) f(FITS)g(\014les)g(is)g(generally)i(quite)e(fast)h(since)g(all)g(the)0 3088 y(I/O)28 b(is)g(p)s(erformed)e(in)i(memory;)h(the)f(main)g (limitation)i(with)e(this)f(tec)m(hnique)i(is)f(that)h(there)f(m)m(ust) g(b)s(e)f(enough)0 3201 y(a)m(v)-5 b(ailable)33 b(memory)d(\(or)h(sw)m (ap)f(space\))h(to)g(hold)f(the)h(en)m(tire)g(uncompressed)e(FITS)h (\014le.)0 3361 y(2\))42 b(CFITSIO)d(also)j(supp)s(orts)d(the)j(FITS)e (tiled)h(image)i(compression)e(con)m(v)m(en)m(tion)i(in)e(whic)m(h)f (the)i(image)g(is)0 3474 y(sub)s(divided)30 b(in)m(to)j(a)f(grid)g(of)g (rectangular)i(tiles,)f(and)f(eac)m(h)h(tile)g(of)g(pixels)f(is)g (individually)g(compressed.)45 b(The)0 3587 y(details)33 b(of)f(this)g(FITS)f(compression)h(con)m(v)m(en)m(tion)j(are)d(describ) s(ed)f(at)i(the)f(FITS)f(Supp)s(ort)f(O\016ce)i(w)m(eb)g(site)h(at)0 3700 y(h)m(ttp://\014ts.gsfc.nasa.go)m(v/\014ts)p 1114 3700 28 4 v 37 w(registry)-8 b(.h)m(tml)33 b(Basically)-8 b(,)35 b(the)d(compressed)g(image)h(tiles)f(are)h(stored)e(in)h(ro)m (ws)0 3813 y(of)i(a)h(v)-5 b(ariable)35 b(length)f(arra)m(y)h(column)f (in)f(a)i(FITS)e(binary)g(table,)k(ho)m(w)m(ev)m(er)e(CFITSIO)e (recognizes)i(that)g(this)0 3926 y(binary)i(table)i(extension)f(con)m (tains)h(an)e(image)i(and)e(treats)i(it)f(as)g(if)g(it)g(w)m(ere)g(an)g (IMA)m(GE)g(extension.)64 b(This)0 4039 y(tile-compressed)37 b(format)f(is)f(esp)s(ecially)i(w)m(ell)g(suited)e(for)h(compressing)f (v)m(ery)h(large)h(images)g(b)s(ecause)e(a\))i(the)0 4152 y(FITS)28 b(header)h(k)m(eyw)m(ords)h(remain)f(uncompressed)e(for) i(rapid)g(read)g(access,)h(and)f(b)s(ecause)g(b\))g(it)g(is)h(p)s (ossible)e(to)0 4264 y(extract)f(and)e(uncompress)g(sections)i(of)f (the)g(image)h(without)e(ha)m(ving)i(to)f(uncompress)f(the)h(en)m(tire) g(image.)41 b(This)0 4377 y(format)34 b(is)g(also)h(m)m(uc)m(h)e(more)h (e\013ectiv)m(e)j(in)c(compressing)h(\015oating)h(p)s(oin)m(t)e(images) i(than)f(simply)f(compressing)0 4490 y(the)39 b(image)i(using)d(gzip)i (or)f(compress)g(b)s(ecause)g(it)h(appro)m(ximates)g(the)g(\015oating)g (p)s(oin)m(t)f(v)-5 b(alues)39 b(with)g(scaled)0 4603 y(in)m(tegers)32 b(whic)m(h)e(can)g(then)g(b)s(e)g(compressed)g(more)h (e\016cien)m(tly)-8 b(.)0 4763 y(Curren)m(tly)41 b(CFITSIO)e(supp)s (orts)h(3)h(general)i(purp)s(ose)c(compression)i(algorithms)i(plus)d (one)i(other)f(sp)s(ecial-)0 4876 y(purp)s(ose)31 b(compression)i(tec)m (hnique)h(that)f(is)g(designed)g(for)g(data)g(masks)g(with)g(p)s (ositiv)m(e)h(in)m(teger)g(pixel)f(v)-5 b(alues.)0 4989 y(The)40 b(3)g(general)h(purp)s(ose)e(algorithms)i(are)f(GZIP)-8 b(,)41 b(Rice,)j(and)39 b(HCOMPRESS,)g(and)h(the)g(sp)s(ecial)h(purp)s (ose)0 5102 y(algorithm)32 b(is)g(the)f(IRAF)h(pixel)f(list)h (compression)f(tec)m(hnique)h(\(PLIO\).)g(In)e(principle,)i(an)m(y)f(n) m(um)m(b)s(er)f(of)i(other)0 5215 y(compression)e(algorithms)i(could)e (also)h(b)s(e)f(supp)s(orted)f(b)m(y)h(the)g(FITS)g(tiled)h(image)h (compression)e(con)m(v)m(en)m(tion.)0 5375 y(The)35 b(FITS)g(image)h (can)g(b)s(e)f(sub)s(divided)e(in)m(to)k(an)m(y)f(desired)f (rectangular)h(grid)f(of)h(compression)f(tiles.)57 b(With)0 5488 y(the)32 b(GZIP)-8 b(,)33 b(Rice,)h(and)e(PLIO)f(algorithms,)j (the)e(default)h(is)f(to)h(tak)m(e)h(eac)m(h)g(ro)m(w)e(of)h(the)f (image)i(as)e(a)h(tile.)47 b(The)0 5601 y(HCOMPRESS)25 b(algorithm)i(is)g(inheren)m(tly)f(2-dimensional)h(in)f(nature,)i(so)e (the)h(default)f(in)g(this)g(case)i(is)e(to)h(tak)m(e)0 5714 y(16)h(ro)m(ws)g(of)f(the)h(image)h(p)s(er)d(tile.)41 b(In)27 b(most)h(cases)g(it)g(mak)m(es)h(little)g(di\013erence)f(what)f (tiling)i(pattern)f(is)f(used,)h(so)p eop end %%Page: 45 53 TeXDict begin 45 52 bop 0 299 a Fh(5.6.)72 b(IMA)m(GE)31 b(COMPRESSION)2567 b Fj(45)0 555 y(the)33 b(default)g(tiles)g(are)g (usually)g(adequate.)48 b(In)32 b(the)h(case)g(of)g(v)m(ery)g(small)g (images,)i(it)e(could)g(b)s(e)f(more)g(e\016cien)m(t)0 668 y(to)h(compress)f(the)h(whole)f(image)i(as)e(a)h(single)g(tile.)48 b(Note)34 b(that)f(the)f(image)i(dimensions)d(are)i(not)g(required)e (to)0 781 y(b)s(e)d(an)g(in)m(teger)i(m)m(ultiple)f(of)f(the)h(tile)g (dimensions;)g(if)f(not,)i(then)e(the)g(tiles)i(at)f(the)f(edges)h(of)g (the)f(image)i(will)f(b)s(e)0 894 y(smaller)i(than)f(the)h(other)f (tiles.)0 1054 y(The)41 b(4)g(supp)s(orted)f(image)i(compression)f (algorithms)h(are)g(all)g('loss-less')h(when)d(applied)h(to)h(in)m (teger)h(FITS)0 1167 y(images;)25 b(the)c(pixel)g(v)-5 b(alues)20 b(are)h(preserv)m(ed)f(exactly)j(with)d(no)g(loss)h(of)f (information)h(during)e(the)i(compression)g(and)0 1280 y(uncompression)34 b(pro)s(cess.)54 b(In)34 b(addition,)j(the)e (HCOMPRESS)f(algorithm)i(supp)s(orts)d(a)i('lossy')h(compression)0 1393 y(mo)s(de)41 b(that)h(will)g(pro)s(duce)f(larger)h(amoun)m(t)g(of) g(image)h(compression.)74 b(This)41 b(is)g(ac)m(hiev)m(ed)j(b)m(y)d(sp) s(ecifying)h(a)0 1506 y(non-zero)32 b(v)-5 b(alue)32 b(for)f(the)g(HCOMPRESS)f(\\scale")k(parameter.)44 b(Since)31 b(the)g(amoun)m(t)h(of)g(compression)f(that)h(is)0 1619 y(ac)m(hiev)m(ed)g(dep)s(ends)d(directly)i(on)f(the)h(RMS)f(noise)h(in) f(the)h(image,)h(it)f(is)g(usually)f(more)g(con)m(v)m(en)m(tion)j(to)e (sp)s(ecify)0 1732 y(the)f(HCOMPRESS)e(scale)i(factor)h(relativ)m(e)g (to)f(the)g(RMS)f(noise.)41 b(Setting)30 b(s)f(=)g(2.5)i(means)e(use)g (a)h(scale)h(factor)0 1844 y(that)h(is)f(2.5)i(times)e(the)h (calculated)h(RMS)e(noise)h(in)f(the)g(image)i(tile.)44 b(In)31 b(some)g(cases)h(it)g(ma)m(y)g(b)s(e)f(desirable)g(to)0 1957 y(sp)s(ecify)h(the)g(exact)i(scaling)f(to)g(b)s(e)e(used,)h (instead)h(of)f(sp)s(ecifying)g(it)g(relativ)m(e)j(to)d(the)h (calculated)h(noise)e(v)-5 b(alue.)0 2070 y(This)37 b(ma)m(y)h(b)s(e)f (done)g(b)m(y)h(sp)s(ecifying)f(the)h(negativ)m(e)i(of)d(desired)g (scale)i(v)-5 b(alue)38 b(\(t)m(ypically)i(in)d(the)h(range)g(-2)g(to)0 2183 y(-100\).)0 2343 y(V)-8 b(ery)43 b(high)g(compression)f(factors)i (\(of)f(100)h(or)f(more\))g(can)g(b)s(e)f(ac)m(hiev)m(ed)j(b)m(y)d (using)h(large)g(HCOMPRESS)0 2456 y(scale)31 b(v)-5 b(alues,)31 b(ho)m(w)m(ev)m(er,)h(this)e(can)g(pro)s(duce)f(undesirable)g(\\blo)s (c)m(ky")j(artifacts)f(in)f(the)g(compressed)g(image.)42 b(A)0 2569 y(v)-5 b(ariation)27 b(of)g(the)f(HCOMPRESS)f(algorithm)i (\(called)h(HSCOMPRESS\))c(can)i(b)s(e)g(used)f(in)h(this)g(case)h(to)g (apply)0 2682 y(a)f(small)h(amoun)m(t)f(of)h(smo)s(othing)f(of)g(the)g (image)h(when)e(it)i(is)f(uncompressed)f(to)h(help)g(co)m(v)m(er)i(up)d (these)h(artifacts.)0 2795 y(This)36 b(smo)s(othing)h(is)g(purely)f (cosmetic)j(and)d(do)s(es)h(not)g(cause)g(an)m(y)h(signi\014can)m(t)g (c)m(hange)g(to)f(the)g(image)i(pixel)0 2908 y(v)-5 b(alues.)0 3068 y(Floating)34 b(p)s(oin)m(t)f(FITS)e(images)j(\(whic)m(h)e(ha)m(v) m(e)i(BITPIX)e(=)g(-32)h(or)g(-64\))g(usually)f(con)m(tain)i(to)s(o)f (m)m(uc)m(h)g(\\noise")0 3181 y(in)k(the)g(least)i(signi\014can)m(t)f (bits)f(of)h(the)f(man)m(tissa)h(of)g(the)f(pixel)h(v)-5 b(alues)37 b(to)h(b)s(e)f(e\013ectiv)m(ely)j(compressed)d(with)0 3294 y(an)m(y)d(lossless)g(algorithm.)52 b(Consequen)m(tly)-8 b(,)35 b(\015oating)g(p)s(oin)m(t)e(images)i(are)f(\014rst)f(quan)m (tized)h(in)m(to)h(scaled)g(in)m(teger)0 3407 y(pixel)26 b(v)-5 b(alues)25 b(\(and)g(th)m(us)g(thro)m(wing)h(a)m(w)m(a)m(y)h(m)m (uc)m(h)e(of)h(the)f(noise\))h(b)s(efore)f(b)s(eing)g(compressed)g (with)g(the)h(sp)s(eci\014ed)0 3520 y(algorithm)d(\(either)g(GZIP)-8 b(,)23 b(Rice,)i(or)d(HCOMPRESS\).)f(This)h(tec)m(hnique)h(pro)s(duces) e(m)m(uc)m(h)h(higher)g(compression)0 3633 y(factors)33 b(than)e(simply)g(using)g(the)h(GZIP)g(utilit)m(y)h(to)f(externally)h (compress)f(the)f(whole)h(FITS)f(\014le,)i(but)e(it)h(also)0 3745 y(means)d(that)h(the)g(original)g(\015oating)g(v)-5 b(alue)30 b(pixel)f(v)-5 b(alues)30 b(are)g(not)f(exactly)i(preserv)m (ed.)40 b(When)29 b(done)g(prop)s(erly)-8 b(,)0 3858 y(this)33 b(in)m(teger)h(scaling)f(tec)m(hnique)h(will)f(only)f (discard)h(the)f(insigni\014can)m(t)i(noise)f(while)g(still)g (preserving)f(all)i(the)0 3971 y(real)43 b(information)f(in)g(the)h (image.)77 b(The)42 b(amoun)m(t)g(of)h(precision)f(that)h(is)f (retained)h(in)e(the)i(pixel)f(v)-5 b(alues)43 b(is)0 4084 y(con)m(trolled)37 b(b)m(y)d(the)i("quan)m(tization)h(lev)m(el")g (parameter,)g(q.)54 b(Larger)35 b(v)-5 b(alues)36 b(of)f(q)f(will)i (result)f(in)f(compressed)0 4197 y(images)h(whose)e(pixels)h(more)f (closely)i(matc)m(h)g(the)e(\015oating)i(p)s(oin)m(t)e(pixel)h(v)-5 b(alues,)35 b(but)e(at)h(the)g(same)g(time)g(the)0 4310 y(amoun)m(t)j(of)f(compression)g(that)h(is)f(ac)m(hiev)m(ed)i(will)f(b) s(e)e(reduced.)58 b(Users)36 b(should)f(exp)s(erimen)m(t)i(with)e (di\013eren)m(t)0 4423 y(v)-5 b(alues)25 b(for)g(this)g(parameter)g(to) h(determine)f(the)g(optimal)h(v)-5 b(alue)25 b(that)h(preserv)m(es)f (all)h(the)f(useful)f(information)h(in)0 4536 y(the)k(image,)h(without) f(needlessly)g(preserving)f(all)h(the)g(\\noise")h(whic)m(h)e(will)h(h) m(urt)f(the)h(compression)f(e\016ciency)-8 b(.)0 4696 y(The)38 b(default)g(v)-5 b(alue)38 b(for)g(the)g(quan)m(tization)i (scale)g(factor)f(is)f(16.,)j(whic)m(h)d(means)g(that)g(scaled)h(in)m (teger)h(pixel)0 4809 y(v)-5 b(alues)38 b(will)g(b)s(e)g(quan)m(tized)g (suc)m(h)g(that)g(the)g(di\013erence)h(b)s(et)m(w)m(een)f(adjacen)m(t)h (in)m(teger)h(v)-5 b(alues)38 b(will)g(b)s(e)f(1/16th)0 4922 y(of)e(the)h(noise)f(lev)m(el)i(in)e(the)g(image)h(bac)m(kground.) 55 b(CFITSIO)34 b(uses)g(an)h(optimized)h(algorithm)g(to)g(accurately)0 5035 y(estimate)41 b(the)e(noise)h(in)f(the)g(image.)68 b(As)39 b(an)g(example,)k(if)c(the)g(RMS)g(noise)g(in)g(the)h(bac)m (kground)e(pixels)i(of)0 5148 y(an)35 b(image)h(=)f(32.0,)j(then)d(the) h(spacing)f(b)s(et)m(w)m(een)h(adjacen)m(t)g(scaled)g(in)m(teger)h (pixel)e(v)-5 b(alues)36 b(will)f(equal)h(2.0)g(b)m(y)0 5261 y(default.)63 b(Note)38 b(that)h(the)e(RMS)h(noise)g(is)f(indep)s (enden)m(tly)g(calculated)j(for)d(eac)m(h)i(tile)f(of)g(the)g(image,)j (so)d(the)0 5373 y(resulting)24 b(in)m(teger)i(scaling)f(factor)g(ma)m (y)g(\015uctuate)g(sligh)m(tly)g(for)f(eac)m(h)i(tile.)40 b(In)23 b(some)i(cases)g(it)f(ma)m(y)h(b)s(e)f(desirable)0 5486 y(to)29 b(sp)s(ecify)f(the)h(exact)h(quan)m(tization)h(lev)m(el)f (to)f(b)s(e)f(used,)g(instead)h(of)g(sp)s(ecifying)f(it)h(relativ)m(e)i (to)e(the)g(calculated)0 5599 y(noise)42 b(v)-5 b(alue.)73 b(This)40 b(ma)m(y)i(b)s(e)f(done)f(b)m(y)h(sp)s(ecifying)g(the)h (negativ)m(e)h(of)e(desired)g(quan)m(tization)i(lev)m(el)g(for)e(the)0 5712 y(v)-5 b(alue)29 b(of)h(q.)40 b(In)28 b(the)h(previous)g(example,) h(one)f(could)g(sp)s(ecify)g(q)f(=)h(-2.0)h(so)g(that)f(the)g(quan)m (tized)h(in)m(teger)g(lev)m(els)p eop end %%Page: 46 54 TeXDict begin 46 53 bop 0 299 a Fj(46)1379 b Fh(CHAPTER)30 b(5.)71 b(BASIC)30 b(CFITSIO)f(INTERF)-10 b(A)m(CE)30 b(R)m(OUTINES)0 555 y Fj(di\013er)f(b)m(y)g(2.0.)42 b(Larger)29 b(negativ)m(e)j(v)-5 b(alues)29 b(for)h(q)f(means)g(that)h(the)f(lev)m (els)i(are)f(more)f(coarsely)i(spaced,)f(and)f(will)0 668 y(pro)s(duce)g(higher)h(compression)h(factors.)0 828 y(There)37 b(are)g(2)h(metho)s(ds)e(for)h(sp)s(ecifying)g(all)h (the)g(parameters)f(needed)g(to)h(write)f(a)h(FITS)e(image)j(in)d(the)i (tile)0 941 y(compressed)c(format.)53 b(The)34 b(parameters)h(ma)m(y)g (either)g(b)s(e)e(sp)s(eci\014ed)h(at)h(run)e(time)i(as)g(part)f(of)h (the)f(\014le)h(name)0 1054 y(of)41 b(the)g(output)f(compressed)g(FITS) g(\014le,)k(or)c(the)h(writing)g(program)f(ma)m(y)i(call)g(a)f(set)g (of)g(help)s(er)e(CFITSIO)0 1167 y(subroutines)29 b(that)i(are)g(pro)m (vided)f(for)g(sp)s(ecifying)g(the)h(parameter)g(v)-5 b(alues,)31 b(as)f(describ)s(ed)f(b)s(elo)m(w:)0 1327 y(1\))23 b(A)m(t)g(run)e(time,)k(when)c(sp)s(ecifying)h(the)h(name)f (of)g(the)h(output)f(FITS)f(\014le)i(to)g(b)s(e)e(created,)k(the)e (user)e(can)i(indicate)0 1440 y(that)32 b(images)g(should)e(b)s(e)h (written)g(in)g(tile-compressed)i(format)e(b)m(y)h(enclosing)g(the)f (compression)h(parameters)0 1553 y(in)e(square)g(brac)m(k)m(ets)i (follo)m(wing)g(the)e(ro)s(ot)h(disk)f(\014le)g(name)h(in)f(the)h (follo)m(wing)g(format:)191 1809 y Fe([compress)45 b(NAME)i(T1,T2;)f(q) h(QLEVEL,)f(s)i(HSCALE])0 2064 y Fj(where)191 2320 y Fe(NAME)142 b(=)47 b(algorithm)f(name:)94 b(GZIP,)46 b(Rice,)h(HCOMPRESS,)e(HSCOMPRSS)g(or)i(PLIO)620 2433 y(may)g(be)h(abbreviated)c(to)j(the)g(first)g(letter)f(\(or)h(HS)g(for) g(HSCOMPRESS\))191 2546 y(T1,T2)94 b(=)47 b(tile)g(dimension)e(\(e.g.)i (100,100)f(for)g(square)h(tiles)f(100)h(pixels)f(wide\))191 2659 y(QLEVEL)g(=)h(quantization)e(level)h(for)h(floating)f(point)g (FITS)h(images)191 2772 y(HSCALE)f(=)h(HCOMPRESS)f(scale)g(factor;)g (default)g(=)h(0)h(which)e(is)h(lossless.)0 3027 y Fj(Here)31 b(are)g(a)f(few)h(examples)f(of)h(this)f(extended)h(syn)m(tax:)191 3283 y Fe(myfile.fit[compress])185 b(-)48 b(use)f(the)g(default)e (compression)g(algorithm)g(\(Rice\))1432 3396 y(and)i(the)g(default)e (tile)i(size)g(\(row)f(by)i(row\))191 3622 y(myfile.fit[compress)42 b(GZIP])47 b(-)g(use)g(the)g(specified)e(compression)g(algorithm;)191 3735 y(myfile.fit[compress)d(Rice])238 b(only)46 b(the)h(first)g (letter)f(of)h(the)g(algorithm)191 3848 y(myfile.fit[compress)42 b(PLIO])238 b(name)46 b(is)i(required.)191 3960 y(myfile.fit[compress) 42 b(HCOMP])191 4186 y(myfile.fit[compress)g(R)48 b(100,100])141 b(-)47 b(use)g(Rice)g(and)g(100)g(x)g(100)g(pixel)f(tiles)191 4412 y(myfile.fit[compress)c(R;)48 b(q)f(10.0])f(-)i(quantization)c (level)j(=)g(\(RMS-noise\))e(/)i(10.)191 4525 y(myfile.fit[compress)42 b(HS;)47 b(s)h(2.0])94 b(-)h(HSCOMPRESS)45 b(\(with)i(smoothing\))2005 4638 y(and)f(scale)h(=)g(2.0)g(*)h(RMS-noise)0 4894 y Fj(2\))29 b(Before)g(calling)g(the)f(CFITSIO)e(routine)i(to)h(write)f (the)g(image)h(header)f(k)m(eyw)m(ords)g(\(e.g.,)j(\014ts)p 3335 4894 28 4 v 32 w(create)p 3603 4894 V 34 w(image\))0 5007 y(the)37 b(programmer)g(can)g(call)i(the)e(routines)g(describ)s (ed)f(b)s(elo)m(w)h(to)h(sp)s(ecify)f(the)g(compression)g(algorithm)i (and)0 5119 y(the)g(tiling)h(pattern)f(that)g(is)g(to)g(b)s(e)f(used.) 65 b(There)38 b(are)i(routines)e(for)h(sp)s(ecifying)f(the)h(v)-5 b(arious)39 b(compression)0 5232 y(parameters)31 b(and)e(similar)i (routines)f(to)i(return)d(the)h(curren)m(t)h(v)-5 b(alues)30 b(of)h(the)f(parameters:)95 5488 y Fe(int)47 b (fits_set_compression_type\()o(fit)o(sfil)o(e)42 b(*fptr,)k(int)h (comptype,)e(int)i(*status\))95 5601 y(int)g (fits_set_tile_dim\(fitsfile)41 b(*fptr,)46 b(int)h(ndim,)f(long)h (*tilesize,)e(int)i(*status\))95 5714 y(int)g (fits_set_quantize_level\(fi)o(tsf)o(ile)41 b(*fptr,)46 b(float)h(qlevel,)f(int)h(*status\))p eop end %%Page: 47 55 TeXDict begin 47 54 bop 0 299 a Fh(5.6.)72 b(IMA)m(GE)31 b(COMPRESSION)2567 b Fj(47)95 555 y Fe(int)47 b (fits_set_hcomp_scale\(fitsf)o(ile)41 b(*fptr,)46 b(float)h(scale,)f (int)h(*status\))95 668 y(int)g(fits_set_hcomp_smooth\(fits)o(fil)o(e) 42 b(*fptr,)k(int)h(smooth,)f(int)h(*status\))668 781 y(Set)g(smooth)f(=)i(1)f(to)g(apply)g(smoothing)e(when)i(uncompressing) d(the)j(image)95 1007 y(int)g(fits_get_compression_type\()o(fit)o(sfil) o(e)42 b(*fptr,)k(int)h(*comptype,)e(int)i(*status\))95 1120 y(int)g(fits_get_tile_dim\(fitsfile)41 b(*fptr,)46 b(int)h(ndim,)f(long)h(*tilesize,)e(int)i(*status\))95 1233 y(int)g(fits_get_quantize_level\(fi)o(tsf)o(ile)41 b(*fptr,)46 b(float)h(*level,)f(int)h(*status\))95 1346 y(int)g(fits_get_hcomp_scale\(fitsf)o(ile)41 b(*fptr,)46 b(float)h(*scale,)e(int)i(*status\))95 1458 y(int)g (fits_get_hcomp_smooth\(fits)o(fil)o(e)42 b(*fptr,)k(int)h(*smooth,)e (int)i(*status\))0 1719 y Fj(4)24 b(sym)m(b)s(olic)f(constan)m(ts)i (are)e(de\014ned)f(for)h(use)g(as)g(the)h(v)-5 b(alue)23 b(of)h(the)f(`compt)m(yp)s(e')h(parameter:)38 b(GZIP)p 3447 1719 28 4 v 32 w(1,)25 b(RICE)p 3802 1719 V 32 w(1,)0 1832 y(HCOMPRESS)p 586 1832 V 31 w(1)35 b(or)f(PLIO)p 1035 1832 V 32 w(1.)52 b(En)m(tering)34 b(NULL)g(for)g(compt)m(yp)s(e)h (will)f(turn)f(o\013)i(the)f(tile-compression)i(and)0 1945 y(cause)31 b(normal)f(FITS)g(images)h(to)g(b)s(e)f(written.)0 2105 y(No)23 b(sp)s(ecial)f(action)i(is)e(required)f(b)m(y)h(soft)m(w)m (are)i(when)d(read)h(tile-compressed)h(images)g(b)s(ecause)f(all)h(the) f(CFITSIO)0 2218 y(routines)35 b(that)g(read)g(normal)g(uncompressed)f (FITS)g(images)i(also)g(transparen)m(tly)g(read)e(images)j(in)d(the)h (tile-)0 2331 y(compressed)28 b(format;)h(CFITSIO)e(essen)m(tially)j (treats)f(the)f(binary)g(table)h(that)f(con)m(tains)i(the)e(compressed) g(tiles)0 2444 y(as)j(if)f(it)h(w)m(ere)g(an)f(IMA)m(GE)h(extension.)0 2604 y(The)f(follo)m(wing)i(2)e(routines)h(are)f(a)m(v)-5 b(ailable)33 b(for)d(compressing)h(or)f(or)g(decompressing)h(an)f (image:)95 2865 y Fe(int)47 b(fits_img_compress\(fitsfile)41 b(*infptr,)46 b(fitsfile)f(*outfptr,)g(int)i(*status\);)95 2978 y(int)g(fits_img_decompress)c(\(fitsfile)i(*infptr,)h(fitsfile)f (*outfptr,)h(int)g(*status\);)0 3238 y Fj(Before)30 b(calling)h(the)f (compression)f(routine,)h(the)g(compression)f(parameters)h(m)m(ust)f (\014rst)g(b)s(e)g(de\014ned)f(in)h(one)h(of)0 3351 y(the)e(2)h(w)m(a)m (y)g(describ)s(ed)e(in)h(the)g(previous)g(paragraphs.)39 b(There)28 b(is)g(also)h(a)f(routine)h(to)f(determine)h(if)f(the)g (curren)m(t)0 3464 y(HDU)j(con)m(tains)h(a)e(tile)i(compressed)e(image) i(\(it)f(returns)e(1)i(or)f(0\):)95 3725 y Fe(int)47 b(fits_is_compressed_image\(f)o(its)o(file)41 b(*fptr,)46 b(int)h(*status\);)0 3985 y Fj(A)30 b(small)g(example)g(program)f (called)i('imcop)m(y')f(is)g(included)f(with)g(CFITSIO)f(that)i(can)f (b)s(e)g(used)g(to)h(compress)0 4098 y(\(or)44 b(uncompress\))g(an)m(y) g(FITS)g(image.)83 b(This)43 b(program)h(can)h(b)s(e)e(used)h(to)g(exp) s(erimen)m(t)h(with)f(the)g(v)-5 b(arious)0 4211 y(compression)30 b(options)h(on)f(existing)i(FITS)d(images)j(as)e(sho)m(wn)g(in)g(these) h(examples:)0 4472 y Fe(1\))95 b(imcopy)46 b(infile.fit)f ('outfile.fit[compress]')334 4698 y(This)i(will)f(use)h(the)g(default)f (compression)f(algorithm)g(\(Rice\))h(and)h(the)334 4811 y(default)f(tile)h(size)f(\(row)h(by)g(row\))0 5036 y(2\))95 b(imcopy)46 b(infile.fit)f('outfile.fit[compress)d(GZIP]')334 5262 y(This)47 b(will)f(use)h(the)g(GZIP)g(compression)e(algorithm)g (and)i(the)g(default)334 5375 y(tile)g(size)f(\(row)h(by)g(row\).)94 b(The)47 b(allowed)f(compression)f(algorithms)g(are)334 5488 y(Rice,)h(GZIP,)h(and)g(PLIO.)94 b(Only)46 b(the)h(first)g(letter) f(of)h(the)g(algorithm)334 5601 y(name)g(needs)f(to)h(be)g(specified.)p eop end %%Page: 48 56 TeXDict begin 48 55 bop 0 299 a Fj(48)1379 b Fh(CHAPTER)30 b(5.)71 b(BASIC)30 b(CFITSIO)f(INTERF)-10 b(A)m(CE)30 b(R)m(OUTINES)0 555 y Fe(3\))95 b(imcopy)46 b(infile.fit)f ('outfile.fit[compress)d(G)47 b(100,100]')334 781 y(This)g(will)f(use)h (the)g(GZIP)g(compression)e(algorithm)g(and)i(100)g(X)g(100)g(pixel)334 894 y(tiles.)0 1120 y(4\))95 b(imcopy)46 b(infile.fit)f ('outfile.fit[compress)d(R)47 b(100,100;)f(q)h(10.0]')334 1346 y(This)g(will)f(use)h(the)g(Rice)g(compression)e(algorithm,)g(100) h(X)i(100)f(pixel)334 1458 y(tiles,)f(and)h(quantization)e(level)h(=)h (RMSnoise)f(/)h(10.0)g(\(assuming)e(the)334 1571 y(input)h(image)h(has) g(a)g(floating)f(point)g(data)h(type\).)0 1797 y(5\))95 b(imcopy)46 b(infile.fit)f(outfile.fit)334 2023 y(If)i(the)g(input)g (file)f(is)h(in)h(tile-compressed)43 b(format,)j(then)h(it)g(will)f(be) 334 2136 y(uncompressed)f(to)i(the)g(output)f(file.)94 b(Otherwise,)45 b(it)i(simply)f(copies)334 2249 y(the)h(input)f(image)h (to)g(the)g(output)f(image.)0 2475 y(6\))95 b(imcopy)46 b('infile.fit[1001:1500,20)o(01:2)o(500])o(')89 b(outfile.fit)334 2700 y(This)47 b(extracts)e(a)j(500)f(X)g(500)g(pixel)f(section)g(of)h (the)g(much)g(larger)334 2813 y(input)f(image)h(\(which)f(may)h(be)g (in)g(tile-compressed)d(format\).)93 b(The)334 2926 y(output)46 b(is)h(a)h(normal)e(uncompressed)e(FITS)j(image.)0 3152 y(7\))95 b(imcopy)46 b('infile.fit[1001:1500,20)o(01:2)o(500])o(')89 b(outfile.fit.gz)334 3378 y(Same)47 b(as)g(above,)f(except)g(the)h (output)f(file)h(is)g(externally)e(compressed)334 3491 y(using)h(the)h(gzip)g(algorithm.)0 3964 y Ff(5.7)135 b(ASCI)t(I)45 b(and)f(Binary)h(T)-11 b(able)45 b(Routines)0 4220 y Fj(These)36 b(routines)g(p)s(erform)f(read)i(and)e(write)i(op)s (erations)g(on)f(columns)g(of)h(data)g(in)f(FITS)g(ASCI)s(I)e(or)j (Binary)0 4333 y(tables.)47 b(Note)33 b(that)g(in)e(the)i(follo)m(wing) g(discussions,)f(the)g(\014rst)g(ro)m(w)g(and)f(column)h(in)g(a)g (table)h(is)g(at)f(p)s(osition)h(1)0 4446 y(not)e(0.)0 4606 y(Users)k(should)g(also)i(read)e(the)h(follo)m(wing)h(c)m(hapter)g (on)e(the)h(CFITSIO)e(iterator)j(function)f(whic)m(h)f(pro)m(vides)h(a) 0 4719 y(more)i(`ob)5 b(ject)39 b(orien)m(ted')g(metho)s(d)f(of)g (reading)g(and)g(writing)g(table)h(columns.)63 b(The)37 b(iterator)j(function)d(is)i(a)0 4832 y(little)e(more)f(complicated)h (to)f(use,)h(but)e(the)g(adv)-5 b(an)m(tages)38 b(are)d(that)i(it)f (usually)f(tak)m(es)i(less)e(co)s(de)h(to)g(p)s(erform)0 4945 y(the)h(same)f(op)s(eration,)j(and)c(the)i(resulting)f(program)g (often)h(runs)e(faster)i(b)s(ecause)f(the)g(FITS)g(\014les)g(are)h (read)0 5058 y(and)30 b(written)g(using)g(the)h(most)f(e\016cien)m(t)i (blo)s(c)m(k)f(size.)0 5375 y Fd(5.7.1)112 b(Create)38 b(New)f(T)-9 b(able)0 5601 y Fi(1)81 b Fj(Create)40 b(a)f(new)g(ASCI)s (I)e(or)i(bin)m(table)h(table)g(extension.)68 b(If)39 b(the)g(FITS)g(\014le)g(is)g(curren)m(tly)g(empt)m(y)h(then)f(a)227 5714 y(dumm)m(y)25 b(primary)f(arra)m(y)i(will)g(b)s(e)f(created)i(b)s (efore)e(app)s(ending)f(the)i(table)g(extension)h(to)f(it.)40 b(The)25 b(tblt)m(yp)s(e)p eop end %%Page: 49 57 TeXDict begin 49 56 bop 0 299 a Fh(5.7.)72 b(ASCI)s(I)29 b(AND)i(BINAR)-8 b(Y)31 b(T)-8 b(ABLE)31 b(R)m(OUTINES)1864 b Fj(49)227 555 y(parameter)39 b(de\014nes)e(the)h(t)m(yp)s(e)h(of)f (table)h(and)e(can)i(ha)m(v)m(e)g(v)-5 b(alues)39 b(of)f(ASCI)s(I)p 2924 555 28 4 v 31 w(TBL)g(or)g(BINAR)-8 b(Y)p 3659 555 V 34 w(TBL.)227 668 y(The)29 b(naxis2)g(parameter)h(giv)m(es)g(the)g (initial)g(n)m(um)m(b)s(er)e(of)h(ro)m(ws)g(to)h(b)s(e)f(created)h(in)f (the)g(table,)h(and)f(should)227 781 y(normally)h(b)s(e)f(set)h(=)g(0.) 40 b(CFITSIO)29 b(will)h(automatically)i(increase)f(the)e(size)i(of)f (the)g(table)g(as)g(additional)227 894 y(ro)m(ws)d(are)g(written.)40 b(A)27 b(non-zero)g(n)m(um)m(b)s(er)f(of)h(ro)m(ws)g(ma)m(y)g(b)s(e)f (sp)s(eci\014ed)g(to)i(reserv)m(e)f(space)h(for)e(that)i(man)m(y)227 1007 y(ro)m(ws,)41 b(ev)m(en)e(if)g(a)g(few)m(er)g(n)m(um)m(b)s(er)e (of)i(ro)m(ws)f(will)h(b)s(e)f(written.)66 b(The)38 b(tunit)g(and)g (extname)i(parameters)227 1120 y(are)e(optional)g(and)f(a)h(n)m(ull)f (p)s(oin)m(ter)g(ma)m(y)h(b)s(e)f(giv)m(en)h(if)g(they)f(are)h(not)f (de\014ned.)61 b(The)37 b(FITS)f(Standard)227 1233 y(recommends)29 b(that)h(only)g(letters,)h(digits,)g(and)e(the)g(underscore)g(c)m (haracter)i(b)s(e)e(used)g(in)g(column)g(names)227 1346 y(\(the)c(tt)m(yp)s(e)g(parameter\))g(with)e(no)h(em)m(b)s(edded)f (spaces.)40 b(T)-8 b(railing)24 b(blank)g(c)m(haracters)i(are)e(not)h (signi\014can)m(t.)95 1678 y Fe(int)47 b(fits_create_tbl)d(/)j(ffcrtb) 286 1791 y(\(fitsfile)f(*fptr,)g(int)h(tbltype,)e(LONGLONG)h(naxis2,)g (int)g(tfields,)g(char)h(*ttype[],)334 1904 y(char)g(*tform[],)e(char)i (*tunit[],)e(char)i(*extname,)e(int)i(*status\))0 2188 y Fd(5.7.2)112 b(Column)39 b(Information)f(Routines)0 2391 y Fi(1)81 b Fj(Get)30 b(the)g(n)m(um)m(b)s(er)e(of)i(ro)m(ws)g(or) f(columns)g(in)h(the)g(curren)m(t)f(FITS)g(table.)41 b(The)29 b(n)m(um)m(b)s(er)f(of)i(ro)m(ws)g(is)f(giv)m(en)i(b)m(y)227 2503 y(the)j(NAXIS2)f(k)m(eyw)m(ord)h(and)e(the)i(n)m(um)m(b)s(er)e(of) h(columns)g(is)g(giv)m(en)h(b)m(y)f(the)h(TFIELDS)e(k)m(eyw)m(ord)i(in) f(the)227 2616 y(header)d(of)h(the)g(table.)95 2836 y Fe(int)47 b(fits_get_num_rows)c(/)48 b(ffgnrw)286 2949 y(\(fitsfile)e(*fptr,)g(>)h(long)g(*nrows,)f(int)h(*status\);)95 3175 y(int)g(fits_get_num_rowsll)c(/)k(ffgnrwll)286 3288 y(\(fitsfile)f(*fptr,)g(>)h(LONGLONG)f(*nrows,)g(int)g(*status\);)95 3513 y(int)h(fits_get_num_cols)c(/)48 b(ffgncl)286 3626 y(\(fitsfile)e(*fptr,)g(>)h(int)g(*ncols,)f(int)h(*status\);)0 3846 y Fi(2)81 b Fj(Get)25 b(the)f(table)i(column)e(n)m(um)m(b)s(er)f (\(and)h(name\))h(of)f(the)h(column)f(whose)g(name)g(matc)m(hes)i(an)e (input)g(template)227 3959 y(name.)48 b(If)32 b(casesen)i(=)e(CASESEN)g (then)g(the)h(column)f(name)h(matc)m(h)h(will)f(b)s(e)f(case-sensitiv)m (e,)k(whereas)227 4072 y(if)27 b(casesen)h(=)e(CASEINSEN)g(then)h(the)g (case)h(will)f(b)s(e)f(ignored.)40 b(As)27 b(a)g(general)h(rule,)f(the) g(column)g(names)227 4185 y(should)j(b)s(e)f(treated)j(as)e(case)i (INsensitiv)m(e.)227 4328 y(The)26 b(input)g(column)g(name)g(template)i (ma)m(y)f(b)s(e)f(either)h(the)g(exact)h(name)e(of)h(the)f(column)g(to) i(b)s(e)d(searc)m(hed)227 4441 y(for,)k(or)f(it)h(ma)m(y)g(con)m(tain)h (wild)e(card)g(c)m(haracters)i(\(*,)g(?,)f(or)f(#\),)h(or)f(it)h(ma)m (y)g(con)m(tain)h(the)e(in)m(teger)i(n)m(um)m(b)s(er)227 4554 y(of)j(the)f(desired)f(column)h(\(with)g(the)h(\014rst)e(column)h (=)g(1\).)46 b(The)32 b(`*')h(wild)f(card)g(c)m(haracter)h(matc)m(hes)h (an)m(y)227 4667 y(sequence)h(of)g(c)m(haracters)h(\(including)f(zero)g (c)m(haracters\))i(and)d(the)h(`?')53 b(c)m(haracter)36 b(matc)m(hes)g(an)m(y)f(single)227 4780 y(c)m(haracter.)42 b(The)29 b(#)h(wildcard)f(will)h(matc)m(h)h(an)m(y)e(consecutiv)m(e)j (string)e(of)f(decimal)i(digits)f(\(0-9\).)43 b(If)29 b(more)227 4893 y(than)43 b(one)f(column)h(name)f(in)g(the)h(table)h (matc)m(hes)f(the)g(template)h(string,)i(then)c(the)h(\014rst)e(matc)m (h)j(is)227 5006 y(returned)28 b(and)h(the)g(status)h(v)-5 b(alue)30 b(will)f(b)s(e)g(set)h(to)g(COL)p 2171 5006 V 32 w(NOT)p 2408 5006 V 32 w(UNIQUE)f(as)h(a)f(w)m(arning)g(that)h(a)g (unique)227 5119 y(matc)m(h)e(w)m(as)g(not)f(found.)39 b(T)-8 b(o)27 b(\014nd)f(the)h(other)g(cases)h(that)g(matc)m(h)g(the)g (template,)h(call)f(the)g(routine)f(again)227 5232 y(lea)m(ving)g(the)e (input)f(status)h(v)-5 b(alue)26 b(equal)f(to)h(COL)p 1950 5232 V 32 w(NOT)p 2187 5232 V 32 w(UNIQUE)f(and)f(the)h(next)h (matc)m(hing)g(name)f(will)227 5344 y(then)30 b(b)s(e)g(returned.)40 b(Rep)s(eat)30 b(this)h(pro)s(cess)f(un)m(til)g(a)h(status)g(=)f(COL)p 2628 5344 V 32 w(NOT)p 2865 5344 V 32 w(F)m(OUND)i(is)e(returned.)227 5488 y(The)36 b(FITS)g(Standard)g(recommends)g(that)i(only)e(letters,)k (digits,)f(and)d(the)h(underscore)f(c)m(haracter)j(b)s(e)227 5601 y(used)31 b(in)g(column)g(names)g(\(with)h(no)f(em)m(b)s(edded)f (spaces\).)45 b(T)-8 b(railing)32 b(blank)f(c)m(haracters)i(are)e(not)h (signi\014-)227 5714 y(can)m(t.)p eop end %%Page: 50 58 TeXDict begin 50 57 bop 0 299 a Fj(50)1379 b Fh(CHAPTER)30 b(5.)71 b(BASIC)30 b(CFITSIO)f(INTERF)-10 b(A)m(CE)30 b(R)m(OUTINES)95 555 y Fe(int)47 b(fits_get_colnum)d(/)j(ffgcno)286 668 y(\(fitsfile)f(*fptr,)g(int)h(casesen,)e(char)i(*templt,)e(>)j(int) f(*colnum,)334 781 y(int)g(*status\))95 1007 y(int)g(fits_get_colname)d (/)j(ffgcnn)286 1120 y(\(fitsfile)f(*fptr,)g(int)h(casesen,)e(char)i (*templt,)e(>)j(char)e(*colname,)334 1233 y(int)h(*colnum,)f(int)g (*status\))0 1508 y Fi(3)81 b Fj(Return)30 b(the)i(data)g(t)m(yp)s(e,)h (v)m(ector)g(rep)s(eat)f(v)-5 b(alue,)32 b(and)f(the)h(width)f(in)g(b)m (ytes)h(of)g(a)g(column)f(in)g(an)h(ASCI)s(I)e(or)227 1621 y(binary)35 b(table.)56 b(Allo)m(w)m(ed)37 b(v)-5 b(alues)36 b(for)f(the)h(data)g(t)m(yp)s(e)f(in)g(ASCI)s(I)f(tables)i (are:)51 b(TSTRING,)35 b(TSHOR)-8 b(T,)227 1734 y(TLONG,)36 b(TFLO)m(A)-8 b(T,)36 b(and)f(TDOUBLE.)i(Binary)e(tables)i(also)g(supp) s(ort)d(these)i(t)m(yp)s(es:)52 b(TLOGICAL,)227 1847 y(TBIT,)38 b(TBYTE,)h(TCOMPLEX)e(and)h(TDBLCOMPLEX.)h(The)f(negativ)m (e)i(of)f(the)g(data)g(t)m(yp)s(e)g(co)s(de)227 1960 y(v)-5 b(alue)32 b(is)f(returned)f(if)h(it)g(is)h(a)f(v)-5 b(ariable)32 b(length)f(arra)m(y)h(column.)43 b(Note)32 b(that)g(in)e(the)i(case)g(of)f(a)g('J')h(32-bit)227 2073 y(in)m(teger)g(binary)d(table)i(column,)f(this)g(routine)g(will)g (return)f(data)i(t)m(yp)s(e)f(=)g(TINT32BIT)g(\(whic)m(h)g(in)g(fact) 227 2186 y(is)36 b(equiv)-5 b(alen)m(t)37 b(to)g(TLONG\).)f(With)g (most)g(curren)m(t)g(C)f(compilers,)j(a)f(v)-5 b(alue)36 b(in)f(a)i('J')f(column)f(has)h(the)227 2299 y(same)29 b(size)g(as)g(an)f('in)m(t')i(v)-5 b(ariable,)30 b(and)d(ma)m(y)j(not)e (b)s(e)g(equiv)-5 b(alen)m(t)30 b(to)f(a)g('long')g(v)-5 b(ariable,)30 b(whic)m(h)e(is)h(64-bits)227 2412 y(long)i(on)g(an)f (increasing)h(n)m(um)m(b)s(er)e(of)h(compilers.)227 2570 y(The)22 b('rep)s(eat')h(parameter)g(returns)f(the)g(v)m(ector)i(rep)s (eat)f(coun)m(t)g(on)f(the)h(binary)f(table)h(TF)m(ORMn)f(k)m(eyw)m (ord)227 2683 y(v)-5 b(alue.)60 b(\(ASCI)s(I)35 b(table)j(columns)e (alw)m(a)m(ys)i(ha)m(v)m(e)g(rep)s(eat)e(=)g(1\).)60 b(The)36 b('width')g(parameter)h(returns)f(the)227 2796 y(width)30 b(in)g(b)m(ytes)h(of)g(a)f(single)h(column)g(elemen)m(t)h (\(e.g.,)g(a)f('10D')h(binary)e(table)h(column)f(will)h(ha)m(v)m(e)h (width)227 2909 y(=)d(8,)i(an)e(ASCI)s(I)f(table)i('F12.2')i(column)e (will)g(ha)m(v)m(e)g(width)f(=)g(12,)i(and)e(a)h(binary)e(table'60A')k (c)m(haracter)227 3022 y(string)44 b(column)g(will)g(ha)m(v)m(e)h (width)e(=)h(60\);)52 b(Note)45 b(that)f(CFITSIO)f(supp)s(orts)f(the)i (lo)s(cal)h(con)m(v)m(en)m(tion)227 3135 y(for)d(sp)s(ecifying)f(arra)m (ys)i(of)f(\014xed)f(length)h(strings)f(within)h(a)g(binary)f(table)h (c)m(haracter)i(column)d(using)227 3247 y(the)g(syn)m(tax)g(TF)m(ORM)g (=)g('rAw')f(where)g('r')h(is)g(the)g(total)h(n)m(um)m(b)s(er)d(of)i(c) m(haracters)h(\(=)f(the)g(width)f(of)227 3360 y(the)f(column\))g(and)e ('w')i(is)f(the)h(width)f(of)g(a)h(unit)f(string)g(within)g(the)h (column.)65 b(Th)m(us)37 b(if)h(the)h(column)227 3473 y(has)34 b(TF)m(ORM)h(=)f('60A12')j(then)d(this)g(means)g(that)h(eac)m (h)g(ro)m(w)g(of)f(the)h(table)g(con)m(tains)g(5)g(12-c)m(haracter)227 3586 y(substrings)23 b(within)h(the)g(60-c)m(haracter)j(\014eld,)f(and) d(th)m(us)h(in)g(this)g(case)h(this)g(routine)f(will)g(return)f(t)m(yp) s(eco)s(de)227 3699 y(=)f(TSTRING,)g(rep)s(eat)g(=)g(60,)j(and)d(width) f(=)h(12.)39 b(\(The)22 b(TDIMn)g(k)m(eyw)m(ord)h(ma)m(y)g(also)g(b)s (e)f(used)f(to)i(sp)s(ecify)227 3812 y(the)29 b(unit)e(string)h (length;)i(The)e(pair)g(of)g(k)m(eyw)m(ords)g(TF)m(ORMn)g(=)g('60A')i (and)e(TDIMn)f(=)h('\(12,5\)')j(w)m(ould)227 3925 y(ha)m(v)m(e)g(the)f (same)g(e\013ect)h(as)e(TF)m(ORMn)h(=)f('60A12'\).)43 b(The)29 b(n)m(um)m(b)s(er)f(of)i(substrings)e(in)h(an)m(y)h(binary)f (table)227 4038 y(c)m(haracter)36 b(string)e(\014eld)f(can)h(b)s(e)g (calculated)i(b)m(y)d(\(rep)s(eat/width\).)53 b(A)34 b(n)m(ull)f(p)s(oin)m(ter)h(ma)m(y)h(b)s(e)e(giv)m(en)i(for)227 4151 y(an)m(y)c(of)g(the)f(output)g(parameters)h(that)g(are)g(not)f (needed.)227 4309 y(The)46 b(second)g(routine,)k(\014t)p 1188 4309 28 4 v 33 w(get)p 1341 4309 V 34 w(eqcolt)m(yp)s(e)d(is)f (similar)h(except)g(that)f(in)g(the)g(case)i(of)e(scaled)h(in)m(teger) 227 4422 y(columns)35 b(it)g(returns)f(the)h('equiv)-5 b(alen)m(t')37 b(data)f(t)m(yp)s(e)f(that)h(is)f(needed)f(to)i(store)g (the)f(scaled)h(v)-5 b(alues,)37 b(and)227 4535 y(not)28 b(necessarily)h(the)f(ph)m(ysical)g(data)g(t)m(yp)s(e)g(of)g(the)g (unscaled)f(v)-5 b(alues)29 b(as)e(stored)h(in)g(the)f(FITS)g(table.)41 b(F)-8 b(or)227 4648 y(example)38 b(if)g(a)g('1I')g(column)f(in)g(a)h (binary)f(table)h(has)g(TSCALn)d(=)j(1)f(and)g(TZER)m(On)f(=)i(32768,)j (then)227 4761 y(this)29 b(column)f(e\013ectiv)m(ely)k(con)m(tains)d (unsigned)f(short)g(in)m(teger)i(v)-5 b(alues,)29 b(and)f(th)m(us)h (the)f(returned)g(v)-5 b(alue)29 b(of)227 4874 y(t)m(yp)s(eco)s(de)34 b(will)f(b)s(e)g(TUSHOR)-8 b(T,)32 b(not)h(TSHOR)-8 b(T.)33 b(Similarly)-8 b(,)34 b(if)f(a)h(column)f(has)f(TTYPEn)g(=)h('1I')h (and)227 4986 y(TSCALn)29 b(=)h(0.12,)i(then)e(the)h(returned)e(t)m(yp) s(eco)s(de)i(will)f(b)s(e)g(TFLO)m(A)-8 b(T.)95 5262 y Fe(int)47 b(fits_get_coltype)d(/)j(ffgtcl)286 5375 y(\(fitsfile)f(*fptr,)g(int)h(colnum,)e(>)j(int)f(*typecode,)e(long)h (*repeat,)334 5488 y(long)h(*width,)f(int)g(*status\))95 5714 y(int)h(fits_get_coltypell)c(/)48 b(ffgtclll)p eop end %%Page: 51 59 TeXDict begin 51 58 bop 0 299 a Fh(5.7.)72 b(ASCI)s(I)29 b(AND)i(BINAR)-8 b(Y)31 b(T)-8 b(ABLE)31 b(R)m(OUTINES)1864 b Fj(51)286 555 y Fe(\(fitsfile)46 b(*fptr,)g(int)h(colnum,)e(>)j(int)f (*typecode,)e(LONGLONG)g(*repeat,)334 668 y(LONGLONG)h(*width,)f(int)i (*status\))95 894 y(int)g(fits_get_eqcoltype)c(/)48 b(ffeqty)286 1007 y(\(fitsfile)e(*fptr,)g(int)h(colnum,)e(>)j(int)f(*typecode,)e (long)h(*repeat,)334 1120 y(long)h(*width,)f(int)g(*status\))95 1346 y(int)h(fits_get_eqcoltypell)c(/)k(ffeqtyll)286 1458 y(\(fitsfile)f(*fptr,)g(int)h(colnum,)e(>)j(int)f(*typecode,)e (LONGLONG)g(*repeat,)334 1571 y(LONGLONG)h(*width,)f(int)i(*status\))0 1808 y Fi(4)81 b Fj(Return)29 b(the)h(displa)m(y)g(width)f(of)h(a)h (column.)40 b(This)29 b(is)h(the)g(length)h(of)f(the)g(string)g(that)h (will)f(b)s(e)f(returned)g(b)m(y)227 1921 y(the)34 b(\014ts)p 514 1921 28 4 v 32 w(read)p 718 1921 V 33 w(col)g(routine)f(when)f (reading)h(the)h(column)e(as)i(a)f(formatted)h(string.)49 b(The)32 b(displa)m(y)i(width)227 2034 y(is)29 b(determined)g(b)m(y)g (the)g(TDISPn)f(k)m(eyw)m(ord,)i(if)f(presen)m(t,)h(otherwise)f(b)m(y)g (the)g(data)h(t)m(yp)s(e)f(of)h(the)f(column.)95 2384 y Fe(int)47 b(fits_get_col_display_width)41 b(/)47 b(ffgcdw)286 2497 y(\(fitsfile)f(*fptr,)g(int)h(colnum,)e(>)j(int)f(*dispwidth,)e (int)h(*status\))0 2734 y Fi(5)81 b Fj(Return)27 b(the)i(n)m(um)m(b)s (er)e(of)i(and)e(size)j(of)e(the)h(dimensions)f(of)g(a)h(table)g (column)g(in)f(a)g(binary)g(table.)41 b(Normally)227 2847 y(this)28 b(information)h(is)f(giv)m(en)h(b)m(y)f(the)h(TDIMn)f(k) m(eyw)m(ord,)h(but)e(if)i(this)f(k)m(eyw)m(ord)g(is)g(not)h(presen)m(t) f(then)g(this)227 2960 y(routine)j(returns)e(naxis)h(=)g(1)h(and)f (naxes[0])h(equal)g(to)g(the)g(rep)s(eat)f(coun)m(t)h(in)f(the)h(TF)m (ORM)g(k)m(eyw)m(ord.)95 3197 y Fe(int)47 b(fits_read_tdim)d(/)k (ffgtdm)286 3309 y(\(fitsfile)e(*fptr,)g(int)h(colnum,)e(int)i(maxdim,) f(>)i(int)f(*naxis,)334 3422 y(long)g(*naxes,)f(int)g(*status\))95 3648 y(int)h(fits_read_tdimll)d(/)j(ffgtdmll)286 3761 y(\(fitsfile)f(*fptr,)g(int)h(colnum,)e(int)i(maxdim,)f(>)i(int)f (*naxis,)334 3874 y(LONGLONG)f(*naxes,)f(int)i(*status\))0 4111 y Fi(6)81 b Fj(Deco)s(de)33 b(the)g(input)f(TDIMn)h(k)m(eyw)m(ord) g(string)f(\(e.g.)50 b('\(100,200\)'\))37 b(and)32 b(return)g(the)h(n)m (um)m(b)s(er)e(of)i(and)f(size)227 4224 y(of)c(the)g(dimensions)f(of)h (a)g(binary)f(table)h(column.)40 b(If)27 b(the)h(input)f(tdimstr)g(c)m (haracter)i(string)f(is)g(n)m(ull,)g(then)227 4337 y(this)d(routine)f (returns)f(naxis)h(=)h(1)f(and)g(naxes[0])i(equal)e(to)i(the)e(rep)s (eat)h(coun)m(t)g(in)f(the)g(TF)m(ORM)h(k)m(eyw)m(ord.)227 4450 y(This)30 b(routine)g(is)h(called)g(b)m(y)f(\014ts)p 1350 4450 V 33 w(read)p 1555 4450 V 33 w(tdim.)95 4687 y Fe(int)47 b(fits_decode_tdim)d(/)j(ffdtdm)286 4799 y(\(fitsfile)f(*fptr,)g(char)g(*tdimstr,)g(int)h(colnum,)e(int)i (maxdim,)f(>)i(int)e(*naxis,)334 4912 y(long)h(*naxes,)f(int)g (*status\))95 5138 y(int)h(fits_decode_tdimll)c(/)48 b(ffdtdmll)286 5251 y(\(fitsfile)e(*fptr,)g(char)g(*tdimstr,)g(int)h (colnum,)e(int)i(maxdim,)f(>)i(int)e(*naxis,)334 5364 y(LONGLONG)g(*naxes,)f(int)i(*status\))0 5601 y Fi(7)81 b Fj(W)-8 b(rite)23 b(a)g(TDIMn)f(k)m(eyw)m(ord)h(whose)f(v)-5 b(alue)23 b(has)g(the)f(form)g('\(l,m,n...\)')40 b(where)22 b(l,)i(m,)g(n...)38 b(are)23 b(the)g(dimensions)227 5714 y(of)31 b(a)g(m)m(ultidimensional)g(arra)m(y)g(column)f(in)g(a)h (binary)e(table.)p eop end %%Page: 52 60 TeXDict begin 52 59 bop 0 299 a Fj(52)1379 b Fh(CHAPTER)30 b(5.)71 b(BASIC)30 b(CFITSIO)f(INTERF)-10 b(A)m(CE)30 b(R)m(OUTINES)95 555 y Fe(int)47 b(fits_write_tdim)d(/)j(ffptdm)286 668 y(\(fitsfile)f(*fptr,)g(int)h(colnum,)e(int)i(naxis,)f(long)h (*naxes,)f(>)h(int)g(*status\))95 894 y(int)g(fits_write_tdimll)c(/)48 b(ffptdmll)286 1007 y(\(fitsfile)e(*fptr,)g(int)h(colnum,)e(int)i (naxis,)f(LONGLONG)g(*naxes,)g(>)h(int)g(*status\))0 1298 y Fd(5.7.3)112 b(Routines)38 b(to)f(Edit)g(Ro)m(ws)g(or)g(Columns) 0 1508 y Fi(1)81 b Fj(Insert)32 b(or)h(delete)i(ro)m(ws)e(in)g(an)g (ASCI)s(I)f(or)h(binary)f(table.)50 b(When)33 b(inserting)h(ro)m(ws)f (all)h(the)f(ro)m(ws)g(follo)m(wing)227 1621 y(ro)m(w)24 b(FR)m(O)m(W)i(are)e(shifted)f(do)m(wn)h(b)m(y)g(NR)m(O)m(WS)g(ro)m (ws;)j(if)c(FR)m(O)m(W)j(=)d(0)i(then)e(the)h(blank)g(ro)m(ws)g(are)g (inserted)227 1734 y(at)31 b(the)e(b)s(eginning)g(of)h(the)f(table.)42 b(Note)31 b(that)f(it)g(is)f(*not*)i(necessary)f(to)g(insert)f(ro)m(ws) h(in)f(a)h(table)g(b)s(efore)227 1846 y(writing)g(data)g(to)g(those)h (ro)m(ws)e(\(indeed,)h(it)g(w)m(ould)f(b)s(e)g(ine\016cien)m(t)i(to)f (do)g(so\).)41 b(Instead)29 b(one)h(ma)m(y)g(simply)227 1959 y(write)h(data)g(to)g(an)m(y)g(ro)m(w)f(of)h(the)f(table,)i (whether)e(that)h(ro)m(w)f(of)h(data)g(already)g(exists)g(or)f(not.)227 2110 y(The)40 b(\014rst)g(delete)i(routine)e(deletes)i(NR)m(O)m(WS)f (consecutiv)m(e)h(ro)m(ws)f(starting)g(with)f(ro)m(w)g(FIRSTR)m(O)m(W.) 227 2223 y(The)d(second)g(delete)h(routine)f(tak)m(es)h(an)f(input)f (string)h(that)h(lists)f(the)g(ro)m(ws)g(or)g(ro)m(w)g(ranges)g (\(e.g.,)k('5-)227 2336 y(10,12,20-30'\),)32 b(whereas)26 b(the)g(third)g(delete)h(routine)f(tak)m(es)h(an)f(input)f(in)m(teger)j (arra)m(y)e(that)h(sp)s(eci\014es)f(eac)m(h)227 2449 y(individual)35 b(ro)m(w)h(to)g(b)s(e)f(deleted.)58 b(In)35 b(b)s(oth)f(latter)j(cases,)i(the)c(input)g(list)h(of)g(ro)m(ws)g(to)g (delete)h(m)m(ust)f(b)s(e)227 2562 y(sorted)i(in)g(ascending)g(order.) 62 b(These)38 b(routines)f(up)s(date)g(the)h(NAXIS2)g(k)m(eyw)m(ord)h (to)f(re\015ect)g(the)g(new)227 2674 y(n)m(um)m(b)s(er)29 b(of)i(ro)m(ws)f(in)g(the)h(table.)95 2935 y Fe(int)47 b(fits_insert_rows)d(/)j(ffirow)286 3048 y(\(fitsfile)f(*fptr,)g (LONGLONG)f(firstrow,)h(LONGLONG)f(nrows,)h(>)i(int)f(*status\))95 3274 y(int)g(fits_delete_rows)d(/)j(ffdrow)286 3387 y(\(fitsfile)f (*fptr,)g(LONGLONG)f(firstrow,)h(LONGLONG)f(nrows,)h(>)i(int)f (*status\))95 3612 y(int)g(fits_delete_rowrange)c(/)k(ffdrrg)286 3725 y(\(fitsfile)f(*fptr,)g(char)g(*rangelist,)f(>)j(int)e(*status\)) 95 3951 y(int)h(fits_delete_rowlist)c(/)k(ffdrws)286 4064 y(\(fitsfile)f(*fptr,)g(long)g(*rowlist,)g(long)g(nrows,)g(>)i (int)f(*status\))95 4290 y(int)g(fits_delete_rowlistll)42 b(/)48 b(ffdrwsll)286 4403 y(\(fitsfile)e(*fptr,)g(LONGLONG)f (*rowlist,)h(LONGLONG)f(nrows,)h(>)i(int)f(*status\))0 4663 y Fi(2)81 b Fj(Insert)36 b(or)h(delete)i(column\(s\))e(in)g(an)g (ASCI)s(I)f(or)h(binary)f(table.)62 b(When)37 b(inserting,)i(COLNUM)e (sp)s(eci\014es)227 4776 y(the)28 b(column)g(n)m(um)m(b)s(er)f(that)h (the)g(\(\014rst\))g(new)f(column)h(should)f(o)s(ccup)m(y)h(in)g(the)g (table.)41 b(NCOLS)26 b(sp)s(eci\014es)227 4889 y(ho)m(w)35 b(man)m(y)g(columns)f(are)h(to)g(b)s(e)f(inserted.)53 b(An)m(y)35 b(existing)h(columns)e(from)g(this)h(p)s(osition)f(and)g (higher)227 5002 y(are)c(shifted)f(o)m(v)m(er)h(to)g(allo)m(w)g(ro)s (om)f(for)g(the)h(new)e(column\(s\).)41 b(The)29 b(index)f(n)m(um)m(b)s (er)g(on)h(all)h(the)f(follo)m(wing)227 5115 y(k)m(eyw)m(ords)34 b(will)f(b)s(e)g(incremen)m(ted)h(or)f(decremen)m(ted)h(if)f(necessary) h(to)g(re\015ect)g(the)f(new)g(p)s(osition)g(of)h(the)227 5228 y(column\(s\))26 b(in)f(the)h(table:)39 b(TBCOLn,)26 b(TF)m(ORMn,)h(TTYPEn,)e(TUNITn,)h(TNULLn,)g(TSCALn,)f(TZE-)227 5341 y(R)m(On,)43 b(TDISPn,)g(TDIMn,)g(TLMINn,)g(TLMAXn,)g(TDMINn,)g (TDMAXn,)h(TCTYPn,)e(TCRPXn,)227 5453 y(TCR)-10 b(VLn,)29 b(TCDL)-8 b(Tn,)30 b(TCR)m(OTn,)f(and)h(TCUNIn.)95 5714 y Fe(int)47 b(fits_insert_col)d(/)j(fficol)p eop end %%Page: 53 61 TeXDict begin 53 60 bop 0 299 a Fh(5.7.)72 b(ASCI)s(I)29 b(AND)i(BINAR)-8 b(Y)31 b(T)-8 b(ABLE)31 b(R)m(OUTINES)1864 b Fj(53)286 555 y Fe(\(fitsfile)46 b(*fptr,)g(int)h(colnum,)e(char)i (*ttype,)f(char)h(*tform,)334 668 y(>)h(int)e(*status\))95 894 y(int)h(fits_insert_cols)d(/)j(fficls)286 1007 y(\(fitsfile)f (*fptr,)g(int)h(colnum,)e(int)i(ncols,)f(char)h(**ttype,)334 1120 y(char)g(**tform,)e(>)j(int)f(*status\))95 1346 y(int)g(fits_delete_col)d(/)j(ffdcol\(fitsfile)d(*fptr,)i(int)h (colnum,)f(>)h(int)g(*status\))0 1604 y Fi(3)81 b Fj(Cop)m(y)32 b(a)h(column)g(from)f(one)h(HDU)g(to)h(another)e(\(or)h(to)h(the)f (same)g(HDU\).)h(If)e(create)p 3129 1604 28 4 v 34 w(col)i(=)e(TR)m (UE,)h(then)227 1717 y(a)40 b(new)e(column)h(will)g(b)s(e)g(inserted)g (in)f(the)h(output)g(table,)j(at)e(p)s(osition)f(`outcolumn',)j (otherwise)e(the)227 1830 y(existing)f(output)f(column)f(will)i(b)s(e)e (o)m(v)m(erwritten)i(\(in)f(whic)m(h)g(case)h(it)f(m)m(ust)g(ha)m(v)m (e)h(a)f(compatible)h(data)227 1943 y(t)m(yp)s(e\).)i(If)29 b(outcoln)m(um)h(is)f(greater)i(than)e(the)h(n)m(um)m(b)s(er)e(of)h (column)g(in)g(the)h(table,)h(then)e(the)g(new)g(column)227 2056 y(will)j(b)s(e)f(app)s(ended)f(to)j(the)f(end)f(of)g(the)h(table.) 46 b(Note)33 b(that)f(the)g(\014rst)f(column)g(in)h(a)g(table)g(is)g (at)h(coln)m(um)227 2169 y(=)j(1.)58 b(The)36 b(standard)f(indexed)g(k) m(eyw)m(ords)i(that)f(related)h(to)g(the)f(column)g(\(e.g.,)j(TDISPn,)e (TUNITn,)227 2282 y(TCRPXn,)30 b(TCDL)-8 b(Tn,)29 b(etc.\))43 b(will)30 b(also)i(b)s(e)d(copied.)95 2541 y Fe(int)47 b(fits_copy_col)e(/)i(ffcpcl)286 2654 y(\(fitsfile)f(*infptr,)f (fitsfile)h(*outfptr,)f(int)i(incolnum,)e(int)i(outcolnum,)334 2767 y(int)g(create_col,)e(>)i(int)g(*status\);)0 3026 y Fi(4)81 b Fj(Cop)m(y)30 b('nro)m(ws')g(consecutiv)m(e)j(ro)m(ws)d (from)g(one)h(table)g(to)g(another,)g(b)s(eginning)f(with)g(ro)m(w)g ('\014rstro)m(w'.)41 b(These)227 3138 y(ro)m(ws)31 b(will)h(b)s(e)e (app)s(ended)g(to)i(an)m(y)f(existing)h(ro)m(ws)g(in)e(the)i(output)e (table.)44 b(Note)33 b(that)f(the)f(\014rst)f(ro)m(w)i(in)f(a)227 3251 y(table)h(is)e(at)h(ro)m(w)g(=)f(1.)95 3510 y Fe(int)47 b(fits_copy_rows)d(/)k(ffcprw)286 3623 y(\(fitsfile)e(*infptr,)f (fitsfile)h(*outfptr,)f(LONGLONG)h(firstrow,)334 3736 y(LONGLONG)g(nrows,)g(>)h(int)g(*status\);)0 3995 y Fi(5)81 b Fj(Mo)s(dify)37 b(the)g(v)m(ector)i(length)f(of)f(a)h(binary)e(table) i(column)f(\(e.g.,)k(c)m(hange)e(a)e(column)g(from)g(TF)m(ORMn)g(=)227 4108 y('1E')31 b(to)h('20E'\).)g(The)e(v)m(ector)i(length)e(ma)m(y)h(b) s(e)f(increased)h(or)f(decreased)h(from)f(the)g(curren)m(t)h(v)-5 b(alue.)95 4367 y Fe(int)47 b(fits_modify_vector_len)42 b(/)48 b(ffmvec)286 4480 y(\(fitsfile)e(*fptr,)g(int)h(colnum,)e (LONGLONG)h(newveclen,)f(>)i(int)g(*status\))0 4770 y Fd(5.7.4)112 b(Read)38 b(and)h(W)-9 b(rite)36 b(Column)j(Data)e (Routines)0 4989 y Fj(The)e(follo)m(wing)h(routines)g(write)f(or)g (read)g(data)h(v)-5 b(alues)36 b(in)f(the)g(curren)m(t)g(ASCI)s(I)f(or) h(binary)g(table)h(extension.)0 5102 y(If)d(a)g(write)g(op)s(eration)h (extends)f(b)s(ey)m(ond)f(the)h(curren)m(t)g(size)h(of)f(the)g(table,)i (then)e(the)g(n)m(um)m(b)s(er)f(of)h(ro)m(ws)g(in)g(the)0 5215 y(table)i(will)g(automatically)i(b)s(e)c(increased)i(and)e(the)i (NAXIS2)f(k)m(eyw)m(ord)h(v)-5 b(alue)35 b(will)f(b)s(e)g(up)s(dated.) 51 b(A)m(ttempts)0 5328 y(to)31 b(read)f(b)s(ey)m(ond)g(the)h(end)e(of) i(the)f(table)i(will)e(result)h(in)f(an)g(error.)0 5488 y(Automatic)d(data)e(t)m(yp)s(e)g(con)m(v)m(ersion)h(is)f(p)s(erformed) f(for)g(n)m(umerical)i(data)f(t)m(yp)s(es)g(\(only\))h(if)f(the)g(data) h(t)m(yp)s(e)f(of)g(the)0 5601 y(column)34 b(\(de\014ned)f(b)m(y)h(the) g(TF)m(ORMn)g(k)m(eyw)m(ord\))h(di\013ers)f(from)g(the)g(data)h(t)m(yp) s(e)f(of)g(the)h(arra)m(y)f(in)g(the)g(calling)0 5714 y(routine.)65 b(ASCI)s(I)37 b(and)h(binary)f(tables)i(supp)s(ort)e(the) i(follo)m(wing)g(data)h(t)m(yp)s(e)e(v)-5 b(alues:)57 b(TSTRING,)38 b(TBYTE,)p eop end %%Page: 54 62 TeXDict begin 54 61 bop 0 299 a Fj(54)1379 b Fh(CHAPTER)30 b(5.)71 b(BASIC)30 b(CFITSIO)f(INTERF)-10 b(A)m(CE)30 b(R)m(OUTINES)0 555 y Fj(TSBYTE,)e(TSHOR)-8 b(T,)27 b(TUSHOR)-8 b(T,)28 b(TINT,)g(TUINT,)g(TLONG,)g(TLONGLONG,)g(TULONG,)g(TFLO)m(A)-8 b(T,)0 668 y(or)25 b(TDOUBLE.)g(Binary)f(tables)i(also)f(supp)s(ort)e (TLOGICAL)h(\(in)m(ternally)i(mapp)s(ed)d(to)i(the)g(`c)m(har')h(data)f (t)m(yp)s(e\),)0 781 y(TCOMPLEX,)30 b(and)f(TDBLCOMPLEX.)0 941 y(Note)d(that)g(it)g(is)f(*not*)h(necessary)f(to)h(insert)f(ro)m (ws)g(in)g(a)g(table)h(b)s(efore)f(writing)g(data)h(to)g(those)f(ro)m (ws)g(\(indeed,)h(it)0 1054 y(w)m(ould)h(b)s(e)g(ine\016cien)m(t)i(to)f (do)f(so\).)41 b(Instead,)28 b(one)g(ma)m(y)g(simply)f(write)g(data)h (to)h(an)m(y)e(ro)m(w)h(of)g(the)f(table,)j(whether)0 1167 y(that)h(ro)m(w)f(of)h(data)g(already)g(exists)g(or)f(not.)0 1327 y(Individual)g(bits)i(in)f(a)h(binary)e(table)i('X')g(or)g('B')g (column)f(ma)m(y)h(b)s(e)f(read/written)h(to/from)g(a)g(*c)m(har)g (arra)m(y)g(b)m(y)0 1440 y(sp)s(ecifying)k(the)f(TBIT)h(datat)m(yp)s (e.)57 b(The)35 b(*c)m(har)i(arra)m(y)f(will)g(b)s(e)f(in)m(terpreted)h (as)g(an)g(arra)m(y)g(of)g(logical)i(TR)m(UE)0 1553 y(\(1\))d(or)g(F) -10 b(ALSE)34 b(\(0\))h(v)-5 b(alues)35 b(that)g(corresp)s(ond)e(to)i (the)g(v)-5 b(alue)35 b(of)f(eac)m(h)i(bit)e(in)g(the)h(FITS)e('X')i (or)g('B')g(column.)0 1666 y(Alternativ)m(ely)-8 b(,)30 b(the)c(v)-5 b(alues)27 b(in)e(a)i(binary)e(table)i('X')g(column)f(ma)m (y)h(b)s(e)e(read/written)i(8)f(bits)g(at)h(a)f(time)h(to/from)0 1779 y(an)j(arra)m(y)h(of)g(8-bit)g(in)m(tegers)g(b)m(y)g(sp)s (ecifying)f(the)h(TBYTE)f(datat)m(yp)s(e.)0 1939 y(Note)25 b(that)g(within)e(the)h(con)m(text)i(of)e(these)g(routines,)i(the)e (TSTRING)f(data)h(t)m(yp)s(e)g(corresp)s(onds)f(to)h(a)h(C)e('c)m (har**')0 2052 y(data)35 b(t)m(yp)s(e,)h(i.e.,)h(a)e(p)s(oin)m(ter)f (to)i(an)e(arra)m(y)h(of)g(p)s(oin)m(ters)f(to)h(an)g(arra)m(y)g(of)g (c)m(haracters.)54 b(This)34 b(is)g(di\013eren)m(t)h(from)0 2165 y(the)d(k)m(eyw)m(ord)h(reading)f(and)f(writing)h(routines)g (where)g(TSTRING)f(corresp)s(onds)g(to)h(a)h(C)e('c)m(har*')j(data)f(t) m(yp)s(e,)0 2278 y(i.e.,)g(a)e(single)h(p)s(oin)m(ter)f(to)h(an)f(arra) m(y)g(of)g(c)m(haracters.)45 b(When)30 b(reading)i(strings)e(from)h(a)g (table,)i(the)e(c)m(har)h(arra)m(ys)0 2391 y(ob)m(viously)f(m)m(ust)f (ha)m(v)m(e)i(b)s(een)e(allo)s(cated)i(long)f(enough)f(to)h(hold)f(the) h(whole)f(FITS)g(table)h(string.)0 2551 y(Numerical)i(data)g(v)-5 b(alues)33 b(are)g(automatically)j(scaled)d(b)m(y)f(the)h(TSCALn)e(and) h(TZER)m(On)f(k)m(eyw)m(ord)i(v)-5 b(alues)33 b(\(if)0 2664 y(they)e(exist\).)0 2824 y(In)25 b(the)g(case)i(of)e(binary)g (tables)h(with)f(v)m(ector)i(elemen)m(ts,)h(the)e('felem')g(parameter)g (de\014nes)f(the)g(starting)h(elemen)m(t)0 2937 y(\(b)s(eginning)h (with)g(1,)h(not)g(0\))g(within)f(the)g(cell)i(\(a)f(cell)g(is)f (de\014ned)f(as)i(the)f(in)m(tersection)i(of)f(a)f(ro)m(w)h(and)e(a)i (column)0 3050 y(and)e(ma)m(y)h(con)m(tain)h(a)g(single)f(v)-5 b(alue)27 b(or)g(a)g(v)m(ector)h(of)f(v)-5 b(alues\).)40 b(The)26 b(felem)i(parameter)f(is)g(ignored)f(when)g(dealing)0 3163 y(with)34 b(ASCI)s(I)e(tables.)52 b(Similarly)-8 b(,)36 b(in)d(the)i(case)f(of)h(binary)e(tables)h(the)h('nelemen)m(ts') g(parameter)f(sp)s(eci\014es)g(the)0 3275 y(total)28 b(n)m(um)m(b)s(er)d(of)h(v)m(ector)i(v)-5 b(alues)27 b(to)g(b)s(e)e(read)h(or)h(written)f(\(con)m(tin)m(uing)i(on)e (subsequen)m(t)f(ro)m(ws)i(if)f(required\))g(and)0 3388 y(not)31 b(the)f(n)m(um)m(b)s(er)f(of)i(table)g(cells.)0 3637 y Fi(1)81 b Fj(W)-8 b(rite)31 b(elemen)m(ts)h(in)m(to)f(an)g(ASCI) s(I)e(or)h(binary)f(table)j(column.)0 3885 y(The)38 b(\014rst)f (routine)h(simply)g(writes)g(the)g(arra)m(y)h(of)f(v)-5 b(alues)39 b(to)g(the)f(FITS)g(\014le)g(\(doing)g(data)h(t)m(yp)s(e)g (con)m(v)m(ersion)0 3998 y(if)h(necessary\))h(whereas)f(the)h(second)f (routine)h(will)f(substitute)h(the)f(appropriate)g(FITS)g(n)m(ull)g(v) -5 b(alue)41 b(for)f(all)0 4111 y(elemen)m(ts)34 b(whic)m(h)f(are)g (equal)h(to)f(the)g(input)f(v)-5 b(alue)34 b(of)f(n)m(ulv)-5 b(al)33 b(\(note)h(that)f(this)g(parameter)g(giv)m(es)i(the)e(address)0 4224 y(of)40 b(n)m(ulv)-5 b(al,)44 b(not)c(the)g(n)m(ull)g(v)-5 b(alue)41 b(itself)7 b(\).)72 b(F)-8 b(or)40 b(in)m(teger)i(columns)e (the)g(FITS)g(n)m(ull)g(v)-5 b(alue)40 b(is)h(de\014ned)e(b)m(y)h(the)0 4337 y(TNULLn)32 b(k)m(eyw)m(ord)i(\(an)g(error)e(is)i(returned)e(if)h (the)h(k)m(eyw)m(ord)f(do)s(esn't)g(exist\).)51 b(F)-8 b(or)34 b(\015oating)g(p)s(oin)m(t)f(columns)0 4449 y(the)h(sp)s(ecial) h(IEEE)f(NaN)h(\(Not-a-Num)m(b)s(er\))h(v)-5 b(alue)35 b(will)f(b)s(e)g(written)g(in)m(to)i(the)e(FITS)g(\014le.)52 b(If)34 b(a)h(n)m(ull)f(p)s(oin)m(ter)0 4562 y(is)f(en)m(tered)g(for)g (n)m(ulv)-5 b(al,)34 b(then)f(the)g(n)m(ull)g(v)-5 b(alue)33 b(is)g(ignored)g(and)g(this)g(routine)f(b)s(eha)m(v)m(es)i(the)f(same)g (as)h(the)f(\014rst)0 4675 y(routine.)41 b(The)29 b(third)g(routine)h (simply)f(writes)h(unde\014ned)d(pixel)k(v)-5 b(alues)30 b(to)g(the)g(column.)41 b(The)29 b(fourth)g(routine)0 4788 y(\014lls)e(ev)m(ery)i(column)e(in)h(the)g(table)g(with)g(n)m(ull) f(v)-5 b(alues,)29 b(in)e(the)h(sp)s(eci\014ed)f(ro)m(ws)h(\(ignoring)g (an)m(y)g(columns)g(that)g(do)0 4901 y(not)j(ha)m(v)m(e)g(a)g (de\014ned)e(n)m(ull)h(v)-5 b(alue\).)95 5149 y Fe(int)47 b(fits_write_col)d(/)k(ffpcl)286 5262 y(\(fitsfile)e(*fptr,)g(int)h (datatype,)e(int)i(colnum,)f(LONGLONG)f(firstrow,)334 5375 y(LONGLONG)h(firstelem,)f(LONGLONG)g(nelements,)g(DTYPE)i(*array,) e(>)j(int)f(*status\))95 5601 y(int)g(fits_write_colnull)c(/)48 b(ffpcn)286 5714 y(\(fitsfile)e(*fptr,)g(int)h(datatype,)e(int)i (colnum,)f(LONGLONG)f(firstrow,)p eop end %%Page: 55 63 TeXDict begin 55 62 bop 0 299 a Fh(5.7.)72 b(ASCI)s(I)29 b(AND)i(BINAR)-8 b(Y)31 b(T)-8 b(ABLE)31 b(R)m(OUTINES)1864 b Fj(55)286 555 y Fe(LONGLONG)46 b(firstelem,)f(LONGLONG)g(nelements,)g (DTYPE)i(*array,)f(DTYPE)g(*nulval,)286 668 y(>)i(int)f(*status\))143 894 y(int)g(fits_write_col_null)c(/)k(ffpclu)334 1007 y(\(fitsfile)e(*fptr,)h(int)h(colnum,)f(LONGLONG)g(firstrow,)f (LONGLONG)h(firstelem,)382 1120 y(LONGLONG)f(nelements,)g(>)j(int)f (*status\))143 1346 y(int)g(fits_write_nullrows)c(/)k(ffprwu)334 1458 y(\(fitsfile)e(*fptr,)h(LONGLONG)g(firstrow,)f(LONGLONG)h (nelements,)f(>)i(int)g(*status\))0 1783 y Fi(2)81 b Fj(Read)33 b(elemen)m(ts)i(from)e(an)g(ASCI)s(I)f(or)i(binary)e(table)i (column.)50 b(The)33 b(data)h(t)m(yp)s(e)g(parameter)g(sp)s(eci\014es)f (the)227 1896 y(data)28 b(t)m(yp)s(e)g(of)g(the)f(`n)m(ulv)-5 b(al')29 b(and)e(`arra)m(y')h(p)s(oin)m(ters;)h(Unde\014ned)c(arra)m(y) j(elemen)m(ts)h(will)f(b)s(e)f(returned)f(with)227 2009 y(a)k(v)-5 b(alue)30 b(=)e(*n)m(ullv)-5 b(al,)31 b(\(note)f(that)g (this)f(parameter)h(giv)m(es)g(the)g(address)e(of)h(the)h(n)m(ull)f(v) -5 b(alue,)30 b(not)g(the)f(n)m(ull)227 2122 y(v)-5 b(alue)31 b(itself)7 b(\))32 b(unless)e(n)m(ulv)-5 b(al)32 b(=)e(0)h(or)g(*n)m (ulv)-5 b(al)31 b(=)g(0,)g(in)f(whic)m(h)h(case)h(no)e(c)m(hec)m(king)j (for)d(unde\014ned)f(pixels)227 2235 y(will)34 b(b)s(e)f(p)s(erformed.) 48 b(The)33 b(second)g(routine)h(is)f(similar)h(except)g(that)g(an)m(y) g(unde\014ned)d(pixels)j(will)g(ha)m(v)m(e)227 2347 y(the)d(corresp)s (onding)e(n)m(ullarra)m(y)i(elemen)m(t)h(set)f(equal)g(to)g(TR)m(UE)f (\(=)h(1\).)227 2530 y(An)m(y)c(column,)g(regardless)f(of)g(it's)h(in)m (trinsic)g(data)g(t)m(yp)s(e,)g(ma)m(y)g(b)s(e)e(read)i(as)f(a)g (string.)40 b(It)26 b(should)f(b)s(e)h(noted)227 2643 y(ho)m(w)m(ev)m(er)32 b(that)f(reading)f(a)h(n)m(umeric)f(column)g(as)h (a)g(string)f(is)g(10)i(-)e(100)i(times)f(slo)m(w)m(er)g(than)f (reading)h(the)227 2756 y(same)22 b(column)g(as)f(a)h(n)m(um)m(b)s(er)e (due)h(to)i(the)e(large)i(o)m(v)m(erhead)g(in)e(constructing)h(the)g (formatted)g(strings.)37 b(The)227 2869 y(displa)m(y)26 b(format)g(of)f(the)h(returned)e(strings)h(will)h(b)s(e)f(determined)g (b)m(y)g(the)h(TDISPn)e(k)m(eyw)m(ord,)j(if)e(it)h(exists,)227 2982 y(otherwise)32 b(b)m(y)f(the)g(data)h(t)m(yp)s(e)f(of)g(the)g (column.)43 b(The)30 b(length)i(of)f(the)g(returned)f(strings)h(\(not)g (including)227 3095 y(the)26 b(n)m(ull)f(terminating)i(c)m(haracter\))g (can)f(b)s(e)f(determined)g(with)g(the)h(\014ts)p 2703 3095 28 4 v 32 w(get)p 2855 3095 V 34 w(col)p 2999 3095 V 34 w(displa)m(y)p 3311 3095 V 33 w(width)f(routine.)227 3208 y(The)30 b(follo)m(wing)i(TDISPn)d(displa)m(y)i(formats)f(are)h (curren)m(tly)f(supp)s(orted:)418 3554 y Fe(Iw.m)142 b(Integer)418 3667 y(Ow.m)g(Octal)47 b(integer)418 3780 y(Zw.m)142 b(Hexadecimal)45 b(integer)418 3893 y(Fw.d)142 b(Fixed)47 b(floating)e(point)418 4006 y(Ew.d)142 b(Exponential)45 b(floating)h(point)418 4119 y(Dw.d)142 b(Exponential)45 b(floating)h(point)418 4232 y(Gw.d)142 b(General;)46 b(uses)g(Fw.d)h(if)g(significance)e(not)i(lost,)f(else)h(Ew.d)227 4579 y Fj(where)24 b(w)h(is)f(the)h(width)f(in)g(c)m(haracters)i(of)f (the)g(displa)m(y)m(ed)g(v)-5 b(alues,)27 b(m)d(is)h(the)f(minim)m(um)g (n)m(um)m(b)s(er)g(of)g(digits)227 4692 y(displa)m(y)m(ed,)29 b(and)e(d)g(is)h(the)f(n)m(um)m(b)s(er)g(of)g(digits)i(to)f(the)g(righ) m(t)g(of)f(the)h(decimal.)41 b(The)27 b(.m)g(\014eld)g(is)h(optional.) 95 5016 y Fe(int)47 b(fits_read_col)e(/)i(ffgcv)286 5129 y(\(fitsfile)f(*fptr,)g(int)h(datatype,)e(int)i(colnum,)f(LONGLONG)f (firstrow,)g(LONGLONG)h(firstelem,)334 5242 y(LONGLONG)g(nelements,)f (DTYPE)h(*nulval,)g(DTYPE)g(*array,)g(int)h(*anynul,)e(int)i(*status\)) 95 5468 y(int)g(fits_read_colnull)c(/)48 b(ffgcf)286 5581 y(\(fitsfile)e(*fptr,)g(int)h(datatype,)e(int)i(colnum,)f (LONGLONG)f(firstrow,)g(LONGLONG)h(firstelem,)286 5694 y(LONGLONG)g(nelements,)f(DTYPE)h(*array,)g(char)h(*nullarray,)d(int)j (*anynul,)f(int)h(*status\))p eop end %%Page: 56 64 TeXDict begin 56 63 bop 0 299 a Fj(56)1379 b Fh(CHAPTER)30 b(5.)71 b(BASIC)30 b(CFITSIO)f(INTERF)-10 b(A)m(CE)30 b(R)m(OUTINES)0 555 y Fd(5.7.5)112 b(Ro)m(w)37 b(Selection)h(and)h (Calculator)f(Routines)0 774 y Fj(These)21 b(routines)f(all)i(parse)f (and)f(ev)-5 b(aluate)23 b(an)d(input)g(string)h(con)m(taining)i(a)e (user)f(de\014ned)g(arithmetic)i(expression.)0 887 y(The)29 b(\014rst)f(3)i(routines)f(select)i(ro)m(ws)e(in)g(a)h(FITS)e(table,)j (based)e(on)g(whether)g(the)g(expression)g(ev)-5 b(aluates)31 b(to)f(true)0 1000 y(\(not)e(equal)f(to)h(zero\))g(or)f(false)h (\(zero\).)41 b(The)27 b(other)g(routines)g(ev)-5 b(aluate)29 b(the)e(expression)g(and)f(calculate)k(a)d(v)-5 b(alue)0 1113 y(for)26 b(eac)m(h)i(ro)m(w)f(of)g(the)g(table.)40 b(The)26 b(allo)m(w)m(ed)j(expression)d(syn)m(tax)i(is)e(describ)s(ed)g (in)g(the)h(ro)m(w)g(\014lter)g(section)g(in)g(the)0 1226 y(`Extended)32 b(File)h(Name)g(Syn)m(tax')g(c)m(hapter)g(of)f (this)g(do)s(cumen)m(t.)46 b(The)32 b(expression)g(ma)m(y)h(also)g(b)s (e)e(written)i(to)g(a)0 1339 y(text)h(\014le,)h(and)e(the)h(name)f(of)h (the)f(\014le,)i(prep)s(ended)c(with)i(a)h('@')g(c)m(haracter)h(ma)m(y) f(b)s(e)f(supplied)f(for)h(the)h('expr')0 1452 y(parameter)d(\(e.g.)42 b('@\014lename.txt'\).)g(The)30 b(expression)g(in)g(the)g(\014le)h(can) f(b)s(e)g(arbitrarily)g(complex)h(and)f(extend)0 1564 y(o)m(v)m(er)35 b(m)m(ultiple)g(lines)g(of)f(the)g(\014le.)53 b(Lines)33 b(that)i(b)s(egin)f(with)g(2)g(slash)g(c)m(haracters)i (\('//'\))g(will)f(b)s(e)e(ignored)i(and)0 1677 y(ma)m(y)c(b)s(e)f (used)f(to)i(add)f(commen)m(ts)h(to)h(the)e(\014le.)0 1925 y Fi(1)81 b Fj(Ev)-5 b(aluate)38 b(a)f(b)s(o)s(olean)g(expression) g(o)m(v)m(er)h(the)g(indicated)f(ro)m(ws,)i(returning)d(an)h(arra)m(y)h (of)f(\015ags)g(indicating)227 2038 y(whic)m(h)31 b(ro)m(ws)g(ev)-5 b(aluated)32 b(to)f(TR)m(UE/F)-10 b(ALSE.)31 b(Up)s(on)f(return,)g(*n)p 2518 2038 28 4 v 33 w(go)s(o)s(d)p 2743 2038 V 33 w(ro)m(ws)g(con)m (tains)i(the)f(n)m(um)m(b)s(er)f(of)227 2151 y(ro)m(ws)h(that)g(ev)-5 b(aluate)32 b(to)f(TR)m(UE.)95 2399 y Fe(int)47 b(fits_find_rows)d(/)k (fffrow)286 2512 y(\(fitsfile)e(*fptr,)93 b(char)47 b(*expr,)f(long)h (firstrow,)e(long)i(nrows,)286 2625 y(>)h(long)e(*n_good_rows,)f(char)h (*row_status,)92 b(int)47 b(*status\))0 2872 y Fi(2)81 b Fj(Find)29 b(the)i(\014rst)f(ro)m(w)g(whic)m(h)g(satis\014es)h(the)g (input)e(b)s(o)s(olean)h(expression)95 3120 y Fe(int)47 b(fits_find_first_row)c(/)k(ffffrw)286 3233 y(\(fitsfile)f(*fptr,)93 b(char)47 b(*expr,)f(>)i(long)e(*rownum,)g(int)h(*status\))0 3481 y Fi(3)81 b Fj(Ev)-5 b(aluate)35 b(an)f(expression)h(on)f(all)h (ro)m(ws)g(of)f(a)h(table.)54 b(If)34 b(the)g(input)g(and)g(output)g (\014les)g(are)h(not)g(the)f(same,)227 3594 y(cop)m(y)i(the)g(TR)m(UE)f (ro)m(ws)g(to)h(the)f(output)g(\014le;)j(if)d(the)g(output)g(table)h (is)f(not)h(empt)m(y)-8 b(,)37 b(then)e(this)g(routine)227 3707 y(will)28 b(app)s(end)e(the)i(new)f(selected)i(ro)m(ws)e(after)h (the)g(existing)h(ro)m(ws.)39 b(If)27 b(the)h(\014les)g(are)f(the)h (same,)h(delete)g(the)227 3819 y(F)-10 b(ALSE)30 b(ro)m(ws)h(\(preserv) m(e)f(the)h(TR)m(UE)f(ro)m(ws\).)95 4067 y Fe(int)47 b(fits_select_rows)d(/)j(ffsrow)286 4180 y(\(fitsfile)f(*infptr,)f (fitsfile)h(*outfptr,)93 b(char)46 b(*expr,)94 b(>)48 b(int)f(*status)e(\))0 4428 y Fi(4)81 b Fj(Calculate)28 b(an)f(expression)f(for)h(the)f(indicated)i(ro)m(ws)e(of)h(a)g(table,)i (returning)d(the)h(results,)g(cast)h(as)f(datat)m(yp)s(e)227 4541 y(\(TSHOR)-8 b(T,)32 b(TDOUBLE,)h(etc\),)h(in)e(arra)m(y)-8 b(.)48 b(If)31 b(n)m(ulv)-5 b(al==NULL,)33 b(UNDEFs)g(will)f(b)s(e)g (zero)s(ed)g(out.)47 b(F)-8 b(or)227 4654 y(v)m(ector)37 b(results,)f(the)f(n)m(um)m(b)s(er)e(of)i(elemen)m(ts)i(returned)c(ma)m (y)j(b)s(e)e(less)h(than)g(nelemen)m(ts)g(if)g(nelemen)m(ts)h(is)227 4767 y(not)c(an)g(ev)m(en)h(m)m(ultiple)f(of)g(the)g(result)g (dimension.)44 b(Call)33 b(\014ts)p 2392 4767 V 32 w(test)p 2570 4767 V 34 w(expr)e(to)h(obtain)h(the)f(dimensions)f(of)227 4880 y(the)g(results.)95 5127 y Fe(int)47 b(fits_calc_rows)d(/)k (ffcrow)286 5240 y(\(fitsfile)e(*fptr,)93 b(int)47 b(datatype,)f(char)g (*expr,)g(long)h(firstrow,)334 5353 y(long)g(nelements,)e(void)h (*nulval,)g(>)h(void)g(*array,)94 b(int)46 b(*anynul,)g(int)h (*status\))0 5601 y Fi(5)81 b Fj(Ev)-5 b(aluate)33 b(an)g(expression)f (and)h(write)f(the)h(result)g(either)g(to)h(a)f(column)f(\(if)h(the)g (expression)f(is)h(a)g(function)227 5714 y(of)d(other)g(columns)g(in)f (the)h(table\))h(or)f(to)g(a)h(k)m(eyw)m(ord)f(\(if)g(the)g(expression) f(ev)-5 b(aluates)32 b(to)e(a)g(constan)m(t)i(and)p eop end %%Page: 57 65 TeXDict begin 57 64 bop 0 299 a Fh(5.7.)72 b(ASCI)s(I)29 b(AND)i(BINAR)-8 b(Y)31 b(T)-8 b(ABLE)31 b(R)m(OUTINES)1864 b Fj(57)227 555 y(is)31 b(not)f(a)h(function)f(of)h(other)f(columns)h (in)f(the)g(table\).)42 b(In)30 b(the)h(former)e(case,)j(the)f(parName) f(parameter)227 668 y(is)40 b(the)g(name)f(of)h(the)g(column)f(\(whic)m (h)h(ma)m(y)g(or)f(ma)m(y)h(not)g(already)g(exist\))h(in)m(to)f(whic)m (h)g(to)g(write)g(the)227 781 y(results,)e(and)f(parInfo)e(con)m(tains) j(an)f(optional)g(TF)m(ORM)g(k)m(eyw)m(ord)g(v)-5 b(alue)38 b(if)e(a)h(new)f(column)h(is)f(b)s(eing)227 894 y(created.)42 b(If)28 b(a)h(TF)m(ORM)h(v)-5 b(alue)29 b(is)g(not)g(sp)s(eci\014ed)g (then)f(a)i(default)f(format)g(will)h(b)s(e)e(used,)h(dep)s(ending)e (on)227 1007 y(the)35 b(expression.)54 b(If)34 b(the)h(expression)f(ev) -5 b(aluates)37 b(to)e(a)g(constan)m(t,)i(then)e(the)g(result)f(will)h (b)s(e)f(written)h(to)227 1120 y(the)28 b(k)m(eyw)m(ord)g(name)f(giv)m (en)h(b)m(y)g(the)f(parName)h(parameter,)h(and)d(the)i(parInfo)e (parameter)i(ma)m(y)g(b)s(e)f(used)227 1233 y(to)k(supply)e(an)h (optional)i(commen)m(t)f(for)f(the)g(k)m(eyw)m(ord.)42 b(If)29 b(the)i(k)m(eyw)m(ord)g(do)s(es)f(not)g(already)h(exist,)g (then)227 1346 y(the)f(name)f(of)h(the)g(k)m(eyw)m(ord)g(m)m(ust)f(b)s (e)g(preceded)g(with)g(a)h('#')f(c)m(haracter,)j(otherwise)e(the)f (result)h(will)g(b)s(e)227 1458 y(written)h(to)g(a)g(column)f(with)g (that)h(name.)95 1719 y Fe(int)47 b(fits_calculator)d(/)j(ffcalc)286 1832 y(\(fitsfile)f(*infptr,)f(char)i(*expr,)f(fitsfile)f(*outfptr,)h (char)g(*parName,)334 1945 y(char)h(*parInfo,)e(>)95 b(int)47 b(*status\))0 2205 y Fi(6)81 b Fj(This)38 b(calculator)k (routine)e(is)f(similar)h(to)g(the)g(previous)f(routine,)j(except)f (that)f(the)g(expression)f(is)h(only)227 2318 y(ev)-5 b(aluated)42 b(o)m(v)m(er)f(the)f(sp)s(eci\014ed)g(ro)m(w)g(ranges.)70 b(nranges)39 b(sp)s(eci\014es)h(the)g(n)m(um)m(b)s(er)f(of)h(ro)m(w)h (ranges,)i(and)227 2431 y(\014rstro)m(w)30 b(and)g(lastro)m(w)h(giv)m (e)h(the)f(starting)g(and)f(ending)g(ro)m(w)g(n)m(um)m(b)s(er)f(of)i (eac)m(h)g(range.)95 2691 y Fe(int)47 b(fits_calculator_rng)c(/)k (ffcalc_rng)286 2804 y(\(fitsfile)f(*infptr,)f(char)i(*expr,)f (fitsfile)f(*outfptr,)h(char)g(*parName,)334 2917 y(char)h(*parInfo,)e (int)i(nranges,)e(long)i(*firstrow,)e(long)i(*lastrow)334 3030 y(>)95 b(int)47 b(*status\))0 3290 y Fi(7)81 b Fj(Ev)-5 b(aluate)36 b(the)f(giv)m(en)h(expression)f(and)g(return)f(dimension)g (and)h(t)m(yp)s(e)g(information)g(on)g(the)h(result.)54 b(The)227 3403 y(returned)37 b(dimensions)f(corresp)s(ond)g(to)j(a)e (single)i(ro)m(w)e(en)m(try)h(of)f(the)h(requested)f(expression,)j(and) d(are)227 3516 y(equiv)-5 b(alen)m(t)26 b(to)f(the)g(result)f(of)g (\014ts)p 1380 3516 28 4 v 33 w(read)p 1585 3516 V 32 w(tdim\(\).)40 b(Note)25 b(that)g(strings)f(are)h(considered)f(to)h(b)s (e)f(one)g(elemen)m(t)227 3629 y(regardless)31 b(of)g(string)f(length.) 41 b(If)30 b(maxdim)g(==)g(0,)h(then)f(naxes)g(is)h(optional.)95 3889 y Fe(int)47 b(fits_test_expr)d(/)k(fftexp)286 4002 y(\(fitsfile)e(*fptr,)g(char)g(*expr,)g(int)h(maxdim)f(>)i(int)f (*datatype,)e(long)h(*nelem,)g(int)h(*naxis,)334 4115 y(long)g(*naxes,)f(int)g(*status\))0 4407 y Fd(5.7.6)112 b(Column)39 b(Binning)f(or)f(Histogramming)i(Routines)0 4626 y Fj(The)30 b(follo)m(wing)j(routines)e(ma)m(y)g(b)s(e)g(useful)f (when)g(p)s(erforming)g(histogramming)h(op)s(erations)h(on)e (column\(s\))i(of)0 4738 y(a)f(table)g(to)g(generate)h(an)e(image)i(in) e(a)h(primary)e(arra)m(y)i(or)f(image)i(extension.)0 4999 y Fi(1)81 b Fj(Calculate)27 b(the)e(histogramming)h(parameters)g (\(min,)h(max,)f(and)f(bin)g(size)h(for)f(eac)m(h)i(axis)f(of)f(the)h (histogram,)227 5112 y(based)38 b(on)g(a)g(v)-5 b(ariet)m(y)39 b(of)f(p)s(ossible)g(input)f(parameters.)64 b(If)37 b(the)h(input)f (names)h(of)g(the)g(columns)g(to)h(b)s(e)227 5225 y(binned)d(are)i(n)m (ull,)h(then)e(the)h(routine)f(will)h(\014rst)f(lo)s(ok)h(for)f(the)h (CPREF)f(=)g("NAME1,)j(NAME2,)h(...")227 5337 y(k)m(eyw)m(ord)34 b(whic)m(h)f(lists)h(the)g(preferred)e(columns.)50 b(If)32 b(not)i(presen)m(t,)h(then)e(the)g(routine)h(will)g(assume)f(the)227 5450 y(column)d(names)h(X,)f(Y,)h(Z,)f(and)g(T)g(for)g(up)g(to)h(4)f (axes)h(\(as)g(sp)s(eci\014ed)f(b)m(y)g(the)h(NAXIS)f(parameter\).)227 5601 y(MININ)39 b(and)f(MAXIN)h(are)g(input)e(arra)m(ys)i(that)g(giv)m (e)h(the)f(minim)m(um)e(and)h(maxim)m(um)h(v)-5 b(alue)39 b(for)f(the)227 5714 y(histogram,)30 b(along)f(eac)m(h)g(axis.)40 b(Alternativ)m(ely)-8 b(,)32 b(the)c(name)g(of)h(k)m(eyw)m(ords)f(that) h(giv)m(e)g(the)f(min,)h(max,)g(and)p eop end %%Page: 58 66 TeXDict begin 58 65 bop 0 299 a Fj(58)1379 b Fh(CHAPTER)30 b(5.)71 b(BASIC)30 b(CFITSIO)f(INTERF)-10 b(A)m(CE)30 b(R)m(OUTINES)227 555 y Fj(binsize)e(ma)m(y)g(b)s(e)f(giv)m(e)h(with)f (the)h(MINNAME,)h(MAXNAME,)f(and)f(BINNAME)h(arra)m(y)g(parameters.)40 b(If)227 668 y(the)33 b(v)-5 b(alue)34 b(=)e(DOUBLENULL)-10 b(V)g(ALUE)33 b(and)g(no)f(k)m(eyw)m(ord)i(names)e(are)h(giv)m(en,)i (then)e(the)g(routine)g(will)227 781 y(use)i(the)f(TLMINn)g(and)g (TLMAXn)g(k)m(eyw)m(ords,)j(if)d(presen)m(t,)i(or)f(the)f(actual)i(min) e(and/or)h(max)g(v)-5 b(alues)227 894 y(in)30 b(the)h(column.)227 1046 y(BINSIZEIN)j(is)h(an)g(arra)m(y)g(giving)h(the)f(binsize)g(along) h(eac)m(h)g(axis.)55 b(If)34 b(the)h(v)-5 b(alue)36 b(=)e(DOUBLENULL-) 227 1159 y(V)-10 b(ALUE,)38 b(and)e(a)i(k)m(eyw)m(ord)f(name)g(is)h (not)f(sp)s(eci\014ed)f(with)h(BINNAME,)h(then)f(this)g(routine)g(will) h(\014rst)227 1272 y(lo)s(ok)d(for)f(the)g(TDBINn)g(k)m(eyw)m(ord,)i (or)f(else)g(will)f(use)g(a)h(binsize)f(=)g(1,)h(or)g(a)f(binsize)g (that)h(pro)s(duces)e(10)227 1385 y(histogram)e(bins,)f(whic)m(h)g(ev)m (er)h(is)g(smaller.)95 1649 y Fe(int)47 b(fits_calc_binning)143 1761 y(Input)g(parameters:)239 1874 y(\(fitsfile)e(*fptr,)94 b(/*)47 b(IO)g(-)h(pointer)d(to)j(table)e(to)h(be)g(binned)667 b(*/)286 1987 y(int)47 b(naxis,)333 b(/*)47 b(I)g(-)h(number)e(of)h (axes/columns)e(in)i(the)g(binned)f(image)94 b(*/)286 2100 y(char)47 b(colname[4][FLEN_VALUE],)137 b(/*)47 b(I)h(-)f(optional)f(column)g(names)428 b(*/)286 2213 y(double)46 b(*minin,)237 b(/*)47 b(I)h(-)f(optional)f(lower)g(bound)h (value)f(for)h(each)f(axis)95 b(*/)286 2326 y(double)46 b(*maxin,)237 b(/*)47 b(I)h(-)f(optional)f(upper)g(bound)h(value,)f (for)h(each)f(axis)h(*/)286 2439 y(double)f(*binsizein,)f(/*)i(I)h(-)f (optional)f(bin)h(size)f(along)h(each)f(axis)429 b(*/)286 2552 y(char)47 b(minname[4][FLEN_VALUE],)41 b(/*)48 b(I)f(-)h(optional) d(keywords)h(for)h(min)333 b(*/)286 2665 y(char)47 b (maxname[4][FLEN_VALUE],)41 b(/*)48 b(I)f(-)h(optional)d(keywords)h (for)h(max)333 b(*/)286 2778 y(char)47 b(binname[4][FLEN_VALUE],)41 b(/*)48 b(I)f(-)h(optional)d(keywords)h(for)h(binsize)141 b(*/)143 2891 y(Output)46 b(parameters:)286 3003 y(int)h(*colnum,)237 b(/*)47 b(O)g(-)h(column)e(numbers,)f(to)j(be)f(binned)f(*/)286 3116 y(long)h(*naxes,)237 b(/*)47 b(O)g(-)h(number)e(of)h(bins)g(in)g (each)g(histogram)e(axis)h(*/)286 3229 y(float)h(*amin,)237 b(/*)47 b(O)g(-)h(lower)e(bound)h(of)g(the)g(histogram)e(axes)i(*/)286 3342 y(float)g(*amax,)237 b(/*)47 b(O)g(-)h(upper)e(bound)h(of)g(the)g (histogram)e(axes)i(*/)286 3455 y(float)g(*binsize,)93 b(/*)47 b(O)g(-)h(width)e(of)h(histogram)f(bins/pixels)e(on)k(each)e (axis)h(*/)286 3568 y(int)g(*status\))0 3832 y Fi(2)81 b Fj(Cop)m(y)26 b(the)h(relev)-5 b(an)m(t)28 b(k)m(eyw)m(ords)f(from)g (the)g(header)f(of)h(the)g(table)h(that)f(is)g(b)s(eing)f(binned,)h(to) g(the)g(the)g(header)227 3945 y(of)e(the)h(output)e(histogram)i(image.) 40 b(This)24 b(will)i(not)f(cop)m(y)h(the)f(table)h(structure)f(k)m (eyw)m(ords)g(\(e.g.,)j(NAXIS,)227 4057 y(TF)m(ORMn,)j(TTYPEn,)f (etc.\))44 b(nor)31 b(will)g(it)g(cop)m(y)h(the)f(k)m(eyw)m(ords)g (that)h(apply)e(to)i(other)f(columns)g(of)g(the)227 4170 y(table)g(that)g(are)f(not)h(used)e(to)i(create)g(the)f(histogram.)42 b(This)29 b(routine)h(will)g(translate)h(the)g(names)f(of)g(the)227 4283 y(W)-8 b(orld)27 b(Co)s(ordinate)e(System)h(\(W)m(CS\))g(k)m(eyw)m (ords)g(for)g(the)g(binned)e(columns)h(in)m(to)i(the)f(form)f(that)h (is)g(need)227 4396 y(for)h(a)g(FITS)g(image)h(\(e.g.,)h(the)e(TCTYPn)f (table)i(k)m(eyw)m(ord)f(will)g(b)s(e)g(translated)g(to)h(the)f(CTYPEn) f(image)227 4509 y(k)m(eyw)m(ord\).)95 4773 y Fe(int)47 b(fits_copy_pixlist2image)286 4886 y(\(fitsfile)f(*infptr,)141 b(/*)47 b(I)g(-)h(pointer)e(to)h(input)f(HDU)h(*/)334 4999 y(fitsfile)f(*outfptr,)93 b(/*)47 b(I)g(-)h(pointer)e(to)h(output) f(HDU)h(*/)334 5111 y(int)g(firstkey,)332 b(/*)47 b(I)g(-)h(first)e (HDU)h(keyword)f(to)h(start)f(with)h(*/)334 5224 y(int)g(naxis,)476 b(/*)47 b(I)g(-)h(number)e(of)h(axes)g(in)g(the)g(image)f(*/)334 5337 y(int)h(*colnum,)380 b(/*)47 b(I)g(-)h(numbers)e(of)h(the)g (columns)e(to)j(be)f(binned)94 b(*/)334 5450 y(int)47 b(*status\))380 b(/*)47 b(IO)g(-)g(error)g(status)f(*/)0 5714 y Fi(3)81 b Fj(W)-8 b(rite)36 b(a)f(set)h(of)f(default)h(W)m(CS)f (k)m(eyw)m(ords)g(to)h(the)f(histogram)h(header,)g(IF)f(the)g(W)m(CS)g (k)m(eyw)m(ords)h(do)f(not)p eop end %%Page: 59 67 TeXDict begin 59 66 bop 0 299 a Fh(5.7.)72 b(ASCI)s(I)29 b(AND)i(BINAR)-8 b(Y)31 b(T)-8 b(ABLE)31 b(R)m(OUTINES)1864 b Fj(59)227 555 y(already)40 b(exist.)69 b(This)38 b(will)i(create)h(a) e(linear)h(W)m(CS)f(where)g(the)h(co)s(ordinate)g(t)m(yp)s(es)f(are)h (equal)g(to)g(the)227 668 y(original)32 b(column)e(names.)95 953 y Fe(int)47 b(fits_write_keys_histo)239 1066 y(\(fitsfile)e(*fptr,) 237 b(/*)47 b(I)h(-)f(pointer)f(to)h(table)f(to)i(be)f(binned)666 b(*/)286 1179 y(fitsfile)46 b(*histptr,)93 b(/*)47 b(I)h(-)f(pointer)f (to)h(output)f(histogram)f(image)i(HDU)285 b(*/)286 1292 y(int)47 b(naxis,)476 b(/*)47 b(I)h(-)f(number)f(of)h(axes)g(in)g(the)g (histogram)e(image)285 b(*/)286 1405 y(int)47 b(*colnum,)380 b(/*)47 b(I)h(-)f(column)f(numbers)g(of)h(the)g(binned)f(columns)332 b(*/)286 1518 y(int)47 b(*status\))0 1803 y Fi(4)81 b Fj(Up)s(date)29 b(the)i(W)m(CS)f(k)m(eyw)m(ords)g(in)g(a)g(histogram)h (image)g(header)f(that)h(giv)m(e)g(the)f(lo)s(cation)i(of)e(the)g (reference)227 1916 y(pixel)h(\(CRPIXn\),)f(and)g(the)h(pixel)f(size)h (\(CDEL)-8 b(Tn\),)31 b(in)f(the)h(binned)e(image.)95 2201 y Fe(int)47 b(fits_rebin_wcs)239 2314 y(\(fitsfile)e(*fptr,)237 b(/*)47 b(I)h(-)f(pointer)f(to)h(table)f(to)i(be)f(binned)523 b(*/)286 2426 y(int)47 b(naxis,)476 b(/*)47 b(I)h(-)f(number)f(of)h (axes)g(in)g(the)g(histogram)e(image)142 b(*/)286 2539 y(float)47 b(*amin,)380 b(/*)47 b(I)h(-)f(first)f(pixel)h(include)f(in) h(each)f(axis)381 b(*/)286 2652 y(float)47 b(*binsize,)236 b(/*)47 b(I)h(-)f(binning)f(factor)g(for)h(each)f(axis)572 b(*/)286 2765 y(int)47 b(*status\))0 3050 y Fi(5)81 b Fj(Bin)33 b(the)h(v)-5 b(alues)35 b(in)e(the)h(input)f(table)h (columns,)h(and)e(write)h(the)g(histogram)h(arra)m(y)f(to)g(the)g (output)g(FITS)227 3163 y(image)e(\(histptr\).)95 3448 y Fe(int)47 b(fits_make_hist)143 3561 y(\(fitsfile)e(*fptr,)190 b(/*)47 b(I)g(-)h(pointer)e(to)h(table)f(with)h(X)g(and)g(Y)h(cols;)285 b(*/)191 3674 y(fitsfile)45 b(*histptr,)h(/*)h(I)g(-)h(pointer)e(to)h (output)f(FITS)h(image)619 b(*/)191 3787 y(int)47 b(bitpix,)380 b(/*)47 b(I)g(-)h(datatype)d(for)i(image:)f(16,)h(32,)g(-32,)g(etc)238 b(*/)191 3900 y(int)47 b(naxis,)428 b(/*)47 b(I)g(-)h(number)e(of)h (axes)g(in)g(the)g(histogram)e(image)190 b(*/)191 4013 y(long)47 b(*naxes,)332 b(/*)47 b(I)g(-)h(size)e(of)i(axes)e(in)h(the)g (histogram)f(image)285 b(*/)191 4126 y(int)47 b(*colnum,)332 b(/*)47 b(I)g(-)h(column)e(numbers)g(\(array)g(length)g(=)h(naxis\))190 b(*/)191 4238 y(float)46 b(*amin,)333 b(/*)47 b(I)g(-)h(minimum)e (histogram)f(value,)h(for)h(each)g(axis)142 b(*/)191 4351 y(float)46 b(*amax,)333 b(/*)47 b(I)g(-)h(maximum)e(histogram)f (value,)h(for)h(each)g(axis)142 b(*/)191 4464 y(float)46 b(*binsize,)189 b(/*)47 b(I)g(-)h(bin)f(size)f(along)h(each)f(axis)811 b(*/)191 4577 y(float)46 b(weight,)285 b(/*)47 b(I)g(-)h(binning)e (weighting)f(factor)h(\(FLOATNULLVALUE)e(*/)1098 4690 y(/*)238 b(for)47 b(no)g(weighting\))1143 b(*/)191 4803 y(int)47 b(wtcolnum,)284 b(/*)47 b(I)g(-)h(keyword)e(or)h(col)g(for)g (weight)284 b(\(or)47 b(NULL\))g(*/)191 4916 y(int)g(recip,)428 b(/*)47 b(I)g(-)h(use)f(reciprocal)e(of)i(the)g(weight?)f(0)h(or)g(1) 239 b(*/)191 5029 y(char)47 b(*selectrow,)140 b(/*)47 b(I)g(-)h(optional)d(array)i(\(length)f(=)h(no.)g(of)477 b(*/)1098 5142 y(/*)47 b(rows)g(in)g(the)g(table\).)93 b(If)47 b(the)g(element)f(is)h(true)95 b(*/)1098 5255 y(/*)47 b(then)g(the)f(corresponding)f(row)i(of)g(the)g(table)f(will)h (*/)1098 5368 y(/*)g(be)g(included)f(in)h(the)g(histogram,)e(otherwise) g(the)95 b(*/)1098 5480 y(/*)47 b(row)g(will)f(be)i(skipped.)93 b(Ingnored)45 b(if)j(*selectrow)d(*/)1098 5593 y(/*)i(is)g(equal)f(to)i (NULL.)1335 b(*/)191 5706 y(int)47 b(*status\))p eop end %%Page: 60 68 TeXDict begin 60 67 bop 0 299 a Fj(60)1379 b Fh(CHAPTER)30 b(5.)71 b(BASIC)30 b(CFITSIO)f(INTERF)-10 b(A)m(CE)30 b(R)m(OUTINES)0 555 y Ff(5.8)135 b(Utilit)l(y)47 b(Routines)0 809 y Fd(5.8.1)112 b(File)39 b(Chec)m(ksum)f(Routines)0 1028 y Fj(The)33 b(follo)m(wing)h(routines)f(either)h(compute)f(or)h(v) -5 b(alidate)34 b(the)g(c)m(hec)m(ksums)f(for)g(the)h(CHDU.)g(The)e(D)m (A)-8 b(T)g(ASUM)0 1140 y(k)m(eyw)m(ord)33 b(is)f(used)f(to)i(store)f (the)h(n)m(umerical)f(v)-5 b(alue)33 b(of)f(the)g(32-bit,)i(1's)f (complemen)m(t)g(c)m(hec)m(ksum)g(for)f(the)g(data)0 1253 y(unit)26 b(alone.)40 b(If)25 b(there)h(is)h(no)e(data)i(unit)f (then)f(the)h(v)-5 b(alue)27 b(is)f(set)g(to)h(zero.)40 b(The)26 b(n)m(umerical)g(v)-5 b(alue)27 b(is)f(stored)g(as)g(an)0 1366 y(ASCI)s(I)20 b(string)i(of)h(digits,)h(enclosed)f(in)e(quotes,)k (b)s(ecause)d(the)g(v)-5 b(alue)23 b(ma)m(y)f(b)s(e)f(to)s(o)i(large)g (to)g(represen)m(t)f(as)g(a)h(32-bit)0 1479 y(signed)28 b(in)m(teger.)41 b(The)27 b(CHECKSUM)g(k)m(eyw)m(ord)i(is)f(used)f(to)h (store)h(the)f(ASCI)s(I)e(enco)s(ded)i(COMPLEMENT)f(of)0 1592 y(the)f(c)m(hec)m(ksum)h(for)f(the)h(en)m(tire)g(HDU.)g(Storing)f (the)h(complemen)m(t,)h(rather)e(than)g(the)h(actual)g(c)m(hec)m(ksum,) h(forces)0 1705 y(the)k(c)m(hec)m(ksum)h(for)f(the)h(whole)f(HDU)h(to)g (equal)g(zero.)47 b(If)31 b(the)i(\014le)f(has)g(b)s(een)f(mo)s (di\014ed)g(since)i(the)f(c)m(hec)m(ksums)0 1818 y(w)m(ere)39 b(computed,)i(then)e(the)g(HDU)g(c)m(hec)m(ksum)h(will)f(usually)f(not) h(equal)h(zero.)66 b(These)39 b(c)m(hec)m(ksum)g(k)m(eyw)m(ord)0 1931 y(con)m(v)m(en)m(tions)34 b(are)f(based)f(on)g(a)g(pap)s(er)f(b)m (y)h(Rob)g(Seaman)g(published)f(in)h(the)g(pro)s(ceedings)g(of)g(the)h (AD)m(ASS)f(IV)0 2044 y(conference)h(in)e(Baltimore)j(in)d(No)m(v)m(em) m(b)s(er)i(1994)h(and)d(a)h(later)h(revision)f(in)f(June)g(1995.)47 b(See)32 b(App)s(endix)e(B)i(for)0 2157 y(the)f(de\014nition)f(of)g (the)h(parameters)f(used)g(in)g(these)h(routines.)0 2407 y Fi(1)81 b Fj(Compute)33 b(and)g(write)h(the)g(D)m(A)-8 b(T)g(ASUM)35 b(and)e(CHECKSUM)g(k)m(eyw)m(ord)h(v)-5 b(alues)34 b(for)f(the)h(CHDU)g(in)m(to)h(the)227 2520 y(curren)m(t)d(header.)46 b(If)32 b(the)g(k)m(eyw)m(ords)h(already)g (exist,)g(their)g(v)-5 b(alues)32 b(will)h(b)s(e)e(up)s(dated)g(only)h (if)h(necessary)227 2633 y(\(i.e.,)f(if)f(the)f(\014le)h(has)f(b)s(een) f(mo)s(di\014ed)h(since)g(the)h(original)h(k)m(eyw)m(ord)e(v)-5 b(alues)31 b(w)m(ere)g(computed\).)95 2883 y Fe(int)47 b(fits_write_chksum)c(/)48 b(ffpcks)286 2996 y(\(fitsfile)e(*fptr,)g(>) h(int)g(*status\))0 3246 y Fi(2)81 b Fj(Up)s(date)28 b(the)h(CHECKSUM)e(k)m(eyw)m(ord)i(v)-5 b(alue)29 b(in)f(the)h(CHDU,)g (assuming)f(that)h(the)f(D)m(A)-8 b(T)g(ASUM)30 b(k)m(eyw)m(ord)227 3359 y(exists)36 b(and)f(already)h(has)f(the)h(correct)g(v)-5 b(alue.)56 b(This)35 b(routine)g(calculates)j(the)e(new)f(c)m(hec)m (ksum)h(for)f(the)227 3471 y(curren)m(t)40 b(header)g(unit,)j(adds)c (it)i(to)g(the)f(data)h(unit)f(c)m(hec)m(ksum,)k(enco)s(des)c(the)g(v) -5 b(alue)41 b(in)m(to)g(an)f(ASCI)s(I)227 3584 y(string,)31 b(and)f(writes)g(the)h(string)f(to)h(the)g(CHECKSUM)e(k)m(eyw)m(ord.)95 3834 y Fe(int)47 b(fits_update_chksum)c(/)48 b(ffupck)286 3947 y(\(fitsfile)e(*fptr,)g(>)h(int)g(*status\))0 4197 y Fi(3)81 b Fj(V)-8 b(erify)35 b(the)f(CHDU)h(b)m(y)g(computing)f(the)h (c)m(hec)m(ksums)g(and)f(comparing)h(them)f(with)g(the)h(k)m(eyw)m (ords.)53 b(The)227 4310 y(data)34 b(unit)f(is)g(v)m(eri\014ed)g (correctly)h(if)f(the)h(computed)f(c)m(hec)m(ksum)g(equals)h(the)f(v)-5 b(alue)34 b(of)f(the)g(D)m(A)-8 b(T)g(ASUM)227 4423 y(k)m(eyw)m(ord.)64 b(The)37 b(c)m(hec)m(ksum)i(for)f(the)g(en)m(tire)g(HDU)h(\(header)f (plus)f(data)i(unit\))e(is)h(correct)h(if)f(it)h(equals)227 4536 y(zero.)47 b(The)32 b(output)f(D)m(A)-8 b(T)g(A)m(OK)34 b(and)d(HDUOK)i(parameters)f(in)g(this)g(routine)g(are)g(in)m(tegers)i (whic)m(h)e(will)227 4649 y(ha)m(v)m(e)k(a)f(v)-5 b(alue)35 b(=)f(1)h(if)f(the)h(data)g(or)f(HDU)h(is)g(v)m(eri\014ed)f(correctly) -8 b(,)38 b(a)d(v)-5 b(alue)35 b(=)f(0)h(if)f(the)h(D)m(A)-8 b(T)g(ASUM)36 b(or)227 4762 y(CHECKSUM)29 b(k)m(eyw)m(ord)g(is)h(not)f (presen)m(t,)h(or)f(v)-5 b(alue)30 b(=)f(-1)h(if)f(the)h(computed)f(c)m (hec)m(ksum)h(is)f(not)h(correct.)95 5125 y Fe(int)47 b(fits_verify_chksum)c(/)48 b(ffvcks)286 5238 y(\(fitsfile)e(*fptr,)g (>)h(int)g(*dataok,)f(int)h(*hduok,)e(int)i(*status\))0 5488 y Fi(4)81 b Fj(Compute)40 b(and)g(return)g(the)h(c)m(hec)m(ksum)g (v)-5 b(alues)41 b(for)g(the)g(CHDU)g(without)g(creating)h(or)f(mo)s (difying)f(the)227 5601 y(CHECKSUM)33 b(and)h(D)m(A)-8 b(T)g(ASUM)35 b(k)m(eyw)m(ords.)52 b(This)33 b(routine)h(is)g(used)f (in)m(ternally)i(b)m(y)f(\013v)m(c)m(ks,)i(but)d(ma)m(y)227 5714 y(b)s(e)d(useful)g(in)g(other)g(situations)h(as)g(w)m(ell.)p eop end %%Page: 61 69 TeXDict begin 61 68 bop 0 299 a Fh(5.8.)72 b(UTILITY)30 b(R)m(OUTINES)2693 b Fj(61)95 555 y Fe(int)47 b(fits_get_chksum/)d (/ffgcks)286 668 y(\(fitsfile)i(*fptr,)g(>)h(unsigned)f(long)g (*datasum,)g(unsigned)f(long)i(*hdusum,)334 781 y(int)g(*status\))0 1022 y Fi(5)81 b Fj(Enco)s(de)23 b(a)h(c)m(hec)m(ksum)g(v)-5 b(alue)24 b(in)m(to)g(a)g(16-c)m(haracter)j(string.)38 b(If)23 b(complm)h(is)f(non-zero)i(\(true\))f(then)f(the)h(32-bit)227 1135 y(sum)30 b(v)-5 b(alue)31 b(will)f(b)s(e)g(complemen)m(ted)h(b)s (efore)f(enco)s(ding.)95 1376 y Fe(int)47 b(fits_encode_chksum)c(/)48 b(ffesum)286 1489 y(\(unsigned)e(long)g(sum,)h(int)g(complm,)f(>)h (char)g(*ascii\);)0 1730 y Fi(6)81 b Fj(Deco)s(de)24 b(a)f(16-c)m(haracter)j(c)m(hec)m(ksum)e(string)f(in)m(to)g(a)h (unsigned)e(long)h(v)-5 b(alue.)39 b(If)23 b(is)g(non-zero)g(\(true\).) 39 b(then)23 b(the)227 1842 y(32-bit)33 b(sum)d(v)-5 b(alue)32 b(will)g(b)s(e)f(complemen)m(ted)h(after)g(deco)s(ding.)44 b(The)31 b(c)m(hec)m(ksum)h(v)-5 b(alue)32 b(is)g(also)g(returned)227 1955 y(as)f(the)f(v)-5 b(alue)31 b(of)g(the)f(function.)95 2196 y Fe(unsigned)46 b(long)h(fits_decode_chksum)42 b(/)48 b(ffdsum)525 2309 y(\(char)e(*ascii,)g(int)h(complm,)f(>)h (unsigned)f(long)h(*sum\);)0 2597 y Fd(5.8.2)112 b(Date)38 b(and)g(Time)g(Utilit)m(y)f(Routines)0 2816 y Fj(The)29 b(follo)m(wing)i(routines)f(help)f(to)i(construct)f(or)f(parse)h(the)g (FITS)f(date/time)i(strings.)41 b(Starting)30 b(in)f(the)h(y)m(ear)0 2929 y(2000,)k(the)d(FITS)g(D)m(A)-8 b(TE)32 b(k)m(eyw)m(ord)g(v)-5 b(alues)31 b(\(and)h(the)f(v)-5 b(alues)32 b(of)f(other)h(`D)m(A)-8 b(TE-')33 b(k)m(eyw)m(ords\))f(m)m(ust)f(ha)m(v)m(e)i(the)0 3042 y(form)j('YYYY-MM-DD')k(\(date)e(only\))f(or)g ('YYYY-MM-DDThh:mm:ss.ddd...')61 b(\(date)38 b(and)e(time\))h(where)0 3154 y(the)30 b(n)m(um)m(b)s(er)f(of)i(decimal)g(places)g(in)f(the)g (seconds)g(v)-5 b(alue)31 b(is)f(optional.)42 b(These)30 b(times)h(are)f(in)g(UTC.)g(The)g(older)0 3267 y('dd/mm/yy')d(date)g (format)g(ma)m(y)h(not)f(b)s(e)f(used)g(for)h(dates)h(after)f(01)h(Jan) m(uary)e(2000.)42 b(See)27 b(App)s(endix)e(B)i(for)g(the)0 3380 y(de\014nition)j(of)h(the)f(parameters)h(used)e(in)h(these)h (routines.)0 3621 y Fi(1)81 b Fj(Get)23 b(the)f(curren)m(t)f(system)i (date.)38 b(C)22 b(already)g(pro)m(vides)g(standard)f(library)h (routines)g(for)f(getting)j(the)e(curren)m(t)227 3734 y(date)k(and)e(time,)j(but)d(this)h(routine)g(is)g(pro)m(vided)g(for)f (compatibilit)m(y)k(with)c(the)h(F)-8 b(ortran)26 b(FITSIO)e(library)-8 b(.)227 3847 y(The)30 b(returned)f(y)m(ear)j(has)e(4)g(digits)h (\(1999,)i(2000,)g(etc.\))95 4088 y Fe(int)47 b (fits_get_system_date/ffgsd)o(t)286 4201 y(\()h(>)f(int)g(*day,)g(int)f (*month,)g(int)h(*year,)f(int)h(*status)f(\))0 4442 y Fi(2)81 b Fj(Get)34 b(the)g(curren)m(t)g(system)f(date)i(and)e(time)h (string)g(\('YYYY-MM-DDThh:mm:ss'\).)53 b(The)33 b(time)i(will)f(b)s(e) 227 4555 y(in)26 b(UTC/GMT)g(if)g(a)m(v)-5 b(ailable,)29 b(as)e(indicated)f(b)m(y)g(a)g(returned)f(timeref)h(v)-5 b(alue)27 b(=)e(0.)40 b(If)26 b(the)g(returned)e(v)-5 b(alue)227 4668 y(of)31 b(timeref)g(=)g(1)g(then)f(this)h(indicates)g (that)h(it)f(w)m(as)g(not)g(p)s(ossible)f(to)h(con)m(v)m(ert)i(the)d (lo)s(cal)i(time)g(to)f(UTC,)227 4780 y(and)f(th)m(us)g(the)h(lo)s(cal) g(time)g(w)m(as)g(returned.)95 5021 y Fe(int)47 b (fits_get_system_time/ffgst)o(m)286 5134 y(\(>)h(char)e(*datestr,)f (int)95 b(*timeref,)45 b(int)i(*status\))0 5375 y Fi(3)81 b Fj(Construct)26 b(a)i(date)g(string)f(from)g(the)g(input)f(date)i(v) -5 b(alues.)40 b(If)27 b(the)g(y)m(ear)h(is)g(b)s(et)m(w)m(een)f(1900)i (and)e(1998,)j(inclu-)227 5488 y(siv)m(e,)38 b(then)c(the)i(returned)d (date)j(string)f(will)g(ha)m(v)m(e)i(the)e(old)g(FITS)f(format)i (\('dd/mm/yy'\),)h(otherwise)227 5601 y(the)32 b(date)f(string)g(will)h (ha)m(v)m(e)g(the)g(new)e(FITS)h(format)g(\('YYYY-MM-DD'\).)36 b(Use)31 b(\014ts)p 3229 5601 28 4 v 33 w(time2str)h(instead)227 5714 y(to)f(alw)m(a)m(ys)h(return)e(a)g(date)h(string)g(using)f(the)g (new)g(FITS)g(format.)p eop end %%Page: 62 70 TeXDict begin 62 69 bop 0 299 a Fj(62)1379 b Fh(CHAPTER)30 b(5.)71 b(BASIC)30 b(CFITSIO)f(INTERF)-10 b(A)m(CE)30 b(R)m(OUTINES)95 555 y Fe(int)47 b(fits_date2str/ffdt2s)286 668 y(\(int)g(year,)f(int)h(month,)f(int)h(day,)g(>)g(char)g(*datestr,) e(int)i(*status\))0 928 y Fi(4)81 b Fj(Construct)34 b(a)i(new-format)f (date)h(+)f(time)h(string)f(\('YYYY-MM-DDThh:mm:ss.ddd...'\).)57 b(If)34 b(the)i(y)m(ear,)227 1041 y(mon)m(th,)d(and)e(da)m(y)h(v)-5 b(alues)32 b(all)h(=)e(0)h(then)g(only)g(the)g(time)g(is)g(enco)s(ded)f (with)h(format)g('hh:mm:ss.ddd...'.)227 1154 y(The)j(decimals)h (parameter)g(sp)s(eci\014es)e(ho)m(w)i(man)m(y)f(decimal)h(places)g(of) f(fractional)i(seconds)e(to)h(include)227 1266 y(in)30 b(the)h(string.)41 b(If)29 b(`decimals')j(is)f(negativ)m(e,)h(then)f (only)f(the)h(date)g(will)f(b)s(e)g(return)f(\('YYYY-MM-DD'\).)95 1526 y Fe(int)47 b(fits_time2str/fftm2s)286 1639 y(\(int)g(year,)f(int) h(month,)f(int)h(day,)g(int)g(hour,)f(int)h(minute,)f(double)g(second,) 286 1752 y(int)h(decimals,)f(>)h(char)g(*datestr,)e(int)i(*status\))0 2012 y Fi(5)81 b Fj(Return)44 b(the)g(date)i(as)f(read)f(from)h(the)g (input)e(string,)49 b(where)44 b(the)h(string)g(ma)m(y)g(b)s(e)f(in)h (either)g(the)g(old)227 2125 y(\('dd/mm/yy'\))29 b(or)f(new)f (\('YYYY-MM-DDThh:mm:ss')k(or)d('YYYY-MM-DD'\))j(FITS)d(format.)40 b(Null)227 2237 y(p)s(oin)m(ters)31 b(ma)m(y)f(b)s(e)g(supplied)f(for)h (an)m(y)h(un)m(w)m(an)m(ted)g(output)f(date)h(parameters.)95 2497 y Fe(int)47 b(fits_str2date/ffs2dt)286 2610 y(\(char)g(*datestr,)e (>)i(int)g(*year,)f(int)h(*month,)f(int)h(*day,)f(int)h(*status\))0 2870 y Fi(6)81 b Fj(Return)30 b(the)h(date)h(and)f(time)h(as)f(read)g (from)g(the)h(input)e(string,)h(where)g(the)h(string)f(ma)m(y)h(b)s(e)e (in)h(either)h(the)227 2983 y(old)d(or)f(new)g(FITS)g(format.)40 b(The)28 b(returned)f(hours,)h(min)m(utes,)h(and)f(seconds)g(v)-5 b(alues)29 b(will)f(b)s(e)g(set)h(to)g(zero)227 3095 y(if)k(the)h(input)e(string)h(do)s(es)g(not)h(include)f(the)g(time)h (\('dd/mm/yy')f(or)h('YYYY-MM-DD'\))j(.)c(Similarly)-8 b(,)227 3208 y(the)36 b(returned)e(y)m(ear,)j(mon)m(th,)g(and)d(date)i (v)-5 b(alues)36 b(will)f(b)s(e)g(set)h(to)g(zero)g(if)f(the)g(date)h (is)f(not)h(included)e(in)227 3321 y(the)29 b(input)f(string)h (\('hh:mm:ss.ddd...'\).)40 b(Null)29 b(p)s(oin)m(ters)f(ma)m(y)i(b)s(e) e(supplied)f(for)i(an)m(y)g(un)m(w)m(an)m(ted)g(output)227 3434 y(date)i(and)f(time)h(parameters.)95 3694 y Fe(int)47 b(fits_str2time/ffs2tm)286 3807 y(\(char)g(*datestr,)e(>)i(int)g (*year,)f(int)h(*month,)f(int)h(*day,)f(int)h(*hour,)286 3920 y(int)g(*minute,)f(double)g(*second,)f(int)i(*status\))0 4210 y Fd(5.8.3)112 b(General)39 b(Utilit)m(y)e(Routines)0 4429 y Fj(The)30 b(follo)m(wing)i(utilit)m(y)f(routines)g(ma)m(y)g(b)s (e)e(useful)h(for)g(certain)h(applications.)0 4689 y Fi(1)81 b Fj(Return)30 b(the)h(revision)g(n)m(um)m(b)s(er)f(of)h(the)g (CFITSIO)f(library)-8 b(.)42 b(The)31 b(revision)g(n)m(um)m(b)s(er)f (will)h(b)s(e)f(incremen)m(ted)227 4802 y(with)g(eac)m(h)i(new)e (release)h(of)g(CFITSIO.)95 5061 y Fe(float)47 b(fits_get_version)c(/) 48 b(ffvers)e(\()h(>)h(float)e(*version\))0 5321 y Fi(2)81 b Fj(W)-8 b(rite)34 b(an)g(80-c)m(haracter)i(message)e(to)g(the)g (CFITSIO)e(error)h(stac)m(k.)51 b(Application)34 b(programs)f(should)g (not)227 5434 y(normally)e(write)f(to)i(the)e(stac)m(k,)i(but)e(there)g (ma)m(y)h(b)s(e)f(some)h(situations)g(where)f(this)g(is)h(desirable.)95 5694 y Fe(void)47 b(fits_write_errmsg)c(/)48 b(ffpmsg)e(\(char)g (*err_msg\))p eop end %%Page: 63 71 TeXDict begin 63 70 bop 0 299 a Fh(5.8.)72 b(UTILITY)30 b(R)m(OUTINES)2693 b Fj(63)0 555 y Fi(3)81 b Fj(Con)m(v)m(ert)31 b(a)g(c)m(haracter)h(string)e(to)h(upp)s(ercase)e(\(op)s(erates)j(in)e (place\).)95 817 y Fe(void)47 b(fits_uppercase)d(/)j(ffupch)g(\(char)f (*string\))0 1079 y Fi(4)81 b Fj(Compare)43 b(the)i(input)e(template)i (string)f(against)h(the)g(reference)f(string)g(to)h(see)g(if)f(they)g (matc)m(h.)82 b(The)227 1192 y(template)36 b(string)f(ma)m(y)g(con)m (tain)g(wildcard)f(c)m(haracters:)51 b('*')35 b(will)g(matc)m(h)g(an)m (y)g(sequence)g(of)f(c)m(haracters)227 1305 y(\(including)j(zero)h(c)m (haracters\))g(and)e(')10 b(?')60 b(will)38 b(matc)m(h)f(an)m(y)g (single)h(c)m(haracter)g(in)f(the)g(reference)g(string.)227 1418 y(The)e('#')h(c)m(haracter)h(will)f(matc)m(h)g(an)m(y)g (consecutiv)m(e)h(string)f(of)f(decimal)i(digits)f(\(0)g(-)f(9\).)57 b(If)35 b(casesen)h(=)227 1531 y(CASESEN)c(=)h(TR)m(UE)h(then)f(the)g (matc)m(h)i(will)e(b)s(e)g(case)h(sensitiv)m(e,)i(otherwise)e(the)f (case)i(of)e(the)h(letters)227 1644 y(will)g(b)s(e)f(ignored)h(if)g (casesen)g(=)g(CASEINSEN)e(=)h(F)-10 b(ALSE.)34 b(The)f(returned)f(MA) -8 b(TCH)34 b(parameter)h(will)227 1757 y(b)s(e)30 b(TR)m(UE)g(if)g (the)g(2)h(strings)f(matc)m(h,)h(and)f(EXA)m(CT)g(will)g(b)s(e)g(TR)m (UE)g(if)g(the)g(matc)m(h)h(is)f(exact)i(\(i.e.,)g(if)e(no)227 1870 y(wildcard)k(c)m(haracters)i(w)m(ere)f(used)e(in)h(the)h(matc)m (h\).)53 b(Both)35 b(strings)g(m)m(ust)f(b)s(e)f(68)j(c)m(haracters)f (or)g(less)f(in)227 1983 y(length.)95 2245 y Fe(void)47 b(fits_compare_str)c(/)48 b(ffcmps)334 2358 y(\(char)e(*templt,)g(char) h(*string,)e(int)i(casesen,)f(>)h(int)g(*match,)f(int)h(*exact\))0 2620 y Fi(5)81 b Fj(Split)30 b(a)i(string)f(con)m(taining)h(a)g(list)f (of)g(names)g(\(t)m(ypically)j(\014le)d(names)g(or)g(column)f(names\))i (in)m(to)g(individual)227 2733 y(name)23 b(tok)m(ens)g(b)m(y)g(a)g (sequence)g(of)g(calls)g(to)h(\014ts)p 1814 2733 28 4 v 32 w(split)p 2018 2733 V 33 w(names.)38 b(The)22 b(names)h(in)f(the)h (list)g(m)m(ust)f(b)s(e)g(delimited)227 2846 y(b)m(y)45 b(a)f(comma)i(and/or)e(spaces.)83 b(This)44 b(routine)g(ignores)h (spaces)g(and)f(commas)h(that)g(o)s(ccur)f(within)227 2959 y(paren)m(theses,)36 b(brac)m(k)m(ets,)h(or)e(curly)f(brac)m(k)m (ets.)54 b(It)35 b(also)g(strips)f(an)m(y)h(leading)g(and)f(trailing)h (blanks)f(from)227 3072 y(the)d(returned)e(name.)227 3223 y(This)h(routine)g(is)h(similar)f(to)h(the)g(ANSI)f(C)g('strtok')h (function:)227 3374 y(The)37 b(\014rst)f(call)i(to)g(\014ts)p 1033 3374 V 32 w(split)p 1237 3374 V 33 w(names)f(has)g(a)g(non-n)m (ull)f(input)g(string.)61 b(It)37 b(\014nds)e(the)i(\014rst)f(name)h (in)g(the)227 3487 y(string)26 b(and)f(terminates)h(it)h(b)m(y)e(o)m(v) m(erwriting)i(the)f(next)g(c)m(haracter)h(of)f(the)g(string)f(with)h(a) g(n)m(ull)f(terminator)227 3600 y(and)31 b(returns)g(a)h(p)s(oin)m(ter) f(to)i(the)e(name.)45 b(Eac)m(h)32 b(subsequen)m(t)f(call,)j(indicated) e(b)m(y)f(a)h(NULL)g(v)-5 b(alue)32 b(of)g(the)227 3713 y(input)f(string,)i(returns)e(the)h(next)h(name,)f(searc)m(hing)h(from) f(just)g(past)g(the)g(end)f(of)i(the)f(previous)g(name.)227 3826 y(It)f(returns)e(NULL)h(when)g(no)g(further)f(names)h(are)h (found.)143 4088 y Fe(char)47 b(*fits_split_names\(char)42 b(*namelist\))0 4350 y Fj(The)30 b(follo)m(wing)i(example)f(sho)m(ws)f (ho)m(w)g(a)h(string)f(w)m(ould)h(b)s(e)e(split)i(in)m(to)g(3)g(names:) 191 4612 y Fe(myfile[1][bin)44 b(\(x,y\)=4],)h(file2.fits)93 b(file3.fits)191 4725 y(^^^^^^^^^^^^^^^^^^^^^^)c(^^^^^^^^^^)k (^^^^^^^^^^)382 4838 y(1st)47 b(name)619 b(2nd)47 b(name)190 b(3rd)47 b(name)0 5100 y Fi(6)81 b Fj(T)-8 b(est)34 b(that)g(the)g(k)m (eyw)m(ord)g(name)f(con)m(tains)i(only)e(legal)j(c)m(haracters)f (\(A-Z,0-9,)h(h)m(yphen,)d(and)g(underscore\))227 5213 y(or)e(that)g(the)f(k)m(eyw)m(ord)h(record)f(con)m(tains)i(only)e (legal)i(prin)m(table)f(ASCI)s(I)e(c)m(haracters)95 5475 y Fe(int)47 b(fits_test_keyword)c(/)48 b(fftkey)e(\(char)g(*keyname,)g (>)h(int)g(*status\))95 5701 y(int)g(fits_test_record)d(/)j(fftrec)f (\(char)h(*card,)f(>)h(int)g(*status\))p eop end %%Page: 64 72 TeXDict begin 64 71 bop 0 299 a Fj(64)1379 b Fh(CHAPTER)30 b(5.)71 b(BASIC)30 b(CFITSIO)f(INTERF)-10 b(A)m(CE)30 b(R)m(OUTINES)0 555 y Fi(7)81 b Fj(T)-8 b(est)25 b(whether)f(the)h (curren)m(t)f(header)h(con)m(tains)g(an)m(y)g(NULL)g(\(ASCI)s(I)e(0\))j (c)m(haracters.)40 b(These)24 b(c)m(haracters)j(are)227 668 y(illegal)37 b(in)d(the)h(header,)g(but)f(they)g(will)h(go)g (undetected)g(b)m(y)f(most)h(of)g(the)f(CFITSIO)f(k)m(eyw)m(ord)i (header)227 781 y(routines,)29 b(b)s(ecause)f(the)h(n)m(ull)f(is)g(in)m (terpreted)g(as)h(the)f(normal)g(end-of-string)h(terminator.)41 b(This)27 b(routine)227 894 y(returns)h(the)g(p)s(osition)h(of)g(the)g (\014rst)f(n)m(ull)g(c)m(haracter)i(in)f(the)f(header,)h(or)g(zero)g (if)g(there)g(are)g(no)f(n)m(ulls.)40 b(F)-8 b(or)227 1007 y(example)37 b(a)f(returned)f(v)-5 b(alue)37 b(of)f(110)h(w)m (ould)f(indicate)h(that)g(the)f(\014rst)f(NULL)h(is)g(lo)s(cated)h(in)f (the)g(30th)227 1120 y(c)m(haracter)28 b(of)f(the)g(second)f(k)m(eyw)m (ord)h(in)f(the)h(header)f(\(recall)i(that)f(eac)m(h)h(header)e(record) h(is)f(80)h(c)m(haracters)227 1233 y(long\).)45 b(Note)33 b(that)f(this)g(is)f(one)h(of)g(the)g(few)f(CFITSIO)f(routines)h(in)h (whic)m(h)f(the)h(returned)e(v)-5 b(alue)32 b(is)g(not)227 1346 y(necessarily)g(equal)e(to)i(the)e(status)h(v)-5 b(alue\).)95 1597 y Fe(int)47 b(fits_null_check)d(/)j(ffnchk)g(\(char)f (*card,)g(>)h(int)g(*status\))0 1849 y Fi(8)81 b Fj(P)m(arse)25 b(a)g(header)g(k)m(eyw)m(ord)g(record)g(and)f(return)g(the)h(name)g(of) g(the)g(k)m(eyw)m(ord,)i(and)d(the)h(length)h(of)f(the)g(name.)227 1962 y(The)34 b(k)m(eyw)m(ord)h(name)f(normally)h(o)s(ccupies)f(the)h (\014rst)e(8)i(c)m(haracters)g(of)g(the)f(record,)i(except)f(under)e (the)227 2075 y(HIERAR)m(CH)e(con)m(v)m(en)m(tion)h(where)e(the)h(name) f(can)h(b)s(e)f(up)f(to)i(70)g(c)m(haracters)h(in)e(length.)95 2326 y Fe(int)47 b(fits_get_keyname)d(/)j(ffgknm)286 2439 y(\(char)g(*card,)f(>)h(char)g(*keyname,)e(int)i(*keylength,)e (int)i(*status\))0 2691 y Fi(9)81 b Fj(P)m(arse)29 b(a)h(header)f(k)m (eyw)m(ord)h(record,)f(returning)g(the)g(v)-5 b(alue)30 b(\(as)g(a)f(literal)i(c)m(haracter)g(string\))e(and)g(commen)m(t)227 2804 y(strings.)40 b(If)27 b(the)g(k)m(eyw)m(ord)h(has)f(no)g(v)-5 b(alue)28 b(\(columns)f(9-10)i(not)f(equal)f(to)h('=)g('\),)g(then)f(a) h(n)m(ull)f(v)-5 b(alue)28 b(string)227 2916 y(is)j(returned)e(and)h (the)g(commen)m(t)i(string)e(is)g(set)h(equal)g(to)g(column)f(9)h(-)g (80)g(of)g(the)f(input)g(string.)95 3168 y Fe(int)47 b(fits_parse_value)d(/)j(ffpsvc)286 3281 y(\(char)g(*card,)f(>)h(char)g (*value,)f(char)g(*comment,)g(int)h(*status\))0 3533 y Fi(10)f Fj(Construct)26 b(an)h(arra)m(y)g(indexed)f(k)m(eyw)m(ord)h (name)f(\(R)m(OOT)g(+)h(nnn\).)38 b(This)26 b(routine)g(app)s(ends)f (the)i(sequence)227 3645 y(n)m(um)m(b)s(er)i(to)i(the)g(ro)s(ot)g (string)f(to)h(create)h(a)f(k)m(eyw)m(ord)g(name)f(\(e.g.,)i('NAXIS')f (+)f(2)h(=)f('NAXIS2'\))95 3897 y Fe(int)47 b(fits_make_keyn)d(/)k (ffkeyn)286 4010 y(\(char)f(*keyroot,)e(int)i(value,)f(>)h(char)g (*keyname,)e(int)i(*status\))0 4261 y Fi(11)f Fj(Construct)41 b(a)h(sequence)f(k)m(eyw)m(ord)h(name)g(\(n)f(+)g(R)m(OOT\).)g(This)g (routine)g(concatenates)j(the)e(sequence)227 4374 y(n)m(um)m(b)s(er)20 b(to)j(the)e(fron)m(t)h(of)g(the)f(ro)s(ot)h(string)g(to)g(create)h(a)f (k)m(eyw)m(ord)g(name)g(\(e.g.,)j(1)d(+)f('CTYP')g(=)g('1CTYP'\))95 4739 y Fe(int)47 b(fits_make_nkey)d(/)k(ffnkey)286 4852 y(\(int)f(value,)f(char)h(*keyroot,)e(>)i(char)g(*keyname,)e(int)i (*status\))0 5103 y Fi(12)f Fj(Determine)41 b(the)g(data)f(t)m(yp)s(e)h (of)f(a)h(k)m(eyw)m(ord)f(v)-5 b(alue)41 b(string.)70 b(This)39 b(routine)i(parses)e(the)i(k)m(eyw)m(ord)f(v)-5 b(alue)227 5216 y(string)28 b(to)h(determine)f(its)g(data)h(t)m(yp)s (e.)40 b(Returns)27 b('C',)h('L',)h('I',)f('F')h(or)f('X',)g(for)g(c)m (haracter)i(string,)e(logical,)227 5329 y(in)m(teger,)k(\015oating)g(p) s(oin)m(t,)e(or)h(complex,)g(resp)s(ectiv)m(ely)-8 b(.)95 5581 y Fe(int)47 b(fits_get_keytype)d(/)j(ffdtyp)286 5694 y(\(char)g(*value,)f(>)h(char)g(*dtype,)e(int)i(*status\))p eop end %%Page: 65 73 TeXDict begin 65 72 bop 0 299 a Fh(5.8.)72 b(UTILITY)30 b(R)m(OUTINES)2693 b Fj(65)0 555 y Fi(13)46 b Fj(Determine)39 b(the)f(in)m(teger)h(data)g(t)m(yp)s(e)f(of)g(an)g(in)m(teger)h(k)m (eyw)m(ord)f(v)-5 b(alue)39 b(string.)63 b(The)37 b(returned)g(datat)m (yp)s(e)227 668 y(v)-5 b(alue)36 b(is)f(the)g(minim)m(um)f(in)m(teger)i (datat)m(yp)s(e)g(\(starting)g(from)f(top)g(of)g(the)g(follo)m(wing)i (list)e(and)g(w)m(orking)227 781 y(do)m(wn\))c(required)e(to)i(store)g (the)g(in)m(teger)h(v)-5 b(alue:)191 1045 y Fe(Data)47 b(Type)285 b(Range)239 1158 y(TSBYTE:)236 b(-128)47 b(to)g(127)239 1271 y(TBYTE:)332 b(128)47 b(to)g(255)239 1384 y(TSHORT:)236 b(-32768)46 b(to)i(32767)239 1497 y(TUSHORT:)236 b(32768)46 b(to)i(65535)239 1610 y(TINT)380 b(-2147483648)45 b(to)i(2147483647)239 1722 y(TUINT)380 b(2147483648)45 b(to)i(4294967295)239 1835 y(TLONGLONG)140 b(-9223372036854775808)43 b(to)k (9223372036854775807)80 2099 y Fj(The)30 b(*neg)h(parameter)g(returns)e (1)i(if)f(the)h(input)e(v)-5 b(alue)31 b(is)g(negativ)m(e)h(and)e (returns)f(0)i(if)f(it)h(is)g(non-negativ)m(e.)95 2363 y Fe(int)47 b(fits_get_inttype)d(/)j(ffinttyp)286 2476 y(\(char)g(*value,)f(>)h(int)g(*datatype,)e(int)i(*neg,)f(int)h (*status\))0 2740 y Fi(14)f Fj(Return)35 b(the)g(class)h(of)g(an)f (input)g(header)g(record.)56 b(The)35 b(record)g(is)g(classi\014ed)h (in)m(to)h(one)e(of)h(the)f(follo)m(wing)227 2853 y(categories)d(\(the) e(class)g(v)-5 b(alues)30 b(are)f(de\014ned)f(in)h(\014tsio.h\).)41 b(Note)31 b(that)e(this)h(is)f(one)h(of)f(the)g(few)g(CFITSIO)227 2966 y(routines)i(that)f(do)s(es)h(not)f(return)f(a)i(status)g(v)-5 b(alue.)334 3230 y Fe(Class)94 b(Value)619 b(Keywords)95 3343 y(TYP_STRUC_KEY)92 b(10)j(SIMPLE,)46 b(BITPIX,)g(NAXIS,)g(NAXISn,) g(EXTEND,)g(BLOCKED,)1002 3456 y(GROUPS,)g(PCOUNT,)g(GCOUNT,)g(END)1002 3569 y(XTENSION,)g(TFIELDS,)f(TTYPEn,)h(TBCOLn,)g(TFORMn,)g(THEAP,)1002 3681 y(and)h(the)g(first)f(4)i(COMMENT)e(keywords)f(in)i(the)g(primary) f(array)1002 3794 y(that)h(define)f(the)h(FITS)g(format.)95 3907 y(TYP_CMPRS_KEY)92 b(20)j(The)47 b(experimental)e(keywords)g(used) i(in)g(the)g(compressed)1002 4020 y(image)g(format)f(ZIMAGE,)g (ZCMPTYPE,)f(ZNAMEn,)h(ZVALn,)1002 4133 y(ZTILEn,)g(ZBITPIX,)g (ZNAXISn,)f(ZSCALE,)h(ZZERO,)g(ZBLANK)95 4246 y(TYP_SCAL_KEY)140 b(30)95 b(BSCALE,)46 b(BZERO,)g(TSCALn,)g(TZEROn)95 4359 y(TYP_NULL_KEY)140 b(40)95 b(BLANK,)46 b(TNULLn)95 4472 y(TYP_DIM_KEY)188 b(50)95 b(TDIMn)95 4585 y(TYP_RANG_KEY)140 b(60)95 b(TLMINn,)46 b(TLMAXn,)g(TDMINn,)g(TDMAXn,)g(DATAMIN,)f (DATAMAX)95 4698 y(TYP_UNIT_KEY)140 b(70)95 b(BUNIT,)46 b(TUNITn)95 4811 y(TYP_DISP_KEY)140 b(80)95 b(TDISPn)95 4924 y(TYP_HDUID_KEY)d(90)j(EXTNAME,)46 b(EXTVER,)g(EXTLEVEL,)f (HDUNAME,)g(HDUVER,)h(HDULEVEL)95 5036 y(TYP_CKSUM_KEY)f(100)94 b(CHECKSUM,)46 b(DATASUM)95 5149 y(TYP_WCS_KEY)141 b(110)94 b(WCS)47 b(keywords)f(defined)g(in)h(the)g(the)g(WCS)f(papers,)g (including:)1002 5262 y(CTYPEn,)g(CUNITn,)g(CRVALn,)g(CRPIXn,)g (CROTAn,)f(CDELTn)1002 5375 y(CDj_is,)h(PVj_ms,)g(LONPOLEs,)f(LATPOLEs) 1002 5488 y(TCTYPn,)h(TCTYns,)g(TCUNIn,)g(TCUNns,)g(TCRVLn,)f(TCRVns,)h (TCRPXn,)1002 5601 y(TCRPks,)g(TCDn_k,)g(TCn_ks,)g(TPVn_m,)g(TPn_ms,)f (TCDLTn,)h(TCROTn)1002 5714 y(jCTYPn,)g(jCTYns,)g(jCUNIn,)g(jCUNns,)g (jCRVLn,)f(jCRVns,)h(iCRPXn,)p eop end %%Page: 66 74 TeXDict begin 66 73 bop 0 299 a Fj(66)1379 b Fh(CHAPTER)30 b(5.)71 b(BASIC)30 b(CFITSIO)f(INTERF)-10 b(A)m(CE)30 b(R)m(OUTINES)1002 555 y Fe(iCRPns,)46 b(jiCDn,)94 b(jiCDns,)46 b(jPVn_m,)g(jPn_ms,)f(jCDLTn,)h(jCROTn)1002 668 y(\(i,j,m,n)g(are)h (integers,)e(s)i(is)h(any)f(letter\))95 781 y(TYP_REFSYS_KEY)d(120)j (EQUINOXs,)f(EPOCH,)g(MJD-OBSs,)f(RADECSYS,)g(RADESYSs,)g(DATE-OBS)95 894 y(TYP_COMM_KEY)140 b(130)47 b(COMMENT,)f(HISTORY,)f(\(blank)h (keyword\))95 1007 y(TYP_CONT_KEY)140 b(140)47 b(CONTINUE)95 1120 y(TYP_USER_KEY)140 b(150)47 b(all)g(other)g(keywords)95 1346 y(int)g(fits_get_keyclass)c(/)48 b(ffgkcl)e(\(char)g(*card\))0 1628 y Fi(15)g Fj(P)m(arse)28 b(the)g('TF)m(ORM')g(binary)f(table)h (column)g(format)f(string.)40 b(This)27 b(routine)g(parses)g(the)h (input)f(TF)m(ORM)227 1740 y(c)m(haracter)38 b(string)d(and)g(returns)g (the)g(in)m(teger)i(data)g(t)m(yp)s(e)f(co)s(de,)h(the)f(rep)s(eat)g (coun)m(t)g(of)g(the)f(\014eld,)i(and,)227 1853 y(in)e(the)f(case)i(of) f(c)m(haracter)h(string)f(\014elds,)g(the)g(length)g(of)g(the)g(unit)f (string.)54 b(See)34 b(App)s(endix)f(B)i(for)g(the)227 1966 y(allo)m(w)m(ed)41 b(v)-5 b(alues)38 b(for)h(the)f(returned)g(t)m (yp)s(eco)s(de)h(parameter.)65 b(A)39 b(n)m(ull)f(p)s(oin)m(ter)h(ma)m (y)g(b)s(e)f(giv)m(en)h(for)g(an)m(y)227 2079 y(output)30 b(parameters)h(that)g(are)g(not)f(needed.)143 2361 y Fe(int)47 b(fits_binary_tform)c(/)48 b(ffbnfm)334 2474 y(\(char)e(*tform,)g(>)i(int)f(*typecode,)e(long)h(*repeat,)g(long)g (*width,)382 2587 y(int)h(*status\))143 2813 y(int)g (fits_binary_tformll)c(/)k(ffbnfmll)334 2926 y(\(char)f(*tform,)g(>)i (int)f(*typecode,)e(LONGLONG)g(*repeat,)h(long)g(*width,)382 3039 y(int)h(*status\))0 3321 y Fi(16)f Fj(P)m(arse)38 b(the)f('TF)m(ORM')h(k)m(eyw)m(ord)g(v)-5 b(alue)37 b(that)h(de\014nes) e(the)h(column)g(format)h(in)e(an)h(ASCI)s(I)f(table.)62 b(This)227 3434 y(routine)29 b(parses)g(the)g(input)f(TF)m(ORM)h(c)m (haracter)h(string)f(and)g(returns)e(the)i(data)h(t)m(yp)s(e)f(co)s (de,)h(the)f(width)227 3546 y(of)f(the)f(column,)h(and)f(\(if)h(it)g (is)f(a)h(\015oating)g(p)s(oin)m(t)g(column\))f(the)h(n)m(um)m(b)s(er)e (of)h(decimal)i(places)f(to)g(the)f(righ)m(t)227 3659 y(of)39 b(the)f(decimal)h(p)s(oin)m(t.)65 b(The)38 b(returned)f(data)i (t)m(yp)s(e)f(co)s(des)g(are)h(the)g(same)f(as)h(for)f(the)g(binary)g (table,)227 3772 y(with)26 b(the)h(follo)m(wing)h(additional)f(rules:) 38 b(in)m(teger)28 b(columns)e(that)h(are)f(b)s(et)m(w)m(een)h(1)g(and) f(4)g(c)m(haracters)i(wide)227 3885 y(are)i(de\014ned)e(to)j(b)s(e)d (short)i(in)m(tegers)g(\(co)s(de)g(=)g(TSHOR)-8 b(T\).)29 b(Wider)g(in)m(teger)i(columns)e(are)h(de\014ned)e(to)j(b)s(e)227 3998 y(regular)39 b(in)m(tegers)g(\(co)s(de)g(=)f(TLONG\).)h(Similarly) -8 b(,)41 b(Fixed)e(decimal)g(p)s(oin)m(t)f(columns)g(\(with)h(TF)m (ORM)227 4111 y(=)c('Fw.d'\))g(are)h(de\014ned)d(to)j(b)s(e)e(single)i (precision)f(reals)h(\(co)s(de)f(=)g(TFLO)m(A)-8 b(T\))35 b(if)g(w)g(is)g(b)s(et)m(w)m(een)g(1)h(and)227 4224 y(7)42 b(c)m(haracters)h(wide,)h(inclusiv)m(e.)75 b(Wider)41 b('F')h(columns)f(will)h(return)e(a)i(double)f(precision)h(data)g(co)s (de)227 4337 y(\(=)32 b(TDOUBLE\).)h('Ew.d')f(format)g(columns)g(will)g (ha)m(v)m(e)i(dataco)s(de)f(=)e(TFLO)m(A)-8 b(T,)33 b(and)e('Dw.d')i (format)227 4450 y(columns)45 b(will)h(ha)m(v)m(e)h(dataco)s(de)f(=)f (TDOUBLE.)g(A)h(n)m(ull)f(p)s(oin)m(ter)h(ma)m(y)f(b)s(e)g(giv)m(en)i (for)e(an)m(y)g(output)227 4563 y(parameters)31 b(that)g(are)g(not)f (needed.)95 4845 y Fe(int)47 b(fits_ascii_tform)d(/)j(ffasfm)286 4958 y(\(char)g(*tform,)f(>)h(int)g(*typecode,)e(long)i(*width,)e(int)i (*decimals,)334 5070 y(int)g(*status\))0 5352 y Fi(17)f Fj(Calculate)32 b(the)f(starting)g(column)g(p)s(ositions)f(and)g(total) i(ASCI)s(I)d(table)j(width)d(based)i(on)f(the)h(input)e(arra)m(y)227 5465 y(of)e(ASCI)s(I)e(table)i(TF)m(ORM)g(v)-5 b(alues.)40 b(The)26 b(SP)-8 b(A)m(CE)27 b(input)e(parameter)i(de\014nes)f(ho)m(w)h (man)m(y)f(blank)h(spaces)227 5578 y(to)40 b(lea)m(v)m(e)i(b)s(et)m(w)m (een)e(eac)m(h)g(column)g(\(it)g(is)f(recommended)g(to)h(ha)m(v)m(e)h (one)e(space)h(b)s(et)m(w)m(een)g(columns)f(for)227 5691 y(b)s(etter)31 b(h)m(uman)e(readabilit)m(y\).)p eop end %%Page: 67 75 TeXDict begin 67 74 bop 0 299 a Fh(5.8.)72 b(UTILITY)30 b(R)m(OUTINES)2693 b Fj(67)95 555 y Fe(int)47 b(fits_get_tbcol)d(/)k (ffgabc)286 668 y(\(int)f(tfields,)f(char)g(**tform,)g(int)h(space,)f (>)h(long)g(*rowlen,)334 781 y(long)g(*tbcol,)f(int)g(*status\))0 1017 y Fi(18)g Fj(P)m(arse)27 b(a)g(template)h(header)e(record)g(and)g (return)g(a)g(formatted)h(80-c)m(haracter)j(string)c(suitable)h(for)f (app)s(end-)227 1129 y(ing)40 b(to)f(\(or)h(deleting)g(from\))f(a)g (FITS)g(header)g(\014le.)67 b(This)38 b(routine)h(is)g(useful)g(for)f (parsing)h(lines)g(from)227 1242 y(an)33 b(ASCI)s(I)f(template)i (\014le)f(and)g(reformatting)h(them)f(in)m(to)h(legal)h(FITS)d(header)h (records.)49 b(The)32 b(format-)227 1355 y(ted)i(string)g(ma)m(y)g (then)f(b)s(e)g(passed)h(to)g(the)g(\014ts)p 1880 1355 28 4 v 32 w(write)p 2114 1355 V 33 w(record,)h(\013mcrd,)f(or)g(\014ts) p 3007 1355 V 32 w(delete)p 3270 1355 V 34 w(k)m(ey)h(routines)e(to)227 1468 y(app)s(end)c(or)h(mo)s(dify)g(a)h(FITS)e(header)h(record.)95 1704 y Fe(int)47 b(fits_parse_template)c(/)k(ffgthd)286 1817 y(\(char)g(*templt,)e(>)j(char)e(*card,)g(int)h(*keytype,)f(int)h (*status\))0 2052 y Fj(The)31 b(input)g(templt)h(c)m(haracter)h(string) f(generally)h(should)d(con)m(tain)j(3)f(tok)m(ens:)44 b(\(1\))33 b(the)f(KEYNAME,)g(\(2\))h(the)0 2165 y(V)-10 b(ALUE,)37 b(and)f(\(3\))i(the)f(COMMENT)g(string.)59 b(The)37 b(TEMPLA)-8 b(TE)36 b(string)h(m)m(ust)f(adhere)h(to)h(the)e (follo)m(wing)0 2278 y(format:)0 2514 y Fi(-)80 b Fj(The)32 b(KEYNAME)h(tok)m(en)h(m)m(ust)f(b)s(egin)f(in)h(columns)f(1-8)i(and)e (b)s(e)g(a)h(maxim)m(um)g(of)g(8)g(c)m(haracters)h(long.)49 b(A)227 2626 y(legal)30 b(FITS)e(k)m(eyw)m(ord)h(name)f(ma)m(y)h(only)f (con)m(tain)i(the)f(c)m(haracters)g(A-Z,)g(0-9,)h(and)e('-')h(\(min)m (us)f(sign\))h(and)227 2739 y(underscore.)40 b(This)27 b(routine)i(will)g(automatically)i(con)m(v)m(ert)f(an)m(y)f(lo)m(w)m (ercase)i(c)m(haracters)f(to)g(upp)s(ercase)d(in)227 2852 y(the)k(output)f(string.)42 b(If)30 b(the)h(\014rst)f(8)h(c)m (haracters)h(of)f(the)g(template)h(line)f(are)g(blank)f(then)h(the)g (remainder)227 2965 y(of)g(the)f(line)h(is)g(considered)f(to)h(b)s(e)f (a)g(FITS)g(commen)m(t)h(\(with)g(a)g(blank)f(k)m(eyw)m(ord)g(name\).)0 3201 y Fi(-)80 b Fj(The)26 b(V)-10 b(ALUE)26 b(tok)m(en)h(m)m(ust)e(b)s (e)h(separated)g(from)f(the)i(KEYNAME)f(tok)m(en)h(b)m(y)f(one)g(or)g (more)g(spaces)g(and/or)227 3314 y(an)g('=')g(c)m(haracter.)41 b(The)25 b(data)h(t)m(yp)s(e)g(of)g(the)g(V)-10 b(ALUE)26 b(tok)m(en)g(\(n)m(umeric,)h(logical,)j(or)c(c)m(haracter)h(string\))f (is)227 3427 y(automatically)35 b(determined)c(and)h(the)g(output)f (CARD)h(string)g(is)g(formatted)g(accordingly)-8 b(.)47 b(The)31 b(v)-5 b(alue)227 3539 y(tok)m(en)34 b(ma)m(y)f(b)s(e)f (forced)g(to)i(b)s(e)e(in)m(terpreted)g(as)h(a)g(string)g(\(e.g.)48 b(if)33 b(it)g(is)f(a)h(string)g(of)f(n)m(umeric)h(digits\))g(b)m(y)227 3652 y(enclosing)g(it)f(in)f(single)h(quotes.)45 b(If)31 b(the)h(v)-5 b(alue)32 b(tok)m(en)g(is)g(a)g(c)m(haracter)h(string)e (that)i(con)m(tains)f(1)g(or)g(more)227 3765 y(em)m(b)s(edded)39 b(blank)g(space)h(c)m(haracters)h(or)e(slash)h(\('/'\))h(c)m(haracters) g(then)e(the)g(en)m(tire)i(c)m(haracter)g(string)227 3878 y(m)m(ust)31 b(b)s(e)e(enclosed)i(in)f(single)h(quotes.)0 4114 y Fi(-)80 b Fj(The)28 b(COMMENT)g(tok)m(en)h(is)f(optional,)i(but) e(if)g(presen)m(t)g(m)m(ust)g(b)s(e)g(separated)g(from)g(the)h(V)-10 b(ALUE)28 b(tok)m(en)h(b)m(y)227 4227 y(a)i(blank)f(space)h(or)f(a)h ('/')g(c)m(haracter.)0 4462 y Fi(-)80 b Fj(One)29 b(exception)h(to)f (the)g(ab)s(o)m(v)m(e)i(rules)d(is)h(that)g(if)g(the)g(\014rst)g (non-blank)f(c)m(haracter)i(in)f(the)g(\014rst)f(8)h(c)m(haracters)227 4575 y(of)24 b(the)h(template)g(string)f(is)g(a)g(min)m(us)g(sign)g (\('-'\))h(follo)m(w)m(ed)h(b)m(y)e(a)g(single)h(tok)m(en,)h(or)e(a)h (single)f(tok)m(en)h(follo)m(w)m(ed)227 4688 y(b)m(y)k(an)g(equal)h (sign,)g(then)f(it)g(is)h(in)m(terpreted)f(as)h(the)f(name)g(of)h(a)f (k)m(eyw)m(ord)h(whic)m(h)f(is)g(to)h(b)s(e)e(deleted)i(from)227 4801 y(the)h(FITS)e(header.)0 5036 y Fi(-)80 b Fj(The)32 b(second)g(exception)h(is)f(that)h(if)f(the)g(template)h(string)f (starts)h(with)e(a)i(min)m(us)e(sign)h(and)f(is)h(follo)m(w)m(ed)i(b)m (y)227 5149 y(2)f(tok)m(ens)g(\(without)g(an)f(equals)h(sign)g(b)s(et)m (w)m(een)g(them\))f(then)g(the)h(second)f(tok)m(en)i(is)e(in)m (terpreted)h(as)g(the)227 5262 y(new)f(name)h(for)f(the)h(k)m(eyw)m (ord)g(sp)s(eci\014ed)f(b)m(y)h(\014rst)f(tok)m(en.)48 b(In)32 b(this)g(case)i(the)f(old)g(k)m(eyw)m(ord)g(name)f(\(\014rst) 227 5375 y(tok)m(en\))c(is)e(returned)e(in)i(c)m(haracters)h(1-8)g(of)g (the)f(returned)e(CARD)j(string,)g(and)e(the)h(new)f(k)m(eyw)m(ord)i (name)227 5488 y(\(the)35 b(second)e(tok)m(en\))j(is)e(returned)e(in)i (c)m(haracters)h(41-48)h(of)e(the)g(returned)e(CARD)i(string.)51 b(These)34 b(old)227 5601 y(and)i(new)f(names)h(ma)m(y)h(then)f(b)s(e)f (passed)g(to)i(the)f(\013mnam)g(routine)g(whic)m(h)g(will)g(c)m(hange)h (the)f(k)m(eyw)m(ord)227 5714 y(name.)p eop end %%Page: 68 76 TeXDict begin 68 75 bop 0 299 a Fj(68)1379 b Fh(CHAPTER)30 b(5.)71 b(BASIC)30 b(CFITSIO)f(INTERF)-10 b(A)m(CE)30 b(R)m(OUTINES)0 555 y Fj(The)g(k)m(eyt)m(yp)s(e)h(output)f(parameter)h (indicates)g(ho)m(w)g(the)f(returned)g(CARD)g(string)g(should)g(b)s(e)f (in)m(terpreted:)382 784 y Fe(keytype)857 b(interpretation)382 897 y(-------)475 b(-------------------------)o(----)o(---)o(----)o (----)o(---)o(----)o(--)525 1010 y(-2)572 b(Rename)46 b(the)h(keyword)f(with)h(name)f(=)i(the)f(first)f(8)h(characters)e(of)j (CARD)1193 1123 y(to)f(the)g(new)g(name)g(given)f(in)h(characters)e(41) j(-)f(48)g(of)g(CARD.)525 1349 y(-1)572 b(delete)46 b(the)h(keyword)f (with)h(this)f(name)h(from)g(the)f(FITS)h(header.)573 1575 y(0)572 b(append)46 b(the)h(CARD)g(string)f(to)h(the)g(FITS)g (header)f(if)h(the)1193 1688 y(keyword)f(does)h(not)g(already)e(exist,) h(otherwise)g(update)1193 1801 y(the)h(keyword)f(value)g(and/or)g (comment)g(field)h(if)g(is)g(already)f(exists.)573 2026 y(1)572 b(This)47 b(is)g(a)g(HISTORY)f(or)h(COMMENT)f(keyword;)g (append)g(it)h(to)g(the)g(header)573 2252 y(2)572 b(END)47 b(record;)f(do)h(not)g(explicitly)e(write)h(it)i(to)f(the)g(FITS)f (file.)0 2481 y Fj(EXAMPLES:)30 b(The)g(follo)m(wing)i(lines)e (illustrate)i(v)-5 b(alid)31 b(input)e(template)j(strings:)286 2710 y Fe(INTVAL)46 b(7)i(/)f(This)g(is)g(an)g(integer)f(keyword)286 2823 y(RVAL)524 b(34.6)142 b(/)239 b(This)46 b(is)i(a)f(floating)f (point)g(keyword)286 2936 y(EVAL=-12.45E-03)92 b(/)47 b(This)g(is)g(a)g(floating)f(point)g(keyword)g(in)h(exponential)e (notation)286 3049 y(lval)i(F)g(/)h(This)f(is)g(a)g(boolean)f(keyword) 859 3162 y(This)h(is)g(a)g(comment)f(keyword)g(with)h(a)g(blank)f (keyword)g(name)286 3275 y(SVAL1)h(=)g('Hello)f(world')142 b(/)95 b(this)47 b(is)g(a)g(string)f(keyword)286 3388 y(SVAL2)94 b('123.5')g(this)47 b(is)g(also)f(a)i(string)e(keyword)286 3501 y(sval3)94 b(123+)h(/)g(this)47 b(is)g(also)f(a)i(string)e (keyword)g(with)g(the)h(value)g('123+)189 b(')286 3614 y(#)48 b(the)f(following)e(template)h(line)g(deletes)g(the)h(DATE)g (keyword)286 3727 y(-)h(DATE)286 3840 y(#)g(the)f(following)e(template) h(line)g(modifies)g(the)h(NAME)f(keyword)g(to)h(OBJECT)286 3952 y(-)h(NAME)e(OBJECT)0 4182 y Fi(19)g Fj(T)-8 b(ranslate)32 b(a)g(k)m(eyw)m(ord)g(name)f(in)m(to)h(a)g(new)f(name,)h(based)f(on)g (a)h(set)f(of)h(patterns.)43 b(This)31 b(routine)g(is)h(useful)227 4294 y(for)j(translating)h(k)m(eyw)m(ords)g(in)e(cases)i(suc)m(h)f(as)h (adding)e(or)h(deleting)h(columns)f(in)g(a)g(table,)j(or)d(cop)m(ying) 227 4407 y(a)41 b(column)g(from)f(one)h(table)g(to)g(another,)j(or)c (extracting)j(an)d(arra)m(y)h(from)f(a)h(cell)h(in)e(a)h(binary)f (table)227 4520 y(column)31 b(in)m(to)g(an)g(image)g(extension.)42 b(In)30 b(these)h(cases,)h(it)f(is)g(necessary)g(to)g(translate)h(the)f (names)f(of)h(the)227 4633 y(k)m(eyw)m(ords)f(asso)s(ciated)i(with)d (the)h(original)h(table)g(column\(s\))f(in)m(to)g(the)g(appropriate)g (k)m(eyw)m(ord)g(name)g(in)227 4746 y(the)37 b(\014nal)f(\014le.)58 b(F)-8 b(or)37 b(example,)i(if)d(column)h(2)f(is)h(deleted)g(from)e(a)i (table,)i(then)d(the)h(v)-5 b(alue)36 b(of)h('n')f(in)g(all)227 4859 y(the)c(TF)m(ORMn)g(and)f(TTYPEn)f(k)m(eyw)m(ords)i(for)g(columns) f(3)h(and)f(higher)h(m)m(ust)f(b)s(e)g(decremen)m(ted)i(b)m(y)e(1.)227 4972 y(Ev)m(en)j(more)g(complex)h(translations)f(are)h(sometimes)f (needed)g(to)h(con)m(v)m(ert)g(the)f(W)m(CS)g(k)m(eyw)m(ords)g(when)227 5085 y(extracting)e(an)f(image)g(out)g(of)f(a)h(table)g(column)g(cell)g (in)m(to)h(a)e(separate)i(image)f(extension.)227 5230 y(The)g(user)f(passes)i(an)f(arra)m(y)g(of)h(patterns)f(to)h(b)s(e)e (matc)m(hed.)44 b(Input)30 b(pattern)h(n)m(um)m(b)s(er)f(i)i(is)f (pattern[i][0],)227 5343 y(and)j(output)f(pattern)h(n)m(um)m(b)s(er)f (i)h(is)g(pattern[i][1].)53 b(Keyw)m(ords)34 b(are)g(matc)m(hed)h (against)g(the)f(input)f(pat-)227 5456 y(terns.)41 b(If)30 b(a)g(matc)m(h)i(is)e(found)f(then)h(the)h(k)m(eyw)m(ord)g(is)f (re-written)h(according)g(to)g(the)g(output)f(pattern.)227 5601 y(Order)41 b(is)h(imp)s(ortan)m(t.)76 b(The)41 b(\014rst)h(matc)m (h)h(is)f(accepted.)77 b(The)41 b(fastest)i(matc)m(h)g(will)f(b)s(e)g (made)g(when)227 5714 y(templates)32 b(with)e(the)h(same)f(\014rst)g(c) m(haracter)i(are)f(group)s(ed)e(together.)p eop end %%Page: 69 77 TeXDict begin 69 76 bop 0 299 a Fh(5.8.)72 b(UTILITY)30 b(R)m(OUTINES)2693 b Fj(69)227 555 y(Sev)m(eral)32 b(c)m(haracters)f (ha)m(v)m(e)h(sp)s(ecial)f(meanings:)466 772 y Fe(i,j)47 b(-)g(single)f(digits,)g(preserved)f(in)j(output)e(template)466 885 y(n)h(-)h(column)e(number)g(of)h(one)g(or)g(more)g(digits,)f (preserved)f(in)i(output)f(template)466 998 y(m)h(-)h(generic)e(number) g(of)h(one)g(or)g(more)g(digits,)e(preserved)h(in)h(output)f(template) 466 1111 y(a)h(-)h(coordinate)d(designator,)g(preserved)g(in)i(output)f (template)466 1224 y(#)h(-)h(number)e(of)h(one)g(or)g(more)g(digits)466 1337 y(?)g(-)h(any)f(character)466 1450 y(*)g(-)h(only)e(allowed)g(in)h (first)g(character)e(position,)g(to)j(match)e(all)657 1563 y(keywords;)f(only)i(useful)f(as)h(last)g(pattern)e(in)j(the)f (list)227 1780 y Fj(i,)31 b(j,)f(n,)g(and)g(m)g(are)h(returned)e(b)m(y) i(the)f(routine.)227 1926 y(F)-8 b(or)27 b(example,)g(the)f(input)f (pattern)h("iCTYPn")g(will)g(matc)m(h)h("1CTYP5")g(\(if)f(n)p 3003 1926 28 4 v 32 w(v)-5 b(alue)26 b(is)g(5\);)i(the)e(output)227 2038 y(pattern)31 b("CTYPEi")f(will)h(b)s(e)f(re-written)h(as)f ("CTYPE1".)42 b(Notice)32 b(that)f("i")g(is)g(preserv)m(ed.)227 2184 y(The)f(follo)m(wing)i(output)e(patterns)g(are)h(sp)s(ecial:)227 2330 y("-")h(-)e(do)h(not)f(cop)m(y)h(a)g(k)m(eyw)m(ord)g(that)g(matc)m (hes)g(the)g(corresp)s(onding)e(input)h(pattern)227 2475 y("+")h(-)g(cop)m(y)g(the)f(input)g(unc)m(hanged)227 2621 y(The)f(inrec)h(string)g(could)g(b)s(e)f(just)g(the)h(8-c)m(har)h (k)m(eyw)m(ord)f(name,)g(or)f(the)h(en)m(tire)h(80-c)m(har)g(header)f (record.)227 2734 y(Characters)h(9)g(-)f(80)h(in)g(the)f(input)g (string)g(simply)g(get)h(app)s(ended)e(to)i(the)g(translated)g(k)m(eyw) m(ord)f(name.)227 2879 y(If)h(n)p 375 2879 V 33 w(range)g(=)g(0,)i (then)e(only)h(k)m(eyw)m(ords)f(with)h('n')f(equal)h(to)g(n)p 2410 2879 V 32 w(v)-5 b(alue)32 b(will)g(b)s(e)f(considered)g(as)h(a)g (pattern)227 2992 y(matc)m(h.)70 b(If)39 b(n)p 722 2992 V 32 w(range)h(=)f(+1,)j(then)e(all)g(v)-5 b(alues)40 b(of)g('n')f(greater)i(than)e(or)h(equal)g(to)g(n)p 3269 2992 V 33 w(v)-5 b(alue)40 b(will)g(b)s(e)f(a)227 3105 y(matc)m(h,)32 b(and)e(if)g(-1,)h(then)f(v)-5 b(alues)31 b(of)g('n')f(less)g(than)h(or)f(equal)h(to)g(n)p 2530 3105 V 32 w(v)-5 b(alue)31 b(will)g(matc)m(h.)0 3337 y Fe(int)47 b(fits_translate_keyword\()286 3450 y(char)g(*inrec,)380 b(/*)47 b(I)h(-)f(input)f(string)g(*/)286 3563 y(char)h(*outrec,)332 b(/*)47 b(O)h(-)f(output)f(converted)f(string,)h(or)h(*/)1241 3676 y(/*)238 b(a)47 b(null)g(string)f(if)h(input)g(does)f(not)95 b(*/)1241 3788 y(/*)238 b(match)46 b(any)h(of)g(the)g(patterns)f(*/)286 3901 y(char)h(*patterns[][2],/*)c(I)48 b(-)f(pointer)f(to)h(input)f(/)i (output)e(string)g(*/)1241 4014 y(/*)238 b(templates)45 b(*/)286 4127 y(int)i(npat,)524 b(/*)47 b(I)h(-)f(number)f(of)h (templates)f(passed)g(*/)286 4240 y(int)h(n_value,)380 b(/*)47 b(I)h(-)f(base)g('n')g(template)e(value)h(of)i(interest)d(*/) 286 4353 y(int)i(n_offset,)332 b(/*)47 b(I)h(-)f(offset)f(to)h(be)g (applied)f(to)h(the)g('n')g(*/)1241 4466 y(/*)238 b(value)46 b(in)i(the)e(output)h(string)f(*/)286 4579 y(int)h(n_range,)380 b(/*)47 b(I)h(-)f(controls)f(range)g(of)h('n')g(template)f(*/)1241 4692 y(/*)238 b(values)46 b(of)h(interest)f(\(-1,0,)g(or)h(+1\))g(*/) 286 4805 y(int)g(*pat_num,)332 b(/*)47 b(O)h(-)f(matched)f(pattern)g (number)g(\(0)h(based\))f(or)h(-1)g(*/)286 4918 y(int)g(*i,)620 b(/*)47 b(O)h(-)f(value)f(of)i(i,)f(if)g(any,)g(else)f(0)i(*/)286 5031 y(int)f(*j,)620 b(/*)47 b(O)h(-)f(value)f(of)i(j,)f(if)g(any,)g (else)f(0)i(*/)286 5143 y(int)f(*m,)620 b(/*)47 b(O)h(-)f(value)f(of)i (m,)f(if)g(any,)g(else)f(0)i(*/)286 5256 y(int)f(*n,)620 b(/*)47 b(O)h(-)f(value)f(of)i(n,)f(if)g(any,)g(else)f(0)i(*/)286 5369 y(int)f(*status\))380 b(/*)47 b(IO)g(-)h(error)e(status)g(*/)80 5601 y Fj(Here)25 b(is)f(an)g(example)g(of)g(some)h(of)f(the)g (patterns)g(used)f(to)i(con)m(v)m(ert)g(the)f(k)m(eyw)m(ords)h(asso)s (ciated)g(with)f(an)g(image)227 5714 y(in)30 b(a)h(cell)h(of)e(a)h (table)g(column)f(in)m(to)i(the)e(k)m(eyw)m(ords)h(appropriate)f(for)h (an)f(IMA)m(GE)h(extension:)p eop end %%Page: 70 78 TeXDict begin 70 77 bop 0 299 a Fj(70)1379 b Fh(CHAPTER)30 b(5.)71 b(BASIC)30 b(CFITSIO)f(INTERF)-10 b(A)m(CE)30 b(R)m(OUTINES)191 555 y Fe(char)47 b(*patterns[][2])c(=)48 b({{"TSCALn",)92 b("BSCALE")i(},)h(/*)47 b(Standard)e(FITS)i(keywords)e (*/)143 668 y({"TZEROn",)93 b("BZERO")141 b(},)143 781 y({"TUNITn",)93 b("BUNIT")141 b(},)143 894 y({"TNULLn",)93 b("BLANK")141 b(},)143 1007 y({"TDMINn",)93 b("DATAMIN")45 b(},)143 1120 y({"TDMAXn",)93 b("DATAMAX")45 b(},)143 1233 y({"iCTYPn",)93 b("CTYPEi")g(},)i(/*)47 b(Coordinate)e(labels)h (*/)143 1346 y({"iCTYna",)93 b("CTYPEia")45 b(},)143 1458 y({"iCUNIn",)93 b("CUNITi")g(},)i(/*)47 b(Coordinate)e(units)i(*/) 143 1571 y({"iCUNna",)93 b("CUNITia")45 b(},)143 1684 y({"iCRVLn",)93 b("CRVALi")g(},)i(/*)47 b(WCS)g(keywords)f(*/)143 1797 y({"iCRVna",)93 b("CRVALia")45 b(},)143 1910 y({"iCDLTn",)93 b("CDELTi")g(},)143 2023 y({"iCDEna",)g("CDELTia")45 b(},)143 2136 y({"iCRPXn",)93 b("CRPIXi")g(},)143 2249 y({"iCRPna",)g("CRPIXia")45 b(},)143 2362 y({"ijPCna",)93 b("PCi_ja")g(},)143 2475 y({"ijCDna",)g("CDi_ja")g(},)143 2588 y({"iVn_ma",)g("PVi_ma")g(},)143 2700 y({"iSn_ma",)g("PSi_ma")g (},)143 2813 y({"iCRDna",)g("CRDERia")45 b(},)143 2926 y({"iCSYna",)93 b("CSYERia")45 b(},)143 3039 y({"iCROTn",)93 b("CROTAi")g(},)143 3152 y({"WCAXna",)g("WCSAXESa"},)143 3265 y({"WCSNna",)g("WCSNAMEa"}};)0 3517 y Fi(20)46 b Fj(T)-8 b(ranslate)26 b(the)f(k)m(eyw)m(ords)g(in)g(the)g(input)e(HDU)j (in)m(to)g(the)f(k)m(eyw)m(ords)g(that)h(are)f(appropriate)g(for)f(the) h(output)227 3630 y(HDU.)32 b(This)d(is)i(a)f(driv)m(er)h(routine)f (that)h(calls)g(the)g(previously)f(describ)s(ed)f(routine.)0 3881 y Fe(int)47 b(fits_translate_keywords\()143 3994 y(fitsfile)f(*infptr,)141 b(/*)47 b(I)g(-)h(pointer)e(to)h(input)f(HDU) h(*/)143 4107 y(fitsfile)f(*outfptr,)93 b(/*)47 b(I)g(-)h(pointer)e(to) h(output)f(HDU)h(*/)143 4220 y(int)g(firstkey,)332 b(/*)47 b(I)g(-)h(first)e(HDU)h(record)f(number)g(to)h(start)g(with)f(*/)143 4333 y(char)h(*patterns[][2],/*)c(I)k(-)h(pointer)e(to)h(input)f(/)i (output)e(keyword)g(templates)f(*/)143 4446 y(int)i(npat,)524 b(/*)47 b(I)g(-)h(number)e(of)h(templates)e(passed)h(*/)143 4559 y(int)h(n_value,)380 b(/*)47 b(I)g(-)h(base)e('n')h(template)f (value)g(of)h(interest)f(*/)143 4672 y(int)h(n_offset,)332 b(/*)47 b(I)g(-)h(offset)e(to)h(be)g(applied)f(to)h(the)g('n')g(*/)1193 4785 y(/*)238 b(value)47 b(in)g(the)g(output)f(string)g(*/)143 4898 y(int)h(n_range,)380 b(/*)47 b(I)g(-)h(controls)d(range)i(of)g ('n')g(template)e(*/)1098 5011 y(/*)238 b(values)46 b(of)h(interest)f (\(-1,0,)g(or)h(+1\))g(*/)143 5123 y(int)g(*status\))380 b(/*)47 b(IO)g(-)h(error)e(status)g(*/)0 5375 y Fi(21)g Fj(P)m(arse)35 b(the)g(input)f(string)h(con)m(taining)h(a)f(list)h(of)f (ro)m(ws)f(or)h(ro)m(w)g(ranges,)h(and)e(return)g(in)m(teger)i(arra)m (ys)f(con-)227 5488 y(taining)27 b(the)f(\014rst)f(and)g(last)i(ro)m(w) f(in)f(eac)m(h)i(range.)40 b(F)-8 b(or)26 b(example,)i(if)d(ro)m(wlist) i(=)e("3-5,)k(6,)e(8-9")h(then)d(it)i(will)227 5601 y(return)34 b(n)m(umranges)h(=)g(3,)h(rangemin)f(=)g(3,)i(6,)g(8)e(and)g(rangemax)g (=)g(5,)i(6,)g(9.)55 b(A)m(t)36 b(most,)h('maxranges')227 5714 y(n)m(um)m(b)s(er)31 b(of)h(ranges)f(will)h(b)s(e)g(returned.)43 b('maxro)m(ws')32 b(is)g(the)g(maxim)m(um)g(n)m(um)m(b)s(er)e(of)i(ro)m (ws)g(in)f(the)h(table;)p eop end %%Page: 71 79 TeXDict begin 71 78 bop 0 299 a Fh(5.8.)72 b(UTILITY)30 b(R)m(OUTINES)2693 b Fj(71)227 555 y(an)m(y)30 b(ro)m(ws)f(or)g(ranges) g(larger)h(than)f(this)g(will)g(b)s(e)g(ignored.)40 b(The)29 b(ro)m(ws)g(m)m(ust)g(b)s(e)f(sp)s(eci\014ed)h(in)f(increasing)227 668 y(order,)33 b(and)f(the)g(ranges)h(m)m(ust)f(not)g(o)m(v)m(erlap.) 48 b(A)33 b(min)m(us)e(sign)i(ma)m(y)g(b)s(e)e(use)h(to)h(sp)s(ecify)f (all)h(the)g(ro)m(ws)f(to)227 781 y(the)h(upp)s(er)d(or)j(lo)m(w)m(er)h (b)s(ound,)d(so)i("50-")h(means)e(all)i(the)f(ro)m(ws)f(from)g(50)h(to) h(the)e(end)g(of)h(the)f(table,)j(and)227 894 y("-")d(means)e(all)h (the)g(ro)m(ws)f(in)g(the)h(table,)g(from)f(1)h(-)g(maxro)m(ws.)191 1143 y Fe(int)47 b(fits_parse_range)c(/)48 b(ffrwrg\(char)c(*rowlist,)i (LONGLONG)f(maxrows,)h(int)h(maxranges,)e(>)334 1256 y(int)i(*numranges,)e(long)h(*rangemin,)f(long)i(*rangemax,)e(int)i (*status\))191 1481 y(int)g(fits_parse_rangell)c(/)k(ffrwrgll\(char)d (*rowlist,)i(LONGLONG)f(maxrows,)h(int)h(maxranges,)e(>)334 1594 y(int)i(*numranges,)e(LONGLONG)g(*rangemin,)g(LONGLONG)h (*rangemax,)f(int)i(*status\))0 1843 y Fi(22)f Fj(Chec)m(k)37 b(that)g(the)g(Header)g(\014ll)g(b)m(ytes)g(\(if)g(an)m(y\))g(are)g (all)h(blank.)59 b(These)36 b(are)h(the)g(b)m(ytes)g(that)g(ma)m(y)h (follo)m(w)227 1956 y(END)e(k)m(eyw)m(ord)g(and)f(b)s(efore)g(the)h(b)s (eginning)f(of)h(data)g(unit,)g(or)g(the)g(end)f(of)g(the)h(HDU)g(if)g (there)f(is)h(no)227 2069 y(data)31 b(unit.)191 2318 y Fe(int)47 b(ffchfl\(fitsfile)c(*fptr,)k(>)g(int)g(*status\))0 2566 y Fi(23)f Fj(Chec)m(k)30 b(that)g(the)f(Data)i(\014ll)e(b)m(ytes)h (\(if)g(an)m(y\))g(are)g(all)g(zero)g(\(for)f(IMA)m(GE)i(or)e(BINAR)-8 b(Y)30 b(T)-8 b(able)30 b(HDU\))h(or)e(all)227 2679 y(blanks)g(\(for)g (ASCI)s(I)f(table)i(HDU\).)g(These)f(\014le)g(b)m(ytes)h(ma)m(y)f(b)s (e)g(lo)s(cated)h(after)g(the)f(last)h(v)-5 b(alid)29 b(data)h(b)m(yte)227 2792 y(in)g(the)h(HDU)g(and)f(b)s(efore)g(the)g (ph)m(ysical)h(end)f(of)h(the)f(HDU.)191 3041 y Fe(int)47 b(ffcdfl\(fitsfile)c(*fptr,)k(>)g(int)g(*status\))0 3290 y Fi(24)f Fj(Estimate)35 b(the)e(ro)s(ot-mean-squared)h(\(RMS\))f (noise)h(in)f(an)g(image.)51 b(These)33 b(routines)g(are)h(mainly)f (for)g(use)227 3403 y(with)25 b(the)g(Hcompress)g(image)i(compression)e (algorithm.)40 b(They)24 b(return)g(an)h(estimate)i(of)e(the)h(RMS)f (noise)227 3515 y(in)38 b(the)f(bac)m(kground)h(pixels)f(of)h(the)g (image.)64 b(This)36 b(robust)h(algorithm)i(\(written)f(b)m(y)f(Ric)m (hard)h(White,)227 3628 y(STScI\))e(\014rst)f(attempts)i(to)g(estimate) h(the)f(RMS)e(v)-5 b(alue)37 b(as)g(1.68)g(times)g(the)f(median)g(of)h (the)f(absolute)227 3741 y(di\013erences)26 b(b)s(et)m(w)m(een)h (successiv)m(e)g(pixels)f(in)g(the)g(image.)41 b(If)25 b(the)h(median)g(=)f(0,)j(then)d(the)h(algorithm)h(falls)227 3854 y(bac)m(k)h(to)f(computing)g(the)g(RMS)f(of)h(the)g(di\013erence)g (b)s(et)m(w)m(een)h(successiv)m(e)g(pixels,)f(after)h(sev)m(eral)g (N-sigma)227 3967 y(rejection)e(cycles)g(to)g(remo)m(v)m(e)g(extreme)g (v)-5 b(alues.)39 b(The)25 b(input)e(parameters)j(are:)38 b(the)25 b(arra)m(y)g(of)g(image)i(pixel)227 4080 y(v)-5 b(alues)30 b(\(either)h(\015oat)f(or)g(short)f(v)-5 b(alues\),)31 b(the)f(n)m(um)m(b)s(er)e(of)i(v)-5 b(alues)30 b(in)g(the)g(arra)m(y)-8 b(,)31 b(the)f(v)-5 b(alue)30 b(that)g(is)g(used)227 4193 y(to)h(represen)m(t)g(n)m(ull)f(pixels)h(\(en)m(ter)g(a)g(v)m(ery) g(large)g(n)m(um)m(b)s(er)e(if)h(there)h(are)g(no)f(n)m(ull)g (pixels\).)191 4442 y Fe(int)47 b(fits_rms_float)d(\(float)i(fdata[],)f (int)i(npix,)g(float)f(in_null_value,)907 4555 y(>)h(double)f(*rms,)h (int)g(*status\))191 4668 y(int)g(fits_rms_short)d(\(short)i(fdata[],)f (int)i(npix,)g(short)f(in_null_value,)907 4780 y(>)h(double)f(*rms,)h (int)g(*status\))0 5029 y Fi(25)f Fj(W)-8 b(as)33 b(CFITSIO)d(compiled) h(with)h(the)f(-D)p 1612 5029 28 4 v 34 w(REENTRANT)g(directiv)m(e)i (so)e(that)h(it)g(ma)m(y)h(b)s(e)d(safely)j(used)d(in)227 5142 y(m)m(ulti-threaded)d(en)m(vironmen)m(ts?)40 b(The)26 b(follo)m(wing)i(function)e(returns)f(1)i(if)f(y)m(es,)i(0)f(if)f(no.) 40 b(Note,)28 b(ho)m(w)m(ev)m(er,)227 5255 y(that)35 b(ev)m(en)g(if)g(the)f(-D)p 991 5255 V 34 w(REENTRANT)f(directiv)m(e)j (w)m(as)f(sp)s(eci\014ed,)g(this)f(do)s(es)g(not)h(guaran)m(tee)h(that) f(the)227 5368 y(CFITSIO)29 b(routines)h(are)h(thread-safe,)g(b)s (ecause)g(some)f(compilers)h(ma)m(y)g(not)g(supp)s(ort)d(this)j (feature.)0 5617 y Fe(int)47 b(fits_is_reentrant\(void\))p eop end %%Page: 72 80 TeXDict begin 72 79 bop 0 299 a Fj(72)1379 b Fh(CHAPTER)30 b(5.)71 b(BASIC)30 b(CFITSIO)f(INTERF)-10 b(A)m(CE)30 b(R)m(OUTINES)p eop end %%Page: 73 81 TeXDict begin 73 80 bop 0 1225 a Fg(Chapter)65 b(6)0 1687 y Fm(The)77 b(CFITSIO)f(Iterator)i(F)-19 b(unction)0 2180 y Fj(The)41 b(\014ts)p 325 2180 28 4 v 33 w(iterate)p 614 2180 V 34 w(data)i(function)e(in)h(CFITSIO)e(pro)m(vides)i(a)g (unique)e(metho)s(d)i(of)g(executing)h(an)e(arbitrary)0 2293 y(user-supplied)35 b(`w)m(ork')i(function)f(that)h(op)s(erates)g (on)g(ro)m(ws)f(of)h(data)g(in)f(FITS)g(tables)h(or)f(on)h(pixels)f(in) h(FITS)0 2406 y(images.)i(Rather)24 b(than)e(explicitly)j(reading)e (and)g(writing)g(the)g(FITS)g(images)h(or)f(columns)g(of)g(data,)i(one) f(instead)0 2518 y(calls)36 b(the)g(CFITSIO)d(iterator)k(routine,)g (passing)e(to)h(it)g(the)f(name)g(of)h(the)f(user's)g(w)m(ork)g (function)g(that)h(is)f(to)0 2631 y(b)s(e)30 b(executed)h(along)g(with) f(a)h(list)g(of)f(all)h(the)f(table)i(columns)e(or)g(image)h(arra)m(ys) g(that)g(are)f(to)h(b)s(e)f(passed)g(to)h(the)0 2744 y(w)m(ork)37 b(function.)61 b(The)37 b(CFITSIO)e(iterator)k(function)e (then)g(do)s(es)g(all)h(the)f(w)m(ork)g(of)h(allo)s(cating)h(memory)e (for)0 2857 y(the)28 b(arra)m(ys,)h(reading)f(the)g(input)e(data)j (from)e(the)h(FITS)f(\014le,)h(passing)g(them)g(to)g(the)g(w)m(ork)g (function,)g(and)f(then)0 2970 y(writing)36 b(an)m(y)h(output)f(data)h (bac)m(k)h(to)f(the)f(FITS)g(\014le)g(after)h(the)g(w)m(ork)g(function) f(exits.)59 b(Because)38 b(it)f(is)g(often)0 3083 y(more)g(e\016cien)m (t)i(to)f(pro)s(cess)f(only)g(a)h(subset)f(of)g(the)g(total)i(table)g (ro)m(ws)e(at)h(one)f(time,)j(the)e(iterator)g(function)0 3196 y(can)31 b(determine)f(the)h(optim)m(um)f(amoun)m(t)h(of)f(data)h (to)g(pass)f(in)g(eac)m(h)i(iteration)f(and)f(rep)s(eatedly)h(call)g (the)g(w)m(ork)0 3309 y(function)f(un)m(til)h(the)f(en)m(tire)i(table)f (b)s(een)e(pro)s(cessed.)0 3469 y(F)-8 b(or)37 b(man)m(y)f (applications)h(this)e(single)i(CFITSIO)d(iterator)k(function)d(can)h (e\013ectiv)m(ely)j(replace)e(all)g(the)f(other)0 3582 y(CFITSIO)g(routines)i(for)f(reading)h(or)f(writing)h(data)g(in)f(FITS) g(images)i(or)e(tables.)64 b(Using)37 b(the)h(iterator)h(has)0 3695 y(sev)m(eral)32 b(imp)s(ortan)m(t)e(adv)-5 b(an)m(tages)32 b(o)m(v)m(er)g(the)f(traditional)g(metho)s(d)f(of)h(reading)f(and)g (writing)g(FITS)g(data)h(\014les:)136 3961 y Fc(\017)46 b Fj(It)33 b(cleanly)h(separates)g(the)f(data)h(I/O)f(from)f(the)h (routine)g(that)h(op)s(erates)f(on)g(the)g(data.)49 b(This)32 b(leads)h(to)227 4074 y(a)e(more)g(mo)s(dular)e(and)h(`ob)5 b(ject)31 b(orien)m(ted')h(programming)e(st)m(yle.)136 4268 y Fc(\017)46 b Fj(It)27 b(simpli\014es)f(the)h(application)h (program)f(b)m(y)f(eliminating)i(the)f(need)g(to)g(allo)s(cate)i (memory)e(for)f(the)h(data)227 4381 y(arra)m(ys)e(and)f(eliminates)i (most)e(of)h(the)f(calls)i(to)f(the)g(CFITSIO)d(routines)j(that)g (explicitly)h(read)e(and)g(write)227 4494 y(the)31 b(data.)136 4689 y Fc(\017)46 b Fj(It)32 b(ensures)e(that)i(the)g(data)g(are)g(pro) s(cessed)f(as)h(e\016cien)m(tly)h(as)e(p)s(ossible.)44 b(This)31 b(is)g(esp)s(ecially)i(imp)s(ortan)m(t)227 4801 y(when)44 b(pro)s(cessing)g(tabular)h(data)h(since)f(the)g (iterator)h(function)e(will)h(calculate)i(the)e(most)g(e\016cien)m(t) 227 4914 y(n)m(um)m(b)s(er)36 b(of)i(ro)m(ws)g(in)f(the)h(table)g(to)g (b)s(e)f(passed)g(at)i(one)e(time)i(to)f(the)g(user's)e(w)m(ork)i (function)f(on)h(eac)m(h)227 5027 y(iteration.)136 5222 y Fc(\017)46 b Fj(Mak)m(es)39 b(it)e(p)s(ossible)g(for)g(larger)h(pro)5 b(jects)37 b(to)h(dev)m(elop)g(a)g(library)e(of)i(w)m(ork)f(functions)f (that)i(all)g(ha)m(v)m(e)h(a)227 5335 y(uniform)29 b(calling)j (sequence)f(and)f(are)h(all)g(indep)s(enden)m(t)e(of)i(the)f(details)i (of)e(the)h(FITS)e(\014le)i(format.)0 5601 y(There)f(are)h(basically)h (2)g(steps)e(in)h(using)f(the)h(CFITSIO)e(iterator)j(function.)42 b(The)30 b(\014rst)g(step)h(is)g(to)g(design)g(the)0 5714 y(w)m(ork)26 b(function)f(itself)h(whic)m(h)f(m)m(ust)h(ha)m(v)m (e)g(a)g(prescrib)s(ed)e(set)i(of)g(input)f(parameters.)39 b(One)25 b(of)h(these)g(parameters)1905 5942 y(73)p eop end %%Page: 74 82 TeXDict begin 74 81 bop 0 299 a Fj(74)1455 b Fh(CHAPTER)30 b(6.)112 b(THE)30 b(CFITSIO)e(ITERA)-8 b(TOR)30 b(FUNCTION)0 555 y Fj(is)f(a)g(structure)g(con)m(taining)i(p)s(oin)m(ters)d(to)i (the)f(arra)m(ys)h(of)f(data;)h(the)f(w)m(ork)h(function)e(can)i(p)s (erform)d(an)m(y)i(desired)0 668 y(op)s(erations)k(on)h(these)f(arra)m (ys)h(and)e(do)s(es)h(not)g(need)g(to)h(w)m(orry)f(ab)s(out)g(ho)m(w)g (the)h(input)e(data)i(w)m(ere)f(read)g(from)0 781 y(the)e(\014le)f(or)g (ho)m(w)h(the)f(output)g(data)h(get)h(written)e(bac)m(k)h(to)h(the)e (\014le.)0 941 y(The)24 b(second)h(step)g(is)f(to)i(design)e(the)h (driv)m(er)g(routine)f(that)i(op)s(ens)e(all)h(the)g(necessary)g(FITS)f (\014les)h(and)f(initializes)0 1054 y(the)41 b(input)g(parameters)g(to) h(the)g(iterator)g(function.)73 b(The)41 b(driv)m(er)g(program)g(calls) h(the)g(CFITSIO)e(iterator)0 1167 y(function)30 b(whic)m(h)g(then)g (reads)g(the)h(data)g(and)f(passes)g(it)h(to)g(the)g(user's)e(w)m(ork)i (function.)0 1327 y(The)20 b(follo)m(wing)i(2)f(sections)g(describ)s(e) f(these)h(steps)g(in)f(more)g(detail.)39 b(There)20 b(are)h(also)g(sev) m(eral)h(example)f(programs)0 1440 y(included)30 b(with)g(the)g (CFITSIO)f(distribution)h(whic)m(h)g(illustrate)i(ho)m(w)e(to)h(use)f (the)h(iterator)g(function.)0 1789 y Ff(6.1)135 b(The)45 b(Iterator)h(W)-11 b(ork)45 b(F)-11 b(unction)0 2043 y Fj(The)42 b(user-supplied)f(iterator)j(w)m(ork)f(function)f(m)m(ust)g (ha)m(v)m(e)i(the)f(follo)m(wing)h(set)f(of)g(input)e(parameters)i (\(the)0 2156 y(function)30 b(can)h(b)s(e)e(giv)m(en)j(an)m(y)f (desired)e(name\):)95 2429 y Fe(int)47 b(user_fn\()f(long)h(totaln,)e (long)i(offset,)f(long)g(firstn,)g(long)h(nvalues,)716 2542 y(int)g(narrays,)e(iteratorCol)g(*data,)94 b(void)47 b(*userPointer)d(\))136 2815 y Fc(\017)i Fj(totaln)24 b({)f(the)f(total)j(n)m(um)m(b)s(er)c(of)h(table)i(ro)m(ws)e(or)g (image)i(pixels)f(that)g(will)f(b)s(e)g(passed)g(to)h(the)g(w)m(ork)f (function)227 2928 y(during)29 b(1)i(or)g(more)f(iterations.)136 3129 y Fc(\017)46 b Fj(o\013set)d({)f(the)h(o\013set)f(applied)g(to)h (the)f(\014rst)f(table)i(ro)m(w)f(or)g(image)h(pixel)f(to)h(b)s(e)e (passed)g(to)i(the)f(w)m(ork)227 3241 y(function.)55 b(In)34 b(other)i(w)m(ords,)g(this)f(is)g(the)g(n)m(um)m(b)s(er)f(of)h (ro)m(ws)h(or)f(pixels)g(that)h(are)f(skipp)s(ed)f(o)m(v)m(er)i(b)s (efore)227 3354 y(starting)30 b(the)g(iterations.)42 b(If)28 b(o\013set)j(=)e(0,)h(then)f(all)h(the)f(table)i(ro)m(ws)e(or)g (image)i(pixels)e(will)h(b)s(e)e(passed)h(to)227 3467 y(the)i(w)m(ork)f(function.)136 3668 y Fc(\017)46 b Fj(\014rstn)26 b({)i(the)f(n)m(um)m(b)s(er)f(of)i(the)f(\014rst)g(table)h(ro)m(w)f(or) g(image)i(pixel)e(\(starting)i(with)e(1\))h(that)f(is)h(b)s(eing)e (passed)227 3781 y(in)k(this)h(particular)f(call)i(to)f(the)g(w)m(ork)f (function.)136 3982 y Fc(\017)46 b Fj(n)m(v)-5 b(alues)35 b({)g(the)f(n)m(um)m(b)s(er)g(of)g(table)h(ro)m(ws)g(or)f(image)i (pixels)e(that)h(are)g(b)s(eing)f(passed)g(in)g(this)h(particular)227 4095 y(call)h(to)g(the)f(w)m(ork)f(function.)54 b(n)m(v)-5 b(alues)35 b(will)g(alw)m(a)m(ys)h(b)s(e)e(less)h(than)f(or)h(equal)g (to)h(totaln)g(and)e(will)h(ha)m(v)m(e)227 4208 y(the)f(same)f(v)-5 b(alue)34 b(on)f(eac)m(h)h(iteration,)i(except)e(p)s(ossibly)f(on)g (the)g(last)h(call)h(whic)m(h)e(ma)m(y)g(ha)m(v)m(e)i(a)e(smaller)227 4321 y(v)-5 b(alue.)136 4522 y Fc(\017)46 b Fj(narra)m(ys)31 b({)g(the)g(n)m(um)m(b)s(er)f(of)h(arra)m(ys)g(of)g(data)h(that)f(are)g (b)s(eing)g(passed)f(to)i(the)f(w)m(ork)g(function.)42 b(There)30 b(is)227 4635 y(one)h(arra)m(y)g(for)f(eac)m(h)i(image)f(or) f(table)i(column.)136 4835 y Fc(\017)46 b Fj(*data)31 b({)e(arra)m(y)h(of)f(structures,)g(one)h(for)f(eac)m(h)h(column)f(or)g (image.)42 b(Eac)m(h)29 b(structure)g(con)m(tains)h(a)g(p)s(oin)m(ter) 227 4948 y(to)h(the)g(arra)m(y)g(of)f(data)h(as)g(w)m(ell)g(as)g(other) g(descriptiv)m(e)g(parameters)g(ab)s(out)f(that)h(arra)m(y)-8 b(.)136 5149 y Fc(\017)46 b Fj(*userP)m(oin)m(ter)26 b({)g(a)f(user)f(supplied)g(p)s(oin)m(ter)h(that)h(can)f(b)s(e)f(used)h (to)g(pass)g(ancillary)h(information)f(from)g(the)227 5262 y(driv)m(er)h(function)g(to)g(the)g(w)m(ork)g(function.)39 b(This)25 b(p)s(oin)m(ter)h(is)g(passed)g(to)g(the)h(CFITSIO)d (iterator)j(function)227 5375 y(whic)m(h)37 b(then)f(passes)g(it)h(on)g (to)g(the)f(w)m(ork)h(function)f(without)h(an)m(y)g(mo)s(di\014cation.) 59 b(It)37 b(ma)m(y)g(p)s(oin)m(t)f(to)i(a)227 5488 y(single)29 b(n)m(um)m(b)s(er,)f(to)h(an)f(arra)m(y)h(of)g(v)-5 b(alues,)29 b(to)g(a)g(structure)f(con)m(taining)i(an)e(arbitrary)g(set)h(of)g (parameters)227 5601 y(of)e(di\013eren)m(t)h(t)m(yp)s(es,)g(or)f(it)h (ma)m(y)f(b)s(e)g(a)g(n)m(ull)g(p)s(oin)m(ter)g(if)g(it)h(is)f(not)g (needed.)40 b(The)26 b(w)m(ork)h(function)g(m)m(ust)g(cast)227 5714 y(this)k(p)s(oin)m(ter)f(to)h(the)g(appropriate)f(data)h(t)m(yp)s (e)g(b)s(efore)f(using)f(it)i(it.)p eop end %%Page: 75 83 TeXDict begin 75 82 bop 0 299 a Fh(6.1.)72 b(THE)30 b(ITERA)-8 b(TOR)30 b(W)m(ORK)g(FUNCTION)2021 b Fj(75)0 555 y(The)23 b(totaln,)k(o\013set,)g(narra)m(ys,)e(data,)h(and)d(userP)m(oin)m(ter)i (parameters)f(are)g(guaran)m(teed)h(to)g(ha)m(v)m(e)g(the)f(same)g(v)-5 b(alue)0 668 y(on)35 b(eac)m(h)i(iteration.)57 b(Only)34 b(\014rstn,)i(n)m(v)-5 b(alues,)37 b(and)d(the)i(arra)m(ys)f(of)h(data) g(p)s(oin)m(ted)f(to)h(b)m(y)f(the)h(data)g(structures)0 781 y(ma)m(y)31 b(c)m(hange)g(on)g(eac)m(h)g(iterativ)m(e)i(call)f(to)f (the)f(w)m(ork)h(function.)0 941 y(Note)43 b(that)g(the)f(iterator)h (treats)g(an)f(image)h(as)f(a)g(long)h(1-D)g(arra)m(y)f(of)h(pixels)f (regardless)g(of)g(it's)h(in)m(trinsic)0 1054 y(dimensionalit)m(y)-8 b(.)52 b(The)33 b(total)j(n)m(um)m(b)s(er)c(of)i(pixels)g(is)g(just)f (the)h(pro)s(duct)e(of)i(the)g(size)h(of)e(eac)m(h)i(dimension,)g(and)0 1167 y(the)e(order)g(of)g(the)g(pixels)g(is)g(the)g(same)g(as)g(the)h (order)e(that)h(they)h(are)f(stored)g(in)g(the)g(FITS)f(\014le.)48 b(If)33 b(the)g(w)m(ork)0 1280 y(function)27 b(needs)g(to)h(kno)m(w)f (the)h(n)m(um)m(b)s(er)e(and)h(size)h(of)g(the)f(image)i(dimensions)d (then)h(these)h(parameters)g(can)g(b)s(e)0 1393 y(passed)i(via)h(the)f (userP)m(oin)m(ter)i(structure.)0 1553 y(The)e(iteratorCol)i(structure) e(is)g(curren)m(tly)h(de\014ned)e(as)h(follo)m(ws:)0 1780 y Fe(typedef)46 b(struct)94 b(/*)47 b(structure)e(for)i(the)g (iterator)e(function)h(column)g(information)f(*/)0 1893 y({)143 2005 y(/*)i(structure)f(elements)f(required)h(as)h(input)f(to)h (fits_iterate_data:)c(*/)95 2231 y(fitsfile)j(*fptr;)332 b(/*)48 b(pointer)d(to)j(the)f(HDU)f(containing)f(the)i(column)f(or)i (image)e(*/)95 2344 y(int)286 b(colnum;)e(/*)48 b(column)e(number)g(in) h(the)g(table;)f(ignored)g(for)h(images)189 b(*/)95 2457 y(char)238 b(colname[70];)44 b(/*)k(name)e(\(TTYPEn\))g(of)h(the)g (column;)f(null)g(for)h(images)285 b(*/)95 2570 y(int)h(datatype;)188 b(/*)48 b(output)e(data)g(type)h(\(converted)e(if)i(necessary\))e(*/)95 2683 y(int)286 b(iotype;)e(/*)48 b(type:)e(InputCol,)f(InputOutputCol,) f(or)j(OutputCol)e(*/)95 2909 y(/*)j(output)e(structure)f(elements)h (that)g(may)h(be)g(useful)f(for)h(the)g(work)g(function:)e(*/)95 3135 y(void)238 b(*array;)189 b(/*)47 b(pointer)f(to)h(the)g(array)f (\(and)h(the)g(null)g(value\))f(*/)95 3247 y(long)238 b(repeat;)189 b(/*)47 b(binary)f(table)h(vector)f(repeat)g(value;)g (set)238 b(*/)1050 3360 y(/*)g(equal)46 b(to)i(1)f(for)g(images)810 b(*/)95 3473 y(long)238 b(tlmin;)f(/*)47 b(legal)g(minimum)e(data)i (value,)f(if)h(any)477 b(*/)95 3586 y(long)238 b(tlmax;)f(/*)47 b(legal)g(maximum)e(data)i(value,)f(if)h(any)477 b(*/)95 3699 y(char)238 b(unit[70];)93 b(/*)47 b(physical)f(unit)g(string)g (\(BUNIT)h(or)g(TUNITn\))189 b(*/)95 3812 y(char)238 b(tdisp[70];)45 b(/*)i(suggested)e(display)h(format;)g(null)h(if)g (none)190 b(*/)0 4038 y(})47 b(iteratorCol;)0 4264 y Fj(Instead)34 b(of)g(directly)g(reading)g(or)g(writing)g(the)f(elemen)m (ts)j(in)d(this)h(structure,)g(it)h(is)e(recommended)h(that)g(pro-)0 4377 y(grammers)c(use)g(the)h(access)h(functions)d(that)i(are)g(pro)m (vided)f(for)g(this)h(purp)s(ose.)0 4538 y(The)25 b(\014rst)g(\014v)m (e)h(elemen)m(ts)h(in)f(this)f(structure)h(m)m(ust)f(b)s(e)g(initially) j(de\014ned)c(b)m(y)i(the)g(driv)m(er)f(routine)h(b)s(efore)f(calling)0 4650 y(the)f(iterator)h(routine.)38 b(The)23 b(CFITSIO)f(iterator)j (routine)f(uses)f(this)g(information)h(to)g(determine)g(what)f(column)0 4763 y(or)32 b(arra)m(y)h(to)h(pass)e(to)h(the)g(w)m(ork)f(function,)h (and)f(whether)g(the)g(arra)m(y)h(is)g(to)g(b)s(e)f(input)g(to)h(the)f (w)m(ork)h(function,)0 4876 y(output)g(from)g(the)h(w)m(ork)f (function,)h(or)g(b)s(oth.)49 b(The)33 b(CFITSIO)f(iterator)i(function) f(\014lls)h(in)f(the)g(v)-5 b(alues)34 b(of)g(the)0 4989 y(remaining)c(structure)g(elemen)m(ts)i(b)s(efore)e(passing)g(it)h(to)g (the)g(w)m(ork)f(function.)0 5149 y(The)d(arra)m(y)g(structure)g (elemen)m(t)i(is)e(a)g(p)s(oin)m(ter)g(to)h(the)g(actual)g(data)g(arra) m(y)g(and)e(it)i(m)m(ust)f(b)s(e)f(cast)j(to)e(the)h(correct)0 5262 y(data)k(t)m(yp)s(e)f(b)s(efore)f(it)i(is)f(used.)41 b(The)31 b(`rep)s(eat')g(structure)g(elemen)m(t)h(giv)m(e)g(the)g(n)m (um)m(b)s(er)d(of)i(data)h(v)-5 b(alues)31 b(in)g(eac)m(h)0 5375 y(ro)m(w)f(of)g(the)g(table,)i(so)e(that)h(the)f(total)i(n)m(um)m (b)s(er)c(of)i(data)h(v)-5 b(alues)30 b(in)g(the)g(arra)m(y)h(is)f(giv) m(en)h(b)m(y)f(rep)s(eat)g(*)g(n)m(v)-5 b(alues.)0 5488 y(In)36 b(the)g(case)i(of)e(image)i(arra)m(ys)f(and)e(ASCI)s(I)g (tables,)k(rep)s(eat)e(will)g(alw)m(a)m(ys)g(b)s(e)f(equal)h(to)g(1.)59 b(When)37 b(the)f(data)0 5601 y(t)m(yp)s(e)k(is)f(a)h(c)m(haracter)h (string,)h(the)e(arra)m(y)g(p)s(oin)m(ter)f(is)h(actually)h(a)f(p)s (oin)m(ter)f(to)i(an)e(arra)m(y)h(of)g(string)f(p)s(oin)m(ters)0 5714 y(\(i.e.,)31 b(c)m(har)e(**arra)m(y\).)42 b(The)29 b(other)g(output)g(structure)f(elemen)m(ts)j(are)e(pro)m(vided)g(for)f (con)m(v)m(enience)k(in)c(case)i(that)p eop end %%Page: 76 84 TeXDict begin 76 83 bop 0 299 a Fj(76)1455 b Fh(CHAPTER)30 b(6.)112 b(THE)30 b(CFITSIO)e(ITERA)-8 b(TOR)30 b(FUNCTION)0 555 y Fj(information)36 b(is)g(needed)f(within)g(the)h(w)m(ork)g (function.)56 b(An)m(y)35 b(other)h(information)g(ma)m(y)g(b)s(e)f (passed)h(from)f(the)0 668 y(driv)m(er)30 b(routine)h(to)g(the)f(w)m (ork)h(function)f(via)h(the)f(userP)m(oin)m(ter)h(parameter.)0 828 y(Up)s(on)g(completion,)j(the)e(w)m(ork)h(routine)f(m)m(ust)g (return)f(an)h(in)m(teger)h(status)f(v)-5 b(alue,)34 b(with)d(0)i(indicating)g(success)0 941 y(and)e(an)m(y)g(other)g(v)-5 b(alue)32 b(indicating)g(an)f(error)g(whic)m(h)g(will)g(cause)h(the)f (iterator)i(function)e(to)h(immediately)g(exit)0 1054 y(at)27 b(that)f(p)s(oin)m(t.)39 b(Return)25 b(status)i(v)-5 b(alues)26 b(in)f(the)h(range)h(1)f({)g(1000)i(should)c(b)s(e)i(a)m(v)m (oided)h(since)f(these)h(are)f(reserv)m(ed)0 1167 y(for)d(use)g(b)m(y)h (CFITSIO.)e(A)i(return)e(status)i(v)-5 b(alue)24 b(of)g(-1)g(ma)m(y)g (b)s(e)f(used)f(to)j(force)f(the)f(CFITSIO)f(iterator)j(function)0 1280 y(to)i(stop)g(at)g(that)h(p)s(oin)m(t)e(and)g(return)g(con)m(trol) i(to)f(the)g(driv)m(er)f(routine)h(after)g(writing)f(an)m(y)h(output)f (arra)m(ys)h(to)h(the)0 1393 y(FITS)e(\014le.)40 b(CFITSIO)26 b(do)s(es)g(not)i(considered)f(this)g(to)h(b)s(e)e(an)h(error)g (condition,)i(so)e(an)m(y)g(further)f(pro)s(cessing)h(b)m(y)0 1506 y(the)k(application)g(program)f(will)h(con)m(tin)m(ue)h(normally) -8 b(.)0 1837 y Ff(6.2)135 b(The)45 b(Iterator)h(Driv)l(er)g(F)-11 b(unction)0 2087 y Fj(The)33 b(iterator)h(driv)m(er)f(function)g(m)m (ust)h(op)s(en)e(the)i(necessary)f(FITS)g(\014les)g(and)g(p)s(osition)g (them)g(to)h(the)g(correct)0 2200 y(HDU.)23 b(It)f(m)m(ust)g(also)i (initialize)g(the)e(follo)m(wing)i(parameters)e(in)g(the)h(iteratorCol) h(structure)d(\(de\014ned)g(ab)s(o)m(v)m(e\))j(for)0 2313 y(eac)m(h)31 b(column)f(or)g(image)h(b)s(efore)e(calling)j(the)e (CFITSIO)e(iterator)j(function.)40 b(Sev)m(eral)31 b(`constructor')g (routines)0 2426 y(are)g(pro)m(vided)f(in)g(CFITSIO)f(for)h(this)g (purp)s(ose.)136 2670 y Fc(\017)46 b Fj(*fptr)30 b({)h(The)f (\014ts\014le)g(p)s(oin)m(ter)g(to)i(the)e(table)h(or)g(image.)136 2853 y Fc(\017)46 b Fj(coln)m(um)30 b({)f(the)h(n)m(um)m(b)s(er)e(of)h (the)h(column)f(in)g(the)g(table.)42 b(This)28 b(v)-5 b(alue)30 b(is)f(ignored)g(in)g(the)h(case)g(of)g(images.)227 2966 y(If)j(coln)m(um)h(equals)g(0,)g(then)g(the)f(column)g(name)h (will)f(b)s(e)g(used)g(to)h(iden)m(tify)g(the)f(column)h(to)g(b)s(e)e (passed)227 3079 y(to)f(the)g(w)m(ork)f(function.)136 3261 y Fc(\017)46 b Fj(colname)32 b({)e(the)g(name)h(\(TTYPEn)e(k)m (eyw)m(ord\))i(of)f(the)h(column.)40 b(This)29 b(is)i(only)f(required)f (if)h(coln)m(um)h(=)f(0)227 3374 y(and)g(is)g(ignored)h(for)f(images.) 136 3556 y Fc(\017)46 b Fj(datat)m(yp)s(e)29 b({)g(The)e(desired)h (data)g(t)m(yp)s(e)g(of)h(the)f(arra)m(y)g(to)h(b)s(e)e(passed)h(to)h (the)f(w)m(ork)g(function.)40 b(F)-8 b(or)28 b(n)m(umer-)227 3669 y(ical)h(data)f(the)f(data)h(t)m(yp)s(e)g(do)s(es)f(not)g(need)g (to)h(b)s(e)f(the)g(same)h(as)f(the)h(actual)g(data)g(t)m(yp)s(e)g(in)f (the)g(FITS)g(\014le,)227 3782 y(in)h(whic)m(h)h(case)g(CFITSIO)e(will) i(do)g(the)f(con)m(v)m(ersion.)42 b(Allo)m(w)m(ed)30 b(v)-5 b(alues)29 b(are:)40 b(TSTRING,)28 b(TLOGICAL,)227 3895 y(TBYTE,)37 b(TSBYTE,)f(TSHOR)-8 b(T,)36 b(TUSHOR)-8 b(T,)37 b(TINT,)f(TLONG,)h(TULONG,)f(TFLO)m(A)-8 b(T,)38 b(TDOU-)227 4008 y(BLE.)33 b(If)g(the)g(input)f(v)-5 b(alue)33 b(of)g(data)h(t)m(yp)s(e)f(equals)g(0,)i(then)d(the)h (existing)h(data)g(t)m(yp)s(e)f(of)g(the)g(column)g(or)227 4121 y(image)f(will)f(b)s(e)e(used)h(without)g(an)m(y)h(con)m(v)m (ersion.)136 4303 y Fc(\017)46 b Fj(iot)m(yp)s(e)37 b({)f(de\014nes)e (whether)h(the)h(data)g(arra)m(y)g(is)g(to)g(b)s(e)f(input)g(to)h(the)g (w)m(ork)f(function)h(\(i.e,)i(read)d(from)227 4416 y(the)42 b(FITS)e(\014le\),)k(or)d(output)g(from)g(the)g(w)m(ork)g(function)g (\(i.e.,)k(written)c(to)h(the)f(FITS)g(\014le\))g(or)g(b)s(oth.)227 4529 y(Allo)m(w)m(ed)30 b(v)-5 b(alues)29 b(are)f(InputCol,)g (OutputCol,)h(or)f(InputOutputCol.)38 b(V)-8 b(ariable-length)30 b(arra)m(y)f(columns)227 4642 y(are)h(supp)s(orted)e(as)i(InputCol)e (or)i(InputOutputCol)d(t)m(yp)s(es,)j(but)f(ma)m(y)h(not)g(b)s(e)e (used)h(for)g(an)h(OutputCol)227 4755 y(t)m(yp)s(e.)0 4999 y(After)h(the)f(driv)m(er)g(routine)g(has)g(initialized)j(all)e (these)f(parameters,)h(it)g(can)g(then)f(call)h(the)g(CFITSIO)e (iterator)0 5112 y(function:)95 5357 y Fe(int)47 b (fits_iterate_data\(int)42 b(narrays,)k(iteratorCol)f(*data,)h(long)g (offset,)286 5470 y(long)h(nPerLoop,)e(int)i(\(*workFn\)\()e(\),)i (void)g(*userPointer,)d(int)j(*status\);)136 5714 y Fc(\017)f Fj(narra)m(ys)31 b({)f(the)h(n)m(um)m(b)s(er)e(of)h(columns)g(or)h (images)g(that)g(are)g(to)g(b)s(e)f(passed)g(to)h(the)f(w)m(ork)h (function.)p eop end %%Page: 77 85 TeXDict begin 77 84 bop 0 299 a Fh(6.3.)72 b(GUIDELINES)30 b(F)m(OR)h(USING)f(THE)g(ITERA)-8 b(TOR)30 b(FUNCTION)1200 b Fj(77)136 555 y Fc(\017)46 b Fj(*data)32 b({)f(p)s(oin)m(ter)f(to)h (arra)m(y)g(of)f(structures)g(con)m(taining)i(information)f(ab)s(out)f (eac)m(h)h(column)g(or)f(image.)136 736 y Fc(\017)46 b Fj(o\013set)31 b({)f(if)f(p)s(ositiv)m(e,)i(this)f(n)m(um)m(b)s(er)e (of)i(ro)m(ws)f(at)h(the)g(b)s(eginning)f(of)h(the)f(table)i(\(or)f (pixels)f(in)h(the)f(image\))227 849 y(will)i(b)s(e)f(skipp)s(ed)f(and) g(will)i(not)g(b)s(e)e(passed)h(to)h(the)g(w)m(ork)f(function.)136 1030 y Fc(\017)46 b Fj(nP)m(erLo)s(op)38 b(-)h(sp)s(eci\014es)e(the)i (n)m(um)m(b)s(er)e(of)h(table)h(ro)m(ws)g(\(or)f(n)m(um)m(b)s(er)f(of)i (image)g(pixels\))g(that)g(are)g(to)g(b)s(e)227 1143 y(passed)29 b(to)h(the)f(w)m(ork)h(function)e(on)h(eac)m(h)i (iteration.)42 b(If)28 b(nP)m(erLo)s(op)h(=)g(0)g(then)g(CFITSIO)f (will)i(calculate)227 1256 y(the)22 b(optim)m(um)g(n)m(um)m(b)s(er)e (for)h(greatest)j(e\016ciency)-8 b(.)39 b(If)21 b(nP)m(erLo)s(op)g(is)h (negativ)m(e,)k(then)21 b(all)i(the)f(ro)m(ws)f(or)h(pixels)227 1368 y(will)36 b(b)s(e)f(passed)g(at)h(one)g(time,)i(and)c(the)i(w)m (ork)g(function)f(will)h(only)f(b)s(e)g(called)i(once.)56 b(If)35 b(an)m(y)h(v)-5 b(ariable)227 1481 y(length)33 b(arra)m(ys)g(are)g(b)s(eing)f(pro)s(cessed,)h(then)g(the)f(nP)m(erLo)s (op)h(v)-5 b(alue)33 b(is)f(ignored,)i(and)e(the)h(iterator)h(will)227 1594 y(alw)m(a)m(ys)e(pro)s(cess)e(one)h(ro)m(w)f(of)h(the)f(table)i (at)f(a)g(time.)136 1775 y Fc(\017)46 b Fj(*w)m(orkFn)f(-)f(the)h(name) f(\(actually)i(the)f(address\))f(of)g(the)g(w)m(ork)h(function)f(that)h (is)f(to)h(b)s(e)f(called)h(b)m(y)227 1888 y(\014ts)p 354 1888 28 4 v 33 w(iterate)p 643 1888 V 34 w(data.)136 2069 y Fc(\017)h Fj(*userP)m(oin)m(ter)34 b(-)f(this)g(is)g(a)g(user)f (supplied)g(p)s(oin)m(ter)h(that)g(can)g(b)s(e)g(used)f(to)h(pass)g (ancillary)h(information)227 2182 y(from)f(the)g(driv)m(er)g(routine)g (to)h(the)f(w)m(ork)g(function.)48 b(It)33 b(ma)m(y)h(p)s(oin)m(t)f(to) h(a)f(single)h(n)m(um)m(b)s(er,)e(an)h(arra)m(y)-8 b(,)35 b(or)227 2295 y(to)c(a)g(structure)f(con)m(taining)i(an)e(arbitrary)g (set)h(of)g(parameters.)136 2476 y Fc(\017)46 b Fj(*status)30 b(-)f(The)f(CFITSIO)f(error)h(status.)41 b(Should)27 b(=)h(0)h(on)g(input;)f(a)h(non-zero)h(output)e(v)-5 b(alue)29 b(indicates)227 2588 y(an)i(error.)0 2828 y(When)f(\014ts)p 392 2828 V 32 w(iterate)p 680 2828 V 35 w(data)h(is)f(called)h(it)f (\014rst)g(allo)s(cates)i(memory)e(to)h(hold)e(all)i(the)f(requested)g (columns)g(of)g(data)0 2941 y(or)f(image)i(pixel)e(arra)m(ys.)41 b(It)29 b(then)g(reads)g(the)h(input)e(data)i(from)f(the)g(FITS)f (tables)i(or)g(images)g(in)m(to)g(the)g(arra)m(ys)0 3054 y(then)h(passes)h(the)g(structure)f(with)g(p)s(oin)m(ters)h(to)g(these) g(data)h(arra)m(ys)f(to)g(the)g(w)m(ork)g(function.)44 b(After)32 b(the)g(w)m(ork)0 3167 y(function)37 b(returns,)g(the)h (iterator)g(function)f(writes)g(an)m(y)g(output)g(columns)f(of)h(data)h (or)f(images)h(bac)m(k)g(to)g(the)0 3279 y(FITS)31 b(\014les.)46 b(It)32 b(then)g(rep)s(eats)g(this)g(pro)s(cess)g(for)f(an)m(y)i (remaining)f(sets)g(of)h(ro)m(ws)f(or)g(image)h(pixels)f(un)m(til)h(it) f(has)0 3392 y(pro)s(cessed)27 b(the)i(en)m(tire)g(table)f(or)g(image)i (or)e(un)m(til)g(the)g(w)m(ork)g(function)g(returns)f(a)h(non-zero)h (status)f(v)-5 b(alue.)40 b(The)0 3505 y(iterator)33 b(then)f(frees)g(the)h(memory)e(that)i(it)g(initially)g(allo)s(cated)h (and)e(returns)f(con)m(trol)i(to)g(the)f(driv)m(er)g(routine)0 3618 y(that)f(called)h(it.)0 3949 y Ff(6.3)135 b(Guidelines)46 b(for)f(Using)h(the)f(Iterator)h(F)-11 b(unction)0 4199 y Fj(The)34 b(totaln,)i(o\013set,)h(\014rstn,)d(and)f(n)m(v)-5 b(alues)35 b(parameters)f(that)h(are)f(passed)g(to)h(the)f(w)m(ork)g (function)g(are)h(useful)0 4312 y(for)f(determining)g(ho)m(w)g(m)m(uc)m (h)g(of)h(the)f(data)h(has)f(b)s(een)f(pro)s(cessed)h(and)f(ho)m(w)h(m) m(uc)m(h)g(remains)g(left)h(to)g(do.)52 b(On)0 4425 y(the)36 b(v)m(ery)h(\014rst)f(call)h(to)g(the)f(w)m(ork)h(function)f(\014rstn)f (will)h(b)s(e)g(equal)h(to)g(o\013set)g(+)f(1;)k(the)c(w)m(ork)g (function)g(ma)m(y)0 4538 y(need)31 b(to)g(p)s(erform)f(v)-5 b(arious)31 b(initialization)i(tasks)f(b)s(efore)e(starting)i(to)f(pro) s(cess)g(the)g(data.)43 b(Similarly)-8 b(,)32 b(\014rstn)d(+)0 4650 y(n)m(v)-5 b(alues)29 b(-)f(1)h(will)f(b)s(e)g(equal)g(to)h (totaln)h(on)e(the)g(last)h(iteration,)i(at)e(whic)m(h)f(p)s(oin)m(t)g (the)g(w)m(ork)h(function)e(ma)m(y)i(need)0 4763 y(to)k(p)s(erform)f (some)h(clean)h(up)d(op)s(erations)i(b)s(efore)g(exiting)h(for)e(the)h (last)h(time.)48 b(The)33 b(w)m(ork)f(function)h(can)g(also)0 4876 y(force)e(an)f(early)h(termination)g(of)g(the)g(iterations)g(b)m (y)g(returning)e(a)i(status)g(v)-5 b(alue)30 b(=)g(-1.)0 5036 y(The)f(narra)m(ys)g(and)g(iteratorCol.datat)m(yp)s(e)j(argumen)m (ts)e(allo)m(w)g(the)g(w)m(ork)f(function)g(to)h(double)f(c)m(hec)m(k)i (that)f(the)0 5149 y(n)m(um)m(b)s(er)k(of)i(input)f(arra)m(ys)h(and)f (their)g(data)i(t)m(yp)s(es)e(ha)m(v)m(e)i(the)f(exp)s(ected)g(v)-5 b(alues.)57 b(The)35 b(iteratorCol.fptr)i(and)0 5262 y(iteratorCol.coln)m(um)d(structure)d(elemen)m(ts)h(can)g(b)s(e)f(used) f(if)i(the)f(w)m(ork)h(function)f(needs)g(to)h(read)f(or)g(write)h(the) 0 5375 y(v)-5 b(alues)31 b(of)g(other)g(k)m(eyw)m(ords)g(in)g(the)g (FITS)f(\014le)h(asso)s(ciated)h(with)f(the)g(arra)m(y)-8 b(.)43 b(This)30 b(should)g(generally)i(only)f(b)s(e)0 5488 y(done)j(during)e(the)i(initialization)j(step)c(or)h(during)f(the) h(clean)g(up)f(step)h(after)g(the)g(last)h(set)f(of)g(data)g(has)g(b)s (een)0 5601 y(pro)s(cessed.)40 b(Extra)29 b(FITS)f(\014le)h(I/O)g (during)e(the)i(main)g(pro)s(cessing)g(lo)s(op)g(of)g(the)g(w)m(ork)g (function)g(can)g(seriously)0 5714 y(degrade)i(the)f(sp)s(eed)g(of)g (the)h(program.)p eop end %%Page: 78 86 TeXDict begin 78 85 bop 0 299 a Fj(78)1455 b Fh(CHAPTER)30 b(6.)112 b(THE)30 b(CFITSIO)e(ITERA)-8 b(TOR)30 b(FUNCTION)0 555 y Fj(If)i(v)-5 b(ariable-length)35 b(arra)m(y)e(columns)g(are)g(b)s (eing)f(pro)s(cessed,)h(then)g(the)g(iterator)h(will)f(op)s(erate)h(on) f(one)g(ro)m(w)g(of)0 668 y(the)j(table)g(at)g(a)g(time.)57 b(In)34 b(this)i(case)g(the)g(the)f(rep)s(eat)h(elemen)m(t)h(in)e(the)h (in)m(teratorCol)h(structure)e(will)h(b)s(e)e(set)0 781 y(equal)d(to)g(the)g(n)m(um)m(b)s(er)e(of)h(elemen)m(ts)i(in)e(the)h (curren)m(t)f(ro)m(w)g(that)h(is)g(b)s(eing)f(pro)s(cessed.)0 941 y(One)j(imp)s(ortan)m(t)g(feature)h(of)f(the)h(iterator)h(is)e (that)h(the)f(\014rst)g(elemen)m(t)i(in)e(eac)m(h)h(arra)m(y)g(that)g (is)f(passed)g(to)h(the)0 1054 y(w)m(ork)f(function)g(giv)m(es)h(the)f (v)-5 b(alue)33 b(that)h(is)f(used)f(to)h(represen)m(t)g(n)m(ull)g(or)g (unde\014ned)d(v)-5 b(alues)34 b(in)e(the)h(arra)m(y)-8 b(.)49 b(The)0 1167 y(real)41 b(data)g(then)g(b)s(egins)f(with)g(the)g (second)h(elemen)m(t)h(of)f(the)f(arra)m(y)h(\(i.e.,)k(arra)m(y[1],)g (not)c(arra)m(y[0]\).)73 b(If)40 b(the)0 1280 y(\014rst)e(arra)m(y)h (elemen)m(t)h(is)f(equal)g(to)g(zero,)j(then)c(this)g(indicates)i(that) f(all)h(the)e(arra)m(y)h(elemen)m(ts)h(ha)m(v)m(e)g(de\014ned)0 1393 y(v)-5 b(alues)33 b(and)f(there)h(are)g(no)g(unde\014ned)d(v)-5 b(alues.)48 b(If)33 b(arra)m(y[0])h(is)f(not)g(equal)g(to)g(zero,)i (then)d(this)h(indicates)g(that)0 1506 y(some)h(of)g(the)g(data)h(v)-5 b(alues)34 b(are)g(unde\014ned)d(and)j(this)f(v)-5 b(alue)35 b(\(arra)m(y[0]\))h(is)d(used)g(to)i(represen)m(t)f(them.)51 b(In)33 b(the)0 1619 y(case)i(of)e(output)g(arra)m(ys)h(\(i.e.,)i (those)e(arra)m(ys)g(that)g(will)g(b)s(e)f(written)g(bac)m(k)h(to)h (the)e(FITS)g(\014le)g(b)m(y)h(the)g(iterator)0 1732 y(function)h(after)i(the)f(w)m(ork)f(function)h(exits\))h(the)f(w)m (ork)g(function)f(m)m(ust)h(set)g(the)g(\014rst)f(arra)m(y)h(elemen)m (t)h(to)g(the)0 1844 y(desired)g(n)m(ull)g(v)-5 b(alue)37 b(if)g(necessary)-8 b(,)40 b(otherwise)e(the)f(\014rst)g(elemen)m(t)h (should)e(b)s(e)h(set)g(to)h(zero)g(to)g(indicate)g(that)0 1957 y(there)30 b(are)h(no)e(n)m(ull)h(v)-5 b(alues)31 b(in)e(the)h(output)g(arra)m(y)-8 b(.)42 b(CFITSIO)28 b(de\014nes)h(2)h(v)-5 b(alues,)31 b(FLO)m(A)-8 b(TNULL)e(V)g(ALUE)31 b(and)0 2070 y(DOUBLENULL)-10 b(V)g(ALUE,)37 b(that)f(can)h(b)s(e)e (used)g(as)i(default)f(n)m(ull)g(v)-5 b(alues)36 b(for)g(\015oat)h(and) e(double)h(data)h(t)m(yp)s(es,)0 2183 y(resp)s(ectiv)m(ely)-8 b(.)60 b(In)35 b(the)i(case)g(of)f(c)m(haracter)i(string)e(data)h(t)m (yp)s(es,)h(a)e(n)m(ull)h(string)f(is)g(alw)m(a)m(ys)i(used)d(to)i (represen)m(t)0 2296 y(unde\014ned)28 b(strings.)0 2456 y(In)33 b(some)h(applications)g(it)g(ma)m(y)g(b)s(e)f(necessary)h(to)g (recursiv)m(ely)g(call)h(the)f(iterator)h(function.)50 b(An)33 b(example)h(of)0 2569 y(this)27 b(is)g(giv)m(en)h(b)m(y)f(one)h (of)f(the)h(example)f(programs)g(that)h(is)f(distributed)f(with)h (CFITSIO:)f(it)i(\014rst)e(calls)i(a)g(w)m(ork)0 2682 y(function)38 b(that)g(writes)h(out)f(a)g(2D)h(histogram)g(image.)65 b(That)38 b(w)m(ork)g(function)g(in)f(turn)g(calls)j(another)e(w)m(ork) 0 2795 y(function)29 b(that)h(reads)g(the)f(`X')i(and)e(`Y')h(columns)f (in)g(a)h(table)h(to)f(calculate)i(the)d(v)-5 b(alue)31 b(of)e(eac)m(h)i(2D)f(histogram)0 2908 y(image)i(pixel.)41 b(Graphically)-8 b(,)32 b(the)e(program)g(structure)g(can)h(b)s(e)f (describ)s(ed)f(as:)48 3153 y Fe(driver)46 b(-->)h(iterator)e(-->)i (work1_fn)f(-->)h(iterator)e(-->)i(work2_fn)0 3399 y Fj(Finally)-8 b(,)42 b(it)d(should)e(b)s(e)h(noted)g(that)h(the)g (table)g(columns)f(or)g(image)i(arra)m(ys)f(that)g(are)f(passed)g(to)h (the)g(w)m(ork)0 3512 y(function)c(do)h(not)g(all)g(ha)m(v)m(e)h(to)f (come)h(from)e(the)h(same)g(FITS)f(\014le)g(and)g(instead)h(ma)m(y)g (come)h(from)e(an)m(y)h(com-)0 3625 y(bination)d(of)g(sources)g(as)h (long)f(as)h(they)f(ha)m(v)m(e)h(the)f(same)h(length.)49 b(The)32 b(length)i(of)f(the)g(\014rst)f(table)i(column)f(or)0 3738 y(image)f(arra)m(y)f(is)f(used)f(b)m(y)i(the)f(iterator)i(if)e (they)h(do)f(not)h(all)g(ha)m(v)m(e)h(the)e(same)h(length.)0 4069 y Ff(6.4)135 b(Complete)47 b(List)e(of)g(Iterator)i(Routines)0 4319 y Fj(All)36 b(of)f(the)g(iterator)h(routines)f(are)g(listed)h(b)s (elo)m(w.)54 b(Most)36 b(of)f(these)h(routines)e(do)h(not)g(ha)m(v)m(e) i(a)e(corresp)s(onding)0 4432 y(short)30 b(function)g(name.)0 4678 y Fi(1)81 b Fj(Iterator)32 b(`constructor')h(functions)e(that)i (set)f(the)g(v)-5 b(alue)32 b(of)g(elemen)m(ts)h(in)f(the)g (iteratorCol)h(structure)e(that)227 4791 y(de\014ne)k(the)h(columns)f (or)h(arra)m(ys.)56 b(These)36 b(set)g(the)g(\014ts\014le)f(p)s(oin)m (ter,)i(column)e(name,)j(column)d(n)m(um)m(b)s(er,)227 4904 y(datat)m(yp)s(e,)28 b(and)e(iot)m(yp)s(e,)i(resp)s(ectiv)m(ely)-8 b(.)41 b(The)25 b(last)i(2)g(routines)f(allo)m(w)h(all)g(the)f (parameters)h(to)f(b)s(e)g(set)g(with)227 5017 y(one)31 b(function)f(call)i(\(one)f(supplies)e(the)i(column)f(name,)h(the)f (other)h(the)f(column)g(n)m(um)m(b)s(er\).)95 5262 y Fe(int)47 b(fits_iter_set_file\(iterato)o(rCo)o(l)42 b(*col,)k(fitsfile)g(*fptr\);)95 5488 y(int)h (fits_iter_set_colname\(iter)o(ato)o(rCol)41 b(*col,)46 b(char)h(*colname\);)95 5714 y(int)g(fits_iter_set_colnum\(itera)o(tor) o(Col)41 b(*col,)47 b(int)g(colnum\);)p eop end %%Page: 79 87 TeXDict begin 79 86 bop 0 299 a Fh(6.4.)72 b(COMPLETE)29 b(LIST)g(OF)i(ITERA)-8 b(TOR)29 b(R)m(OUTINES)1638 b Fj(79)95 668 y Fe(int)47 b(fits_iter_set_datatype\(ite)o(rat)o(orCo)o (l)42 b(*col,)k(int)h(datatype\);)95 894 y(int)g (fits_iter_set_iotype\(itera)o(tor)o(Col)41 b(*col,)47 b(int)g(iotype\);)95 1120 y(int)g(fits_iter_set_by_name\(iter)o(ato)o (rCol)41 b(*col,)46 b(fitsfile)g(*fptr,)477 1233 y(char)h(*colname,)e (int)i(datatype,)93 b(int)47 b(iotype\);)95 1458 y(int)g (fits_iter_set_by_num\(itera)o(tor)o(Col)41 b(*col,)47 b(fitsfile)e(*fptr,)477 1571 y(int)i(colnum,)f(int)h(datatype,)93 b(int)47 b(iotype\);)0 1820 y Fi(2)81 b Fj(Iterator)38 b(`accessor')h(functions)e(that)g(return)g(the)g(v)-5 b(alue)38 b(of)f(the)g(elemen)m(t)i(in)e(the)g(iteratorCol)i(structure) 227 1933 y(that)31 b(describ)s(es)f(a)h(particular)f(data)h(column)g (or)f(arra)m(y)95 2181 y Fe(fitsfile)46 b(*)h (fits_iter_get_file\(iterato)o(rCol)41 b(*col\);)95 2407 y(char)47 b(*)h(fits_iter_get_colname\(i)o(ter)o(ator)o(Col)41 b(*col\);)95 2633 y(int)47 b(fits_iter_get_colnum\(itera)o(tor)o(Col)41 b(*col\);)95 2858 y(int)47 b(fits_iter_get_datatype\(ite)o(rat)o(orCo)o (l)42 b(*col\);)95 3084 y(int)47 b(fits_iter_get_iotype\(itera)o(tor)o (Col)41 b(*col\);)95 3310 y(void)47 b(*)h(fits_iter_get_array\(ite)o (rat)o(orCo)o(l)42 b(*col\);)95 3536 y(long)47 b (fits_iter_get_tlmin\(itera)o(tor)o(Col)41 b(*col\);)95 3762 y(long)47 b(fits_iter_get_tlmax\(itera)o(tor)o(Col)41 b(*col\);)95 3987 y(long)47 b(fits_iter_get_repeat\(iter)o(ato)o(rCol) 41 b(*col\);)95 4213 y(char)47 b(*)h(fits_iter_get_tunit\(ite)o(rat)o (orCo)o(l)42 b(*col\);)95 4439 y(char)47 b(*)h (fits_iter_get_tdisp\(ite)o(rat)o(orCo)o(l)42 b(*col\);)0 4687 y Fi(3)81 b Fj(The)29 b(CFITSIO)g(iterator)j(function)95 4936 y Fe(int)47 b(fits_iterate_data\(int)42 b(narrays,)94 b(iteratorCol)44 b(*data,)i(long)h(offset,)573 5049 y(long)f(nPerLoop,) 573 5161 y(int)h(\(*workFn\)\()e(long)h(totaln,)g(long)h(offset,)f (long)g(firstn,)1289 5274 y(long)g(nvalues,)g(int)h(narrays,)e (iteratorCol)g(*data,)1289 5387 y(void)h(*userPointer\),)573 5500 y(void)g(*userPointer,)573 5613 y(int)h(*status\);)p eop end %%Page: 80 88 TeXDict begin 80 87 bop 0 299 a Fj(80)1455 b Fh(CHAPTER)30 b(6.)112 b(THE)30 b(CFITSIO)e(ITERA)-8 b(TOR)30 b(FUNCTION)p eop end %%Page: 81 89 TeXDict begin 81 88 bop 0 1225 a Fg(Chapter)65 b(7)0 1687 y Fm(W)-19 b(orld)77 b(Co)6 b(ordinate)78 b(System)f(Routines)0 2180 y Fj(The)36 b(FITS)g(comm)m(unit)m(y)h(has)f(adopted)h(a)g(set)g (of)g(k)m(eyw)m(ord)g(con)m(v)m(en)m(tions)h(that)f(de\014ne)f(the)h (transformations)0 2293 y(needed)30 b(to)i(con)m(v)m(ert)g(b)s(et)m(w)m (een)f(pixel)g(lo)s(cations)h(in)e(an)h(image)h(and)e(the)g(corresp)s (onding)g(celestial)j(co)s(ordinates)0 2406 y(on)25 b(the)h(sky)-8 b(,)27 b(or)e(more)g(generally)-8 b(,)29 b(that)d(de\014ne)e(w)m(orld)h (co)s(ordinates)i(that)e(are)h(to)g(b)s(e)f(asso)s(ciated)i(with)e(an)m (y)h(pixel)0 2518 y(lo)s(cation)h(in)e(an)h(n-dimensional)f(FITS)g (arra)m(y)-8 b(.)40 b(CFITSIO)24 b(is)h(distributed)g(with)g(a)h(a)g (few)f(self-con)m(tained)i(W)-8 b(orld)0 2631 y(Co)s(ordinate)30 b(System)g(\(W)m(CS\))g(routines,)g(ho)m(w)m(ev)m(er,)i(these)e (routines)g(DO)f(NOT)h(supp)s(ort)e(all)j(the)f(latest)h(W)m(CS)0 2744 y(con)m(v)m(en)m(tions,)38 b(so)c(it)h(is)g(STR)m(ONGL)-8 b(Y)34 b(RECOMMENDED)h(that)g(soft)m(w)m(are)h(dev)m(elop)s(ers)e(use)g (a)h(more)g(robust)0 2857 y(external)c(W)m(CS)g(library)-8 b(.)40 b(Sev)m(eral)32 b(recommended)e(libraries)g(are:)95 3138 y Fe(WCSLIB)47 b(-)95 b(supported)45 b(by)i(Mark)g(Calabretta)95 3251 y(WCSTools)f(-)h(supported)f(by)h(Doug)g(Mink)95 3364 y(AST)g(library)f(-)i(developed)d(by)i(the)g(U.K.)g(Starlink)e (project)0 3644 y Fj(More)30 b(information)f(ab)s(out)g(the)g(W)m(CS)g (k)m(eyw)m(ord)h(con)m(v)m(en)m(tions)h(and)d(links)h(to)h(all)g(of)f (these)g(W)m(CS)g(libraries)h(can)0 3757 y(b)s(e)g(found)f(on)h(the)h (FITS)e(Supp)s(ort)g(O\016ce)h(w)m(eb)g(site)i(at)f(h)m (ttp://\014ts.gsfc.nasa.go)m(v)j(under)29 b(the)h(W)m(CS)h(link.)0 3917 y(The)40 b(functions)h(pro)m(vided)g(in)f(these)i(external)f(W)m (CS)g(libraries)h(will)f(need)g(access)h(to)f(the)h(W)m(CS)f(k)m(eyw)m (ords)0 4030 y(con)m(tained)36 b(in)f(the)h(FITS)e(\014le)i(headers.)55 b(One)35 b(con)m(v)m(enien)m(t)i(w)m(a)m(y)f(to)g(pass)f(this)g (information)h(to)g(the)f(external)0 4143 y(library)c(is)f(to)i(use)f (the)g(\014ts)p 942 4143 28 4 v 32 w(hdr2str)f(routine)h(in)g(CFITSIO)e (\(de\014ned)h(b)s(elo)m(w\))h(to)h(cop)m(y)g(the)f(header)g(k)m(eyw)m (ords)0 4256 y(in)m(to)k(one)e(long)i(string,)f(and)f(then)g(pass)g (this)h(string)f(to)i(an)e(in)m(terface)i(routine)f(in)f(the)h (external)g(library)f(that)0 4369 y(will)d(extract)h(the)f(necessary)f (W)m(CS)h(information)g(\(e.g.,)h(the)f('w)m(cspih')g(routine)f(in)g (the)h(W)m(CSLIB)f(library)h(and)0 4482 y(the)h('astFitsChan')g(and)f ('astPutCards')g(functions)g(in)g(the)h(AST)e(library\).)0 4763 y Fi(1)81 b Fj(Concatenate)38 b(the)f(header)f(k)m(eyw)m(ords)h (in)f(the)g(CHDU)h(in)m(to)h(a)f(single)g(long)g(string)f(of)h(c)m (haracters.)60 b(Eac)m(h)227 4876 y(80-c)m(haracter)28 b(\014xed-length)c(k)m(eyw)m(ord)h(record)g(is)g(app)s(ended)d(to)k (the)f(output)f(c)m(haracter)i(string,)g(in)e(order,)227 4989 y(with)h(no)f(in)m(terv)m(ening)i(separator)f(or)g(terminating)h (c)m(haracters.)40 b(The)24 b(last)i(header)e(record)h(is)f(terminated) 227 5101 y(with)33 b(a)g(NULL)f(c)m(haracter.)49 b(This)32 b(routine)h(allo)s(cates)i(memory)d(for)h(the)g(returned)e(c)m (haracter)j(arra)m(y)-8 b(,)35 b(so)227 5214 y(the)c(calling)h(program) e(m)m(ust)g(free)h(the)f(memory)g(when)g(\014nished.)227 5375 y(There)c(are)h(2)f(related)h(routines:)39 b(\014ts)p 1514 5375 V 32 w(hdr2str)25 b(simply)h(concatenates)j(all)e(the)f (existing)h(k)m(eyw)m(ords)g(in)f(the)227 5488 y(header;)40 b(\014ts)p 682 5488 V 32 w(con)m(v)m(ert)p 1003 5488 V 34 w(hdr2str)35 b(is)i(similar,)h(except)f(that)g(if)f(the)h(CHDU)f (is)h(a)f(tile)i(compressed)e(image)227 5601 y(\(stored)28 b(in)g(a)f(binary)g(table\))i(then)e(it)h(will)g(\014rst)f(con)m(v)m (ert)i(that)f(header)g(bac)m(k)g(to)g(that)g(of)g(a)g(normal)g(FITS)227 5714 y(image)k(b)s(efore)e(concatenating)j(the)d(k)m(eyw)m(ords.)1905 5942 y(81)p eop end %%Page: 82 90 TeXDict begin 82 89 bop 0 299 a Fj(82)1169 b Fh(CHAPTER)29 b(7.)112 b(W)m(ORLD)31 b(COORDINA)-8 b(TE)30 b(SYSTEM)f(R)m(OUTINES)227 555 y Fj(Selected)h(k)m(eyw)m(ords)e(ma)m(y)h(b)s(e)e(excluded)h(from)g (the)g(returned)f(c)m(haracter)j(string.)40 b(If)27 b(the)i(second)f (param-)227 668 y(eter)h(\(no)s(commen)m(ts\))g(is)f(TR)m(UE)g (\(nonzero\))h(then)e(an)m(y)i(COMMENT,)f(HISTOR)-8 b(Y,)27 b(or)h(blank)g(k)m(eyw)m(ords)227 781 y(in)i(the)h(header)f(will)h(not) f(b)s(e)g(copied)h(to)g(the)g(output)f(string.)227 924 y(The)25 b('exclist')j(parameter)e(ma)m(y)g(b)s(e)f(used)g(to)h(supply) e(a)i(list)h(of)e(k)m(eyw)m(ords)h(that)h(are)f(to)g(b)s(e)f(excluded)g (from)227 1037 y(the)k(output)g(c)m(haracter)h(string.)41 b(Wild)29 b(card)g(c)m(haracters)h(\(*,)g(?,)f(and)g(#\))g(ma)m(y)g(b)s (e)f(used)g(in)h(the)g(excluded)227 1150 y(k)m(eyw)m(ord)h(names.)41 b(If)29 b(no)g(additional)i(k)m(eyw)m(ords)f(are)g(to)g(b)s(e)f (excluded,)h(then)f(set)h(nexc)g(=)f(0)h(and)f(sp)s(ecify)227 1263 y(NULL)i(for)f(the)g(the)h(**exclist)i(parameter.)95 1478 y Fe(int)47 b(fits_hdr2str)286 1591 y(\(fitsfile)f(*fptr,)g(int)h (nocomments,)d(char)j(**exclist,)e(int)i(nexc,)286 1704 y(>)h(char)e(**header,)g(int)h(*nkeys,)e(int)i(*status\))95 1930 y(int)g(fits_convert_hdr2str)c(/)k(ffcnvthdr2str)286 2043 y(\(fitsfile)f(*fptr,)g(int)h(nocomments,)d(char)j(**exclist,)e (int)i(nexc,)286 2155 y(>)h(char)e(**header,)g(int)h(*nkeys,)e(int)i (*status\))0 2371 y Fi(2)81 b Fj(The)24 b(follo)m(wing)j(CFITSIO)d (routine)i(is)f(sp)s(eci\014cally)h(designed)f(for)h(use)f(in)g (conjunction)g(with)g(the)h(W)m(CSLIB)227 2484 y(library)-8 b(.)40 b(It)27 b(is)h(not)f(exp)s(ected)h(that)g(applications)g (programmers)f(will)h(call)g(this)f(routine)h(directly)-8 b(,)29 b(but)d(it)227 2597 y(is)33 b(do)s(cumen)m(ted)g(here)g(for)g (completeness.)50 b(This)33 b(routine)g(extracts)h(arra)m(ys)g(from)e (a)i(binary)e(table)i(that)227 2710 y(con)m(tain)i(W)m(CS)e (information)h(using)f(the)g(-T)-8 b(AB)36 b(table)f(lo)s(okup)f(con)m (v)m(en)m(tion.)55 b(See)35 b(the)f(do)s(cumen)m(tation)227 2822 y(pro)m(vided)c(with)g(the)h(W)m(CSLIB)f(library)g(for)g(more)h (information.)95 3038 y Fe(int)47 b(fits_read_wcstab)334 3151 y(\(fitsfile)e(*fptr,)h(int)h(nwtb,)g(wtbarr)f(*wtb,)g(int)h (*status\);)0 3477 y Ff(7.1)180 b(Self-con)l(tained)46 b(W)l(CS)f(Routines)0 3728 y Fj(The)21 b(follo)m(wing)i(routines)e(DO)g (NOT)g(supp)s(ort)f(the)h(more)h(recen)m(t)g(W)m(CS)f(con)m(v)m(en)m (tions)j(that)d(ha)m(v)m(e)i(b)s(een)e(appro)m(v)m(ed)0 3841 y(as)34 b(part)g(of)g(the)g(FITS)f(standard.)50 b(Consequen)m(tly)-8 b(,)35 b(the)f(follo)m(wing)i(routines)d(ARE)h(NO) m(W)h(DEPRECA)-8 b(TED.)0 3953 y(It)30 b(is)g(STR)m(ONGL)-8 b(Y)30 b(RECOMMENDED)h(that)g(soft)m(w)m(are)g(dev)m(elop)s(ers)f(not)h (use)f(these)g(routines,)g(and)g(instead)0 4066 y(use)g(an)g(external)i (W)m(CS)e(library)-8 b(,)31 b(as)f(describ)s(ed)f(in)i(the)f(previous)g (section.)0 4227 y(These)21 b(routines)g(are)g(included)f(mainly)h(for) g(bac)m(kw)m(ard)g(compatibilit)m(y)j(with)c(existing)i(soft)m(w)m (are.)39 b(They)21 b(supp)s(ort)0 4339 y(the)30 b(follo)m(wing)i (standard)d(map)g(pro)5 b(jections:)41 b(-SIN,)30 b(-T)-8 b(AN,)31 b(-AR)m(C,)g(-NCP)-8 b(,)30 b(-GLS,)g(-MER,)h(and)e(-AIT)h (\(these)0 4452 y(are)f(the)g(legal)h(v)-5 b(alues)29 b(for)f(the)h(co)s(ordt)m(yp)s(e)f(parameter\).)41 b(These)28 b(routines)h(are)g(based)f(on)g(similar)h(functions)f(in)0 4565 y(Classic)j(AIPS.)f(All)h(the)g(angular)f(quan)m(tities)i(are)f (giv)m(en)g(in)f(units)g(of)g(degrees.)0 4781 y Fi(1)81 b Fj(Get)41 b(the)f(v)-5 b(alues)41 b(of)g(the)f(basic)h(set)g(of)f (standard)g(FITS)f(celestial)k(co)s(ordinate)e(system)g(k)m(eyw)m(ords) f(from)227 4894 y(the)33 b(header)f(of)h(a)f(FITS)g(image)i(\(i.e.,)g (the)f(primary)f(arra)m(y)g(or)h(an)f(IMA)m(GE)i(extension\).)47 b(These)33 b(v)-5 b(alues)227 5006 y(ma)m(y)35 b(then)f(b)s(e)g(passed) f(to)i(the)g(\014ts)p 1462 5006 28 4 v 32 w(pix)p 1618 5006 V 32 w(to)p 1730 5006 V 34 w(w)m(orld)f(and)g(\014ts)p 2321 5006 V 32 w(w)m(orld)p 2573 5006 V 33 w(to)p 2686 5006 V 33 w(pix)g(routines)g(that)h(p)s(erform)e(the)227 5119 y(co)s(ordinate)f(transformations.)42 b(If)30 b(an)m(y)h(or)f(all) i(of)f(the)g(W)m(CS)f(k)m(eyw)m(ords)h(are)g(not)g(presen)m(t,)g(then)g (default)227 5232 y(v)-5 b(alues)26 b(will)f(b)s(e)f(returned.)38 b(If)24 b(the)i(\014rst)e(co)s(ordinate)i(axis)f(is)g(the)g (declination-lik)m(e)j(co)s(ordinate,)f(then)e(this)227 5345 y(routine)31 b(will)f(sw)m(ap)h(them)f(so)h(that)g(the)f (longitudinal-lik)m(e)j(co)s(ordinate)e(is)f(returned)g(as)g(the)h (\014rst)e(axis.)227 5488 y(The)34 b(\014rst)g(routine)h(\(\013gics\))h (returns)e(the)h(primary)f(W)m(CS,)g(whereas)h(the)g(second)g(routine)f (returns)g(the)227 5601 y(particular)24 b(v)m(ersion)h(of)f(the)g(W)m (CS)f(sp)s(eci\014ed)g(b)m(y)h(the)g('v)m(ersion')h(parameter,)h(whic)m (h)d(m)m(uc)m(h)h(b)s(e)f(a)h(c)m(haracter)227 5714 y(ranging)31 b(from)f('A')h(to)g('Z')f(\(or)h(a)g(blank)f(c)m(haracter,)i(whic)m(h)e (is)g(equiv)-5 b(alen)m(t)32 b(to)f(calling)h(\013gics\).)p eop end %%Page: 83 91 TeXDict begin 83 90 bop 0 299 a Fh(7.1.)113 b(SELF-CONT)-8 b(AINED)30 b(W)m(CS)g(R)m(OUTINES)1984 b Fj(83)227 555 y(If)35 b(the)h(\014le)f(uses)g(the)g(new)m(er)h('CDj)p 1454 555 28 4 v 32 w(i')g(W)m(CS)f(transformation)h(matrix)g(k)m(eyw)m (ords)f(instead)h(of)f(old)h(st)m(yle)227 668 y('CDEL)-8 b(Tn')37 b(and)f('CR)m(OT)-8 b(A2')38 b(k)m(eyw)m(ords,)h(then)e(this)f (routine)h(will)g(calculate)j(and)c(return)g(the)h(v)-5 b(alues)227 781 y(of)33 b(the)g(equiv)-5 b(alen)m(t)35 b(old-st)m(yle)f(k)m(eyw)m(ords.)49 b(Note)34 b(that)g(the)f(con)m(v)m (ersion)h(from)e(the)i(new-st)m(yle)g(k)m(eyw)m(ords)227 894 y(to)e(the)f(old-st)m(yle)h(v)-5 b(alues)31 b(is)g(sometimes)g (only)g(an)g(appro)m(ximation,)h(so)e(if)h(the)g(appro)m(ximation)h(is) e(larger)227 1007 y(than)37 b(an)h(in)m(ternally)g(de\014ned)e (threshold)h(lev)m(el,)k(then)c(CFITSIO)f(will)i(still)g(return)e(the)i (appro)m(ximate)227 1120 y(W)m(CS)32 b(k)m(eyw)m(ord)h(v)-5 b(alues,)33 b(but)e(will)h(also)h(return)e(with)h(status)g(=)f(APPR)m (O)m(X)p 2908 1120 V 34 w(W)m(CS)p 3149 1120 V 33 w(KEY,)g(to)i(w)m (arn)f(the)227 1233 y(calling)k(program)e(that)h(appro)m(ximations)g (ha)m(v)m(e)g(b)s(een)f(made.)52 b(It)35 b(is)f(then)g(up)f(to)i(the)f (calling)i(program)227 1346 y(to)30 b(decide)g(whether)e(the)h(appro)m (ximations)h(are)g(su\016cien)m(tly)f(accurate)i(for)e(the)g (particular)g(application,)227 1458 y(or)46 b(whether)e(more)i(precise) g(W)m(CS)f(transformations)h(m)m(ust)f(b)s(e)g(p)s(erformed)f(using)g (new-st)m(yle)j(W)m(CS)227 1571 y(k)m(eyw)m(ords)31 b(directly)-8 b(.)95 1824 y Fe(int)47 b(fits_read_img_coord)c(/)k(ffgics)286 1937 y(\(fitsfile)f(*fptr,)g(>)h(double)f(*xrefval,)g(double)g (*yrefval,)334 2050 y(double)g(*xrefpix,)f(double)i(*yrefpix,)e(double) h(*xinc,)g(double)g(*yinc,)334 2163 y(double)g(*rot,)h(char)f (*coordtype,)f(int)i(*status\))95 2389 y(int)g (fits_read_img_coord_versio)o(n)42 b(/)47 b(ffgicsa)286 2502 y(\(fitsfile)f(*fptr,)g(char)g(version,)g(>)h(double)f(*xrefval,)g (double)g(*yrefval,)334 2615 y(double)g(*xrefpix,)f(double)i(*yrefpix,) e(double)h(*xinc,)g(double)g(*yinc,)334 2728 y(double)g(*rot,)h(char)f (*coordtype,)f(int)i(*status\))0 2981 y Fi(2)81 b Fj(Get)30 b(the)f(v)-5 b(alues)30 b(of)f(the)h(standard)e(FITS)h(celestial)j(co)s (ordinate)e(system)f(k)m(eyw)m(ords)h(from)f(the)g(header)g(of)h(a)227 3094 y(FITS)23 b(table)i(where)e(the)h(X)g(and)g(Y)g(\(or)g(RA)g(and)f (DEC\))h(co)s(ordinates)h(are)f(stored)g(in)f(2)h(separate)h(columns) 227 3207 y(of)30 b(the)f(table)h(\(as)g(in)f(the)h(Ev)m(en)m(t)g(List)g (table)g(format)f(that)h(is)g(often)f(used)g(b)m(y)g(high)g(energy)g (astroph)m(ysics)227 3320 y(missions\).)71 b(These)40 b(v)-5 b(alues)40 b(ma)m(y)h(then)f(b)s(e)f(passed)h(to)h(the)f(\014ts) p 2511 3320 V 33 w(pix)p 2668 3320 V 32 w(to)p 2780 3320 V 34 w(w)m(orld)g(and)g(\014ts)p 3383 3320 V 32 w(w)m(orld)p 3635 3320 V 33 w(to)p 3748 3320 V 33 w(pix)227 3432 y(routines)31 b(that)f(p)s(erform)f(the)i(co)s(ordinate)g(transformations.)95 3685 y Fe(int)47 b(fits_read_tbl_coord)c(/)k(ffgtcs)286 3798 y(\(fitsfile)f(*fptr,)g(int)h(xcol,)f(int)h(ycol,)f(>)i(double)e (*xrefval,)334 3911 y(double)g(*yrefval,)f(double)i(*xrefpix,)e(double) h(*yrefpix,)f(double)h(*xinc,)334 4024 y(double)g(*yinc,)g(double)g (*rot,)h(char)f(*coordtype,)f(int)i(*status\))0 4277 y Fi(3)81 b Fj(Calculate)42 b(the)g(celestial)h(co)s(ordinate)f (corresp)s(onding)e(to)i(the)f(input)f(X)h(and)g(Y)g(pixel)g(lo)s (cation)i(in)e(the)227 4390 y(image.)95 4643 y Fe(int)47 b(fits_pix_to_world)c(/)48 b(ffwldp)286 4756 y(\(double)e(xpix,)h (double)f(ypix,)g(double)g(xrefval,)g(double)g(yrefval,)334 4869 y(double)g(xrefpix,)g(double)g(yrefpix,)f(double)h(xinc,)h(double) f(yinc,)334 4982 y(double)g(rot,)h(char)f(*coordtype,)f(>)j(double)e (*xpos,)g(double)g(*ypos,)334 5095 y(int)h(*status\))0 5348 y Fi(4)81 b Fj(Calculate)42 b(the)g(X)f(and)f(Y)h(pixel)h(lo)s (cation)g(corresp)s(onding)e(to)i(the)f(input)f(celestial)k(co)s (ordinate)e(in)f(the)227 5461 y(image.)95 5714 y Fe(int)47 b(fits_world_to_pix)c(/)48 b(ffxypx)p eop end %%Page: 84 92 TeXDict begin 84 91 bop 0 299 a Fj(84)1169 b Fh(CHAPTER)29 b(7.)112 b(W)m(ORLD)31 b(COORDINA)-8 b(TE)30 b(SYSTEM)f(R)m(OUTINES)286 555 y Fe(\(double)46 b(xpos,)h(double)f(ypos,)g(double)g(xrefval,)g (double)g(yrefval,)334 668 y(double)g(xrefpix,)g(double)g(yrefpix,)f (double)h(xinc,)h(double)f(yinc,)334 781 y(double)g(rot,)h(char)f (*coordtype,)f(>)j(double)e(*xpix,)g(double)g(*ypix,)334 894 y(int)h(*status\))p eop end %%Page: 85 93 TeXDict begin 85 92 bop 0 1225 a Fg(Chapter)65 b(8)0 1687 y Fm(Hierarc)-6 b(hical)76 b(Grouping)h(Routines)0 2180 y Fj(These)34 b(functions)h(allo)m(w)h(for)e(the)h(creation)h(and) e(manipulation)h(of)g(FITS)f(HDU)h(Groups,)h(as)f(de\014ned)e(in)h("A)0 2293 y(Hierarc)m(hical)f(Grouping)c(Con)m(v)m(en)m(tion)j(for)e(FITS")h (b)m(y)f(Jennings,)g(P)m(ence,)h(F)-8 b(olk)32 b(and)e(Sc)m(hlesinger:) 0 2453 y(h)m(ttp://\014ts.gsfc.nasa.go)m(v/group.h)m(tml)0 2613 y(A)38 b(group)g(is)g(a)g(collection)j(of)d(HDUs)h(whose)f(asso)s (ciation)h(is)g(de\014ned)d(b)m(y)i(a)h Fa(gr)-5 b(ouping)40 b(table)p Fj(.)65 b(HDUs)38 b(whic)m(h)0 2726 y(are)46 b(part)f(of)g(a)g(group)g(are)h(referred)e(to)i(as)f Fa(memb)-5 b(er)47 b(HDUs)d Fj(or)h(simply)g(as)g Fa(memb)-5 b(ers)p Fj(.)86 b(Grouping)45 b(table)0 2839 y(mem)m(b)s(er)40 b(HDUs)i(ma)m(y)f(themselv)m(es)h(b)s(e)f(grouping)f(tables,)45 b(th)m(us)40 b(allo)m(wing)j(for)e(the)g(construction)g(of)g(op)s(en-)0 2952 y(ended)30 b(hierarc)m(hies)h(of)f(HDUs.)0 3112 y(Grouping)c(tables)i(con)m(tain)g(one)f(ro)m(w)g(for)f(eac)m(h)i(mem)m (b)s(er)e(HDU.)i(The)e(grouping)g(table)i(columns)e(pro)m(vide)h(iden-) 0 3225 y(ti\014cation)i(information)f(that)g(allo)m(ws)h(applications)f (to)g(reference)g(or)g("p)s(oin)m(t)g(to")g(the)g(mem)m(b)s(er)f(HDUs.) 40 b(Mem-)0 3338 y(b)s(er)27 b(HDUs)h(are)g(exp)s(ected,)h(but)e(not)h (required,)f(to)i(con)m(tain)g(a)f(set)g(of)g(GRPIDn/GRPLCn)f(k)m(eyw)m (ords)h(in)f(their)0 3451 y(headers)j(for)h(eac)m(h)g(grouping)g(table) g(that)g(they)g(are)g(referenced)g(b)m(y)-8 b(.)41 b(In)30 b(this)h(sense,)g(the)g(GRPIDn/GRPLCn)0 3563 y(k)m(eyw)m(ords)d("link") g(the)g(mem)m(b)s(er)f(HDU)h(bac)m(k)g(to)g(its)g(Grouping)f(table.)41 b(Note)29 b(that)f(a)f(mem)m(b)s(er)g(HDU)h(need)g(not)0 3676 y(reside)i(in)g(the)g(same)g(FITS)f(\014le)i(as)f(its)g(grouping)g (table,)h(and)e(that)i(a)f(giv)m(en)h(HDU)g(ma)m(y)g(b)s(e)e (referenced)h(b)m(y)g(up)0 3789 y(to)h(999)h(grouping)e(tables)h(sim)m (ultaneously)-8 b(.)0 3949 y(Grouping)22 b(tables)i(are)f(implemen)m (ted)g(as)g(FITS)f(binary)g(tables)h(with)g(up)e(to)j(six)e (pre-de\014ned)g(column)g(TTYPEn)0 4062 y(v)-5 b(alues:)36 b('MEMBER)p 752 4062 28 4 v 34 w(XTENSION',)20 b('MEMBER)p 1789 4062 V 33 w(NAME',)h('MEMBER)p 2620 4062 V 34 w(VERSION',)f ('MEMBER)p 3590 4062 V 34 w(POSITION',)0 4175 y('MEMBER)p 451 4175 V 34 w(URI)p 653 4175 V 32 w(TYPE')g(and)g('MEMBER)p 1601 4175 V 34 w(LOCA)-8 b(TION'.)20 b(The)f(\014rst)h(three)g(columns) g(allo)m(w)i(mem)m(b)s(er)e(HDUs)0 4288 y(to)28 b(b)s(e)f(iden)m (ti\014ed)g(b)m(y)g(reference)h(to)g(their)f(XTENSION,)g(EXTNAME)g(and) g(EXTVER)g(k)m(eyw)m(ord)g(v)-5 b(alues.)40 b(The)0 4401 y(fourth)29 b(column)h(allo)m(ws)i(mem)m(b)s(er)d(HDUs)i(to)g(b)s(e)f (iden)m(ti\014ed)g(b)m(y)g(HDU)h(p)s(osition)f(within)g(their)g(FITS)g (\014le.)40 b(The)0 4514 y(last)f(t)m(w)m(o)g(columns)e(iden)m(tify)h (the)g(FITS)f(\014le)h(in)f(whic)m(h)h(the)g(mem)m(b)s(er)f(HDU)h (resides,)i(if)d(di\013eren)m(t)i(from)e(the)0 4627 y(grouping)30 b(table)h(FITS)f(\014le.)0 4787 y(Additional)25 b(user)f(de\014ned)f ("auxiliary")j(columns)e(ma)m(y)h(also)g(b)s(e)f(included)g(with)g(an)m (y)h(grouping)f(table.)39 b(When)25 b(a)0 4900 y(grouping)i(table)i(is) f(copied)g(or)f(mo)s(di\014ed)g(the)h(presence)g(of)f(auxiliary)i (columns)e(is)h(alw)m(a)m(ys)h(tak)m(en)g(in)m(to)f(accoun)m(t)0 5013 y(b)m(y)j(the)g(grouping)g(supp)s(ort)f(functions;)h(ho)m(w)m(ev)m (er,)i(the)e(grouping)g(supp)s(ort)f(functions)g(cannot)i(directly)g (mak)m(e)0 5126 y(use)e(of)h(this)f(data.)0 5286 y(If)44 b(a)h(grouping)f(table)h(column)f(is)h(de\014ned)e(but)h(the)g(corresp) s(onding)g(mem)m(b)s(er)f(HDU)j(information)e(is)h(un-)0 5399 y(a)m(v)-5 b(ailable)41 b(then)c(a)i(n)m(ull)f(v)-5 b(alue)39 b(of)f(the)g(appropriate)h(data)f(t)m(yp)s(e)h(is)f(inserted) g(in)g(the)g(column)g(\014eld.)64 b(In)m(teger)0 5512 y(columns)26 b(\(MEMBER)p 811 5512 V 34 w(POSITION,)f(MEMBER)p 1771 5512 V 34 w(VERSION\))h(are)h(de\014ned)f(with)g(a)h(TNULLn)f(v)-5 b(alue)27 b(of)g(zero)0 5625 y(\(0\).)41 b(Character)27 b(\014eld)f(columns)h(\(MEMBER)p 1607 5625 V 34 w(XTENSION,)f(MEMBER)p 2600 5625 V 33 w(NAME,)i(MEMBER)p 3388 5625 V 34 w(URI)p 3590 5625 V 32 w(TYPE,)1905 5942 y(85)p eop end %%Page: 86 94 TeXDict begin 86 93 bop 0 299 a Fj(86)1338 b Fh(CHAPTER)29 b(8.)112 b(HIERAR)m(CHICAL)30 b(GR)m(OUPING)h(R)m(OUTINES)0 555 y Fj(MEMBER)p 426 555 28 4 v 33 w(LOCA)-8 b(TION\))30 b(utilize)i(an)e(ASCI)s(I)f(n)m(ull)h(c)m(haracter)i(to)f(denote)g(a)g (n)m(ull)f(\014eld)g(v)-5 b(alue.)0 715 y(The)23 b(grouping)g(supp)s (ort)f(functions)h(b)s(elong)h(to)g(t)m(w)m(o)h(basic)f(categories:)40 b(those)24 b(that)h(w)m(ork)e(with)h(grouping)f(table)0 828 y(HDUs)j(\(\013gt**\))j(and)c(those)h(that)h(w)m(ork)f(with)f(mem)m (b)s(er)h(HDUs)g(\(\013gm**\).)41 b(Tw)m(o)26 b(functions,)h(\014ts)p 3360 828 V 32 w(cop)m(y)p 3573 828 V 34 w(group\(\))0 941 y(and)40 b(\014ts)p 314 941 V 33 w(remo)m(v)m(e)p 626 941 V 34 w(group\(\),)k(ha)m(v)m(e)e(the)f(option)g(to)h(recursiv)m (ely)f(cop)m(y/delete)j(en)m(tire)e(groups.)71 b(Care)41 b(should)0 1054 y(b)s(e)33 b(tak)m(en)h(when)f(emplo)m(ying)h(these)g (functions)f(in)g(recursiv)m(e)h(mo)s(de)f(as)g(p)s(o)s(orly)g (de\014ned)f(groups)h(could)g(cause)0 1167 y(unpredictable)25 b(results.)39 b(The)25 b(problem)g(of)h(a)g(grouping)f(table)i (directly)f(or)g(indirectly)g(referencing)g(itself)g(\(th)m(us)0 1280 y(creating)41 b(an)f(in\014nite)f(lo)s(op\))i(is)e(protected)i (against;)46 b(in)39 b(fact,)44 b(neither)39 b(function)h(will)g (attempt)h(to)f(cop)m(y)h(or)0 1393 y(delete)32 b(an)e(HDU)h(t)m(wice.) 0 1745 y Ff(8.1)135 b(Grouping)45 b(T)-11 b(able)45 b(Routines)0 1997 y Fi(1)81 b Fj(Create)34 b(\(app)s(end\))f(a)h(grouping)f(table)i (at)f(the)g(end)f(of)h(the)g(curren)m(t)f(FITS)g(\014le)h(p)s(oin)m (ted)g(to)g(b)m(y)g(fptr.)49 b(The)227 2110 y(grpname)28 b(parameter)h(pro)m(vides)g(the)g(grouping)f(table)h(name)g(\(GRPNAME)g (k)m(eyw)m(ord)g(v)-5 b(alue\))29 b(and)f(ma)m(y)227 2223 y(b)s(e)42 b(set)h(to)g(NULL)f(if)g(no)g(group)g(name)g(is)h(to)g (b)s(e)e(sp)s(eci\014ed.)76 b(The)42 b(groupt)m(yp)s(e)g(parameter)g (sp)s(eci\014es)227 2336 y(the)c(desired)g(structure)f(of)h(the)g (grouping)f(table)i(and)e(ma)m(y)i(tak)m(e)g(on)f(the)g(v)-5 b(alues:)56 b(GT)p 3355 2336 V 33 w(ID)p 3490 2336 V 33 w(ALL)p 3705 2336 V 32 w(URI)227 2449 y(\(all)35 b(columns)e (created\),)j(GT)p 1274 2449 V 33 w(ID)p 1409 2449 V 33 w(REF)d(\(ID)h(b)m(y)g(reference)g(columns\),)g(GT)p 2904 2449 V 33 w(ID)p 3039 2449 V 33 w(POS)e(\(ID)i(b)m(y)g(p)s (osition)227 2562 y(columns\),)48 b(GT)p 801 2562 V 32 w(ID)p 935 2562 V 33 w(ALL)c(\(ID)g(b)m(y)f(reference)i(and)e(p)s (osition)g(columns\),)48 b(GT)p 3028 2562 V 32 w(ID)p 3162 2562 V 33 w(REF)p 3383 2562 V 33 w(URI)c(\(ID)g(b)m(y)227 2674 y(reference)35 b(and)e(FITS)g(\014le)i(URI)e(columns\),)j(and)d (GT)p 2129 2674 V 33 w(ID)p 2264 2674 V 33 w(POS)p 2481 2674 V 32 w(URI)h(\(ID)g(b)m(y)g(p)s(osition)g(and)g(FITS)f(\014le)227 2787 y(URI)e(columns\).)95 3063 y Fe(int)47 b(fits_create_group)c(/)48 b(ffgtcr)286 3176 y(\(fitsfile)e(*fptr,)g(char)g(*grpname,)g(int)h (grouptype,)e(>)i(int)g(*status\))0 3451 y Fi(2)81 b Fj(Create)26 b(\(insert\))g(a)f(grouping)g(table)h(just)f(after)h(the)f (CHDU)h(of)g(the)f(curren)m(t)g(FITS)g(\014le)g(p)s(oin)m(ted)g(to)h(b) m(y)g(fptr.)227 3564 y(All)k(HDUs)f(b)s(elo)m(w)g(the)g(the)g (insertion)g(p)s(oin)m(t)f(will)i(b)s(e)e(shifted)g(do)m(wn)m(w)m(ards) g(to)i(mak)m(e)g(ro)s(om)e(for)g(the)h(new)227 3677 y(HDU.)23 b(The)e(grpname)h(parameter)g(pro)m(vides)f(the)h(grouping)g(table)g (name)g(\(GRPNAME)h(k)m(eyw)m(ord)f(v)-5 b(alue\))227 3790 y(and)25 b(ma)m(y)i(b)s(e)e(set)h(to)h(NULL)e(if)h(no)g(group)f (name)h(is)g(to)g(b)s(e)f(sp)s(eci\014ed.)39 b(The)25 b(groupt)m(yp)s(e)h(parameter)g(sp)s(eci-)227 3903 y(\014es)g(the)h (desired)f(structure)g(of)h(the)f(grouping)g(table)i(and)e(ma)m(y)h (tak)m(e)h(on)e(the)h(v)-5 b(alues:)39 b(GT)p 3355 3903 V 33 w(ID)p 3490 3903 V 33 w(ALL)p 3705 3903 V 32 w(URI)227 4016 y(\(all)c(columns)e(created\),)j(GT)p 1274 4016 V 33 w(ID)p 1409 4016 V 33 w(REF)d(\(ID)h(b)m(y)g(reference)g (columns\),)g(GT)p 2904 4016 V 33 w(ID)p 3039 4016 V 33 w(POS)e(\(ID)i(b)m(y)g(p)s(osition)227 4129 y(columns\),)29 b(GT)p 782 4129 V 33 w(ID)p 917 4129 V 33 w(ALL)f(\(ID)g(b)m(y)g (reference)h(and)e(p)s(osition)h(columns\),)h(GT)p 2897 4129 V 33 w(ID)p 3032 4129 V 33 w(REF)p 3253 4129 V 32 w(URI)f(\(ID)h(b)m(y)f(ref-)227 4242 y(erence)g(and)e(FITS)h(\014le)g (URI)g(columns\),)h(and)e(GT)p 1976 4242 V 33 w(ID)p 2111 4242 V 33 w(POS)p 2328 4242 V 32 w(URI)h(\(ID)g(b)m(y)g(p)s (osition)g(and)g(FITS)f(\014le)h(URI)227 4355 y(columns\))k(.)95 4630 y Fe(int)47 b(fits_insert_group)c(/)48 b(ffgtis)286 4743 y(\(fitsfile)e(*fptr,)g(char)g(*grpname,)g(int)h(grouptype,)e(>)i (int)g(*status\))0 5019 y Fi(3)81 b Fj(Change)20 b(the)h(structure)f (of)h(an)g(existing)g(grouping)g(table)g(p)s(oin)m(ted)g(to)g(b)m(y)g (gfptr.)37 b(The)20 b(groupt)m(yp)s(e)g(parameter)227 5132 y(\(see)27 b(\014ts)p 532 5132 V 32 w(create)p 800 5132 V 35 w(group\(\))e(for)h(v)-5 b(alid)26 b(parameter)g(v)-5 b(alues\))26 b(sp)s(eci\014es)g(the)f(new)g(structure)h(of)f(the)h (grouping)227 5245 y(table.)44 b(This)30 b(function)h(only)g(adds)g(or) g(remo)m(v)m(es)h(grouping)f(table)h(columns,)f(it)h(do)s(es)f(not)g (add)g(or)g(delete)227 5357 y(group)26 b(mem)m(b)s(ers)f(\(i.e.,)k (table)e(ro)m(ws\).)40 b(If)26 b(the)g(grouping)g(table)h(already)g (has)f(the)h(desired)e(structure)h(then)227 5470 y(no)35 b(op)s(erations)f(are)h(p)s(erformed)e(and)h(function)g(simply)h (returns)e(with)h(a)h(\(0\))g(success)g(status)g(co)s(de.)53 b(If)227 5583 y(the)32 b(requested)g(structure)g(c)m(hange)h(creates)g (new)f(grouping)g(table)h(columns,)f(then)g(the)g(column)g(v)-5 b(alues)227 5696 y(for)30 b(all)i(existing)f(mem)m(b)s(ers)f(will)g(b)s (e)g(\014lled)g(with)g(the)h(n)m(ull)f(v)-5 b(alues)31 b(appropriate)f(to)h(the)g(column)f(t)m(yp)s(e.)p eop end %%Page: 87 95 TeXDict begin 87 94 bop 0 299 a Fh(8.1.)72 b(GR)m(OUPING)31 b(T)-8 b(ABLE)31 b(R)m(OUTINES)2235 b Fj(87)95 555 y Fe(int)47 b(fits_change_group)c(/)48 b(ffgtch)286 668 y(\(fitsfile)e(*gfptr,)f(int)i(grouptype,)e(>)j(int)f(*status\))0 905 y Fi(4)81 b Fj(Remo)m(v)m(e)41 b(the)e(group)g(de\014ned)f(b)m(y)h (the)h(grouping)f(table)h(p)s(oin)m(ted)f(to)h(b)m(y)g(gfptr,)h(and)e (optionally)i(all)f(the)227 1018 y(group)29 b(mem)m(b)s(er)f(HDUs.)41 b(The)28 b(rmopt)h(parameter)g(sp)s(eci\014es)g(the)g(action)h(to)g(b)s (e)e(tak)m(en)i(for)f(all)h(mem)m(b)s(ers)227 1131 y(of)d(the)g(group)g (de\014ned)e(b)m(y)i(the)g(grouping)g(table.)40 b(V)-8 b(alid)28 b(v)-5 b(alues)27 b(are:)40 b(OPT)p 2848 1131 28 4 v 32 w(RM)p 3030 1131 V 33 w(GPT)26 b(\(delete)j(only)e(the)227 1244 y(grouping)33 b(table\))i(and)e(OPT)p 1259 1244 V 32 w(RM)p 1441 1244 V 33 w(ALL)g(\(recursiv)m(ely)h(delete)h(all)f (HDUs)g(that)g(b)s(elong)f(to)h(the)g(group\).)227 1357 y(An)m(y)d(groups)g(con)m(taining)i(the)e(grouping)g(table)h(gfptr)e (as)i(a)f(mem)m(b)s(er)g(are)g(up)s(dated,)f(and)h(if)g(rmopt)g(==)227 1470 y(OPT)p 431 1470 V 32 w(RM)p 613 1470 V 33 w(GPT)21 b(all)h(mem)m(b)s(ers)f(ha)m(v)m(e)h(their)f(GRPIDn)g(and)g(GRPLCn)f(k) m(eyw)m(ords)h(up)s(dated)f(accordingly)-8 b(.)227 1582 y(If)36 b(rmopt)g(==)g(OPT)p 985 1582 V 32 w(RM)p 1167 1582 V 33 w(ALL,)g(then)g(other)h(groups)e(that)i(con)m(tain)h(the)e (deleted)h(mem)m(b)s(ers)f(of)g(gfptr)227 1695 y(are)31 b(up)s(dated)e(to)i(re\015ect)g(the)g(deletion)g(accordingly)-8 b(.)95 1932 y Fe(int)47 b(fits_remove_group)c(/)48 b(ffgtrm)286 2045 y(\(fitsfile)e(*gfptr,)f(int)i(rmopt,)f(>)i(int)f(*status\))0 2282 y Fi(5)81 b Fj(Cop)m(y)28 b(\(app)s(end\))g(the)h(group)f (de\014ned)g(b)m(y)h(the)f(grouping)h(table)h(p)s(oin)m(ted)e(to)i(b)m (y)e(infptr,)h(and)f(optionally)i(all)227 2395 y(group)g(mem)m(b)s(er)h (HDUs,)g(to)h(the)f(FITS)f(\014le)g(p)s(oin)m(ted)h(to)h(b)m(y)e (outfptr.)41 b(The)31 b(cp)s(opt)f(parameter)h(sp)s(eci\014es)227 2508 y(the)c(action)h(to)f(b)s(e)f(tak)m(en)h(for)g(all)g(mem)m(b)s (ers)f(of)g(the)h(group)f(infptr.)38 b(V)-8 b(alid)28 b(v)-5 b(alues)26 b(are:)40 b(OPT)p 3443 2508 V 32 w(GCP)p 3674 2508 V 32 w(GPT)227 2621 y(\(cop)m(y)d(only)g(the)f(grouping)g (table\))h(and)e(OPT)p 1887 2621 V 32 w(GCP)p 2118 2621 V 33 w(ALL)h(\(recursiv)m(ely)h(cop)m(y)g(ALL)e(the)i(HDUs)f(that)227 2734 y(b)s(elong)24 b(to)g(the)g(group)f(de\014ned)g(b)m(y)g(infptr\).) 38 b(If)23 b(the)h(cp)s(opt)g(==)f(OPT)p 2618 2734 V 32 w(GCP)p 2849 2734 V 32 w(GPT)h(then)f(the)h(mem)m(b)s(ers)f(of)227 2847 y(infptr)i(ha)m(v)m(e)h(their)g(GRPIDn)f(and)g(GRPLCn)g(k)m(eyw)m (ords)h(up)s(dated)e(to)i(re\015ect)g(the)g(existence)h(of)f(the)f(new) 227 2960 y(grouping)f(table)g(outfptr,)h(since)f(they)g(no)m(w)g(b)s (elong)g(to)g(the)g(new)g(group.)38 b(If)23 b(cp)s(opt)h(==)f(OPT)p 3460 2960 V 32 w(GCP)p 3691 2960 V 32 w(ALL)227 3073 y(then)29 b(the)g(new)g(grouping)g(table)h(outfptr)e(only)h(con)m (tains)i(p)s(oin)m(ters)e(to)h(the)f(copied)g(mem)m(b)s(er)g(HDUs)h (and)227 3185 y(not)38 b(the)g(original)g(mem)m(b)s(er)f(HDUs)h(of)g (infptr.)61 b(Note)39 b(that,)h(when)d(cp)s(opt)g(==)g(OPT)p 3301 3185 V 32 w(GCP)p 3532 3185 V 33 w(ALL,)g(all)227 3298 y(mem)m(b)s(ers)h(of)h(the)f(group)g(de\014ned)f(b)m(y)i(infptr)e (will)i(b)s(e)e(copied)i(to)g(a)g(single)g(FITS)f(\014le)h(p)s(oin)m (ted)f(to)h(b)m(y)227 3411 y(outfptr)30 b(regardless)h(of)f(their)h (\014le)f(distribution)g(in)g(the)h(original)g(group.)95 3648 y Fe(int)47 b(fits_copy_group)d(/)j(ffgtcp)286 3761 y(\(fitsfile)f(*infptr,)f(fitsfile)h(*outfptr,)f(int)i(cpopt,)f(>)h (int)g(*status\))0 3998 y Fi(6)81 b Fj(Merge)40 b(the)f(t)m(w)m(o)h (groups)e(de\014ned)g(b)m(y)h(the)g(grouping)g(table)g(HDUs)h(infptr)e (and)g(outfptr)h(b)m(y)f(com)m(bining)227 4111 y(their)30 b(mem)m(b)s(ers)f(in)m(to)i(a)f(single)g(grouping)f(table.)42 b(All)30 b(mem)m(b)s(er)f(HDUs)h(\(ro)m(ws\))h(are)f(copied)g(from)f (infptr)227 4224 y(to)f(outfptr.)39 b(If)26 b(mgopt)i(==)e(OPT)p 1419 4224 V 32 w(MR)m(G)p 1669 4224 V 34 w(COPY)g(then)g(infptr)g(con)m (tin)m(ues)i(to)g(exist)g(unaltered)e(after)i(the)227 4337 y(merge.)57 b(If)36 b(the)f(mgopt)i(==)e(OPT)p 1474 4337 V 31 w(MR)m(G)p 1723 4337 V 34 w(MO)m(V)i(then)e(infptr)f(is)i (deleted)h(after)f(the)g(merge.)57 b(In)35 b(b)s(oth)227 4450 y(cases,)d(the)e(GRPIDn)h(and)e(GRPLCn)h(k)m(eyw)m(ords)g(of)h (the)g(mem)m(b)s(er)e(HDUs)i(are)g(up)s(dated)e(accordingly)-8 b(.)95 4687 y Fe(int)47 b(fits_merge_groups)c(/)48 b(ffgtmg)286 4799 y(\(fitsfile)e(*infptr,)f(fitsfile)h(*outfptr,)f(int)i(mgopt,)f(>) h(int)g(*status\))0 5036 y Fi(7)81 b Fj("Compact")24 b(the)f(group)g(de\014ned)f(b)m(y)h(grouping)f(table)i(p)s(oin)m(ted)f (to)h(b)m(y)f(gfptr.)38 b(The)22 b(compaction)j(is)e(ac)m(hiev)m(ed)227 5149 y(b)m(y)37 b(merging)h(\(via)g(\014ts)p 1034 5149 V 32 w(merge)p 1303 5149 V 34 w(groups\(\)\))f(all)h(direct)g(mem)m(b)s (er)f(HDUs)g(of)h(gfptr)e(that)i(are)g(themselv)m(es)227 5262 y(grouping)i(tables.)70 b(The)40 b(cmopt)g(parameter)h(de\014nes)e (whether)g(the)i(merged)f(grouping)f(table)i(HDUs)227 5375 y(remain)j(after)h(merging)f(\(cmopt)h(==)f(OPT)p 1852 5375 V 32 w(CMT)p 2099 5375 V 32 w(MBR\))h(or)f(if)g(they)h(are)f (deleted)h(after)g(merging)227 5488 y(\(cmopt)31 b(==)f(OPT)p 916 5488 V 32 w(CMT)p 1163 5488 V 32 w(MBR)p 1409 5488 V 34 w(DEL\).)g(If)g(the)h(grouping)e(table)j(con)m(tains)f(no)f (direct)h(mem)m(b)s(er)e(HDUs)227 5601 y(that)i(are)f(themselv)m(es)h (grouping)e(tables)i(then)e(this)h(function)f(do)s(es)h(nothing.)40 b(Note)31 b(that)g(this)e(function)227 5714 y(is)i(not)f(recursiv)m(e,) h(i.e.,)h(only)f(the)f(direct)h(mem)m(b)s(er)f(HDUs)h(of)f(gfptr)g(are) h(considered)f(for)g(merging.)p eop end %%Page: 88 96 TeXDict begin 88 95 bop 0 299 a Fj(88)1338 b Fh(CHAPTER)29 b(8.)112 b(HIERAR)m(CHICAL)30 b(GR)m(OUPING)h(R)m(OUTINES)95 555 y Fe(int)47 b(fits_compact_group)c(/)48 b(ffgtcm)286 668 y(\(fitsfile)e(*gfptr,)f(int)i(cmopt,)f(>)i(int)f(*status\))0 945 y Fi(8)81 b Fj(V)-8 b(erify)21 b(the)h(in)m(tegrit)m(y)h(of)e(the)g (grouping)g(table)h(p)s(oin)m(ted)f(to)h(b)m(y)f(gfptr)g(to)h(mak)m(e)g (sure)e(that)i(all)g(group)f(mem)m(b)s(ers)227 1058 y(are)31 b(accessible)i(and)d(that)h(all)g(links)g(to)g(other)g(grouping)f (tables)i(are)f(v)-5 b(alid.)42 b(The)30 b(\014rstfailed)g(parameter) 227 1171 y(returns)c(the)i(mem)m(b)s(er)e(ID)h(\(ro)m(w)h(n)m(um)m(b)s (er\))e(of)i(the)f(\014rst)f(mem)m(b)s(er)h(HDU)h(to)g(fail)g(v)m (eri\014cation)g(\(if)g(p)s(ositiv)m(e)227 1284 y(v)-5 b(alue\))36 b(or)e(the)h(\014rst)e(group)h(link)g(to)i(fail)f(\(if)f (negativ)m(e)j(v)-5 b(alue\).)54 b(If)34 b(gfptr)g(is)g(successfully)h (v)m(eri\014ed)f(then)227 1397 y(\014rstfailed)d(con)m(tains)g(a)g (return)e(v)-5 b(alue)31 b(of)g(0.)95 1673 y Fe(int)47 b(fits_verify_group)c(/)48 b(ffgtvf)286 1786 y(\(fitsfile)e(*gfptr,)f (>)j(long)f(*firstfailed,)d(int)j(*status\))0 2063 y Fi(9)81 b Fj(Op)s(en)23 b(a)j(grouping)f(table)h(that)g(con)m(tains)g (the)g(mem)m(b)s(er)e(HDU)i(p)s(oin)m(ted)f(to)h(b)m(y)f(mfptr.)38 b(The)25 b(grouping)g(table)227 2176 y(to)39 b(op)s(en)e(is)h (de\014ned)f(b)m(y)h(the)g(grpid)f(parameter,)j(whic)m(h)e(con)m(tains) h(the)f(k)m(eyw)m(ord)h(index)e(v)-5 b(alue)39 b(of)f(the)227 2289 y(GRPIDn/GRPLCn)d(k)m(eyw)m(ord\(s\))g(that)h(link)f(the)g(mem)m (b)s(er)f(HDU)h(mfptr)f(to)i(the)f(grouping)f(table.)55 b(If)227 2402 y(the)30 b(grouping)f(table)h(resides)f(in)h(a)f(\014le)h (other)f(than)h(the)f(mem)m(b)s(er)g(HDUs)h(\014le)f(then)g(an)h (attempt)g(is)g(\014rst)227 2515 y(made)f(to)h(op)s(en)e(the)h(\014le)g (readwrite,)h(and)e(failing)i(that)g(readonly)-8 b(.)40 b(A)29 b(p)s(oin)m(ter)g(to)h(the)f(op)s(ened)f(grouping)227 2628 y(table)k(HDU)f(is)f(returned)f(in)h(gfptr.)227 2786 y(Note)35 b(that)g(it)f(is)g(p)s(ossible,)g(although)h(unlik)m (ely)f(and)f(undesirable,)h(for)g(the)g(GRPIDn/GRPLCn)f(k)m(ey-)227 2899 y(w)m(ords)k(in)g(a)g(mem)m(b)s(er)g(HDU)h(header)f(to)h(b)s(e)e (non-con)m(tin)m(uous,)k(e.g.,)g(GRPID1,)g(GRPID2,)g(GRPID5,)227 3012 y(GRPID6.)i(In)29 b(suc)m(h)g(cases,)i(the)f(grpid)f(index)g(v)-5 b(alue)31 b(sp)s(eci\014ed)e(in)g(the)h(function)f(call)j(shall)e(iden) m(tify)g(the)227 3125 y(\(grpid\)th)36 b(GRPID)f(v)-5 b(alue.)57 b(In)34 b(the)i(ab)s(o)m(v)m(e)h(example,)g(if)f(grpid)e(==) h(3,)j(then)d(the)g(group)g(sp)s(eci\014ed)g(b)m(y)227 3238 y(GRPID5)c(w)m(ould)g(b)s(e)e(op)s(ened.)95 3515 y Fe(int)47 b(fits_open_group)d(/)j(ffgtop)286 3628 y(\(fitsfile)f (*mfptr,)f(int)i(group,)f(>)i(fitsfile)d(**gfptr,)h(int)h(*status\))0 3905 y Fi(10)f Fj(Add)38 b(a)h(mem)m(b)s(er)f(HDU)i(to)f(an)g(existing) g(grouping)g(table)h(p)s(oin)m(ted)e(to)i(b)m(y)e(gfptr.)66 b(The)38 b(mem)m(b)s(er)g(HDU)227 4017 y(ma)m(y)30 b(either)g(b)s(e)f (p)s(oin)m(ted)g(to)h(mfptr)f(\(whic)m(h)g(m)m(ust)h(b)s(e)e(p)s (ositioned)i(to)g(the)f(mem)m(b)s(er)g(HDU\))i(or,)f(if)f(mfptr)227 4130 y(==)36 b(NULL,)g(iden)m(ti\014ed)g(b)m(y)g(the)g(hdup)s(os)e (parameter)i(\(the)h(HDU)g(p)s(osition)f(n)m(um)m(b)s(er,)g(Primary)f (arra)m(y)227 4243 y(==)f(1\))i(if)f(b)s(oth)f(the)h(grouping)g(table)g (and)g(the)g(mem)m(b)s(er)f(HDU)h(reside)g(in)g(the)g(same)g(FITS)f (\014le.)54 b(The)227 4356 y(new)27 b(mem)m(b)s(er)f(HDU)h(shall)g(ha)m (v)m(e)h(the)f(appropriate)g(GRPIDn)f(and)g(GRPLCn)g(k)m(eyw)m(ords)h (created)h(in)f(its)227 4469 y(header.)44 b(Note)33 b(that)f(if)g(the)g (mem)m(b)s(er)e(HDU)j(is)e(already)h(a)g(mem)m(b)s(er)f(of)h(the)g (group)f(then)g(it)h(will)g(not)g(b)s(e)227 4582 y(added)e(a)h(second)f (time.)95 4859 y Fe(int)47 b(fits_add_group_member)42 b(/)48 b(ffgtam)286 4972 y(\(fitsfile)e(*gfptr,)f(fitsfile)h(*mfptr,)g (int)h(hdupos,)f(>)h(int)g(*status\))0 5325 y Ff(8.2)135 b(Group)45 b(Mem)l(b)t(er)f(Routines)0 5578 y Fi(1)81 b Fj(Return)29 b(the)h(n)m(um)m(b)s(er)f(of)i(mem)m(b)s(er)e(HDUs)i(in) f(a)h(grouping)e(table)j(gfptr.)40 b(The)30 b(n)m(um)m(b)s(er)e(mem)m (b)s(er)i(HDUs)h(is)227 5691 y(just)f(the)h(NAXIS2)f(v)-5 b(alue)31 b(\(n)m(um)m(b)s(er)f(of)g(ro)m(ws\))h(of)f(the)h(grouping)f (table.)p eop end %%Page: 89 97 TeXDict begin 89 96 bop 0 299 a Fh(8.2.)72 b(GR)m(OUP)31 b(MEMBER)g(R)m(OUTINES)2295 b Fj(89)95 555 y Fe(int)47 b(fits_get_num_members)c(/)k(ffgtnm)286 668 y(\(fitsfile)f(*gfptr,)f(>) j(long)f(*nmembers,)e(int)h(*status\))0 945 y Fi(2)81 b Fj(Return)34 b(the)h(n)m(um)m(b)s(er)f(of)i(groups)e(to)i(whic)m(h)f (the)g(HDU)h(p)s(oin)m(ted)f(to)h(b)m(y)f(mfptr)f(is)i(link)m(ed,)h(as) e(de\014ned)f(b)m(y)227 1058 y(the)27 b(n)m(um)m(b)s(er)f(of)h (GRPIDn/GRPLCn)f(k)m(eyw)m(ord)i(records)e(that)i(app)s(ear)e(in)g(its) i(header.)39 b(Note)28 b(that)g(eac)m(h)227 1171 y(time)37 b(this)g(function)f(is)g(called,)k(the)c(indices)h(of)g(the)f (GRPIDn/GRPLCn)g(k)m(eyw)m(ords)h(are)g(c)m(hec)m(k)m(ed)h(to)227 1284 y(mak)m(e)29 b(sure)e(they)g(are)h(con)m(tin)m(uous)g(\(ie)h(no)e (gaps\))h(and)f(are)h(re-en)m(umerated)g(to)h(eliminate)g(gaps)f(if)f (found.)95 1674 y Fe(int)47 b(fits_get_num_groups)c(/)k(ffgmng)286 1787 y(\(fitsfile)f(*mfptr,)f(>)j(long)f(*nmembers,)e(int)h(*status\))0 2063 y Fi(3)81 b Fj(Op)s(en)26 b(a)i(mem)m(b)s(er)f(of)h(the)f (grouping)h(table)g(p)s(oin)m(ted)g(to)g(b)m(y)g(gfptr.)39 b(The)27 b(mem)m(b)s(er)g(to)i(op)s(en)e(is)g(iden)m(ti\014ed)h(b)m(y) 227 2176 y(its)i(ro)m(w)g(n)m(um)m(b)s(er)e(within)h(the)g(grouping)h (table)g(as)g(giv)m(en)g(b)m(y)g(the)f(parameter)h('mem)m(b)s(er')f (\(\014rst)h(mem)m(b)s(er)227 2289 y(==)g(1\))g(.)41 b(A)30 b(\014ts\014le)f(p)s(oin)m(ter)h(to)h(the)f(op)s(ened)f(mem)m(b) s(er)g(HDU)i(is)f(returned)f(as)h(mfptr.)39 b(Note)31 b(that)g(if)f(the)227 2402 y(mem)m(b)s(er)e(HDU)h(resides)g(in)f(a)h (FITS)f(\014le)g(di\013eren)m(t)h(from)f(the)h(grouping)f(table)h(HDU)h (then)e(the)h(mem)m(b)s(er)227 2515 y(\014le)i(is)f(\014rst)g(op)s (ened)f(readwrite)i(and,)f(failing)h(this,)g(op)s(ened)e(readonly)-8 b(.)95 2792 y Fe(int)47 b(fits_open_member)d(/)j(ffgmop)286 2905 y(\(fitsfile)f(*gfptr,)f(long)i(member,)f(>)h(fitsfile)f(**mfptr,) f(int)i(*status\))0 3182 y Fi(4)81 b Fj(Cop)m(y)27 b(\(app)s(end\))f(a) i(mem)m(b)s(er)f(HDU)h(of)f(the)h(grouping)e(table)j(p)s(oin)m(ted)e (to)h(b)m(y)f(gfptr.)39 b(The)27 b(mem)m(b)s(er)g(HDU)h(is)227 3295 y(iden)m(ti\014ed)33 b(b)m(y)g(its)h(ro)m(w)f(n)m(um)m(b)s(er)e (within)i(the)g(grouping)g(table)g(as)h(giv)m(en)g(b)m(y)e(the)i (parameter)f('mem)m(b)s(er')227 3408 y(\(\014rst)j(mem)m(b)s(er)f(==)g (1\).)58 b(The)35 b(cop)m(y)i(of)f(the)g(group)f(mem)m(b)s(er)g(HDU)i (will)f(b)s(e)f(app)s(ended)f(to)j(the)f(FITS)227 3521 y(\014le)29 b(p)s(oin)m(ted)g(to)g(b)m(y)f(mfptr,)h(and)f(up)s(on)f (return)g(mfptr)h(shall)h(p)s(oin)m(t)f(to)i(the)f(copied)g(mem)m(b)s (er)f(HDU.)h(The)227 3633 y(cp)s(opt)e(parameter)h(ma)m(y)g(tak)m(e)h (on)e(the)g(follo)m(wing)i(v)-5 b(alues:)40 b(OPT)p 2465 3633 28 4 v 32 w(MCP)p 2708 3633 V 32 w(ADD)29 b(whic)m(h)e(adds)f(a)i (new)f(en)m(try)227 3746 y(in)d(gfptr)g(for)f(the)i(copied)f(mem)m(b)s (er)g(HDU,)h(OPT)p 1907 3746 V 31 w(MCP)p 2149 3746 V 33 w(NADD)g(whic)m(h)f(do)s(es)g(not)g(add)f(an)h(en)m(try)h(in)e (gfptr)227 3859 y(for)i(the)h(copied)f(mem)m(b)s(er,)h(and)f(OPT)p 1536 3859 V 32 w(MCP)p 1779 3859 V 32 w(REPL)g(whic)m(h)g(replaces)h (the)f(original)h(mem)m(b)s(er)f(en)m(try)g(with)227 3972 y(the)31 b(copied)g(mem)m(b)s(er)e(en)m(try)-8 b(.)95 4249 y Fe(int)47 b(fits_copy_member)d(/)j(ffgmcp)286 4362 y(\(fitsfile)f(*gfptr,)f(fitsfile)h(*mfptr,)g(long)g(member,)g (int)h(cpopt,)f(>)i(int)f(*status\))0 4639 y Fi(5)81 b Fj(T)-8 b(ransfer)34 b(a)i(group)f(mem)m(b)s(er)f(HDU)i(from)f(the)h (grouping)f(table)h(p)s(oin)m(ted)f(to)h(b)m(y)f(infptr)g(to)h(the)f (grouping)227 4752 y(table)i(p)s(oin)m(ted)f(to)h(b)m(y)f(outfptr.)58 b(The)35 b(mem)m(b)s(er)h(HDU)h(to)f(transfer)g(is)g(iden)m(ti\014ed)g (b)m(y)g(its)h(ro)m(w)f(n)m(um)m(b)s(er)227 4865 y(within)42 b(infptr)f(as)i(sp)s(eci\014ed)f(b)m(y)g(the)h(parameter)g('mem)m(b)s (er')f(\(\014rst)g(mem)m(b)s(er)g(==)f(1\).)78 b(If)42 b(tfopt)h(==)227 4978 y(OPT)p 431 4978 V 32 w(MCP)p 674 4978 V 33 w(ADD)26 b(then)f(the)h(mem)m(b)s(er)e(HDU)i(is)g(made)f(a)h (mem)m(b)s(er)f(of)g(outfptr)g(and)g(remains)g(a)h(mem)m(b)s(er)227 5091 y(of)34 b(infptr.)51 b(If)34 b(tfopt)g(==)g(OPT)p 1339 5091 V 32 w(MCP)p 1582 5091 V 32 w(MO)m(V)h(then)f(the)g(mem)m(b)s (er)f(HDU)i(is)f(deleted)h(from)e(infptr)g(after)227 5204 y(the)e(transfer)f(to)h(outfptr.)95 5480 y Fe(int)47 b(fits_transfer_member)c(/)k(ffgmtf)286 5593 y(\(fitsfile)f(*infptr,)f (fitsfile)h(*outfptr,)f(long)i(member,)e(int)i(tfopt,)334 5706 y(>)h(int)e(*status\))p eop end %%Page: 90 98 TeXDict begin 90 97 bop 0 299 a Fj(90)1338 b Fh(CHAPTER)29 b(8.)112 b(HIERAR)m(CHICAL)30 b(GR)m(OUPING)h(R)m(OUTINES)0 555 y Fi(6)81 b Fj(Remo)m(v)m(e)31 b(a)e(mem)m(b)s(er)g(HDU)h(from)f (the)h(grouping)f(table)h(p)s(oin)m(ted)f(to)h(b)m(y)g(gfptr.)40 b(The)29 b(mem)m(b)s(er)f(HDU)i(to)h(b)s(e)227 668 y(deleted)37 b(is)e(iden)m(ti\014ed)h(b)m(y)f(its)h(ro)m(w)g(n)m(um)m(b)s(er)f(in)g (the)h(grouping)f(table)h(as)g(sp)s(eci\014ed)f(b)m(y)h(the)f (parameter)227 781 y('mem)m(b)s(er')41 b(\(\014rst)g(mem)m(b)s(er)g(==) f(1\).)74 b(The)41 b(rmopt)g(parameter)h(ma)m(y)f(tak)m(e)i(on)e(the)h (follo)m(wing)g(v)-5 b(alues:)227 894 y(OPT)p 431 894 28 4 v 32 w(RM)p 613 894 V 33 w(ENTR)d(Y)34 b(whic)m(h)e(remo)m(v)m(es) j(the)e(mem)m(b)s(er)g(HDU)h(en)m(try)f(from)g(the)g(grouping)g(table)h (and)f(up-)227 1007 y(dates)40 b(the)f(mem)m(b)s(er's)f(GRPIDn/GRPLCn)g (k)m(eyw)m(ords,)k(and)c(OPT)p 2687 1007 V 32 w(RM)p 2869 1007 V 33 w(MBR)h(whic)m(h)g(remo)m(v)m(es)h(the)227 1120 y(mem)m(b)s(er)30 b(HDU)h(en)m(try)g(from)f(the)g(grouping)g (table)i(and)d(deletes)j(the)e(mem)m(b)s(er)g(HDU)h(itself.)95 1380 y Fe(int)47 b(fits_remove_member)c(/)48 b(ffgmrm)286 1492 y(\(fitsfile)e(*fptr,)g(long)g(member,)g(int)h(rmopt,)f(>)i(int)f (*status\))p eop end %%Page: 91 99 TeXDict begin 91 98 bop 0 1225 a Fg(Chapter)65 b(9)0 1687 y Fm(Sp)6 b(ecialized)77 b(CFITSIO)f(In)-6 b(terface)0 1937 y(Routines)0 2429 y Fj(The)28 b(basic)h(in)m(terface)i(routines)e (describ)s(ed)e(previously)i(are)g(recommended)f(for)h(most)g(uses,)g (but)f(the)h(routines)0 2542 y(describ)s(ed)h(in)g(this)h(c)m(hapter)g (are)h(also)f(a)m(v)-5 b(ailable)34 b(if)c(necessary)-8 b(.)43 b(Some)31 b(of)g(these)g(routines)g(p)s(erform)e(more)i(sp)s(e-) 0 2655 y(cialized)e(function)d(that)i(cannot)f(easily)h(b)s(e)e(done)h (with)f(the)h(basic)h(in)m(terface)g(routines)f(while)f(others)h (duplicate)0 2767 y(the)j(functionalit)m(y)i(of)e(the)g(basic)h (routines)f(but)f(ha)m(v)m(e)i(a)g(sligh)m(tly)g(di\013eren)m(t)g (calling)g(sequence.)41 b(See)31 b(App)s(endix)0 2880 y(B)g(for)f(the)g(de\014nition)g(of)h(eac)m(h)h(function)e(parameter.)0 3210 y Ff(9.1)135 b(FITS)44 b(File)i(Access)e(Routines)0 3446 y Fi(1)81 b Fj(Op)s(en)37 b(an)i(existing)i(FITS)d(\014le)h (residing)g(in)g(core)h(computer)f(memory)-8 b(.)68 b(This)38 b(routine)h(is)h(analogous)g(to)227 3559 y(\014ts)p 354 3559 28 4 v 33 w(op)s(en)p 577 3559 V 32 w(\014le.)55 b(The)35 b('\014lename')g(is)g(curren)m(tly)h(ignored)f(b)m(y)g(this)g (routine)g(and)g(ma)m(y)g(b)s(e)g(an)m(y)g(arbitrary)227 3672 y(string.)78 b(In)42 b(general,)47 b(the)c(application)h(m)m(ust)f (ha)m(v)m(e)h(preallo)s(cated)g(an)e(initial)i(blo)s(c)m(k)g(of)f (memory)f(to)227 3785 y(hold)i(the)h(FITS)f(\014le)h(prior)f(to)h (calling)h(this)e(routine:)70 b('memptr')44 b(p)s(oin)m(ts)g(to)i(the)e (starting)i(address)227 3898 y(and)39 b('memsize')i(giv)m(es)g(the)f (initial)h(size)f(of)g(the)g(blo)s(c)m(k)g(of)g(memory)-8 b(.)69 b('mem)p 2958 3898 V 33 w(reallo)s(c')41 b(is)f(a)g(p)s(oin)m (ter)f(to)227 4011 y(an)c(optional)i(function)d(that)i(CFITSIO)e(can)h (call)h(to)g(allo)s(cate)i(additional)e(memory)-8 b(,)37 b(if)e(needed)f(\(only)227 4124 y(if)41 b(mo)s(de)e(=)h(READ)m (WRITE\),)i(and)e(is)g(mo)s(deled)g(after)h(the)f(standard)g(C)g ('reallo)s(c')i(function;)j(a)c(n)m(ull)227 4237 y(p)s(oin)m(ter)g(ma)m (y)g(b)s(e)f(giv)m(en)i(if)e(the)h(initial)h(allo)s(cation)h(of)e (memory)f(is)h(all)g(that)g(will)g(b)s(e)f(required)g(\(e.g.,)227 4350 y(if)35 b(the)g(\014le)g(is)g(op)s(ened)f(with)h(mo)s(de)f(=)h (READONL)-8 b(Y\).)36 b(The)e('deltasize')j(parameter)e(ma)m(y)h(b)s(e) e(used)g(to)227 4463 y(suggest)g(a)f(minim)m(um)f(amoun)m(t)h(of)g (additional)h(memory)f(that)g(should)f(b)s(e)g(allo)s(cated)j(during)d (eac)m(h)i(call)227 4575 y(to)d(the)f(memory)f(reallo)s(cation)j (function.)40 b(By)30 b(default,)g(CFITSIO)e(will)i(reallo)s(cate)j (enough)c(additional)227 4688 y(space)44 b(to)g(hold)f(the)h(en)m(tire) g(curren)m(tly)f(de\014ned)g(FITS)f(\014le)i(\(as)f(giv)m(en)i(b)m(y)e (the)h(NAXISn)e(k)m(eyw)m(ords\))227 4801 y(or)g(1)f(FITS)g(blo)s(c)m (k)h(\(=)f(2880)i(b)m(ytes\),)i(whic)m(h)d(ev)m(er)g(is)f(larger.)74 b(V)-8 b(alues)43 b(of)e(deltasize)i(less)f(than)f(2880)227 4914 y(will)31 b(b)s(e)f(ignored.)42 b(Since)31 b(the)g(memory)g (reallo)s(cation)i(op)s(eration)e(can)g(b)s(e)f(computationally)i(exp)s (ensiv)m(e,)227 5027 y(allo)s(cating)27 b(a)e(larger)g(initial)h(blo)s (c)m(k)f(of)g(memory)-8 b(,)26 b(and/or)f(sp)s(ecifying)f(a)h(larger)h (deltasize)g(v)-5 b(alue)25 b(ma)m(y)g(help)227 5140 y(to)i(reduce)f(the)g(n)m(um)m(b)s(er)e(of)i(reallo)s(cation)i(calls)f (and)f(mak)m(e)h(the)f(application)h(program)f(run)e(faster.)40 b(Note)227 5253 y(that)29 b(v)-5 b(alues)29 b(of)f(the)h(memptr)f(and)f (memsize)j(p)s(oin)m(ters)e(will)h(b)s(e)e(up)s(dated)g(b)m(y)i (CFITSIO)d(if)j(the)f(lo)s(cation)227 5366 y(or)j(size)g(of)f(the)h (FITS)f(\014le)g(in)g(memory)g(should)g(c)m(hange)h(as)g(a)g(result)f (of)g(allo)s(cating)j(more)e(memory)-8 b(.)95 5601 y Fe(int)47 b(fits_open_memfile)c(/)48 b(ffomem)286 5714 y(\(fitsfile)e(**fptr,)f(const)i(char)f(*filename,)f(int)i(mode,)g (void)f(**memptr,)1905 5942 y Fj(91)p eop end %%Page: 92 100 TeXDict begin 92 99 bop 0 299 a Fj(92)1003 b Fh(CHAPTER)30 b(9.)112 b(SPECIALIZED)28 b(CFITSIO)h(INTERF)-10 b(A)m(CE)30 b(R)m(OUTINES)334 555 y Fe(size_t)46 b(*memsize,)f(size_t)i(deltasize,) 334 668 y(void)g(*\(*mem_realloc\)\(void)42 b(*p,)47 b(size_t)f(newsize\),)f(int)i(*status\))0 927 y Fi(2)81 b Fj(Create)49 b(a)g(new)f(FITS)g(\014le)h(residing)f(in)h(core)g (computer)g(memory)-8 b(.)96 b(This)48 b(routine)g(is)h(analogous)h(to) 227 1040 y(\014ts)p 354 1040 28 4 v 33 w(create)p 623 1040 V 34 w(\014le.)40 b(In)29 b(general,)i(the)e(application)h(m)m (ust)f(ha)m(v)m(e)i(preallo)s(cated)g(an)e(initial)h(blo)s(c)m(k)g(of)f (memory)227 1152 y(to)38 b(hold)e(the)h(FITS)f(\014le)h(prior)f(to)h (calling)i(this)d(routine:)54 b('memptr')36 b(p)s(oin)m(ts)h(to)g(the)g (starting)h(address)227 1265 y(and)h('memsize')i(giv)m(es)g(the)f (initial)h(size)f(of)g(the)g(blo)s(c)m(k)g(of)g(memory)-8 b(.)69 b('mem)p 2958 1265 V 33 w(reallo)s(c')41 b(is)f(a)g(p)s(oin)m (ter)f(to)227 1378 y(an)f(optional)g(function)f(that)h(CFITSIO)e(can)i (call)h(to)f(allo)s(cate)i(additional)e(memory)-8 b(,)40 b(if)d(needed,)j(and)227 1491 y(is)34 b(mo)s(deled)f(after)h(the)g (standard)f(C)g('reallo)s(c')i(function;)g(a)f(n)m(ull)f(p)s(oin)m(ter) h(ma)m(y)g(b)s(e)f(giv)m(en)h(if)g(the)g(initial)227 1604 y(allo)s(cation)i(of)d(memory)g(is)h(all)g(that)g(will)f(b)s(e)g (required.)48 b(The)33 b('deltasize')j(parameter)d(ma)m(y)h(b)s(e)f (used)f(to)227 1717 y(suggest)i(a)f(minim)m(um)f(amoun)m(t)h(of)g (additional)h(memory)f(that)g(should)f(b)s(e)g(allo)s(cated)j(during)d (eac)m(h)i(call)227 1830 y(to)d(the)f(memory)f(reallo)s(cation)j (function.)40 b(By)30 b(default,)g(CFITSIO)e(will)i(reallo)s(cate)j (enough)c(additional)227 1943 y(space)41 b(to)g(hold)e(1)i(FITS)e(blo)s (c)m(k)h(\(=)g(2880)i(b)m(ytes\))f(and)e(v)-5 b(alues)41 b(of)f(deltasize)h(less)g(than)f(2880)h(will)g(b)s(e)227 2056 y(ignored.)f(Since)28 b(the)f(memory)h(reallo)s(cation)i(op)s (eration)e(can)g(b)s(e)f(computationally)i(exp)s(ensiv)m(e,)g(allo)s (cat-)227 2169 y(ing)36 b(a)f(larger)h(initial)h(blo)s(c)m(k)e(of)h (memory)-8 b(,)37 b(and/or)e(sp)s(ecifying)g(a)h(larger)g(deltasize)h (v)-5 b(alue)36 b(ma)m(y)f(help)g(to)227 2282 y(reduce)f(the)g(n)m(um)m (b)s(er)e(of)i(reallo)s(cation)i(calls)f(and)e(mak)m(e)i(the)f (application)h(program)f(run)e(faster.)52 b(Note)227 2395 y(that)29 b(v)-5 b(alues)29 b(of)f(the)h(memptr)f(and)f(memsize)j (p)s(oin)m(ters)e(will)h(b)s(e)e(up)s(dated)g(b)m(y)i(CFITSIO)d(if)j (the)f(lo)s(cation)227 2507 y(or)j(size)g(of)f(the)h(FITS)f(\014le)g (in)g(memory)g(should)g(c)m(hange)h(as)g(a)g(result)f(of)g(allo)s (cating)j(more)e(memory)-8 b(.)95 2766 y Fe(int)47 b (fits_create_memfile)c(/)k(ffimem)286 2879 y(\(fitsfile)f(**fptr,)f (void)i(**memptr,)334 2992 y(size_t)f(*memsize,)f(size_t)i(deltasize,) 334 3105 y(void)g(*\(*mem_realloc\)\(void)42 b(*p,)47 b(size_t)f(newsize\),)f(int)i(*status\))0 3363 y Fi(3)81 b Fj(Reop)s(en)34 b(a)i(FITS)e(\014le)h(that)h(w)m(as)f(previously)g (op)s(ened)g(with)f(\014ts)p 2414 3363 V 33 w(op)s(en)p 2637 3363 V 32 w(\014le)h(or)g(\014ts)p 3058 3363 V 33 w(create)p 3327 3363 V 34 w(\014le.)55 b(The)34 b(new)227 3476 y(\014ts\014le)i(p)s(oin)m(ter)h(ma)m(y)g(then)f(b)s(e)f(treated)j (as)e(a)h(separate)g(\014le,)h(and)e(one)h(ma)m(y)g(sim)m(ultaneously)g (read)f(or)227 3589 y(write)e(to)h(2)f(\(or)g(more\))g(di\013eren)m(t)g (extensions)g(in)g(the)g(same)g(\014le.)51 b(The)33 b(\014ts)p 2886 3589 V 32 w(op)s(en)p 3108 3589 V 32 w(\014le)h(routine)g(\(ab)s (o)m(v)m(e\))227 3702 y(automatically)k(detects)f(cases)f(where)e(a)i (previously)f(op)s(ened)f(\014le)i(is)f(b)s(eing)g(op)s(ened)f(again,)k (and)c(then)227 3815 y(in)m(ternally)e(call)f(\014ts)p 930 3815 V 33 w(reop)s(en)p 1229 3815 V 32 w(\014le,)g(so)f(programs)g (should)g(rarely)g(need)g(to)h(explicitly)h(call)g(this)e(routine.)95 4073 y Fe(int)47 b(fits_reopen_file)d(/)j(ffreopen)286 4186 y(\(fitsfile)f(*openfptr,)f(fitsfile)g(**newfptr,)g(>)j(int)f (*status\))0 4445 y Fi(4)81 b Fj(Create)24 b(a)g(new)f(FITS)g(\014le,)i (using)e(a)h(template)h(\014le)e(to)i(de\014ne)d(its)i(initial)h(size)g (and)e(structure.)37 b(The)24 b(template)227 4558 y(ma)m(y)i(b)s(e)f (another)g(FITS)g(HDU)h(or)f(an)g(ASCI)s(I)f(template)j(\014le.)39 b(If)25 b(the)g(input)g(template)h(\014le)g(name)f(p)s(oin)m(ter)227 4671 y(is)j(n)m(ull,)h(then)e(this)h(routine)f(b)s(eha)m(v)m(es)i(the)f (same)g(as)g(\014ts)p 2160 4671 V 32 w(create)p 2428 4671 V 35 w(\014le.)40 b(The)27 b(curren)m(tly)h(supp)s(orted)e(format) 227 4784 y(of)33 b(the)g(ASCI)s(I)e(template)j(\014le)e(is)h(describ)s (ed)e(under)g(the)i(\014ts)p 2350 4784 V 33 w(parse)p 2591 4784 V 32 w(template)h(routine)f(\(in)f(the)h(general)227 4897 y(Utilities)g(section\))95 5155 y Fe(int)47 b (fits_create_template)c(/)k(fftplt)286 5268 y(\(fitsfile)f(**fptr,)f (char)i(*filename,)e(char)i(*tpltfile)e(>)i(int)g(*status\))0 5527 y Fi(5)81 b Fj(P)m(arse)31 b(the)f(input)g(\014lename)g(or)g(URL)h (in)m(to)g(its)g(comp)s(onen)m(t)f(parts,)h(namely:)336 5714 y Fc(\017)46 b Fj(the)31 b(\014le)f(t)m(yp)s(e)h(\(\014le://,)h (ftp://,)f(h)m(ttp://,)h(etc\),)p eop end %%Page: 93 101 TeXDict begin 93 100 bop 0 299 a Fh(9.1.)72 b(FITS)30 b(FILE)g(A)m(CCESS)f(R)m(OUTINES)2244 b Fj(93)336 555 y Fc(\017)46 b Fj(the)31 b(base)f(input)g(\014le)g(name,)336 702 y Fc(\017)46 b Fj(the)31 b(name)f(of)h(the)f(output)g(\014le)h (that)g(the)f(input)g(\014le)g(is)h(to)g(b)s(e)e(copied)i(to)g(prior)f (to)h(op)s(ening,)336 848 y Fc(\017)46 b Fj(the)31 b(HDU)g(or)f (extension)h(sp)s(eci\014cation,)336 995 y Fc(\017)46 b Fj(the)31 b(\014ltering)f(sp)s(eci\014er,)336 1141 y Fc(\017)46 b Fj(the)31 b(binning)e(sp)s(eci\014er,)336 1288 y Fc(\017)46 b Fj(the)31 b(column)f(sp)s(eci\014er,)336 1434 y Fc(\017)46 b Fj(and)30 b(the)h(image)g(pixel)g(\014ltering)g(sp) s(eci\014er.)227 1623 y(A)k(n)m(ull)g(p)s(oin)m(ter)f(\(0\))i(ma)m(y)g (b)s(e)e(b)s(e)g(sp)s(eci\014ed)g(for)g(an)m(y)h(of)g(the)g(output)g (string)f(argumen)m(ts)h(that)h(are)f(not)227 1736 y(needed.)52 b(Null)34 b(strings)g(will)g(b)s(e)g(returned)f(for)h(an)m(y)g(comp)s (onen)m(ts)g(that)h(are)f(not)h(presen)m(t)f(in)g(the)g(input)227 1849 y(\014le)28 b(name.)39 b(The)27 b(calling)i(routine)e(m)m(ust)g (allo)s(cate)j(su\016cien)m(t)d(memory)g(to)h(hold)f(the)g(returned)f (c)m(haracter)227 1962 y(strings.)52 b(Allo)s(cating)37 b(the)d(string)g(lengths)h(equal)g(to)g(FLEN)p 2362 1962 28 4 v 33 w(FILENAME)f(is)g(guaran)m(teed)i(to)f(b)s(e)e(safe.)227 2075 y(These)d(routines)h(are)f(mainly)h(for)f(in)m(ternal)h(use)f(b)m (y)h(other)f(CFITSIO)f(routines.)95 2335 y Fe(int)47 b(fits_parse_input_url)c(/)k(ffiurl)286 2448 y(\(char)g(*filename,)e(>) i(char)g(*filetype,)e(char)h(*infile,)g(char)h(*outfile,)e(char)334 2561 y(*extspec,)g(char)i(*filter,)f(char)g(*binspec,)f(char)i (*colspec,)e(int)i(*status\))95 2787 y(int)g(fits_parse_input_filename) 41 b(/)48 b(ffifile)286 2900 y(\(char)f(*filename,)e(>)i(char)g (*filetype,)e(char)h(*infile,)g(char)h(*outfile,)e(char)334 3013 y(*extspec,)g(char)i(*filter,)f(char)g(*binspec,)f(char)i (*colspec,)e(char)i(*pixspec,)334 3125 y(int)g(*status\))0 3386 y Fi(6)81 b Fj(P)m(arse)33 b(the)f(input)g(\014lename)h(and)e (return)h(the)h(HDU)g(n)m(um)m(b)s(er)e(that)i(w)m(ould)f(b)s(e)g(mo)m (v)m(ed)i(to)f(if)f(the)h(\014le)f(w)m(ere)227 3499 y(op)s(ened)h(with) g(\014ts)p 878 3499 V 32 w(op)s(en)p 1100 3499 V 32 w(\014le.)49 b(The)33 b(returned)f(HDU)i(n)m(um)m(b)s(er)e(b)s(egins)h(with)g(1)g (for)g(the)g(primary)g(arra)m(y)-8 b(,)227 3612 y(so)40 b(for)f(example,)k(if)c(the)h(input)e(\014lename)i(=)f(`m)m (y\014le.\014ts[2]')i(then)e(hdun)m(um)e(=)i(3)h(will)g(b)s(e)f (returned.)227 3725 y(CFITSIO)j(do)s(es)i(not)g(op)s(en)f(the)g(\014le) h(to)h(c)m(hec)m(k)g(if)e(the)h(extension)h(actually)g(exists)f(if)g (an)f(extension)227 3838 y(n)m(um)m(b)s(er)e(is)i(sp)s(eci\014ed.)75 b(If)42 b(an)g(extension)h(name)f(is)h(included)e(in)h(the)h(\014le)f (name)g(sp)s(eci\014cation)h(\(e.g.)227 3951 y(`m)m (y\014le.\014ts[EVENTS]')i(then)e(this)h(routine)g(will)h(ha)m(v)m(e)g (to)f(op)s(en)g(the)g(FITS)f(\014le)h(and)f(lo)s(ok)i(for)f(the)227 4064 y(p)s(osition)31 b(of)f(the)h(named)f(extension,)i(then)e(close)i (\014le)e(again.)42 b(This)30 b(is)g(not)h(p)s(ossible)f(if)h(the)f (\014le)h(is)f(b)s(eing)227 4176 y(read)k(from)f(the)h(stdin)f(stream,) i(and)f(an)f(error)g(will)i(b)s(e)e(returned)f(in)i(this)f(case.)52 b(If)33 b(the)h(\014lename)g(do)s(es)227 4289 y(not)42 b(sp)s(ecify)g(an)g(explicit)h(extension)g(\(e.g.)76 b('m)m(y\014le.\014ts'\))43 b(then)f(hdun)m(um)e(=)h(-99)i(will)g(b)s (e)e(returned,)227 4402 y(whic)m(h)35 b(is)g(functionally)h(equiv)-5 b(alen)m(t)36 b(to)g(hdun)m(um)d(=)h(1.)55 b(This)34 b(routine)h(is)g(mainly)h(used)e(for)g(bac)m(kw)m(ard)227 4515 y(compatibilit)m(y)39 b(in)e(the)f(fto)s(ols)i(soft)m(w)m(are)g (pac)m(k)-5 b(age)39 b(and)d(is)g(not)h(recommended)g(for)f(general)i (use.)59 b(It)37 b(is)227 4628 y(generally)k(b)s(etter)e(and)g(more)g (e\016cien)m(t)i(to)f(\014rst)e(op)s(en)h(the)g(FITS)g(\014le)g(with)g (\014ts)p 3125 4628 V 32 w(op)s(en)p 3347 4628 V 33 w(\014le,)i(then)e (use)227 4741 y(\014ts)p 354 4741 V 33 w(get)p 507 4741 V 34 w(hdu)p 694 4741 V 31 w(n)m(um)c(to)i(determine)g(whic)m(h)f(HDU)h (in)f(the)h(\014le)f(has)g(b)s(een)g(op)s(ened,)h(rather)f(than)g (calling)227 4854 y(\014ts)p 354 4854 V 33 w(parse)p 595 4854 V 32 w(input)p 840 4854 V 32 w(url)30 b(follo)m(w)m(ed)i(b)m (y)e(a)h(call)g(to)h(\014ts)p 1967 4854 V 32 w(op)s(en)p 2189 4854 V 32 w(\014le.)143 5115 y Fe(int)47 b(fits_parse_extnum)c(/) 48 b(ffextn)334 5227 y(\(char)e(*filename,)f(>)j(int)f(*hdunum,)e(int)i (*status\))0 5488 y Fi(7)81 b Fj(P)m(arse)45 b(the)g(input)e(\014le)i (name)g(and)f(return)f(the)i(ro)s(ot)g(\014le)g(name.)83 b(The)44 b(ro)s(ot)h(name)g(includes)f(the)h(\014le)227 5601 y(t)m(yp)s(e)35 b(if)g(sp)s(eci\014ed,)h(\(e.g.)56 b('ftp://')37 b(or)e('h)m(ttp://'\))i(and)d(the)h(full)g(path)g(name,)h (to)g(the)f(exten)m(t)i(that)e(it)h(is)227 5714 y(sp)s(eci\014ed)26 b(in)f(the)i(input)e(\014lename.)39 b(It)26 b(do)s(es)g(not)g(include)g (the)g(HDU)h(name)f(or)g(n)m(um)m(b)s(er,)g(or)g(an)m(y)h(\014ltering)p eop end %%Page: 94 102 TeXDict begin 94 101 bop 0 299 a Fj(94)1003 b Fh(CHAPTER)30 b(9.)112 b(SPECIALIZED)28 b(CFITSIO)h(INTERF)-10 b(A)m(CE)30 b(R)m(OUTINES)227 555 y Fj(sp)s(eci\014cations.)86 b(The)45 b(calling)h(routine)g(m)m(ust)f(allo)s(cate)i(su\016cien)m(t)f(memory)f (to)h(hold)f(the)g(returned)227 668 y(ro)s(otname)33 b(c)m(haracter)g(string.)46 b(Allo)s(cating)34 b(the)f(length)f(equal)h (to)f(FLEN)p 2817 668 28 4 v 33 w(FILENAME)h(is)f(guaran)m(teed)227 781 y(to)f(b)s(e)f(safe.)143 1019 y Fe(int)47 b(fits_parse_rootname)c (/)k(ffrtnm)334 1132 y(\(char)f(*filename,)f(>)j(char)f(*rootname,)e (int)h(*status\);)0 1370 y Fi(8)81 b Fj(T)-8 b(est)37 b(if)f(the)h(input)f(\014le)h(or)f(a)h(compressed)g(v)m(ersion)g(of)g (the)g(\014le)f(\(with)h(a)g(.gz,)j(.Z,)c(.z,)j(or)e(.zip)g (extension\))227 1483 y(exists)i(on)f(disk.)63 b(The)37 b(returned)g(v)-5 b(alue)38 b(of)g(the)h('exists')g(parameter)f(will)g (ha)m(v)m(e)i(1)e(of)g(the)g(4)g(follo)m(wing)227 1596 y(v)-5 b(alues:)370 1820 y Fe(2:)95 b(the)47 b(file)g(does)g(not)f (exist,)h(but)f(a)i(compressed)d(version)h(does)g(exist)370 1933 y(1:)95 b(the)47 b(disk)g(file)g(does)f(exist)370 2046 y(0:)95 b(neither)46 b(the)h(file)g(nor)g(a)g(compressed)e (version)h(of)h(the)g(file)g(exist)323 2159 y(-1:)94 b(the)47 b(input)g(file)f(name)h(is)g(not)g(a)g(disk)g(file)g(\(could)f (be)h(a)g(ftp,)g(http,)561 2272 y(smem,)g(or)g(mem)g(file,)f(or)h(a)h (file)e(piped)h(in)g(on)g(the)g(STDIN)f(stream\))143 2587 y(int)h(fits_file_exists)c(/)48 b(ffexist)334 2700 y(\(char)e(*filename,)f(>)j(int)f(*exists,)e(int)i(*status\);)0 2938 y Fi(9)81 b Fj(Flush)36 b(an)m(y)i(in)m(ternal)g(bu\013ers)e(of)i (data)g(to)g(the)f(output)g(FITS)g(\014le.)62 b(These)37 b(routines)g(rarely)g(need)g(to)i(b)s(e)227 3051 y(called,)i(but)36 b(can)i(b)s(e)f(useful)f(in)h(cases)i(where)d(other)i(pro)s(cesses)f (need)g(to)h(access)h(the)f(same)f(FITS)g(\014le)227 3164 y(in)j(real)i(time,)h(either)e(on)g(disk)f(or)g(in)g(memory)-8 b(.)71 b(These)41 b(routines)f(also)h(help)f(to)i(ensure)d(that)i(if)g (the)227 3277 y(application)c(program)d(subsequen)m(tly)h(ab)s(orts)f (then)h(the)g(FITS)f(\014le)h(will)g(ha)m(v)m(e)i(b)s(een)d(closed)h (prop)s(erly)-8 b(.)227 3390 y(The)43 b(\014rst)g(routine,)k(\014ts)p 1110 3390 V 33 w(\015ush)p 1332 3390 V 31 w(\014le)c(is)h(more)f (rigorous)h(and)f(completely)i(closes,)j(then)c(reop)s(ens,)i(the)227 3503 y(curren)m(t)31 b(HDU,)h(b)s(efore)e(\015ushing)g(the)h(in)m (ternal)g(bu\013ers,)f(th)m(us)h(ensuring)f(that)h(the)g(output)g(FITS) f(\014le)h(is)227 3615 y(iden)m(tical)38 b(to)e(what)f(w)m(ould)h(b)s (e)f(pro)s(duced)f(if)h(the)h(FITS)f(w)m(as)h(closed)g(at)g(that)g(p)s (oin)m(t)g(\(i.e.,)i(with)e(a)g(call)227 3728 y(to)g(\014ts)p 470 3728 V 33 w(close)p 689 3728 V 34 w(\014le\).)56 b(The)35 b(second)g(routine,)i(\014ts)p 1912 3728 V 33 w(\015ush)p 2134 3728 V 31 w(bu\013er)d(simply)h(\015ushes)f(the)h(in)m (ternal)h(CFITSIO)227 3841 y(bu\013ers)28 b(of)h(data)h(to)f(the)h (output)e(FITS)g(\014le,)i(without)f(up)s(dating)f(and)g(closing)i(the) f(curren)m(t)g(HDU.)h(This)227 3954 y(is)37 b(m)m(uc)m(h)g(faster,)i (but)e(there)g(ma)m(y)g(b)s(e)f(circumstances)i(where)e(the)h (\015ushed)f(\014le)h(do)s(es)f(not)h(completely)227 4067 y(re\015ect)31 b(the)g(\014nal)f(state)i(of)e(the)h(\014le)f(as)h (it)g(will)f(exist)i(when)d(the)h(\014le)h(is)f(actually)i(closed.)227 4214 y(A)f(t)m(ypical)h(use)e(of)h(these)g(routines)f(w)m(ould)g(b)s(e) g(to)h(\015ush)e(the)h(state)i(of)f(a)g(FITS)e(table)j(to)f(disk)f (after)h(eac)m(h)227 4327 y(ro)m(w)36 b(of)f(the)h(table)g(is)f (written.)55 b(It)36 b(is)f(recommend)g(that)h(\014ts)p 2392 4327 V 32 w(\015ush)p 2613 4327 V 32 w(\014le)f(b)s(e)g(called)h (after)g(the)f(\014rst)g(ro)m(w)227 4440 y(is)k(written,)i(then)d (\014ts)p 1023 4440 V 32 w(\015ush)p 1244 4440 V 31 w(bu\013er)g(ma)m (y)h(b)s(e)f(called)h(after)g(eac)m(h)h(subsequen)m(t)e(ro)m(w)g(is)h (written.)65 b(Note)227 4552 y(that)40 b(this)f(latter)h(routine)f (will)g(not)g(automatically)j(up)s(date)c(the)h(NAXIS2)g(k)m(eyw)m(ord) h(whic)m(h)e(records)227 4665 y(the)c(n)m(um)m(b)s(er)d(of)i(ro)m(ws)h (of)f(data)g(in)g(the)g(table,)i(so)f(this)f(k)m(eyw)m(ord)g(m)m(ust)g (b)s(e)f(explicitly)j(up)s(dated)d(b)m(y)h(the)227 4778 y(application)f(program)e(after)h(eac)m(h)h(ro)m(w)e(is)g(written.)95 5016 y Fe(int)47 b(fits_flush_file)d(/)j(ffflus)286 5129 y(\(fitsfile)f(*fptr,)g(>)h(int)g(*status\))95 5355 y(int)g (fits_flush_buffer)c(/)48 b(ffflsh)286 5468 y(\(fitsfile)e(*fptr,)g(0,) h(>)g(int)g(*status\))286 5694 y(\(Note:)94 b(The)47 b(second)f(argument)g(must)g(be)i(0\).)p eop end %%Page: 95 103 TeXDict begin 95 102 bop 0 299 a Fh(9.2.)72 b(HDU)31 b(A)m(CCESS)e(R)m(OUTINES)2488 b Fj(95)0 555 y Ff(9.2)135 b(HDU)46 b(Access)e(Routines)0 795 y Fi(1)81 b Fj(Get)28 b(the)f(b)m(yte)h(o\013sets)g(in)f(the)g(FITS)f(\014le)i(to)f(the)h (start)g(of)f(the)g(header)g(and)g(the)g(start)h(and)e(end)h(of)g(the)g (data)227 908 y(in)34 b(the)g(CHDU.)g(The)f(di\013erence)h(b)s(et)m(w)m (een)h(headstart)f(and)f(dataend)h(equals)g(the)g(size)g(of)g(the)g (CHDU.)227 1021 y(If)e(the)h(CHDU)f(is)h(the)f(last)h(HDU)g(in)f(the)h (\014le,)g(then)f(dataend)g(is)g(also)i(equal)e(to)h(the)g(size)g(of)g (the)f(en)m(tire)227 1133 y(FITS)i(\014le.)55 b(Null)35 b(p)s(oin)m(ters)g(ma)m(y)g(b)s(e)f(input)g(for)h(an)m(y)g(of)g(the)g (address)f(parameters)i(if)e(their)h(v)-5 b(alues)36 b(are)227 1246 y(not)31 b(needed.)95 1502 y Fe(int)47 b(fits_get_hduaddr)d(/)j(ffghad)94 b(\(only)46 b(supports)g(files)g(up) h(to)h(2.1)f(GB)g(in)g(size\))334 1615 y(\(fitsfile)e(*fptr,)h(>)i (long)f(*headstart,)d(long)j(*datastart,)e(long)h(*dataend,)382 1728 y(int)h(*status\))95 1953 y(int)g(fits_get_hduaddrll)c(/)48 b(ffghadll)93 b(\(supports)45 b(large)i(files\))334 2066 y(\(fitsfile)e(*fptr,)h(>)i(LONGLONG)d(*headstart,)g(LONGLONG)h (*datastart,)382 2179 y(LONGLONG)f(*dataend,)h(int)h(*status\))0 2434 y Fi(2)81 b Fj(Create)31 b(\(app)s(end\))f(a)i(new)e(empt)m(y)i (HDU)f(at)h(the)f(end)f(of)i(the)f(FITS)f(\014le.)42 b(This)31 b(is)g(no)m(w)g(the)g(CHDU)g(but)f(it)227 2547 y(is)i(completely)g(empt)m(y)g(and)f(has)g(no)g(header)g(k)m(eyw)m (ords.)43 b(It)32 b(is)f(recommended)g(that)h(\014ts)p 3344 2547 28 4 v 32 w(create)p 3612 2547 V 34 w(img)g(or)227 2660 y(\014ts)p 354 2660 V 33 w(create)p 623 2660 V 34 w(tbl)e(b)s(e)g(used)g(instead)g(of)h(this)f(routine.)95 2916 y Fe(int)47 b(fits_create_hdu)d(/)j(ffcrhd)286 3028 y(\(fitsfile)f(*fptr,)g(>)h(int)g(*status\))0 3284 y Fi(3)81 b Fj(Insert)22 b(a)h(new)g(IMA)m(GE)h(extension)f(immediately)i (follo)m(wing)f(the)f(CHDU,)h(or)f(insert)g(a)g(new)f(Primary)h(Arra)m (y)227 3397 y(at)30 b(the)e(b)s(eginning)g(of)h(the)g(\014le.)40 b(An)m(y)29 b(follo)m(wing)h(extensions)f(in)g(the)f(\014le)h(will)g(b) s(e)f(shifted)g(do)m(wn)h(to)g(mak)m(e)227 3510 y(ro)s(om)36 b(for)h(the)f(new)g(extension.)59 b(If)36 b(the)h(CHDU)g(is)f(the)h (last)g(HDU)g(in)f(the)h(\014le)f(then)g(the)h(new)f(image)227 3623 y(extension)31 b(will)g(simply)e(b)s(e)h(app)s(ended)e(to)j(the)f (end)g(of)g(the)g(\014le.)41 b(One)30 b(can)g(force)h(a)g(new)e (primary)g(arra)m(y)227 3735 y(to)35 b(b)s(e)d(inserted)i(at)g(the)g(b) s(eginning)f(of)g(the)h(FITS)f(\014le)g(b)m(y)h(setting)h(status)e(=)h (PREPEND)p 3432 3735 V 32 w(PRIMAR)-8 b(Y)227 3848 y(prior)25 b(to)g(calling)i(the)e(routine.)38 b(In)25 b(this)f(case)i(the)f(old)g (primary)f(arra)m(y)i(will)f(b)s(e)f(con)m(v)m(erted)j(to)e(an)g(IMA)m (GE)227 3961 y(extension.)49 b(The)32 b(new)g(extension)i(\(or)f (primary)f(arra)m(y\))h(will)h(b)s(ecome)f(the)g(CHDU.)g(Refer)g(to)h (Chapter)227 4074 y(9)d(for)f(a)h(list)g(of)f(pre-de\014ned)f(bitpix)i (v)-5 b(alues.)95 4329 y Fe(int)47 b(fits_insert_img)d(/)j(ffiimg)286 4442 y(\(fitsfile)f(*fptr,)g(int)h(bitpix,)e(int)i(naxis,)f(long)h (*naxes,)f(>)h(int)g(*status\))95 4668 y(int)g(fits_insert_imgll)c(/)48 b(ffiimgll)286 4781 y(\(fitsfile)e(*fptr,)g(int)h(bitpix,)e(int)i (naxis,)f(LONGLONG)g(*naxes,)g(>)h(int)g(*status\))0 5036 y Fi(4)81 b Fj(Insert)30 b(a)g(new)g(ASCI)s(I)f(or)i(binary)f (table)h(extension)g(immediately)h(follo)m(wing)g(the)f(CHDU.)g(An)m(y) f(follo)m(wing)227 5149 y(extensions)36 b(will)g(b)s(e)f(shifted)g(do)m (wn)g(to)h(mak)m(e)g(ro)s(om)g(for)f(the)g(new)g(extension.)57 b(If)35 b(there)h(are)f(no)h(other)227 5262 y(follo)m(wing)c (extensions)g(then)e(the)h(new)f(table)h(extension)h(will)f(simply)f(b) s(e)g(app)s(ended)f(to)i(the)g(end)f(of)h(the)227 5375 y(\014le.)42 b(If)30 b(the)h(FITS)f(\014le)g(is)h(curren)m(tly)g(empt)m (y)g(then)f(this)g(routine)h(will)g(create)h(a)f(dumm)m(y)f(primary)f (arra)m(y)227 5488 y(b)s(efore)i(app)s(ending)f(the)i(table)h(to)f(it.) 44 b(The)31 b(new)g(extension)i(will)e(b)s(ecome)h(the)g(CHDU.)g(The)f (tunit)h(and)227 5601 y(extname)39 b(parameters)g(are)f(optional)i(and) e(a)g(n)m(ull)g(p)s(oin)m(ter)h(ma)m(y)f(b)s(e)g(giv)m(en)h(if)f(they)h (are)f(not)h(de\014ned.)227 5714 y(When)32 b(inserting)g(an)g(ASCI)s(I) f(table)i(with)e(\014ts)p 1847 5714 V 33 w(insert)p 2103 5714 V 33 w(atbl,)i(a)f(n)m(ull)g(p)s(oin)m(ter)g(ma)m(y)h(giv)m(en)g (for)f(the)g(*tb)s(col)p eop end %%Page: 96 104 TeXDict begin 96 103 bop 0 299 a Fj(96)1003 b Fh(CHAPTER)30 b(9.)112 b(SPECIALIZED)28 b(CFITSIO)h(INTERF)-10 b(A)m(CE)30 b(R)m(OUTINES)227 555 y Fj(parameter)23 b(in)f(whic)m(h)h(case)g(eac)m (h)h(column)e(of)h(the)g(table)g(will)g(b)s(e)f(separated)h(b)m(y)f(a)h (single)g(space)g(c)m(haracter.)227 668 y(Similarly)-8 b(,)29 b(if)d(the)h(input)f(v)-5 b(alue)27 b(of)g(ro)m(wlen)g(is)f(0,)i (then)f(CFITSIO)e(will)i(calculate)i(the)e(default)f(ro)m(wlength)227 781 y(based)39 b(on)g(the)g(tb)s(col)h(and)e(tt)m(yp)s(e)h(v)-5 b(alues.)67 b(Under)39 b(normal)g(circumstances,)j(the)d(nro)m(ws)f (paramen)m(ter)227 894 y(should)31 b(ha)m(v)m(e)i(a)f(v)-5 b(alue)32 b(of)f(0;)i(CFITSIO)d(will)i(automatically)j(up)s(date)30 b(the)i(n)m(um)m(b)s(er)e(of)i(ro)m(ws)g(as)g(data)g(is)227 1007 y(written)26 b(to)h(the)f(table.)40 b(When)25 b(inserting)h(a)h (binary)e(table)h(with)g(\014ts)p 2596 1007 28 4 v 32 w(insert)p 2851 1007 V 33 w(btbl,)g(if)g(there)g(are)g(follo)m(wing)227 1120 y(extensions)f(in)f(the)h(\014le)f(and)g(if)g(the)h(table)g(con)m (tains)g(v)-5 b(ariable)25 b(length)g(arra)m(y)g(columns)f(then)g(p)s (coun)m(t)g(m)m(ust)227 1233 y(sp)s(ecify)30 b(the)h(exp)s(ected)g (\014nal)f(size)h(of)f(the)h(data)g(heap,)f(otherwise)h(p)s(coun)m(t)f (m)m(ust)h(=)f(0.)95 1490 y Fe(int)47 b(fits_insert_atbl)d(/)j(ffitab) 286 1603 y(\(fitsfile)f(*fptr,)g(LONGLONG)f(rowlen,)h(LONGLONG)g (nrows,)g(int)h(tfields,)e(char)i(*ttype[],)334 1716 y(long)g(*tbcol,)f(char)g(*tform[],)f(char)i(*tunit[],)e(char)i (*extname,)e(>)j(int)f(*status\))95 1942 y(int)g(fits_insert_btbl)d(/)j (ffibin)286 2055 y(\(fitsfile)f(*fptr,)g(LONGLONG)f(nrows,)h(int)h (tfields,)f(char)g(**ttype,)286 2168 y(char)h(**tform,)f(char)g (**tunit,)g(char)g(*extname,)g(long)g(pcount,)g(>)i(int)e(*status\))0 2425 y Fi(5)81 b Fj(Mo)s(dify)27 b(the)h(size,)h(dimensions,)f(and/or)f (data)i(t)m(yp)s(e)f(of)f(the)h(curren)m(t)g(primary)e(arra)m(y)i(or)g (image)h(extension.)227 2538 y(If)39 b(the)h(new)e(image,)44 b(as)39 b(sp)s(eci\014ed)g(b)m(y)g(the)g(input)g(argumen)m(ts,)j(is)d (larger)h(than)f(the)h(curren)m(t)f(existing)227 2651 y(image)30 b(in)e(the)g(FITS)g(\014le)g(then)g(zero)h(\014ll)f(data)h (will)g(b)s(e)f(inserted)g(at)h(the)f(end)g(of)g(the)h(curren)m(t)f (image)i(and)227 2764 y(an)m(y)35 b(follo)m(wing)h(extensions)f(will)g (b)s(e)f(mo)m(v)m(ed)i(further)d(bac)m(k)i(in)g(the)f(\014le.)54 b(Similarly)-8 b(,)36 b(if)f(the)g(new)f(image)227 2877 y(is)j(smaller)g(than)g(the)f(curren)m(t)h(image)h(then)e(an)m(y)h (follo)m(wing)h(extensions)f(will)g(b)s(e)f(shifted)h(up)e(to)m(w)m (ards)227 2990 y(the)h(b)s(eginning)f(of)h(the)g(FITS)f(\014le)h(and)f (the)h(image)h(data)f(will)h(b)s(e)e(truncated)g(to)i(the)f(new)f (size.)58 b(This)227 3103 y(routine)27 b(rewrites)g(the)h(BITPIX,)f (NAXIS,)g(and)f(NAXISn)g(k)m(eyw)m(ords)i(with)f(the)g(appropriate)g(v) -5 b(alues)27 b(for)227 3216 y(the)k(new)f(image.)95 3473 y Fe(int)47 b(fits_resize_img)d(/)j(ffrsim)286 3586 y(\(fitsfile)f(*fptr,)g(int)h(bitpix,)e(int)i(naxis,)f(long)h(*naxes,)f (>)h(int)g(*status\))95 3812 y(int)g(fits_resize_imgll)c(/)48 b(ffrsimll)286 3925 y(\(fitsfile)e(*fptr,)g(int)h(bitpix,)e(int)i (naxis,)f(LONGLONG)g(*naxes,)g(>)h(int)g(*status\))0 4183 y Fi(6)81 b Fj(Cop)m(y)43 b(the)h(data)h(\(and)e(not)h(the)g (header\))g(from)f(the)h(CHDU)g(asso)s(ciated)h(with)f(infptr)e(to)j (the)f(CHDU)227 4295 y(asso)s(ciated)34 b(with)e(outfptr.)47 b(This)32 b(will)g(o)m(v)m(erwrite)i(an)m(y)f(data)g(previously)g(in)f (the)h(output)f(CHDU.)h(This)227 4408 y(lo)m(w)39 b(lev)m(el)h(routine) e(is)g(used)f(b)m(y)h(\014ts)p 1510 4408 V 33 w(cop)m(y)p 1724 4408 V 33 w(hdu,)h(but)e(it)i(ma)m(y)f(also)h(b)s(e)f(useful)f(in) h(certain)h(application)227 4521 y(programs)30 b(that)h(w)m(an)m(t)g (to)g(cop)m(y)g(the)f(data)h(from)f(one)h(FITS)e(\014le)i(to)g(another) f(but)f(also)j(w)m(an)m(t)f(to)g(mo)s(dify)227 4634 y(the)h(header)g(k) m(eyw)m(ords.)46 b(The)32 b(required)f(FITS)g(header)h(k)m(eyw)m(ords)g (whic)m(h)g(de\014ne)f(the)h(structure)g(of)g(the)227 4747 y(HDU)f(m)m(ust)g(b)s(e)e(written)i(to)g(the)f(output)g(CHDU)h(b)s (efore)f(calling)i(this)e(routine.)95 5005 y Fe(int)47 b(fits_copy_data)d(/)k(ffcpdt)286 5118 y(\(fitsfile)e(*infptr,)f (fitsfile)h(*outfptr,)f(>)i(int)g(*status\))0 5375 y Fi(7)81 b Fj(Read)30 b(or)g(write)g(a)h(sp)s(eci\014ed)e(n)m(um)m(b)s (er)g(of)i(b)m(ytes)f(starting)h(at)g(the)g(sp)s(eci\014ed)e(b)m(yte)i (o\013set)g(from)f(the)g(start)h(of)227 5488 y(the)c(extension)g(data)f (unit.)39 b(These)26 b(lo)m(w)h(lev)m(el)h(routine)e(are)h(in)m(tended) f(mainly)g(for)g(accessing)i(the)e(data)h(in)227 5601 y(non-standard,)h(conforming)g(extensions,)h(and)e(should)g(not)h(b)s (e)g(used)f(for)g(standard)g(IMA)m(GE,)i(T)-8 b(ABLE,)227 5714 y(or)31 b(BINT)-8 b(ABLE)31 b(extensions.)p eop end %%Page: 97 105 TeXDict begin 97 104 bop 0 299 a Fh(9.3.)72 b(SPECIALIZED)29 b(HEADER)i(KEYW)m(ORD)g(R)m(OUTINES)1510 b Fj(97)95 555 y Fe(int)47 b(fits_read_ext)e(/)i(ffgextn)286 668 y(\(fitsfile)f (*fptr,)g(LONGLONG)f(offset,)h(LONGLONG)g(nbytes,)f(void)i(*buffer\))95 781 y(int)g(fits_write_ext)d(/)k(ffpextn)286 894 y(\(fitsfile)e(*fptr,) g(LONGLONG)f(offset,)h(LONGLONG)g(nbytes,)f(void)i(*buffer\))0 1158 y Fi(8)81 b Fj(This)34 b(routine)g(forces)h(CFITSIO)f(to)h(rescan) g(the)g(curren)m(t)g(header)f(k)m(eyw)m(ords)h(that)g(de\014ne)f(the)h (structure)227 1271 y(of)f(the)f(HDU)h(\(suc)m(h)g(as)f(the)h(NAXIS)f (and)g(BITPIX)g(k)m(eyw)m(ords\))h(so)f(that)h(it)g(reinitializes)i (the)d(in)m(ternal)227 1384 y(bu\013ers)26 b(that)h(describ)s(e)g(the)g (HDU)g(structure.)39 b(This)26 b(routine)h(is)g(useful)f(for)g (reinitializing)j(the)e(structure)227 1497 y(of)34 b(an)f(HDU)h(if)f (an)m(y)h(of)g(the)f(required)g(k)m(eyw)m(ords)g(\(e.g.,)j(NAXISn\))d (ha)m(v)m(e)i(b)s(een)e(mo)s(di\014ed.)48 b(In)33 b(practice)227 1610 y(it)e(should)e(rarely)h(b)s(e)f(necessary)h(to)h(call)g(this)f (routine)g(b)s(ecause)f(CFITSIO)g(in)m(ternally)i(calls)g(it)f(in)g (most)227 1723 y(situations.)95 1987 y Fe(int)47 b(fits_set_hdustruc)c (/)48 b(ffrdef)286 2100 y(\(fitsfile)e(*fptr,)g(>)h(int)g(*status\))141 b(\(DEPRECATED\))0 2439 y Ff(9.3)135 b(Sp)t(ecialized)46 b(Header)g(Keyw)l(ord)f(Routines)0 2693 y Fd(9.3.1)112 b(Header)38 b(Information)h(Routines)0 2906 y Fi(1)81 b Fj(Reserv)m(e)29 b(space)g(in)e(the)i(CHU)f(for)g(MOREKEYS)f(more)h (header)g(k)m(eyw)m(ords.)41 b(This)27 b(routine)h(ma)m(y)h(b)s(e)f (called)227 3018 y(to)34 b(allo)s(cate)h(space)e(for)f(additional)i(k)m (eyw)m(ords)f(at)g(the)g(time)g(the)g(header)f(is)h(created)g(\(prior)g (to)g(writing)227 3131 y(an)m(y)h(data\).)51 b(CFITSIO)32 b(can)i(dynamically)g(add)f(more)g(space)h(to)g(the)g(header)f(when)f (needed,)j(ho)m(w)m(ev)m(er)227 3244 y(it)c(is)g(more)f(e\016cien)m(t)i (to)f(preallo)s(cate)h(the)f(required)f(space)h(if)f(the)g(size)i(is)e (kno)m(wn)g(in)g(adv)-5 b(ance.)95 3509 y Fe(int)47 b(fits_set_hdrsize) d(/)j(ffhdef)286 3621 y(\(fitsfile)f(*fptr,)g(int)h(morekeys,)e(>)i (int)g(*status\))0 3886 y Fi(2)81 b Fj(Return)26 b(the)h(n)m(um)m(b)s (er)e(of)j(k)m(eyw)m(ords)f(in)f(the)h(header)g(\(not)h(coun)m(ting)g (the)f(END)g(k)m(eyw)m(ord\))h(and)e(the)h(curren)m(t)227 3999 y(p)s(osition)34 b(in)g(the)g(header.)50 b(The)34 b(p)s(osition)f(is)h(the)g(n)m(um)m(b)s(er)f(of)h(the)g(k)m(eyw)m(ord)g (record)f(that)i(will)f(b)s(e)f(read)227 4112 y(next)k(\(or)g(one)f (greater)i(than)e(the)h(p)s(osition)f(of)h(the)g(last)g(k)m(eyw)m(ord)g (that)g(w)m(as)g(read\).)59 b(A)37 b(v)-5 b(alue)36 b(of)h(1)g(is)227 4224 y(returned)29 b(if)i(the)f(p)s(oin)m(ter)h(is)f(p)s(ositioned)h (at)g(the)f(b)s(eginning)g(of)g(the)h(header.)95 4489 y Fe(int)47 b(fits_get_hdrpos)d(/)j(ffghps)286 4602 y(\(fitsfile)f (*fptr,)g(>)h(int)g(*keysexist,)e(int)i(*keynum,)e(int)i(*status\))0 4897 y Fd(9.3.2)112 b(Read)38 b(and)h(W)-9 b(rite)36 b(the)h(Required)h(Keyw)m(ords)0 5110 y Fi(1)81 b Fj(W)-8 b(rite)34 b(the)f(required)g(extension)h(header)e(k)m(eyw)m(ords)i(in)m (to)g(the)f(CHU.)h(These)f(routines)g(are)g(not)g(required,)227 5223 y(and)g(instead)g(the)g(appropriate)g(header)g(ma)m(y)g(b)s(e)g (constructed)g(b)m(y)g(writing)g(eac)m(h)h(individual)e(k)m(eyw)m(ord) 227 5336 y(in)e(the)h(prop)s(er)e(sequence.)227 5488 y(The)21 b(simpler)g(\014ts)p 842 5488 28 4 v 33 w(write)p 1077 5488 V 33 w(imghdr)f(routine)i(is)f(equiv)-5 b(alen)m(t)23 b(to)f(calling)h(\014ts)p 2727 5488 V 32 w(write)p 2961 5488 V 33 w(grphdr)d(with)h(the)h(default)227 5601 y(v)-5 b(alues)37 b(of)f(simple)g(=)g(TR)m(UE,)g(p)s(coun)m(t)g(=)g(0,)i (gcoun)m(t)f(=)f(1,)i(and)e(extend)g(=)f(TR)m(UE.)i(The)e(PCOUNT,)227 5714 y(GCOUNT)43 b(and)g(EXTEND)g(k)m(eyw)m(ords)g(are)h(not)f (required)f(in)h(the)h(primary)e(header)h(and)f(are)i(only)p eop end %%Page: 98 106 TeXDict begin 98 105 bop 0 299 a Fj(98)1003 b Fh(CHAPTER)30 b(9.)112 b(SPECIALIZED)28 b(CFITSIO)h(INTERF)-10 b(A)m(CE)30 b(R)m(OUTINES)227 555 y Fj(written)38 b(if)f(p)s(coun)m(t)g(is)g(not)h (equal)f(to)i(zero,)h(gcoun)m(t)e(is)f(not)h(equal)g(to)g(zero)g(or)f (one,)j(and)c(if)i(extend)f(is)227 668 y(TR)m(UE,)k(resp)s(ectiv)m(ely) -8 b(.)74 b(When)41 b(writing)g(to)h(an)e(IMA)m(GE)i(extension,)i(the)e (SIMPLE)e(and)g(EXTEND)227 781 y(parameters)c(are)f(ignored.)56 b(It)35 b(is)g(recommended)g(that)h(\014ts)p 2342 781 28 4 v 32 w(create)p 2610 781 V 35 w(image)g(or)f(\014ts)p 3150 781 V 33 w(create)p 3419 781 V 34 w(tbl)g(b)s(e)g(used)227 894 y(instead)26 b(of)f(these)h(routines)g(to)g(write)f(the)h(required) e(header)i(k)m(eyw)m(ords.)39 b(The)25 b(general)h(\014ts)p 3377 894 V 33 w(write)p 3612 894 V 33 w(exthdr)227 1007 y(routine)31 b(ma)m(y)g(b)s(e)e(used)h(to)h(write)g(the)f(header)g(of)h (an)m(y)g(conforming)f(FITS)g(extension.)95 1252 y Fe(int)47 b(fits_write_imghdr)c(/)48 b(ffphps)286 1365 y(\(fitsfile)e(*fptr,)g (int)h(bitpix,)e(int)i(naxis,)f(long)h(*naxes,)f(>)h(int)g(*status\))95 1591 y(int)g(fits_write_imghdrll)c(/)k(ffphpsll)286 1704 y(\(fitsfile)f(*fptr,)g(int)h(bitpix,)e(int)i(naxis,)f(LONGLONG)g (*naxes,)g(>)h(int)g(*status\))95 1930 y(int)g(fits_write_grphdr)c(/)48 b(ffphpr)286 2042 y(\(fitsfile)e(*fptr,)g(int)h(simple,)e(int)i (bitpix,)f(int)h(naxis,)f(long)h(*naxes,)334 2155 y(LONGLONG)f(pcount,) f(LONGLONG)h(gcount,)g(int)h(extend,)f(>)h(int)g(*status\))95 2381 y(int)g(fits_write_grphdrll)c(/)k(ffphprll)286 2494 y(\(fitsfile)f(*fptr,)g(int)h(simple,)e(int)i(bitpix,)f(int)h(naxis,)f (LONGLONG)g(*naxes,)334 2607 y(LONGLONG)g(pcount,)f(LONGLONG)h(gcount,) g(int)h(extend,)f(>)h(int)g(*status\))95 2833 y(int)g (fits_write_exthdr)c(/ffphext)286 2946 y(\(fitsfile)j(*fptr,)g(char)g (*xtension,)f(int)i(bitpix,)f(int)h(naxis,)f(long)h(*naxes,)334 3059 y(LONGLONG)f(pcount,)f(LONGLONG)h(gcount,)g(>)h(int)g(*status\))0 3417 y Fi(2)81 b Fj(W)-8 b(rite)30 b(the)g(ASCI)s(I)d(table)k(header)e (k)m(eyw)m(ords)g(in)m(to)i(the)e(CHU.)h(The)e(optional)j(TUNITn)d(and) h(EXTNAME)227 3530 y(k)m(eyw)m(ords)f(are)h(written)e(only)h(if)g(the)g (input)f(p)s(oin)m(ters)h(are)g(not)g(n)m(ull.)40 b(A)27 b(n)m(ull)h(p)s(oin)m(ter)g(ma)m(y)g(giv)m(en)h(for)f(the)227 3643 y(*tb)s(col)37 b(parameter)g(in)f(whic)m(h)g(case)i(a)e(single)h (space)g(will)g(b)s(e)f(inserted)g(b)s(et)m(w)m(een)h(eac)m(h)g(column) f(of)h(the)227 3756 y(table.)57 b(Similarly)-8 b(,)37 b(if)f(ro)m(wlen)f(is)h(giv)m(en)g(=)f(0,)i(then)e(CFITSIO)f(will)i (calculate)h(the)f(default)f(ro)m(wlength)227 3868 y(based)30 b(on)h(the)f(tb)s(col)h(and)f(tt)m(yp)s(e)h(v)-5 b(alues.)95 4114 y Fe(int)47 b(fits_write_atblhdr)c(/)48 b(ffphtb)286 4227 y(\(fitsfile)e(*fptr,)g(LONGLONG)f(rowlen,)h(LONGLONG)g(nrows,)g (int)h(tfields,)e(char)i(**ttype,)334 4340 y(long)g(*tbcol,)f(char)g (**tform,)g(char)g(**tunit,)g(char)h(*extname,)e(>)i(int)g(*status\))0 4585 y Fi(3)81 b Fj(W)-8 b(rite)30 b(the)f(binary)g(table)h(header)e(k) m(eyw)m(ords)i(in)m(to)g(the)f(CHU.)g(The)g(optional)h(TUNITn)e(and)h (EXTNAME)227 4698 y(k)m(eyw)m(ords)35 b(are)g(written)g(only)g(if)f (the)h(input)f(p)s(oin)m(ters)g(are)h(not)g(n)m(ull.)53 b(The)35 b(p)s(coun)m(t)f(parameter,)i(whic)m(h)227 4811 y(sp)s(eci\014es)h(the)g(size)g(of)g(the)g(v)-5 b(ariable)38 b(length)f(arra)m(y)g(heap,)h(should)e(initially)i(=)f(0;)j(CFITSIO)c (will)h(au-)227 4924 y(tomatically)d(up)s(date)d(the)g(PCOUNT)f(k)m (eyw)m(ord)i(v)-5 b(alue)32 b(if)f(an)m(y)g(v)-5 b(ariable)32 b(length)g(arra)m(y)g(data)g(is)f(written)227 5036 y(to)g(the)e(heap.) 41 b(The)29 b(TF)m(ORM)g(k)m(eyw)m(ord)h(v)-5 b(alue)30 b(for)g(v)-5 b(ariable)30 b(length)g(v)m(ector)h(columns)e(should)g(ha) m(v)m(e)i(the)227 5149 y(form)c('Pt\(len\)')j(or)d('1Pt\(len\)')j (where)d(`t')h(is)g(the)g(data)g(t)m(yp)s(e)g(co)s(de)f(letter)i (\(A,I,J,E,D,)g(etc.\))42 b(and)27 b(`len')h(is)227 5262 y(an)g(in)m(teger)i(sp)s(ecifying)e(the)g(maxim)m(um)g(length)g(of)h (the)f(v)m(ectors)h(in)f(that)h(column)f(\(len)g(m)m(ust)g(b)s(e)g (greater)227 5375 y(than)36 b(or)g(equal)h(to)g(the)f(longest)i(v)m (ector)f(in)f(the)h(column\).)58 b(If)36 b(`len')g(is)h(not)f(sp)s (eci\014ed)g(when)f(the)h(table)227 5488 y(is)c(created)g(\(e.g.,)h (the)f(input)e(TF)m(ORMn)h(v)-5 b(alue)32 b(is)f(just)g('1Pt'\))i(then) e(CFITSIO)f(will)h(scan)h(the)f(column)227 5601 y(when)f(the)h(table)h (is)f(\014rst)f(closed)h(and)g(will)g(app)s(end)e(the)i(maxim)m(um)g (length)g(to)g(the)g(TF)m(ORM)g(k)m(eyw)m(ord)227 5714 y(v)-5 b(alue.)41 b(Note)30 b(that)f(if)f(the)h(table)g(is)g(subsequen) m(tly)f(mo)s(di\014ed)f(to)j(increase)f(the)g(maxim)m(um)f(length)h(of) g(the)p eop end %%Page: 99 107 TeXDict begin 99 106 bop 0 299 a Fh(9.3.)72 b(SPECIALIZED)29 b(HEADER)i(KEYW)m(ORD)g(R)m(OUTINES)1510 b Fj(99)227 555 y(v)m(ectors)39 b(then)e(the)g(mo)s(difying)g(program)g(is)g(resp)s (onsible)g(for)g(also)h(up)s(dating)e(the)i(TF)m(ORM)f(k)m(eyw)m(ord) 227 668 y(v)-5 b(alue.)95 935 y Fe(int)47 b(fits_write_btblhdr)c(/)48 b(ffphbn)286 1048 y(\(fitsfile)e(*fptr,)g(LONGLONG)f(nrows,)h(int)h (tfields,)f(char)g(**ttype,)334 1161 y(char)h(**tform,)e(char)i (**tunit,)e(char)i(*extname,)e(LONGLONG)h(pcount,)g(>)h(int)g (*status\))0 1427 y Fi(4)81 b Fj(Read)30 b(the)h(required)e(k)m(eyw)m (ords)i(from)f(the)h(CHDU)f(\(image)j(or)d(table\).)42 b(When)30 b(reading)h(from)f(an)g(IMA)m(GE)227 1540 y(extension)24 b(the)g(SIMPLE)e(and)h(EXTEND)g(parameters)h(are)f(ignored.)39 b(A)23 b(n)m(ull)g(p)s(oin)m(ter)h(ma)m(y)g(b)s(e)e(supplied)227 1653 y(for)30 b(an)m(y)h(of)g(the)f(returned)f(parameters)i(that)g(are) g(not)f(needed.)95 1920 y Fe(int)47 b(fits_read_imghdr)d(/)j(ffghpr)286 2033 y(\(fitsfile)f(*fptr,)g(int)h(maxdim,)e(>)j(int)f(*simple,)e(int)i (*bitpix,)f(int)h(*naxis,)334 2146 y(long)g(*naxes,)f(long)g(*pcount,)g (long)g(*gcount,)g(int)h(*extend,)e(int)i(*status\))95 2372 y(int)g(fits_read_imghdrll)c(/)48 b(ffghprll)286 2485 y(\(fitsfile)e(*fptr,)g(int)h(maxdim,)e(>)j(int)f(*simple,)e(int)i (*bitpix,)f(int)h(*naxis,)334 2598 y(LONGLONG)f(*naxes,)f(long)i (*pcount,)f(long)g(*gcount,)g(int)h(*extend,)e(int)i(*status\))95 2823 y(int)g(fits_read_atblhdr)c(/)48 b(ffghtb)286 2936 y(\(fitsfile)e(*fptr,int)f(maxdim,)h(>)h(long)g(*rowlen,)e(long)i (*nrows,)334 3049 y(int)g(*tfields,)e(char)i(**ttype,)e(LONGLONG)h (*tbcol,)g(char)g(**tform,)g(char)h(**tunit,)334 3162 y(char)g(*extname,)93 b(int)47 b(*status\))95 3388 y(int)g (fits_read_atblhdrll)c(/)k(ffghtbll)286 3501 y(\(fitsfile)f(*fptr,int)f (maxdim,)h(>)h(LONGLONG)f(*rowlen,)f(LONGLONG)h(*nrows,)334 3614 y(int)h(*tfields,)e(char)i(**ttype,)e(long)i(*tbcol,)f(char)h (**tform,)e(char)i(**tunit,)334 3727 y(char)g(*extname,)93 b(int)47 b(*status\))95 3952 y(int)g(fits_read_btblhdr)c(/)48 b(ffghbn)286 4065 y(\(fitsfile)e(*fptr,)g(int)h(maxdim,)e(>)j(long)f (*nrows,)e(int)i(*tfields,)334 4178 y(char)g(**ttype,)e(char)i (**tform,)e(char)i(**tunit,)f(char)g(*extname,)334 4291 y(long)h(*pcount,)e(int)i(*status\))95 4517 y(int)g (fits_read_btblhdrll)c(/)k(ffghbnll)286 4630 y(\(fitsfile)f(*fptr,)g (int)h(maxdim,)e(>)j(LONGLONG)d(*nrows,)h(int)h(*tfields,)334 4743 y(char)g(**ttype,)e(char)i(**tform,)e(char)i(**tunit,)f(char)g (*extname,)334 4856 y(long)h(*pcount,)e(int)i(*status\))0 5155 y Fd(9.3.3)112 b(W)-9 b(rite)37 b(Keyw)m(ord)g(Routines)0 5375 y Fj(These)32 b(routines)h(simply)f(app)s(end)f(a)h(new)g(k)m(eyw) m(ord)h(to)h(the)e(header)h(and)f(do)g(not)h(c)m(hec)m(k)h(to)f(see)g (if)g(a)f(k)m(eyw)m(ord)0 5488 y(with)d(the)g(same)h(name)f(already)h (exists.)41 b(In)28 b(general)i(it)g(is)f(preferable)g(to)h(use)f(the)h (\014ts)p 3009 5488 28 4 v 32 w(up)s(date)p 3317 5488 V 32 w(k)m(ey)g(routine)f(to)0 5601 y(ensure)34 b(that)h(the)g(same)g (k)m(eyw)m(ord)g(is)f(not)h(written)g(more)g(than)f(once)h(to)h(the)e (header.)54 b(See)34 b(App)s(endix)f(B)i(for)0 5714 y(the)c (de\014nition)f(of)g(the)h(parameters)f(used)g(in)g(these)h(routines.)p eop end %%Page: 100 108 TeXDict begin 100 107 bop 0 299 a Fj(100)958 b Fh(CHAPTER)30 b(9.)112 b(SPECIALIZED)28 b(CFITSIO)h(INTERF)-10 b(A)m(CE)30 b(R)m(OUTINES)0 555 y Fi(1)81 b Fj(W)-8 b(rite)30 b(\(app)s(end\))f(a)g (new)g(k)m(eyw)m(ord)h(of)g(the)f(appropriate)g(data)h(t)m(yp)s(e)g(in) m(to)g(the)g(CHU.)f(A)h(n)m(ull)f(p)s(oin)m(ter)g(ma)m(y)227 668 y(b)s(e)35 b(en)m(tered)h(for)f(the)h(commen)m(t)h(parameter,)g (whic)m(h)e(will)h(cause)g(the)g(commen)m(t)g(\014eld)f(of)h(the)f(k)m (eyw)m(ord)227 781 y(to)43 b(b)s(e)e(left)i(blank.)76 b(The)41 b(\015t,)k(dbl,)f(cmp,)h(and)d(dblcmp)f(v)m(ersions)h(of)g (this)g(routine)g(ha)m(v)m(e)h(the)g(added)227 894 y(feature)33 b(that)g(if)g(the)f('decimals')i(parameter)f(is)g(negativ)m(e,)i(then)d (the)h('G')g(displa)m(y)g(format)g(rather)f(then)227 1007 y(the)i('E')f(format)h(will)f(b)s(e)g(used)f(when)g(constructing)i (the)g(k)m(eyw)m(ord)f(v)-5 b(alue,)35 b(taking)f(the)g(absolute)f(v)-5 b(alue)227 1120 y(of)34 b('decimals')h(for)e(the)h(precision.)51 b(This)33 b(will)h(suppress)d(trailing)k(zeros,)g(and)e(will)h(use)g(a) g(\014xed)f(format)227 1233 y(rather)e(than)f(an)g(exp)s(onen)m(tial)h (format,)g(dep)s(ending)e(on)h(the)h(magnitude)f(of)h(the)g(v)-5 b(alue.)95 1478 y Fe(int)47 b(fits_write_key_str)c(/)48 b(ffpkys)286 1591 y(\(fitsfile)e(*fptr,)g(char)g(*keyname,)g(char)g (*value,)g(char)h(*comment,)334 1704 y(>)h(int)e(*status\))95 1930 y(int)h(fits_write_key_[log,)c(lng])j(/)95 b(ffpky[lj])286 2042 y(\(fitsfile)46 b(*fptr,)g(char)g(*keyname,)g(DTYPE)g(numval,)g (char)g(*comment,)334 2155 y(>)i(int)e(*status\))95 2381 y(int)h(fits_write_key_[flt,)c(dbl,)j(fixflg,)g(fixdbl])g(/)h (ffpky[edfg])286 2494 y(\(fitsfile)f(*fptr,)g(char)g(*keyname,)g(DTYPE) g(numval,)g(int)h(decimals,)286 2607 y(char)g(*comment,)e(>)j(int)f (*status\))95 2833 y(int)g(fits_write_key_[cmp,)c(dblcmp,)i(fixcmp,)h (fixdblcmp])f(/)j(ffpk[yc,ym,fc,fm])286 2946 y(\(fitsfile)e(*fptr,)g (char)g(*keyname,)g(DTYPE)g(*numval,)g(int)g(decimals,)286 3059 y(char)h(*comment,)e(>)j(int)f(*status\))0 3304 y Fi(2)81 b Fj(W)-8 b(rite)30 b(\(app)s(end\))e(a)i(string)f(v)-5 b(alued)29 b(k)m(eyw)m(ord)h(in)m(to)g(the)f(CHU)h(whic)m(h)e(ma)m(y)i (b)s(e)f(longer)h(than)e(68)i(c)m(haracters)227 3417 y(in)43 b(length.)80 b(This)42 b(uses)h(the)g(Long)h(String)e(Keyw)m (ord)h(con)m(v)m(en)m(tion)j(that)d(is)h(describ)s(ed)e(in)h(the`Lo)s (cal)227 3530 y(FITS)38 b(Con)m(v)m(en)m(tions')i(section)g(in)f (Chapter)f(4.)66 b(Since)38 b(this)h(uses)f(a)h(non-standard)f(FITS)g (con)m(v)m(en)m(tion)227 3643 y(to)45 b(enco)s(de)f(the)g(long)h(k)m (eyw)m(ord)f(string,)k(programs)43 b(whic)m(h)h(use)g(this)g(routine)g (should)f(also)h(call)i(the)227 3756 y(\014ts)p 354 3756 28 4 v 33 w(write)p 589 3756 V 33 w(k)m(ey)p 755 3756 V 33 w(longw)m(arn)26 b(routine)f(to)h(add)f(some)h(COMMENT)f(k)m(eyw)m (ords)g(to)h(w)m(arn)f(users)g(of)g(the)h(FITS)227 3868 y(\014le)43 b(that)h(this)e(con)m(v)m(en)m(tion)j(is)e(b)s(eing)f (used.)78 b(The)42 b(\014ts)p 2220 3868 V 32 w(write)p 2454 3868 V 33 w(k)m(ey)p 2620 3868 V 34 w(longw)m(arn)h(routine)g (also)h(writes)f(a)227 3981 y(k)m(eyw)m(ord)29 b(called)g(LONGSTRN)e (to)i(record)f(the)g(v)m(ersion)h(of)f(the)g(longstring)h(con)m(v)m(en) m(tion)h(that)f(has)f(b)s(een)227 4094 y(used,)35 b(in)f(case)i(a)f (new)e(con)m(v)m(en)m(tion)k(is)e(adopted)f(at)h(some)g(p)s(oin)m(t)f (in)h(the)f(future.)52 b(If)34 b(the)h(LONGSTRN)227 4207 y(k)m(eyw)m(ord)43 b(is)g(already)g(presen)m(t)g(in)g(the)f(header,)k (then)d(\014ts)p 2332 4207 V 32 w(write)p 2566 4207 V 33 w(k)m(ey)p 2732 4207 V 34 w(longw)m(arn)g(will)g(simply)f(return)227 4320 y(without)31 b(doing)f(an)m(ything.)95 4565 y Fe(int)47 b(fits_write_key_longstr)42 b(/)48 b(ffpkls)286 4678 y(\(fitsfile)e(*fptr,)g(char)g(*keyname,)g(char)g(*longstr,)g(char)g (*comment,)334 4791 y(>)i(int)e(*status\))95 5017 y(int)h (fits_write_key_longwarn)42 b(/)47 b(ffplsw)286 5130 y(\(fitsfile)f(*fptr,)g(>)h(int)g(*status\))0 5375 y Fi(3)81 b Fj(W)-8 b(rite)38 b(\(app)s(end\))d(a)i(n)m(um)m(b)s(ered)e (sequence)i(of)g(k)m(eyw)m(ords)g(in)m(to)g(the)g(CHU.)g(The)f (starting)h(index)f(n)m(um)m(b)s(er)227 5488 y(\(nstart\))30 b(m)m(ust)e(b)s(e)g(greater)i(than)f(0.)40 b(One)28 b(ma)m(y)i(app)s (end)d(the)h(same)i(commen)m(t)f(to)h(ev)m(ery)f(k)m(eyw)m(ord)g(\(and) 227 5601 y(eliminate)35 b(the)f(need)f(to)h(ha)m(v)m(e)g(an)f(arra)m(y) h(of)f(iden)m(tical)j(commen)m(t)e(strings,)g(one)f(for)h(eac)m(h)g(k)m (eyw)m(ord\))g(b)m(y)227 5714 y(including)24 b(the)h(amp)s(ersand)e(c)m (haracter)j(as)e(the)h(last)g(non-blank)f(c)m(haracter)i(in)e(the)g (\(\014rst\))h(COMMENTS)p eop end %%Page: 101 109 TeXDict begin 101 108 bop 0 299 a Fh(9.3.)72 b(SPECIALIZED)29 b(HEADER)i(KEYW)m(ORD)g(R)m(OUTINES)1465 b Fj(101)227 555 y(string)23 b(parameter.)38 b(This)22 b(same)h(string)f(will)h (then)f(b)s(e)g(used)f(for)h(the)h(commen)m(t)g(\014eld)f(in)g(all)i (the)e(k)m(eyw)m(ords.)227 668 y(One)32 b(ma)m(y)h(also)g(en)m(ter)f(a) h(n)m(ull)f(p)s(oin)m(ter)g(for)g(the)g(commen)m(t)h(parameter)g(to)f (lea)m(v)m(e)j(the)d(commen)m(t)h(\014eld)f(of)227 781 y(the)f(k)m(eyw)m(ord)g(blank.)95 995 y Fe(int)47 b (fits_write_keys_str)c(/)k(ffpkns)286 1107 y(\(fitsfile)f(*fptr,)g (char)g(*keyroot,)g(int)h(nstart,)e(int)i(nkeys,)334 1220 y(char)g(**value,)e(char)i(**comment,)e(>)i(int)g(*status\))95 1446 y(int)g(fits_write_keys_[log,)42 b(lng])47 b(/)g(ffpkn[lj])286 1559 y(\(fitsfile)f(*fptr,)g(char)g(*keyroot,)g(int)h(nstart,)e(int)i (nkeys,)334 1672 y(DTYPE)f(*numval,)g(char)h(**comment,)e(int)i (*status\))95 1898 y(int)g(fits_write_keys_[flt,)42 b(dbl,)47 b(fixflg,)f(fixdbl])g(/)h(ffpkne[edfg])286 2011 y(\(fitsfile)f(*fptr,)g (char)g(*keyroot,)g(int)h(nstart,)e(int)i(nkey,)334 2124 y(DTYPE)f(*numval,)g(int)h(decimals,)e(char)i(**comment,)e(>)i(int)g (*status\))0 2337 y Fi(4)81 b Fj(Cop)m(y)21 b(an)h(indexed)f(k)m(eyw)m (ord)i(from)e(one)h(HDU)h(to)f(another,)i(mo)s(difying)e(the)g(index)f (n)m(um)m(b)s(er)f(of)i(the)g(k)m(eyw)m(ord)227 2450 y(name)37 b(in)f(the)g(pro)s(cess.)58 b(F)-8 b(or)37 b(example,)i(this)d(routine)h(could)f(read)g(the)h(TLMIN3)f(k)m(eyw)m (ord)h(from)f(the)227 2563 y(input)30 b(HDU)h(\(b)m(y)g(giving)h(k)m (eyro)s(ot)f(=)g(`TLMIN')g(and)f(inn)m(um)f(=)h(3\))i(and)e(write)h(it) g(to)g(the)g(output)f(HDU)227 2676 y(with)36 b(the)g(k)m(eyw)m(ord)h (name)f(TLMIN4)g(\(b)m(y)g(setting)i(outn)m(um)d(=)h(4\).)58 b(If)36 b(the)g(input)f(k)m(eyw)m(ord)i(do)s(es)f(not)227 2789 y(exist,)c(then)e(this)g(routine)g(simply)g(returns)f(without)i (indicating)g(an)f(error.)95 3002 y Fe(int)47 b(fits_copy_key)e(/)i (ffcpky)286 3115 y(\(fitsfile)f(*infptr,)f(fitsfile)h(*outfptr,)f(int)i (innum,)f(int)h(outnum,)334 3228 y(char)g(*keyroot,)e(>)i(int)g (*status\))0 3442 y Fi(5)81 b Fj(W)-8 b(rite)30 b(\(app)s(end\))f(a)h (`triple)f(precision')h(k)m(eyw)m(ord)g(in)m(to)g(the)g(CHU)f(in)g (F28.16)j(format.)41 b(The)29 b(\015oating)h(p)s(oin)m(t)227 3555 y(k)m(eyw)m(ord)g(v)-5 b(alue)30 b(is)f(constructed)h(b)m(y)f (concatenating)j(the)d(input)g(in)m(teger)i(v)-5 b(alue)29 b(with)g(the)h(input)e(double)227 3668 y(precision)35 b(fraction)f(v)-5 b(alue)35 b(\(whic)m(h)f(m)m(ust)g(ha)m(v)m(e)i(a)e (v)-5 b(alue)35 b(b)s(et)m(w)m(een)f(0.0)i(and)d(1.0\).)53 b(The)34 b(\013gkyt)h(routine)227 3781 y(should)d(b)s(e)h(used)f(to)i (read)f(this)g(k)m(eyw)m(ord)h(v)-5 b(alue,)35 b(b)s(ecause)e(the)g (other)h(k)m(eyw)m(ord)f(reading)h(routines)f(will)227 3893 y(not)e(preserv)m(e)f(the)h(full)f(precision)h(of)f(the)h(v)-5 b(alue.)95 4107 y Fe(int)47 b(fits_write_key_triple)42 b(/)48 b(ffpkyt)286 4220 y(\(fitsfile)e(*fptr,)g(char)g(*keyname,)g (long)g(intval,)g(double)g(frac,)334 4333 y(char)h(*comment,)e(>)i(int) g(*status\))0 4546 y Fi(6)81 b Fj(W)-8 b(rite)37 b(k)m(eyw)m(ords)f(to) h(the)f(CHDU)g(that)h(are)f(de\014ned)f(in)h(an)g(ASCI)s(I)e(template)j (\014le.)58 b(The)35 b(format)i(of)f(the)227 4659 y(template)c(\014le)f (is)f(describ)s(ed)f(under)g(the)i(\014ts)p 1788 4659 28 4 v 32 w(parse)p 2028 4659 V 33 w(template)g(routine.)95 4873 y Fe(int)47 b(fits_write_key_template)42 b(/)47 b(ffpktp)286 4986 y(\(fitsfile)f(*fptr,)g(const)g(char)h(*filename,)e (>)i(int)g(*status\))0 5269 y Fd(9.3.4)112 b(Insert)38 b(Keyw)m(ord)f(Routines)0 5488 y Fj(These)42 b(insert)h(routines)f(are) h(somewhat)g(less)f(e\016cien)m(t)i(than)f(the)f(`up)s(date')g(or)h (`write')g(k)m(eyw)m(ord)g(routines)0 5601 y(b)s(ecause)30 b(the)g(follo)m(wing)i(k)m(eyw)m(ords)e(in)g(the)g(header)g(m)m(ust)g (b)s(e)f(shifted)h(do)m(wn)f(to)i(mak)m(e)g(ro)s(om)f(for)g(the)g (inserted)0 5714 y(k)m(eyw)m(ord.)41 b(See)31 b(App)s(endix)d(B)j(for)f (the)h(de\014nition)f(of)g(the)h(parameters)g(used)e(in)h(these)h (routines.)p eop end %%Page: 102 110 TeXDict begin 102 109 bop 0 299 a Fj(102)958 b Fh(CHAPTER)30 b(9.)112 b(SPECIALIZED)28 b(CFITSIO)h(INTERF)-10 b(A)m(CE)30 b(R)m(OUTINES)0 555 y Fi(1)81 b Fj(Insert)26 b(a)h(new)f(k)m(eyw)m(ord) h(record)g(in)m(to)g(the)g(CHU)g(at)g(the)g(sp)s(eci\014ed)f(p)s (osition)h(\(i.e.,)i(immediately)f(preceding)227 668 y(the)j(\(k)m(eyn)m(um\)th)g(k)m(eyw)m(ord)g(in)f(the)g(header.\))95 921 y Fe(int)47 b(fits_insert_record)c(/)48 b(ffirec)286 1034 y(\(fitsfile)e(*fptr,)g(int)h(keynum,)e(char)i(*card,)f(>)i(int)f (*status\))0 1286 y Fi(2)81 b Fj(Insert)24 b(a)h(new)g(k)m(eyw)m(ord)g (in)m(to)h(the)f(CHU.)g(The)g(new)f(k)m(eyw)m(ord)i(is)f(inserted)f (immediately)j(follo)m(wing)f(the)f(last)227 1399 y(k)m(eyw)m(ord)i (that)f(has)f(b)s(een)h(read)f(from)h(the)g(header.)39 b(The)25 b(`longstr')i(v)m(ersion)f(has)f(the)h(same)g(functionalit)m (y)227 1512 y(as)33 b(the)g(`str')f(v)m(ersion)h(except)h(that)f(it)g (also)g(supp)s(orts)e(the)h(lo)s(cal)i(long)f(string)g(k)m(eyw)m(ord)g (con)m(v)m(en)m(tion)h(for)227 1625 y(strings)29 b(longer)g(than)g(68)h (c)m(haracters.)41 b(A)29 b(n)m(ull)g(p)s(oin)m(ter)g(ma)m(y)g(b)s(e)g (en)m(tered)g(for)g(the)g(commen)m(t)g(parameter)227 1738 y(whic)m(h)d(will)f(cause)h(the)g(commen)m(t)h(\014eld)e(to)h(b)s (e)f(left)h(blank.)39 b(The)25 b(\015t,)h(dbl,)g(cmp,)h(and)e(dblcmp)f (v)m(ersions)i(of)227 1851 y(this)k(routine)g(ha)m(v)m(e)h(the)e(added) g(feature)i(that)f(if)g(the)g('decimals')h(parameter)f(is)g(negativ)m (e,)i(then)d(the)h('G')227 1964 y(displa)m(y)g(format)g(rather)f(then)g (the)h('E')f(format)h(will)g(b)s(e)f(used)f(when)h(constructing)h(the)f (k)m(eyw)m(ord)h(v)-5 b(alue,)227 2077 y(taking)27 b(the)g(absolute)g (v)-5 b(alue)26 b(of)h('decimals')g(for)f(the)h(precision.)39 b(This)26 b(will)g(suppress)e(trailing)k(zeros,)g(and)227 2189 y(will)37 b(use)g(a)g(\014xed)f(format)h(rather)g(than)f(an)h(exp) s(onen)m(tial)g(format,)i(dep)s(ending)c(on)i(the)g(magnitude)g(of)227 2302 y(the)31 b(v)-5 b(alue.)95 2555 y Fe(int)47 b(fits_insert_card)d (/)j(ffikey)286 2668 y(\(fitsfile)f(*fptr,)g(char)g(*card,)g(>)i(int)f (*status\))95 2894 y(int)g(fits_insert_key_[str,)42 b(longstr])k(/)h (ffi[kys,)f(kls])286 3007 y(\(fitsfile)g(*fptr,)g(char)g(*keyname,)g (char)g(*value,)g(char)h(*comment,)334 3120 y(>)h(int)e(*status\))95 3345 y(int)h(fits_insert_key_[log,)42 b(lng])47 b(/)g(ffiky[lj])286 3458 y(\(fitsfile)f(*fptr,)g(char)g(*keyname,)g(DTYPE)g(numval,)g(char) g(*comment,)334 3571 y(>)i(int)e(*status\))95 3797 y(int)h (fits_insert_key_[flt,)42 b(fixflt,)k(dbl,)h(fixdbl])f(/)h(ffiky[edfg]) 286 3910 y(\(fitsfile)f(*fptr,)g(char)g(*keyname,)g(DTYPE)g(numval,)g (int)h(decimals,)334 4023 y(char)g(*comment,)e(>)i(int)g(*status\))95 4249 y(int)g(fits_insert_key_[cmp,)42 b(dblcmp,)k(fixcmp,)g(fixdblcmp]) f(/)i(ffik[yc,ym,fc,fm])286 4362 y(\(fitsfile)f(*fptr,)g(char)g (*keyname,)g(DTYPE)g(*numval,)g(int)g(decimals,)334 4474 y(char)h(*comment,)e(>)i(int)g(*status\))0 4727 y Fi(3)81 b Fj(Insert)32 b(a)i(new)f(k)m(eyw)m(ord)h(with)f(an)h(unde\014ned,)e (or)h(n)m(ull,)h(v)-5 b(alue)34 b(in)m(to)h(the)e(CHU.)h(The)f(v)-5 b(alue)34 b(string)f(of)h(the)227 4840 y(k)m(eyw)m(ord)d(is)g(left)g (blank)f(in)g(this)g(case.)95 5093 y Fe(int)47 b(fits_insert_key_null)c (/)k(ffikyu)286 5205 y(\(fitsfile)f(*fptr,)g(char)g(*keyname,)g(char)g (*comment,)g(>)h(int)g(*status\))0 5495 y Fd(9.3.5)112 b(Read)38 b(Keyw)m(ord)g(Routines)0 5714 y Fj(Wild)31 b(card)f(c)m(haracters)i(ma)m(y)f(b)s(e)f(used)f(when)h(sp)s(ecifying)g (the)g(name)h(of)f(the)h(k)m(eyw)m(ord)g(to)g(b)s(e)f(read.)p eop end %%Page: 103 111 TeXDict begin 103 110 bop 0 299 a Fh(9.3.)72 b(SPECIALIZED)29 b(HEADER)i(KEYW)m(ORD)g(R)m(OUTINES)1465 b Fj(103)0 555 y Fi(1)81 b Fj(Read)43 b(a)h(k)m(eyw)m(ord)g(v)-5 b(alue)43 b(\(with)h(the)f(appropriate)h(data)g(t)m(yp)s(e\))g(and)e(commen)m(t)j (from)e(the)g(CHU.)h(If)f(a)227 668 y(NULL)32 b(commen)m(t)h(p)s(oin)m (ter)f(is)h(giv)m(en)g(on)f(input,)f(then)h(the)g(commen)m(t)i(string)e (will)g(not)g(b)s(e)g(returned.)44 b(If)227 781 y(the)32 b(v)-5 b(alue)33 b(of)f(the)g(k)m(eyw)m(ord)g(is)g(not)h(de\014ned)d (\(i.e.,)k(the)e(v)-5 b(alue)33 b(\014eld)e(is)h(blank\))g(then)g(an)g (error)f(status)h(=)227 894 y(V)-10 b(ALUE)p 545 894 28 4 v 33 w(UNDEFINED)29 b(will)f(b)s(e)g(returned)e(and)h(the)h(input) f(v)-5 b(alue)28 b(will)h(not)f(b)s(e)f(c)m(hanged)h(\(except)h(that) 227 1007 y(\013gkys)i(will)g(reset)g(the)f(v)-5 b(alue)31 b(to)g(a)g(n)m(ull)f(string\).)95 1252 y Fe(int)47 b(fits_read_key_str) c(/)48 b(ffgkys)286 1365 y(\(fitsfile)e(*fptr,)g(char)g(*keyname,)g(>)h (char)g(*value,)f(char)g(*comment,)334 1478 y(int)h(*status\);)95 1704 y(NOTE:)g(after)f(calling)g(the)h(following)e(routine,)h(programs) f(must)i(explicitly)e(free)382 1817 y(the)i(memory)f(allocated)f(for)i ('longstr')e(after)i(it)g(is)g(no)g(longer)f(needed)g(or)382 1930 y(call)g(fits_free_memory.)95 2155 y(int)h(fits_read_key_longstr) 42 b(/)48 b(ffgkls)286 2268 y(\(fitsfile)e(*fptr,)g(char)g(*keyname,)g (>)h(char)g(**longstr,)e(char)h(*comment,)620 2381 y(int)h(*status\))95 2607 y(int)g(fits_free_memory)d(/)j(fffree)286 2720 y(\(char)g (*longstr,)e(int)i(*status\);)95 2946 y(int)g(fits_read_key_[log,)c (lng,)k(flt,)f(dbl,)h(cmp,)f(dblcmp])g(/)i(ffgky[ljedcm])286 3059 y(\(fitsfile)e(*fptr,)g(char)g(*keyname,)g(>)h(DTYPE)f(*numval,)g (char)h(*comment,)334 3172 y(int)g(*status\))95 3397 y(int)g(fits_read_key_lnglng)c(/)k(ffgkyjj)286 3510 y(\(fitsfile)f (*fptr,)g(char)g(*keyname,)g(>)h(LONGLONG)f(*numval,)f(char)i (*comment,)334 3623 y(int)g(*status\))0 3868 y Fi(2)81 b Fj(Read)36 b(a)h(sequence)f(of)h(indexed)e(k)m(eyw)m(ord)i(v)-5 b(alues)37 b(\(e.g.,)i(NAXIS1,)g(NAXIS2,)f(...\).)59 b(The)36 b(input)f(starting)227 3981 y(index)j(n)m(um)m(b)s(er)e (\(nstart\))j(m)m(ust)f(b)s(e)f(greater)i(than)e(0.)64 b(If)37 b(the)h(v)-5 b(alue)38 b(of)g(an)m(y)h(of)f(the)g(k)m(eyw)m (ords)g(is)g(not)227 4094 y(de\014ned)c(\(i.e.,)j(the)e(v)-5 b(alue)35 b(\014eld)f(is)h(blank\))g(then)f(an)g(error)h(status)g(=)f (V)-10 b(ALUE)p 3009 4094 V 33 w(UNDEFINED)36 b(will)f(b)s(e)227 4207 y(returned)21 b(and)h(the)h(input)e(v)-5 b(alue)23 b(for)f(the)g(unde\014ned)e(k)m(eyw)m(ord\(s\))k(will)e(not)h(b)s(e)e (c)m(hanged.)39 b(These)22 b(routines)227 4320 y(do)j(not)h(supp)s(ort) d(wild)i(card)h(c)m(haracters)g(in)f(the)h(ro)s(ot)f(name.)39 b(If)25 b(there)h(are)f(no)g(indexed)g(k)m(eyw)m(ords)h(in)f(the)227 4433 y(header)35 b(with)f(the)h(input)e(ro)s(ot)i(name)g(then)f(these)h (routines)g(do)f(not)h(return)e(a)i(non-zero)h(status)e(v)-5 b(alue)227 4546 y(and)30 b(instead)h(simply)f(return)f(nfound)f(=)i(0.) 95 4791 y Fe(int)47 b(fits_read_keys_str)c(/)48 b(ffgkns)286 4904 y(\(fitsfile)e(*fptr,)g(char)g(*keyname,)g(int)h(nstart,)e(int)i (nkeys,)334 5017 y(>)h(char)e(**value,)g(int)h(*nfound,)93 b(int)47 b(*status\))95 5243 y(int)g(fits_read_keys_[log,)c(lng,)j (flt,)h(dbl])g(/)g(ffgkn[ljed])286 5356 y(\(fitsfile)f(*fptr,)g(char)g (*keyname,)g(int)h(nstart,)e(int)i(nkeys,)334 5469 y(>)h(DTYPE)e (*numval,)f(int)i(*nfound,)f(int)h(*status\))0 5714 y Fi(3)81 b Fj(Read)37 b(the)h(v)-5 b(alue)38 b(of)g(a)g(\015oating)g(p)s (oin)m(t)g(k)m(eyw)m(ord,)i(returning)d(the)h(in)m(teger)h(and)e (fractional)i(parts)e(of)h(the)p eop end %%Page: 104 112 TeXDict begin 104 111 bop 0 299 a Fj(104)958 b Fh(CHAPTER)30 b(9.)112 b(SPECIALIZED)28 b(CFITSIO)h(INTERF)-10 b(A)m(CE)30 b(R)m(OUTINES)227 555 y Fj(v)-5 b(alue)35 b(in)e(separate)i(routine)f (argumen)m(ts.)52 b(This)33 b(routine)h(ma)m(y)g(b)s(e)f(used)h(to)g (read)g(an)m(y)g(k)m(eyw)m(ord)h(but)e(is)227 668 y(esp)s(ecially)f (useful)d(for)i(reading)f(the)h('triple)g(precision')f(k)m(eyw)m(ords)h (written)g(b)m(y)f(\013pkyt.)95 929 y Fe(int)47 b(fits_read_key_triple) c(/)k(ffgkyt)286 1042 y(\(fitsfile)f(*fptr,)g(char)g(*keyname,)g(>)h (long)g(*intval,)e(double)h(*frac,)334 1155 y(char)h(*comment,)e(int)i (*status\))0 1446 y Fd(9.3.6)112 b(Mo)s(dify)39 b(Keyw)m(ord)e (Routines)0 1666 y Fj(These)31 b(routines)h(mo)s(dify)f(the)h(v)-5 b(alue)32 b(of)g(an)g(existing)g(k)m(eyw)m(ord.)46 b(An)31 b(error)g(is)h(returned)e(if)i(the)g(k)m(eyw)m(ord)g(do)s(es)0 1778 y(not)43 b(exist.)77 b(Wild)43 b(card)g(c)m(haracters)h(ma)m(y)f (b)s(e)f(used)f(when)h(sp)s(ecifying)g(the)h(name)f(of)h(the)f(k)m(eyw) m(ord)h(to)h(b)s(e)0 1891 y(mo)s(di\014ed.)c(See)30 b(App)s(endix)f(B)i (for)f(the)g(de\014nition)g(of)h(the)f(parameters)h(used)f(in)g(these)h (routines.)0 2152 y Fi(1)81 b Fj(Mo)s(dify)30 b(\(o)m(v)m(erwrite\))i (the)f(n)m(th)f(80-c)m(haracter)j(header)d(record)h(in)f(the)g(CHU.)95 2413 y Fe(int)47 b(fits_modify_record)c(/)48 b(ffmrec)286 2526 y(\(fitsfile)e(*fptr,)g(int)h(keynum,)e(char)i(*card,)f(>)i(int)f (*status\))0 2786 y Fi(2)81 b Fj(Mo)s(dify)37 b(\(o)m(v)m(erwrite\))j (the)e(80-c)m(haracter)j(header)c(record)h(for)f(the)h(named)f(k)m(eyw) m(ord)h(in)g(the)g(CHU.)g(This)227 2899 y(can)31 b(b)s(e)f(used)f(to)i (o)m(v)m(erwrite)h(the)f(name)f(of)h(the)f(k)m(eyw)m(ord)h(as)g(w)m (ell)g(as)g(its)g(v)-5 b(alue)30 b(and)g(commen)m(t)i(\014elds.)95 3160 y Fe(int)47 b(fits_modify_card)d(/)j(ffmcrd)286 3273 y(\(fitsfile)f(*fptr,)g(char)g(*keyname,)g(char)g(*card,)g(>)i (int)f(*status\))0 3534 y Fi(5)81 b Fj(Mo)s(dify)30 b(the)g(v)-5 b(alue)31 b(and)e(commen)m(t)i(\014elds)f(of)g(an)g(existing)h(k)m(eyw) m(ord)g(in)f(the)g(CHU.)h(The)e(`longstr')i(v)m(ersion)227 3647 y(has)41 b(the)h(same)f(functionalit)m(y)i(as)e(the)h(`str')f(v)m (ersion)h(except)g(that)g(it)g(also)g(supp)s(orts)d(the)j(lo)s(cal)g (long)227 3760 y(string)29 b(k)m(eyw)m(ord)h(con)m(v)m(en)m(tion)h(for) e(strings)f(longer)i(than)f(68)h(c)m(haracters.)41 b(Optionally)-8 b(,)31 b(one)e(ma)m(y)h(mo)s(dify)227 3872 y(only)e(the)g(v)-5 b(alue)28 b(\014eld)g(and)f(lea)m(v)m(e)j(the)e(commen)m(t)h(\014eld)e (unc)m(hanged)h(b)m(y)g(setting)g(the)g(input)f(COMMENT)227 3985 y(parameter)c(equal)h(to)f(the)g(amp)s(ersand)e(c)m(haracter)j (\(&\))f(or)g(b)m(y)g(en)m(tering)g(a)g(n)m(ull)g(p)s(oin)m(ter)g(for)f (the)h(commen)m(t)227 4098 y(parameter.)40 b(The)24 b(\015t,)i(dbl,)g (cmp,)f(and)g(dblcmp)e(v)m(ersions)j(of)f(this)g(routine)g(ha)m(v)m(e)h (the)f(added)f(feature)h(that)227 4211 y(if)h(the)h('decimals')g (parameter)g(is)f(negativ)m(e,)k(then)c(the)g('G')h(displa)m(y)f (format)h(rather)f(then)g(the)g('E')h(format)227 4324 y(will)i(b)s(e)f(used)f(when)h(constructing)h(the)f(k)m(eyw)m(ord)h(v) -5 b(alue,)30 b(taking)f(the)g(absolute)g(v)-5 b(alue)29 b(of)f('decimals')i(for)227 4437 y(the)37 b(precision.)60 b(This)35 b(will)i(suppress)e(trailing)i(zeros,)i(and)d(will)h(use)g(a) g(\014xed)e(format)i(rather)g(than)f(an)227 4550 y(exp)s(onen)m(tial)c (format,)f(dep)s(ending)d(on)j(the)f(magnitude)h(of)f(the)h(v)-5 b(alue.)95 4811 y Fe(int)47 b(fits_modify_key_[str,)42 b(longstr])k(/)h(ffm[kys,)f(kls])286 4924 y(\(fitsfile)g(*fptr,)g(char) g(*keyname,)g(char)g(*value,)g(char)h(*comment,)334 5036 y(>)h(int)e(*status\);)95 5262 y(int)h(fits_modify_key_[log,)42 b(lng])47 b(/)g(ffmky[lj])286 5375 y(\(fitsfile)f(*fptr,)g(char)g (*keyname,)g(DTYPE)g(numval,)g(char)g(*comment,)334 5488 y(>)i(int)e(*status\))95 5714 y(int)h(fits_modify_key_[flt,)42 b(dbl,)47 b(fixflt,)f(fixdbl])g(/)h(ffmky[edfg])p eop end %%Page: 105 113 TeXDict begin 105 112 bop 0 299 a Fh(9.3.)72 b(SPECIALIZED)29 b(HEADER)i(KEYW)m(ORD)g(R)m(OUTINES)1465 b Fj(105)286 555 y Fe(\(fitsfile)46 b(*fptr,)g(char)g(*keyname,)g(DTYPE)g(numval,)g (int)h(decimals,)334 668 y(char)g(*comment,)e(>)i(int)g(*status\))95 894 y(int)g(fits_modify_key_[cmp,)42 b(dblcmp,)k(fixcmp,)g(fixdblcmp])f (/)i(ffmk[yc,ym,fc,fm])286 1007 y(\(fitsfile)f(*fptr,)g(char)g (*keyname,)g(DTYPE)g(*numval,)g(int)g(decimals,)334 1120 y(char)h(*comment,)e(>)i(int)g(*status\))0 1431 y Fi(6)81 b Fj(Mo)s(dify)22 b(the)g(v)-5 b(alue)23 b(of)f(an)g(existing)i(k)m (eyw)m(ord)e(to)h(b)s(e)f(unde\014ned,)g(or)g(n)m(ull.)38 b(The)22 b(v)-5 b(alue)22 b(string)h(of)f(the)g(k)m(eyw)m(ord)227 1544 y(is)30 b(set)h(to)g(blank.)40 b(Optionally)-8 b(,)31 b(one)f(ma)m(y)h(lea)m(v)m(e)h(the)f(commen)m(t)g(\014eld)e(unc)m (hanged)h(b)m(y)g(setting)h(the)f(input)227 1657 y(COMMENT)f(parameter) g(equal)g(to)g(the)g(amp)s(ersand)e(c)m(haracter)k(\(&\))e(or)f(b)m(y)h (en)m(tering)g(a)g(n)m(ull)g(p)s(oin)m(ter.)95 1968 y Fe(int)47 b(fits_modify_key_null)c(/)k(ffmkyu)286 2081 y(\(fitsfile)f(*fptr,)g(char)g(*keyname,)g(char)g(*comment,)g(>)h(int)g (*status\))0 2433 y Fd(9.3.7)112 b(Up)s(date)39 b(Keyw)m(ord)e (Routines)0 2680 y Fi(1)81 b Fj(These)29 b(up)s(date)g(routines)h(mo)s (dify)f(the)g(v)-5 b(alue,)31 b(and)e(optionally)i(the)f(commen)m(t)h (\014eld,)f(of)g(the)g(k)m(eyw)m(ord)g(if)f(it)227 2793 y(already)34 b(exists,)g(otherwise)f(the)g(new)f(k)m(eyw)m(ord)h(is)f (app)s(ended)f(to)j(the)f(header.)47 b(A)33 b(separate)g(routine)g(is) 227 2906 y(pro)m(vided)c(for)g(eac)m(h)h(k)m(eyw)m(ord)f(data)h(t)m(yp) s(e.)41 b(The)28 b(`longstr')i(v)m(ersion)g(has)e(the)i(same)f (functionalit)m(y)h(as)g(the)227 3019 y(`str')h(v)m(ersion)g(except)h (that)g(it)f(also)h(supp)s(orts)c(the)j(lo)s(cal)h(long)g(string)e(k)m (eyw)m(ord)i(con)m(v)m(en)m(tion)h(for)d(strings)227 3132 y(longer)i(than)f(68)h(c)m(haracters.)45 b(A)31 b(n)m(ull)g(p)s(oin)m(ter)h(ma)m(y)f(b)s(e)g(en)m(tered)h(for)f(the)g (commen)m(t)i(parameter)e(whic)m(h)227 3245 y(will)i(lea)m(v)m(e)h(the) f(commen)m(t)g(\014eld)f(unc)m(hanged)g(or)g(blank.)46 b(The)31 b(\015t,)i(dbl,)f(cmp,)h(and)e(dblcmp)g(v)m(ersions)i(of)227 3357 y(this)d(routine)g(ha)m(v)m(e)h(the)e(added)g(feature)i(that)f(if) g(the)g('decimals')h(parameter)f(is)g(negativ)m(e,)i(then)d(the)h('G') 227 3470 y(displa)m(y)g(format)g(rather)f(then)g(the)h('E')f(format)h (will)g(b)s(e)f(used)f(when)h(constructing)h(the)f(k)m(eyw)m(ord)h(v)-5 b(alue,)227 3583 y(taking)27 b(the)g(absolute)g(v)-5 b(alue)26 b(of)h('decimals')g(for)f(the)h(precision.)39 b(This)26 b(will)g(suppress)e(trailing)k(zeros,)g(and)227 3696 y(will)37 b(use)g(a)g(\014xed)f(format)h(rather)g(than)f(an)h(exp) s(onen)m(tial)g(format,)i(dep)s(ending)c(on)i(the)g(magnitude)g(of)227 3809 y(the)31 b(v)-5 b(alue.)95 4121 y Fe(int)47 b (fits_update_key_[str,)42 b(longstr])k(/)h(ffu[kys,)f(kls])286 4233 y(\(fitsfile)g(*fptr,)g(char)g(*keyname,)g(char)g(*value,)g(char)h (*comment,)334 4346 y(>)h(int)e(*status\))95 4572 y(int)h (fits_update_key_[log,)42 b(lng])47 b(/)g(ffuky[lj])286 4685 y(\(fitsfile)f(*fptr,)g(char)g(*keyname,)g(DTYPE)g(numval,)g(char) g(*comment,)334 4798 y(>)i(int)e(*status\))95 5024 y(int)h (fits_update_key_[flt,)42 b(dbl,)47 b(fixflt,)f(fixdbl])g(/)h (ffuky[edfg])286 5137 y(\(fitsfile)f(*fptr,)g(char)g(*keyname,)g(DTYPE) g(numval,)g(int)h(decimals,)334 5250 y(char)g(*comment,)e(>)i(int)g (*status\))95 5475 y(int)g(fits_update_key_[cmp,)42 b(dblcmp,)k (fixcmp,)g(fixdblcmp])f(/)i(ffuk[yc,ym,fc,fm])286 5588 y(\(fitsfile)f(*fptr,)g(char)g(*keyname,)g(DTYPE)g(*numval,)g(int)g (decimals,)334 5701 y(char)h(*comment,)e(>)i(int)g(*status\))p eop end %%Page: 106 114 TeXDict begin 106 113 bop 0 299 a Fj(106)958 b Fh(CHAPTER)30 b(9.)112 b(SPECIALIZED)28 b(CFITSIO)h(INTERF)-10 b(A)m(CE)30 b(R)m(OUTINES)0 555 y Ff(9.4)135 b(De\014ne)45 b(Data)h(Scaling)g(and)e (Unde\014ned)h(Pixel)h(P)l(arameters)0 805 y Fj(These)37 b(routines)g(set)h(or)f(mo)s(dify)g(the)g(in)m(ternal)h(parameters)g (used)e(b)m(y)i(CFITSIO)d(to)j(either)g(scale)h(the)e(data)0 918 y(or)f(to)h(represen)m(t)f(unde\014ned)d(pixels.)58 b(Generally)37 b(CFITSIO)d(will)j(scale)g(the)f(data)h(according)g(to)f (the)h(v)-5 b(alues)0 1031 y(of)35 b(the)f(BSCALE)g(and)g(BZER)m(O)h (\(or)g(TSCALn)d(and)i(TZER)m(On\))g(k)m(eyw)m(ords,)i(ho)m(w)m(ev)m (er)g(these)f(routines)f(ma)m(y)0 1144 y(b)s(e)e(used)h(to)h(o)m(v)m (erride)g(the)f(k)m(eyw)m(ord)h(v)-5 b(alues.)49 b(This)32 b(ma)m(y)i(b)s(e)f(useful)f(when)g(one)i(w)m(an)m(ts)f(to)h(read)f(or)g (write)h(the)0 1257 y(ra)m(w)e(unscaled)g(v)-5 b(alues)33 b(in)f(the)g(FITS)f(\014le.)47 b(Similarly)-8 b(,)33 b(CFITSIO)e(generally)i(uses)f(the)g(v)-5 b(alue)33 b(of)f(the)h(BLANK) 0 1370 y(or)40 b(TNULLn)f(k)m(eyw)m(ord)h(to)h(signify)e(an)h (unde\014ned)e(pixel,)43 b(but)c(these)h(routines)g(ma)m(y)g(b)s(e)f (used)g(to)i(o)m(v)m(erride)0 1483 y(this)32 b(v)-5 b(alue.)48 b(These)32 b(routines)g(do)h(not)f(create)i(or)f(mo)s(dify)e(the)i (corresp)s(onding)e(header)i(k)m(eyw)m(ord)f(v)-5 b(alues.)48 b(See)0 1596 y(App)s(endix)29 b(B)h(for)h(the)f(de\014nition)g(of)h (the)f(parameters)h(used)e(in)i(these)f(routines.)0 1827 y Fi(1)81 b Fj(Reset)26 b(the)g(scaling)g(factors)g(in)f(the)h(primary) f(arra)m(y)h(or)f(image)i(extension;)h(do)s(es)d(not)g(c)m(hange)i(the) f(BSCALE)227 1940 y(and)i(BZER)m(O)g(k)m(eyw)m(ord)h(v)-5 b(alues)28 b(and)g(only)g(a\013ects)i(the)e(automatic)j(scaling)e(p)s (erformed)e(when)g(the)h(data)227 2053 y(elemen)m(ts)f(are)f (written/read)g(to/from)g(the)g(FITS)f(\014le.)39 b(When)25 b(reading)h(from)f(a)h(FITS)f(\014le)g(the)h(returned)227 2166 y(data)i(v)-5 b(alue)28 b(=)f(\(the)h(v)-5 b(alue)28 b(giv)m(en)h(in)e(the)g(FITS)g(arra)m(y\))h(*)g(BSCALE)f(+)g(BZER)m(O.) g(The)g(in)m(v)m(erse)i(form)m(ula)227 2279 y(is)i(used)e(when)h (writing)g(data)h(v)-5 b(alues)31 b(to)g(the)f(FITS)g(\014le.)95 2511 y Fe(int)47 b(fits_set_bscale)d(/)j(ffpscl)286 2624 y(\(fitsfile)f(*fptr,)g(double)g(scale,)g(double)g(zero,)g(>)i(int)f (*status\))0 2856 y Fi(2)81 b Fj(Reset)39 b(the)f(scaling)i(parameters) e(for)h(a)f(table)h(column;)k(do)s(es)38 b(not)g(c)m(hange)i(the)e (TSCALn)f(or)h(TZER)m(On)227 2968 y(k)m(eyw)m(ord)29 b(v)-5 b(alues)29 b(and)e(only)i(a\013ects)g(the)g(automatic)h(scaling) f(p)s(erformed)e(when)g(the)i(data)g(elemen)m(ts)h(are)227 3081 y(written/read)i(to/from)g(the)g(FITS)f(\014le.)44 b(When)31 b(reading)g(from)g(a)h(FITS)f(\014le)g(the)h(returned)e(data) i(v)-5 b(alue)227 3194 y(=)25 b(\(the)i(v)-5 b(alue)26 b(giv)m(en)g(in)f(the)h(FITS)f(arra)m(y\))h(*)g(TSCAL)e(+)i(TZER)m(O.)e (The)h(in)m(v)m(erse)i(form)m(ula)f(is)f(used)g(when)227 3307 y(writing)31 b(data)g(v)-5 b(alues)30 b(to)i(the)e(FITS)g(\014le.) 95 3539 y Fe(int)47 b(fits_set_tscale)d(/)j(fftscl)286 3652 y(\(fitsfile)f(*fptr,)g(int)h(colnum,)e(double)i(scale,)f(double)g (zero,)334 3765 y(>)i(int)e(*status\))0 3997 y Fi(3)81 b Fj(De\014ne)36 b(the)g(in)m(teger)i(v)-5 b(alue)36 b(to)h(b)s(e)e(used)h(to)h(signify)f(unde\014ned)e(pixels)i(in)g(the)g (primary)f(arra)m(y)i(or)f(image)227 4109 y(extension.)54 b(This)34 b(is)g(only)h(used)f(if)g(BITPIX)g(=)h(8,)h(16,)g(or)f(32.)54 b(This)34 b(do)s(es)g(not)h(create)h(or)e(c)m(hange)i(the)227 4222 y(v)-5 b(alue)31 b(of)g(the)f(BLANK)h(k)m(eyw)m(ord)g(in)f(the)g (header.)95 4454 y Fe(int)47 b(fits_set_imgnull)d(/)j(ffpnul)286 4567 y(\(fitsfile)f(*fptr,)g(LONGLONG)f(nulval,)h(>)i(int)e(*status\))0 4799 y Fi(4)81 b Fj(De\014ne)36 b(the)g(string)g(to)g(b)s(e)f(used)g (to)i(signify)f(unde\014ned)e(pixels)i(in)f(a)h(column)g(in)g(an)f (ASCI)s(I)g(table.)58 b(This)227 4912 y(do)s(es)30 b(not)h(create)h(or) e(c)m(hange)i(the)e(v)-5 b(alue)31 b(of)g(the)f(TNULLn)g(k)m(eyw)m (ord.)95 5143 y Fe(int)47 b(fits_set_atblnull)c(/)48 b(ffsnul)286 5256 y(\(fitsfile)e(*fptr,)g(int)h(colnum,)e(char)i (*nulstr,)f(>)h(int)g(*status\))0 5488 y Fi(5)81 b Fj(De\014ne)34 b(the)h(v)-5 b(alue)34 b(to)h(b)s(e)f(used)g(to)h(signify)f (unde\014ned)e(pixels)j(in)f(an)g(in)m(teger)i(column)e(in)g(a)g (binary)g(table)227 5601 y(\(where)29 b(TF)m(ORMn)f(=)g('B',)i('I',)f (or)f('J'\).)i(This)d(do)s(es)i(not)f(create)j(or)d(c)m(hange)i(the)e (v)-5 b(alue)29 b(of)g(the)g(TNULLn)227 5714 y(k)m(eyw)m(ord.)p eop end %%Page: 107 115 TeXDict begin 107 114 bop 0 299 a Fh(9.5.)72 b(SPECIALIZED)29 b(FITS)g(PRIMAR)-8 b(Y)31 b(ARRA)-8 b(Y)32 b(OR)d(IMA)m(GE)j(EXTENSION) d(I/O)h(R)m(OUTINES)80 b Fj(107)95 555 y Fe(int)47 b(fits_set_btblnull) c(/)48 b(fftnul)286 668 y(\(fitsfile)e(*fptr,)g(int)h(colnum,)e (LONGLONG)h(nulval,)g(>)h(int)g(*status\))0 995 y Ff(9.5)135 b(Sp)t(ecialized)61 b(FITS)e(Primary)i(Arra)l(y)f(or)h(IMA)l(GE)e (Extension)j(I/O)306 1144 y(Routines)0 1394 y Fj(These)27 b(routines)h(read)f(or)h(write)g(data)g(v)-5 b(alues)28 b(in)g(the)f(primary)g(data)h(arra)m(y)h(\(i.e.,)g(the)f(\014rst)f(HDU) i(in)e(the)h(FITS)0 1507 y(\014le\))37 b(or)g(an)f(IMA)m(GE)h (extension.)60 b(Automatic)39 b(data)e(t)m(yp)s(e)g(con)m(v)m(ersion)g (is)g(p)s(erformed)e(for)h(if)h(the)g(data)g(t)m(yp)s(e)0 1620 y(of)c(the)g(FITS)f(arra)m(y)h(\(as)g(de\014ned)f(b)m(y)g(the)h (BITPIX)g(k)m(eyw)m(ord\))g(di\013ers)g(from)f(the)h(data)g(t)m(yp)s(e) g(of)g(the)g(arra)m(y)g(in)0 1733 y(the)c(calling)i(routine.)40 b(The)28 b(data)i(v)-5 b(alues)29 b(are)h(automatically)i(scaled)d(b)m (y)g(the)h(BSCALE)e(and)g(BZER)m(O)h(header)0 1846 y(v)-5 b(alues)25 b(as)h(they)f(are)g(b)s(eing)g(written)g(or)g(read)f(from)h (the)g(FITS)f(arra)m(y)-8 b(.)40 b(Unlik)m(e)26 b(the)f(basic)h (routines)e(describ)s(ed)g(in)0 1959 y(the)31 b(previous)g(c)m(hapter,) i(most)e(of)h(these)g(routines)f(sp)s(eci\014cally)h(supp)s(ort)d(the)j (FITS)e(random)h(groups)f(format.)0 2072 y(See)h(App)s(endix)d(B)j(for) f(the)h(de\014nition)f(of)g(the)h(parameters)g(used)e(in)h(these)h (routines.)0 2232 y(The)24 b(more)h(primitiv)m(e)h(reading)f(and)f (writing)h(routines)f(\(i.)40 b(e.,)26 b(\013ppr)p 2364 2232 28 4 v 32 w(,)g(\013ppn)p 2653 2232 V 31 w(,)g(\013ppn,)f(\013gp)m (v)p 3185 2232 V 33 w(,)h(or)f(\013gpf)p 3552 2232 V 32 w(\))g(simply)0 2345 y(treat)g(the)g(primary)e(arra)m(y)i(as)f(a)h (long)g(1-dimensional)g(arra)m(y)g(of)f(pixels,)i(ignoring)f(the)f(in)m (trinsic)h(dimensionalit)m(y)0 2458 y(of)30 b(the)g(arra)m(y)-8 b(.)42 b(When)30 b(dealing)h(with)e(a)i(2D)g(image,)g(for)f(example,)h (the)f(application)i(program)e(m)m(ust)g(calculate)0 2571 y(the)i(pixel)g(o\013set)g(in)f(the)h(1-D)h(arra)m(y)f(that)g (corresp)s(onds)e(to)i(an)m(y)g(particular)g(X,)g(Y)f(co)s(ordinate)i (in)e(the)g(image.)0 2684 y(C)25 b(programmers)h(should)f(note)h(that)g (the)h(ordering)e(of)h(arra)m(ys)g(in)g(FITS)f(\014les,)i(and)e(hence)h (in)g(all)g(the)g(CFITSIO)0 2797 y(calls,)40 b(is)d(more)g(similar)h (to)f(the)h(dimensionalit)m(y)g(of)f(arra)m(ys)g(in)g(F)-8 b(ortran)38 b(rather)f(than)f(C.)h(F)-8 b(or)38 b(instance)g(if)f(a)0 2910 y(FITS)28 b(image)i(has)e(NAXIS1)h(=)f(100)i(and)e(NAXIS2)h(=)f (50,)i(then)e(a)h(2-D)h(arra)m(y)f(just)f(large)i(enough)e(to)i(hold)e (the)0 3022 y(image)k(should)d(b)s(e)h(declared)h(as)f(arra)m (y[50][100])k(and)c(not)h(as)f(arra)m(y[100][50].)0 3183 y(F)-8 b(or)30 b(con)m(v)m(enience,)i(higher-lev)m(el)g(routines)d(are) h(also)h(pro)m(vided)e(to)h(sp)s(eci\014cally)h(deal)f(with)f(2D)i (images)f(\(\013p2d)p 3872 3183 V 0 3296 a(and)c(\013g2d)p 372 3296 V 33 w(\))h(and)f(3D)i(data)f(cub)s(es)f(\(\013p3d)p 1467 3296 V 59 w(and)g(\013g3d)p 1893 3296 V 33 w(\).)40 b(The)26 b(dimensionalit)m(y)i(of)f(the)g(FITS)f(image)i(is)e(passed)0 3408 y(b)m(y)36 b(the)h(naxis1,)h(naxis2,)h(and)d(naxis3)h(parameters)f (and)g(the)h(declared)f(dimensions)g(of)h(the)f(program)g(arra)m(y)0 3521 y(are)30 b(passed)g(in)f(the)h(dim1)g(and)f(dim2)h(parameters.)41 b(Note)31 b(that)f(the)g(dimensions)f(of)h(the)g(program)g(arra)m(y)g (ma)m(y)0 3634 y(b)s(e)35 b(larger)h(than)f(the)h(dimensions)f(of)h (the)g(FITS)e(arra)m(y)-8 b(.)58 b(F)-8 b(or)36 b(example)g(if)g(a)g (FITS)e(image)j(with)e(NAXIS1)h(=)0 3747 y(NAXIS2)g(=)g(400)h(is)f (read)g(in)m(to)h(a)g(program)f(arra)m(y)g(whic)m(h)g(is)g(dimensioned) f(as)i(512)g(x)f(512)h(pixels,)h(then)e(the)0 3860 y(image)g(will)f (just)f(\014ll)g(the)h(lo)m(w)m(er)h(left)f(corner)f(of)h(the)g(arra)m (y)g(with)f(pixels)h(in)f(the)h(range)g(1)g(-)g(400)g(in)g(the)f(X)h (an)0 3973 y(Y)g(directions.)54 b(This)34 b(has)h(the)g(e\013ect)h(of)f (taking)g(a)h(con)m(tiguous)f(set)h(of)f(pixel)g(v)-5 b(alue)35 b(in)f(the)h(FITS)f(arra)m(y)i(and)0 4086 y(writing)30 b(them)g(to)h(a)f(non-con)m(tiguous)h(arra)m(y)g(in)e(program)h(memory) g(\(i.e.,)i(there)e(are)h(no)m(w)f(some)g(blank)g(pixels)0 4199 y(around)f(the)i(edge)g(of)g(the)f(image)i(in)e(the)g(program)g (arra)m(y\).)0 4359 y(The)k(most)i(general)f(set)h(of)f(routines)f (\(\013pss)p 1560 4359 V 33 w(,)i(\013gsv)p 1836 4359 V 33 w(,)g(and)e(\013gsf)p 2273 4359 V 33 w(\))h(ma)m(y)h(b)s(e)e(used) g(to)h(transfer)g(a)g(rectangular)0 4472 y(subset)27 b(of)h(the)g(pixels)f(in)h(a)g(FITS)f(N-dimensional)h(image)h(to)f(or)g (from)f(an)g(arra)m(y)i(whic)m(h)e(has)g(b)s(een)g(declared)h(in)0 4585 y(the)h(calling)h(program.)40 b(The)28 b(fpixel)h(and)f(lpixel)h (parameters)g(are)g(in)m(teger)h(arra)m(ys)f(whic)m(h)f(sp)s(ecify)g (the)h(starting)0 4698 y(and)k(ending)f(pixel)i(co)s(ordinate)g(in)f (eac)m(h)h(dimension)f(\(starting)h(with)f(1,)h(not)g(0\))g(of)f(the)g (FITS)g(image)h(that)g(is)0 4811 y(to)f(b)s(e)e(read)g(or)h(written.)45 b(It)32 b(is)g(imp)s(ortan)m(t)g(to)h(note)f(that)h(these)f(are)g(the)g (starting)h(and)e(ending)g(pixels)h(in)g(the)0 4924 y(FITS)i(image,)k (not)d(in)f(the)h(declared)h(arra)m(y)f(in)f(the)h(program.)54 b(The)35 b(arra)m(y)g(parameter)g(in)g(these)g(routines)g(is)0 5036 y(treated)f(simply)e(as)h(a)f(large)i(one-dimensional)g(arra)m(y)f (of)f(the)h(appropriate)g(data)g(t)m(yp)s(e)g(con)m(taining)h(the)f (pixel)0 5149 y(v)-5 b(alues;)37 b(The)d(pixel)h(v)-5 b(alues)35 b(in)g(the)f(FITS)g(arra)m(y)h(are)g(read/written)g(from/to) h(this)e(program)h(arra)m(y)g(in)f(strict)0 5262 y(sequence)d(without)f (an)m(y)h(gaps;)g(it)g(is)f(up)f(to)j(the)e(calling)i(routine)e(to)i (correctly)f(in)m(terpret)g(the)g(dimensionalit)m(y)0 5375 y(of)d(this)f(arra)m(y)-8 b(.)41 b(The)27 b(t)m(w)m(o)i(FITS)e (reading)h(routines)f(\(\013gsv)p 2018 5375 V 61 w(and)g(\013gsf)p 2415 5375 V 61 w(\))h(also)g(ha)m(v)m(e)h(an)f(`inc')g(parameter)g (whic)m(h)0 5488 y(de\014nes)33 b(the)h(data)h(sampling)f(in)m(terv)-5 b(al)36 b(in)d(eac)m(h)j(dimension)d(of)h(the)h(FITS)e(arra)m(y)-8 b(.)53 b(F)-8 b(or)35 b(example,)h(if)e(inc[0]=2)0 5601 y(and)i(inc[1]=3)j(when)d(reading)h(a)g(2-dimensional)h(FITS)e(image,) 41 b(then)36 b(only)h(ev)m(ery)h(other)f(pixel)h(in)e(the)i(\014rst)0 5714 y(dimension)30 b(and)g(ev)m(ery)h(3rd)f(pixel)g(in)g(the)h(second) f(dimension)g(will)h(b)s(e)f(returned)f(to)i(the)f('arra)m(y')i (parameter.)p eop end %%Page: 108 116 TeXDict begin 108 115 bop 0 299 a Fj(108)958 b Fh(CHAPTER)30 b(9.)112 b(SPECIALIZED)28 b(CFITSIO)h(INTERF)-10 b(A)m(CE)30 b(R)m(OUTINES)0 555 y Fj(Tw)m(o)f(t)m(yp)s(es)h(of)f(routines)g(are)h (pro)m(vided)e(to)i(read)f(the)h(data)g(arra)m(y)f(whic)m(h)g(di\013er) g(in)g(the)h(w)m(a)m(y)g(unde\014ned)d(pixels)0 668 y(are)38 b(handled.)60 b(The)37 b(\014rst)g(t)m(yp)s(e)g(of)g(routines)h (\(e.g.,)i(\013gp)m(v)p 2059 668 28 4 v 34 w(\))d(simply)g(return)f(an) h(arra)m(y)h(of)g(data)g(elemen)m(ts)g(in)0 781 y(whic)m(h)30 b(unde\014ned)f(pixels)h(are)h(set)g(equal)g(to)h(a)f(v)-5 b(alue)31 b(sp)s(eci\014ed)e(b)m(y)i(the)g(user)e(in)i(the)f(`n)m(ulv) -5 b(al')32 b(parameter.)41 b(An)0 894 y(additional)30 b(feature)f(of)g(these)h(routines)e(is)h(that)h(if)f(the)g(user)f(sets) h(n)m(ulv)-5 b(al)29 b(=)g(0,)h(then)e(no)h(c)m(hec)m(ks)h(for)f (unde\014ned)0 1007 y(pixels)c(will)g(b)s(e)g(p)s(erformed,)f(th)m(us)h (reducing)f(the)h(amoun)m(t)h(of)f(CPU)f(pro)s(cessing.)39 b(The)24 b(second)h(t)m(yp)s(e)g(of)g(routines)0 1120 y(\(e.g.,)36 b(\013gpf)p 413 1120 V 32 w(\))e(returns)e(the)i(data)g (elemen)m(t)g(arra)m(y)g(and,)g(in)f(addition,)h(a)g(c)m(har)g(arra)m (y)f(that)h(indicates)h(whether)0 1233 y(the)f(v)-5 b(alue)34 b(of)g(the)f(corresp)s(onding)g(data)h(pixel)g(is)g(unde\014ned)d(\(=)j (1\))g(or)g(de\014ned)e(\(=)i(0\).)51 b(The)33 b(latter)i(t)m(yp)s(e)f (of)0 1346 y(routines)d(ma)m(y)h(b)s(e)e(more)i(con)m(v)m(enien)m(t)h (to)f(use)f(in)g(some)g(circumstances,)i(ho)m(w)m(ev)m(er,)g(it)e (requires)g(an)g(additional)0 1458 y(arra)m(y)g(of)f(logical)j(v)-5 b(alues)31 b(whic)m(h)f(can)h(b)s(e)e(un)m(wieldy)h(when)g(w)m(orking)g (with)g(large)i(data)f(arra)m(ys.)0 1732 y Fi(1)81 b Fj(W)-8 b(rite)31 b(elemen)m(ts)h(in)m(to)f(the)g(FITS)f(data)h(arra)m (y)-8 b(.)95 2005 y Fe(int)47 b(fits_write_img)d(/)k(ffppr)286 2117 y(\(fitsfile)e(*fptr,)g(int)h(datatype,)e(LONGLONG)g(firstelem,)g (LONGLONG)h(nelements,)334 2230 y(DTYPE)g(*array,)g(int)h(*status\);)95 2456 y(int)g(fits_write_img_[byt,)c(sht,)j(usht,)h(int,)f(uint,)h(lng,) f(ulng,)h(lnglng,)e(flt,)i(dbl])g(/)286 2569 y (ffppr[b,i,ui,k,uk,j,uj,jj,)o(e,d)o(])286 2682 y(\(fitsfile)f(*fptr,)g (long)g(group,)g(LONGLONG)g(firstelem,)f(LONGLONG)h(nelements,)334 2795 y(DTYPE)g(*array,)g(>)i(int)f(*status\);)95 3021 y(int)g(fits_write_imgnull)c(/)48 b(ffppn)286 3134 y(\(fitsfile)e (*fptr,)g(int)h(datatype,)e(LONGLONG)g(firstelem,)g(LONGLONG)h (nelements,)334 3247 y(DTYPE)g(*array,)g(DTYPE)h(*nulval,)e(>)j(int)f (*status\);)95 3472 y(int)g(fits_write_imgnull_[byt,)42 b(sht,)k(usht,)h(int,)f(uint,)h(lng,)f(ulng,)h(lnglng,)e(flt,)i(dbl])g (/)286 3585 y(ffppn[b,i,ui,k,uk,j,uj,jj,)o(e,d)o(])286 3698 y(\(fitsfile)f(*fptr,)g(long)g(group,)g(LONGLONG)g(firstelem,)525 3811 y(LONGLONG)g(nelements,)f(DTYPE)h(*array,)g(DTYPE)g(nulval,)g(>)h (int)g(*status\);)0 4084 y Fi(2)81 b Fj(Set)30 b(data)h(arra)m(y)g (elemen)m(ts)h(as)e(unde\014ned.)95 4357 y Fe(int)47 b(fits_write_img_null)c(/)k(ffppru)286 4470 y(\(fitsfile)f(*fptr,)g (long)g(group,)g(LONGLONG)g(firstelem,)f(LONGLONG)h(nelements,)334 4583 y(>)i(int)e(*status\))0 4856 y Fi(3)81 b Fj(W)-8 b(rite)32 b(v)-5 b(alues)30 b(in)m(to)i(group)e(parameters.)42 b(This)30 b(routine)g(only)h(applies)g(to)g(the)g(`Random)f(Group)s (ed')g(FITS)227 4969 y(format)22 b(whic)m(h)f(has)g(b)s(een)f(used)h (for)g(applications)h(in)f(radio)h(in)m(terferometry)-8 b(,)25 b(but)20 b(is)h(o\016cially)i(deprecated)227 5082 y(for)30 b(future)g(use.)95 5355 y Fe(int)47 b(fits_write_grppar_[byt,) 42 b(sht,)k(usht,)h(int,)f(uint,)h(lng,)f(ulng,)h(lnglng,)f(flt,)g (dbl])h(/)286 5468 y(ffpgp[b,i,ui,k,uk,j,uj,jj,)o(e,d)o(])286 5581 y(\(fitsfile)f(*fptr,)g(long)g(group,)g(long)h(firstelem,)e(long)i (nelements,)334 5694 y(>)h(DTYPE)e(*array,)g(int)h(*status\))p eop end %%Page: 109 117 TeXDict begin 109 116 bop 0 299 a Fh(9.5.)72 b(SPECIALIZED)29 b(FITS)g(PRIMAR)-8 b(Y)31 b(ARRA)-8 b(Y)32 b(OR)d(IMA)m(GE)j(EXTENSION) d(I/O)h(R)m(OUTINES)80 b Fj(109)0 555 y Fi(4)h Fj(W)-8 b(rite)31 b(a)g(2-D)h(or)e(3-D)h(image)h(in)m(to)f(the)g(data)g(arra)m (y)-8 b(.)95 776 y Fe(int)47 b(fits_write_2d_[byt,)c(sht,)k(usht,)f (int,)h(uint,)f(lng,)h(ulng,)f(lnglng,)g(flt,)g(dbl])h(/)286 889 y(ffp2d[b,i,ui,k,uk,j,uj,jj,)o(e,d)o(])286 1002 y(\(fitsfile)f (*fptr,)g(long)g(group,)g(LONGLONG)g(dim1,)g(LONGLONG)g(naxis1,)334 1115 y(LONGLONG)g(naxis2,)f(DTYPE)i(*array,)f(>)h(int)g(*status\))95 1341 y(int)g(fits_write_3d_[byt,)c(sht,)k(usht,)f(int,)h(uint,)f(lng,)h (ulng,)f(lnglng,)g(flt,)g(dbl])h(/)286 1453 y (ffp3d[b,i,ui,k,uk,j,uj,jj,)o(e,d)o(])286 1566 y(\(fitsfile)f(*fptr,)g (long)g(group,)g(LONGLONG)g(dim1,)g(LONGLONG)g(dim2,)g(LONGLONG)g (naxis1,)334 1679 y(LONGLONG)g(naxis2,)f(LONGLONG)h(naxis3,)g(DTYPE)g (*array,)g(>)h(int)g(*status\))0 1900 y Fi(5)81 b Fj(W)-8 b(rite)31 b(an)g(arbitrary)f(data)h(subsection)f(in)m(to)i(the)e(data)h (arra)m(y)-8 b(.)95 2121 y Fe(int)47 b(fits_write_subset_[byt,)42 b(sht,)k(usht,)h(int,)f(uint,)h(lng,)f(ulng,)h(lnglng,)f(flt,)g(dbl])h (/)286 2234 y(ffpss[b,i,ui,k,uk,j,uj,jj,)o(e,d)o(])286 2347 y(\(fitsfile)f(*fptr,)g(long)g(group,)g(long)h(naxis,)f(long)h (*naxes,)334 2460 y(long)g(*fpixel,)e(long)i(*lpixel,)e(DTYPE)i (*array,)f(>)h(int)g(*status\))0 2680 y Fi(6)81 b Fj(Read)30 b(elemen)m(ts)i(from)e(the)g(FITS)g(data)h(arra)m(y)-8 b(.)95 2901 y Fe(int)47 b(fits_read_img)e(/)i(ffgpv)286 3014 y(\(fitsfile)f(*fptr,)g(int)94 b(datatype,)46 b(long)g(firstelem,) f(long)i(nelements,)334 3127 y(DTYPE)f(*nulval,)g(>)h(DTYPE)g(*array,)f (int)h(*anynul,)e(int)i(*status\))95 3353 y(int)g(fits_read_img_[byt,)c (sht,)k(usht,)f(int,)h(uint,)f(lng,)h(ulng,)f(lnglng,)g(flt,)g(dbl])h (/)286 3466 y(ffgpv[b,i,ui,k,uk,j,uj,jj,)o(e,d)o(])286 3579 y(\(fitsfile)f(*fptr,)g(long)g(group,)g(long)h(firstelem,)e(long)i (nelements,)334 3692 y(DTYPE)f(nulval,)g(>)i(DTYPE)e(*array,)g(int)h (*anynul,)e(int)i(*status\))95 3917 y(int)g(fits_read_imgnull)c(/)48 b(ffgpf)286 4030 y(\(fitsfile)e(*fptr,)g(int)94 b(datatype,)46 b(long)g(firstelem,)f(long)i(nelements,)334 4143 y(>)h(DTYPE)e(*array,) g(char)g(*nullarray,)f(int)i(*anynul,)f(int)g(*status\))95 4369 y(int)95 b(fits_read_imgnull_[byt,)42 b(sht,)k(usht,)h(int,)f (uint,)h(lng,)f(ulng,)h(flt,)f(dbl])h(/)334 4482 y (ffgpf[b,i,ui,k,uk,j,uj,jj)o(,e,)o(d])334 4595 y(\(fitsfile)e(*fptr,)h (long)h(group,)f(long)h(firstelem,)e(long)h(nelements,)334 4708 y(>)i(DTYPE)e(*array,)g(char)g(*nullarray,)f(int)i(*anynul,)f(int) g(*status\))0 4929 y Fi(7)81 b Fj(Read)29 b(v)-5 b(alues)31 b(from)e(group)g(parameters.)41 b(This)29 b(routine)g(only)h(applies)g (to)h(the)e(`Random)h(Group)s(ed')f(FITS)227 5041 y(format)22 b(whic)m(h)f(has)g(b)s(een)f(used)h(for)g(applications)h(in)f(radio)h (in)m(terferometry)-8 b(,)25 b(but)20 b(is)h(o\016cially)i(deprecated) 227 5154 y(for)30 b(future)g(use.)95 5375 y Fe(int)95 b(fits_read_grppar_[byt,)42 b(sht,)k(usht,)h(int,)f(uint,)h(lng,)f (ulng,)h(lnglng,)f(flt,)g(dbl])h(/)334 5488 y (ffggp[b,i,ui,k,uk,j,uj,jj)o(,e,)o(d])334 5601 y(\(fitsfile)e(*fptr,)h (long)h(group,)f(long)h(firstelem,)e(long)h(nelements,)334 5714 y(>)i(DTYPE)e(*array,)g(int)h(*status\))p eop end %%Page: 110 118 TeXDict begin 110 117 bop 0 299 a Fj(110)958 b Fh(CHAPTER)30 b(9.)112 b(SPECIALIZED)28 b(CFITSIO)h(INTERF)-10 b(A)m(CE)30 b(R)m(OUTINES)0 555 y Fi(8)81 b Fj(Read)37 b(2-D)h(or)g(3-D)g(image)g (from)f(the)g(data)h(arra)m(y)-8 b(.)62 b(Unde\014ned)36 b(pixels)i(in)e(the)i(arra)m(y)g(will)f(b)s(e)g(set)g(equal)227 668 y(to)32 b(the)g(v)-5 b(alue)31 b(of)h('n)m(ulv)-5 b(al',)32 b(unless)f(n)m(ulv)-5 b(al=0)31 b(in)g(whic)m(h)g(case)h(no)f (testing)i(for)e(unde\014ned)e(pixels)i(will)h(b)s(e)227 781 y(p)s(erformed.)95 1049 y Fe(int)95 b(fits_read_2d_[byt,)43 b(sht,)k(usht,)f(int,)h(uint,)f(lng,)h(ulng,)f(lnglng,)g(flt,)g(dbl])h (/)334 1162 y(ffg2d[b,i,ui,k,uk,j,uj,jj)o(,e,)o(d])334 1275 y(\(fitsfile)e(*fptr,)h(long)h(group,)f(DTYPE)h(nulval,)e (LONGLONG)h(dim1,)g(LONGLONG)g(naxis1,)334 1387 y(LONGLONG)g(naxis2,)f (>)j(DTYPE)e(*array,)g(int)h(*anynul,)f(int)g(*status\))95 1613 y(int)95 b(fits_read_3d_[byt,)43 b(sht,)k(usht,)f(int,)h(uint,)f (lng,)h(ulng,)f(lnglng,)g(flt,)g(dbl])h(/)334 1726 y (ffg3d[b,i,ui,k,uk,j,uj,jj)o(,e,)o(d])334 1839 y(\(fitsfile)e(*fptr,)h (long)h(group,)f(DTYPE)h(nulval,)e(LONGLONG)h(dim1,)334 1952 y(LONGLONG)g(dim2,)g(LONGLONG)g(naxis1,)f(LONGLONG)h(naxis2,)g (LONGLONG)f(naxis3,)334 2065 y(>)j(DTYPE)e(*array,)g(int)h(*anynul,)e (int)i(*status\))0 2333 y Fi(9)81 b Fj(Read)30 b(an)g(arbitrary)h(data) g(subsection)f(from)g(the)g(data)i(arra)m(y)-8 b(.)95 2600 y Fe(int)95 b(fits_read_subset_[byt,)42 b(sht,)k(usht,)h(int,)f (uint,)h(lng,)f(ulng,)h(lnglng,)f(flt,)g(dbl])h(/)334 2713 y(ffgsv[b,i,ui,k,uk,j,uj,jj)o(,e,)o(d])334 2826 y(\(fitsfile)e(*fptr,)h(int)h(group,)f(int)h(naxis,)f(long)h(*naxes,) 334 2939 y(long)g(*fpixel,)e(long)i(*lpixel,)e(long)i(*inc,)f(DTYPE)h (nulval,)334 3052 y(>)h(DTYPE)e(*array,)g(int)h(*anynul,)e(int)i (*status\))95 3278 y(int)95 b(fits_read_subsetnull_[byt)o(,)42 b(sht,)k(usht,)h(int,)f(uint,)h(lng,)f(ulng,)h(lnglng,)f(flt,)g(dbl])h (/)334 3391 y(ffgsf[b,i,ui,k,uk,j,uj,jj)o(,e,)o(d])334 3504 y(\(fitsfile)e(*fptr,)h(int)h(group,)f(int)h(naxis,)f(long)h (*naxes,)334 3617 y(long)g(*fpixel,)e(long)i(*lpixel,)e(long)i(*inc,)f (>)i(DTYPE)e(*array,)334 3730 y(char)h(*nullarray,)d(int)j(*anynul,)f (int)h(*status\))0 4073 y Ff(9.6)135 b(Sp)t(ecialized)46 b(FITS)e(ASCI)t(I)g(and)g(Binary)h(T)-11 b(able)45 b(Routines)0 4328 y Fd(9.6.1)112 b(General)39 b(Column)f(Routines)0 4543 y Fi(1)81 b Fj(Get)31 b(information)f(ab)s(out)g(an)g(existing)h (ASCI)s(I)d(or)i(binary)f(table)i(column.)41 b(A)30 b(n)m(ull)g(p)s (oin)m(ter)g(ma)m(y)h(b)s(e)e(giv)m(en)227 4656 y(for)40 b(an)m(y)h(of)f(the)h(output)f(parameters)g(that)h(are)g(not)f(needed.) 70 b(D)m(A)-8 b(T)g(A)g(TYPE)42 b(is)e(a)h(c)m(haracter)h(string)227 4769 y(whic)m(h)d(returns)e(the)i(data)g(t)m(yp)s(e)g(of)g(the)f (column)h(as)g(de\014ned)e(b)m(y)i(the)f(TF)m(ORMn)h(k)m(eyw)m(ord)g (\(e.g.,)j('I',)227 4882 y('J','E',)28 b('D',)g(etc.\).)41 b(In)27 b(the)g(case)g(of)g(an)g(ASCI)s(I)f(c)m(haracter)i(column,)g(t) m(yp)s(eco)s(de)f(will)g(ha)m(v)m(e)h(a)f(v)-5 b(alue)28 b(of)f(the)227 4994 y(form)g('An')g(where)f('n')h(is)g(an)g(in)m(teger) i(expressing)d(the)h(width)g(of)g(the)g(\014eld)g(in)f(c)m(haracters.) 41 b(F)-8 b(or)28 b(example,)227 5107 y(if)g(TF)m(ORM)h(=)e('160A8')k (then)d(\013gb)s(cl)g(will)g(return)f(t)m(yp)s(ec)m(har='A8')j(and)d (rep)s(eat=20.)41 b(All)29 b(the)f(returned)227 5220 y(parameters)j(are)g(scalar)g(quan)m(tities.)95 5488 y Fe(int)47 b(fits_get_acolparms)c(/)48 b(ffgacl)191 5601 y(\(fitsfile)d(*fptr,)h(int)h(colnum,)f(>)h(char)g(*ttype,)f(long) h(*tbcol,)239 5714 y(char)f(*tunit,)g(char)h(*tform,)f(double)g (*scale,)f(double)i(*zero,)p eop end %%Page: 111 119 TeXDict begin 111 118 bop 0 299 a Fh(9.6.)72 b(SPECIALIZED)29 b(FITS)g(ASCI)s(I)g(AND)i(BINAR)-8 b(Y)32 b(T)-8 b(ABLE)30 b(R)m(OUTINES)933 b Fj(111)239 555 y Fe(char)46 b(*nulstr,)g(char)g (*tdisp,)g(int)h(*status\))95 781 y(int)g(fits_get_bcolparms)c(/)48 b(ffgbcl)286 894 y(\(fitsfile)e(*fptr,)g(int)h(colnum,)e(>)j(char)f (*ttype,)e(char)i(*tunit,)334 1007 y(char)g(*typechar,)e(long)h (*repeat,)g(double)g(*scale,)g(double)g(*zero,)334 1120 y(long)h(*nulval,)e(char)i(*tdisp,)f(int)94 b(*status\))95 1346 y(int)47 b(fits_get_bcolparmsll)c(/)k(ffgbclll)286 1458 y(\(fitsfile)f(*fptr,)g(int)h(colnum,)e(>)j(char)f(*ttype,)e(char) i(*tunit,)334 1571 y(char)g(*typechar,)e(LONGLONG)g(*repeat,)h(double)g (*scale,)g(double)g(*zero,)334 1684 y(LONGLONG)g(*nulval,)f(char)i (*tdisp,)f(int)94 b(*status\))0 1937 y Fi(2)81 b Fj(Return)27 b(optimal)i(n)m(um)m(b)s(er)e(of)h(ro)m(ws)g(to)h(read)f(or)g(write)g (at)h(one)f(time)h(for)f(maxim)m(um)g(I/O)f(e\016ciency)-8 b(.)42 b(Refer)227 2050 y(to)25 b(the)g(\\Optimizing)g(Co)s(de")f (section)i(in)e(Chapter)g(5)g(for)g(more)h(discussion)f(on)g(ho)m(w)g (to)h(use)f(this)h(routine.)95 2416 y Fe(int)47 b(fits_get_rowsize)d(/) j(ffgrsz)286 2529 y(\(fitsfile)f(*fptr,)g(long)g(*nrows,)g(*status\))0 2782 y Fi(3)81 b Fj(De\014ne)22 b(the)g(zero)i(indexed)d(b)m(yte)i (o\013set)g(of)g(the)f('heap')h(measured)e(from)h(the)h(start)g(of)f (the)g(binary)g(table)h(data.)227 2895 y(By)30 b(default)g(the)f(heap)h (is)f(assumed)g(to)h(start)g(immediately)h(follo)m(wing)g(the)f (regular)f(table)i(data,)f(i.e.,)h(at)227 3008 y(lo)s(cation)38 b(NAXIS1)f(x)g(NAXIS2.)59 b(This)36 b(routine)g(is)h(only)f(relev)-5 b(an)m(t)38 b(for)e(binary)g(tables)h(whic)m(h)g(con)m(tain)227 3121 y(v)-5 b(ariable)25 b(length)g(arra)m(y)g(columns)f(\(with)g(TF)m (ORMn)g(=)g('Pt'\).)40 b(This)23 b(routine)i(also)g(automatically)i (writes)227 3234 y(the)35 b(v)-5 b(alue)35 b(of)g(theap)f(to)h(a)g(k)m (eyw)m(ord)g(in)g(the)f(extension)h(header.)53 b(This)34 b(routine)g(m)m(ust)h(b)s(e)f(called)h(after)227 3347 y(the)c(required)e(k)m(eyw)m(ords)h(ha)m(v)m(e)i(b)s(een)d(written)h (\(with)g(\013ph)m(bn\))f(but)h(b)s(efore)f(an)m(y)i(data)g(is)f (written)g(to)h(the)227 3460 y(table.)95 3713 y Fe(int)47 b(fits_write_theap)d(/)j(ffpthp)286 3826 y(\(fitsfile)f(*fptr,)g(long)g (theap,)g(>)i(int)f(*status\))0 4079 y Fi(4)81 b Fj(T)-8 b(est)37 b(the)f(con)m(ten)m(ts)i(of)f(the)g(binary)e(table)j(v)-5 b(ariable)37 b(arra)m(y)g(heap,)h(returning)e(the)g(size)h(of)g(the)g (heap,)h(the)227 4192 y(n)m(um)m(b)s(er)30 b(of)h(un)m(used)e(b)m(ytes) j(that)f(are)g(not)g(curren)m(tly)g(p)s(oin)m(ted)g(to)h(b)m(y)e(an)m (y)i(of)f(the)g(descriptors,)g(and)f(the)227 4304 y(n)m(um)m(b)s(er)d (of)h(b)m(ytes)h(whic)m(h)f(are)g(p)s(oin)m(ted)g(to)h(b)m(y)f(m)m (ultiple)h(descriptors.)40 b(It)28 b(also)h(returns)e(v)-5 b(alid)29 b(=)e(F)-10 b(ALSE)227 4417 y(if)31 b(an)m(y)f(of)h(the)f (descriptors)h(p)s(oin)m(t)f(to)h(in)m(v)-5 b(alid)31 b(addresses)f(out)g(of)h(range)g(of)f(the)h(heap.)95 4670 y Fe(int)47 b(fits_test_heap)d(/)k(fftheap)286 4783 y(\(fitsfile)e(*fptr,)g(>)h(LONGLONG)f(*heapsize,)f(LONGLONG)g (*unused,)h(LONGLONG)f(*overlap,)334 4896 y(int)i(*validheap,)e(int)i (*status\))0 5149 y Fi(5)81 b Fj(Re-pac)m(k)33 b(the)f(v)m(ectors)h(in) e(the)h(binary)f(table)i(v)-5 b(ariable)32 b(arra)m(y)g(heap)g(to)g (reco)m(v)m(er)i(an)m(y)e(un)m(used)e(space.)45 b(Nor-)227 5262 y(mally)-8 b(,)40 b(when)d(a)g(v)m(ector)i(in)e(a)g(v)-5 b(ariable)38 b(length)g(arra)m(y)f(column)g(is)g(rewritten)h(the)f (previously)g(written)227 5375 y(arra)m(y)d(remains)e(in)h(the)g(heap)f (as)h(w)m(asted)h(un)m(used)d(space.)49 b(This)32 b(routine)g(will)i (repac)m(k)f(the)g(arra)m(ys)g(that)227 5488 y(are)h(still)g(in)f(use,) h(th)m(us)f(eliminating)h(an)m(y)g(b)m(ytes)g(in)f(the)g(heap)g(that)h (are)g(no)f(longer)h(in)f(use.)49 b(Note)34 b(that)227 5601 y(if)f(sev)m(eral)h(v)m(ectors)g(p)s(oin)m(t)e(to)i(the)e(same)h (b)m(ytes)g(in)g(the)f(heap,)i(then)e(this)g(routine)h(will)g(mak)m(e)g (duplicate)227 5714 y(copies)e(of)g(the)g(b)m(ytes)f(for)h(eac)m(h)g(v) m(ector,)h(whic)m(h)e(will)h(actually)h(expand)e(the)g(size)i(of)e(the) h(heap.)p eop end %%Page: 112 120 TeXDict begin 112 119 bop 0 299 a Fj(112)958 b Fh(CHAPTER)30 b(9.)112 b(SPECIALIZED)28 b(CFITSIO)h(INTERF)-10 b(A)m(CE)30 b(R)m(OUTINES)95 555 y Fe(int)47 b(fits_compress_heap)c(/)48 b(ffcmph)286 668 y(\(fitsfile)e(*fptr,)g(>)h(int)g(*status\))0 976 y Fd(9.6.2)112 b(Lo)m(w-Lev)m(el)39 b(T)-9 b(able)38 b(Access)f(Routines)0 1198 y Fj(The)g(follo)m(wing)j(2)e(routines)f (pro)m(vide)h(lo)m(w-lev)m(el)j(access)e(to)g(the)f(data)g(in)g(ASCI)s (I)e(or)i(binary)f(tables)h(and)g(are)0 1311 y(mainly)29 b(useful)f(as)i(an)f(e\016cien)m(t)h(w)m(a)m(y)g(to)g(cop)m(y)g(all)g (or)f(part)g(of)g(a)g(table)h(from)f(one)g(lo)s(cation)i(to)f(another.) 40 b(These)0 1424 y(routines)24 b(simply)g(read)g(or)h(write)f(the)h (sp)s(eci\014ed)e(n)m(um)m(b)s(er)g(of)i(consecutiv)m(e)h(b)m(ytes)f (in)f(an)g(ASCI)s(I)f(or)h(binary)g(table,)0 1537 y(without)g(regard)g (for)f(column)h(b)s(oundaries)e(or)i(the)g(ro)m(w)g(length)g(in)f(the)h (table.)40 b(These)23 b(routines)h(do)f(not)h(p)s(erform)0 1650 y(an)m(y)36 b(mac)m(hine)h(dep)s(enden)m(t)e(data)i(con)m(v)m (ersion)g(or)g(b)m(yte)f(sw)m(apping.)58 b(See)36 b(App)s(endix)e(B)j (for)f(the)g(de\014nition)g(of)0 1763 y(the)31 b(parameters)f(used)g (in)g(these)h(routines.)0 2037 y Fi(1)81 b Fj(Read)30 b(or)h(write)f(a)h(consecutiv)m(e)h(arra)m(y)f(of)g(b)m(ytes)f(from)g (an)h(ASCI)s(I)d(or)j(binary)e(table)95 2311 y Fe(int)47 b(fits_read_tblbytes)c(/)48 b(ffgtbb)286 2424 y(\(fitsfile)e(*fptr,)g (LONGLONG)f(firstrow,)h(LONGLONG)f(firstchar,)g(LONGLONG)h(nchars,)334 2537 y(>)i(unsigned)d(char)i(*values,)e(int)i(*status\))95 2763 y(int)g(fits_write_tblbytes)c(/)k(ffptbb)286 2876 y(\(fitsfile)f(*fptr,)g(LONGLONG)f(firstrow,)h(LONGLONG)f(firstchar,)g (LONGLONG)h(nchars,)334 2989 y(unsigned)g(char)g(*values,)g(>)h(int)g (*status\))0 3296 y Fd(9.6.3)112 b(W)-9 b(rite)37 b(Column)h(Data)g (Routines)0 3516 y Fi(1)81 b Fj(W)-8 b(rite)28 b(elemen)m(ts)h(in)m(to) f(an)g(ASCI)s(I)d(or)j(binary)e(table)j(column)e(\(in)g(the)h(CDU\).)g (The)f(data)h(t)m(yp)s(e)f(of)h(the)f(arra)m(y)227 3629 y(is)k(implied)f(b)m(y)g(the)h(su\016x)e(of)i(the)f(routine)h(name.)95 3903 y Fe(int)47 b(fits_write_col_str)c(/)48 b(ffpcls)286 4016 y(\(fitsfile)e(*fptr,)g(int)h(colnum,)e(LONGLONG)h(firstrow,)f (LONGLONG)h(firstelem,)334 4129 y(LONGLONG)g(nelements,)f(char)h (**array,)g(>)h(int)g(*status\))95 4355 y(int)g (fits_write_col_[log,byt,sh)o(t,u)o(sht,)o(int,)o(uin)o(t,ln)o(g,ul)o (ng,)o(lngl)o(ng,f)o(lt,)o(dbl,)o(cmp,)o(dbl)o(cmp])41 b(/)286 4468 y(ffpcl[l,b,i,ui,k,uk,j,uj,j)o(j,e)o(,d,c)o(,m])286 4581 y(\(fitsfile)46 b(*fptr,)g(int)h(colnum,)e(LONGLONG)h(firstrow,) 525 4694 y(LONGLONG)g(firstelem,)f(LONGLONG)g(nelements,)g(DTYPE)h (*array,)g(>)i(int)f(*status\))0 4968 y Fi(2)81 b Fj(W)-8 b(rite)36 b(elemen)m(ts)h(in)m(to)g(an)e(ASCI)s(I)f(or)i(binary)e (table)j(column)e(substituting)g(the)h(appropriate)f(FITS)g(n)m(ull)227 5081 y(v)-5 b(alue)31 b(for)f(an)m(y)h(elemen)m(ts)h(that)f(are)f (equal)h(to)g(the)g(n)m(ulv)-5 b(al)31 b(parameter.)95 5355 y Fe(int)47 b(fits_write_colnull_[log,)42 b(byt,)k(sht,)h(usht,)f (int,)h(uint,)f(lng,)h(ulng,)f(lnglng,)g(flt,)h(dbl])f(/)286 5468 y(ffpcn[l,b,i,ui,k,uk,j,uj,j)o(j,e)o(,d])286 5581 y(\(fitsfile)g(*fptr,)g(int)h(colnum,)e(LONGLONG)h(firstrow,)f (LONGLONG)h(firstelem,)334 5694 y(LONGLONG)g(nelements,)f(DTYPE)h (*array,)g(DTYPE)g(nulval,)g(>)h(int)g(*status\))p eop end %%Page: 113 121 TeXDict begin 113 120 bop 0 299 a Fh(9.6.)72 b(SPECIALIZED)29 b(FITS)g(ASCI)s(I)g(AND)i(BINAR)-8 b(Y)32 b(T)-8 b(ABLE)30 b(R)m(OUTINES)933 b Fj(113)0 555 y Fi(3)81 b Fj(W)-8 b(rite)27 b(string)g(elemen)m(ts)h(in)m(to)f(a)g(binary)f(table)h (column)f(\(in)h(the)f(CDU\))i(substituting)e(the)g(FITS)g(n)m(ull)g(v) -5 b(alue)227 668 y(for)30 b(an)m(y)h(elemen)m(ts)h(that)f(are)g(equal) f(to)i(the)e(n)m(ulstr)g(string.)95 921 y Fe(int)47 b (fits_write_colnull_str)42 b(/)48 b(ffpcns)286 1034 y(\(fitsfile)e (*fptr,)g(int)h(colnum,)e(LONGLONG)h(firstrow,)f(LONGLONG)h(firstelem,) 334 1147 y(LONGLONG)g(nelements,)f(char)h(**array,)g(char)g(*nulstr,)g (>)h(int)g(*status\))0 1399 y Fi(4)81 b Fj(W)-8 b(rite)34 b(bit)f(v)-5 b(alues)33 b(in)m(to)h(a)g(binary)e(b)m(yte)h(\('B'\))i (or)e(bit)g(\('X'\))h(table)g(column)f(\(in)g(the)g(CDU\).)h(Larra)m(y) f(is)g(an)227 1512 y(arra)m(y)25 b(of)g(c)m(haracters)h(corresp)s (onding)e(to)h(the)g(sequence)g(of)f(bits)h(to)g(b)s(e)f(written.)39 b(If)24 b(an)g(elemen)m(t)i(of)f(larra)m(y)227 1625 y(is)k(true)g (\(not)h(equal)f(to)h(zero\))g(then)f(the)g(corresp)s(onding)f(bit)h (in)g(the)g(FITS)f(table)i(is)f(set)h(to)g(1,)g(otherwise)227 1738 y(the)37 b(bit)g(is)g(set)g(to)g(0.)60 b(The)37 b('X')g(column)f(in)h(a)g(FITS)f(table)h(is)g(alw)m(a)m(ys)h(padded)e (out)h(to)g(a)g(m)m(ultiple)h(of)227 1851 y(8)f(bits)f(where)g(the)g (bit)h(arra)m(y)f(starts)h(with)f(the)h(most)f(signi\014can)m(t)h(bit)g (of)f(the)h(b)m(yte)g(and)e(w)m(orks)h(do)m(wn)227 1964 y(to)m(w)m(ards)h(the)g(1's)f(bit.)59 b(F)-8 b(or)37 b(example,)i(a)d('4X')h(arra)m(y)-8 b(,)39 b(with)d(the)h(\014rst)e (bit)i(=)e(1)i(and)f(the)g(remaining)h(3)227 2077 y(bits)31 b(=)g(0)h(is)f(equiv)-5 b(alen)m(t)33 b(to)f(the)g(8-bit)g(unsigned)e (b)m(yte)i(decimal)g(v)-5 b(alue)32 b(of)g(128)g(\('1000)i(0000B'\).)g (In)d(the)227 2189 y(case)h(of)f('X')g(columns,)g(CFITSIO)f(can)h (write)g(to)g(all)h(8)f(bits)g(of)g(eac)m(h)h(b)m(yte)f(whether)f(they) h(are)g(formally)227 2302 y(v)-5 b(alid)34 b(or)f(not.)50 b(Th)m(us)32 b(if)i(the)f(column)g(is)h(de\014ned)e(as)h('4X',)i(and)e (one)g(calls)i(\013p)s(clx)e(with)g(\014rstbit=1)g(and)227 2415 y(n)m(bits=8,)i(then)f(all)g(8)h(bits)e(will)h(b)s(e)g(written)g (in)m(to)g(the)g(\014rst)f(b)m(yte)i(\(as)f(opp)s(osed)f(to)i(writing)e (the)h(\014rst)g(4)227 2528 y(bits)28 b(in)m(to)h(the)e(\014rst)g(ro)m (w)h(and)f(then)h(the)g(next)g(4)g(bits)f(in)m(to)i(the)f(next)g(ro)m (w\),)h(ev)m(en)f(though)f(the)h(last)h(4)f(bits)227 2641 y(of)j(eac)m(h)g(b)m(yte)g(are)f(formally)h(not)f(de\014ned)f(and) h(should)f(all)i(b)s(e)e(set)i(=)f(0.)41 b(It)30 b(should)f(also)j(b)s (e)d(noted)h(that)227 2754 y(it)k(is)e(more)h(e\016cien)m(t)i(to)e (write)g('X')h(columns)e(an)h(en)m(tire)h(b)m(yte)f(at)h(a)f(time,)h (instead)f(of)g(bit)g(b)m(y)g(bit.)48 b(An)m(y)227 2867 y(of)31 b(the)g(CFITSIO)e(routines)h(that)i(write)f(to)g(columns)f (\(e.g.)43 b(\014ts)p 2481 2867 28 4 v 33 w(write)p 2716 2867 V 33 w(col)p 2859 2867 V 33 w(b)m(yt\))32 b(ma)m(y)f(b)s(e)f(used) g(for)g(this)227 2980 y(purp)s(ose.)60 b(These)36 b(routines)i(will)f (in)m(terpret)h('X')f(columns)g(as)g(though)g(they)h(w)m(ere)f('B')h (columns)f(\(e.g.,)227 3093 y('1X')32 b(through)d('8X')j(is)e(equiv)-5 b(alen)m(t)32 b(to)f('1B',)h(and)e('9X')h(through)f('16X')i(is)e(equiv) -5 b(alen)m(t)32 b(to)f('2B'\).)95 3345 y Fe(int)47 b (fits_write_col_bit)c(/)48 b(ffpclx)286 3458 y(\(fitsfile)e(*fptr,)g (int)h(colnum,)e(LONGLONG)h(firstrow,)f(long)i(firstbit,)334 3571 y(long)g(nbits,)f(char)g(*larray,)g(>)h(int)g(*status\))0 3824 y Fi(5)81 b Fj(W)-8 b(rite)35 b(the)f(descriptor)g(for)f(a)h(v)-5 b(ariable)35 b(length)f(column)g(in)f(a)i(binary)e(table.)52 b(This)33 b(routine)g(can)i(b)s(e)e(used)227 3937 y(in)h(conjunction)g (with)f(\013gdes)h(to)h(enable)f(2)g(or)g(more)g(arra)m(ys)h(to)f(p)s (oin)m(t)g(to)h(the)f(same)g(storage)h(lo)s(cation)227 4050 y(to)c(sa)m(v)m(e)h(storage)g(space)f(if)f(the)h(arra)m(ys)g(are)g (iden)m(tical.)191 4302 y Fe(int)47 b(fits_write_descript)42 b(/)48 b(ffpdes)382 4415 y(\(fitsfile)d(*fptr,)h(int)h(colnum,)f (LONGLONG)f(rownum,)h(LONGLONG)g(repeat,)430 4528 y(LONGLONG)f(offset,) h(>)h(int)g(*status\))0 4818 y Fd(9.6.4)112 b(Read)38 b(Column)h(Data)f(Routines)0 5036 y Fj(Tw)m(o)28 b(t)m(yp)s(es)f(of)h (routines)f(are)h(pro)m(vided)f(to)h(get)h(the)e(column)h(data)g(whic)m (h)f(di\013er)g(in)g(the)h(w)m(a)m(y)h(unde\014ned)c(pixels)0 5149 y(are)40 b(handled.)66 b(The)39 b(\014rst)g(set)h(of)f(routines)g (\(\013gcv\))i(simply)e(return)f(an)h(arra)m(y)h(of)g(data)g(elemen)m (ts)g(in)f(whic)m(h)0 5262 y(unde\014ned)28 b(pixels)j(are)g(set)g (equal)g(to)g(a)g(v)-5 b(alue)31 b(sp)s(eci\014ed)f(b)m(y)h(the)f(user) g(in)g(the)h('n)m(ullv)-5 b(al')32 b(parameter.)41 b(If)30 b(n)m(ullv)-5 b(al)0 5375 y(=)22 b(0,)j(then)d(no)g(c)m(hec)m(ks)i(for) e(unde\014ned)e(pixels)j(will)g(b)s(e)f(p)s(erformed,)g(th)m(us)g (increasing)i(the)e(sp)s(eed)g(of)g(the)h(program.)0 5488 y(The)36 b(second)g(set)g(of)h(routines)e(\(\013gcf)7 b(\))38 b(returns)d(the)h(data)h(elemen)m(t)g(arra)m(y)g(and)e(in)h (addition)g(a)h(logical)h(arra)m(y)0 5601 y(of)33 b(\015ags)f(whic)m(h) g(de\014nes)g(whether)g(the)g(corresp)s(onding)g(data)h(pixel)f(is)h (unde\014ned.)44 b(See)33 b(App)s(endix)e(B)i(for)f(the)0 5714 y(de\014nition)e(of)h(the)f(parameters)h(used)e(in)h(these)h (routines.)p eop end %%Page: 114 122 TeXDict begin 114 121 bop 0 299 a Fj(114)958 b Fh(CHAPTER)30 b(9.)112 b(SPECIALIZED)28 b(CFITSIO)h(INTERF)-10 b(A)m(CE)30 b(R)m(OUTINES)0 555 y Fj(An)m(y)39 b(column,)h(regardless)f(of)g(it's)g (in)m(trinsic)g(data)h(t)m(yp)s(e,)h(ma)m(y)e(b)s(e)f(read)g(as)h(a)g (string.)66 b(It)38 b(should)g(b)s(e)g(noted)0 668 y(ho)m(w)m(ev)m(er) 32 b(that)f(reading)f(a)h(n)m(umeric)f(column)g(as)h(a)f(string)h(is)f (10)h(-)g(100)g(times)g(slo)m(w)m(er)h(than)e(reading)g(the)h(same)0 781 y(column)g(as)h(a)g(n)m(um)m(b)s(er)e(due)h(to)h(the)g(large)h(o)m (v)m(erhead)f(in)g(constructing)g(the)g(formatted)g(strings.)44 b(The)31 b(displa)m(y)0 894 y(format)26 b(of)g(the)h(returned)d (strings)i(will)g(b)s(e)g(determined)f(b)m(y)h(the)g(TDISPn)f(k)m(eyw)m (ord,)j(if)d(it)i(exists,)h(otherwise)e(b)m(y)0 1007 y(the)h(data)g(t)m(yp)s(e)f(of)h(the)f(column.)39 b(The)26 b(length)h(of)g(the)f(returned)f(strings)h(\(not)h(including)f(the)h(n) m(ull)f(terminating)0 1120 y(c)m(haracter\))38 b(can)e(b)s(e)g (determined)f(with)h(the)g(\014ts)p 1722 1120 28 4 v 33 w(get)p 1875 1120 V 34 w(col)p 2019 1120 V 33 w(displa)m(y)p 2330 1120 V 33 w(width)g(routine.)57 b(The)36 b(follo)m(wing)h(TDISPn)0 1233 y(displa)m(y)31 b(formats)f(are)h(curren)m(tly)f(supp)s(orted:)191 1490 y Fe(Iw.m)142 b(Integer)191 1603 y(Ow.m)g(Octal)46 b(integer)191 1716 y(Zw.m)142 b(Hexadecimal)45 b(integer)191 1829 y(Fw.d)142 b(Fixed)46 b(floating)g(point)191 1942 y(Ew.d)142 b(Exponential)45 b(floating)g(point)191 2055 y(Dw.d)142 b(Exponential)45 b(floating)g(point)191 2168 y(Gw.d)142 b(General;)46 b(uses)g(Fw.d)h(if)g(significance)d(not)j (lost,)g(else)f(Ew.d)0 2425 y Fj(where)37 b(w)h(is)g(the)g(width)f(in)h (c)m(haracters)h(of)f(the)h(displa)m(y)m(ed)f(v)-5 b(alues,)41 b(m)c(is)h(the)g(minim)m(um)g(n)m(um)m(b)s(er)e(of)i(digits)0 2538 y(displa)m(y)m(ed,)31 b(and)f(d)g(is)g(the)h(n)m(um)m(b)s(er)e(of) h(digits)h(to)g(the)g(righ)m(t)g(of)g(the)f(decimal.)42 b(The)30 b(.m)g(\014eld)g(is)g(optional.)0 2796 y Fi(1)81 b Fj(Read)29 b(elemen)m(ts)i(from)e(an)g(ASCI)s(I)f(or)i(binary)f (table)h(column)f(\(in)h(the)f(CDU\).)i(These)e(routines)g(return)g (the)227 2909 y(v)-5 b(alues)30 b(of)g(the)g(table)h(column)f(arra)m(y) g(elemen)m(ts.)42 b(Unde\014ned)28 b(arra)m(y)j(elemen)m(ts)g(will)f(b) s(e)f(returned)g(with)h(a)227 3022 y(v)-5 b(alue)30 b(=)e(n)m(ulv)-5 b(al,)30 b(unless)e(n)m(ulv)-5 b(al)29 b(=)f(0)i(\(or)f(=)f(')h(')g (for)g(\013gcvs\))g(in)g(whic)m(h)f(case)i(no)f(c)m(hec)m(king)i(for)d (unde\014ned)227 3135 y(v)-5 b(alues)28 b(will)g(b)s(e)f(p)s(erformed.) 39 b(The)27 b(ANYF)h(parameter)g(is)g(set)g(to)g(true)g(if)g(an)m(y)f (of)h(the)g(returned)f(elemen)m(ts)227 3247 y(are)k(unde\014ned.)95 3505 y Fe(int)47 b(fits_read_col_str)c(/)48 b(ffgcvs)286 3618 y(\(fitsfile)e(*fptr,)g(int)h(colnum,)e(LONGLONG)h(firstrow,)f (LONGLONG)h(firstelem,)334 3731 y(LONGLONG)g(nelements,)f(char)h (*nulstr,)g(>)h(char)g(**array,)e(int)i(*anynul,)334 3844 y(int)g(*status\))95 4070 y(int)g(fits_read_col_[log,byt,sht)o (,us)o(ht,i)o(nt,u)o(int)o(,lng)o(,uln)o(g,)41 b(lnglng,)46 b(flt,)h(dbl,)g(cmp,)f(dblcmp])g(/)286 4183 y (ffgcv[l,b,i,ui,k,uk,j,uj,j)o(j,e)o(,d,c)o(,m])286 4295 y(\(fitsfile)g(*fptr,)g(int)h(colnum,)e(LONGLONG)h(firstrow,)f (LONGLONG)h(firstelem,)334 4408 y(LONGLONG)g(nelements,)f(DTYPE)h (nulval,)g(>)h(DTYPE)g(*array,)e(int)i(*anynul,)334 4521 y(int)g(*status\))0 4779 y Fi(2)81 b Fj(Read)39 b(elemen)m(ts)i(and)e (n)m(ull)h(\015ags)g(from)f(an)g(ASCI)s(I)g(or)g(binary)g(table)i (column)e(\(in)h(the)g(CHDU\).)g(These)227 4892 y(routines)29 b(return)e(the)i(v)-5 b(alues)29 b(of)g(the)g(table)h(column)e(arra)m (y)i(elemen)m(ts.)41 b(An)m(y)29 b(unde\014ned)d(arra)m(y)k(elemen)m (ts)227 5005 y(will)k(ha)m(v)m(e)h(the)f(corresp)s(onding)e(n)m (ullarra)m(y)i(elemen)m(t)h(set)f(equal)g(to)g(TR)m(UE.)g(The)f(an)m (yn)m(ul)h(parameter)g(is)227 5118 y(set)d(to)g(true)f(if)h(an)m(y)g (of)f(the)h(returned)e(elemen)m(ts)j(are)e(unde\014ned.)95 5375 y Fe(int)47 b(fits_read_colnull_str)42 b(/)48 b(ffgcfs)286 5488 y(\(fitsfile)e(*fptr,)g(int)h(colnum,)e(LONGLONG)h(firstrow,)f (LONGLONG)h(firstelem,)334 5601 y(LONGLONG)g(nelements,)f(>)i(char)g (**array,)e(char)i(*nullarray,)e(int)i(*anynul,)334 5714 y(int)g(*status\))p eop end %%Page: 115 123 TeXDict begin 115 122 bop 0 299 a Fh(9.6.)72 b(SPECIALIZED)29 b(FITS)g(ASCI)s(I)g(AND)i(BINAR)-8 b(Y)32 b(T)-8 b(ABLE)30 b(R)m(OUTINES)933 b Fj(115)95 668 y Fe(int)47 b (fits_read_colnull_[log,byt)o(,sh)o(t,us)o(ht,i)o(nt,)o(uint)o(,lng)o (,ul)o(ng,l)o(ngln)o(g,f)o(lt,d)o(bl,c)o(mp,)o(dblc)o(mp])41 b(/)286 781 y(ffgcf[l,b,i,ui,k,uk,j,uj,j)o(j,e)o(,d,c)o(,m])286 894 y(\(fitsfile)46 b(*fptr,)g(int)h(colnum,)e(LONGLONG)h(firstrow,)334 1007 y(LONGLONG)g(firstelem,)f(LONGLONG)g(nelements,)g(>)j(DTYPE)e (*array,)334 1120 y(char)h(*nullarray,)d(int)j(*anynul,)f(int)h (*status\))0 1384 y Fi(3)81 b Fj(Read)24 b(an)g(arbitrary)g(data)h (subsection)f(from)g(an)g(N-dimensional)h(arra)m(y)g(in)f(a)g(binary)g (table)h(v)m(ector)h(column.)227 1497 y(Unde\014ned)21 b(pixels)i(in)f(the)h(arra)m(y)g(will)g(b)s(e)f(set)h(equal)h(to)f(the) g(v)-5 b(alue)23 b(of)g('n)m(ulv)-5 b(al',)25 b(unless)d(n)m(ulv)-5 b(al=0)23 b(in)f(whic)m(h)227 1610 y(case)37 b(no)e(testing)h(for)f (unde\014ned)e(pixels)i(will)h(b)s(e)f(p)s(erformed.)53 b(The)35 b(\014rst)g(and)f(last)i(ro)m(ws)g(in)f(the)g(table)227 1722 y(to)30 b(b)s(e)e(read)h(are)g(sp)s(eci\014ed)g(b)m(y)g (fpixel\(naxis+1\))g(and)g(lpixel\(naxis+1\),)i(and)d(hence)h(are)h (treated)g(as)f(the)227 1835 y(next)38 b(higher)f(dimension)g(of)h(the) f(FITS)g(N-dimensional)h(arra)m(y)-8 b(.)63 b(The)37 b(INC)h(parameter)g(sp)s(eci\014es)f(the)227 1948 y(sampling)31 b(in)m(terv)-5 b(al)31 b(in)f(eac)m(h)i(dimension)e(b)s(et)m(w)m(een)h (the)f(data)h(elemen)m(ts)h(that)f(will)g(b)s(e)e(returned.)95 2212 y Fe(int)47 b(fits_read_subset_[byt,)42 b(sht,)47 b(usht,)f(int,)h(uint,)f(lng,)h(ulng,)f(lnglng,)g(flt,)h(dbl])f(/)286 2325 y(ffgsv[b,i,ui,k,uk,j,uj,jj,)o(e,d)o(])286 2438 y(\(fitsfile)g(*fptr,)g(int)h(colnum,)e(int)i(naxis,)f(long)h(*naxes,)f (long)h(*fpixel,)334 2551 y(long)g(*lpixel,)e(long)i(*inc,)f(DTYPE)h (nulval,)e(>)j(DTYPE)e(*array,)g(int)h(*anynul,)334 2664 y(int)g(*status\))0 2928 y Fi(4)81 b Fj(Read)24 b(an)g(arbitrary)g (data)h(subsection)f(from)g(an)g(N-dimensional)h(arra)m(y)g(in)f(a)g (binary)g(table)h(v)m(ector)h(column.)227 3041 y(An)m(y)34 b(Unde\014ned)e(pixels)i(in)g(the)f(arra)m(y)i(will)f(ha)m(v)m(e)h(the) f(corresp)s(onding)e('n)m(ullarra)m(y')j(elemen)m(t)g(set)f(equal)227 3154 y(to)40 b(TR)m(UE.)e(The)h(\014rst)e(and)h(last)i(ro)m(ws)e(in)h (the)f(table)i(to)f(b)s(e)f(read)h(are)g(sp)s(eci\014ed)e(b)m(y)i (fpixel\(naxis+1\))227 3267 y(and)i(lpixel\(naxis+1\),)47 b(and)41 b(hence)h(are)g(treated)g(as)g(the)g(next)g(higher)g (dimension)f(of)h(the)g(FITS)f(N-)227 3379 y(dimensional)i(arra)m(y)-8 b(.)78 b(The)41 b(INC)h(parameter)h(sp)s(eci\014es)f(the)h(sampling)f (in)m(terv)-5 b(al)44 b(in)e(eac)m(h)i(dimension)227 3492 y(b)s(et)m(w)m(een)31 b(the)g(data)g(elemen)m(ts)h(that)f(will)f (b)s(e)g(returned.)95 3756 y Fe(int)47 b(fits_read_subsetnull_[byt,)41 b(sht,)47 b(usht,)f(int,)h(uint,)f(lng,)h(ulng,)f(lnglng,)g(flt,)g (dbl])h(/)286 3869 y(ffgsf[b,i,ui,k,uk,j,uj,jj,)o(e,d)o(])286 3982 y(\(fitsfile)f(*fptr,)g(int)h(colnum,)e(int)i(naxis,)f(long)h (*naxes,)334 4095 y(long)g(*fpixel,)e(long)i(*lpixel,)e(long)i(*inc,)f (>)i(DTYPE)e(*array,)334 4208 y(char)h(*nullarray,)d(int)j(*anynul,)f (int)h(*status\))0 4472 y Fi(5)81 b Fj(Read)35 b(bit)g(v)-5 b(alues)35 b(from)g(a)g(b)m(yte)h(\('B'\))g(or)f(bit)g(\(`X`\))h(table) g(column)f(\(in)g(the)g(CDU\).)h(Larra)m(y)g(is)f(an)f(arra)m(y)227 4585 y(of)g(logical)i(v)-5 b(alues)34 b(corresp)s(onding)f(to)h(the)g (sequence)g(of)g(bits)g(to)g(b)s(e)f(read.)51 b(If)33 b(larra)m(y)h(is)g(true)f(then)h(the)227 4698 y(corresp)s(onding)i(bit) h(w)m(as)g(set)h(to)f(1,)j(otherwise)d(the)g(bit)g(w)m(as)g(set)h(to)f (0.)61 b(The)37 b('X')g(column)g(in)f(a)i(FITS)227 4811 y(table)e(is)e(alw)m(a)m(ys)i(padded)e(out)h(to)g(a)g(m)m(ultiple)g(of) g(8)g(bits)f(where)g(the)h(bit)g(arra)m(y)g(starts)g(with)f(the)h(most) 227 4924 y(signi\014can)m(t)j(bit)e(of)h(the)g(b)m(yte)g(and)f(w)m (orks)g(do)m(wn)h(to)m(w)m(ards)g(the)g(1's)g(bit.)59 b(F)-8 b(or)37 b(example,)i(a)e('4X')h(arra)m(y)-8 b(,)227 5036 y(with)33 b(the)h(\014rst)e(bit)i(=)f(1)h(and)e(the)i(remaining)f (3)h(bits)f(=)g(0)h(is)f(equiv)-5 b(alen)m(t)35 b(to)f(the)g(8-bit)g (unsigned)e(b)m(yte)227 5149 y(v)-5 b(alue)31 b(of)f(128.)42 b(Note)31 b(that)g(in)e(the)i(case)g(of)f('X')g(columns,)g(CFITSIO)f (can)h(read)g(all)h(8)f(bits)g(of)g(eac)m(h)h(b)m(yte)227 5262 y(whether)h(they)h(are)g(formally)g(v)-5 b(alid)33 b(or)f(not.)48 b(Th)m(us)31 b(if)i(the)f(column)h(is)f(de\014ned)f(as)i ('4X',)h(and)e(one)h(calls)227 5375 y(\013gcx)d(with)f(\014rstbit=1)f (and)h(n)m(bits=8,)g(then)g(all)h(8)f(bits)g(will)g(b)s(e)g(read)g (from)f(the)h(\014rst)g(b)m(yte)g(\(as)h(opp)s(osed)227 5488 y(to)39 b(reading)f(the)g(\014rst)g(4)g(bits)g(from)g(the)g (\014rst)f(ro)m(w)h(and)g(then)f(the)i(\014rst)e(4)h(bits)g(from)g(the) g(next)g(ro)m(w\),)227 5601 y(ev)m(en)g(though)f(the)g(last)i(4)e(bits) g(of)h(eac)m(h)g(b)m(yte)g(are)f(formally)h(not)g(de\014ned.)60 b(It)37 b(should)f(also)i(b)s(e)f(noted)227 5714 y(that)f(it)f(is)h (more)f(e\016cien)m(t)h(to)g(read)f('X')h(columns)e(an)h(en)m(tire)h(b) m(yte)g(at)g(a)f(time,)i(instead)e(of)h(bit)f(b)m(y)g(bit.)p eop end %%Page: 116 124 TeXDict begin 116 123 bop 0 299 a Fj(116)958 b Fh(CHAPTER)30 b(9.)112 b(SPECIALIZED)28 b(CFITSIO)h(INTERF)-10 b(A)m(CE)30 b(R)m(OUTINES)227 555 y Fj(An)m(y)f(of)g(the)h(CFITSIO)d(routines)i (that)g(read)g(columns)g(\(e.g.)42 b(\014ts)p 2520 555 28 4 v 32 w(read)p 2724 555 V 33 w(col)p 2867 555 V 34 w(b)m(yt\))29 b(ma)m(y)h(b)s(e)e(used)g(for)h(this)227 668 y(purp)s(ose.)60 b(These)36 b(routines)i(will)f(in)m(terpret)h('X') f(columns)g(as)g(though)g(they)h(w)m(ere)f('B')h(columns)f(\(e.g.,)227 781 y('8X')32 b(is)e(equiv)-5 b(alen)m(t)32 b(to)f('1B',)h(and)e('16X') i(is)e(equiv)-5 b(alen)m(t)32 b(to)f('2B'\).)95 1041 y Fe(int)47 b(fits_read_col_bit)c(/)48 b(ffgcx)286 1154 y(\(fitsfile)e(*fptr,)g(int)h(colnum,)e(LONGLONG)h(firstrow,)f (LONGLONG)h(firstbit,)334 1267 y(LONGLONG)g(nbits,)g(>)h(char)g (*larray,)e(int)i(*status\))0 1526 y Fi(6)81 b Fj(Read)31 b(an)m(y)h(consecutiv)m(e)i(set)e(of)g(bits)f(from)h(an)f('X')h(or)g ('B')h(column)e(and)g(in)m(terpret)h(them)g(as)f(an)h(unsigned)227 1639 y(n-bit)h(in)m(teger.)48 b(n)m(bits)33 b(m)m(ust)f(b)s(e)g(less)h (than)g(16)g(or)g(32)g(in)f(\013gcxui)i(and)d(\013gcxuk,)j(resp)s (ectiv)m(ely)-8 b(.)49 b(If)32 b(nro)m(ws)227 1752 y(is)c(greater)h (than)f(1,)h(then)e(the)h(same)h(set)f(of)g(bits)g(will)g(b)s(e)f(read) h(from)f(eac)m(h)i(ro)m(w,)g(starting)g(with)e(\014rstro)m(w.)227 1865 y(The)j(bits)g(are)h(n)m(um)m(b)s(ered)e(with)h(1)h(=)f(the)h (most)f(signi\014can)m(t)i(bit)e(of)h(the)f(\014rst)g(elemen)m(t)i(of)e (the)h(column.)95 2125 y Fe(int)47 b(fits_read_col_bit_[usht,)42 b(uint])k(/)h(ffgcx[ui,uk])286 2238 y(\(fitsfile)f(*fptr,)g(int)h (colnum,)e(LONGLONG)h(firstrow,)f(LONGLONG,)h(nrows,)334 2351 y(long)h(firstbit,)e(long)i(nbits,)f(>)h(DTYPE)g(*array,)e(int)i (*status\))0 2611 y Fi(7)81 b Fj(Return)27 b(the)i(descriptor)f(for)h (a)g(v)-5 b(ariable)29 b(length)g(column)f(in)h(a)g(binary)e(table.)41 b(The)28 b(descriptor)h(consists)g(of)227 2723 y(2)j(in)m(teger)g (parameters:)42 b(the)31 b(n)m(um)m(b)s(er)f(of)h(elemen)m(ts)i(in)d (the)h(arra)m(y)h(and)e(the)h(starting)h(o\013set)g(relativ)m(e)h(to) 227 2836 y(the)c(start)h(of)e(the)h(heap.)40 b(The)29 b(\014rst)f(pair)g(of)h(routine)g(returns)e(a)i(single)h(descriptor)e (whereas)h(the)g(second)227 2949 y(pair)34 b(of)h(routine)f(returns)g (the)g(descriptors)g(for)g(a)h(range)g(of)f(ro)m(ws)h(in)f(the)g (table.)54 b(The)34 b(only)g(di\013erence)227 3062 y(b)s(et)m(w)m(een) 42 b(the)f(2)g(routines)f(in)h(eac)m(h)h(pair)e(is)h(that)g(one)g (returns)f(the)h(parameters)g(as)g('long')g(in)m(tegers,)227 3175 y(whereas)30 b(the)h(other)g(returns)e(the)h(v)-5 b(alues)31 b(as)g(64-bit)g('LONGLONG')g(in)m(tegers.)95 3435 y Fe(int)47 b(fits_read_descript)c(/)48 b(ffgdes)286 3548 y(\(fitsfile)e(*fptr,)g(int)h(colnum,)e(LONGLONG)h(rownum,)g(>)h (long)g(*repeat,)525 3661 y(long)g(*offset,)e(int)i(*status\))95 3886 y(int)g(fits_read_descriptll)c(/)k(ffgdesll)286 3999 y(\(fitsfile)f(*fptr,)g(int)h(colnum,)e(LONGLONG)h(rownum,)g(>)h (LONGLONG)f(*repeat,)525 4112 y(LONGLONG)g(*offset,)f(int)i(*status\)) 95 4338 y(int)g(fits_read_descripts)c(/)k(ffgdess)286 4451 y(\(fitsfile)f(*fptr,)g(int)h(colnum,)e(LONGLONG)h(firstrow,)f (LONGLONG)h(nrows)334 4564 y(>)i(long)e(*repeat,)g(long)g(*offset,)g (int)h(*status\))95 4790 y(int)g(fits_read_descriptsll)42 b(/)48 b(ffgdessll)286 4903 y(\(fitsfile)e(*fptr,)g(int)h(colnum,)e (LONGLONG)h(firstrow,)f(LONGLONG)h(nrows)334 5016 y(>)i(LONGLONG)d (*repeat,)h(LONGLONG)f(*offset,)h(int)h(*status\))p eop end %%Page: 117 125 TeXDict begin 117 124 bop 0 1225 a Fg(Chapter)65 b(10)0 1687 y Fm(Extended)77 b(File)g(Name)g(Syn)-6 b(tax)0 2216 y Ff(10.1)136 b(Ov)l(erview)0 2466 y Fj(CFITSIO)30 b(supp)s(orts)f(an)j(extended)f(syn)m(tax)h(when)f(sp)s(ecifying)g(the) h(name)f(of)h(the)g(data)g(\014le)f(to)h(b)s(e)f(op)s(ened)g(or)0 2579 y(created)g(that)g(includes)f(the)h(follo)m(wing)h(features:)136 2813 y Fc(\017)46 b Fj(CFITSIO)40 b(can)i(read)f(IRAF)h(format)g (images)g(whic)m(h)f(ha)m(v)m(e)i(header)e(\014le)h(names)f(that)h(end) f(with)g(the)227 2926 y('.imh')d(extension,)i(as)e(w)m(ell)g(as)g (reading)f(and)g(writing)g(FITS)g(\014les,)i(This)e(feature)h(is)f (implemen)m(ted)h(in)227 3039 y(CFITSIO)29 b(b)m(y)i(\014rst)e(con)m(v) m(erting)k(the)d(IRAF)h(image)h(in)m(to)f(a)g(temp)s(orary)f(FITS)g (format)h(\014le)f(in)g(memory)-8 b(,)227 3152 y(then)35 b(op)s(ening)f(the)h(FITS)f(\014le.)54 b(An)m(y)35 b(of)g(the)g(usual)f (CFITSIO)g(routines)g(then)h(ma)m(y)g(b)s(e)f(used)g(to)i(read)227 3265 y(the)31 b(image)g(header)f(or)h(data.)41 b(Similarly)-8 b(,)31 b(ra)m(w)f(binary)g(data)h(arra)m(ys)f(can)h(b)s(e)f(read)g(b)m (y)g(con)m(v)m(erting)i(them)227 3378 y(on)f(the)f(\015y)g(in)m(to)h (virtual)g(FITS)f(images.)136 3557 y Fc(\017)46 b Fj(FITS)37 b(\014les)g(on)g(the)g(In)m(ternet)h(can)f(b)s(e)g(read)g(\(and)g (sometimes)h(written\))f(using)g(the)g(FTP)-8 b(,)38 b(HTTP)-8 b(,)37 b(or)227 3670 y(R)m(OOT)30 b(proto)s(cols.)136 3849 y Fc(\017)46 b Fj(FITS)30 b(\014les)g(can)h(b)s(e)f(pip)s(ed)f(b)s (et)m(w)m(een)i(tasks)f(on)h(the)f(stdin)g(and)g(stdout)g(streams.)136 4028 y Fc(\017)46 b Fj(FITS)36 b(\014les)h(can)g(b)s(e)f(read)h(and)f (written)h(in)g(shared)f(memory)-8 b(.)60 b(This)36 b(can)h(p)s(oten)m (tially)i(ac)m(hiev)m(e)g(b)s(etter)227 4141 y(data)26 b(I/O)e(p)s(erformance)g(compared)h(to)h(reading)f(and)f(writing)g(the) h(same)h(FITS)e(\014les)g(on)h(magnetic)h(disk.)136 4320 y Fc(\017)46 b Fj(Compressed)30 b(FITS)f(\014les)i(in)f(gzip)h(or)f (Unix)g(COMPRESS)f(format)h(can)h(b)s(e)f(directly)h(read.)136 4499 y Fc(\017)46 b Fj(Output)28 b(FITS)h(\014les)g(can)g(b)s(e)g (written)g(directly)h(in)e(compressed)h(gzip)h(format,)g(th)m(us)e(sa)m (ving)i(disk)f(space.)136 4678 y Fc(\017)46 b Fj(FITS)26 b(table)h(columns)f(can)h(b)s(e)f(created,)i(mo)s(di\014ed,)f(or)f (deleted)h('on-the-\015y')g(as)g(the)g(table)g(is)f(op)s(ened)g(b)m(y) 227 4791 y(CFITSIO.)32 b(This)h(creates)i(a)e(virtual)h(FITS)f(\014le)g (con)m(taining)i(the)f(mo)s(di\014cations)f(that)h(is)g(then)f(op)s (ened)227 4904 y(b)m(y)e(the)f(application)i(program.)136 5083 y Fc(\017)46 b Fj(T)-8 b(able)29 b(ro)m(ws)e(ma)m(y)i(b)s(e)e (selected,)j(or)e(\014ltered)g(out,)g(on)g(the)g(\015y)f(when)g(the)h (table)h(is)f(op)s(ened)f(b)m(y)g(CFITSIO,)227 5196 y(based)22 b(on)f(an)g(user-sp)s(eci\014ed)g(expression.)38 b(Only)21 b(ro)m(ws)g(for)g(whic)m(h)h(the)g(expression)f(ev)-5 b(aluates)23 b(to)f('TR)m(UE')227 5309 y(are)31 b(retained)g(in)f(the)g (cop)m(y)i(of)e(the)h(table)g(that)g(is)f(op)s(ened)g(b)m(y)g(the)h (application)g(program.)136 5488 y Fc(\017)46 b Fj(Histogram)28 b(images)g(ma)m(y)f(b)s(e)f(created)h(on)f(the)h(\015y)f(b)m(y)g (binning)g(the)g(v)-5 b(alues)27 b(in)f(table)i(columns,)f(resulting) 227 5601 y(in)36 b(a)g(virtual)h(N-dimensional)f(FITS)g(image.)59 b(The)35 b(application)i(program)f(then)g(only)g(sees)g(the)h(FITS)227 5714 y(image)32 b(\(in)e(the)h(primary)e(arra)m(y\))j(instead)e(of)h (the)f(original)i(FITS)d(table.)1882 5942 y(117)p eop end %%Page: 118 126 TeXDict begin 118 125 bop 0 299 a Fj(118)1528 b Fh(CHAPTER)29 b(10.)113 b(EXTENDED)30 b(FILE)h(NAME)f(SYNT)-8 b(AX)0 555 y Fj(The)39 b(latter)i(3)f(table)h(\014ltering)f(features)g(in)f (particular)h(add)f(v)m(ery)h(p)s(o)m(w)m(erful)f(data)i(pro)s(cessing) e(capabilities)0 668 y(directly)33 b(in)m(to)g(CFITSIO,)e(and)h(hence)h (in)m(to)g(ev)m(ery)g(task)g(that)g(uses)f(CFITSIO)f(to)i(read)f(or)h (write)f(FITS)g(\014les.)0 781 y(F)-8 b(or)29 b(example,)g(these)f (features)h(transform)e(a)h(v)m(ery)g(simple)g(program)g(that)g(just)g (copies)g(an)g(input)f(FITS)g(\014le)h(to)0 894 y(a)c(new)f(output)h (\014le)g(\(lik)m(e)h(the)f(`\014tscop)m(y')h(program)e(that)i(is)e (distributed)g(with)h(CFITSIO\))e(in)m(to)j(a)f(m)m(ultipurp)s(ose)0 1007 y(FITS)33 b(\014le)g(pro)s(cessing)g(to)s(ol.)51 b(By)33 b(app)s(ending)f(fairly)i(simple)f(quali\014ers)g(on)m(to)h (the)g(name)f(of)h(the)f(input)g(FITS)0 1120 y(\014le,)45 b(the)d(user)f(can)h(p)s(erform)e(quite)i(complex)h(table)f(editing)h (op)s(erations)f(\(e.g.,)k(create)d(new)e(columns,)k(or)0 1233 y(\014lter)32 b(out)h(ro)m(ws)f(in)g(a)g(table\))i(or)e(create)i (FITS)d(images)j(b)m(y)e(binning)f(or)h(histogramming)h(the)g(v)-5 b(alues)32 b(in)g(table)0 1346 y(columns.)47 b(In)32 b(addition,)h(these)g(functions)f(ha)m(v)m(e)i(b)s(een)e(co)s(ded)g (using)g(new)g(state-of-the)j(art)e(algorithms)g(that)0 1458 y(are,)e(in)f(some)h(cases,)g(10)h(-)e(100)i(times)f(faster)g (than)f(previous)g(widely)g(used)f(implemen)m(tations.)0 1619 y(Before)34 b(describing)f(the)h(complete)h(syn)m(tax)f(for)f(the) h(extended)f(FITS)g(\014le)g(names)g(in)g(the)h(next)g(section,)h(here) 0 1732 y(are)c(a)g(few)f(examples)h(of)f(FITS)g(\014le)g(names)h(that)f (giv)m(e)i(a)f(quic)m(k)g(o)m(v)m(erview)h(of)f(the)f(allo)m(w)m(ed)i (syn)m(tax:)136 2005 y Fc(\017)46 b Fe(myfile.fits)p Fj(:)38 b(the)30 b(simplest)h(case)g(of)g(a)g(FITS)e(\014le)i(on)f (disk)g(in)g(the)h(curren)m(t)f(directory)-8 b(.)136 2207 y Fc(\017)46 b Fe(myfile.imh)p Fj(:)i(op)s(ens)34 b(an)h(IRAF)g(format)g(image)i(\014le)e(and)f(con)m(v)m(erts)j(it)e(on) g(the)g(\015y)g(in)m(to)h(a)f(temp)s(orary)227 2320 y(FITS)30 b(format)h(image)g(in)f(memory)h(whic)m(h)f(can)g(then)g(b)s(e)g(read)g (with)g(an)m(y)h(other)g(CFITSIO)e(routine.)136 2521 y Fc(\017)46 b Fe(rawfile.dat[i512,512])p Fj(:)35 b(op)s(ens)30 b(a)g(ra)m(w)h(binary)e(data)i(arra)m(y)g(\(a)g(512)g(x)f(512)i(short)e (in)m(teger)h(arra)m(y)g(in)227 2634 y(this)i(case\))i(and)d(con)m(v)m (erts)j(it)e(on)g(the)g(\015y)g(in)m(to)h(a)f(temp)s(orary)g(FITS)f (format)h(image)i(in)d(memory)h(whic)m(h)227 2747 y(can)e(then)f(b)s(e) g(read)g(with)g(an)m(y)h(other)f(CFITSIO)f(routine.)136 2948 y Fc(\017)46 b Fe(myfile.fits.gz)p Fj(:)d(if)33 b(this)g(is)g(the)g(name)g(of)h(a)f(new)g(output)g(\014le,)h(the)f ('.gz')i(su\016x)d(will)h(cause)h(it)g(to)g(b)s(e)227 3061 y(compressed)c(in)g(gzip)h(format)g(when)e(it)i(is)g(written)f(to) h(disk.)136 3263 y Fc(\017)46 b Fe(myfile.fits.gz[events,)c(2])p Fj(:)35 b(op)s(ens)20 b(and)f(uncompresses)g(the)i(gzipp)s(ed)f(\014le) g(m)m(y\014le.\014ts)h(then)f(mo)m(v)m(es)227 3376 y(to)31 b(the)g(extension)g(with)f(the)h(k)m(eyw)m(ords)f(EXTNAME)h(=)f ('EVENTS')g(and)g(EXTVER)g(=)g(2.)136 3577 y Fc(\017)46 b Fe(-)p Fj(:)40 b(a)30 b(dash)f(\(min)m(us)g(sign\))h(signi\014es)g (that)g(the)g(input)f(\014le)g(is)h(to)g(b)s(e)f(read)h(from)f(the)h (stdin)f(\014le)h(stream,)g(or)227 3690 y(that)d(the)g(output)f(\014le) h(is)f(to)h(b)s(e)f(written)h(to)g(the)g(stdout)f(stream.)40 b(See)27 b(also)g(the)g(stream://)h(driv)m(er)e(whic)m(h)227 3803 y(pro)m(vides)37 b(a)f(more)h(e\016cien)m(t,)i(but)d(more)g (restricted)h(metho)s(d)f(of)h(reading)f(or)g(writing)h(to)g(the)f (stdin)g(or)227 3916 y(stdout)31 b(streams.)136 4117 y Fc(\017)46 b Fe(ftp://legacy.gsfc.nasa.go)o(v/te)o(st/v)o(ela)o(.fit) o(s)p Fj(:)k(FITS)37 b(\014les)h(in)g(an)m(y)h(ftp)e(arc)m(hiv)m(e)j (site)f(on)f(the)227 4230 y(In)m(ternet)31 b(ma)m(y)g(b)s(e)f(directly) h(op)s(ened)e(with)h(read-only)h(access.)136 4432 y Fc(\017)46 b Fe(http://legacy.gsfc.nasa.g)o(ov/s)o(oftw)o(are)o(/tes)o(t.fi)o(ts)p Fj(:)33 b(an)m(y)27 b(v)-5 b(alid)28 b(URL)f(to)h(a)g(FITS)e(\014le)i (on)f(the)227 4545 y(W)-8 b(eb)31 b(ma)m(y)g(b)s(e)f(op)s(ened)g(with)g (read-only)g(access.)136 4746 y Fc(\017)46 b Fe (root://legacy.gsfc.nasa.g)o(ov/t)o(est/)o(vel)o(a.fi)o(ts)p Fj(:)e(similar)36 b(to)g(ftp)f(access)i(except)f(that)g(it)g(pro-)227 4859 y(vides)30 b(write)h(as)f(w)m(ell)h(as)g(read)f(access)h(to)g(the) f(\014les)h(across)f(the)h(net)m(w)m(ork.)41 b(This)29 b(uses)h(the)h(ro)s(ot)f(proto)s(col)227 4972 y(dev)m(elop)s(ed)h(at)g (CERN.)136 5174 y Fc(\017)46 b Fe(shmem://h2[events])p Fj(:)j(op)s(ens)36 b(the)i(FITS)e(\014le)h(in)g(a)g(shared)f(memory)h (segmen)m(t)h(and)f(mo)m(v)m(es)h(to)g(the)227 5287 y(EVENTS)30 b(extension.)136 5488 y Fc(\017)46 b Fe(mem://)p Fj(:)65 b(creates)44 b(a)g(scratc)m(h)g(output)f(\014le)g(in)g(core)h(computer) f(memory)-8 b(.)79 b(The)43 b(resulting)g('\014le')h(will)227 5601 y(disapp)s(ear)25 b(when)f(the)i(program)f(exits,)i(so)f(this)f (is)h(mainly)f(useful)g(for)g(testing)i(purp)s(oses)c(when)i(one)g(do)s (es)227 5714 y(not)31 b(w)m(an)m(t)g(a)g(p)s(ermanen)m(t)f(cop)m(y)h (of)f(the)h(output)f(\014le.)p eop end %%Page: 119 127 TeXDict begin 119 126 bop 0 299 a Fh(10.1.)73 b(O)m(VER)-10 b(VIEW)2995 b Fj(119)136 555 y Fc(\017)46 b Fe(myfile.fits[3;)e (Images\(10\)])p Fj(:)c(op)s(ens)30 b(a)i(cop)m(y)g(of)g(the)g(image)g (con)m(tained)h(in)e(the)h(10th)g(ro)m(w)f(of)h(the)227 668 y('Images')38 b(column)f(in)g(the)g(binary)f(table)i(in)e(the)h (3th)g(extension)h(of)f(the)g(FITS)f(\014le.)60 b(The)37 b(virtual)g(\014le)227 781 y(that)31 b(is)g(op)s(ened)e(b)m(y)i(the)f (application)i(just)e(con)m(tains)h(this)f(single)h(image)h(in)e(the)h (primary)e(arra)m(y)-8 b(.)136 973 y Fc(\017)46 b Fe (myfile.fits[1:512:2,)d(1:512:2])p Fj(:)c(op)s(ens)30 b(a)h(section)h(of)g(the)f(input)f(image)i(ranging)f(from)f(the)h(1st) 227 1086 y(to)k(the)f(512th)h(pixel)f(in)g(X)g(and)g(Y,)g(and)f (selects)j(ev)m(ery)e(second)g(pixel)h(in)e(b)s(oth)g(dimensions,)i (resulting)227 1198 y(in)30 b(a)h(256)h(x)e(256)i(pixel)e(input)g (image)h(in)g(this)f(case.)136 1390 y Fc(\017)46 b Fe (myfile.fits[EVENTS][col)c(Rad)47 b(=)g(sqrt\(X**2)e(+)j(Y**2\)])p Fj(:)36 b(creates)27 b(and)d(op)s(ens)h(a)g(virtual)h(\014le)f(on)227 1503 y(the)h(\015y)f(that)i(is)f(iden)m(tical)h(to)g(m)m (y\014le.\014ts)f(except)g(that)h(it)f(will)g(con)m(tain)h(a)f(new)g (column)f(in)h(the)g(EVENTS)227 1616 y(extension)41 b(called)h('Rad')f (whose)f(v)-5 b(alue)41 b(is)g(computed)f(using)h(the)f(indicated)h (expression)g(whic)m(h)f(is)h(a)227 1729 y(function)30 b(of)h(the)f(v)-5 b(alues)31 b(in)f(the)h(X)f(and)g(Y)h(columns.)136 1920 y Fc(\017)46 b Fe(myfile.fits[EVENTS][PHA)c(>)47 b(5])p Fj(:)41 b(creates)33 b(and)d(op)s(ens)g(a)i(virtual)f(FITS)f (\014les)h(that)g(is)g(iden)m(tical)i(to)227 2033 y('m)m (y\014le.\014ts')40 b(except)h(that)f(the)f(EVENTS)g(table)h(will)g (only)f(con)m(tain)i(the)e(ro)m(ws)h(that)g(ha)m(v)m(e)g(v)-5 b(alues)40 b(of)227 2146 y(the)34 b(PHA)g(column)g(greater)h(than)e(5.) 52 b(In)33 b(general,)j(an)m(y)e(arbitrary)g(b)s(o)s(olean)f (expression)h(using)f(a)i(C)e(or)227 2259 y(F)-8 b(ortran-lik)m(e)31 b(syn)m(tax,)e(whic)m(h)f(ma)m(y)h(com)m(bine)g(AND)g(and)f(OR)f(op)s (erators,)i(ma)m(y)g(b)s(e)f(used)f(to)i(select)h(ro)m(ws)227 2372 y(from)g(a)h(table.)136 2564 y Fc(\017)46 b Fe (myfile.fits[EVENTS][bin)c(\(X,Y\)=1,2048,4])p Fj(:)34 b(creates)26 b(a)g(temp)s(orary)f(FITS)g(primary)f(arra)m(y)i(im-)227 2677 y(age)38 b(whic)m(h)e(is)h(computed)f(on)g(the)h(\015y)f(b)m(y)g (binning)f(\(i.e,)40 b(computing)c(the)h(2-dimensional)g(histogram\)) 227 2789 y(of)d(the)f(v)-5 b(alues)34 b(in)f(the)h(X)g(and)e(Y)i (columns)f(of)h(the)f(EVENTS)g(extension.)50 b(In)33 b(this)g(case)i(the)e(X)h(and)f(Y)227 2902 y(co)s(ordinates)h(range)g (from)f(1)h(to)g(2048)h(and)e(the)h(image)g(pixel)g(size)g(is)g(4)f (units)g(in)g(b)s(oth)g(dimensions,)h(so)227 3015 y(the)d(resulting)f (image)i(is)e(512)i(x)e(512)i(pixels)f(in)f(size.)136 3207 y Fc(\017)46 b Fj(The)31 b(\014nal)g(example)i(com)m(bines)f(man)m (y)f(of)h(these)g(feature)g(in)m(to)g(one)g(complex)g(expression)f (\(it)i(is)e(brok)m(en)227 3320 y(in)m(to)h(sev)m(eral)f(lines)g(for)f (clarit)m(y\):)370 3576 y Fe(ftp://legacy.gsfc.nasa.gov)o(/dat)o(a/s)o (ampl)o(e.fi)o(ts.)o(gz[E)o(VENT)o(S])370 3689 y([col)47 b(phacorr)f(=)h(pha)g(*)h(1.1)f(-)g(0.3][phacorr)e(>=)i(5.0)g(&&)g (phacorr)f(<=)h(14.0])370 3801 y([bin)g(\(X,Y\)=32])227 4057 y Fj(In)37 b(this)h(case,)j(CFITSIO)36 b(\(1\))j(copies)g(and)e (uncompresses)g(the)h(FITS)f(\014le)h(from)f(the)h(ftp)f(site)i(on)f (the)227 4170 y(legacy)g(mac)m(hine,)h(\(2\))e(mo)m(v)m(es)g(to)g(the)g ('EVENTS')f(extension,)i(\(3\))f(calculates)i(a)d(new)g(column)g (called)227 4283 y('phacorr',)30 b(\(4\))f(selects)h(the)f(ro)m(ws)g (in)f(the)h(table)h(that)f(ha)m(v)m(e)h(phacorr)e(in)g(the)h(range)g(5) g(to)h(14,)g(and)e(\014nally)227 4396 y(\(5\))35 b(bins)d(the)h (remaining)g(ro)m(ws)g(on)h(the)f(X)g(and)g(Y)g(column)g(co)s (ordinates,)i(using)d(a)i(pixel)f(size)h(=)f(32)h(to)227 4509 y(create)d(a)f(2D)g(image.)42 b(All)30 b(this)f(pro)s(cessing)g (is)h(completely)h(transparen)m(t)e(to)i(the)e(application)i(program,) 227 4622 y(whic)m(h)f(simply)g(sees)h(the)g(\014nal)f(2-D)h(image)h(in) e(the)g(primary)g(arra)m(y)h(of)f(the)h(op)s(ened)f(\014le.)0 4886 y(The)c(full)h(extended)g(CFITSIO)e(FITS)h(\014le)h(name)g(can)g (con)m(tain)h(sev)m(eral)g(di\013eren)m(t)g(comp)s(onen)m(ts)f(dep)s (ending)e(on)0 4998 y(the)31 b(con)m(text.)42 b(These)30 b(comp)s(onen)m(ts)h(are)g(describ)s(ed)e(in)h(the)g(follo)m(wing)i (sections:)0 5262 y Fe(When)47 b(creating)e(a)j(new)f(file:)143 5375 y(filetype://BaseFilename\(t)o(empl)o(ate)o(Name)o(\)[co)o(mpr)o (ess])0 5601 y(When)g(opening)e(an)j(existing)d(primary)h(array)g(or)i (image)e(HDU:)143 5714 y(filetype://BaseFilename\(o)o(utNa)o(me\))o ([HDU)o(loca)o(tio)o(n][I)o(mage)o(Sec)o(tion)o(][pi)o(xFi)o(lter)o(])p eop end %%Page: 120 128 TeXDict begin 120 127 bop 0 299 a Fj(120)1528 b Fh(CHAPTER)29 b(10.)113 b(EXTENDED)30 b(FILE)h(NAME)f(SYNT)-8 b(AX)0 668 y Fe(When)47 b(opening)e(an)j(existing)d(table)i(HDU:)143 781 y(filetype://BaseFilename\(o)o(utNa)o(me\))o([HDU)o(loca)o(tio)o (n][c)o(olFi)o(lte)o(r][r)o(owFi)o(lte)o(r][b)o(inSp)o(ec])0 1010 y Fj(The)35 b(\014let)m(yp)s(e,)j(BaseFilename,)h(outName,)g (HDUlo)s(cation,)g(ImageSection,)g(and)c(pixFilter)i(comp)s(onen)m(ts,) g(if)0 1123 y(presen)m(t,)27 b(m)m(ust)f(b)s(e)g(giv)m(en)h(in)f(that)g (order,)h(but)e(the)i(colFilter,)i(ro)m(wFilter,)g(and)c(binSp)s(ec)g (sp)s(eci\014ers)g(ma)m(y)i(follo)m(w)0 1236 y(in)j(an)m(y)h(order.)42 b(Regardless)31 b(of)g(the)g(order,)f(ho)m(w)m(ev)m(er,)i(the)f (colFilter)i(sp)s(eci\014er,)e(if)f(presen)m(t,)h(will)g(b)s(e)f(pro)s (cessed)0 1349 y(\014rst)g(b)m(y)g(CFITSIO,)f(follo)m(w)m(ed)j(b)m(y)e (the)h(ro)m(wFilter)h(sp)s(eci\014er,)e(and)f(\014nally)i(b)m(y)f(the)g (binSp)s(ec)f(sp)s(eci\014er.)0 1678 y Ff(10.2)136 b(Filet)l(yp)t(e)0 1928 y Fj(The)37 b(t)m(yp)s(e)g(of)g(\014le)g(determines)g(the)g (medium)f(on)h(whic)m(h)g(the)g(\014le)g(is)h(lo)s(cated)g(\(e.g.,)i (disk)d(or)g(net)m(w)m(ork\))h(and,)0 2041 y(hence,)f(whic)m(h)e(in)m (ternal)h(device)g(driv)m(er)f(is)g(used)f(b)m(y)h(CFITSIO)f(to)i(read) f(and/or)g(write)g(the)g(\014le.)56 b(Curren)m(tly)0 2154 y(supp)s(orted)29 b(t)m(yp)s(es)h(are)382 2383 y Fe(file://)93 b(-)48 b(file)e(on)i(local)e(magnetic)g(disk)g (\(default\))430 2496 y(ftp://)93 b(-)48 b(a)f(readonly)f(file)g (accessed)g(with)h(the)g(anonymous)e(FTP)i(protocol.)907 2609 y(It)g(also)g(supports)93 b(ftp://username:password@)o(host)o(nam) o(e/..)o(.)907 2722 y(for)47 b(accessing)e(password-protected)e(ftp)k (sites.)382 2835 y(http://)93 b(-)48 b(a)f(readonly)f(file)g(accessed)g (with)h(the)g(HTTP)f(protocol.)93 b(It)907 2948 y(supports)45 b(username:password)e(just)k(like)g(the)g(ftp)g(driver.)907 3060 y(Proxy)f(HTTP)h(servers)f(are)h(supported)e(using)h(the)h (http_proxy)907 3173 y(environment)e(variable)g(\(see)i(following)e (note\).)286 3286 y(stream://)93 b(-)48 b(special)e(driver)g(to)h(read) g(an)g(input)f(FITS)h(file)f(from)h(the)g(stdin)907 3399 y(stream,)f(and/or)g(write)g(an)h(output)f(FITS)h(file)g(to)g(the)g (stdout)143 3512 y(stream.)94 b(This)46 b(driver)g(is)i(fragile)d(and)i (has)g(limited)143 3625 y(functionality)d(\(see)j(the)g(following)e (note\).)286 3738 y(gsiftp://)93 b(-)48 b(access)e(files)g(on)h(a)h (computational)c(grid)j(using)f(the)h(gridftp)907 3851 y(protocol)e(in)j(the)e(Globus)h(toolkit)e(\(see)i(following)e(note\).) 382 3964 y(root://)93 b(-)48 b(uses)e(the)h(CERN)g(root)g(protocol)e (for)i(writing)f(as)h(well)g(as)907 4077 y(reading)f(files)g(over)h (the)g(network)e(\(see)i(following)e(note\).)334 4190 y(shmem://)93 b(-)48 b(opens)e(or)h(creates)f(a)i(file)e(which)h (persists)e(in)i(the)g(computer's)907 4302 y(shared)f(memory)g(\(see)h (following)e(note\).)430 4415 y(mem://)93 b(-)48 b(opens)e(a)i (temporary)d(file)i(in)g(core)f(memory.)94 b(The)47 b(file)907 4528 y(disappears)e(when)h(the)h(program)f(exits)h(so)g(this)f(is)i (mainly)907 4641 y(useful)e(for)h(test)f(purposes)g(when)h(a)g (permanent)e(output)h(file)907 4754 y(is)h(not)g(desired.)0 4983 y Fj(If)35 b(the)h(\014let)m(yp)s(e)g(is)f(not)h(sp)s(eci\014ed,)h (then)e(t)m(yp)s(e)h(\014le://)h(is)e(assumed.)56 b(The)35 b(double)g(slashes)h('//')h(are)f(optional)0 5096 y(and)30 b(ma)m(y)h(b)s(e)e(omitted)j(in)e(most)h(cases.)0 5382 y Fd(10.2.1)113 b(Notes)36 b(ab)s(out)j(HTTP)d(pro)m(xy)i(serv)m(ers)0 5601 y Fj(A)32 b(pro)m(xy)g(HTTP)f(serv)m(er)h(ma)m(y)h(b)s(e)e(used)g (b)m(y)h(de\014ning)f(the)h(address)f(\(URL\))i(and)e(p)s(ort)g(n)m(um) m(b)s(er)g(of)h(the)g(pro)m(xy)0 5714 y(serv)m(er)f(with)f(the)g(h)m (ttp)p 801 5714 28 4 v 33 w(pro)m(xy)g(en)m(vironmen)m(t)h(v)-5 b(ariable.)42 b(F)-8 b(or)31 b(example)p eop end %%Page: 121 129 TeXDict begin 121 128 bop 0 299 a Fh(10.2.)73 b(FILETYPE)3037 b Fj(121)191 555 y Fe(setenv)46 b(http_proxy)f (http://heasarc.gsfc.nasa)o(.gov)o(:312)o(8)0 793 y Fj(will)38 b(cause)g(CFITSIO)f(to)h(use)g(p)s(ort)f(3128)i(on)f(the)g(heasarc)g (pro)m(xy)g(serv)m(er)g(whenev)m(er)g(reading)g(a)g(FITS)f(\014le)0 906 y(with)30 b(HTTP)-8 b(.)0 1194 y Fd(10.2.2)113 b(Notes)36 b(ab)s(out)j(the)e(stream)h(\014let)m(yp)s(e)g(driv)m(er)0 1413 y Fj(The)e(stream)h(driv)m(er)f(can)h(b)s(e)f(used)g(to)h (e\016cien)m(tly)i(read)d(a)h(FITS)f(\014le)h(from)f(the)h(stdin)f (\014le)g(stream)h(or)g(write)0 1525 y(a)44 b(FITS)e(to)i(the)g(stdout) f(\014le)g(stream.)80 b(Ho)m(w)m(ev)m(er,)49 b(b)s(ecause)43 b(these)h(input)e(and)h(output)g(streams)g(m)m(ust)h(b)s(e)0 1638 y(accessed)30 b(sequen)m(tially)-8 b(,)31 b(the)e(FITS)f(\014le)g (reading)h(or)f(writing)h(application)h(m)m(ust)e(also)i(read)e(and)g (write)h(the)g(\014le)0 1751 y(sequen)m(tially)-8 b(,)33 b(at)e(least)g(within)f(the)h(tolerances)h(describ)s(ed)d(b)s(elo)m(w.) 0 1911 y(CFITSIO)34 b(supp)s(orts)f(2)j(di\013eren)m(t)f(metho)s(ds)g (for)g(accessing)i(FITS)d(\014les)h(on)h(the)f(stdin)g(and)f(stdout)h (streams.)0 2024 y(The)c(original)i(metho)s(d,)f(whic)m(h)f(is)h(in)m (v)m(ok)m(ed)h(b)m(y)f(sp)s(ecifying)f(a)h(dash)f(c)m(haracter,)j("-",) g(as)d(the)h(name)g(of)g(the)g(\014le)0 2137 y(when)g(op)s(ening)g(or)h (creating)h(it,)g(w)m(orks)e(b)m(y)h(storing)g(a)g(complete)h(cop)m(y)g (of)f(the)g(en)m(tire)g(FITS)f(\014le)h(in)f(memory)-8 b(.)0 2250 y(In)35 b(this)g(case,)k(when)34 b(reading)i(from)f(stdin,)i (CFITSIO)d(will)i(cop)m(y)h(the)e(en)m(tire)i(stream)f(in)m(to)h (memory)e(b)s(efore)0 2363 y(doing)c(an)m(y)h(pro)s(cessing)f(of)h(the) f(\014le.)44 b(Similarly)-8 b(,)32 b(when)f(writing)g(to)h(stdout,)g (CFITSIO)d(will)j(create)h(a)f(cop)m(y)g(of)0 2476 y(the)h(en)m(tire)g (FITS)f(\014le)g(in)h(memory)-8 b(,)33 b(b)s(efore)f(\014nally)h (\015ushing)e(it)i(out)f(to)i(the)e(stdout)h(stream)g(when)e(the)i (FITS)0 2589 y(\014le)g(is)g(closed.)49 b(Bu\013ering)33 b(the)g(en)m(tire)h(FITS)e(\014le)h(in)g(this)f(w)m(a)m(y)i(allo)m(ws)g (the)f(application)i(to)e(randomly)g(access)0 2702 y(an)m(y)h(part)f (of)h(the)f(FITS)g(\014le,)i(in)e(an)m(y)h(order,)f(but)g(it)h(also)h (requires)e(that)h(the)f(user)g(ha)m(v)m(e)i(su\016cien)m(t)f(a)m(v)-5 b(ailable)0 2815 y(memory)30 b(\(or)g(virtual)g(memory\))g(to)h(store)f (the)g(en)m(tire)h(\014le,)f(whic)m(h)f(ma)m(y)i(not)f(b)s(e)f(p)s (ossible)g(in)h(the)g(case)h(of)f(v)m(ery)0 2928 y(large)h(\014les.)0 3088 y(The)e(new)m(er)g(stream)h(\014let)m(yp)s(e)g(pro)m(vides)f(a)h (more)f(memory-e\016cien)m(t)i(metho)s(d)e(of)h(accessing)h(FITS)d (\014les)h(on)h(the)0 3201 y(stdin)37 b(or)h(stdout)g(streams.)64 b(Instead)38 b(of)g(storing)g(a)g(cop)m(y)h(of)f(the)g(en)m(tire)h (FITS)e(\014le)h(in)g(memory)-8 b(,)40 b(CFITSIO)0 3314 y(only)32 b(uses)g(a)g(set)h(of)f(in)m(ternal)h(bu\013er)e(whic)m(h)h (b)m(y)g(default)g(can)g(store)h(40)g(FITS)e(blo)s(c)m(ks,)i(or)g(ab)s (out)e(100K)i(b)m(ytes)0 3427 y(of)f(the)f(FITS)g(\014le.)43 b(The)31 b(application)i(program)e(m)m(ust)g(pro)s(cess)g(the)h(FITS)e (\014le)i(sequen)m(tially)h(from)e(b)s(eginning)0 3539 y(to)h(end,)e(within)g(this)h(100K)h(bu\013er.)41 b(Generally)32 b(sp)s(eaking)f(the)g(application)h(program)f(m)m(ust)f(conform)h(to)h (the)0 3652 y(follo)m(wing)g(restrictions:)136 3891 y Fc(\017)46 b Fj(The)36 b(program)f(m)m(ust)h(\014nish)e(reading)i(or)g (writing)f(the)h(header)g(k)m(eyw)m(ords)g(b)s(efore)f(reading)h(or)g (writing)227 4004 y(an)m(y)31 b(data)g(in)f(the)h(HDU.)136 4184 y Fc(\017)46 b Fj(The)24 b(HDU)h(can)f(con)m(tain)i(at)e(most)h (ab)s(out)f(1400)h(header)f(k)m(eyw)m(ords.)39 b(This)24 b(is)g(the)g(maxim)m(um)g(that)h(can)f(\014t)227 4297 y(in)g(the)g(nominal)h(40)g(FITS)e(blo)s(c)m(k)i(bu\013er.)37 b(In)24 b(principle,)h(this)f(limit)h(could)f(b)s(e)g(increased)g(b)m (y)g(recompiling)227 4410 y(CFITSIO)29 b(with)h(a)h(larger)g(bu\013er)e (limit,)j(whic)m(h)e(is)g(set)h(b)m(y)f(the)h(NIOBUF)g(parameter)g(in)f (\014tsio2.h.)136 4590 y Fc(\017)46 b Fj(The)32 b(program)g(m)m(ust)f (read)h(or)g(write)h(the)f(data)g(in)g(a)g(sequen)m(tial)i(manner)d (from)h(the)g(b)s(eginning)f(to)i(the)227 4703 y(end)26 b(of)g(the)h(HDU.)g(Note)h(that)f(CFITSIO's)e(in)m(ternal)i(100K)g (bu\013er)e(allo)m(ws)j(a)e(little)j(latitude)e(in)f(meeting)227 4816 y(this)31 b(requiremen)m(t.)136 4997 y Fc(\017)46 b Fj(The)30 b(program)g(cannot)h(mo)m(v)m(e)h(bac)m(k)f(to)g(a)g (previous)f(HDU)h(in)f(the)h(FITS)e(\014le.)136 5177 y Fc(\017)46 b Fj(Reading)c(or)f(writing)f(of)h(v)-5 b(ariable)42 b(length)f(arra)m(y)h(columns)e(in)h(binary)f(tables)i(is) f(not)g(supp)s(orted)e(on)227 5290 y(streams,)29 b(b)s(ecause)f(this)g (requires)g(mo)m(ving)g(bac)m(k)h(and)f(forth)f(b)s(et)m(w)m(een)i(the) f(\014xed-length)g(p)s(ortion)g(of)g(the)227 5403 y(binary)i(table)h (and)f(the)g(follo)m(wing)i(heap)e(area)i(where)e(the)g(arra)m(ys)h (are)g(actually)h(stored.)136 5583 y Fc(\017)46 b Fj(Reading)25 b(or)g(writing)f(of)h(tile-compressed)h(images)g(is)e(not)h(supp)s (orted)e(on)h(streams,)i(b)s(ecause)f(the)g(images)227 5696 y(are)31 b(in)m(ternally)g(stored)g(using)f(v)-5 b(ariable)31 b(length)g(arra)m(ys.)p eop end %%Page: 122 130 TeXDict begin 122 129 bop 0 299 a Fj(122)1528 b Fh(CHAPTER)29 b(10.)113 b(EXTENDED)30 b(FILE)h(NAME)f(SYNT)-8 b(AX)0 555 y Fd(10.2.3)113 b(Notes)36 b(ab)s(out)j(the)e(gsiftp)h(\014let)m (yp)s(e)0 774 y Fj(DEPENDENCIES:)c(Globus)h(to)s(olkit)h(\(2.4.3)g(or)f (higher\))f(\(GT\))h(should)f(b)s(e)g(installed.)53 b(There)34 b(are)h(t)m(w)m(o)h(dif-)0 887 y(feren)m(t)31 b(w)m(a)m(ys)g(to)g (install)g(GT:)0 1047 y(1\))43 b(goto)h(the)f(globus)f(to)s(olkit)i(w)m (eb)e(page)i(www.globus.org)e(and)g(follo)m(w)h(the)g(do)m(wnload)g (and)e(compilation)0 1160 y(instructions;)0 1320 y(2\))j(goto)i(the)d (Virtual)i(Data)g(T)-8 b(o)s(olkit)45 b(w)m(eb)e(page)i(h)m (ttp://vdt.cs.wisc.edu/)g(and)e(follo)m(w)i(the)f(instructions)0 1433 y(\(STR)m(ONGL)-8 b(Y)31 b(SUGGESTED\);)0 1593 y(Once)23 b(a)h(globus)f(clien)m(t)h(has)f(b)s(een)g(installed)h(in)e(y)m(our)i (system)f(with)g(a)g(sp)s(eci\014c)g(\015a)m(v)m(our)h(it)f(is)g(p)s (ossible)g(to)h(compile)0 1706 y(and)30 b(install)h(the)g(CFITSIO)d (libraries.)41 b(Sp)s(eci\014c)30 b(con\014guration)h(\015ags)f(m)m (ust)h(b)s(e)e(used:)0 1866 y(1\))21 b({with-gsiftp[[=P)-8 b(A)g(TH]])22 b(Enable)f(Globus)f(T)-8 b(o)s(olkit)21 b(gsiftp)g(proto)s(col)g(supp)s(ort)d(P)-8 b(A)g(TH=GLOBUS)p 3532 1866 28 4 v 33 w(LOCA)g(TION)0 1979 y(i.e.)42 b(the)30 b(lo)s(cation)i(of)f(y)m(our)f(globus)g(installation)0 2139 y(2\))h({with-gsiftp-\015a)m(v)m(our[[=P)-8 b(A)g(TH])33 b(de\014nes)d(the)g(sp)s(eci\014c)g(Globus)h(\015a)m(v)m(our)f(ex.)41 b(gcc32)0 2300 y(Both)31 b(the)g(\015ags)f(m)m(ust)g(b)s(e)g(used)g (and)f(it)i(is)g(mandatory)f(to)h(set)g(b)s(oth)f(the)g(P)-8 b(A)g(TH)31 b(and)f(the)h(\015a)m(v)m(our.)0 2460 y(USA)m(GE:)g(T)-8 b(o)31 b(access)h(\014les)e(on)g(a)h(gridftp)f(serv)m(er)g(it)h(is)g (necessary)f(to)i(use)e(a)g(gsiftp)h(pre\014x:)0 2620 y(example:)41 b(gsiftp://remote)p 1003 2620 V 35 w(serv)m(er)p 1271 2620 V 34 w(fqhn/directory/\014lename)0 2780 y(The)f(gridftp)g (driv)m(er)g(uses)g(a)g(lo)s(cal)i(bu\013er)d(on)i(a)f(temp)s(orary)g (\014le)h(the)f(\014le)h(is)f(lo)s(cated)i(in)e(the)g(/tmp)h(direc-)0 2893 y(tory)-8 b(.)73 b(If)40 b(y)m(ou)h(ha)m(v)m(e)h(sp)s(ecial)g(p)s (ermissions)d(on)i(/tmp)g(or)g(y)m(ou)g(do)f(not)i(ha)m(v)m(e)g(a)f (/tmp)g(directory)-8 b(,)44 b(it)e(is)e(p)s(os-)0 3006 y(sible)d(to)h(force)g(another)g(lo)s(cation)g(setting)h(the)e(GSIFTP)p 2068 3006 V 32 w(TMPFILE)g(en)m(vironmen)m(t)h(v)-5 b(ariable)38 b(\(ex.)62 b(exp)s(ort)0 3119 y(GSIFTP)p 347 3119 V 32 w(TMPFILE=/y)m(our/lo)s(cation/y)m(ourtmp\014le\).)0 3279 y(Grid)34 b(FTP)g(supp)s(orts)f(m)m(ulti)h(c)m(hannel)h(transfer.) 52 b(By)35 b(default)f(a)h(single)g(c)m(hannel)g(transmission)f(is)g(a) m(v)-5 b(ailable.)0 3392 y(Ho)m(w)m(ev)m(er,)34 b(it)d(is)h(p)s (ossible)e(to)i(mo)s(dify)e(this)i(b)s(eha)m(vior)f(setting)h(the)f (GSIFTP)p 2691 3392 V 33 w(STREAMS)f(en)m(vironmen)m(t)h(v)-5 b(ari-)0 3505 y(able)31 b(\(ex.)41 b(exp)s(ort)30 b(GSIFTP)p 1016 3505 V 33 w(STREAMS=8\).)0 3790 y Fd(10.2.4)113 b(Notes)36 b(ab)s(out)j(the)e(ro)s(ot)g(\014let)m(yp)s(e)0 4009 y Fj(The)20 b(original)j(ro)s(otd)d(serv)m(er)h(can)h(b)s(e)e (obtained)h(from:)36 b Fe(ftp://root.cern.ch/root)o(/roo)o(td.t)o(ar.)o (gz)15 b Fj(but,)22 b(for)0 4122 y(it)33 b(to)h(w)m(ork)f(correctly)h (with)e(CFITSIO)g(one)h(has)f(to)i(use)e(a)i(mo)s(di\014ed)d(v)m (ersion)j(whic)m(h)e(supp)s(orts)f(a)i(command)0 4235 y(to)41 b(return)d(the)j(length)f(of)g(the)g(\014le.)70 b(This)39 b(mo)s(di\014ed)f(v)m(ersion)j(is)f(a)m(v)-5 b(ailable)42 b(in)e(ro)s(otd)f(sub)s(directory)g(in)h(the)0 4348 y(CFITSIO)29 b(ftp)h(area)h(at)286 4577 y Fe (ftp://legacy.gsfc.nasa.gov)o(/so)o(ftwa)o(re/f)o(its)o(io/c)o(/roo)o (t/r)o(ootd)o(.tar)o(.gz)o(.)0 4805 y Fj(This)j(small)g(serv)m(er)h(is) g(started)f(either)h(b)m(y)g(inetd)f(when)f(a)i(clien)m(t)h(requests)e (a)h(connection)h(to)f(a)f(ro)s(otd)h(serv)m(er)0 4918 y(or)30 b(b)m(y)g(hand)f(\(i.e.)42 b(from)30 b(the)g(command)g(line\).) 42 b(The)29 b(ro)s(otd)h(serv)m(er)h(w)m(orks)f(with)g(the)g(R)m(OOT)g (TNetFile)i(class.)0 5031 y(It)e(allo)m(ws)g(remote)h(access)f(to)h(R)m (OOT)e(database)h(\014les)f(in)g(either)h(read)g(or)f(write)h(mo)s(de.) 40 b(By)30 b(default)f(TNetFile)0 5144 y(assumes)38 b(p)s(ort)g(432)h (\(whic)m(h)f(requires)g(ro)s(otd)g(to)h(b)s(e)f(started)h(as)f(ro)s (ot\).)65 b(T)-8 b(o)39 b(run)e(ro)s(otd)h(via)h(inetd)f(add)g(the)0 5257 y(follo)m(wing)32 b(line)f(to)g(/etc/services:)95 5485 y Fe(rootd)238 b(432/tcp)0 5714 y Fj(and)30 b(to)h (/etc/inetd.conf,)i(add)d(the)g(follo)m(wing)i(line:)p eop end %%Page: 123 131 TeXDict begin 123 130 bop 0 299 a Fh(10.2.)73 b(FILETYPE)3037 b Fj(123)95 555 y Fe(rootd)47 b(stream)f(tcp)h(nowait)f(root)h (/user/rdm/root/bin/root)o(d)42 b(rootd)k(-i)0 829 y Fj(F)-8 b(orce)30 b(inetd)e(to)h(reread)f(its)h(conf)f(\014le)g(with)g Fe(kill)47 b(-HUP)g()p Fj(.)39 b(Y)-8 b(ou)28 b(can)h(also)g(start)g(ro)s(otd)f(b)m(y)g(hand)0 942 y(running)35 b(directly)i(under)d(y)m(our)j(priv)-5 b(ate)37 b(accoun)m(t)g(\(no)g(ro)s(ot)g(system)f(privileges)h(needed\).)59 b(F)-8 b(or)37 b(example)g(to)0 1054 y(start)e(ro)s(otd)g(listening)g (on)g(p)s(ort)f(5151)j(just)d(t)m(yp)s(e:)49 b Fe(rootd)e(-p)g(5151)33 b Fj(Notice)k(that)f(no)e(&)h(is)f(needed.)54 b(Ro)s(otd)0 1167 y(will)31 b(go)g(in)m(to)g(bac)m(kground)f(b)m(y)h(itself.)95 1441 y Fe(Rootd)47 b(arguments:)191 1554 y(-i)763 b(says)47 b(we)g(were)f(started)g(by)h(inetd)191 1667 y(-p)g(port#)476 b(specifies)45 b(a)j(different)d(port)i(to)g(listen)f(on)191 1780 y(-d)h(level)476 b(level)46 b(of)i(debug)e(info)h(written)e(to)j (syslog)1050 1893 y(0)f(=)h(no)f(debug)f(\(default\))1050 2005 y(1)h(=)h(minimum)1050 2118 y(2)f(=)h(medium)1050 2231 y(3)f(=)h(maximum)0 2505 y Fj(Ro)s(otd)29 b(can)f(also)h(b)s(e)f (con\014gured)g(for)g(anon)m(ymous)g(usage)h(\(lik)m(e)h(anon)m(ymous)e (ftp\).)40 b(T)-8 b(o)29 b(setup)f(ro)s(otd)g(to)h(accept)0 2618 y(anon)m(ymous)h(logins)h(do)g(the)f(follo)m(wing)i(\(while)f(b)s (eing)f(logged)i(in)e(as)g(ro)s(ot\):)143 2891 y Fe(-)48 b(Add)f(the)f(following)g(line)g(to)i(/etc/passwd:)239 3117 y(rootd:*:71:72:Anonymous)41 b(rootd:/var/spool/rootd:/b)o(in/)o (fals)o(e)239 3343 y(where)46 b(you)h(may)g(modify)f(the)h(uid,)f(gid)h (\(71,)g(72\))g(and)g(the)g(home)f(directory)239 3456 y(to)h(suite)f(your)h(system.)143 3681 y(-)h(Add)f(the)f(following)g (line)g(to)i(/etc/group:)239 3907 y(rootd:*:72:rootd)239 4133 y(where)e(the)h(gid)g(must)f(match)h(the)g(gid)g(in)g (/etc/passwd.)143 4359 y(-)h(Create)e(the)h(directories:)239 4585 y(mkdir)f(/var/spool/rootd)239 4698 y(mkdir)g (/var/spool/rootd/tmp)239 4811 y(chmod)g(777)h(/var/spool/rootd/tmp)239 5036 y(Where)f(/var/spool/rootd)d(must)k(match)f(the)h(rootd)g(home)f (directory)g(as)239 5149 y(specified)f(in)i(the)g(rootd)f(/etc/passwd)f (entry.)143 5375 y(-)j(To)f(make)f(writeable)g(directories)e(for)j (anonymous)f(do,)h(for)f(example:)239 5601 y(mkdir)g (/var/spool/rootd/pub)239 5714 y(chown)g(rootd:rootd)f (/var/spool/rootd/pub)p eop end %%Page: 124 132 TeXDict begin 124 131 bop 0 299 a Fj(124)1528 b Fh(CHAPTER)29 b(10.)113 b(EXTENDED)30 b(FILE)h(NAME)f(SYNT)-8 b(AX)0 555 y Fj(That's)42 b(all.)76 b(Sev)m(eral)43 b(additional)g(remarks:)64 b(y)m(ou)42 b(can)g(login)h(to)g(an)f(anon)m(ymous)f(serv)m(er)i (either)f(with)g(the)0 668 y(names)31 b("anon)m(ymous")h(or)f("ro)s (otd".)43 b(The)31 b(passw)m(ord)f(should)g(b)s(e)h(of)g(t)m(yp)s(e)g (user@host.do.main.)43 b(Only)30 b(the)h(@)0 781 y(is)e(enforced)f(for) h(the)f(time)i(b)s(eing.)39 b(In)28 b(anon)m(ymous)h(mo)s(de)f(the)g (top)h(of)g(the)g(\014le)f(tree)i(is)e(set)h(to)h(the)e(ro)s(otd)h (home)0 894 y(directory)-8 b(,)39 b(therefore)e(only)f(\014les)h(b)s (elo)m(w)f(the)h(home)f(directory)h(can)f(b)s(e)g(accessed.)60 b(Anon)m(ymous)36 b(mo)s(de)g(only)0 1007 y(w)m(orks)30 b(when)g(the)g(serv)m(er)h(is)f(started)h(via)g(inetd.)0 1296 y Fd(10.2.5)113 b(Notes)36 b(ab)s(out)j(the)e(shmem)i(\014let)m (yp)s(e:)0 1515 y Fj(Shared)34 b(memory)h(\014les)g(are)g(curren)m(tly) g(supp)s(orted)e(on)i(most)h(Unix)f(platforms,)h(where)f(the)g(shared)f (memory)0 1627 y(segmen)m(ts)d(are)g(managed)g(b)m(y)f(the)g(op)s (erating)h(system)g(k)m(ernel)f(and)g(`liv)m(e')i(indep)s(enden)m(tly)d (of)i(pro)s(cesses.)40 b(They)0 1740 y(are)34 b(not)g(deleted)h(\(b)m (y)f(default\))g(when)f(the)h(pro)s(cess)f(whic)m(h)h(created)h(them)f (terminates,)h(although)g(they)f(will)0 1853 y(disapp)s(ear)e(if)h(the) h(system)f(is)g(reb)s(o)s(oted.)49 b(Applications)34 b(can)g(create)h(shared)d(memory)h(\014les)g(in)g(CFITSIO)f(b)m(y)0 1966 y(calling:)143 2214 y Fe(fit_create_file\(&fitsfile)o(ptr,)41 b("shmem://h2",)j(&status\);)0 2462 y Fj(where)25 b(the)g(ro)s(ot)h (`\014le')f(names)h(are)f(curren)m(tly)g(restricted)h(to)g(b)s(e)f ('h0',)i('h1',)g('h2',)g('h3',)f(etc.,)i(up)d(to)g(a)h(maxim)m(um)0 2575 y(n)m(um)m(b)s(er)20 b(de\014ned)f(b)m(y)i(the)g(the)g(v)-5 b(alue)22 b(of)f(SHARED)p 1746 2575 28 4 v 33 w(MAXSEG)g(\(equal)h(to)f (16)h(b)m(y)f(default\).)38 b(This)20 b(is)h(a)g(protot)m(yp)s(e)0 2688 y(implemen)m(tation)30 b(of)f(the)g(shared)f(memory)g(in)m (terface)i(and)e(a)h(more)g(robust)f(in)m(terface,)j(whic)m(h)d(will)h (ha)m(v)m(e)h(few)m(er)0 2801 y(restrictions)h(on)f(the)h(n)m(um)m(b)s (er)e(of)i(\014les)f(and)g(on)g(their)g(names,)h(ma)m(y)g(b)s(e)f(dev)m (elop)s(ed)g(in)g(the)h(future.)0 2961 y(When)23 b(op)s(ening)h(an)f (already)h(existing)h(FITS)e(\014le)h(in)f(shared)g(memory)h(one)g (calls)g(the)g(usual)g(CFITSIO)e(routine:)143 3209 y Fe(fits_open_file\(&fitsfilep)o(tr,)41 b("shmem://h7",)j(mode,)j (&status\))0 3457 y Fj(The)26 b(\014le)h(mo)s(de)g(can)g(b)s(e)f(READ)m (WRITE)h(or)g(READONL)-8 b(Y)28 b(just)e(as)h(with)f(disk)h(\014les.)39 b(More)28 b(than)e(one)h(pro)s(cess)0 3570 y(can)35 b(op)s(erate)g(on)f (READONL)-8 b(Y)35 b(mo)s(de)f(\014les)h(at)g(the)f(same)h(time.)54 b(CFITSIO)33 b(supp)s(orts)f(prop)s(er)h(\014le)i(lo)s(c)m(king)0 3682 y(\(b)s(oth)27 b(in)h(READONL)-8 b(Y)29 b(and)e(READ)m(WRITE)h(mo) s(des\),)h(so)f(calls)h(to)f(\014ts)p 2572 3682 V 33 w(op)s(en)p 2795 3682 V 32 w(\014le)g(ma)m(y)g(b)s(e)f(lo)s(c)m(k)m(ed) j(out)e(un)m(til)0 3795 y(another)j(other)f(pro)s(cess)g(closes)i(the)e (\014le.)0 3956 y(When)g(an)g(application)i(is)e(\014nished)f (accessing)j(a)e(FITS)g(\014le)g(in)g(a)h(shared)e(memory)h(segmen)m (t,)i(it)f(ma)m(y)g(close)g(it)0 4068 y(\(and)j(the)g(\014le)g(will)g (remain)f(in)h(the)g(system\))g(with)g(\014ts)p 1955 4068 V 32 w(close)p 2173 4068 V 34 w(\014le,)h(or)f(delete)h(it)g(with) e(\014ts)p 3191 4068 V 33 w(delete)p 3455 4068 V 34 w(\014le.)51 b(Ph)m(ys-)0 4181 y(ical)36 b(deletion)g(is)f(p)s(ostp)s(oned)e(un)m (til)j(the)f(last)g(pro)s(cess)g(calls)h(\013clos/\013delt.)56 b(\014ts)p 2801 4181 V 32 w(delete)p 3064 4181 V 34 w(\014le)35 b(tries)h(to)f(obtain)h(a)0 4294 y(READ)m(WRITE)e(lo)s(c)m(k)g(on)f (the)g(\014le)h(to)g(b)s(e)e(deleted,)j(th)m(us)e(it)h(can)f(b)s(e)g (blo)s(c)m(k)m(ed)h(if)f(the)h(ob)5 b(ject)34 b(w)m(as)f(not)h(op)s (ened)0 4407 y(in)c(READ)m(WRITE)h(mo)s(de.)0 4567 y(A)i(shared)f (memory)h(managemen)m(t)h(utilit)m(y)g(program)f(called)h(`smem',)f(is) g(included)f(with)h(the)g(CFITSIO)e(dis-)0 4680 y(tribution.)39 b(It)27 b(can)g(b)s(e)f(built)h(b)m(y)g(t)m(yping)g(`mak)m(e)h(smem';)g (then)f(t)m(yp)s(e)g(`smem)f(-h')h(to)h(get)g(a)f(list)g(of)g(v)-5 b(alid)27 b(options.)0 4793 y(Executing)37 b(smem)f(without)g(an)m(y)h (options)g(causes)f(it)h(to)g(list)g(all)g(the)g(shared)e(memory)i (segmen)m(ts)g(curren)m(tly)0 4906 y(residing)c(in)g(the)g(system)h (and)e(managed)i(b)m(y)f(the)h(shared)e(memory)h(driv)m(er.)49 b(T)-8 b(o)34 b(get)g(a)g(list)g(of)f(all)h(the)g(shared)0 5019 y(memory)c(ob)5 b(jects,)32 b(run)d(the)h(system)h(utilit)m(y)g (program)f(`ip)s(cs)h([-a]'.)0 5351 y Ff(10.3)136 b(Base)45 b(Filename)0 5601 y Fj(The)31 b(base)g(\014lename)h(is)f(the)h(name)f (of)h(the)f(\014le)h(optionally)g(including)f(the)h(director/sub)s (directory)f(path,)h(and)0 5714 y(in)e(the)h(case)g(of)g(`ftp',)f(`h)m (ttp',)i(and)d(`ro)s(ot')j(\014let)m(yp)s(es,)e(the)h(mac)m(hine)g (iden)m(ti\014er.)41 b(Examples:)p eop end %%Page: 125 133 TeXDict begin 125 132 bop 0 299 a Fh(10.3.)73 b(BASE)30 b(FILENAME)2739 b Fj(125)191 555 y Fe(myfile.fits)191 668 y(!data.fits)191 781 y(/data/myfile.fits)191 894 y(fits.gsfc.nasa.gov/ftp/s)o(ampl)o(eda)o(ta/m)o(yfil)o(e.f)o(its.)o (gz)0 1120 y Fj(When)29 b(creating)h(a)f(new)f(output)h(\014le)g(on)g (magnetic)h(disk)e(\(of)i(t)m(yp)s(e)f(\014le://\))h(if)f(the)g(base)g (\014lename)g(b)s(egins)f(with)0 1233 y(an)34 b(exclamation)j(p)s(oin)m (t)d(\(!\))54 b(then)34 b(an)m(y)g(existing)i(\014le)e(with)g(that)h (same)g(basename)g(will)g(b)s(e)e(deleted)i(prior)f(to)0 1346 y(creating)h(the)f(new)g(FITS)f(\014le.)51 b(Otherwise)34 b(if)g(the)g(\014le)g(to)g(b)s(e)g(created)h(already)f(exists,)i(then)d (CFITSIO)g(will)0 1459 y(return)g(an)h(error)f(and)g(will)i(not)f(o)m (v)m(erwrite)h(the)f(existing)h(\014le.)52 b(Note)35 b(that)g(the)f(exclamation)i(p)s(oin)m(t,)f(')10 b(!',)36 b(is)e(a)0 1572 y(sp)s(ecial)28 b(UNIX)g(c)m(haracter,)j(so)d(if)f(it)i (is)f(used)f(on)g(the)h(command)g(line)g(rather)g(than)f(en)m(tered)h (at)h(a)f(task)h(prompt,)0 1685 y(it)j(m)m(ust)f(b)s(e)g(preceded)g(b)m (y)h(a)g(bac)m(kslash)g(to)g(force)g(the)g(UNIX)g(shell)f(to)h(pass)f (it)i(v)m(erbatim)f(to)g(the)g(application)0 1798 y(program.)0 1958 y(If)24 b(the)i(output)e(disk)h(\014le)g(name)g(ends)f(with)g(the) h(su\016x)f('.gz',)k(then)d(CFITSIO)e(will)i(compress)g(the)g(\014le)g (using)g(the)0 2071 y(gzip)g(compression)f(algorithm)h(b)s(efore)f (writing)g(it)h(to)g(disk.)38 b(This)23 b(can)i(reduce)f(the)g(amoun)m (t)h(of)f(disk)g(space)h(used)0 2184 y(b)m(y)34 b(the)h(\014le.)53 b(Note)36 b(that)f(this)g(feature)g(requires)f(that)h(the)f (uncompressed)g(\014le)g(b)s(e)g(constructed)h(in)f(memory)0 2297 y(b)s(efore)c(it)h(is)f(compressed)g(and)g(written)h(to)g(disk,)f (so)g(it)h(can)g(fail)g(if)f(there)h(is)f(insu\016cien)m(t)h(a)m(v)-5 b(ailable)33 b(memory)-8 b(.)0 2457 y(An)45 b(input)g(FITS)f(\014le)i (ma)m(y)g(b)s(e)f(compressed)g(with)h(the)f(gzip)h(or)g(Unix)f (compress)h(algorithms,)k(in)45 b(whic)m(h)0 2570 y(case)38 b(CFITSIO)e(will)i(uncompress)e(the)i(\014le)g(on)f(the)h(\015y)e(in)m (to)j(a)f(temp)s(orary)f(\014le)g(\(in)h(memory)f(or)g(on)h(disk\).)0 2683 y(Compressed)32 b(\014les)i(ma)m(y)g(only)f(b)s(e)g(op)s(ened)f (with)h(read-only)h(p)s(ermission.)49 b(When)33 b(sp)s(ecifying)g(the)h (name)f(of)h(a)0 2796 y(compressed)h(FITS)g(\014le)h(it)g(is)g(not)g (necessary)g(to)g(app)s(end)e(the)i(\014le)g(su\016x)e(\(e.g.,)39 b(`.gz')e(or)f(`.Z'\).)g(If)f(CFITSIO)0 2908 y(cannot)24 b(\014nd)e(the)h(input)f(\014le)i(name)f(without)g(the)g(su\016x,)h (then)f(it)h(will)g(automatically)i(searc)m(h)e(for)f(a)g(compressed)0 3021 y(\014le)36 b(with)f(the)h(same)g(ro)s(ot)g(name.)57 b(In)35 b(the)h(case)h(of)f(reading)g(ftp)f(and)g(h)m(ttp)h(t)m(yp)s(e) g(\014les,)h(CFITSIO)e(generally)0 3134 y(lo)s(oks)j(for)g(a)g (compressed)g(v)m(ersion)g(of)g(the)g(\014le)g(\014rst,)h(b)s(efore)e (trying)h(to)h(op)s(en)e(the)h(uncompressed)e(\014le.)64 b(By)0 3247 y(default,)37 b(CFITSIO)e(copies)h(\(and)g(uncompressed)e (if)i(necessary\))g(the)g(ftp)f(or)h(h)m(ttp)g(FITS)f(\014le)g(in)m(to) i(memory)0 3360 y(on)f(the)g(lo)s(cal)h(mac)m(hine)f(b)s(efore)g(op)s (ening)f(it.)58 b(This)35 b(will)h(fail)g(if)g(the)g(lo)s(cal)h(mac)m (hine)g(do)s(es)e(not)h(ha)m(v)m(e)h(enough)0 3473 y(memory)g(to)h (hold)f(the)g(whole)h(FITS)e(\014le,)k(so)d(in)g(this)g(case,)k(the)c (output)g(\014lename)g(sp)s(eci\014er)g(\(see)h(the)g(next)0 3586 y(section\))32 b(can)f(b)s(e)e(used)h(to)h(further)e(con)m(trol)j (ho)m(w)e(CFITSIO)f(reads)h(ftp)g(and)g(h)m(ttp)g(\014les.)0 3746 y(If)i(the)h(input)f(\014le)h(is)g(an)g(IRAF)g(image)h(\014le)f (\(*.imh)g(\014le\))h(then)e(CFITSIO)f(will)j(automatically)h(con)m(v)m (ert)g(it)e(on)0 3859 y(the)27 b(\015y)g(in)m(to)h(a)g(virtual)f(FITS)f (image)j(b)s(efore)e(it)g(is)g(op)s(ened)g(b)m(y)g(the)g(application)i (program.)39 b(IRAF)27 b(images)i(can)0 3972 y(only)h(b)s(e)g(op)s (ened)g(with)g(READONL)-8 b(Y)31 b(\014le)f(access.)0 4132 y(Similarly)-8 b(,)32 b(if)f(the)g(input)f(\014le)i(is)f(a)g(ra)m (w)g(binary)f(data)i(arra)m(y)-8 b(,)33 b(then)d(CFITSIO)g(will)h(con)m (v)m(ert)i(it)e(on)g(the)h(\015y)e(in)m(to)0 4245 y(a)38 b(virtual)g(FITS)g(image)h(with)e(the)h(basic)h(set)f(of)g(required)f (header)h(k)m(eyw)m(ords)g(b)s(efore)g(it)g(is)g(op)s(ened)f(b)m(y)h (the)0 4358 y(application)32 b(program)f(\(with)g(READONL)-8 b(Y)31 b(access\).)44 b(In)30 b(this)h(case)h(the)f(data)g(t)m(yp)s(e)g (and)g(dimensions)f(of)h(the)0 4471 y(image)d(m)m(ust)f(b)s(e)f(sp)s (eci\014ed)g(in)h(square)g(brac)m(k)m(ets)h(follo)m(wing)g(the)f (\014lename)g(\(e.g.)41 b(ra)m(w\014le.dat[ib512,512]\).)j(The)0 4584 y(\014rst)30 b(c)m(haracter)i(\(case)f(insensitiv)m(e\))h (de\014nes)e(the)g(data)h(t)m(yp)s(e)g(of)f(the)h(arra)m(y:)239 4810 y Fe(b)429 b(8-bit)46 b(unsigned)g(byte)239 4923 y(i)381 b(16-bit)46 b(signed)g(integer)239 5036 y(u)381 b(16-bit)46 b(unsigned)g(integer)239 5149 y(j)381 b(32-bit)46 b(signed)g(integer)239 5262 y(r)h(or)g(f)143 b(32-bit)46 b(floating)g(point)239 5375 y(d)381 b(64-bit)46 b(floating)g(point)0 5601 y Fj(An)40 b(optional)h(second)f(c)m(haracter)i(sp)s(eci\014es)e (the)h(b)m(yte)f(order)g(of)g(the)h(arra)m(y)g(v)-5 b(alues:)60 b(b)40 b(or)g(B)h(indicates)g(big)0 5714 y(endian)30 b(\(as)g(in)g(FITS)f(\014les)h(and)f(the)h(nativ)m(e)i(format)e(of)g (SUN)g(UNIX)g(w)m(orkstations)h(and)f(Mac)h(PCs\))e(and)h(l)g(or)p eop end %%Page: 126 134 TeXDict begin 126 133 bop 0 299 a Fj(126)1528 b Fh(CHAPTER)29 b(10.)113 b(EXTENDED)30 b(FILE)h(NAME)f(SYNT)-8 b(AX)0 555 y Fj(L)27 b(indicates)i(little)g(endian)e(\(nativ)m(e)j(format)d (of)h(DEC)g(OSF)f(w)m(orkstations)h(and)f(IBM)h(PCs\).)40 b(If)27 b(this)g(c)m(haracter)0 668 y(is)f(omitted)g(then)f(the)h(arra) m(y)g(is)g(assumed)f(to)h(ha)m(v)m(e)h(the)f(nativ)m(e)g(b)m(yte)h (order)e(of)h(the)f(lo)s(cal)i(mac)m(hine.)40 b(These)25 b(data)0 781 y(t)m(yp)s(e)35 b(c)m(haracters)h(are)g(then)e(follo)m(w)m (ed)j(b)m(y)d(a)i(series)f(of)g(one)g(or)g(more)g(in)m(teger)h(v)-5 b(alues)35 b(separated)h(b)m(y)e(commas)0 894 y(whic)m(h)41 b(de\014ne)f(the)h(size)h(of)f(eac)m(h)h(dimension)f(of)g(the)g(ra)m(w) g(arra)m(y)-8 b(.)74 b(Arra)m(ys)41 b(with)f(up)g(to)i(5)f(dimensions)g (are)0 1007 y(curren)m(tly)31 b(supp)s(orted.)41 b(Finally)-8 b(,)33 b(a)e(b)m(yte)h(o\013set)g(to)g(the)f(p)s(osition)h(of)f(the)g (\014rst)f(pixel)i(in)f(the)g(data)h(\014le)f(ma)m(y)h(b)s(e)0 1120 y(sp)s(eci\014ed)h(b)m(y)g(separating)i(it)f(with)f(a)h(':')48 b(from)33 b(the)h(last)g(dimension)f(v)-5 b(alue.)51 b(If)33 b(omitted,)j(it)e(is)f(assumed)g(that)0 1233 y(the)i(o\013set)h(=)f(0.)54 b(This)35 b(parameter)g(ma)m(y)h(b)s(e)e (used)g(to)i(skip)e(o)m(v)m(er)i(an)m(y)g(header)e(information)i(in)e (the)h(\014le)g(that)0 1346 y(precedes)30 b(the)h(binary)f(data.)41 b(F)-8 b(urther)30 b(examples:)95 1603 y Fe(raw.dat[b10000])521 b(1-dimensional)45 b(10000)h(pixel)g(byte)h(array)95 1715 y(raw.dat[rb400,400,12])233 b(3-dimensional)45 b(floating)g(point) h(big-endian)f(array)95 1828 y(img.fits[ib512,512:2880])89 b(reads)47 b(the)g(512)g(x)g(512)g(short)f(integer)g(array)g(in)1336 1941 y(a)i(FITS)e(file,)h(skipping)e(over)i(the)g(2880)g(byte)f(header) 0 2198 y Fj(One)25 b(sp)s(ecial)g(case)h(of)f(input)f(\014le)h(is)g (where)g(the)g(\014lename)g(=)g(`-')h(\(a)f(dash)g(or)g(min)m(us)f (sign\))h(or)g('stdin')g(or)g('stdout',)0 2311 y(whic)m(h)d (signi\014es)h(that)h(the)f(input)e(\014le)i(is)g(to)h(b)s(e)e(read)g (from)h(the)g(stdin)f(stream,)j(or)e(written)f(to)i(the)f(stdout)g (stream)0 2424 y(if)34 b(a)g(new)g(output)f(\014le)h(is)g(b)s(eing)g (created.)52 b(In)33 b(the)h(case)h(of)f(reading)h(from)e(stdin,)h (CFITSIO)f(\014rst)g(copies)i(the)0 2537 y(whole)g(stream)h(in)m(to)g (a)f(temp)s(orary)g(FITS)f(\014le)i(\(in)f(memory)g(or)g(on)g(disk\),)h (and)f(subsequen)m(t)f(reading)h(of)h(the)0 2650 y(FITS)c(\014le)h(o)s (ccurs)g(in)f(this)h(cop)m(y)-8 b(.)49 b(When)33 b(writing)g(to)g (stdout,)h(CFITSIO)d(\014rst)h(constructs)h(the)g(whole)g(\014le)g(in)0 2763 y(memory)h(\(since)i(random)d(access)j(is)e(required\),)i(then)e (\015ushes)f(it)i(out)g(to)g(the)f(stdout)h(stream)g(when)e(the)i (\014le)0 2876 y(is)30 b(closed.)42 b(In)29 b(addition,)i(if)f(the)g (output)g(\014lename)g(=)g('-.gz')i(or)e('stdout.gz')h(then)f(it)h (will)f(b)s(e)g(gzip)g(compressed)0 2989 y(b)s(efore)g(b)s(eing)g (written)g(to)h(stdout.)0 3149 y(This)25 b(abilit)m(y)j(to)e(read)g (and)f(write)h(on)g(the)g(stdin)g(and)f(stdout)h(steams)g(allo)m(ws)i (FITS)d(\014les)h(to)g(b)s(e)g(pip)s(ed)e(b)s(et)m(w)m(een)0 3262 y(tasks)42 b(in)f(memory)g(rather)g(than)h(ha)m(ving)g(to)g (create)h(temp)s(orary)e(in)m(termediate)i(FITS)d(\014les)i(on)f(disk.) 73 b(F)-8 b(or)0 3375 y(example)28 b(if)e(task1)i(creates)h(an)e (output)f(FITS)g(\014le,)i(and)f(task2)g(reads)g(an)g(input)f(FITS)g (\014le,)i(the)f(FITS)f(\014le)h(ma)m(y)0 3487 y(b)s(e)j(pip)s(ed)f(b)s (et)m(w)m(een)i(the)f(2)h(tasks)g(b)m(y)f(sp)s(ecifying)143 3744 y Fe(task1)47 b(-)g(|)g(task2)g(-)0 4001 y Fj(where)30 b(the)h(v)m(ertical)i(bar)e(is)f(the)h(Unix)g(piping)f(sym)m(b)s(ol.)42 b(This)30 b(assumes)g(that)i(the)f(2)g(tasks)g(read)g(the)g(name)g(of)0 4114 y(the)g(FITS)e(\014le)i(o\013)f(of)h(the)g(command)f(line.)0 4448 y Ff(10.4)136 b(Output)44 b(File)i(Name)f(when)g(Op)t(ening)g(an)g (Existing)h(File)0 4698 y Fj(An)36 b(optional)i(output)e(\014lename)h (ma)m(y)h(b)s(e)e(sp)s(eci\014ed)g(in)g(paren)m(theses)h(immediately)h (follo)m(wing)g(the)f(base)g(\014le)0 4811 y(name)28 b(to)h(b)s(e)f(op)s(ened.)39 b(This)28 b(is)g(mainly)g(useful)g(in)g (those)g(cases)i(where)d(CFITSIO)g(creates)j(a)e(temp)s(orary)g(cop)m (y)0 4924 y(of)i(the)f(input)g(FITS)f(\014le)i(b)s(efore)f(it)h(is)f (op)s(ened)g(and)f(passed)h(to)h(the)g(application)h(program.)40 b(This)28 b(happ)s(ens)g(b)m(y)0 5036 y(default)i(when)g(op)s(ening)g (a)g(net)m(w)m(ork)h(FTP)g(or)f(HTTP-t)m(yp)s(e)g(\014le,)h(when)e (reading)h(a)h(compressed)f(FITS)g(\014le)g(on)0 5149 y(a)36 b(lo)s(cal)h(disk,)g(when)e(reading)h(from)g(the)g(stdin)f (stream,)j(or)d(when)g(a)i(column)e(\014lter,)j(ro)m(w)e(\014lter,)h (or)f(binning)0 5262 y(sp)s(eci\014er)29 b(is)g(included)g(as)h(part)f (of)g(the)h(input)f(\014le)g(sp)s(eci\014cation.)41 b(By)30 b(default)g(this)f(temp)s(orary)g(\014le)g(is)h(created)0 5375 y(in)g(memory)-8 b(.)41 b(If)29 b(there)h(is)g(not)g(enough)g (memory)g(to)h(create)g(the)g(\014le)f(cop)m(y)-8 b(,)31 b(then)f(CFITSIO)e(will)i(exit)h(with)f(an)0 5488 y(error.)45 b(In)32 b(these)g(cases)h(one)g(can)f(force)h(a)f(p)s(ermanen)m(t)g (\014le)g(to)h(b)s(e)e(created)i(on)f(disk,)g(instead)h(of)f(a)g(temp)s (orary)0 5601 y(\014le)38 b(in)f(memory)-8 b(,)40 b(b)m(y)d(supplying)f (the)i(name)g(in)f(paren)m(theses)h(immediately)h(follo)m(wing)g(the)e (base)h(\014le)g(name.)0 5714 y(The)30 b(output)g(\014lename)g(can)h (include)f(the)h(')10 b(!')41 b(clobb)s(er)30 b(\015ag.)p eop end %%Page: 127 135 TeXDict begin 127 134 bop 0 299 a Fh(10.4.)73 b(OUTPUT)29 b(FILE)h(NAME)h(WHEN)g(OPENING)f(AN)h(EXISTING)f(FILE)876 b Fj(127)0 555 y(Th)m(us,)48 b(if)d(the)g(input)f(\014lename)h(to)g (CFITSIO)f(is:)70 b Fe(file1.fits.gz\(file2.fit)o(s\))39 b Fj(then)44 b(CFITSIO)g(will)0 668 y(uncompress)39 b (`\014le1.\014ts.gz')j(in)m(to)f(the)f(lo)s(cal)h(disk)e(\014le)h (`\014le2.\014ts')h(b)s(efore)f(op)s(ening)f(it.)70 b(CFITSIO)38 b(do)s(es)i(not)0 781 y(automatically)33 b(delete)f(the)e(output)g (\014le,)h(so)g(it)g(will)f(still)i(exist)f(after)g(the)f(application)i (program)e(exits.)0 941 y(The)i(output)h(\014lename)g("mem://")i(is)e (also)h(allo)m(w)m(ed,)i(whic)m(h)c(will)i(write)f(the)g(output)f (\014le)h(in)m(to)h(memory)-8 b(,)35 b(and)0 1054 y(also)28 b(allo)m(w)g(write)f(access)h(to)g(the)f(\014le.)39 b(This)26 b('\014le')i(will)f(disapp)s(ear)f(when)g(it)h(is)g(closed,)h(but)e (this)h(ma)m(y)h(b)s(e)e(useful)0 1167 y(for)k(some)h(applications)g (whic)m(h)g(only)f(need)g(to)h(mo)s(dify)f(a)h(temp)s(orary)f(cop)m(y)h (of)f(the)h(\014le.)0 1327 y(In)k(some)i(cases,)h(sev)m(eral)f (di\013eren)m(t)g(temp)s(orary)e(FITS)h(\014les)g(will)g(b)s(e)f (created)i(in)f(sequence,)i(for)e(instance,)i(if)0 1440 y(one)f(op)s(ens)g(a)g(remote)h(\014le)f(using)g(FTP)-8 b(,)37 b(then)g(\014lters)g(ro)m(ws)g(in)g(a)h(binary)e(table)i (extension,)i(then)c(create)j(an)0 1553 y(image)f(b)m(y)f(binning)f(a)h (pair)g(of)g(columns.)60 b(In)36 b(this)h(case,)j(the)d(remote)h (\014le)f(will)g(b)s(e)f(copied)h(to)h(a)f(temp)s(orary)0 1666 y(lo)s(cal)j(\014le,)h(then)d(a)h(second)f(temp)s(orary)h(\014le)f (will)h(b)s(e)f(created)i(con)m(taining)g(the)e(\014ltered)h(ro)m(ws)f (of)h(the)g(table,)0 1779 y(and)c(\014nally)g(a)h(third)e(temp)s(orary) h(\014le)h(con)m(taining)g(the)g(binned)e(image)i(will)g(b)s(e)f (created.)57 b(In)34 b(cases)i(lik)m(e)h(this)0 1892 y(where)28 b(m)m(ultiple)h(\014les)f(are)h(created,)h(the)e(out\014le)h (sp)s(eci\014er)f(will)g(b)s(e)g(in)m(terpreted)h(the)f(name)g(of)h (the)f(\014nal)g(\014le)h(as)0 2005 y(describ)s(ed)g(b)s(elo)m(w,)i(in) f(descending)g(priorit)m(y:)136 2266 y Fc(\017)46 b Fj(as)29 b(the)g(name)g(of)g(the)g(\014nal)f(image)i(\014le)f(if)f(an)h(image)h (within)e(a)h(single)g(binary)f(table)i(cell)g(is)e(op)s(ened)g(or)h (if)227 2379 y(an)i(image)g(is)g(created)g(b)m(y)f(binning)g(a)g(table) i(column.)136 2568 y Fc(\017)46 b Fj(as)33 b(the)f(name)h(of)f(the)h (\014le)f(con)m(taining)i(the)e(\014ltered)g(table)i(if)e(a)h(column)f (\014lter)g(and/or)g(a)h(ro)m(w)f(\014lter)h(are)227 2681 y(sp)s(eci\014ed.)136 2870 y Fc(\017)46 b Fj(as)31 b(the)f(name)h(of)f(the)h(lo)s(cal)h(cop)m(y)f(of)f(the)h(remote)g(FTP) f(or)h(HTTP)e(\014le.)136 3059 y Fc(\017)46 b Fj(as)31 b(the)g(name)g(of)g(the)f(uncompressed)g(v)m(ersion)h(of)g(the)f(FITS)g (\014le,)h(if)g(a)g(compressed)f(FITS)g(\014le)h(on)g(lo)s(cal)227 3172 y(disk)f(has)g(b)s(een)g(op)s(ened.)136 3361 y Fc(\017)46 b Fj(otherwise,)31 b(the)g(output)f(\014lename)g(is)h(ignored.)0 3622 y(The)e(output)f(\014le)h(sp)s(eci\014er)g(is)g(useful)f(when)g (reading)h(FTP)g(or)g(HTTP-t)m(yp)s(e)g(FITS)f(\014les)h(since)g(it)h (can)f(b)s(e)g(used)0 3735 y(to)34 b(create)i(a)e(lo)s(cal)h(disk)e (cop)m(y)i(of)f(the)g(\014le)f(that)i(can)f(b)s(e)f(reused)g(in)g(the)h (future.)50 b(If)33 b(the)h(output)g(\014le)f(name)h(=)0 3848 y(`*')i(then)e(a)i(lo)s(cal)g(\014le)f(with)g(the)g(same)g(name)g (as)g(the)h(net)m(w)m(ork)f(\014le)g(will)h(b)s(e)e(created.)56 b(Note)36 b(that)f(CFITSIO)0 3961 y(will)30 b(b)s(eha)m(v)m(e)g (di\013eren)m(tly)h(dep)s(ending)d(on)i(whether)f(the)h(remote)g (\014le)g(is)g(compressed)f(or)h(not)g(as)g(sho)m(wn)f(b)m(y)h(the)0 4074 y(follo)m(wing)i(examples:)136 4309 y Fc(\017)46 b Fe(ftp://remote.machine/tmp/)o(myfi)o(le.f)o(its)o(.gz\()o(*\))28 b Fj(-)35 b(the)g(remote)h(compressed)e(\014le)h(is)g(copied)g(to)227 4422 y(the)d(lo)s(cal)h(compressed)f(\014le)g(`m)m(y\014le.\014ts.gz',) i(whic)m(h)d(is)h(then)g(uncompressed)e(in)i(lo)s(cal)h(memory)e(b)s (efore)227 4535 y(b)s(eing)f(op)s(ened)g(and)g(passed)f(to)j(the)e (application)i(program.)136 4724 y Fc(\017)46 b Fe (ftp://remote.machine/tmp/)o(myfi)o(le.f)o(its)o(.gz\()o(myfi)o(le.)o (fits)o(\))33 b Fj(-)39 b(the)g(remote)h(compressed)f(\014le)227 4837 y(is)d(copied)g(and)f(uncompressed)g(in)m(to)h(the)g(lo)s(cal)h (\014le)f(`m)m(y\014le.\014ts'.)57 b(This)35 b(example)h(requires)g (less)g(lo)s(cal)227 4950 y(memory)21 b(than)g(the)g(previous)f (example)i(since)f(the)g(\014le)g(is)g(uncompressed)e(on)i(disk)g (instead)g(of)g(in)f(memory)-8 b(.)136 5139 y Fc(\017)46 b Fe(ftp://remote.machine/tmp/)o(myfi)o(le.f)o(its)o(\(myf)o(ile.)o (fit)o(s.gz)o(\))24 b Fj(-)30 b(this)g(will)g(usually)g(pro)s(duce)f (an)227 5252 y(error)h(since)h(CFITSIO)e(itself)i(cannot)g(compress)f (\014les.)0 5488 y(The)36 b(exact)i(b)s(eha)m(vior)e(of)h(CFITSIO)e(in) h(the)h(latter)g(case)h(dep)s(ends)c(on)j(the)f(t)m(yp)s(e)h(of)g(ftp)f (serv)m(er)g(running)f(on)0 5601 y(the)c(remote)g(mac)m(hine)g(and)f (ho)m(w)g(it)h(is)f(con\014gured.)40 b(In)30 b(some)h(cases,)g(if)f (the)h(\014le)f(`m)m(y\014le.\014ts.gz')j(exists)e(on)f(the)0 5714 y(remote)38 b(mac)m(hine,)h(then)e(the)g(serv)m(er)g(will)h(cop)m (y)f(it)h(to)f(the)h(lo)s(cal)g(mac)m(hine.)61 b(In)36 b(other)h(cases)h(the)f(ftp)g(serv)m(er)p eop end %%Page: 128 136 TeXDict begin 128 135 bop 0 299 a Fj(128)1528 b Fh(CHAPTER)29 b(10.)113 b(EXTENDED)30 b(FILE)h(NAME)f(SYNT)-8 b(AX)0 555 y Fj(will)36 b(automatically)j(create)e(and)f(transmit)g(a)g (compressed)g(v)m(ersion)g(of)g(the)g(\014le)g(if)g(only)g(the)g (uncompressed)0 668 y(v)m(ersion)27 b(exists.)41 b(This)26 b(can)h(get)h(rather)f(confusing,)h(so)f(users)f(should)g(use)h(a)g (certain)h(amoun)m(t)g(of)f(caution)h(when)0 781 y(using)34 b(the)h(output)f(\014le)h(sp)s(eci\014er)f(with)h(FTP)f(or)h(HTTP)f (\014le)h(t)m(yp)s(es,)h(to)f(mak)m(e)h(sure)e(they)h(get)h(the)f(b)s (eha)m(vior)0 894 y(that)c(they)g(exp)s(ect.)0 1250 y Ff(10.5)136 b(T)-11 b(emplate)45 b(File)h(Name)g(when)e(Creating)j(a)e (New)g(File)0 1504 y Fj(When)38 b(a)h(new)f(FITS)g(\014le)h(is)g (created)g(with)g(a)f(call)i(to)g(\014ts)p 2101 1504 28 4 v 32 w(create)p 2369 1504 V 35 w(\014le,)g(the)f(name)g(of)g(a)g (template)h(\014le)e(ma)m(y)0 1617 y(b)s(e)h(supplied)g(in)h(paren)m (theses)g(immediately)h(follo)m(wing)g(the)g(name)f(of)g(the)g(new)f (\014le)h(to)h(b)s(e)e(created.)71 b(This)0 1730 y(template)27 b(is)e(used)g(to)h(de\014ne)f(the)h(structure)f(of)h(one)f(or)h(more)g (HDUs)g(in)f(the)h(new)f(\014le.)39 b(The)25 b(template)i(\014le)e(ma)m (y)0 1843 y(b)s(e)32 b(another)h(FITS)f(\014le,)i(in)f(whic)m(h)f(case) i(the)f(newly)g(created)h(\014le)f(will)g(ha)m(v)m(e)h(exactly)h(the)e (same)g(k)m(eyw)m(ords)g(in)0 1956 y(eac)m(h)25 b(HDU)g(as)g(in)f(the)g (template)i(FITS)d(\014le,)j(but)d(all)j(the)e(data)h(units)e(will)i(b) s(e)f(\014lled)g(with)f(zeros.)40 b(The)24 b(template)0 2069 y(\014le)i(ma)m(y)h(also)g(b)s(e)e(an)h(ASCI)s(I)e(text)j(\014le,) g(where)f(eac)m(h)h(line)f(\(in)g(general\))i(describ)s(es)d(one)h (FITS)f(k)m(eyw)m(ord)i(record.)0 2182 y(The)j(format)h(of)f(the)h (ASCI)s(I)e(template)i(\014le)g(is)f(describ)s(ed)f(in)i(the)f(follo)m (wing)i(T)-8 b(emplate)31 b(Files)h(c)m(hapter.)0 2538 y Ff(10.6)136 b(Image)46 b(Tile-Compression)g(Sp)t(eci\014cation)0 2792 y Fj(When)28 b(sp)s(ecifying)g(the)h(name)g(of)f(the)h(output)f (FITS)g(\014le)g(to)h(b)s(e)f(created,)i(the)f(user)f(can)g(indicate)i (that)f(images)0 2905 y(should)d(b)s(e)h(written)g(in)g (tile-compressed)h(format)g(\(see)g(section)g(5.5,)h(\\Primary)e(Arra)m (y)h(or)f(IMA)m(GE)h(Extension)0 3018 y(I/O)f(Routines"\))i(b)m(y)e (enclosing)h(the)g(compression)f(parameters)h(in)f(square)g(brac)m(k)m (ets)i(follo)m(wing)g(the)f(ro)s(ot)f(disk)0 3131 y(\014le)j(name.)41 b(Here)31 b(are)g(some)g(examples)g(of)f(the)h(syn)m(tax)g(for)f(sp)s (ecifying)g(tile-compressed)i(output)e(images:)191 3410 y Fe(myfile.fit[compress])185 b(-)48 b(use)f(Rice)f(algorithm)g(and)h (default)e(tile)i(size)191 3636 y(myfile.fit[compress)42 b(GZIP])47 b(-)g(use)g(the)g(specified)e(compression)g(algorithm;)191 3748 y(myfile.fit[compress)d(Rice])238 b(only)46 b(the)h(first)g (letter)f(of)h(the)g(algorithm)191 3861 y(myfile.fit[compress)42 b(PLIO])238 b(name)46 b(is)i(required.)191 4087 y(myfile.fit[compress) 42 b(Rice)47 b(100,100])141 b(-)48 b(use)e(100)h(x)h(100)f(pixel)f (tile)h(size)191 4200 y(myfile.fit[compress)42 b(Rice)47 b(100,100;2])e(-)j(as)f(above,)f(and)h(use)g(noisebits)e(=)i(2)0 4556 y Ff(10.7)136 b(HDU)45 b(Lo)t(cation)g(Sp)t(eci\014cation)0 4811 y Fj(The)c(optional)h(HDU)h(lo)s(cation)g(sp)s(eci\014er)d (de\014nes)h(whic)m(h)g(HDU)h(\(Header-Data)i(Unit,)h(also)d(kno)m(wn)f (as)h(an)0 4924 y(`extension'\))36 b(within)d(the)i(FITS)e(\014le)h(to) h(initially)h(op)s(en.)51 b(It)34 b(m)m(ust)g(immediately)i(follo)m(w)f (the)f(base)h(\014le)f(name)0 5036 y(\(or)g(the)g(output)g(\014le)g (name)f(if)h(presen)m(t\).)52 b(If)33 b(it)h(is)g(not)g(sp)s(eci\014ed) g(then)f(the)h(\014rst)f(HDU)i(\(the)f(primary)f(arra)m(y\))0 5149 y(is)g(op)s(ened.)46 b(The)32 b(HDU)h(lo)s(cation)h(sp)s (eci\014er)e(is)h(required)f(if)g(the)h(colFilter,)i(ro)m(wFilter,)g (or)e(binSp)s(ec)e(sp)s(eci\014ers)0 5262 y(are)f(presen)m(t,)f(b)s (ecause)h(the)f(primary)f(arra)m(y)i(is)f(not)h(a)f(v)-5 b(alid)30 b(HDU)g(for)f(these)g(op)s(erations.)41 b(The)29 b(HDU)h(ma)m(y)g(b)s(e)0 5375 y(sp)s(eci\014ed)e(either)i(b)m(y)e (absolute)i(p)s(osition)f(n)m(um)m(b)s(er,)f(starting)i(with)e(0)i(for) e(the)h(primary)f(arra)m(y)-8 b(,)31 b(or)e(b)m(y)f(reference)0 5488 y(to)h(the)g(HDU)g(name,)g(and)f(optionally)-8 b(,)31 b(the)e(v)m(ersion)g(n)m(um)m(b)s(er)e(and)h(the)h(HDU)g(t)m(yp)s(e)g (of)f(the)h(desired)f(extension.)0 5601 y(The)k(lo)s(cation)h(of)f(an)g (image)i(within)d(a)i(single)f(cell)i(of)e(a)g(binary)g(table)h(ma)m(y) f(also)h(b)s(e)f(sp)s(eci\014ed,)g(as)g(describ)s(ed)0 5714 y(b)s(elo)m(w.)p eop end %%Page: 129 137 TeXDict begin 129 136 bop 0 299 a Fh(10.7.)73 b(HDU)31 b(LOCA)-8 b(TION)29 b(SPECIFICA)-8 b(TION)2019 b Fj(129)0 555 y(The)26 b(absolute)h(p)s(osition)f(of)g(the)h(extension)g(is)f(sp) s(eci\014ed)f(either)i(b)m(y)f(enclosed)h(the)g(n)m(um)m(b)s(er)e(in)h (square)f(brac)m(k)m(ets)0 668 y(\(e.g.,)k(`[1]')g(=)d(the)h(\014rst)f (extension)h(follo)m(wing)i(the)e(primary)e(arra)m(y\))j(or)f(b)m(y)f (preceded)h(the)g(n)m(um)m(b)s(er)e(with)i(a)g(plus)0 781 y(sign)37 b(\(`+1'\).)63 b(T)-8 b(o)38 b(sp)s(ecify)f(the)g(HDU)h (b)m(y)g(name,)h(giv)m(e)g(the)e(name)h(of)f(the)h(desired)f(HDU)h (\(the)f(v)-5 b(alue)38 b(of)g(the)0 894 y(EXTNAME)e(or)g(HDUNAME)h(k)m (eyw)m(ord\))g(and)f(optionally)h(the)f(extension)h(v)m(ersion)f(n)m (um)m(b)s(er)f(\(v)-5 b(alue)37 b(of)f(the)0 1007 y(EXTVER)27 b(k)m(eyw)m(ord\))i(and)e(the)h(extension)h(t)m(yp)s(e)e(\(v)-5 b(alue)29 b(of)f(the)g(XTENSION)f(k)m(eyw)m(ord:)40 b(IMA)m(GE,)29 b(ASCI)s(I)d(or)0 1120 y(T)-8 b(ABLE,)36 b(or)f(BINT)-8 b(ABLE\),)36 b(separated)f(b)m(y)g(commas)h(and)e(all)i(enclosed)g(in)f (square)g(brac)m(k)m(ets.)56 b(If)34 b(the)h(v)-5 b(alue)0 1233 y(of)34 b(EXTVER)f(and)f(XTENSION)h(are)h(not)f(sp)s(eci\014ed,)h (then)f(the)h(\014rst)e(extension)j(with)e(the)g(correct)i(v)-5 b(alue)34 b(of)0 1346 y(EXTNAME)39 b(is)g(op)s(ened.)67 b(The)38 b(extension)i(name)f(and)f(t)m(yp)s(e)i(are)f(not)h(case)g (sensitiv)m(e,)j(and)38 b(the)h(extension)0 1458 y(t)m(yp)s(e)29 b(ma)m(y)g(b)s(e)f(abbreviated)h(to)g(a)g(single)g(letter)h(\(e.g.,)h (I)d(=)g(IMA)m(GE)i(extension)f(or)f(primary)g(arra)m(y)-8 b(,)30 b(A)f(or)f(T)g(=)0 1571 y(ASCI)s(I)d(table)i(extension,)h(and)e (B)h(=)f(binary)g(table)h(BINT)-8 b(ABLE)27 b(extension\).)41 b(If)26 b(the)g(HDU)h(lo)s(cation)i(sp)s(eci\014er)0 1684 y(is)h(equal)h(to)g(`[PRIMAR)-8 b(Y]')32 b(or)f(`[P]',)g(then)f (the)h(primary)e(arra)m(y)i(\(the)g(\014rst)f(HDU\))h(will)g(b)s(e)f (op)s(ened.)0 1844 y(An)36 b(optional)j(p)s(ound)34 b(sign)j(c)m (haracter)i(\("#"\))f(ma)m(y)f(b)s(e)g(app)s(ended)e(to)i(the)g (extension)h(name)f(or)g(n)m(um)m(b)s(er)e(to)0 1957 y(signify)e(that)h(an)m(y)g(other)f(extensions)h(in)f(the)g(\014le)g (should)g(b)s(e)f(ignored)h(during)f(an)m(y)i(subsequen)m(t)e(\014le)i (\014ltering)0 2070 y(op)s(erations.)83 b(F)-8 b(or)45 b(example,)k(when)43 b(doing)i(ro)m(w)f(\014ltering)h(op)s(erations)f (on)h(a)f(table)i(extension,)i(CFITSIO)0 2183 y(normally)27 b(creates)i(a)e(cop)m(y)h(of)f(the)g(\014ltered)g(table)h(in)f(memory) -8 b(,)28 b(along)h(with)d(a)i(v)m(erbatim)f(cop)m(y)h(of)f(all)h(the)g (other)0 2296 y(extensions)h(in)g(the)g(input)f(FITS)g(\014le.)41 b(If)28 b(the)h(p)s(ound)e(sign)i(is)g(app)s(ended)e(to)j(the)f(table)h (extension)g(name,)f(then)0 2409 y(only)34 b(that)g(extension,)i(and)d (none)h(of)g(the)g(other)g(extensions)g(in)f(the)h(\014le,)h(will)g(b)m (y)e(copied)h(to)h(memory)-8 b(,)35 b(as)f(in)0 2522 y(the)d(follo)m(wing)g(example:)143 2773 y Fe(myfile.fit[events#][TIME) 41 b(>)48 b(10000])0 3024 y Fj(FITS)34 b(images)i(are)f(most)h (commonly)f(stored)g(in)g(the)g(primary)f(arra)m(y)h(or)g(an)g(image)h (extension,)h(but)d(images)0 3137 y(can)d(also)h(b)s(e)e(stored)h(as)h (a)f(v)m(ector)h(in)f(a)g(single)h(cell)g(of)f(a)h(binary)e(table)i (\(i.e.)43 b(eac)m(h)32 b(ro)m(w)f(of)g(the)h(v)m(ector)g(column)0 3250 y(con)m(tains)d(a)g(di\013eren)m(t)f(image\).)42 b(Suc)m(h)27 b(an)h(image)i(can)e(b)s(e)g(op)s(ened)f(with)h(CFITSIO)e (b)m(y)i(sp)s(ecifying)g(the)g(desired)0 3363 y(column)k(name)g(and)f (the)h(ro)m(w)g(n)m(um)m(b)s(er)f(after)h(the)g(binary)f(table)i(HDU)g (sp)s(eci\014er)e(as)h(sho)m(wn)g(in)f(the)h(follo)m(wing)0 3476 y(examples.)71 b(The)40 b(column)g(name)h(is)f(separated)h(from)f (the)h(HDU)g(sp)s(eci\014er)f(b)m(y)g(a)h(semicolon)g(and)f(the)h(ro)m (w)0 3589 y(n)m(um)m(b)s(er)29 b(is)h(enclosed)h(in)e(paren)m(theses.) 41 b(In)30 b(this)g(case)h(CFITSIO)d(copies)j(the)f(image)i(from)d(the) i(table)g(cell)g(in)m(to)0 3702 y(a)h(temp)s(orary)e(primary)h(arra)m (y)g(b)s(efore)g(it)h(is)f(op)s(ened.)43 b(The)30 b(application)j (program)e(then)g(just)g(sees)g(the)h(image)0 3815 y(in)i(the)h (primary)e(arra)m(y)-8 b(,)37 b(without)d(an)m(y)h(extensions.)53 b(The)34 b(particular)g(ro)m(w)h(to)g(b)s(e)e(op)s(ened)h(ma)m(y)h(b)s (e)f(sp)s(eci\014ed)0 3927 y(either)28 b(b)m(y)f(giving)h(an)f (absolute)h(in)m(teger)h(ro)m(w)f(n)m(um)m(b)s(er)e(\(starting)i(with)f (1)h(for)f(the)g(\014rst)g(ro)m(w\),)i(or)e(b)m(y)g(sp)s(ecifying)0 4040 y(a)33 b(b)s(o)s(olean)f(expression)g(that)h(ev)-5 b(aluates)34 b(to)f(TR)m(UE)g(for)f(the)g(desired)g(ro)m(w.)47 b(The)32 b(\014rst)f(ro)m(w)i(that)g(satis\014es)g(the)0 4153 y(expression)28 b(will)g(b)s(e)g(used.)39 b(The)28 b(ro)m(w)g(selection)i(expression)e(has)g(the)g(same)g(syn)m(tax)h(as)f (describ)s(ed)f(in)h(the)g(Ro)m(w)0 4266 y(Filter)k(Sp)s(eci\014er)d (section,)j(b)s(elo)m(w.)0 4426 y(Examples:)143 4677 y Fe(myfile.fits[3])44 b(-)k(open)e(the)h(3rd)g(HDU)g(following)e(the)i (primary)f(array)143 4790 y(myfile.fits+3)92 b(-)48 b(same)e(as)h (above,)f(but)h(using)g(the)g(FTOOLS-style)d(notation)143 4903 y(myfile.fits[EVENTS])f(-)k(open)g(the)g(extension)e(that)i(has)g (EXTNAME)e(=)j('EVENTS')143 5016 y(myfile.fits[EVENTS,)43 b(2])95 b(-)47 b(same)g(as)g(above,)f(but)h(also)g(requires)e(EXTVER)h (=)i(2)143 5129 y(myfile.fits[events,2,b])42 b(-)47 b(same,)f(but)h (also)g(requires)f(XTENSION)f(=)j('BINTABLE')143 5242 y(myfile.fits[3;)c(images\(17\)])h(-)i(opens)g(the)g(image)f(in)h(row)g (17)g(of)g(the)g('images')1527 5355 y(column)f(in)i(the)e(3rd)h (extension)f(of)h(the)g(file.)143 5468 y(myfile.fits[3;)d (images\(exposure)g(>)j(100\)])g(-)g(as)g(above,)f(but)h(opens)g(the)f (image)907 5581 y(in)h(the)g(first)f(row)h(that)g(has)g(an)g ('exposure')e(column)h(value)907 5694 y(greater)g(than)g(100.)p eop end %%Page: 130 138 TeXDict begin 130 137 bop 0 299 a Fj(130)1528 b Fh(CHAPTER)29 b(10.)113 b(EXTENDED)30 b(FILE)h(NAME)f(SYNT)-8 b(AX)0 555 y Ff(10.8)136 b(Image)46 b(Section)0 811 y Fj(A)41 b(virtual)g(\014le)f(con)m(taining)i(a)f(rectangular)h(subsection)e(of) h(an)g(image)g(can)g(b)s(e)f(extracted)i(and)e(op)s(ened)g(b)m(y)0 924 y(sp)s(ecifying)32 b(the)h(range)g(of)g(pixels)g(\(start:end\))g (along)h(eac)m(h)g(axis)f(to)g(b)s(e)f(extracted)i(from)e(the)h (original)g(image.)0 1037 y(One)d(can)h(also)h(sp)s(ecify)e(an)h (optional)h(pixel)f(incremen)m(t)g(\(start:end:step\))h(for)f(eac)m(h)h (axis)f(of)g(the)g(input)e(image.)0 1149 y(A)f(pixel)f(step)h(=)f(1)h (will)g(b)s(e)f(assumed)f(if)i(it)g(is)f(not)h(sp)s(eci\014ed.)39 b(If)27 b(the)h(start)g(pixel)g(is)f(larger)i(then)e(the)h(end)e (pixel,)0 1262 y(then)32 b(the)g(image)h(will)f(b)s(e)f(\015ipp)s(ed)f (\(pro)s(ducing)h(a)h(mirror)g(image\))h(along)g(that)f(dimension.)45 b(An)32 b(asterisk,)h('*',)0 1375 y(ma)m(y)39 b(b)s(e)e(used)h(to)h(sp) s(ecify)f(the)g(en)m(tire)h(range)g(of)f(an)h(axis,)i(and)c('-*')j (will)e(\015ip)g(the)g(en)m(tire)h(axis.)65 b(The)38 b(input)0 1488 y(image)31 b(can)f(b)s(e)f(in)g(the)h(primary)f(arra)m (y)-8 b(,)31 b(in)e(an)g(image)i(extension,)g(or)f(con)m(tained)g(in)g (a)g(v)m(ector)h(cell)g(of)f(a)g(binary)0 1601 y(table.)40 b(In)25 b(the)h(later)h(2)f(cases)h(the)f(extension)h(name)f(or)f(n)m (um)m(b)s(er)g(m)m(ust)h(b)s(e)f(sp)s(eci\014ed)g(b)s(efore)h(the)g (image)h(section)0 1714 y(sp)s(eci\014er.)0 1874 y(Examples:)95 2157 y Fe(myfile.fits[1:512:2,)43 b(2:512:2])i(-)95 b(open)47 b(a)h(256x256)d(pixel)i(image)668 2270 y(consisting)e(of)i(the)g(odd)g (numbered)f(columns)g(\(1st)g(axis\))h(and)668 2383 y(the)g(even)g (numbered)e(rows)i(\(2nd)g(axis\))f(of)h(the)g(image)f(in)i(the)668 2496 y(primary)e(array)g(of)i(the)e(file.)95 2721 y(myfile.fits[*,)e (512:256])i(-)h(open)g(an)g(image)g(consisting)e(of)i(all)g(the)g (columns)668 2834 y(in)g(the)g(input)g(image,)f(but)h(only)f(rows)h (256)g(through)f(512.)668 2947 y(The)h(image)f(will)h(be)g(flipped)f (along)g(the)h(2nd)g(axis)g(since)668 3060 y(the)g(starting)f(pixel)g (is)h(greater)f(than)h(the)g(ending)f(pixel.)95 3286 y(myfile.fits[*:2,)e(512:256:2])h(-)i(same)g(as)g(above)f(but)h (keeping)f(only)668 3399 y(every)h(other)f(row)h(and)g(column)f(in)h (the)g(input)f(image.)95 3625 y(myfile.fits[-*,)e(*])j(-)h(copy)e(the)h (entire)f(image,)g(flipping)g(it)h(along)668 3738 y(the)g(first)f (axis.)95 3963 y(myfile.fits[3][1:256,1:256)o(])c(-)47 b(opens)g(a)g(subsection)e(of)i(the)g(image)g(that)668 4076 y(is)g(in)h(the)e(3rd)h(extension)f(of)h(the)g(file.)95 4302 y(myfile.fits[4;)d(images\(12\)][1:10,1:10])e(-)48 b(open)e(an)h(image)g(consisting)286 4415 y(of)h(the)e(first)h(10)g (pixels)f(in)h(both)g(dimensions.)e(The)i(original)286 4528 y(image)g(resides)f(in)h(the)g(12th)f(row)h(of)g(the)g('images')f (vector)286 4641 y(column)g(in)i(the)f(table)f(in)h(the)g(4th)g (extension)e(of)i(the)g(file.)0 4924 y Fj(When)23 b(CFITSIO)f(op)s(ens) h(an)g(image)h(section)h(it)f(\014rst)f(creates)h(a)g(temp)s(orary)f (\014le)h(con)m(taining)h(the)e(image)i(section)0 5036 y(plus)30 b(a)h(cop)m(y)h(of)f(an)m(y)g(other)g(HDUs)g(in)g(the)g (\014le.)42 b(\(If)31 b(a)g(`#')g(c)m(haracter)h(is)f(app)s(ended)e(to) j(the)f(name)f(or)h(n)m(um)m(b)s(er)0 5149 y(of)i(the)g(image)i(HDU,)e (as)h(in)e("m)m(y\014le.\014ts[1#][1:200,1:200)q(]",)40 b(then)33 b(the)g(other)g(HDUs)h(in)e(the)h(input)g(\014le)g(will)0 5262 y(not)j(b)s(e)f(copied)i(in)m(to)f(memory\).)58 b(This)35 b(temp)s(orary)g(\014le)h(is)g(then)f(op)s(ened)h(b)m(y)f (the)h(application)h(program,)h(so)0 5375 y(it)32 b(is)g(not)f(p)s (ossible)h(to)g(write)g(to)g(or)f(mo)s(dify)g(the)h(input)e(\014le)i (when)f(sp)s(ecifying)g(an)g(image)i(section.)45 b(Note)33 b(that)0 5488 y(CFITSIO)27 b(automatically)32 b(up)s(dates)c(the)h(w)m (orld)f(co)s(ordinate)i(system)f(k)m(eyw)m(ords)g(in)f(the)h(header)g (of)g(the)g(image)0 5601 y(section,)h(if)f(they)g(exist,)h(so)f(that)g (the)g(co)s(ordinate)h(asso)s(ciated)g(with)e(eac)m(h)i(pixel)f(in)g (the)g(image)h(section)g(will)f(b)s(e)0 5714 y(computed)h(correctly)-8 b(.)p eop end %%Page: 131 139 TeXDict begin 131 138 bop 0 299 a Fh(10.9.)73 b(IMA)m(GE)31 b(TRANSF)m(ORM)f(FIL)-8 b(TERS)2147 b Fj(131)0 555 y Ff(10.9)136 b(Image)46 b(T)-11 b(ransform)44 b(Filters)0 807 y Fj(CFITSIO)33 b(can)h(apply)g(a)h(user-sp)s(eci\014ed)e (mathematical)j(function)e(to)h(the)g(v)-5 b(alue)34 b(of)h(ev)m(ery)g(pixel)f(in)g(a)h(FITS)0 920 y(image,)29 b(th)m(us)e(creating)h(a)g(new)e(virtual)h(image)i(in)d(computer)h (memory)g(that)h(is)f(then)f(op)s(ened)h(and)f(read)h(b)m(y)g(the)0 1033 y(application)32 b(program.)40 b(The)30 b(original)i(FITS)d(image) j(is)e(not)h(mo)s(di\014ed)e(b)m(y)h(this)h(pro)s(cess.)0 1193 y(The)20 b(image)j(transformation)e(sp)s(eci\014er)f(is)h(app)s (ended)e(to)j(the)f(input)f(FITS)h(\014le)g(name)g(and)f(is)h(enclosed) h(in)e(square)0 1306 y(brac)m(k)m(ets.)42 b(It)29 b(b)s(egins)f(with)h (the)g(letters)i('PIX')e(to)h(distinguish)e(it)i(from)e(other)i(t)m(yp) s(es)f(of)g(FITS)f(\014le)h(\014lters)g(that)0 1419 y(are)36 b(recognized)i(b)m(y)e(CFITSIO.)e(The)i(image)h(transforming)f (function)f(ma)m(y)i(use)f(an)m(y)g(of)g(the)h(mathematical)0 1532 y(op)s(erators)44 b(listed)h(in)f(the)h(follo)m(wing)h('Ro)m(w)f (Filtering)g(Sp)s(eci\014cation')g(section)h(of)e(this)h(do)s(cumen)m (t.)82 b(Some)0 1645 y(examples)31 b(of)f(image)i(transform)e (\014lters)g(are:)48 1913 y Fe([pix)46 b(X)i(*)f(2.0])715 b(-)48 b(multiply)d(each)i(pixel)f(by)h(2.0)48 2026 y([pix)f (sqrt\(X\)])714 b(-)48 b(take)e(the)h(square)f(root)h(of)g(each)g (pixel)48 2139 y([pix)f(X)i(+)f(#ZEROPT)571 b(-)48 b(add)e(the)h(value) g(of)g(the)g(ZEROPT)f(keyword)48 2252 y([pix)g(X>0)h(?)h(log10\(X\))d (:)j(-99.])e(-)i(if)f(the)g(pixel)f(value)g(is)i(greater)1480 2365 y(than)e(0,)h(compute)f(the)h(base)g(10)g(log,)1480 2478 y(else)f(set)h(the)g(pixel)f(=)i(-99.)0 2746 y Fj(Use)24 b(the)g(letter)h('X')f(in)f(the)h(expression)g(to)g(represen)m(t)g(the) g(curren)m(t)f(pixel)h(v)-5 b(alue)24 b(in)f(the)h(image.)40 b(The)23 b(expression)0 2859 y(is)38 b(ev)-5 b(aluated)39 b(indep)s(enden)m(tly)e(for)g(eac)m(h)i(pixel)f(in)g(the)g(image)h(and) e(ma)m(y)h(b)s(e)g(a)g(function)f(of)h(1\))h(the)f(original)0 2971 y(pixel)32 b(v)-5 b(alue,)32 b(2\))g(the)f(v)-5 b(alue)32 b(of)f(other)h(pixels)f(in)g(the)g(image)i(at)f(a)f(giv)m(en) i(relativ)m(e)g(o\013set)f(from)f(the)g(p)s(osition)h(of)0 3084 y(the)d(pixel)f(that)h(is)g(b)s(eing)f(ev)-5 b(aluated,)30 b(and)e(3\))h(the)g(v)-5 b(alue)29 b(of)f(an)m(y)h(header)f(k)m(eyw)m (ords.)41 b(Header)29 b(k)m(eyw)m(ord)g(v)-5 b(alues)0 3197 y(are)31 b(represen)m(ted)f(b)m(y)g(the)h(name)f(of)h(the)f(k)m (eyw)m(ord)h(preceded)f(b)m(y)h(the)f('#')h(sign.)0 3357 y(T)-8 b(o)35 b(access)h(the)f(the)g(v)-5 b(alue)35 b(of)g(adjacen)m(t) h(pixels)f(in)f(the)h(image,)i(sp)s(ecify)e(the)g(\(1-D\))h(o\013set)g (from)e(the)h(curren)m(t)0 3470 y(pixel)c(in)f(curly)g(brac)m(k)m(ets.) 42 b(F)-8 b(or)31 b(example)48 3738 y Fe([pix)94 b(\(x{-1})46 b(+)i(x)f(+)h(x{+1}\))e(/)h(3])0 4006 y Fj(will)25 b(replace)g(eac)m(h) h(pixel)f(v)-5 b(alue)25 b(with)f(the)h(running)e(mean)i(of)f(the)h(v) -5 b(alues)25 b(of)g(that)g(pixel)g(and)f(it's)h(2)g(neigh)m(b)s(oring) 0 4119 y(pixels.)40 b(Note)30 b(that)g(in)e(this)g(notation)i(the)f (image)h(is)f(treated)g(as)g(a)g(1-D)h(arra)m(y)-8 b(,)30 b(where)e(eac)m(h)i(ro)m(w)f(of)g(the)g(image)0 4232 y(\(or)c(higher)f(dimensional)g(cub)s(e\))h(is)f(app)s(ended)f(one)h (after)h(another)g(in)f(one)h(long)g(arra)m(y)g(of)f(pixels.)39 b(It)25 b(is)f(p)s(ossible)0 4345 y(to)35 b(refer)f(to)h(pixels)f(in)g (the)g(ro)m(ws)g(ab)s(o)m(v)m(e)h(or)g(b)s(elo)m(w)f(the)g(curren)m(t)g (pixel)h(b)m(y)f(using)f(the)h(v)-5 b(alue)35 b(of)f(the)h(NAXIS1)0 4458 y(header)30 b(k)m(eyw)m(ord.)41 b(F)-8 b(or)32 b(example)48 4726 y Fe([pix)46 b(\(x{-#NAXIS1})f(+)i(x)h(+)f(x{#NAXIS1}\))e(/)i(3])0 4994 y Fj(will)34 b(compute)f(the)h(mean)f(of)g(eac)m(h)i(image)f (pixel)g(and)e(the)i(pixels)f(immediately)i(ab)s(o)m(v)m(e)f(and)f(b)s (elo)m(w)g(it)h(in)f(the)0 5107 y(adjacen)m(t)27 b(ro)m(ws)f(of)g(the)f (image.)41 b(The)25 b(follo)m(wing)i(more)f(complex)h(example)f (creates)h(a)f(smo)s(othed)g(virtual)g(image)0 5220 y(where)k(eac)m(h)h (pixel)g(is)g(a)f(3)h(x)f(3)h(b)s(o)m(xcar)g(a)m(v)m(erage)i(of)d(the)h (input)e(image)j(pixels:)95 5488 y Fe([pix)47 b(\(X)g(+)h(X{-1})e(+)i (X{+1})286 5601 y(+)g(X{-#NAXIS1})d(+)i(X{-#NAXIS1)e(-)i(1})h(+)f (X{-#NAXIS1)e(+)j(1})286 5714 y(+)g(X{#NAXIS1})d(+)i(X{#NAXIS1)f(-)h (1})g(+)h(X{#NAXIS1)d(+)i(1}\))g(/)h(9.])p eop end %%Page: 132 140 TeXDict begin 132 139 bop 0 299 a Fj(132)1528 b Fh(CHAPTER)29 b(10.)113 b(EXTENDED)30 b(FILE)h(NAME)f(SYNT)-8 b(AX)0 555 y Fj(If)31 b(the)h(pixel)g(o\013set)h(extends)f(b)s(ey)m(ond)f(the) h(\014rst)f(or)h(last)h(pixel)f(in)f(the)h(image,)i(the)e(function)g (will)g(ev)-5 b(aluate)33 b(to)0 668 y(unde\014ned,)28 b(or)j(NULL.)0 828 y(F)-8 b(or)39 b(complex)g(or)g(commonly)g(used)e (image)j(\014ltering)f(op)s(erations,)i(one)d(can)h(write)g(the)f (expression)h(in)m(to)g(an)0 941 y(external)i(text)h(\014le)f(and)f (then)g(imp)s(ort)g(it)h(in)m(to)h(the)e(\014lter)h(using)f(the)h(syn)m (tax)g('[pix)g(@\014lename.txt]'.)72 b(The)0 1054 y(mathematical)29 b(expression)e(can)g(extend)g(o)m(v)m(er)i(m)m(ultiple)e(lines)g(of)h (text)g(in)e(the)h(\014le.)40 b(An)m(y)27 b(lines)g(in)g(the)g (external)0 1167 y(text)h(\014le)e(that)i(b)s(egin)e(with)g(2)h(slash)f (c)m(haracters)i(\('//'\))h(will)e(b)s(e)f(ignored)h(and)f(ma)m(y)h(b)s (e)f(used)g(to)h(add)f(commen)m(ts)0 1280 y(in)m(to)31 b(the)g(\014le.)0 1440 y(By)c(default,)g(the)f(datat)m(yp)s(e)i(of)e (the)g(resulting)h(image)g(will)g(b)s(e)e(the)i(same)f(as)h(the)f (original)i(image,)g(but)e(one)g(ma)m(y)0 1553 y(force)31 b(a)g(di\013eren)m(t)g(datat)m(yp)s(e)g(b)m(y)f(app)s(ended)f(a)h(co)s (de)h(letter)h(to)f(the)f('pix')h(k)m(eyw)m(ord:)286 1786 y Fe(pixb)95 b(-)g(8-bit)46 b(byte)190 b(image)46 b(with)h(BITPIX)f(=)143 b(8)286 1898 y(pixi)95 b(-)47 b(16-bit)f(integer)g(image)g(with)h(BITPIX)f(=)95 b(16)286 2011 y(pixj)g(-)47 b(32-bit)f(integer)g(image)g(with)h(BITPIX)f(=)95 b(32)286 2124 y(pixr)g(-)47 b(32-bit)f(float)142 b(image)46 b(with)h(BITPIX)f(=)i(-32)286 2237 y(pixd)95 b(-)47 b(64-bit)f(float) 142 b(image)46 b(with)h(BITPIX)f(=)i(-64)0 2470 y Fj(Also)23 b(b)m(y)f(default,)j(an)m(y)d(other)h(HDUs)g(in)f(the)g(input)g(\014le) g(will)h(b)s(e)e(copied)i(without)g(c)m(hange)g(to)g(the)g(output)f (virtual)0 2583 y(FITS)k(\014le,)h(but)f(one)g(ma)m(y)h(discard)f(the)h (other)f(HDUs)h(b)m(y)f(adding)g(the)h(n)m(um)m(b)s(er)e('1')i(to)g (the)g('pix')f(k)m(eyw)m(ord)h(\(and)0 2696 y(follo)m(wing)32 b(an)m(y)f(optional)g(datat)m(yp)s(e)g(co)s(de)g(letter\).)42 b(F)-8 b(or)32 b(example:)239 2928 y Fe(myfile.fits[3][pixr1)90 b(sqrt\(X\)])0 3161 y Fj(will)23 b(create)i(a)e(virtual)g(FITS)f (\014le)h(con)m(taining)h(only)f(a)g(primary)f(arra)m(y)i(image)g(with) e(32-bit)i(\015oating)g(p)s(oin)m(t)f(pixels)0 3274 y(that)29 b(ha)m(v)m(e)h(a)f(v)-5 b(alue)30 b(equal)f(to)g(the)g(square)g(ro)s (ot)g(of)g(the)g(pixels)f(in)h(the)g(image)h(that)f(is)g(in)f(the)h (3rd)f(extension)i(of)0 3387 y(the)h('m)m(y\014le.\014ts')g(\014le.)0 3716 y Ff(10.10)136 b(Column)45 b(and)g(Keyw)l(ord)g(Filtering)h(Sp)t (eci\014cation)0 3966 y Fj(The)27 b(optional)i(column/k)m(eyw)m(ord)g (\014ltering)f(sp)s(eci\014er)f(is)h(used)f(to)i(mo)s(dify)e(the)h (column)g(structure)f(and/or)h(the)0 4079 y(header)38 b(k)m(eyw)m(ords)h(in)f(the)h(HDU)g(that)h(w)m(as)f(selected)h(with)e (the)h(previous)f(HDU)h(lo)s(cation)h(sp)s(eci\014er.)65 b(This)0 4192 y(\014ltering)42 b(sp)s(eci\014er)f(m)m(ust)h(b)s(e)f (enclosed)i(in)e(square)h(brac)m(k)m(ets)h(and)e(can)h(b)s(e)f (distinguished)g(from)h(a)g(general)0 4305 y(ro)m(w)d(\014lter)g(sp)s (eci\014er)f(\(describ)s(ed)g(b)s(elo)m(w\))h(b)m(y)g(the)g(fact)h (that)f(it)g(b)s(egins)f(with)h(the)g(string)g('col)h(')f(and)f(is)h (not)0 4418 y(immediately)30 b(follo)m(w)m(ed)g(b)m(y)e(an)g(equals)h (sign.)40 b(The)28 b(original)h(\014le)f(is)h(not)f(c)m(hanged)h(b)m(y) f(this)h(\014ltering)f(op)s(eration,)0 4531 y(and)c(instead)h(the)g(mo) s(di\014cations)g(are)g(made)g(on)f(a)h(cop)m(y)h(of)e(the)h(input)f (FITS)g(\014le)h(\(usually)g(in)f(memory\),)i(whic)m(h)0 4644 y(also)31 b(con)m(tains)g(a)g(cop)m(y)g(of)f(all)h(the)f(other)g (HDUs)h(in)f(the)g(\014le.)41 b(\(If)30 b(a)g(`#')h(c)m(haracter)g(is)f (app)s(ended)f(to)i(the)f(name)0 4757 y(or)d(n)m(um)m(b)s(er)e(of)i (the)g(table)g(HDU)h(then)e(only)h(the)g(primary)f(arra)m(y)-8 b(,)28 b(and)e(none)h(of)g(the)f(other)h(HDUs)h(in)e(the)h(input)0 4869 y(\014le)i(will)f(b)s(e)g(copied)h(in)m(to)g(memory\).)41 b(This)27 b(temp)s(orary)h(\014le)h(is)f(passed)g(to)h(the)g (application)h(program)e(and)g(will)0 4982 y(p)s(ersist)e(only)i(un)m (til)f(the)g(\014le)g(is)h(closed)f(or)g(un)m(til)h(the)f(program)g (exits,)i(unless)d(the)h(out\014le)h(sp)s(eci\014er)e(\(see)i(ab)s(o)m (v)m(e\))0 5095 y(is)i(also)i(supplied.)0 5255 y(The)f(column/k)m(eyw)m (ord)h(\014lter)f(can)g(b)s(e)g(used)f(to)i(p)s(erform)e(the)i(follo)m (wing)g(op)s(erations.)44 b(More)32 b(than)f(one)g(op)s(er-)0 5368 y(ation)g(ma)m(y)g(b)s(e)f(sp)s(eci\014ed)g(b)m(y)g(separating)h (them)f(with)h(commas)f(or)h(semi-colons.)136 5601 y Fc(\017)46 b Fj(Cop)m(y)36 b(only)g(a)g(sp)s(eci\014ed)g(list)g(of)g (columns)g(columns)f(to)i(the)f(\014ltered)g(input)f(\014le.)57 b(The)36 b(list)g(of)g(column)227 5714 y(name)c(should)f(b)s(e)h (separated)g(b)m(y)g(semi-colons.)48 b(Wild)32 b(card)g(c)m(haracters)i (ma)m(y)e(b)s(e)g(used)f(in)h(the)g(column)p eop end %%Page: 133 141 TeXDict begin 133 140 bop 0 299 a Fh(10.10.)73 b(COLUMN)30 b(AND)h(KEYW)m(ORD)g(FIL)-8 b(TERING)31 b(SPECIFICA)-8 b(TION)984 b Fj(133)227 555 y(names)37 b(to)h(matc)m(h)g(m)m(ultiple)g (columns.)61 b(If)37 b(the)g(expression)g(con)m(tains)i(b)s(oth)d(a)i (list)f(of)h(columns)f(to)h(b)s(e)227 668 y(included)h(and)f(columns)h (to)g(b)s(e)g(deleted,)j(then)c(all)i(the)f(columns)g(in)g(the)g (original)h(table)g(except)g(the)227 781 y(explicitly)32 b(deleted)f(columns)f(will)g(app)s(ear)g(in)g(the)g(\014ltered)g(table) h(\(i.e.,)h(there)e(is)h(no)f(need)f(to)i(explicitly)227 894 y(list)g(the)g(columns)f(to)h(b)s(e)f(included)f(if)i(an)m(y)f (columns)g(are)h(b)s(eing)f(deleted\).)136 1102 y Fc(\017)46 b Fj(Delete)32 b(a)d(column)g(or)g(k)m(eyw)m(ord)h(b)m(y)f(listing)h (the)f(name)g(preceded)g(b)m(y)g(a)g(min)m(us)g(sign)g(or)g(an)g (exclamation)227 1215 y(mark)c(\(!\),)h(e.g.,)i('-TIME')d(will)g (delete)h(the)e(TIME)h(column)f(if)g(it)i(exists,)g(otherwise)f(the)g (TIME)f(k)m(eyw)m(ord.)227 1328 y(An)35 b(error)f(is)h(returned)e(if)i (neither)f(a)i(column)e(nor)g(k)m(eyw)m(ord)h(with)g(this)f(name)h (exists.)54 b(Note)36 b(that)g(the)227 1441 y(exclamation)27 b(p)s(oin)m(t,)g(')10 b(!',)27 b(is)e(a)g(sp)s(ecial)h(UNIX)f(c)m (haracter,)j(so)d(if)g(it)h(is)f(used)f(on)h(the)g(command)g(line)g (rather)227 1554 y(than)33 b(en)m(tered)h(at)g(a)g(task)g(prompt,)f(it) h(m)m(ust)f(b)s(e)g(preceded)g(b)m(y)g(a)h(bac)m(kslash)g(to)g(force)g (the)f(UNIX)h(shell)227 1666 y(to)d(ignore)g(it.)136 1874 y Fc(\017)46 b Fj(Rename)29 b(an)g(existing)g(column)f(or)h(k)m (eyw)m(ord)g(with)f(the)h(syn)m(tax)g('NewName)h(==)e(OldName'.)40 b(An)28 b(error)227 1987 y(is)j(returned)e(if)h(neither)h(a)f(column)g (nor)g(k)m(eyw)m(ord)h(with)f(this)h(name)f(exists.)136 2195 y Fc(\017)46 b Fj(App)s(end)37 b(a)j(new)f(column)f(or)i(k)m(eyw)m (ord)f(to)h(the)f(table.)68 b(T)-8 b(o)40 b(create)g(a)g(column,)h(giv) m(e)g(the)e(new)g(name,)227 2308 y(optionally)c(follo)m(w)m(ed)f(b)m(y) f(the)g(data)h(t)m(yp)s(e)f(in)f(paren)m(theses,)i(follo)m(w)m(ed)h(b)m (y)e(a)g(single)h(equals)f(sign)g(and)f(an)227 2421 y(expression)j(to)h (b)s(e)e(used)g(to)i(compute)f(the)g(v)-5 b(alue)35 b(\(e.g.,)j('new)m (col\(1J\))f(=)e(0')g(will)h(create)g(a)f(new)g(32-bit)227 2534 y(in)m(teger)i(column)d(called)j('new)m(col')f(\014lled)f(with)g (zeros\).)55 b(The)35 b(data)g(t)m(yp)s(e)h(is)f(sp)s(eci\014ed)f (using)g(the)i(same)227 2647 y(syn)m(tax)j(that)g(is)f(allo)m(w)m(ed)i (for)e(the)g(v)-5 b(alue)39 b(of)f(the)g(FITS)f(TF)m(ORMn)h(k)m(eyw)m (ord)h(\(e.g.,)j('I',)d('J',)f('E',)h('D',)227 2760 y(etc.)66 b(for)38 b(binary)f(tables,)42 b(and)37 b('I8',)k(F12.3',)i('E20.12',)g (etc.)65 b(for)38 b(ASCI)s(I)f(tables\).)66 b(If)37 b(the)i(data)g(t)m (yp)s(e)227 2873 y(is)c(not)g(sp)s(eci\014ed)f(then)g(an)g(appropriate) h(data)g(t)m(yp)s(e)g(will)g(b)s(e)f(c)m(hosen)h(dep)s(ending)e(on)h (the)h(form)f(of)h(the)227 2986 y(expression)44 b(\(ma)m(y)g(b)s(e)f(a) h(c)m(haracter)i(string,)h(logical,)j(bit,)d(long)d(in)m(teger,)49 b(or)43 b(double)h(column\).)80 b(An)227 3099 y(appropriate)39 b(v)m(ector)i(coun)m(t)e(\(in)g(the)g(case)h(of)f(binary)f(tables\))i (will)f(also)h(b)s(e)e(added)g(if)h(not)g(explicitly)227 3212 y(sp)s(eci\014ed.)227 3372 y(When)26 b(creating)h(a)f(new)f(k)m (eyw)m(ord,)j(the)e(k)m(eyw)m(ord)g(name)g(m)m(ust)g(b)s(e)f(preceded)g (b)m(y)h(a)g(p)s(ound)e(sign)h('#',)j(and)227 3485 y(the)h(expression)f (m)m(ust)g(ev)-5 b(aluate)30 b(to)f(a)g(scalar)g(\(i.e.,)h(cannot)f(ha) m(v)m(e)h(a)f(column)f(name)g(in)g(the)h(expression\).)227 3598 y(The)j(commen)m(t)i(string)f(for)f(the)h(k)m(eyw)m(ord)h(ma)m(y)f (b)s(e)f(sp)s(eci\014ed)g(in)g(paren)m(theses)h(immediately)h(follo)m (wing)227 3711 y(the)27 b(k)m(eyw)m(ord)g(name)f(\(instead)h(of)g (supplying)e(a)i(data)g(t)m(yp)s(e)g(as)f(in)g(the)h(case)g(of)g (creating)h(a)f(new)f(column\).)227 3824 y(If)e(the)h(k)m(eyw)m(ord)g (name)f(ends)g(with)g(a)h(p)s(ound)d(sign)i('#',)i(then)e(c\014tsio)i (will)e(substitute)h(the)f(n)m(um)m(b)s(er)f(of)i(the)227 3937 y(most)31 b(recen)m(tly)h(referenced)e(column)h(for)f(the)h(#)f(c) m(haracter)i(.)41 b(This)29 b(is)i(esp)s(ecially)h(useful)d(when)h (writing)227 4049 y(a)c(column-related)g(k)m(eyw)m(ord)g(lik)m(e)g (TUNITn)e(for)h(a)h(newly)f(created)h(column,)g(as)g(sho)m(wn)e(in)h (the)g(follo)m(wing)227 4162 y(examples.)136 4370 y Fc(\017)46 b Fj(Recompute)f(\(o)m(v)m(erwrite\))i(the)d(v)-5 b(alues)44 b(in)g(an)g(existing)i(column)e(or)g(k)m(eyw)m(ord)g(b)m(y)g(giving)i (the)e(name)227 4483 y(follo)m(w)m(ed)32 b(b)m(y)f(an)f(equals)h(sign)f (and)g(an)g(arithmetic)i(expression.)0 4763 y(The)23 b(expression)g(that)i(is)e(used)g(when)g(app)s(ending)f(or)h (recomputing)h(columns)f(or)h(k)m(eyw)m(ords)g(can)g(b)s(e)f (arbitrarily)0 4876 y(complex)36 b(and)g(ma)m(y)g(b)s(e)f(a)h(function) g(of)g(other)g(header)g(k)m(eyw)m(ord)g(v)-5 b(alues)36 b(and)f(other)h(columns)g(\(in)g(the)g(same)0 4989 y(ro)m(w\).)63 b(The)37 b(full)g(syn)m(tax)i(and)e(a)m(v)-5 b(ailable)40 b(functions)d(for)g(the)h(expression)f(are)h(describ)s(ed)f(b)s(elo)m (w)h(in)f(the)h(ro)m(w)0 5102 y(\014lter)30 b(sp)s(eci\014cation)i (section.)0 5262 y(If)27 b(the)h(expression)g(con)m(tains)g(b)s(oth)f (a)h(list)h(of)f(columns)f(to)h(b)s(e)g(included)e(and)i(columns)f(to)h (b)s(e)f(deleted,)j(then)d(all)0 5375 y(the)34 b(columns)g(in)g(the)g (original)h(table)g(except)g(the)f(explicitly)i(deleted)f(columns)e (will)i(app)s(ear)e(in)h(the)g(\014ltered)0 5488 y(table.)40 b(If)26 b(no)g(columns)f(to)i(b)s(e)f(deleted)g(are)h(sp)s(eci\014ed,)f (then)g(only)g(the)h(columns)e(that)i(are)f(explicitly)i(listed)f(will) 0 5601 y(b)s(e)k(included)g(in)g(the)h(\014ltered)f(output)h(table.)45 b(T)-8 b(o)32 b(include)f(all)i(the)e(columns,)h(add)f(the)h('*')g (wildcard)g(sp)s(eci\014er)0 5714 y(at)f(the)g(end)e(of)i(the)f(list,)i (as)e(sho)m(wn)g(in)g(the)h(examples.)p eop end %%Page: 134 142 TeXDict begin 134 141 bop 0 299 a Fj(134)1528 b Fh(CHAPTER)29 b(10.)113 b(EXTENDED)30 b(FILE)h(NAME)f(SYNT)-8 b(AX)0 555 y Fj(F)g(or)33 b(complex)f(or)g(commonly)h(used)e(op)s(erations,)i (one)f(can)h(place)g(the)f(op)s(erations)g(in)m(to)h(an)f(external)h (text)g(\014le)0 668 y(and)39 b(imp)s(ort)h(it)g(in)m(to)h(the)f (column)g(\014lter)g(using)f(the)h(syn)m(tax)h('[col)g (@\014lename.txt]'.)71 b(The)39 b(op)s(erations)i(can)0 781 y(extend)26 b(o)m(v)m(er)i(m)m(ultiple)f(lines)g(of)f(the)h (\014le,)h(but)d(m)m(ultiple)i(op)s(erations)g(m)m(ust)f(still)i(b)s(e) d(separated)i(b)m(y)g(semicolons.)0 894 y(An)m(y)h(lines)h(in)f(the)g (external)i(text)f(\014le)f(that)h(b)s(egin)f(with)g(2)h(slash)f(c)m (haracters)i(\('//'\))g(will)f(b)s(e)e(ignored)i(and)e(ma)m(y)0 1007 y(b)s(e)j(used)f(to)i(add)f(commen)m(ts)h(in)m(to)h(the)e(\014le.) 0 1167 y(Examples:)143 1407 y Fe([col)47 b(Time;)f(rate])667 b(-)47 b(only)g(the)g(Time)g(and)g(rate)f(columns)g(will)1670 1520 y(appear)h(in)g(the)g(filtered)e(input)i(file.)143 1746 y([col)g(Time,)f(*raw])667 b(-)47 b(include)f(the)h(Time)g(column) f(and)h(any)g(other)1670 1859 y(columns)f(whose)h(name)f(ends)h(with)g ('raw'.)143 2085 y([col)g(-TIME;)f(Good)h(==)g(STATUS])141 b(-)47 b(deletes)f(the)h(TIME)g(column)f(and)1670 2197 y(renames)g(the)h(status)f(column)g(to)i('Good')143 2423 y([col)f(PI=PHA)f(*)h(1.1)g(+)h(0.2;)e(#TUNIT#\(column)e(units\))i(=)i ('counts';*])1575 2536 y(-)f(creates)f(new)h(PI)g(column)f(from)h(PHA)g (values)1670 2649 y(and)g(also)g(writes)f(the)h(TUNITn)f(keyword)1670 2762 y(for)h(the)g(new)g(column.)94 b(The)47 b(final)f('*')1670 2875 y(expression)f(means)i(preserve)e(all)i(the)1670 2988 y(columns)f(in)h(the)g(input)g(table)f(in)h(the)1670 3101 y(virtual)f(output)g(table;)94 b(without)46 b(the)h('*')1670 3214 y(the)g(output)f(table)h(would)f(only)h(contain)1670 3327 y(the)g(single)f('PI')h(column.)143 3552 y([col)g(rate)f(=)i (rate/exposure;)c(TUNIT#\(&\))h(=)j('counts/s';*])1575 3665 y(-)f(recomputes)e(the)i(rate)g(column)f(by)h(dividing)1670 3778 y(it)h(by)f(the)g(EXPOSURE)e(keyword)h(value.)g(This)1670 3891 y(also)h(modifies)f(the)h(value)f(of)h(the)g(TUNITn)1670 4004 y(keyword)f(for)h(this)g(column.)f(The)h(use)f(of)i(the)1670 4117 y('&')f(character)f(for)h(the)f(keyword)g(comment)1670 4230 y(string)h(means)f(preserve)f(the)i(existing)1670 4343 y(comment)f(string)g(for)h(that)g(keyword.)e(The)1670 4456 y(final)i('*')g(preserves)e(all)i(the)g(columns)1670 4569 y(in)h(the)f(input)f(table)g(in)h(the)g(virtual)1670 4681 y(output)g(table.)0 5012 y Ff(10.11)136 b(Ro)l(w)46 b(Filtering)g(Sp)t(eci\014cation)0 5262 y Fj(When)29 b(en)m(tering)h(the)f(name)g(of)g(a)g(FITS)f(table)i(that)g(is)e(to)i (b)s(e)e(op)s(ened)h(b)m(y)f(a)i(program,)f(an)g(optional)h(ro)m(w)f (\014lter)0 5375 y(ma)m(y)i(b)s(e)g(sp)s(eci\014ed)f(to)h(select)h(a)g (subset)e(of)h(the)g(ro)m(ws)f(in)h(the)g(table.)43 b(A)31 b(temp)s(orary)f(new)g(FITS)g(\014le)h(is)g(created)0 5488 y(on)40 b(the)f(\015y)g(whic)m(h)h(con)m(tains)h(only)e(those)h (ro)m(ws)g(for)f(whic)m(h)h(the)g(ro)m(w)f(\014lter)h(expression)f(ev) -5 b(aluates)42 b(to)e(true.)0 5601 y(The)29 b(primary)f(arra)m(y)i (and)f(an)m(y)g(other)h(extensions)g(in)f(the)g(input)g(\014le)g(are)h (also)g(copied)g(to)g(the)g(temp)s(orary)f(\014le.)0 5714 y(\(If)35 b(a)h(`#')f(c)m(haracter)i(is)e(app)s(ended)e(to)j(the)g (name)f(or)g(n)m(um)m(b)s(er)f(of)h(the)g(table)h(HDU)g(then)f(only)g (the)h(primary)p eop end %%Page: 135 143 TeXDict begin 135 142 bop 0 299 a Fh(10.11.)73 b(R)m(O)m(W)31 b(FIL)-8 b(TERING)31 b(SPECIFICA)-8 b(TION)1936 b Fj(135)0 555 y(arra)m(y)-8 b(,)37 b(and)d(none)h(of)g(the)g(other)g(HDUs)h(in)e (the)i(input)e(\014le)g(will)i(b)s(e)e(copied)h(in)m(to)h(the)f(temp)s (orary)g(\014le\).)54 b(The)0 668 y(original)30 b(FITS)f(\014le)g(is)g (closed)h(and)e(the)i(new)e(virtual)i(\014le)f(is)g(op)s(ened)f(b)m(y)h (the)h(application)g(program.)40 b(The)29 b(ro)m(w)0 781 y(\014lter)37 b(expression)g(is)h(enclosed)g(in)f(square)g(brac)m (k)m(ets)i(follo)m(wing)g(the)e(\014le)h(name)f(and)g(extension)h(name) f(\(e.g.,)0 894 y('\014le.\014ts[ev)m(en)m(ts][GRADE==50]')29 b(selects)d(only)f(those)h(ro)m(ws)f(where)f(the)h(GRADE)h(column)f(v) -5 b(alue)25 b(equals)g(50\).)0 1007 y(When)33 b(dealing)h(with)f (tables)g(where)g(eac)m(h)h(ro)m(w)f(has)g(an)g(asso)s(ciated)i(time)f (and/or)f(2D)g(spatial)i(p)s(osition,)f(the)0 1120 y(ro)m(w)e(\014lter) h(expression)e(can)i(also)g(b)s(e)f(used)f(to)i(select)h(ro)m(ws)e (based)g(on)g(the)g(times)h(in)f(a)g(Go)s(o)s(d)g(Time)g(In)m(terv)-5 b(als)0 1233 y(\(GTI\))31 b(extension,)g(or)f(on)h(spatial)g(p)s (osition)g(as)f(giv)m(en)i(in)e(a)g(SA)m(O-st)m(yle)i(region)f(\014le.) 0 1558 y Fd(10.11.1)113 b(General)38 b(Syn)m(tax)0 1784 y Fj(The)32 b(ro)m(w)h(\014ltering)g(expression)g(can)g(b)s(e)f(an)h (arbitrarily)g(complex)g(series)g(of)g(op)s(erations)g(p)s(erformed)f (on)g(con-)0 1897 y(stan)m(ts,)39 b(k)m(eyw)m(ord)e(v)-5 b(alues,)38 b(and)e(column)g(data)i(tak)m(en)f(from)f(the)h(sp)s (eci\014ed)e(FITS)h(T)-8 b(ABLE)37 b(extension.)59 b(The)0 2010 y(expression)37 b(m)m(ust)h(ev)-5 b(aluate)39 b(to)g(a)f(b)s(o)s (olean)g(v)-5 b(alue)38 b(for)f(eac)m(h)i(ro)m(w)f(of)g(the)f(table,)k (where)c(a)h(v)-5 b(alue)39 b(of)e(F)-10 b(ALSE)0 2123 y(means)30 b(that)h(the)g(ro)m(w)f(will)h(b)s(e)f(excluded.)0 2283 y(F)-8 b(or)34 b(complex)g(or)g(commonly)f(used)g(\014lters,)h (one)g(can)g(place)g(the)g(expression)f(in)m(to)h(a)g(text)g(\014le)g (and)f(imp)s(ort)f(it)0 2396 y(in)m(to)38 b(the)e(ro)m(w)h(\014lter)g (using)f(the)h(syn)m(tax)g('[@\014lename.txt]'.)61 b(The)36 b(expression)h(can)f(b)s(e)g(arbitrarily)h(complex)0 2509 y(and)27 b(extend)i(o)m(v)m(er)g(m)m(ultiple)g(lines)f(of)g(the)h (\014le.)40 b(An)m(y)28 b(lines)g(in)g(the)g(external)h(text)g(\014le)f (that)h(b)s(egin)f(with)g(2)g(slash)0 2622 y(c)m(haracters)k(\('//'\))g (will)f(b)s(e)f(ignored)g(and)g(ma)m(y)h(b)s(e)f(used)f(to)i(add)f (commen)m(ts)h(in)m(to)h(the)e(\014le.)0 2782 y(Keyw)m(ord)37 b(and)f(column)g(data)i(are)f(referenced)g(b)m(y)g(name.)60 b(An)m(y)37 b(string)f(of)h(c)m(haracters)i(not)e(surrounded)d(b)m(y)0 2895 y(quotes)41 b(\(ie,)j(a)d(constan)m(t)h(string\))f(or)f(follo)m(w) m(ed)i(b)m(y)f(an)f(op)s(en)g(paren)m(theses)h(\(ie,)j(a)d(function)f (name\))h(will)g(b)s(e)0 3008 y(initially)d(in)m(terpreted)e(as)h(a)g (column)f(name)g(and)g(its)h(con)m(ten)m(ts)h(for)e(the)h(curren)m(t)f (ro)m(w)g(inserted)g(in)m(to)i(the)e(ex-)0 3121 y(pression.)k(If)28 b(no)h(suc)m(h)g(column)g(exists,)h(a)g(k)m(eyw)m(ord)f(of)h(that)f (name)g(will)h(b)s(e)e(searc)m(hed)i(for)f(and)f(its)i(v)-5 b(alue)29 b(used,)0 3234 y(if)36 b(found.)55 b(T)-8 b(o)36 b(force)g(the)g(name)g(to)h(b)s(e)e(in)m(terpreted)h(as)g(a)g(k)m(eyw)m (ord)g(\(in)g(case)g(there)g(is)g(b)s(oth)f(a)h(column)g(and)0 3347 y(k)m(eyw)m(ord)41 b(with)e(the)i(same)f(name\),)j(precede)d(the)h (k)m(eyw)m(ord)f(name)g(with)g(a)h(single)f(p)s(ound)e(sign,)43 b('#',)g(as)d(in)0 3460 y('#NAXIS2'.)g(Due)27 b(to)g(the)f (generalities)j(of)d(FITS)g(column)g(and)g(k)m(eyw)m(ord)h(names,)g(if) f(the)h(column)f(or)g(k)m(eyw)m(ord)0 3572 y(name)33 b(con)m(tains)h(a)f(space)h(or)f(a)g(c)m(haracter)h(whic)m(h)f(migh)m (t)h(app)s(ear)e(as)h(an)g(arithmetic)h(term)f(then)g(enclose)h(the)0 3685 y(name)c(in)g('$')i(c)m(haracters)g(as)e(in)g($MAX)i(PHA$)f(or)f (#$MAX-PHA$.)43 b(Names)31 b(are)f(case)i(insensitiv)m(e.)0 3846 y(T)-8 b(o)32 b(access)g(a)g(table)g(en)m(try)g(in)f(a)h(ro)m(w)f (other)h(than)f(the)g(curren)m(t)g(one,)h(follo)m(w)h(the)e(column's)h (name)f(with)g(a)h(ro)m(w)0 3958 y(o\013set)37 b(within)e(curly)g (braces.)57 b(F)-8 b(or)36 b(example,)i('PHA)p Fc(f)p Fj(-3)p Fc(g)p Fj(')g(will)e(ev)-5 b(aluate)38 b(to)e(the)g(v)-5 b(alue)36 b(of)g(column)f(PHA,)i(3)0 4071 y(ro)m(ws)28 b(ab)s(o)m(v)m(e)i(the)e(ro)m(w)h(curren)m(tly)f(b)s(eing)g(pro)s (cessed.)40 b(One)28 b(cannot)h(sp)s(ecify)f(an)g(absolute)h(ro)m(w)f (n)m(um)m(b)s(er,)g(only)h(a)0 4184 y(relativ)m(e)j(o\013set.)42 b(Ro)m(ws)31 b(that)g(fall)g(outside)g(the)f(table)h(will)g(b)s(e)f (treated)h(as)g(unde\014ned,)d(or)j(NULLs.)0 4344 y(Bo)s(olean)h(op)s (erators)f(can)g(b)s(e)f(used)f(in)i(the)f(expression)h(in)f(either)h (their)g(F)-8 b(ortran)31 b(or)f(C)h(forms.)40 b(The)30 b(follo)m(wing)0 4457 y(b)s(o)s(olean)g(op)s(erators)h(are)g(a)m(v)-5 b(ailable:)191 4747 y Fe("equal")428 b(.eq.)46 b(.EQ.)h(==)95 b("not)46 b(equal")476 b(.ne.)94 b(.NE.)h(!=)191 4860 y("less)46 b(than")238 b(.lt.)46 b(.LT.)h(<)143 b("less)46 b(than/equal")188 b(.le.)94 b(.LE.)h(<=)47 b(=<)191 4973 y("greater)e(than")95 b(.gt.)46 b(.GT.)h(>)143 b("greater)45 b(than/equal")g(.ge.)94 b(.GE.)h(>=)47 b(=>)191 5086 y("or")572 b(.or.)46 b(.OR.)h(||)95 b("and")762 b(.and.)46 b(.AND.)h(&&)191 5199 y("negation")236 b(.not.)46 b(.NOT.)h(!)95 b("approx.)45 b(equal\(1e-7\)")92 b(~)0 5488 y Fj(Note)32 b(that)g(the)f(exclamation)i(p)s(oin)m(t,)e(')10 b(!',)33 b(is)e(a)g(sp)s(ecial)g(UNIX)h(c)m(haracter,)h(so)e(if)g(it)g(is)g (used)f(on)h(the)g(command)0 5601 y(line)i(rather)f(than)h(en)m(tered)g (at)g(a)g(task)g(prompt,)g(it)g(m)m(ust)f(b)s(e)g(preceded)h(b)m(y)f(a) h(bac)m(kslash)g(to)h(force)f(the)g(UNIX)0 5714 y(shell)e(to)g(ignore)g (it.)p eop end %%Page: 136 144 TeXDict begin 136 143 bop 0 299 a Fj(136)1528 b Fh(CHAPTER)29 b(10.)113 b(EXTENDED)30 b(FILE)h(NAME)f(SYNT)-8 b(AX)0 555 y Fj(The)32 b(expression)g(ma)m(y)i(also)f(include)f(arithmetic)i (op)s(erators)f(and)f(functions.)47 b(T)-8 b(rigonometric)34 b(functions)e(use)0 668 y(radians,)23 b(not)g(degrees.)38 b(The)22 b(follo)m(wing)h(arithmetic)g(op)s(erators)g(and)e(functions)g (can)i(b)s(e)e(used)g(in)h(the)g(expression)0 781 y(\(function)38 b(names)f(are)h(case)g(insensitiv)m(e\).)64 b(A)37 b(n)m(ull)h(v)-5 b(alue)38 b(will)f(b)s(e)g(returned)g(in)g(case)h(of)g(illegal)i(op)s (erations)0 894 y(suc)m(h)30 b(as)h(divide)f(b)m(y)g(zero,)i (sqrt\(negativ)m(e\))h(log\(negativ)m(e\),)h(log10\(negativ)m(e\),)i (arccos\(.gt.)43 b(1\),)32 b(arcsin\(.gt.)42 b(1\).)191 1144 y Fe("addition")474 b(+)j("subtraction")d(-)191 1257 y("multiplication")186 b(*)477 b("division")618 b(/)191 1370 y("negation")474 b(-)j("exponentiation")330 b(**)143 b(^)191 1483 y("absolute)45 b(value")189 b(abs\(x\))237 b("cosine")762 b(cos\(x\))191 1596 y("sine")666 b(sin\(x\))237 b("tangent")714 b(tan\(x\))191 1709 y("arc)47 b(cosine")379 b(arccos\(x\))93 b("arc)47 b(sine")667 b(arcsin\(x\))191 1822 y("arc)47 b(tangent")331 b(arctan\(x\))93 b("arc)47 b(tangent")523 b(arctan2\(y,x\))191 1935 y("hyperbolic)45 b(cos")189 b(cosh\(x\))g("hyperbolic)45 b(sin")381 b(sinh\(x\))191 2047 y("hyperbolic)45 b(tan")189 b(tanh\(x\))g("round)47 b(to)g(nearest)f(int")94 b(round\(x\))191 2160 y("round)46 b(down)h(to)g(int")f(floor\(x\))141 b("round)47 b(up)g(to)g(int")333 b(ceil\(x\))191 2273 y("exponential")d(exp\(x\))237 b("square)46 b(root")524 b(sqrt\(x\))191 2386 y("natural)45 b(log")333 b(log\(x\))237 b("common)46 b(log")572 b(log10\(x\))191 2499 y("modulus")522 b(x)48 b(\045)f(y)286 b("random)46 b(#)i([0.0,1.0\)")188 b(random\(\))191 2612 y("random)46 b(Gaussian")140 b(randomn\(\))93 b("random)46 b(Poisson")380 b(randomp\(x\))191 2725 y("minimum")522 b(min\(x,y\))141 b("maximum")714 b(max\(x,y\))191 2838 y("cumulative)45 b(sum")189 b(accum\(x\))141 b("sequential)45 b(difference")g (seqdiff\(x\))191 2951 y("if-then-else")282 b(b?x:y)191 3064 y("angular)45 b(separation")93 b(angsep\(ra1,dec1,ra2,de2\))41 b(\(all)47 b(in)g(degrees\))191 3177 y("substring")283 b(strmid\(s,p,n\))44 b("string)i(search")428 b(strstr\(s,r\))0 3427 y Fj(Three)30 b(di\013eren)m(t)h(random)f(n)m(um)m(b)s(er)f (functions)h(are)h(pro)m(vided:)41 b(random\(\),)30 b(with)h(no)f (argumen)m(ts,)h(pro)s(duces)f(a)0 3540 y(uniform)g(random)f(deviate)k (b)s(et)m(w)m(een)e(0)g(and)f(1;)i(randomn\(\),)e(also)i(with)e(no)h (argumen)m(ts,)g(pro)s(duces)f(a)h(normal)0 3653 y(\(Gaussian\))k (random)e(deviate)j(with)e(zero)h(mean)f(and)g(unit)f(standard)h (deviation;)j(randomp\(x\))d(pro)s(duces)f(a)0 3766 y(P)m(oisson)27 b(random)f(deviate)h(whose)f(exp)s(ected)h(n)m(um)m(b)s(er)e(of)h(coun) m(ts)h(is)g(X.)f(X)h(ma)m(y)g(b)s(e)e(an)m(y)i(p)s(ositiv)m(e)g(real)g (n)m(um)m(b)s(er)0 3878 y(of)k(exp)s(ected)f(coun)m(ts,)h(including)f (fractional)i(v)-5 b(alues,)31 b(but)f(the)g(return)g(v)-5 b(alue)31 b(is)f(an)g(in)m(teger.)0 4039 y(When)d(the)g(random)g (functions)f(are)i(used)e(in)h(a)h(v)m(ector)g(expression,)g(b)m(y)f (default)h(the)f(same)h(random)e(v)-5 b(alue)28 b(will)0 4152 y(b)s(e)g(used)f(when)h(ev)-5 b(aluating)30 b(eac)m(h)f(elemen)m (t)h(of)f(the)g(v)m(ector.)41 b(If)28 b(di\013eren)m(t)h(random)f(n)m (um)m(b)s(ers)f(are)i(desired,)f(then)0 4264 y(the)37 b(name)g(of)g(a)g(v)m(ector)i(column)e(should)e(b)s(e)i(supplied)e(as)i (the)h(single)f(argumen)m(t)g(to)h(the)f(random)f(function)0 4377 y(\(e.g.,)31 b("\015ux)c(+)h(0.1)h(*)g(random\(\015ux\)",)f(where) g("\015ux')g(is)g(the)g(name)h(of)f(a)h(v)m(ector)h(column\).)40 b(This)27 b(will)i(create)h(a)0 4490 y(v)m(ector)d(of)f(random)f(n)m (um)m(b)s(ers)f(that)i(will)g(b)s(e)f(used)f(in)i(sequence)g(when)e(ev) -5 b(aluating)27 b(eac)m(h)g(elemen)m(t)g(of)f(the)f(v)m(ector)0 4603 y(expression.)0 4763 y(An)31 b(alternate)i(syn)m(tax)f(for)f(the)g (min)g(and)g(max)g(functions)g(has)g(only)g(a)h(single)g(argumen)m(t)g (whic)m(h)f(should)f(b)s(e)h(a)0 4876 y(v)m(ector)g(v)-5 b(alue)30 b(\(see)g(b)s(elo)m(w\).)41 b(The)29 b(result)g(will)h(b)s(e) e(the)i(minim)m(um/maxim)m(um)f(elemen)m(t)h(con)m(tained)h(within)e (the)0 4989 y(v)m(ector.)0 5149 y(The)35 b(accum\(x\))i(function)f (forms)f(the)h(cum)m(ulativ)m(e)i(sum)d(of)h(x,)h(elemen)m(t)h(b)m(y)e (elemen)m(t.)58 b(V)-8 b(ector)38 b(columns)e(are)0 5262 y(supp)s(orted)h(simply)h(b)m(y)g(p)s(erforming)f(the)i(summation)g (pro)s(cess)f(through)f(all)j(the)f(v)-5 b(alues.)65 b(Null)39 b(v)-5 b(alues)39 b(are)0 5375 y(treated)30 b(as)f(0.)41 b(The)29 b(seqdi\013\(x\))h(function)e(forms)h(the)g (sequen)m(tial)i(di\013erence)e(of)h(x,)f(elemen)m(t)i(b)m(y)e(elemen)m (t.)41 b(The)0 5488 y(\014rst)36 b(v)-5 b(alue)38 b(of)f(seqdi\013)g (is)g(the)g(\014rst)g(v)-5 b(alue)37 b(of)g(x.)61 b(A)37 b(single)h(n)m(ull)f(v)-5 b(alue)38 b(in)e(x)h(causes)h(a)f(pair)g(of)g (n)m(ulls)g(in)g(the)0 5601 y(output.)55 b(The)35 b(seqdi\013)g(and)g (accum)g(functions)g(are)h(functional)f(in)m(v)m(erses,)j(i.e.,)g (seqdi\013\(accum\(x\)\))f(==)e(x)g(as)0 5714 y(long)c(as)g(no)f(n)m (ull)g(v)-5 b(alues)31 b(are)g(presen)m(t.)p eop end %%Page: 137 145 TeXDict begin 137 144 bop 0 299 a Fh(10.11.)73 b(R)m(O)m(W)31 b(FIL)-8 b(TERING)31 b(SPECIFICA)-8 b(TION)1936 b Fj(137)0 555 y(In)36 b(the)h(if-then-else)i(expression,)f("b?x:y",)i(b)c(is)h (an)g(explicit)h(b)s(o)s(olean)f(v)-5 b(alue)37 b(or)g(expression.)61 b(There)36 b(is)h(no)0 668 y(automatic)d(t)m(yp)s(e)e(con)m(v)m(ersion) h(from)e(n)m(umeric)h(to)g(b)s(o)s(olean)g(v)-5 b(alues,)33 b(so)f(one)g(needs)f(to)i(use)e("iV)-8 b(al!=0")35 b(instead)0 781 y(of)30 b(merely)g("iV)-8 b(al")32 b(as)e(the)g(b)s(o)s(olean)g (argumen)m(t.)41 b(x)30 b(and)f(y)h(can)g(b)s(e)f(an)m(y)h(scalar)h (data)g(t)m(yp)s(e)f(\(including)f(string\).)0 941 y(The)22 b(angsep)g(function)f(computes)i(the)f(angular)g(separation)h(in)e (degrees)i(b)s(et)m(w)m(een)g(2)f(celestial)j(p)s(ositions,)e(where)0 1054 y(the)36 b(\014rst)f(2)h(parameters)g(giv)m(e)h(the)f(RA-lik)m(e)i (and)d(Dec-lik)m(e)j(co)s(ordinates)f(\(in)f(decimal)g(degrees\))h(of)f (the)g(\014rst)0 1167 y(p)s(osition,)31 b(and)e(the)i(3rd)f(and)g(4th)g (parameters)h(giv)m(e)h(the)e(co)s(ordinates)i(of)e(the)h(second)f(p)s (osition.)0 1327 y(The)38 b(substring)f(function)i(strmid\(S,P)-8 b(,N\))39 b(extracts)g(a)g(substring)f(from)g(S,)g(starting)h(at)g (string)g(p)s(osition)f(P)-8 b(,)0 1440 y(with)33 b(a)h(substring)f (length)h(N.)g(The)f(\014rst)g(c)m(haracter)j(p)s(osition)d(in)h(S)f (is)h(lab)s(eled)g(as)g(1.)51 b(If)33 b(P)g(is)h(0,)h(or)f(refers)f(to) 0 1553 y(a)i(p)s(osition)g(b)s(ey)m(ond)f(the)h(end)e(of)i(S,)g(then)f (the)h(extracted)h(substring)d(will)i(b)s(e)f(NULL.)h(S,)f(P)-8 b(,)36 b(and)e(N)g(ma)m(y)i(b)s(e)0 1666 y(functions)30 b(of)g(other)h(columns.)0 1826 y(The)39 b(string)h(searc)m(h)h (function)e(strstr\(S,R\))h(searc)m(hes)h(for)f(the)g(\014rst)f(o)s (ccurrence)h(of)g(the)g(substring)f(R)h(in)f(S.)0 1939 y(The)c(result)h(is)f(an)h(in)m(teger,)i(indicating)f(the)e(c)m (haracter)i(p)s(osition)f(of)g(the)g(\014rst)e(matc)m(h)j(\(where)e(1)h (is)g(the)g(\014rst)0 2052 y(c)m(haracter)c(p)s(osition)e(of)h(S\).)f (If)g(no)h(matc)m(h)g(is)f(found,)g(then)g(strstr\(\))g(returns)f(a)i (NULL)f(v)-5 b(alue.)0 2212 y(The)38 b(follo)m(wing)i(t)m(yp)s(e)f (casting)h(op)s(erators)f(are)g(a)m(v)-5 b(ailable,)44 b(where)38 b(the)h(inclosing)h(paren)m(theses)f(are)g(required)0 2325 y(and)30 b(tak)m(en)h(from)f(the)h(C)f(language)h(usage.)42 b(Also,)31 b(the)g(in)m(teger)g(to)h(real)f(casts)g(v)-5 b(alues)30 b(to)i(double)e(precision:)764 2545 y Fe("real)46 b(to)h(integer")189 b(\(int\))46 b(x)239 b(\(INT\))46 b(x)764 2658 y("integer)f(to)i(real")190 b(\(float\))46 b(i)143 b(\(FLOAT\))45 b(i)0 2878 y Fj(In)30 b(addition,)g(sev)m(eral)i (constan)m(ts)g(are)f(built)f(in)g(for)g(use)g(in)g(n)m(umerical)h (expressions:)382 3098 y Fe(#pi)667 b(3.1415...)284 b(#e)620 b(2.7182...)382 3211 y(#deg)f(#pi/180)380 b(#row)524 b(current)46 b(row)h(number)382 3324 y(#null)428 b(undefined)45 b(value)142 b(#snull)428 b(undefined)45 b(string)0 3544 y Fj(A)40 b(string)f(constan)m(t)i(m)m(ust)e(b)s(e)g(enclosed)h(in)g (quotes)g(as)f(in)h('Crab'.)67 b(The)39 b("n)m(ull")i(constan)m(ts)f (are)g(useful)f(for)0 3657 y(conditionally)g(setting)g(table)g(v)-5 b(alues)38 b(to)g(a)g(NULL,)g(or)g(unde\014ned,)f(v)-5 b(alue)39 b(\(eg.,)i("col1==-99)f(?)62 b(#NULL)38 b(:)0 3770 y(col1"\).)0 3930 y(There)27 b(is)g(also)i(a)e(function)g(for)h (testing)g(if)f(t)m(w)m(o)i(v)-5 b(alues)28 b(are)g(close)g(to)h(eac)m (h)f(other,)h(i.e.,)g(if)e(they)h(are)g("near")g(eac)m(h)0 4043 y(other)c(to)h(within)e(a)h(user)g(sp)s(eci\014ed)f(tolerance.)40 b(The)24 b(argumen)m(ts,)h(v)-5 b(alue)p 2502 4043 28 4 v 34 w(1)24 b(and)f(v)-5 b(alue)p 2979 4043 V 33 w(2)25 b(can)f(b)s(e)f(in)m(teger)i(or)f(real)0 4156 y(and)32 b(represen)m(t)h(the)g(t)m(w)m(o)h(v)-5 b(alues)33 b(who's)f(pro)m (ximit)m(y)i(is)f(b)s(eing)f(tested)h(to)h(b)s(e)e(within)g(the)h(sp)s (eci\014ed)f(tolerance,)0 4269 y(also)f(an)g(in)m(teger)g(or)g(real:) 955 4489 y Fe(near\(value_1,)44 b(value_2,)h(tolerance\))0 4709 y Fj(When)24 b(a)i(NULL,)e(or)h(unde\014ned,)f(v)-5 b(alue)25 b(is)g(encoun)m(tered)g(in)g(the)f(FITS)g(table,)j(the)e (expression)g(will)g(ev)-5 b(aluate)26 b(to)0 4822 y(NULL)31 b(unless)f(the)h(unde\014ned)e(v)-5 b(alue)31 b(is)g(not)g(actually)h (required)e(for)h(ev)-5 b(aluation,)33 b(e.g.)43 b("TR)m(UE)31 b(.or.)43 b(NULL")0 4935 y(ev)-5 b(aluates)32 b(to)f(TR)m(UE.)g(The)f (follo)m(wing)h(t)m(w)m(o)h(functions)e(allo)m(w)i(some)f(NULL)f (detection)i(and)e(handling:)430 5155 y Fe("a)47 b(null)f(value?")667 b(ISNULL\(x\))430 5268 y("define)45 b(a)j(value)e(for)h(null")190 b(DEFNULL\(x,y\))0 5488 y Fj(The)36 b(former)h(returns)e(a)i(b)s(o)s (olean)g(v)-5 b(alue)37 b(of)g(TR)m(UE)g(if)g(the)g(argumen)m(t)g(x)g (is)g(NULL.)g(The)f(later)i("de\014nes")f(a)0 5601 y(v)-5 b(alue)35 b(to)g(b)s(e)e(substituted)h(for)g(NULL)g(v)-5 b(alues;)37 b(it)e(returns)e(the)h(v)-5 b(alue)35 b(of)f(x)g(if)g(x)h (is)f(not)g(NULL,)h(otherwise)f(it)0 5714 y(returns)29 b(the)i(v)-5 b(alue)31 b(of)f(y)-8 b(.)p eop end %%Page: 138 146 TeXDict begin 138 145 bop 0 299 a Fj(138)1528 b Fh(CHAPTER)29 b(10.)113 b(EXTENDED)30 b(FILE)h(NAME)f(SYNT)-8 b(AX)0 555 y Fd(10.11.2)113 b(Bit)36 b(Masks)0 774 y Fj(Bit)g(masks)f(can)h(b) s(e)f(used)f(to)i(select)h(out)e(ro)m(ws)h(from)e(bit)i(columns)f(\(TF) m(ORMn)g(=)g(#X\))h(in)f(FITS)f(\014les.)55 b(T)-8 b(o)0 887 y(represen)m(t)30 b(the)h(mask,)g(binary)-8 b(,)30 b(o)s(ctal,)i(and)e(hex)g(formats)g(are)h(allo)m(w)m(ed:)811 1141 y Fe(binary:)142 b(b0110xx1010000101xxxx00)o(01)811 1254 y(octal:)190 b(o720x1)46 b(->)h(\(b111010000xxx001\))811 1367 y(hex:)286 b(h0FxD)94 b(->)47 b(\(b00001111xxxx1101\))0 1621 y Fj(In)22 b(all)i(the)f(represen)m(tations,)j(an)c(x)h(or)g(X)g (is)g(allo)m(w)m(ed)i(in)d(the)h(mask)g(as)g(a)h(wild)e(card.)38 b(Note)25 b(that)e(the)g(x)g(represen)m(ts)0 1734 y(a)k(di\013eren)m(t) h(n)m(um)m(b)s(er)e(of)h(wild)f(card)h(bits)g(in)g(eac)m(h)h(represen)m (tation.)41 b(All)27 b(represen)m(tations)h(are)g(case)g(insensitiv)m (e.)0 1894 y(T)-8 b(o)28 b(construct)g(the)g(b)s(o)s(olean)f (expression)h(using)f(the)h(mask)f(as)h(the)g(b)s(o)s(olean)f(equal)h (op)s(erator)g(describ)s(ed)f(ab)s(o)m(v)m(e)0 2007 y(on)34 b(a)h(bit)g(table)h(column.)53 b(F)-8 b(or)35 b(example,)i(if)d(y)m(ou) h(had)f(a)h(7)g(bit)g(column)f(named)g(\015ags)h(in)f(a)h(FITS)f(table) i(and)0 2119 y(w)m(an)m(ted)31 b(all)g(ro)m(ws)g(ha)m(ving)g(the)f(bit) h(pattern)f(0010011,)k(the)c(selection)j(expression)d(w)m(ould)g(b)s (e:)1336 2373 y Fe(flags)47 b(==)g(b0010011)191 2486 y(or)1336 2599 y(flags)g(.eq.)f(b10011)0 2853 y Fj(It)35 b(is)g(also)h(p)s(ossible)e(to)i(test)g(if)f(a)g(range)g(of)g(bits)g (is)g(less)g(than,)h(less)f(than)g(equal,)i(greater)f(than)e(and)h (greater)0 2966 y(than)30 b(equal)h(to)g(a)g(particular)g(b)s(o)s (olean)f(v)-5 b(alue:)1336 3220 y Fe(flags)47 b(<=)g(bxxx010xx)1336 3333 y(flags)g(.gt.)f(bxxx100xx)1336 3446 y(flags)h(.le.)f(b1xxxxxxx)0 3700 y Fj(Notice)32 b(the)f(use)f(of)h(the)f(x)g(bit)h(v)-5 b(alue)31 b(to)g(limit)g(the)f(range)h(of)g(bits)f(b)s(eing)g (compared.)0 3860 y(It)i(is)h(not)f(necessary)h(to)g(sp)s(ecify)f(the)h (leading)g(\(most)g(signi\014can)m(t\))h(zero)f(\(0\))g(bits)f(in)g (the)h(mask,)g(as)g(sho)m(wn)e(in)0 3973 y(the)g(second)f(expression)g (ab)s(o)m(v)m(e.)0 4133 y(Bit)44 b(wise)f(AND,)h(OR)e(and)g(NOT)h(op)s (erations)g(are)g(also)h(p)s(ossible)e(on)h(t)m(w)m(o)h(or)f(more)g (bit)g(\014elds)f(using)h(the)0 4246 y('&'\(AND\),)35 b(')p Fc(j)p Fj('\(OR\),)g(and)e(the)h(')10 b(!'\(NOT\))34 b(op)s(erators.)51 b(All)34 b(of)f(these)h(op)s(erators)g(result)f(in)h (a)g(bit)f(\014eld)g(whic)m(h)0 4359 y(can)e(then)f(b)s(e)f(used)h (with)g(the)h(equal)g(op)s(erator.)41 b(F)-8 b(or)31 b(example:)1241 4613 y Fe(\(!flags\))45 b(==)j(b1101100)1241 4726 y(\(flags)e(&)h(b1000001\))f(==)h(bx000001)0 4979 y Fj(Bit)35 b(\014elds)f(can)g(b)s(e)f(app)s(ended)g(as)h(w)m(ell)h (using)f(the)g('+')g(op)s(erator.)53 b(Strings)33 b(can)i(b)s(e)e (concatenated)j(this)e(w)m(a)m(y)-8 b(,)0 5092 y(to)s(o.)0 5382 y Fd(10.11.3)113 b(V)-9 b(ector)36 b(Columns)0 5601 y Fj(V)-8 b(ector)37 b(columns)e(can)h(also)g(b)s(e)f(used)f(in)h (building)g(the)g(expression.)56 b(No)36 b(sp)s(ecial)g(syn)m(tax)f(is) h(required)e(if)i(one)0 5714 y(w)m(an)m(ts)46 b(to)f(op)s(erate)h(on)f (all)h(elemen)m(ts)g(of)f(the)h(v)m(ector.)86 b(Simply)44 b(use)h(the)g(column)g(name)g(as)g(for)g(a)g(scalar)p eop end %%Page: 139 147 TeXDict begin 139 146 bop 0 299 a Fh(10.11.)73 b(R)m(O)m(W)31 b(FIL)-8 b(TERING)31 b(SPECIFICA)-8 b(TION)1936 b Fj(139)0 555 y(column.)42 b(V)-8 b(ector)32 b(columns)f(can)g(b)s(e)f(freely)h (in)m(termixed)h(with)e(scalar)i(columns)e(or)h(constan)m(ts)h(in)f (virtually)g(all)0 668 y(expressions.)40 b(The)29 b(result)g(will)g(b)s (e)g(of)g(the)g(same)h(dimension)e(as)i(the)f(v)m(ector.)42 b(Tw)m(o)29 b(v)m(ectors)i(in)e(an)g(expression,)0 781 y(though,)h(need)g(to)i(ha)m(v)m(e)f(the)g(same)g(n)m(um)m(b)s(er)e(of) h(elemen)m(ts)i(and)e(ha)m(v)m(e)h(the)g(same)g(dimensions.)0 941 y(Arithmetic)24 b(and)e(logical)k(op)s(erations)d(are)h(all)g(p)s (erformed)d(on)i(an)g(elemen)m(t)h(b)m(y)f(elemen)m(t)i(basis.)38 b(Comparing)23 b(t)m(w)m(o)0 1054 y(v)m(ector)32 b(columns,)e(eg)h ("COL1)f(==)g(COL2",)g(th)m(us)g(results)g(in)g(another)g(v)m(ector)i (of)e(b)s(o)s(olean)h(v)-5 b(alues)30 b(indicating)0 1167 y(whic)m(h)g(elemen)m(ts)i(of)e(the)h(t)m(w)m(o)h(v)m(ectors)f (are)g(equal.)0 1327 y(Eigh)m(t)g(functions)f(are)h(a)m(v)-5 b(ailable)33 b(that)e(op)s(erate)g(on)f(a)h(v)m(ector)h(and)d(return)h (a)g(scalar)i(result:)191 1570 y Fe("minimum")284 b(MIN\(V\))475 b("maximum")714 b(MAX\(V\))191 1683 y("average")284 b(AVERAGE\(V\))f ("median")762 b(MEDIAN\(V\))191 1796 y("summation")188 b(SUM\(V\))475 b("standard)46 b(deviation")188 b(STDDEV\(V\))191 1909 y("#)47 b(of)g(values")94 b(NELEM\(V\))379 b("#)48 b(of)f(non-null)e(values")94 b(NVALID\(V\))0 2151 y Fj(where)40 b(V)h(represen)m(ts)g(the)g(name)g(of)h(a)f(v)m(ector)h(column)f(or)g (a)h(man)m(ually)f(constructed)g(v)m(ector)i(using)d(curly)0 2264 y(brac)m(k)m(ets)27 b(as)f(describ)s(ed)e(b)s(elo)m(w.)39 b(The)25 b(\014rst)g(6)h(of)g(these)g(functions)f(ignore)h(an)m(y)g(n)m (ull)f(v)-5 b(alues)26 b(in)f(the)h(v)m(ector)h(when)0 2377 y(computing)k(the)f(result.)41 b(The)30 b(STDDEV\(\))h(function)g (computes)f(the)h(sample)g(standard)e(deviation,)j(i.e.)42 b(it)31 b(is)0 2490 y(prop)s(ortional)f(to)h(1/SQR)-8 b(T\(N-1\))32 b(instead)f(of)g(1/SQR)-8 b(T\(N\),)31 b(where)f(N)h(is)f(NV)-10 b(ALID\(V\).)0 2650 y(The)31 b(SUM)h(function)f(literally)j(sums)d(all)h(the)g(elemen)m(ts)h(in)f (x,)g(returning)f(a)h(scalar)h(v)-5 b(alue.)45 b(If)31 b(V)h(is)g(a)g(b)s(o)s(olean)0 2763 y(v)m(ector,)40 b(SUM)c(returns)f (the)h(n)m(um)m(b)s(er)f(of)i(TR)m(UE)f(elemen)m(ts.)60 b(The)36 b(NELEM)g(function)g(returns)f(the)h(n)m(um)m(b)s(er)0 2876 y(of)h(elemen)m(ts)g(in)g(v)m(ector)h(V)e(whereas)h(NV)-10 b(ALID)36 b(return)g(the)h(n)m(um)m(b)s(er)e(of)h(non-n)m(ull)g(elemen) m(ts)i(in)e(the)h(v)m(ector.)0 2989 y(\(NELEM)28 b(also)h(op)s(erates)f (on)g(bit)f(and)g(string)h(columns,)g(returning)f(their)h(column)f (widths.\))40 b(As)27 b(an)h(example,)0 3102 y(to)42 b(test)g(whether)f(all)h(elemen)m(ts)h(of)f(t)m(w)m(o)g(v)m(ectors)h (satisfy)f(a)g(giv)m(en)g(logical)i(comparison,)g(one)e(can)g(use)f (the)0 3215 y(expression)668 3457 y Fe(SUM\()47 b(COL1)f(>)i(COL2)f(\)) g(==)g(NELEM\()f(COL1)h(\))0 3700 y Fj(whic)m(h)32 b(will)g(return)f (TR)m(UE)h(if)g(all)h(elemen)m(ts)g(of)f(COL1)g(are)g(greater)h(than)f (their)g(corresp)s(onding)f(elemen)m(ts)i(in)0 3813 y(COL2.)0 3973 y(T)-8 b(o)32 b(sp)s(ecify)f(a)i(single)f(elemen)m(t)h(of)f(a)g(v) m(ector,)i(giv)m(e)f(the)f(column)f(name)h(follo)m(w)m(ed)h(b)m(y)f(a)g (comma-separated)h(list)0 4086 y(of)c(co)s(ordinates)g(enclosed)h(in)e (square)h(brac)m(k)m(ets.)41 b(F)-8 b(or)30 b(example,)g(if)e(a)h(v)m (ector)i(column)d(named)h(PHAS)f(exists)h(in)0 4199 y(the)e(table)g(as) g(a)g(one)g(dimensional,)h(256)g(comp)s(onen)m(t)f(list)g(of)g(n)m(um)m (b)s(ers)e(from)h(whic)m(h)h(y)m(ou)g(w)m(an)m(ted)g(to)g(select)i(the) 0 4312 y(57th)j(comp)s(onen)m(t)g(for)f(use)g(in)g(the)h(expression,)f (then)h(PHAS[57])g(w)m(ould)f(do)h(the)f(tric)m(k.)45 b(Higher)32 b(dimensional)0 4425 y(arra)m(ys)41 b(of)h(data)f(ma)m(y)h (app)s(ear)f(in)f(a)i(column.)73 b(But)41 b(in)g(order)f(to)i(in)m (terpret)f(them,)j(the)e(TDIMn)e(k)m(eyw)m(ord)0 4538 y(m)m(ust)34 b(app)s(ear)g(in)g(the)g(header.)52 b(Assuming)34 b(that)h(a)f(\(4,4,4,4\))k(arra)m(y)c(is)h(pac)m(k)m(ed)g(in)m(to)g (eac)m(h)h(ro)m(w)e(of)g(a)h(column)0 4650 y(named)26 b(ARRA)-8 b(Y4D,)28 b(the)f(\(1,2,3,4\))i(comp)s(onen)m(t)e(elemen)m(t) g(of)g(eac)m(h)g(ro)m(w)g(is)f(accessed)i(b)m(y)e(ARRA)-8 b(Y4D[1,2,3,4].)0 4763 y(Arra)m(ys)33 b(up)e(to)j(dimension)e(5)h(are)f (curren)m(tly)h(supp)s(orted.)46 b(Eac)m(h)33 b(v)m(ector)h(index)e (can)h(itself)g(b)s(e)f(an)h(expression,)0 4876 y(although)39 b(it)g(m)m(ust)g(ev)-5 b(aluate)40 b(to)f(an)g(in)m(teger)h(v)-5 b(alue)39 b(within)f(the)h(b)s(ounds)d(of)j(the)g(v)m(ector.)67 b(V)-8 b(ector)40 b(columns)0 4989 y(whic)m(h)31 b(con)m(tain)h(spaces) g(or)f(arithmetic)h(op)s(erators)g(m)m(ust)f(ha)m(v)m(e)h(their)f (names)g(enclosed)h(in)f("$")h(c)m(haracters)h(as)0 5102 y(with)d($ARRA)-8 b(Y-4D$[1,2,3,4].)0 5262 y(A)45 b(more)f(C-lik)m(e)i (syn)m(tax)g(for)e(sp)s(ecifying)g(v)m(ector)j(indices)d(is)h(also)h(a) m(v)-5 b(ailable.)85 b(The)45 b(elemen)m(t)h(used)d(in)i(the)0 5375 y(preceding)28 b(example)h(alternativ)m(ely)i(could)d(b)s(e)g(sp)s (eci\014ed)g(with)f(the)i(syn)m(tax)g(ARRA)-8 b(Y4D[4][3][2][1].)45 b(Note)30 b(the)0 5488 y(rev)m(erse)40 b(order)f(of)h(indices)f(\(as)h (in)f(C\),)h(as)f(w)m(ell)i(as)e(the)h(fact)g(that)g(the)g(v)-5 b(alues)40 b(are)f(still)i(ones-based)e(\(as)h(in)0 5601 y(F)-8 b(ortran)39 b({)g(adopted)g(to)g(a)m(v)m(oid)h(am)m(biguit)m(y)g (for)f(1D)g(v)m(ectors\).)67 b(With)39 b(this)g(syn)m(tax,)i(one)e(do)s (es)f(not)h(need)f(to)0 5714 y(sp)s(ecify)30 b(all)h(of)g(the)f (indices.)41 b(T)-8 b(o)31 b(extract)h(a)f(3D)g(slice)g(of)g(this)f(4D) h(arra)m(y)-8 b(,)32 b(use)e(ARRA)-8 b(Y4D[4].)p eop end %%Page: 140 148 TeXDict begin 140 147 bop 0 299 a Fj(140)1528 b Fh(CHAPTER)29 b(10.)113 b(EXTENDED)30 b(FILE)h(NAME)f(SYNT)-8 b(AX)0 555 y Fj(V)g(ariable-length)33 b(v)m(ector)f(columns)e(are)g(not)h (supp)s(orted.)0 715 y(V)-8 b(ectors)24 b(can)e(b)s(e)f(man)m(ually)h (constructed)h(within)e(the)h(expression)g(using)f(a)h(comma-separated) i(list)f(of)f(elemen)m(ts)0 828 y(surrounded)35 b(b)m(y)j(curly)g (braces)h(\(')p Fc(fg)p Fj('\).)66 b(F)-8 b(or)38 b(example,)j(')p Fc(f)p Fj(1,3,6,1)p Fc(g)p Fj(')h(is)d(a)f(4-elemen)m(t)i(v)m(ector)g (con)m(taining)g(the)0 941 y(v)-5 b(alues)26 b(1,)h(3,)g(6,)g(and)e(1.) 40 b(The)25 b(v)m(ector)i(can)f(con)m(tain)h(only)f(b)s(o)s(olean,)g (in)m(teger,)j(and)c(real)h(v)-5 b(alues)26 b(\(or)g(expressions\).)0 1054 y(The)c(elemen)m(ts)i(will)f(b)s(e)f(promoted)h(to)g(the)g (highest)g(data)g(t)m(yp)s(e)g(presen)m(t.)38 b(An)m(y)22 b(elemen)m(ts)i(whic)m(h)f(are)g(themselv)m(es)0 1167 y(v)m(ectors,)40 b(will)d(b)s(e)f(expanded)g(out)h(with)g(eac)m(h)g(of) g(its)g(elemen)m(ts)i(b)s(ecoming)d(an)h(elemen)m(t)h(in)f(the)g (constructed)0 1280 y(v)m(ector.)0 1567 y Fd(10.11.4)113 b(Go)s(o)s(d)38 b(Time)g(In)m(terv)-6 b(al)37 b(Filtering)0 1786 y Fj(A)44 b(common)g(\014ltering)h(metho)s(d)e(in)m(v)m(olv)m(es)j (selecting)g(ro)m(ws)e(whic)m(h)f(ha)m(v)m(e)j(a)e(time)h(v)-5 b(alue)44 b(whic)m(h)g(lies)g(within)0 1899 y(what)37 b(is)g(called)i(a)f(Go)s(o)s(d)f(Time)g(In)m(terv)-5 b(al)38 b(or)f(GTI.)g(The)g(time)h(in)m(terv)-5 b(als)38 b(are)g(de\014ned)e(in)h(a)g(separate)i(FITS)0 2012 y(table)i (extension)g(whic)m(h)e(con)m(tains)i(2)g(columns)f(giving)g(the)h (start)f(and)g(stop)g(time)g(of)g(eac)m(h)i(go)s(o)s(d)e(in)m(terv)-5 b(al.)0 2124 y(The)34 b(\014ltering)h(op)s(eration)h(accepts)g(only)e (those)i(ro)m(ws)e(of)h(the)g(input)f(table)i(whic)m(h)e(ha)m(v)m(e)i (an)f(asso)s(ciated)h(time)0 2237 y(whic)m(h)f(falls)i(within)e(one)h (of)g(the)g(time)g(in)m(terv)-5 b(als)37 b(de\014ned)e(in)g(the)h(GTI)g (extension.)57 b(A)36 b(high)g(lev)m(el)h(function,)0 2350 y(gti\014lter\(a,b,c,d\),)44 b(is)c(a)m(v)-5 b(ailable)42 b(whic)m(h)d(ev)-5 b(aluates)41 b(eac)m(h)g(ro)m(w)e(of)h(the)f(input)g (table)h(and)f(returns)f(TR)m(UE)i(or)0 2463 y(F)-10 b(ALSE)30 b(dep)s(ending)f(whether)h(the)g(ro)m(w)h(is)f(inside)g(or)g (outside)h(the)g(go)s(o)s(d)f(time)h(in)m(terv)-5 b(al.)42 b(The)30 b(syn)m(tax)h(is)286 2700 y Fe(gtifilter\()45 b([)j("gtifile")d([,)i(expr)g([,)g("STARTCOL",)e("STOPCOL")g(])j(])f(]) g(\))191 2812 y(or)286 2925 y(gtifilter\()e([)j('gtifile')d([,)i(expr)g ([,)g('STARTCOL',)e('STOPCOL')g(])j(])f(])g(\))0 3162 y Fj(where)20 b(eac)m(h)h("[]")h(demarks)e(optional)h(parameters.)38 b(Note)21 b(that)g(the)g(quotes)f(around)g(the)g(gti\014le)i(and)d(ST) -8 b(AR)g(T/STOP)0 3275 y(column)33 b(are)h(required.)50 b(Either)34 b(single)g(or)g(double)f(quotes)h(ma)m(y)g(b)s(e)f(used.)50 b(In)33 b(cases)h(where)g(this)f(expression)0 3387 y(is)d(en)m(tered)g (on)g(the)g(Unix)g(command)g(line,)g(enclose)h(the)f(en)m(tire)h (expression)f(in)f(double)h(quotes,)g(and)g(then)f(use)0 3500 y(single)c(quotes)g(within)e(the)i(expression)f(to)h(enclose)g (the)g('gti\014le')h(and)d(other)i(terms.)38 b(It)25 b(is)f(also)h(usually)f(p)s(ossible)0 3613 y(to)38 b(do)e(the)h(rev)m (erse,)j(and)c(enclose)i(the)f(whole)g(expression)g(in)f(single)i (quotes)f(and)f(then)h(use)f(double)g(quotes)0 3726 y(within)d(the)g (expression.)50 b(The)33 b(gti\014le,)i(if)f(sp)s(eci\014ed,)f(can)h(b) s(e)f(blank)g(\(""\))i(whic)m(h)e(will)g(mean)h(to)g(use)f(the)h (\014rst)0 3839 y(extension)g(with)g(the)f(name)h("*GTI*")h(in)f(the)f (curren)m(t)h(\014le,)h(a)f(plain)f(extension)h(sp)s(eci\014er)f(\(eg,) j("+2",)g("[2]",)0 3952 y(or)30 b("[STDGTI]"\))i(whic)m(h)e(will)h(b)s (e)f(used)f(to)j(select)g(an)e(extension)h(in)f(the)h(curren)m(t)f (\014le,)h(or)f(a)h(regular)g(\014lename)0 4065 y(with)f(or)h(without)f (an)h(extension)g(sp)s(eci\014er)f(whic)m(h)g(in)g(the)h(latter)h(case) f(will)g(mean)f(to)i(use)e(the)h(\014rst)e(extension)0 4178 y(with)37 b(an)g(extension)g(name)h("*GTI*".)62 b(Expr)36 b(can)h(b)s(e)g(an)m(y)g(arithmetic)i(expression,)f (including)f(simply)g(the)0 4291 y(time)f(column)g(name.)57 b(A)36 b(v)m(ector)h(time)g(expression)e(will)h(pro)s(duce)f(a)h(v)m (ector)h(b)s(o)s(olean)f(result.)57 b(ST)-8 b(AR)g(TCOL)0 4404 y(and)27 b(STOPCOL)f(are)i(the)g(names)g(of)g(the)g(ST)-8 b(AR)g(T/STOP)26 b(columns)i(in)f(the)h(GTI)g(extension.)41 b(If)27 b(one)h(of)g(them)0 4517 y(is)i(sp)s(eci\014ed,)g(they)h(b)s (oth)f(m)m(ust)g(b)s(e.)0 4677 y(In)21 b(its)h(simplest)g(form,)i(no)d (parameters)h(need)g(to)h(b)s(e)e(pro)m(vided)g({)h(default)g(v)-5 b(alues)22 b(will)h(b)s(e)e(used.)37 b(The)21 b(expression)0 4790 y("gti\014lter\(\)")33 b(is)e(equiv)-5 b(alen)m(t)31 b(to)334 5026 y Fe(gtifilter\()45 b("",)i(TIME,)f("*START*",)f ("*STOP*")h(\))0 5262 y Fj(This)31 b(will)g(searc)m(h)h(the)g(curren)m (t)f(\014le)g(for)g(a)h(GTI)f(extension,)h(\014lter)g(the)f(TIME)g (column)g(in)g(the)h(curren)m(t)f(table,)0 5375 y(using)j(ST)-8 b(AR)g(T/STOP)34 b(times)i(tak)m(en)f(from)g(columns)f(in)h(the)g(GTI)g (extension)g(with)g(names)f(con)m(taining)j(the)0 5488 y(strings)32 b("ST)-8 b(AR)g(T")33 b(and)e("STOP".)46 b(The)32 b(wildcards)f(\('*'\))j(allo)m(w)g(sligh)m(t)f(v)-5 b(ariations)33 b(in)f(naming)g(con)m(v)m(en)m(tions)0 5601 y(suc)m(h)38 b(as)g("TST)-8 b(AR)g(T")39 b(or)f("ST)-8 b(AR)g(TTIME".)65 b(The)37 b(same)i(default)g(v)-5 b(alues)38 b(apply)g(for)g(unsp)s(eci\014ed)f(parame-)0 5714 y(ters)f(when)f(the)h (\014rst)f(one)i(or)f(t)m(w)m(o)h(parameters)f(are)h(sp)s(eci\014ed.)56 b(The)36 b(function)f(automatically)k(searc)m(hes)e(for)p eop end %%Page: 141 149 TeXDict begin 141 148 bop 0 299 a Fh(10.11.)73 b(R)m(O)m(W)31 b(FIL)-8 b(TERING)31 b(SPECIFICA)-8 b(TION)1936 b Fj(141)0 555 y(TIMEZER)m(O/I/F)37 b(k)m(eyw)m(ords)f(in)g(the)h(curren)m(t)f (and)g(GTI)g(extensions,)i(applying)f(a)f(relativ)m(e)j(time)e (o\013set,)i(if)0 668 y(necessary)-8 b(.)0 958 y Fd(10.11.5)113 b(Spatial)38 b(Region)g(Filtering)0 1177 y Fj(Another)g(common)g (\014ltering)g(metho)s(d)f(selects)i(ro)m(ws)f(based)g(on)f(whether)h (the)g(spatial)h(p)s(osition)e(asso)s(ciated)0 1290 y(with)32 b(eac)m(h)i(ro)m(w)e(is)h(lo)s(cated)h(within)e(a)h(giv)m(en)g (2-dimensional)g(region.)48 b(The)32 b(syn)m(tax)h(for)f(this)h (high-lev)m(el)h(\014lter)0 1403 y(is)334 1659 y Fe(regfilter\()45 b("regfilename")f([)k(,)f(Xexpr,)f(Yexpr)h([)g(,)h("wcs)e(cols")h(])g (])g(\))0 1915 y Fj(where)22 b(eac)m(h)i("[]")g(demarks)e(optional)i (parameters.)38 b(The)22 b(region)h(\014le)g(name)f(is)h(required)f (and)g(m)m(ust)g(b)s(e)g(enclosed)0 2028 y(in)34 b(quotes.)51 b(The)33 b(remaining)h(parameters)h(are)f(optional.)52 b(There)33 b(are)i(2)f(supp)s(orted)e(formats)i(for)f(the)h(region)0 2141 y(\014le:)62 b(ASCI)s(I)39 b(\014le)h(or)h(FITS)f(binary)g(table.) 73 b(The)40 b(region)h(\014le)g(con)m(tains)h(a)f(list)g(of)g(one)g(or) g(more)g(geometric)0 2254 y(shap)s(es)30 b(\(circle,)j(ellipse,)g(b)s (o)m(x,)e(etc.\))44 b(whic)m(h)31 b(de\014nes)f(a)i(region)g(on)f(the)g (celestial)j(sphere)c(or)h(an)g(area)h(within)f(a)0 2367 y(particular)36 b(2D)g(image.)57 b(The)35 b(region)h(\014le)f(is)g(t)m (ypically)j(generated)e(using)f(an)g(image)i(displa)m(y)e(program)g (suc)m(h)0 2480 y(as)e(fv/PO)m(W)g(\(distribute)f(b)m(y)h(the)f(HEASAR) m(C\),)h(or)g(ds9)f(\(distributed)g(b)m(y)g(the)h(Smithsonian)f (Astroph)m(ysical)0 2593 y(Observ)-5 b(atory\).)69 b(Users)39 b(should)g(refer)g(to)h(the)g(do)s(cumen)m(tation)h(pro)m(vided)e(with) g(these)h(programs)f(for)h(more)0 2706 y(details)29 b(on)f(the)g(syn)m (tax)h(used)e(in)h(the)h(region)f(\014les.)40 b(The)28 b(FITS)f(region)i(\014le)f(format)h(is)f(de\014ned)f(in)h(a)g(do)s (cumen)m(t)0 2819 y(a)m(v)-5 b(ailable)33 b(from)d(the)g(FITS)g(Supp)s (ort)e(O\016ce)j(at)g(h)m(ttp://\014ts.gsfc.nasa.go)m(v/)k(registry/)c (region.h)m(tml)0 2979 y(In)21 b(its)h(simplest)g(form,)i(\(e.g.,)h (reg\014lter\("region.reg"\))h(\))c(the)g(co)s(ordinates)g(in)g(the)g (default)g('X')h(and)e('Y')h(columns)0 3092 y(will)43 b(b)s(e)g(used)f(to)i(determine)f(if)g(eac)m(h)h(ro)m(w)f(is)g(inside)g (or)g(outside)g(the)g(area)h(sp)s(eci\014ed)e(in)h(the)g(region)h (\014le.)0 3204 y(Alternate)32 b(p)s(osition)e(column)g(names,)h(or)f (expressions,)h(ma)m(y)g(b)s(e)e(en)m(tered)i(if)g(needed,)f(as)h(in) 382 3461 y Fe(regfilter\("region.reg",)41 b(XPOS,)47 b(YPOS\))0 3717 y Fj(Region)37 b(\014ltering)f(can)g(b)s(e)f(applied)g (most)h(unam)m(biguously)f(if)h(the)g(p)s(ositions)g(in)f(the)h(region) g(\014le)g(and)f(in)h(the)0 3830 y(table)g(to)g(b)s(e)e(\014ltered)h (are)h(b)s(oth)e(giv)m(e)j(in)e(terms)g(of)g(absolute)h(celestial)i(co) s(ordinate)e(units.)54 b(In)35 b(this)g(case)h(the)0 3943 y(lo)s(cations)26 b(and)d(sizes)i(of)g(the)f(geometric)i(shap)s (es)e(in)g(the)g(region)h(\014le)f(are)h(sp)s(eci\014ed)f(in)g(angular) g(units)g(on)g(the)g(sky)0 4056 y(\(e.g.,)32 b(p)s(ositions)e(giv)m(en) i(in)e(R.A.)g(and)g(Dec.)42 b(and)30 b(sizes)h(in)f(arcseconds)g(or)h (arcmin)m(utes\).)41 b(Similarly)-8 b(,)31 b(eac)m(h)h(ro)m(w)0 4168 y(of)h(the)h(\014ltered)f(table)h(will)f(ha)m(v)m(e)i(a)e (celestial)j(co)s(ordinate)e(asso)s(ciated)g(with)f(it.)50 b(This)32 b(asso)s(ciation)j(is)e(usually)0 4281 y(implemen)m(ted)39 b(using)e(a)i(set)g(of)f(so-called)i('W)-8 b(orld)39 b(Co)s(ordinate)g(System')f(\(or)h(W)m(CS\))f(FITS)g(k)m(eyw)m(ords)g (that)0 4394 y(de\014ne)27 b(the)g(co)s(ordinate)h(transformation)g (that)g(m)m(ust)f(b)s(e)f(applied)h(to)h(the)g(v)-5 b(alues)27 b(in)g(the)h('X')g(and)e('Y')i(columns)0 4507 y(to)j(calculate)i(the)d (co)s(ordinate.)0 4667 y(Alternativ)m(ely)-8 b(,)30 b(one)d(can)g(p)s (erform)e(spatial)j(\014ltering)e(using)g(unitless)h('pixel')g(co)s (ordinates)h(for)e(the)h(regions)g(and)0 4780 y(ro)m(w)33 b(p)s(ositions.)49 b(In)33 b(this)g(case)h(the)f(user)g(m)m(ust)g(b)s (e)f(careful)h(to)h(ensure)f(that)g(the)h(p)s(ositions)f(in)g(the)g(2)g (\014les)h(are)0 4893 y(self-consisten)m(t.)54 b(A)34 b(t)m(ypical)i(problem)d(is)h(that)h(the)f(region)h(\014le)f(ma)m(y)h (b)s(e)e(generated)j(using)d(a)i(binned)d(image,)0 5006 y(but)g(the)h(un)m(binned)e(co)s(ordinates)i(are)g(giv)m(en)h(in)e(the) h(ev)m(en)m(t)i(table.)48 b(The)32 b(R)m(OSA)-8 b(T)33 b(ev)m(en)m(ts)h(\014les,)g(for)e(example,)0 5119 y(ha)m(v)m(e)f(X)f (and)f(Y)g(pixel)h(co)s(ordinates)g(that)h(range)f(from)f(1)h(-)g (15360.)42 b(These)30 b(co)s(ordinates)g(are)g(t)m(ypically)h(binned)0 5232 y(b)m(y)i(a)h(factor)g(of)f(32)h(to)g(pro)s(duce)e(a)i(480x480)i (pixel)d(image.)51 b(If)32 b(one)i(then)f(uses)g(a)g(region)h(\014le)f (generated)h(from)0 5345 y(this)c(image)i(\(in)f(image)g(pixel)g (units\))g(to)g(\014lter)f(the)h(R)m(OSA)-8 b(T)30 b(ev)m(en)m(ts)i (\014le,)f(then)f(the)h(X)g(and)f(Y)g(column)h(v)-5 b(alues)0 5458 y(m)m(ust)30 b(b)s(e)g(con)m(v)m(erted)i(to)f(corresp)s(onding)e (pixel)i(units)f(as)g(in:)382 5714 y Fe(regfilter\("rosat.reg",)42 b(X/32.+.5,)j(Y/32.+.5\))p eop end %%Page: 142 150 TeXDict begin 142 149 bop 0 299 a Fj(142)1528 b Fh(CHAPTER)29 b(10.)113 b(EXTENDED)30 b(FILE)h(NAME)f(SYNT)-8 b(AX)0 555 y Fj(Note)46 b(that)f(this)f(binning)f(con)m(v)m(ersion)j(is)e(not) h(necessary)g(if)f(the)h(region)g(\014le)f(is)h(sp)s(eci\014ed)e(using) h(celestial)0 668 y(co)s(ordinate)h(units)f(instead)g(of)g(pixel)h (units)f(b)s(ecause)g(CFITSIO)e(is)j(then)e(able)i(to)g(directly)g (compare)g(the)0 781 y(celestial)30 b(co)s(ordinate)f(of)e(eac)m(h)i (ro)m(w)f(in)f(the)h(table)g(with)g(the)f(celestial)k(co)s(ordinates)d (in)f(the)h(region)g(\014le)g(without)0 894 y(ha)m(ving)j(to)g(kno)m(w) f(an)m(ything)h(ab)s(out)f(ho)m(w)h(the)f(image)i(ma)m(y)f(ha)m(v)m(e)g (b)s(een)f(binned.)0 1054 y(The)f(last)h("w)m(cs)g(cols")h(parameter)f (should)e(rarely)h(b)s(e)g(needed.)40 b(If)29 b(supplied,)f(this)i (string)f(con)m(tains)i(the)e(names)0 1167 y(of)37 b(the)g(2)h(columns) f(\(space)h(or)f(comma)g(separated\))h(whic)m(h)f(ha)m(v)m(e)h(the)g (asso)s(ciated)g(W)m(CS)f(k)m(eyw)m(ords.)61 b(If)37 b(not)0 1280 y(supplied,)f(the)g(\014lter)g(will)h(scan)f(the)g(X)g (and)f(Y)h(expressions)g(for)g(column)f(names.)58 b(If)35 b(only)h(one)h(is)f(found)e(in)0 1393 y(eac)m(h)e(expression,)e(those)h (columns)f(will)h(b)s(e)e(used,)h(otherwise)h(an)f(error)g(will)h(b)s (e)f(returned.)0 1553 y(These)g(region)h(shap)s(es)f(are)g(supp)s (orted)f(\(names)h(are)h(case)h(insensitiv)m(e\):)334 1817 y Fe(Point)428 b(\()48 b(X1,)f(Y1)g(\))715 b(<-)48 b(One)f(pixel)f(square)g(region)334 1930 y(Line)476 b(\()48 b(X1,)f(Y1,)g(X2,)f(Y2)i(\))333 b(<-)48 b(One)f(pixel)f(wide)h(region) 334 2043 y(Polygon)332 b(\()48 b(X1,)f(Y1,)g(X2,)f(Y2,)h(...)g(\))95 b(<-)48 b(Rest)e(are)h(interiors)e(with)334 2156 y(Rectangle)236 b(\()48 b(X1,)f(Y1,)g(X2,)f(Y2,)h(A)h(\))334 b(|)47 b(boundaries)e (considered)334 2269 y(Box)524 b(\()48 b(Xc,)f(Yc,)g(Wdth,)f(Hght,)g(A) i(\))143 b(V)47 b(within)f(the)h(region)334 2382 y(Diamond)332 b(\()48 b(Xc,)f(Yc,)g(Wdth,)f(Hght,)g(A)i(\))334 2494 y(Circle)380 b(\()48 b(Xc,)f(Yc,)g(R)g(\))334 2607 y(Annulus)332 b(\()48 b(Xc,)f(Yc,)g(Rin,)f(Rout)h(\))334 2720 y(Ellipse)332 b(\()48 b(Xc,)f(Yc,)g(Rx,)f(Ry,)h(A)h(\))334 2833 y(Elliptannulus)c(\() k(Xc,)f(Yc,)g(Rinx,)f(Riny,)g(Routx,)g(Routy,)g(Ain,)h(Aout)g(\))334 2946 y(Sector)380 b(\()48 b(Xc,)f(Yc,)g(Amin,)f(Amax)h(\))0 3210 y Fj(where)28 b(\(Xc,Yc\))j(is)d(the)h(co)s(ordinate)h(of)e(the)h (shap)s(e's)f(cen)m(ter;)j(\(X#,Y#\))e(are)g(the)g(co)s(ordinates)g(of) g(the)g(shap)s(e's)0 3323 y(edges;)39 b(Rxxx)c(are)g(the)h(shap)s(es')f (v)-5 b(arious)35 b(Radii)h(or)f(semima)5 b(jor/minor)36 b(axes;)i(and)d(Axxx)g(are)h(the)g(angles)g(of)0 3436 y(rotation)d(\(or)e(b)s(ounding)f(angles)i(for)f(Sector\))h(in)f (degrees.)44 b(F)-8 b(or)32 b(rotated)h(shap)s(es,)e(the)g(rotation)i (angle)f(can)g(b)s(e)0 3549 y(left)g(o\013,)h(indicating)f(no)f (rotation.)46 b(Common)31 b(alternate)i(names)e(for)h(the)f(regions)h (can)g(also)h(b)s(e)d(used:)43 b(rotb)s(o)m(x)0 3662 y(=)29 b(b)s(o)m(x;)g(rotrectangle)i(=)e(rectangle;)i(\(rot\)rhom)m (bus)e(=)f(\(rot\)diamond;)j(and)d(pie)h(=)f(sector.)42 b(When)28 b(a)i(shap)s(e's)0 3775 y(name)e(is)g(preceded)f(b)m(y)h(a)g (min)m(us)g(sign,)g('-',)i(the)e(de\014ned)e(region)j(is)f(instead)g (the)g(area)h(*outside*)g(its)f(b)s(oundary)0 3888 y(\(ie,)36 b(the)e(region)h(is)f(in)m(v)m(erted\).)53 b(All)34 b(the)g(shap)s(es)f (within)h(a)g(single)h(region)f(\014le)h(are)f(OR'd)f(together)j(to)e (create)0 4000 y(the)29 b(region,)i(and)d(the)i(order)f(is)g (signi\014can)m(t.)41 b(The)29 b(o)m(v)m(erall)i(w)m(a)m(y)g(of)e(lo)s (oking)h(at)g(region)g(\014les)f(is)g(that)h(if)f(the)h(\014rst)0 4113 y(region)f(is)g(an)g(excluded)g(region)g(then)f(a)i(dumm)m(y)d (included)h(region)i(of)f(the)g(whole)g(detector)h(is)f(inserted)f(in)h (the)0 4226 y(fron)m(t.)40 b(Then)25 b(eac)m(h)j(region)f(sp)s (eci\014cation)h(as)f(it)g(is)g(pro)s(cessed)f(o)m(v)m(errides)h(an)m (y)g(selections)i(inside)d(of)h(that)g(region)0 4339 y(sp)s(eci\014ed)36 b(b)m(y)g(previous)g(regions.)59 b(Another)37 b(w)m(a)m(y)g(of)g(thinking)f(ab)s(out)g(this)g(is)h(that) g(if)f(a)h(previous)f(excluded)0 4452 y(region)31 b(is)f(completely)i (inside)f(of)f(a)h(subsequen)m(t)e(included)h(region)h(the)g(excluded)f (region)h(is)f(ignored.)0 4612 y(The)44 b(p)s(ositional)i(co)s (ordinates)g(ma)m(y)f(b)s(e)g(giv)m(en)h(either)f(in)g(pixel)g(units,)j (decimal)e(degrees)g(or)f(hh:mm:ss.s,)0 4725 y(dd:mm:ss.s)25 b(units.)38 b(The)26 b(shap)s(e)f(sizes)i(ma)m(y)f(b)s(e)g(giv)m(en)h (in)e(pixels,)j(degrees,)f(arcmin)m(utes,)h(or)e(arcseconds.)40 b(Lo)s(ok)0 4838 y(at)31 b(examples)g(of)f(region)h(\014le)g(pro)s (duced)d(b)m(y)i(fv/PO)m(W)h(or)g(ds9)f(for)g(further)f(details)i(of)g (the)f(region)h(\014le)f(format.)0 4998 y(There)h(are)g(three)h(lo)m (w-lev)m(el)i(functions)d(that)g(are)h(primarily)f(for)g(use)g(with)g (reg\014lter)g(function,)h(but)e(they)i(can)0 5111 y(b)s(e)j(called)i (directly)-8 b(.)59 b(They)35 b(return)g(a)h(b)s(o)s(olean)g(true)g(or) g(false)h(dep)s(ending)d(on)i(whether)f(a)i(t)m(w)m(o)g(dimensional)0 5224 y(p)s(oin)m(t)30 b(is)h(in)f(the)g(region)h(or)g(not.)41 b(The)30 b(p)s(ositional)h(co)s(ordinates)g(m)m(ust)f(b)s(e)g(giv)m(en) h(in)f(pixel)h(units:)191 5488 y Fe("point)46 b(in)h(a)h(circular)d (region")477 5601 y(circle\(xcntr,ycntr,radius)o(,Xco)o(lumn)o(,Yc)o (olum)o(n\))p eop end %%Page: 143 151 TeXDict begin 143 150 bop 0 299 a Fh(10.11.)73 b(R)m(O)m(W)31 b(FIL)-8 b(TERING)31 b(SPECIFICA)-8 b(TION)1936 b Fj(143)191 555 y Fe("point)46 b(in)h(an)g(elliptical)e(region")430 668 y(ellipse\(xcntr,ycntr,xhl)o(f_w)o(dth,)o(yhlf)o(_wd)o(th,r)o(otat) o(ion)o(,Xco)o(lumn)o(,Yc)o(olum)o(n\))191 894 y("point)h(in)h(a)h (rectangular)c(region")620 1007 y(box\(xcntr,ycntr,xfll_wdth,)o(yfll)o (_wd)o(th,r)o(otat)o(ion)o(,Xco)o(lumn)o(,Yc)o(olum)o(n\))191 1233 y(where)334 1346 y(\(xcntr,ycntr\))g(are)j(the)g(\(x,y\))f (position)g(of)h(the)g(center)f(of)h(the)g(region)334 1458 y(\(xhlf_wdth,yhlf_wdth\))42 b(are)47 b(the)g(\(x,y\))f(half)h (widths)f(of)h(the)g(region)334 1571 y(\(xfll_wdth,yfll_wdth\))42 b(are)47 b(the)g(\(x,y\))f(full)h(widths)f(of)h(the)g(region)334 1684 y(\(radius\))f(is)h(half)f(the)h(diameter)f(of)h(the)g(circle)334 1797 y(\(rotation\))e(is)i(the)g(angle\(degrees\))d(that)j(the)g (region)f(is)h(rotated)f(with)620 1910 y(respect)g(to)h (\(xcntr,ycntr\))334 2023 y(\(Xcoord,Ycoord\))d(are)j(the)g(\(x,y\))f (coordinates)f(to)i(test,)f(usually)g(column)620 2136 y(names)334 2249 y(NOTE:)g(each)h(parameter)e(can)i(itself)f(be)i(an)f (expression,)d(not)j(merely)f(a)620 2362 y(column)h(name)f(or)h (constant.)0 2669 y Fd(10.11.6)113 b(Example)38 b(Ro)m(w)f(Filters)191 2891 y Fe([)47 b(binary)f(&&)i(mag)f(<=)g(5.0])380 b(-)48 b(Extract)e(all)h(binary)f(stars)g(brighter)1766 3004 y(than)94 b(fifth)47 b(magnitude)e(\(note)h(that)1766 3117 y(the)h(initial)f(space)g(is)h(necessary)e(to)1766 3230 y(prevent)h(it)h(from)g(being)f(treated)g(as)h(a)1766 3343 y(binning)f(specification\))191 3569 y([#row)g(>=)h(125)g(&&)h (#row)e(<=)h(175])142 b(-)48 b(Extract)e(row)h(numbers)e(125)i(through) f(175)191 3794 y([IMAGE[4,5])f(.gt.)h(100])476 b(-)48 b(Extract)e(all)h(rows)f(that)h(have)g(the)1766 3907 y(\(4,5\))f(component)g(of)h(the)g(IMAGE)f(column)1766 4020 y(greater)g(than)g(100)191 4246 y([abs\(sin\(theta)e(*)j(#deg\)\)) f(<)i(0.5])e(-)i(Extract)e(all)h(rows)f(having)g(the)1766 4359 y(absolute)f(value)i(of)g(the)g(sine)g(of)g(theta)1766 4472 y(less)94 b(than)47 b(a)g(half)g(where)f(the)h(angles)1766 4585 y(are)g(tabulated)e(in)i(degrees)191 4811 y([SUM\()f(SPEC)h(>)g (3*BACKGRND)e(\)>=1])94 b(-)48 b(Extract)e(all)h(rows)f(containing)f(a) 1766 4924 y(spectrum,)g(held)i(in)g(vector)f(column)1766 5036 y(SPEC,)g(with)h(at)g(least)f(one)h(value)g(3)1766 5149 y(times)f(greater)g(than)h(the)g(background)1766 5262 y(level)f(held)h(in)g(a)h(keyword,)d(BACKGRND)191 5488 y([VCOL=={1,4,2}])759 b(-)48 b(Extract)e(all)h(rows)f(whose)h (vector)f(column)1766 5601 y(VCOL)h(contains)e(the)i(3-elements)e(1,)i (4,)g(and)1766 5714 y(2.)p eop end %%Page: 144 152 TeXDict begin 144 151 bop 0 299 a Fj(144)1528 b Fh(CHAPTER)29 b(10.)113 b(EXTENDED)30 b(FILE)h(NAME)f(SYNT)-8 b(AX)191 668 y Fe([@rowFilter.txt])711 b(-)48 b(Extract)e(rows)g(using)h(the)g (expression)1766 781 y(contained)e(within)h(the)h(text)g(file)1766 894 y(rowFilter.txt)191 1120 y([gtifilter\(\)])855 b(-)48 b(Search)e(the)h(current)f(file)g(for)h(a)h(GTI)239 1233 y(extension,)92 b(filter)i(the)47 b(TIME)239 1346 y(column)f(in)h(the)g (current)f(table,)g(using)239 1458 y(START/STOP)f(times)h(taken)g(from) 239 1571 y(columns)f(in)j(the)f(GTI)94 b(extension)191 1797 y([regfilter\("pow.reg"\)])423 b(-)48 b(Extract)e(rows)g(which)h (have)f(a)i(coordinate)1766 1910 y(\(as)f(given)f(in)h(the)g(X)h(and)f (Y)g(columns\))1766 2023 y(within)f(the)h(spatial)f(region)g(specified) 1766 2136 y(in)h(the)g(pow.reg)f(region)g(file.)191 2362 y([regfilter\("pow.reg",)c(Xs,)47 b(Ys\)])f(-)i(Same)f(as)g(above,)f (except)g(that)h(the)1766 2475 y(Xs)g(and)g(Ys)g(columns)f(will)h(be)g (used)f(to)1766 2588 y(determine)f(the)i(coordinate)e(of)i(each)1766 2700 y(row)g(in)g(the)g(table.)0 3027 y Ff(10.12)181 b(Binning)44 b(or)h(Histogramming)i(Sp)t(eci\014cation)0 3277 y Fj(The)22 b(optional)i(binning)e(sp)s(eci\014er)g(is)h(enclosed) h(in)f(square)f(brac)m(k)m(ets)j(and)d(can)h(b)s(e)f(distinguished)g (from)h(a)g(general)0 3390 y(ro)m(w)32 b(\014lter)h(sp)s(eci\014cation) g(b)m(y)f(the)h(fact)g(that)g(it)g(b)s(egins)f(with)g(the)g(k)m(eyw)m (ord)h('bin')f(not)h(immediately)g(follo)m(w)m(ed)0 3503 y(b)m(y)41 b(an)f(equals)i(sign.)72 b(When)41 b(binning)e(is)i(sp)s (eci\014ed,)i(a)e(temp)s(orary)g(N-dimensional)g(FITS)f(primary)g(arra) m(y)0 3615 y(is)j(created)h(b)m(y)f(computing)h(the)f(histogram)h(of)f (the)g(v)-5 b(alues)44 b(in)e(the)i(sp)s(eci\014ed)e(columns)h(of)g(a)h (FITS)e(table)0 3728 y(extension.)f(After)30 b(the)f(histogram)h(is)g (computed)f(the)h(input)e(FITS)h(\014le)h(con)m(taining)h(the)e(table)i (is)e(then)g(closed)0 3841 y(and)34 b(the)h(temp)s(orary)f(FITS)g (primary)g(arra)m(y)h(is)g(op)s(ened)f(and)g(passed)g(to)h(the)g (application)h(program.)54 b(Th)m(us,)0 3954 y(the)39 b(application)h(program)f(nev)m(er)g(sees)g(the)g(original)h(FITS)e (table)i(and)e(only)h(sees)h(the)f(image)h(in)e(the)h(new)0 4067 y(temp)s(orary)32 b(\014le)h(\(whic)m(h)g(has)f(no)h(additional)g (extensions\).)49 b(Ob)m(viously)-8 b(,)34 b(the)f(application)h (program)e(m)m(ust)h(b)s(e)0 4180 y(exp)s(ecting)e(to)g(op)s(en)f(a)h (FITS)e(image)j(and)e(not)g(a)h(FITS)f(table)h(in)f(this)g(case.)0 4340 y(The)g(data)h(t)m(yp)s(e)f(of)h(the)f(FITS)g(histogram)g(image)i (ma)m(y)f(b)s(e)f(sp)s(eci\014ed)f(b)m(y)h(app)s(ending)f('b')h(\(for)h (8-bit)g(b)m(yte\),)g('i')0 4453 y(\(for)g(16-bit)g(in)m(tegers\),)h ('j')f(\(for)g(32-bit)g(in)m(teger\),)i('r')d(\(for)h(32-bit)g (\015oating)h(p)s(oin)m(ts\),)e(or)h('d')f(\(for)h(64-bit)g(double)0 4566 y(precision)j(\015oating)i(p)s(oin)m(t\))e(to)h(the)g('bin')f(k)m (eyw)m(ord)h(\(e.g.)54 b('[binr)33 b(X]')i(creates)h(a)f(real)g (\015oating)g(p)s(oin)m(t)f(image\).)0 4679 y(If)g(the)i(data)f(t)m(yp) s(e)g(is)g(not)h(explicitly)g(sp)s(eci\014ed)e(then)h(a)g(32-bit)i(in)m (teger)f(image)g(will)f(b)s(e)g(created)h(b)m(y)e(default,)0 4792 y(unless)24 b(the)i(w)m(eigh)m(ting)g(option)g(is)f(also)h(sp)s (eci\014ed)e(in)h(whic)m(h)g(case)h(the)f(image)i(will)e(ha)m(v)m(e)h (a)g(32-bit)g(\015oating)g(p)s(oin)m(t)0 4905 y(data)31 b(t)m(yp)s(e)g(b)m(y)f(default.)0 5065 y(The)24 b(histogram)g(image)i (ma)m(y)f(ha)m(v)m(e)g(from)f(1)g(to)h(4)g(dimensions)e(\(axes\),)k (dep)s(ending)c(on)h(the)g(n)m(um)m(b)s(er)f(of)h(columns)0 5178 y(that)31 b(are)g(sp)s(eci\014ed.)40 b(The)30 b(general)h(form)f (of)g(the)h(binning)e(sp)s(eci\014cation)i(is:)48 5389 y Fe([bin{bijrd})92 b(Xcol=min:max:binsize,)42 b(Ycol=)47 b(...,)f(Zcol=...,)f(Tcol=...;)h(weight])0 5601 y Fj(in)39 b(whic)m(h)g(up)f(to)i(4)g(columns,)h(eac)m(h)f(corresp)s(onding)e(to)i (an)g(axis)f(of)h(the)f(image,)k(are)d(listed.)67 b(The)39 b(column)0 5714 y(names)27 b(are)h(case)h(insensitiv)m(e,)g(and)e(the)h (column)f(n)m(um)m(b)s(er)f(ma)m(y)i(b)s(e)f(giv)m(en)h(instead)g(of)g (the)g(name,)g(preceded)f(b)m(y)p eop end %%Page: 145 153 TeXDict begin 145 152 bop 0 299 a Fh(10.12.)113 b(BINNING)32 b(OR)e(HISTOGRAMMING)g(SPECIFICA)-8 b(TION)1223 b Fj(145)0 555 y(a)32 b(p)s(ound)e(sign)i(\(e.g.,)i([bin)d(#4=1:512]\).)47 b(If)31 b(the)h(column)g(name)g(is)f(not)h(sp)s(eci\014ed,)g(then)f (CFITSIO)g(will)h(\014rst)0 668 y(try)37 b(to)h(use)f(the)g('preferred) f(column')i(as)f(sp)s(eci\014ed)g(b)m(y)g(the)g(CPREF)g(k)m(eyw)m(ord)h (if)f(it)g(exists)h(\(e.g.,)j('CPREF)0 781 y(=)i('DETX,DETY'\),)h (otherwise)g(column)f(names)g('X',)h('Y',)g('Z',)f(and)f('T')i(will)f (b)s(e)f(assumed)h(for)g(eac)m(h)h(of)0 894 y(the)37 b(4)h(axes,)i(resp)s(ectiv)m(ely)-8 b(.)62 b(In)37 b(cases)h(where)e (the)i(column)f(name)g(could)g(b)s(e)f(confused)h(with)g(an)g (arithmetic)0 1007 y(expression,)30 b(enclose)i(the)f(column)f(name)g (in)g(paren)m(theses)h(to)g(force)g(the)f(name)h(to)g(b)s(e)f(in)m (terpreted)g(literally)-8 b(.)0 1167 y(Eac)m(h)33 b(column)f(name)g(ma) m(y)h(b)s(e)f(follo)m(w)m(ed)h(b)m(y)g(an)f(equals)g(sign)h(and)e(then) h(the)g(lo)m(w)m(er)i(and)e(upp)s(er)e(range)i(of)h(the)0 1280 y(histogram,)f(and)e(the)h(size)h(of)f(the)g(histogram)h(bins,)e (separated)h(b)m(y)g(colons.)43 b(Spaces)31 b(are)g(allo)m(w)m(ed)i(b)s (efore)e(and)0 1393 y(after)e(the)g(equals)g(sign)f(but)g(not)h(within) f(the)h('min:max:binsize')g(string.)40 b(The)29 b(min,)f(max)h(and)f (binsize)h(v)-5 b(alues)0 1506 y(ma)m(y)32 b(b)s(e)e(in)m(teger)i(or)f (\015oating)h(p)s(oin)m(t)f(n)m(um)m(b)s(ers,)f(or)h(they)g(ma)m(y)g(b) s(e)g(the)g(names)g(of)g(k)m(eyw)m(ords)g(in)g(the)g(header)g(of)0 1619 y(the)g(table.)41 b(If)30 b(the)h(latter,)h(then)e(the)g(v)-5 b(alue)31 b(of)g(that)g(k)m(eyw)m(ord)f(is)h(substituted)f(in)m(to)h (the)g(expression.)0 1779 y(Default)37 b(v)-5 b(alues)36 b(for)g(the)g(min,)h(max)f(and)g(binsize)g(quan)m(tities)h(will)f(b)s (e)f(used)h(if)f(not)i(explicitly)g(giv)m(en)g(in)f(the)0 1892 y(binning)29 b(expression)h(as)h(sho)m(wn)f(in)g(these)h (examples:)191 2118 y Fe([bin)47 b(x)g(=)g(:512:2])94 b(-)47 b(use)g(default)f(minimum)g(value)191 2231 y([bin)h(x)g(=)g (1::2])190 b(-)47 b(use)g(default)f(maximum)g(value)191 2344 y([bin)h(x)g(=)g(1:512])142 b(-)47 b(use)g(default)f(bin)h(size) 191 2457 y([bin)g(x)g(=)g(1:])286 b(-)47 b(use)g(default)f(maximum)g (value)g(and)h(bin)g(size)191 2570 y([bin)g(x)g(=)g(:512])190 b(-)47 b(use)g(default)f(minimum)g(value)g(and)h(bin)g(size)191 2682 y([bin)g(x)g(=)g(2])334 b(-)47 b(use)g(default)f(minimum)g(and)h (maximum)f(values)191 2795 y([bin)h(x])524 b(-)47 b(use)g(default)f (minimum,)g(maximum)g(and)g(bin)h(size)191 2908 y([bin)g(4])524 b(-)47 b(default)f(2-D)h(image,)f(bin)h(size)g(=)g(4)h(in)f(both)g (axes)191 3021 y([bin])619 b(-)47 b(default)f(2-D)h(image)0 3247 y Fj(CFITSIO)31 b(will)i(use)f(the)h(v)-5 b(alue)33 b(of)g(the)g(TLMINn,)f(TLMAXn,)h(and)f(TDBINn)h(k)m(eyw)m(ords,)h(if)e (they)h(exist,)h(for)0 3360 y(the)j(default)f(min,)i(max,)g(and)e (binsize,)i(resp)s(ectiv)m(ely)-8 b(.)61 b(If)36 b(they)h(do)f(not)h (exist)g(then)f(CFITSIO)f(will)i(use)f(the)0 3473 y(actual)d(minim)m (um)e(and)h(maxim)m(um)g(v)-5 b(alues)32 b(in)g(the)g(column)f(for)h (the)g(histogram)h(min)e(and)h(max)g(v)-5 b(alues.)45 b(The)0 3586 y(default)34 b(binsize)f(will)h(b)s(e)f(set)h(to)h(1,)g (or)e(\(max)h(-)g(min\))f(/)h(10.,)i(whic)m(hev)m(er)e(is)g(smaller,)h (so)e(that)i(the)e(histogram)0 3699 y(will)e(ha)m(v)m(e)g(at)g(least)h (10)f(bins)f(along)h(eac)m(h)h(axis.)0 3859 y(A)41 b(shortcut)g (notation)h(is)f(allo)m(w)m(ed)i(if)e(all)h(the)f(columns/axes)h(ha)m (v)m(e)g(the)f(same)g(binning)f(sp)s(eci\014cation.)74 b(In)0 3972 y(this)33 b(case)g(all)h(the)f(column)f(names)h(ma)m(y)g(b) s(e)f(listed)h(within)f(paren)m(theses,)i(follo)m(w)m(ed)h(b)m(y)d(the) h(\(single\))h(binning)0 4085 y(sp)s(eci\014cation,)d(as)g(in:)191 4311 y Fe([bin)47 b(\(X,Y\)=1:512:2])191 4424 y([bin)g(\(X,Y\))f(=)h (5])0 4650 y Fj(The)31 b(optional)i(w)m(eigh)m(ting)h(factor)e(is)g (the)g(last)g(item)h(in)e(the)h(binning)f(sp)s(eci\014er)g(and,)h(if)f (presen)m(t,)i(is)e(separated)0 4763 y(from)38 b(the)g(list)h(of)f (columns)g(b)m(y)g(a)h(semi-colon.)65 b(As)39 b(the)f(histogram)h(is)f (accum)m(ulated,)k(this)c(w)m(eigh)m(t)i(is)e(used)0 4876 y(to)d(incremen)m(ted)f(the)g(v)-5 b(alue)35 b(of)f(the)g (appropriated)f(bin)h(in)f(the)h(histogram.)52 b(If)34 b(the)g(w)m(eigh)m(ting)i(factor)f(is)f(not)0 4989 y(sp)s(eci\014ed,)24 b(then)f(the)g(default)g(w)m(eigh)m(t)i(=)d(1)i(is)f(assumed.)37 b(The)23 b(w)m(eigh)m(ting)i(factor)f(ma)m(y)f(b)s(e)g(a)g(constan)m(t) i(in)m(teger)f(or)0 5102 y(\015oating)30 b(p)s(oin)m(t)f(n)m(um)m(b)s (er,)f(or)h(the)g(name)g(of)g(a)g(k)m(eyw)m(ord)h(con)m(taining)g(the)g (w)m(eigh)m(ting)g(v)-5 b(alue.)41 b(Or)28 b(the)h(w)m(eigh)m(ting)0 5215 y(factor)g(ma)m(y)g(b)s(e)e(the)h(name)g(of)h(a)f(table)h(column)f (in)g(whic)m(h)f(case)j(the)e(v)-5 b(alue)28 b(in)g(that)h(column,)f (on)g(a)h(ro)m(w)f(b)m(y)g(ro)m(w)0 5328 y(basis,)i(will)h(b)s(e)f (used.)0 5488 y(In)35 b(some)h(cases,)i(the)d(column)h(or)f(k)m(eyw)m (ord)h(ma)m(y)g(giv)m(e)h(the)f(recipro)s(cal)g(of)g(the)g(actual)h(w)m (eigh)m(t)g(v)-5 b(alue)36 b(that)g(is)0 5601 y(needed.)49 b(In)32 b(this)h(case,)i(precede)e(the)h(w)m(eigh)m(t)g(k)m(eyw)m(ord)g (or)f(column)g(name)g(b)m(y)g(a)g(slash)g('/')h(to)g(tell)g(CFITSIO)0 5714 y(to)d(use)f(the)h(recipro)s(cal)g(of)f(the)h(v)-5 b(alue)31 b(when)e(constructing)i(the)g(histogram.)p eop end %%Page: 146 154 TeXDict begin 146 153 bop 0 299 a Fj(146)1528 b Fh(CHAPTER)29 b(10.)113 b(EXTENDED)30 b(FILE)h(NAME)f(SYNT)-8 b(AX)0 555 y Fj(F)g(or)25 b(complex)g(or)f(commonly)g(used)g(histograms,)i (one)e(can)h(also)g(place)g(its)f(description)g(in)m(to)h(a)g(text)g (\014le)f(and)g(im-)0 668 y(p)s(ort)e(it)g(in)m(to)h(the)g(binning)e (sp)s(eci\014cation)i(using)e(the)i(syn)m(tax)f([bin)g (@\014lename.txt].)39 b(The)22 b(\014le's)g(con)m(ten)m(ts)i(can)e(ex-) 0 781 y(tend)h(o)m(v)m(er)i(m)m(ultiple)f(lines,)h(although)f(it)g(m)m (ust)f(still)h(conform)f(to)h(the)g(no-spaces)g(rule)f(for)g(the)h (min:max:binsize)0 894 y(syn)m(tax)35 b(and)f(eac)m(h)h(axis)g(sp)s (eci\014cation)h(m)m(ust)e(still)h(b)s(e)f(comma-separated.)55 b(An)m(y)34 b(lines)h(in)f(the)h(external)g(text)0 1007 y(\014le)27 b(that)g(b)s(egin)g(with)f(2)i(slash)e(c)m(haracters)j (\('//'\))g(will)e(b)s(e)f(ignored)h(and)f(ma)m(y)i(b)s(e)e(used)g(to)i (add)e(commen)m(ts)i(in)m(to)0 1120 y(the)j(\014le.)0 1280 y(Examples:)191 1540 y Fe([bini)46 b(detx,)h(dety])762 b(-)47 b(2-D,)g(16-bit)f(integer)g(histogram)1861 1653 y(of)i(DETX)e(and)h(DETY)g(columns,)e(using)1861 1766 y(default)h(values)g(for)h(the)g(histogram)1861 1878 y(range)g(and)g(binsize)191 2104 y([bin)g(\(detx,)f(dety\)=16;)f (/exposure])g(-)i(2-D,)g(32-bit)f(real)h(histogram)e(of)i(DETX)1861 2217 y(and)g(DETY)g(columns)f(with)g(a)i(bin)f(size)f(=)i(16)1861 2330 y(in)g(both)e(axes.)h(The)f(histogram)g(values)1861 2443 y(are)h(divided)f(by)h(the)g(EXPOSURE)f(keyword)1861 2556 y(value.)191 2782 y([bin)h(time=TSTART:TSTOP:0.1])280 b(-)47 b(1-D)g(lightcurve,)e(range)h(determined)f(by)1861 2895 y(the)i(TSTART)f(and)h(TSTOP)g(keywords,)1861 3008 y(with)g(0.1)g(unit)g(size)f(bins.)191 3233 y([bin)h(pha,)f (time=8000.:8100.:0.1])90 b(-)47 b(2-D)g(image)g(using)f(default)g (binning)1861 3346 y(of)i(the)e(PHA)h(column)f(for)h(the)g(X)h(axis,) 1861 3459 y(and)f(1000)g(bins)g(in)g(the)g(range)1861 3572 y(8000.)g(to)g(8100.)f(for)h(the)g(Y)h(axis.)191 3798 y([bin)f(@binFilter.txt])616 b(-)47 b(Use)g(the)g(contents)f(of)h (the)g(text)f(file)1861 3911 y(binFilter.txt)f(for)h(the)h(binning)1861 4024 y(specifications.)p eop end %%Page: 147 155 TeXDict begin 147 154 bop 0 1225 a Fg(Chapter)65 b(11)0 1687 y Fm(T)-19 b(emplate)76 b(Files)0 2180 y Fj(When)38 b(a)h(new)f(FITS)g(\014le)h(is)g(created)g(with)g(a)f(call)i(to)g (\014ts)p 2101 2180 28 4 v 32 w(create)p 2369 2180 V 35 w(\014le,)g(the)f(name)g(of)g(a)g(template)h(\014le)e(ma)m(y)0 2293 y(b)s(e)h(supplied)g(in)h(paren)m(theses)g(immediately)h(follo)m (wing)g(the)g(name)f(of)g(the)g(new)f(\014le)h(to)h(b)s(e)e(created.)71 b(This)0 2406 y(template)27 b(is)e(used)g(to)h(de\014ne)f(the)h (structure)f(of)h(one)f(or)h(more)g(HDUs)g(in)f(the)h(new)f(\014le.)39 b(The)25 b(template)i(\014le)e(ma)m(y)0 2518 y(b)s(e)32 b(another)h(FITS)f(\014le,)i(in)f(whic)m(h)f(case)i(the)f(newly)g (created)h(\014le)f(will)g(ha)m(v)m(e)h(exactly)h(the)e(same)g(k)m(eyw) m(ords)g(in)0 2631 y(eac)m(h)25 b(HDU)g(as)g(in)f(the)g(template)i (FITS)d(\014le,)j(but)d(all)j(the)e(data)h(units)e(will)i(b)s(e)f (\014lled)g(with)f(zeros.)40 b(The)24 b(template)0 2744 y(\014le)i(ma)m(y)h(also)g(b)s(e)e(an)h(ASCI)s(I)e(text)j(\014le,)g (where)f(eac)m(h)h(line)f(\(in)g(general\))i(describ)s(es)d(one)h(FITS) f(k)m(eyw)m(ord)i(record.)0 2857 y(The)j(format)h(of)f(the)h(ASCI)s(I)e (template)i(\014le)g(is)f(describ)s(ed)f(in)i(the)f(follo)m(wing)i (sections.)0 3188 y Ff(11.1)136 b(Detailed)46 b(T)-11 b(emplate)46 b(Line)f(F)-11 b(ormat)0 3438 y Fj(The)30 b(format)h(of)f(eac)m(h)i(ASCI)s(I)c(template)k(line)f(closely)h(follo) m(ws)f(the)g(format)g(of)f(a)h(FITS)f(k)m(eyw)m(ord)g(record:)95 3682 y Fe(KEYWORD)46 b(=)i(KEYVALUE)d(/)j(COMMENT)0 3926 y Fj(except)22 b(that)g(free)g(format)f(ma)m(y)h(b)s(e)f(used)f (\(e.g.,)25 b(the)d(equals)f(sign)h(ma)m(y)f(app)s(ear)g(at)h(an)m(y)g (p)s(osition)f(in)g(the)h(line\))g(and)0 4039 y(T)-8 b(AB)34 b(c)m(haracters)g(are)g(allo)m(w)m(ed)h(and)e(are)g(treated)h (the)g(same)f(as)h(space)f(c)m(haracters.)51 b(The)33 b(KEYV)-10 b(ALUE)33 b(and)0 4152 y(COMMENT)d(\014elds)g(are)h (optional.)43 b(The)30 b(equals)h(sign)f(c)m(haracter)j(is)d(also)i (optional,)g(but)e(it)h(is)f(recommended)0 4264 y(that)42 b(it)f(b)s(e)g(included)f(for)h(clarit)m(y)-8 b(.)75 b(An)m(y)41 b(template)i(line)e(that)h(b)s(egins)f(with)f(the)i(p)s (ound)d('#')i(c)m(haracter)i(is)0 4377 y(ignored)30 b(b)m(y)h(the)f (template)i(parser)e(and)g(ma)m(y)h(b)s(e)e(use)h(to)h(insert)g(commen) m(ts)g(in)m(to)g(the)g(template)h(\014le)e(itself.)0 4538 y(The)c(KEYW)m(ORD)g(name)g(\014eld)g(is)g(limited)h(to)g(8)f(c)m (haracters)h(in)f(length)h(and)e(only)h(the)g(letters)i(A-Z,)e(digits)h (0-9,)0 4650 y(and)h(the)g(h)m(yphen)f(and)h(underscore)g(c)m (haracters)h(ma)m(y)g(b)s(e)f(used,)g(without)h(an)m(y)f(em)m(b)s (edded)g(spaces.)40 b(Lo)m(w)m(ercase)0 4763 y(letters)22 b(in)f(the)h(template)g(k)m(eyw)m(ord)g(name)f(will)g(b)s(e)g(con)m(v)m (erted)i(to)f(upp)s(ercase.)36 b(Leading)22 b(spaces)f(in)g(the)h (template)0 4876 y(line)k(preceding)g(the)f(k)m(eyw)m(ord)h(name)g(are) g(generally)h(ignored,)g(except)f(if)g(the)g(\014rst)f(8)h(c)m (haracters)h(of)f(a)g(template)0 4989 y(line)f(are)h(all)g(blank,)g (then)f(the)g(en)m(tire)h(line)g(is)f(treated)h(as)f(a)h(FITS)e(commen) m(t)i(k)m(eyw)m(ord)g(\(with)f(a)h(blank)e(k)m(eyw)m(ord)0 5102 y(name\))31 b(and)f(is)g(copied)h(v)m(erbatim)g(in)m(to)g(the)g (FITS)e(header.)0 5262 y(The)37 b(KEYV)-10 b(ALUE)37 b(\014eld)g(ma)m(y)h(ha)m(v)m(e)g(an)m(y)g(allo)m(w)m(ed)h(FITS)e(data) h(t)m(yp)s(e:)54 b(c)m(haracter)39 b(string,)h(logical,)h(in)m(teger,)0 5375 y(real,)34 b(complex)f(in)m(teger,)i(or)d(complex)i(real.)47 b(The)32 b(c)m(haracter)j(string)d(v)-5 b(alues)33 b(need)f(not)h(b)s (e)f(enclosed)h(in)f(single)0 5488 y(quote)d(c)m(haracters)h(unless)e (they)g(are)h(necessary)g(to)g(distinguish)e(the)i(string)f(from)g(a)h (di\013eren)m(t)g(data)g(t)m(yp)s(e)f(\(e.g.)0 5601 y(2.0)h(is)e(a)h (real)h(but)e('2.0')i(is)f(a)g(string\).)40 b(The)27 b(k)m(eyw)m(ord)h(has)f(an)h(unde\014ned)d(\(n)m(ull\))j(v)-5 b(alue)29 b(if)e(the)h(template)h(record)0 5714 y(only)h(con)m(tains)i (blanks)e(follo)m(wing)i(the)e("=")h(or)g(b)s(et)m(w)m(een)g(the)f("=") h(and)f(the)g("/")i(commen)m(t)g(\014eld)d(delimiter.)1882 5942 y(147)p eop end %%Page: 148 156 TeXDict begin 148 155 bop 0 299 a Fj(148)2250 b Fh(CHAPTER)29 b(11.)72 b(TEMPLA)-8 b(TE)30 b(FILES)0 555 y Fj(String)c(k)m(eyw)m(ord) h(v)-5 b(alues)27 b(longer)g(than)f(68)h(c)m(haracters)h(\(the)f(maxim) m(um)f(length)h(that)g(will)g(\014t)f(in)g(a)h(single)g(FITS)0 668 y(k)m(eyw)m(ord)41 b(record\))g(are)g(p)s(ermitted)f(using)g(the)h (CFITSIO)e(long)i(string)g(con)m(v)m(en)m(tion.)74 b(They)40 b(can)h(either)g(b)s(e)0 781 y(sp)s(eci\014ed)28 b(as)i(a)f(single)h (long)f(line)h(in)e(the)i(template,)h(or)e(b)m(y)f(using)h(m)m(ultiple) h(lines)f(where)f(the)i(con)m(tin)m(uing)g(lines)0 894 y(con)m(tain)i(the)e('CONTINUE')g(k)m(eyw)m(ord,)h(as)g(in)f(this)g (example:)95 1139 y Fe(LONGKEY)46 b(=)i('This)e(is)h(a)h(long)e(string) g(value)h(that)f(is)i(contin&')95 1252 y(CONTINUE)94 b('ued)46 b(over)h(2)g(records')f(/)h(comment)f(field)h(goes)f(here)0 1497 y Fj(The)29 b(format)h(of)g(template)h(lines)e(with)h(CONTINUE)e (k)m(eyw)m(ord)i(is)g(v)m(ery)g(strict:)41 b(3)30 b(spaces)g(m)m(ust)f (follo)m(w)i(CON-)0 1610 y(TINUE)f(and)g(the)g(rest)h(of)f(the)h(line)g (is)f(copied)h(v)m(erbatim)g(to)g(the)g(FITS)e(\014le.)0 1771 y(The)i(start)h(of)g(the)f(optional)i(COMMENT)e(\014eld)g(m)m(ust) h(b)s(e)e(preceded)i(b)m(y)f("/",)i(whic)m(h)e(is)h(used)f(to)h (separate)g(it)0 1883 y(from)e(the)g(k)m(eyw)m(ord)h(v)-5 b(alue)30 b(\014eld.)41 b(Exceptions)30 b(are)h(if)f(the)h(KEYW)m(ORD)g (name)f(\014eld)g(con)m(tains)h(COMMENT,)0 1996 y(HISTOR)-8 b(Y,)30 b(CONTINUE,)g(or)g(if)g(the)h(\014rst)f(8)g(c)m(haracters)i(of) f(the)f(template)i(line)f(are)g(blanks.)0 2157 y(More)c(than)f(one)h (Header-Data)i(Unit)e(\(HDU\))g(ma)m(y)g(b)s(e)f(de\014ned)f(in)h(the)h (template)h(\014le.)39 b(The)26 b(start)h(of)g(an)f(HDU)0 2269 y(de\014nition)k(is)g(denoted)h(with)f(a)h(SIMPLE)e(or)i(XTENSION) e(template)j(line:)0 2430 y(1\))i(SIMPLE)f(b)s(egins)g(a)h(Primary)g (HDU)g(de\014nition.)50 b(SIMPLE)33 b(ma)m(y)h(only)g(app)s(ear)f(as)h (the)g(\014rst)f(k)m(eyw)m(ord)h(in)0 2543 y(the)e(template)i(\014le.) 45 b(If)32 b(the)g(template)i(\014le)e(b)s(egins)f(with)h(XTENSION)f (instead)h(of)g(SIMPLE,)g(then)f(a)i(default)0 2655 y(empt)m(y)d (Primary)e(HDU)i(is)g(created,)h(and)d(the)i(template)h(is)e(then)g (assumed)f(to)i(de\014ne)f(the)h(k)m(eyw)m(ords)f(starting)0 2768 y(with)h(the)h(\014rst)e(extension)i(follo)m(wing)h(the)f(Primary) f(HDU.)0 2928 y(2\))35 b(XTENSION)e(marks)g(the)i(b)s(eginning)e(of)h (a)h(new)e(extension)i(HDU)f(de\014nition.)52 b(The)33 b(previous)h(HDU)h(will)0 3041 y(b)s(e)30 b(closed)h(at)g(this)f(p)s (oin)m(t)h(and)e(pro)s(cessing)i(of)f(the)h(next)f(extension)h(b)s (egins.)0 3373 y Ff(11.2)136 b(Auto-indexing)45 b(of)g(Keyw)l(ords)0 3623 y Fj(If)31 b(a)h(template)g(k)m(eyw)m(ord)g(name)f(ends)g(with)g (a)g("#")h(c)m(haracter,)i(it)e(is)f(said)g(to)h(b)s(e)f ('auto-indexed'.)44 b(Eac)m(h)32 b("#")0 3736 y(c)m(haracter)i(will)f (b)s(e)f(replaced)i(b)m(y)e(the)h(curren)m(t)g(in)m(teger)h(index)e(v) -5 b(alue,)34 b(whic)m(h)f(gets)g(reset)h(=)e(1)h(at)h(the)e(start)i (of)0 3849 y(eac)m(h)h(new)f(HDU)g(in)g(the)g(\014le)g(\(or)g(7)h(in)e (the)h(sp)s(ecial)h(case)g(of)f(a)g(GR)m(OUP)h(de\014nition\).)51 b(The)33 b(FIRST)g(indexed)0 3962 y(k)m(eyw)m(ord)c(in)f(eac)m(h)h (template)h(HDU)f(de\014nition)f(is)g(used)f(as)i(the)f('incremen)m (tor';)j(eac)m(h)e(subsequen)m(t)f(o)s(ccurrence)0 4075 y(of)k(this)f(SAME)g(k)m(eyw)m(ord)h(will)g(cause)g(the)g(index)f(v)-5 b(alue)32 b(to)g(b)s(e)f(incremen)m(ted.)44 b(This)31 b(b)s(eha)m(vior)g(can)h(b)s(e)f(rather)0 4188 y(subtle,)d(as)g (illustrated)h(in)e(the)h(follo)m(wing)h(examples)f(in)f(whic)m(h)h (the)g(TTYPE)e(k)m(eyw)m(ord)i(is)g(the)g(incremen)m(tor)g(in)0 4300 y(b)s(oth)i(cases:)95 4546 y Fe(TTYPE#)47 b(=)g(TIME)95 4659 y(TFORM#)g(=)g(1D)95 4772 y(TTYPE#)g(=)g(RATE)95 4884 y(TFORM#)g(=)g(1E)0 5130 y Fj(will)26 b(create)i(TTYPE1,)e(TF)m (ORM1,)i(TTYPE2,)f(and)e(TF)m(ORM2)i(k)m(eyw)m(ords.)40 b(But)26 b(if)g(the)g(template)h(lo)s(oks)f(lik)m(e,)95 5375 y Fe(TTYPE#)47 b(=)g(TIME)95 5488 y(TTYPE#)g(=)g(RATE)95 5601 y(TFORM#)g(=)g(1D)95 5714 y(TFORM#)g(=)g(1E)p eop end %%Page: 149 157 TeXDict begin 149 156 bop 0 299 a Fh(11.3.)73 b(TEMPLA)-8 b(TE)30 b(P)-8 b(ARSER)30 b(DIRECTIVES)1982 b Fj(149)0 555 y(this)31 b(results)f(in)h(a)g(FITS)f(\014les)h(with)f(TTYPE1,)h (TTYPE2,)g(TF)m(ORM2,)h(and)e(TF)m(ORM2,)i(whic)m(h)f(is)g(probably)0 668 y(not)g(what)f(w)m(as)h(in)m(tended!)0 1000 y Ff(11.3)136 b(T)-11 b(emplate)45 b(P)l(arser)h(Directiv)l(es)0 1251 y Fj(In)29 b(addition)i(to)f(the)g(template)i(lines)e(whic)m(h)g (de\014ne)f(individual)h(k)m(eyw)m(ords,)g(the)g(template)i(parser)d (recognizes)0 1363 y(3)h(sp)s(ecial)h(directiv)m(es)g(whic)m(h)f(are)g (eac)m(h)h(preceded)f(b)m(y)f(the)h(bac)m(kslash)h(c)m(haracter:)90 b Fe(\\include,)45 b(\\group)p Fj(,)29 b(and)48 1476 y Fe(\\end)p Fj(.)0 1637 y(The)37 b('include')h(directiv)m(e)i(m)m(ust) d(b)s(e)h(follo)m(w)m(ed)h(b)m(y)f(a)g(\014lename.)63 b(It)38 b(forces)g(the)g(parser)f(to)i(temp)s(orarily)f(stop)0 1749 y(reading)d(the)g(curren)m(t)g(template)h(\014le)f(and)f(b)s(egin) h(reading)g(the)g(include)f(\014le.)55 b(Once)35 b(the)g(parser)f(reac) m(hes)i(the)0 1862 y(end)f(of)h(the)g(include)f(\014le)h(it)g(con)m (tin)m(ues)g(parsing)g(the)f(curren)m(t)h(template)h(\014le.)56 b(Include)35 b(\014les)h(can)g(b)s(e)f(nested,)0 1975 y(and)30 b(HDU)h(de\014nitions)f(can)g(span)g(m)m(ultiple)h(template)h (\014les.)0 2135 y(The)f(start)h(of)g(a)g(GR)m(OUP)h(de\014nition)e(is) h(denoted)g(with)f(the)h('group')g(directiv)m(e,)h(and)f(the)f(end)h (of)f(a)i(GR)m(OUP)0 2248 y(de\014nition)k(is)h(denoted)f(with)g(the)h ('end')f(directiv)m(e.)63 b(Eac)m(h)39 b(GR)m(OUP)e(con)m(tains)i(0)f (or)f(more)h(mem)m(b)s(er)f(blo)s(c)m(ks)0 2361 y(\(HDUs)44 b(or)f(GR)m(OUPs\).)79 b(Mem)m(b)s(er)42 b(blo)s(c)m(ks)i(of)f(t)m(yp)s (e)g(GR)m(OUP)g(can)g(con)m(tain)h(their)f(o)m(wn)g(mem)m(b)s(er)f(blo) s(c)m(ks.)0 2474 y(The)32 b(GR)m(OUP)g(de\014nition)g(itself)h(o)s (ccupies)g(one)f(FITS)g(\014le)g(HDU)h(of)f(sp)s(ecial)h(t)m(yp)s(e)f (\(GR)m(OUP)h(HDU\),)h(so)e(if)h(a)0 2587 y(template)f(sp)s(eci\014es)e (1)h(group)e(with)h(1)h(mem)m(b)s(er)f(HDU)h(lik)m(e:)0 2838 y Fe(\\group)0 2951 y(grpdescr)46 b(=)h('demo')0 3064 y(xtension)f(bintable)0 3177 y(#)h(this)g(bintable)f(has)h(0)g (cols,)f(0)i(rows)0 3290 y(\\end)0 3541 y Fj(then)30 b(the)h(parser)e(creates)j(a)f(FITS)f(\014le)g(with)g(3)h(HDUs)g(:)0 3792 y Fe(1\))47 b(dummy)g(PHDU)0 3905 y(2\))g(GROUP)g(HDU)f(\(has)h(1) h(member,)d(which)i(is)g(bintable)e(in)j(HDU)f(number)f(3\))0 4018 y(3\))h(bintable)f(\(member)g(of)h(GROUP)f(in)h(HDU)g(number)f (2\))0 4269 y Fj(T)-8 b(ec)m(hnically)32 b(sp)s(eaking,)e(the)f(GR)m (OUP)i(HDU)f(is)g(a)g(BINT)-8 b(ABLE)30 b(with)g(6)g(columns.)40 b(Applications)31 b(can)f(de\014ne)0 4382 y(additional)23 b(columns)f(in)f(a)i(GR)m(OUP)f(HDU)h(using)f(TF)m(ORMn)f(and)h(TTYPEn) f(\(where)g(n)h(is)g(7,)i(8,)h(....\))39 b(k)m(eyw)m(ords)0 4494 y(or)30 b(their)h(auto-indexing)g(equiv)-5 b(alen)m(ts.)0 4655 y(F)d(or)26 b(a)f(more)g(complicated)h(example)f(of)g(a)h (template)g(\014le)f(using)f(the)h(group)f(directiv)m(es,)k(lo)s(ok)d (at)g(the)g(sample.tpl)0 4767 y(\014le)30 b(that)h(is)g(included)e(in)i (the)f(CFITSIO)f(distribution.)0 5100 y Ff(11.4)136 b(F)-11 b(ormal)45 b(T)-11 b(emplate)46 b(Syn)l(tax)0 5350 y Fj(The)30 b(template)i(syn)m(tax)f(can)f(formally)h(b)s(e)f(de\014ned)f (as)i(follo)m(ws:)191 5601 y Fe(TEMPLATE)45 b(=)j(BLOCK)e([)i(BLOCK)e (...)h(])p eop end %%Page: 150 158 TeXDict begin 150 157 bop 0 299 a Fj(150)2250 b Fh(CHAPTER)29 b(11.)72 b(TEMPLA)-8 b(TE)30 b(FILES)334 555 y Fe(BLOCK)46 b(=)i({)f(HDU)g(|)h(GROUP)e(})334 781 y(GROUP)g(=)i(\\GROUP)e([)h (BLOCK)g(...)g(])g(\\END)430 1007 y(HDU)f(=)i(XTENSION)d([)j(LINE)f (...)f(])i({)f(XTENSION)f(|)h(\\GROUP)f(|)i(\\END)f(|)g(EOF)g(})382 1233 y(LINE)f(=)i([)f(KEYWORD)f([)i(=)f(])h(])f([)g(VALUE)g(])g([)h(/)f (COMMENT)f(])191 1458 y(X)h(...)238 b(-)48 b(X)f(can)g(be)g(present)f (1)h(or)h(more)e(times)191 1571 y({)h(X)h(|)f(Y)h(})f(-)h(X)f(or)g(Y) 191 1684 y([)g(X)h(])238 b(-)48 b(X)f(is)g(optional)0 1937 y Fj(A)m(t)34 b(the)f(topmost)g(lev)m(el,)i(the)e(template)i (de\014nes)c(1)j(or)e(more)h(template)h(blo)s(c)m(ks.)49 b(Blo)s(c)m(ks)34 b(can)f(b)s(e)f(either)h(HDU)0 2050 y(\(Header)27 b(Data)h(Unit\))g(or)e(a)h(GR)m(OUP)-8 b(.)28 b(F)-8 b(or)27 b(eac)m(h)g(blo)s(c)m(k)g(the)g(parser)f(creates) i(1)f(\(or)g(more)f(for)h(GR)m(OUPs\))g(FITS)0 2163 y(\014le)j(HDUs.)0 2495 y Ff(11.5)136 b(Errors)0 2745 y Fj(In)24 b(general)h(the)f(\014ts) p 692 2745 28 4 v 33 w(execute)p 1019 2745 V 34 w(template\(\))i (function)e(tries)h(to)g(b)s(e)f(as)g(atomic)i(as)f(p)s(ossible,)g(so)f (either)h(ev)m(erything)0 2858 y(is)f(done)g(or)g(nothing)f(is)h(done.) 39 b(If)23 b(an)h(error)f(o)s(ccurs)h(during)f(parsing)g(of)h(the)g (template,)j(\014ts)p 3125 2858 V 33 w(execute)p 3452 2858 V 34 w(template\(\))0 2971 y(will)k(\(try)g(to\))h(delete)g(the)f (top)g(lev)m(el)h(BLOCK)e(\(with)h(all)g(its)h(c)m(hildren)e(if)h(an)m (y\))g(in)g(whic)m(h)f(the)h(error)f(o)s(ccurred,)0 3084 y(then)g(it)h(will)g(stop)f(reading)h(the)f(template)i(\014le)e(and)g (it)h(will)g(return)e(with)h(an)g(error.)0 3417 y Ff(11.6)136 b(Examples)0 3667 y Fj(1.)54 b(This)34 b(template)i(\014le)f(will)g (create)h(a)f(200)h(x)e(300)i(pixel)f(image,)j(with)c(4-b)m(yte)i(in)m (teger)g(pixel)f(v)-5 b(alues,)36 b(in)f(the)0 3780 y(primary)29 b(HDU:)95 4032 y Fe(SIMPLE)47 b(=)g(T)95 4145 y(BITPIX)g(=)g(32)95 4258 y(NAXIS)g(=)g(2)239 b(/)47 b(number)f(of)h(dimensions)95 4371 y(NAXIS1)g(=)g(100)95 b(/)47 b(length)f(of)h(first)g(axis)95 4484 y(NAXIS2)g(=)g(200)95 b(/)47 b(length)f(of)h(second)f(axis)95 4597 y(OBJECT)h(=)g(NGC)g(253)g(/)g(name)g(of)g(observed)f(object)0 4850 y Fj(The)35 b(allo)m(w)m(ed)i(v)-5 b(alues)36 b(of)f(BITPIX)g(are) h(8,)h(16,)h(32,)g(-32,)g(or)d(-64,)j(represen)m(ting,)f(resp)s(ectiv)m (ely)-8 b(,)39 b(8-bit)d(in)m(teger,)0 4962 y(16-bit)c(in)m(teger,)g (32-bit)f(in)m(teger,)h(32-bit)g(\015oating)f(p)s(oin)m(t,)g(or)f(64)h (bit)g(\015oating)g(p)s(oin)m(t)f(pixels.)0 5123 y(2.)39 b(T)-8 b(o)23 b(create)h(a)f(FITS)e(table,)26 b(the)c(template)i (\014rst)e(needs)g(to)i(include)e(XTENSION)g(=)g(T)-8 b(ABLE)23 b(or)f(BINT)-8 b(ABLE)0 5235 y(to)31 b(de\014ne)e(whether)g (it)h(is)g(an)f(ASCI)s(I)g(or)g(binary)g(table,)i(and)f(NAXIS2)g(to)g (de\014ne)f(the)h(n)m(um)m(b)s(er)f(of)h(ro)m(ws)f(in)h(the)0 5348 y(table.)50 b(Tw)m(o)34 b(template)g(lines)g(are)g(then)f(needed)f (to)i(de\014ne)f(the)g(name)h(\(TTYPEn\))e(and)h(FITS)g(data)h(format)0 5461 y(\(TF)m(ORMn\))d(of)f(the)h(columns,)f(as)h(in)f(this)g(example:) 95 5714 y Fe(xtension)46 b(=)h(bintable)p eop end %%Page: 151 159 TeXDict begin 151 158 bop 0 299 a Fh(11.6.)73 b(EXAMPLES)2993 b Fj(151)95 555 y Fe(naxis2)47 b(=)g(40)95 668 y(ttype#)g(=)g(Name)95 781 y(tform#)g(=)g(10a)95 894 y(ttype#)g(=)g(Npoints)95 1007 y(tform#)g(=)g(j)95 1120 y(ttype#)g(=)g(Rate)95 1233 y(tunit#)g(=)g(counts/s)95 1346 y(tform#)g(=)g(e)0 1605 y Fj(The)26 b(ab)s(o)m(v)m(e)j(example)e(de\014nes)f(a)i(n)m(ull)f (primary)f(arra)m(y)h(follo)m(w)m(ed)i(b)m(y)e(a)g(40-ro)m(w)h(binary)e (table)i(extension)g(with)f(3)0 1718 y(columns)h(called)h('Name',)h ('Np)s(oin)m(ts',)f(and)f('Rate',)i(with)e(data)h(formats)f(of)g('10A') i(\(ASCI)s(I)d(c)m(haracter)i(string\),)0 1831 y('1J')k(\(in)m(teger\)) i(and)d('1E')i(\(\015oating)f(p)s(oin)m(t\),)h(resp)s(ectiv)m(ely)-8 b(.)50 b(Note)34 b(that)f(the)g(other)g(required)f(FITS)g(k)m(eyw)m (ords)0 1944 y(\(BITPIX,)37 b(NAXIS,)g(NAXIS1,)h(PCOUNT,)e(GCOUNT,)h (TFIELDS,)f(and)g(END\))h(do)g(not)g(need)f(to)h(b)s(e)f(ex-)0 2057 y(plicitly)j(de\014ned)d(in)i(the)f(template)i(b)s(ecause)f(their) g(v)-5 b(alues)38 b(can)g(b)s(e)f(inferred)f(from)i(the)f(other)h(k)m (eyw)m(ords)g(in)0 2170 y(the)d(template.)55 b(This)34 b(example)i(also)g(illustrates)f(that)h(the)f(templates)h(are)f (generally)h(case-insensitiv)m(e)h(\(the)0 2283 y(k)m(eyw)m(ord)29 b(names)g(and)g(TF)m(ORMn)f(v)-5 b(alues)30 b(are)f(con)m(v)m(erted)i (to)e(upp)s(er-case)g(in)f(the)h(FITS)g(\014le\))g(and)f(that)i(string) 0 2396 y(k)m(eyw)m(ord)h(v)-5 b(alues)31 b(generally)g(do)f(not)h(need) f(to)h(b)s(e)f(enclosed)h(in)f(quotes.)p eop end %%Page: 152 160 TeXDict begin 152 159 bop 0 299 a Fj(152)2250 b Fh(CHAPTER)29 b(11.)72 b(TEMPLA)-8 b(TE)30 b(FILES)p eop end %%Page: 153 161 TeXDict begin 153 160 bop 0 1225 a Fg(Chapter)65 b(12)0 1687 y Fm(Lo)6 b(cal)78 b(FITS)e(Con)-6 b(v)g(en)g(tions)0 2180 y Fj(CFITSIO)25 b(supp)s(orts)g(sev)m(eral)j(lo)s(cal)f(FITS)f (con)m(v)m(en)m(tions)j(whic)m(h)d(are)h(not)g(de\014ned)e(in)h(the)h (o\016cial)h(NOST)e(FITS)0 2293 y(standard)k(and)g(whic)m(h)h(are)g (not)g(necessarily)g(recognized)h(or)f(supp)s(orted)e(b)m(y)i(other)g (FITS)f(soft)m(w)m(are)i(pac)m(k)-5 b(ages.)0 2406 y(Programmers)36 b(should)f(b)s(e)g(cautious)i(ab)s(out)e(using)h(these)g(features,)i (esp)s(ecially)f(if)f(the)g(FITS)f(\014les)h(that)h(are)0 2518 y(pro)s(duced)31 b(are)i(exp)s(ected)g(to)g(b)s(e)f(pro)s(cessed)g (b)m(y)h(other)f(soft)m(w)m(are)i(systems)f(whic)m(h)f(do)h(not)f(use)h (the)f(CFITSIO)0 2631 y(in)m(terface.)0 2990 y Ff(12.1)136 b(64-Bit)45 b(Long)g(In)l(tegers)0 3246 y Fj(CFITSIO)37 b(supp)s(orts)g(reading)i(and)f(writing)h(FITS)f(images)i(or)f(table)h (columns)e(con)m(taining)i(64-bit)h(in)m(teger)0 3359 y(data)26 b(v)-5 b(alues.)40 b(Supp)s(ort)23 b(for)i(64-bit)i(in)m (tegers)g(w)m(as)f(added)e(to)j(the)e(o\016cial)i(FITS)e(Standard)f(in) i(Decem)m(b)s(er)g(2005.)0 3472 y(FITS)g(64-bit)i(images)g(ha)m(v)m(e)g (BITPIX)e(=)h(64,)h(and)e(the)h(64-bit)h(binary)e(table)i(columns)f(ha) m(v)m(e)h(TF)m(ORMn)e(=)h('K'.)0 3584 y(CFITSIO)35 b(also)i(supp)s (orts)e(the)i('Q')f(v)-5 b(ariable-length)38 b(arra)m(y)f(table)h (column)e(format)h(whic)m(h)f(is)g(analogous)i(to)0 3697 y(the)31 b('P')f(column)g(format)h(except)g(that)g(the)g(arra)m(y)g (descriptor)f(is)h(stored)f(as)h(a)f(pair)h(of)f(64-bit)i(in)m(tegers.) 0 3858 y(F)-8 b(or)33 b(the)f(con)m(v)m(enience)i(of)f(C)e (programmers,)h(the)h(\014tsio.h)f(include)g(\014le)g(de\014nes)f (\(with)h(a)h(t)m(yp)s(edef)f(statemen)m(t\))0 3970 y(the)39 b('LONGLONG')g(datat)m(yp)s(e)h(to)f(b)s(e)f(equiv)-5 b(alen)m(t)40 b(to)f(an)g(appropriate)g(64-bit)h(in)m(teger)g(datat)m (yp)s(e)f(on)g(eac)m(h)0 4083 y(platform.)g(Since)27 b(there)f(is)g(curren)m(tly)g(no)g(univ)m(ersal)h(standard)e(for)h(the) g(name)g(of)h(the)f(64-bit)h(in)m(teger)h(datat)m(yp)s(e)0 4196 y(\(it)33 b(migh)m(t)f(b)s(e)f(de\014ned)g(as)h('long)g(long',)i ('long',)f(or)f(')p 1832 4196 28 4 v 1865 4196 V 66 w(in)m(t64')h(dep)s (ending)d(on)i(the)g(platform\))g(C)g(programmers)0 4309 y(ma)m(y)24 b(prefer)f(to)i(use)e(the)h('LONGLONG')h(datat)m(yp)s(e)f (when)f(declaring)i(or)e(allo)s(cating)j(64-bit)f(in)m(teger)h(quan)m (tities)0 4422 y(when)33 b(writing)h(co)s(de)g(whic)m(h)f(needs)h(to)h (run)d(on)i(m)m(ultiple)g(platforms.)52 b(Note)35 b(that)f(CFITSIO)f (will)h(implicitly)0 4535 y(con)m(v)m(ert)h(the)e(datat)m(yp)s(e)h (when)f(reading)g(or)g(writing)h(FITS)e(64-bit)j(in)m(teger)f(images)h (and)d(columns)h(with)g(data)0 4648 y(arra)m(ys)40 b(of)h(a)f (di\013eren)m(t)h(in)m(teger)g(or)f(\015oating)h(p)s(oin)m(t)f(datat)m (yp)s(e,)k(but)c(there)g(is)g(an)g(increased)g(risk)g(of)g(loss)h(of)0 4761 y(n)m(umerical)31 b(precision)f(or)h(n)m(umerical)g(o)m(v)m (er\015o)m(w)h(in)e(this)g(case.)0 5120 y Ff(12.2)136 b(Long)44 b(String)i(Keyw)l(ord)f(V)-11 b(alues.)0 5375 y Fj(The)43 b(length)i(of)f(a)g(standard)g(FITS)f(string)h(k)m(eyw)m (ord)g(is)g(limited)h(to)g(68)f(c)m(haracters)i(b)s(ecause)e(it)g(m)m (ust)g(\014t)0 5488 y(en)m(tirely)35 b(within)e(a)h(single)h(FITS)e (header)g(k)m(eyw)m(ord)i(record.)50 b(In)33 b(some)i(instances)f(it)g (is)g(necessary)g(to)h(enco)s(de)0 5601 y(strings)29 b(longer)i(than)e(this)g(limit,)i(so)f(CFITSIO)e(supp)s(orts)g(a)h(lo)s (cal)i(con)m(v)m(en)m(tion)h(in)d(whic)m(h)h(the)f(string)h(v)-5 b(alue)30 b(is)0 5714 y(con)m(tin)m(ued)36 b(o)m(v)m(er)g(m)m(ultiple)f (k)m(eyw)m(ords.)55 b(This)34 b(con)m(tin)m(uation)i(con)m(v)m(en)m (tion)h(uses)e(an)f(amp)s(ersand)g(c)m(haracter)i(at)1882 5942 y(153)p eop end %%Page: 154 162 TeXDict begin 154 161 bop 0 299 a Fj(154)1741 b Fh(CHAPTER)30 b(12.)112 b(LOCAL)29 b(FITS)h(CONVENTIONS)0 555 y Fj(the)c(end)f(of)h (eac)m(h)g(substring)f(to)h(indicate)h(that)f(it)h(is)e(con)m(tin)m (ued)i(on)e(the)h(next)g(k)m(eyw)m(ord,)h(and)e(the)h(con)m(tin)m (uation)0 668 y(k)m(eyw)m(ords)40 b(all)h(ha)m(v)m(e)g(the)f(name)g (CONTINUE)f(without)h(an)g(equal)g(sign)g(in)g(column)g(9.)69 b(The)40 b(string)f(v)-5 b(alue)0 781 y(ma)m(y)33 b(b)s(e)f(con)m(tin)m (ued)h(in)g(this)f(w)m(a)m(y)h(o)m(v)m(er)h(as)f(man)m(y)g(additional)g (CONTINUE)f(k)m(eyw)m(ords)h(as)f(is)h(required.)46 b(The)0 894 y(follo)m(wing)37 b(lines)e(illustrate)h(this)f(con)m(tin)m(uation) i(con)m(v)m(en)m(tion)h(whic)m(h)c(is)i(used)e(in)h(the)g(v)-5 b(alue)36 b(of)f(the)g(STRKEY)0 1007 y(k)m(eyw)m(ord:)0 1297 y Fe(LONGSTRN=)45 b('OGIP)i(1.0')189 b(/)48 b(The)f(OGIP)f(Long)h (String)f(Convention)f(may)i(be)g(used.)0 1410 y(STRKEY)94 b(=)47 b('This)g(is)g(a)g(very)g(long)g(string)f(keyword&')93 b(/)47 b(Optional)f(Comment)0 1523 y(CONTINUE)93 b(')48 b(value)e(that)h(is)g(continued)e(over)i(3)g(keywords)f(in)h(the)g(&)95 b(')0 1636 y(CONTINUE)e('FITS)47 b(header.')e(/)j(This)e(is)h(another)f (optional)g(comment.)0 1926 y Fj(It)29 b(is)g(recommended)f(that)h(the) g(LONGSTRN)f(k)m(eyw)m(ord,)i(as)f(sho)m(wn)f(here,)h(alw)m(a)m(ys)i(b) s(e)d(included)g(in)g(an)m(y)h(HDU)0 2039 y(that)i(uses)f(this)g (longstring)h(con)m(v)m(en)m(tion)i(as)e(a)f(w)m(arning)h(to)g(an)m(y)g (soft)m(w)m(are)g(that)g(m)m(ust)g(read)f(the)h(k)m(eyw)m(ords.)41 b(A)0 2152 y(routine)d(called)g(\014ts)p 712 2152 28 4 v 33 w(write)p 947 2152 V 33 w(k)m(ey)p 1113 2152 V 33 w(longw)m(arn)g(has)f(b)s(een)g(pro)m(vided)g(in)h(CFITSIO)d(to)k (write)e(this)h(k)m(eyw)m(ord)g(if)f(it)0 2265 y(do)s(es)30 b(not)h(already)g(exist.)0 2425 y(This)f(long)h(string)f(con)m(v)m(en)m (tion)i(is)f(supp)s(orted)d(b)m(y)j(the)f(follo)m(wing)i(CFITSIO)d (routines:)191 2716 y Fe(fits_write_key_longstr)89 b(-)48 b(write)e(a)i(long)e(string)g(keyword)g(value)191 2829 y(fits_insert_key_longstr)41 b(-)48 b(insert)e(a)h(long)g(string)f (keyword)g(value)191 2942 y(fits_modify_key_longstr)41 b(-)48 b(modify)e(a)h(long)g(string)f(keyword)g(value)191 3054 y(fits_update_key_longstr)41 b(-)48 b(modify)e(a)h(long)g(string)f (keyword)g(value)191 3167 y(fits_read_key_longstr)137 b(-)48 b(read)94 b(a)48 b(long)e(string)g(keyword)g(value)191 3280 y(fits_delete_key)425 b(-)48 b(delete)e(a)h(keyword)0 3571 y Fj(The)36 b(\014ts)p 320 3571 V 32 w(read)p 524 3571 V 33 w(k)m(ey)p 690 3571 V 34 w(longstr)g(routine)h(is)f(unique)f (among)i(all)h(the)e(CFITSIO)f(routines)h(in)g(that)h(it)g(in)m (ternally)0 3684 y(allo)s(cates)f(memory)d(for)h(the)f(long)h(string)g (v)-5 b(alue;)36 b(all)e(the)g(other)g(CFITSIO)e(routines)h(that)h (deal)g(with)g(arra)m(ys)0 3797 y(require)39 b(that)h(the)g(calling)h (program)e(pre-allo)s(cate)j(adequate)e(space)g(to)g(hold)f(the)h(arra) m(y)g(of)f(data.)69 b(Conse-)0 3909 y(quen)m(tly)-8 b(,)31 b(programs)f(whic)m(h)g(use)g(the)g(\014ts)p 1443 3909 V 32 w(read)p 1647 3909 V 33 w(k)m(ey)p 1813 3909 V 34 w(longstr)g(routine)g(m)m(ust)g(b)s(e)g(careful)g(to)h(free)g(the)f (allo)s(cated)0 4022 y(memory)g(for)g(the)h(string)f(when)g(it)h(is)f (no)g(longer)h(needed.)0 4183 y(The)f(follo)m(wing)i(2)e(routines)h (also)g(ha)m(v)m(e)h(limited)f(supp)s(ort)d(for)i(this)h(long)g(string) f(con)m(v)m(en)m(tion,)286 4473 y Fe(fits_modify_key_str)43 b(-)k(modify)f(an)i(existing)d(string)h(keyword)g(value)286 4586 y(fits_update_key_str)d(-)k(update)f(a)i(string)e(keyword)g(value) 0 4876 y Fj(in)24 b(that)h(they)f(will)h(correctly)g(o)m(v)m(erwrite)h (an)e(existing)h(long)g(string)f(v)-5 b(alue,)27 b(but)c(the)h(new)g (string)g(v)-5 b(alue)25 b(is)f(limited)0 4989 y(to)31 b(a)g(maxim)m(um)f(of)h(68)g(c)m(haracters)h(in)e(length.)0 5149 y(The)f(more)h(commonly)h(used)e(CFITSIO)f(routines)i(to)g(write)g (string)g(v)-5 b(alued)30 b(k)m(eyw)m(ords)g(\(\014ts)p 3254 5149 V 33 w(up)s(date)p 3563 5149 V 32 w(k)m(ey)h(and)0 5262 y(\014ts)p 127 5262 V 32 w(write)p 361 5262 V 33 w(k)m(ey\))j(do)e(not)h(supp)s(ort)d(this)i(long)h(string)g(con)m(v)m (en)m(tion)h(and)e(only)g(supp)s(ort)f(strings)h(up)f(to)i(68)g(c)m (har-)0 5375 y(acters)g(in)f(length.)48 b(This)31 b(has)h(b)s(een)g (done)g(delib)s(erately)h(to)g(prev)m(en)m(t)g(programs)f(from)g(inadv) m(erten)m(tly)i(writing)0 5488 y(k)m(eyw)m(ords)25 b(using)f(this)h (non-standard)e(con)m(v)m(en)m(tion)k(without)e(the)g(explicit)h(in)m (ten)m(t)g(of)f(the)f(programmer)h(or)f(user.)0 5601 y(The)36 b(\014ts)p 320 5601 V 32 w(write)p 554 5601 V 33 w(k)m(ey)p 720 5601 V 34 w(longstr)h(routine)f(m)m(ust)h(b)s(e)f (called)i(instead)e(to)i(write)e(long)h(strings.)59 b(This)36 b(routine)h(can)0 5714 y(also)31 b(b)s(e)f(used)g(to)h(write)f (ordinary)g(string)g(v)-5 b(alues)31 b(less)g(than)f(68)h(c)m (haracters)h(in)e(length.)p eop end %%Page: 155 163 TeXDict begin 155 162 bop 0 299 a Fh(12.3.)73 b(ARRA)-8 b(YS)30 b(OF)h(FIXED-LENGTH)g(STRINGS)e(IN)h(BINAR)-8 b(Y)32 b(T)-8 b(ABLES)871 b Fj(155)0 555 y Ff(12.3)136 b(Arra)l(ys)45 b(of)g(Fixed-Length)g(Strings)g(in)g(Binary)f(T)-11 b(ables)0 820 y Fj(CFITSIO)25 b(supp)s(orts)g(2)i(w)m(a)m(ys)g(to)g(sp) s(ecify)f(that)i(a)f(c)m(haracter)h(column)e(in)g(a)h(binary)f(table)i (con)m(tains)f(an)g(arra)m(y)g(of)0 933 y(\014xed-length)32 b(strings.)46 b(The)32 b(\014rst)f(w)m(a)m(y)-8 b(,)34 b(whic)m(h)e(is)g(o\016cially)i(supp)s(orted)c(b)m(y)i(the)h(FITS)e (Standard)g(do)s(cumen)m(t,)0 1046 y(uses)38 b(the)g(TDIMn)g(k)m(eyw)m (ord.)65 b(F)-8 b(or)39 b(example,)i(if)d(TF)m(ORMn)g(=)g('60A')h(and)f (TDIMn)g(=)g('\(12,5\)')i(then)e(that)0 1159 y(column)30 b(will)h(b)s(e)f(in)m(terpreted)g(as)h(con)m(taining)h(an)e(arra)m(y)h (of)g(5)f(strings,)h(eac)m(h)g(12)g(c)m(haracters)h(long.)0 1319 y(CFITSIO)j(also)j(supp)s(orts)c(a)j(lo)s(cal)h(con)m(v)m(en)m (tion)h(for)d(the)h(format)g(of)g(the)f(TF)m(ORMn)h(k)m(eyw)m(ord)g(v) -5 b(alue)37 b(of)g(the)0 1432 y(form)42 b('rAw')g(where)g('r')g(is)h (an)f(in)m(teger)i(sp)s(ecifying)e(the)g(total)j(width)c(in)h(c)m (haracters)i(of)f(the)f(column,)k(and)0 1545 y('w')36 b(is)g(an)g(in)m(teger)h(sp)s(ecifying)f(the)g(\(\014xed\))g(length)h (of)f(an)g(individual)f(unit)h(string)f(within)h(the)g(v)m(ector.)59 b(F)-8 b(or)0 1658 y(example,)29 b(TF)m(ORM1)f(=)f('120A10')j(w)m(ould) d(indicate)h(that)g(the)f(binary)g(table)h(column)f(is)g(120)i(c)m (haracters)f(wide)0 1771 y(and)42 b(consists)h(of)f(12)h(10-c)m (haracter)i(length)e(strings.)77 b(This)41 b(con)m(v)m(en)m(tion)k(is)d (recognized)i(b)m(y)e(the)g(CFITSIO)0 1884 y(routines)26 b(that)h(read)e(or)h(write)h(strings)e(in)h(binary)f(tables.)40 b(The)26 b(Binary)g(T)-8 b(able)27 b(de\014nition)e(do)s(cumen)m(t)h (sp)s(eci\014es)0 1996 y(that)i(other)f(optional)h(c)m(haracters)h(ma)m (y)e(follo)m(w)i(the)e(data)h(t)m(yp)s(e)f(co)s(de)g(in)g(the)g(TF)m (ORM)h(k)m(eyw)m(ord,)g(so)g(this)f(lo)s(cal)0 2109 y(con)m(v)m(en)m (tion)f(is)d(in)h(compliance)h(with)e(the)h(FITS)e(standard)h(although) h(other)g(FITS)f(readers)g(ma)m(y)h(not)g(recognize)0 2222 y(this)30 b(con)m(v)m(en)m(tion.)0 2382 y(The)25 b(Binary)h(T)-8 b(able)27 b(de\014nition)e(do)s(cumen)m(t)h(that)h(w)m (as)f(appro)m(v)m(ed)g(b)m(y)g(the)g(IA)m(U)g(in)g(1994)i(con)m(tains)f (an)e(app)s(endix)0 2495 y(describing)d(an)h(alternate)h(con)m(v)m(en)m (tion)h(for)e(sp)s(ecifying)f(arra)m(ys)h(of)g(\014xed)f(or)h(v)-5 b(ariable)24 b(length)f(strings)f(in)h(a)g(binary)0 2608 y(table)35 b(c)m(haracter)g(column)f(\(with)g(the)h(form)e ('rA:SSTRw/nnn\)'.)50 b(This)33 b(app)s(endix)f(w)m(as)j(not)f (o\016cially)i(v)m(oted)0 2721 y(on)30 b(b)m(y)h(the)f(IA)m(U)h(and)f (hence)g(is)h(still)g(pro)m(visional.)42 b(CFITSIO)29 b(do)s(es)h(not)g(curren)m(tly)h(supp)s(ort)d(this)j(prop)s(osal.)0 3129 y Ff(12.4)136 b(Keyw)l(ord)45 b(Units)h(Strings)0 3394 y Fj(One)37 b(limitation)j(of)d(the)h(curren)m(t)g(FITS)e (Standard)h(is)h(that)g(it)g(do)s(es)f(not)h(de\014ne)f(a)h(sp)s (eci\014c)f(con)m(v)m(en)m(tion)j(for)0 3507 y(recording)30 b(the)g(ph)m(ysical)h(units)f(of)g(a)g(k)m(eyw)m(ord)h(v)-5 b(alue.)41 b(The)30 b(TUNITn)f(k)m(eyw)m(ord)h(can)g(b)s(e)g(used)f(to) i(sp)s(ecify)f(the)0 3620 y(ph)m(ysical)36 b(units)f(of)g(the)h(v)-5 b(alues)36 b(in)f(a)g(table)i(column,)f(but)f(there)g(is)h(no)f (analogous)i(con)m(v)m(en)m(tion)g(for)e(k)m(eyw)m(ord)0 3732 y(v)-5 b(alues.)42 b(The)30 b(commen)m(t)h(\014eld)g(of)f(the)h(k) m(eyw)m(ord)g(is)g(often)g(used)f(for)g(this)g(purp)s(ose,)g(but)f(the) i(units)f(are)h(usually)0 3845 y(not)g(sp)s(eci\014ed)e(in)h(a)h(w)m (ell)g(de\014ned)f(format)g(that)h(FITS)f(readers)g(can)h(easily)g (recognize)h(and)e(extract.)0 4006 y(T)-8 b(o)27 b(solv)m(e)i(this)d (problem,)i(CFITSIO)d(uses)i(a)g(lo)s(cal)h(con)m(v)m(en)m(tion)h(in)e (whic)m(h)f(the)i(k)m(eyw)m(ord)f(units)f(are)i(enclosed)f(in)0 4118 y(square)20 b(brac)m(k)m(ets)j(as)e(the)f(\014rst)g(tok)m(en)i(in) f(the)f(k)m(eyw)m(ord)i(commen)m(t)f(\014eld;)j(more)d(sp)s (eci\014cally)-8 b(,)24 b(the)d(op)s(ening)f(square)0 4231 y(brac)m(k)m(et)28 b(immediately)g(follo)m(ws)f(the)g(slash)f('/') h(commen)m(t)h(\014eld)e(delimiter)h(and)f(a)g(single)h(space)g(c)m (haracter.)41 b(The)0 4344 y(follo)m(wing)32 b(examples)f(illustrate)g (k)m(eyw)m(ords)g(that)g(use)f(this)g(con)m(v)m(en)m(tion:)0 4667 y Fe(EXPOSURE=)713 b(1800.0)47 b(/)g([s])g(elapsed)f(exposure)f (time)0 4780 y(V_HELIO)h(=)763 b(16.23)47 b(/)g([km)g(s**\(-1\)])e (heliocentric)g(velocity)0 4893 y(LAMBDA)94 b(=)763 b(5400.)47 b(/)g([angstrom])e(central)h(wavelength)0 5005 y(FLUX)190 b(=)47 b(4.9033487787637465E-30)42 b(/)47 b([J/cm**2/s])e(average)h (flux)0 5328 y Fj(In)28 b(general,)h(the)g(units)e(named)h(in)g(the)h (IA)m(U\(1988\))i(St)m(yle)e(Guide)f(are)h(recommended,)f(with)g(the)h (main)f(excep-)0 5441 y(tion)j(that)g(the)f(preferred)g(unit)f(for)i (angle)g(is)f('deg')i(for)e(degrees.)0 5601 y(The)38 b(\014ts)p 322 5601 28 4 v 33 w(read)p 527 5601 V 33 w(k)m(ey)p 693 5601 V 33 w(unit)h(and)f(\014ts)p 1234 5601 V 32 w(write)p 1468 5601 V 33 w(k)m(ey)p 1634 5601 V 34 w(unit)g(routines)h(in)g(CFITSIO)e(read)i(and)f(write,)k(resp)s (ectiv)m(ely)-8 b(,)0 5714 y(the)31 b(k)m(eyw)m(ord)f(unit)g(strings)h (in)f(an)g(existing)h(k)m(eyw)m(ord.)p eop end %%Page: 156 164 TeXDict begin 156 163 bop 0 299 a Fj(156)1741 b Fh(CHAPTER)30 b(12.)112 b(LOCAL)29 b(FITS)h(CONVENTIONS)0 555 y Ff(12.5)136 b(HIERAR)l(CH)46 b(Con)l(v)l(en)l(tion)g(for)f(Extended)h(Keyw)l(ord)f (Names)0 805 y Fj(CFITSIO)c(supp)s(orts)g(the)i(HIERAR)m(CH)g(k)m(eyw)m (ord)g(con)m(v)m(en)m(tion)i(whic)m(h)e(allo)m(ws)h(k)m(eyw)m(ord)f (names)g(that)h(are)0 918 y(longer)34 b(then)e(8)i(c)m(haracters)g(and) f(ma)m(y)h(con)m(tain)g(the)f(full)g(range)g(of)h(prin)m(table)f(ASCI)s (I)e(text)j(c)m(haracters.)51 b(This)0 1031 y(con)m(v)m(en)m(tion)39 b(w)m(as)f(dev)m(elop)s(ed)f(at)h(the)f(Europ)s(ean)f(Southern)g (Observ)-5 b(atory)37 b(\(ESO\))f(to)i(supp)s(ort)d(hierarc)m(hical)0 1144 y(FITS)30 b(k)m(eyw)m(ord)g(suc)m(h)h(as:)0 1395 y Fe(HIERARCH)46 b(ESO)g(INS)h(FOCU)g(POS)g(=)g(-0.00002500)e(/)j (Focus)e(position)0 1646 y Fj(Basically)-8 b(,)55 b(this)47 b(con)m(v)m(en)m(tion)j(uses)d(the)h(FITS)f(k)m(eyw)m(ord)h('HIERAR)m (CH')h(to)f(indicate)h(that)f(this)f(con)m(v)m(en-)0 1759 y(tion)e(is)f(b)s(eing)g(used,)j(then)d(the)g(actual)i(k)m(eyw)m (ord)e(name)h(\()p Fe('ESO)i(INS)f(FOCU)h(POS')c Fj(in)h(this)g (example\))h(b)s(e-)0 1872 y(gins)40 b(in)f(column)g(10)i(and)e(can)h (con)m(tain)g(an)m(y)g(prin)m(table)g(ASCI)s(I)e(text)j(c)m(haracters,) i(including)d(spaces.)68 b(The)0 1985 y(equals)44 b(sign)h(marks)e(the) h(end)g(of)g(the)g(k)m(eyw)m(ord)h(name)f(and)f(is)i(follo)m(w)m(ed)g (b)m(y)f(the)g(usual)g(v)-5 b(alue)45 b(and)e(com-)0 2098 y(men)m(t)31 b(\014elds)f(just)g(as)h(in)f(standard)g(FITS)g(k)m (eyw)m(ords.)41 b(F)-8 b(urther)30 b(details)i(of)f(this)f(con)m(v)m (en)m(tion)j(are)e(describ)s(ed)e(at)0 2211 y(h)m (ttp://arcdev.hq.eso.org/dicb/dicd/dic-1-1.4.)q(h)m(tml)36 b(\(searc)m(h)c(for)e(HIERAR)m(CH\).)0 2371 y(This)43 b(con)m(v)m(en)m(tion)k(allo)m(ws)f(a)e(m)m(uc)m(h)h(broader)e(range)i (of)f(k)m(eyw)m(ord)h(names)f(than)h(is)f(allo)m(w)m(ed)i(b)m(y)e(the)h (FITS)0 2484 y(Standard.)40 b(Here)30 b(are)h(more)g(examples)g(of)f (suc)m(h)g(k)m(eyw)m(ords:)0 2735 y Fe(HIERARCH)46 b(LongKeyword)e(=)k (47.5)e(/)i(Keyword)e(has)h(>)g(8)g(characters,)e(and)i(mixed)f(case)0 2848 y(HIERARCH)g(XTE$TEMP)f(=)j(98.6)e(/)i(Keyword)d(contains)h(the)h ('$')g(character)0 2961 y(HIERARCH)f(Earth)g(is)h(a)h(star)e(=)i(F)f(/) h(Keyword)d(contains)h(embedded)f(spaces)0 3212 y Fj(CFITSIO)40 b(will)i(transparen)m(tly)g(read)g(and)f(write)g(these)i(k)m(eyw)m (ords,)i(so)d(application)h(programs)e(do)g(not)h(in)0 3325 y(general)33 b(need)f(to)h(kno)m(w)f(an)m(ything)h(ab)s(out)f(the) g(sp)s(eci\014c)g(implemen)m(tation)i(details)f(of)g(the)f(HIERAR)m(CH) g(con-)0 3438 y(v)m(en)m(tion.)50 b(In)32 b(particular,)j(application)f (programs)e(do)h(not)h(need)e(to)i(sp)s(ecify)f(the)g(`HIERAR)m(CH')h (part)f(of)g(the)0 3551 y(k)m(eyw)m(ord)g(name)f(when)g(reading)g(or)g (writing)h(k)m(eyw)m(ords)f(\(although)h(it)g(ma)m(y)g(b)s(e)f (included)f(if)i(desired\).)46 b(When)0 3664 y(writing)35 b(a)g(k)m(eyw)m(ord,)h(CFITSIO)d(\014rst)h(c)m(hec)m(ks)i(to)f(see)g (if)g(the)g(k)m(eyw)m(ord)g(name)f(is)h(legal)h(as)f(a)g(standard)f (FITS)0 3776 y(k)m(eyw)m(ord)k(\(no)g(more)f(than)h(8)g(c)m(haracters)h (long)f(and)f(con)m(taining)i(only)e(letters,)k(digits,)f(or)e(a)g(min) m(us)e(sign)i(or)0 3889 y(underscore\).)68 b(If)39 b(so)h(it)g(writes)g (it)g(as)f(a)h(standard)f(FITS)g(k)m(eyw)m(ord,)k(otherwise)d(it)g (uses)f(the)h(hierarc)m(h)f(con-)0 4002 y(v)m(en)m(tion)34 b(to)f(write)g(the)f(k)m(eyw)m(ord.)48 b(The)32 b(maxim)m(um)g(k)m(eyw) m(ord)h(name)f(length)h(is)g(67)g(c)m(haracters,)i(whic)m(h)d(lea)m(v)m (es)0 4115 y(only)c(1)h(space)g(for)f(the)h(v)-5 b(alue)29 b(\014eld.)39 b(A)29 b(more)f(practical)i(limit)f(is)g(ab)s(out)f(40)h (c)m(haracters,)i(whic)m(h)d(lea)m(v)m(es)i(enough)0 4228 y(ro)s(om)e(for)h(most)f(k)m(eyw)m(ord)h(v)-5 b(alues.)41 b(CFITSIO)27 b(returns)g(an)h(error)h(if)f(there)h(is)f(not)h(enough)f (ro)s(om)h(for)f(b)s(oth)g(the)0 4341 y(k)m(eyw)m(ord)k(name)f(and)f (the)i(k)m(eyw)m(ord)f(v)-5 b(alue)32 b(on)f(the)h(80-c)m(haracter)h (card,)f(except)g(for)f(string-v)-5 b(alued)32 b(k)m(eyw)m(ords)0 4454 y(whic)m(h)h(are)g(simply)f(truncated)h(so)g(that)h(the)f(closing) h(quote)g(c)m(haracter)g(falls)f(in)g(column)g(80.)49 b(In)32 b(the)h(curren)m(t)0 4567 y(implemen)m(tation,)e(CFITSIO)c (preserv)m(es)i(the)g(case)h(of)f(the)g(letters)h(when)e(writing)h(the) g(k)m(eyw)m(ord)g(name,)g(but)f(it)0 4680 y(is)d(case-insensitiv)m(e)i (when)d(reading)h(or)g(searc)m(hing)h(for)f(a)g(k)m(eyw)m(ord.)40 b(The)24 b(curren)m(t)h(implemen)m(tation)h(allo)m(ws)h(an)m(y)0 4793 y(ASCI)s(I)i(text)j(c)m(haracter)h(\(ASCI)s(I)c(32)j(to)f(ASCI)s (I)f(126\))i(in)f(the)g(k)m(eyw)m(ord)g(name)g(except)h(for)e(the)h ('=')g(c)m(haracter.)0 4906 y(A)f(space)h(is)g(also)g(required)f(on)g (either)h(side)f(of)h(the)f(equal)h(sign.)0 5238 y Ff(12.6)136 b(Tile-Compressed)46 b(Image)g(F)-11 b(ormat)0 5488 y Fj(CFITSIO)36 b(supp)s(orts)f(a)j(con)m(v)m(en)m(tion)i(for)d (compressing)h(n-dimensional)f(images)h(and)f(storing)h(the)g (resulting)0 5601 y(b)m(yte)i(stream)g(in)f(a)h(v)-5 b(ariable-length)41 b(column)e(in)g(a)h(FITS)f(binary)f(table.)69 b(The)39 b(general)i(principle)e(used)f(in)0 5714 y(this)c(con)m(v)m (en)m(tion)j(is)d(to)h(\014rst)f(divide)g(the)h(n-dimensional)f(image)i (in)m(to)f(a)g(rectangular)g(grid)f(of)h(subimages)f(or)p eop end %%Page: 157 165 TeXDict begin 157 164 bop 0 299 a Fh(12.6.)73 b(TILE-COMPRESSED)28 b(IMA)m(GE)j(F)m(ORMA)-8 b(T)1838 b Fj(157)0 555 y(`tiles'.)57 b(Eac)m(h)35 b(tile)i(is)e(then)g(compressed)g(as)g(a)h(con)m(tin)m (uous)g(blo)s(c)m(k)f(of)h(data,)h(and)e(the)g(resulting)g(compressed)0 668 y(b)m(yte)i(stream)h(is)f(stored)g(in)f(a)h(ro)m(w)g(of)g(a)h(v)-5 b(ariable)37 b(length)g(column)g(in)g(a)g(FITS)f(binary)g(table.)61 b(By)37 b(dividing)0 781 y(the)j(image)g(in)m(to)g(tiles)h(it)f(is)f (generally)i(p)s(ossible)e(to)h(extract)h(and)d(uncompress)g (subsections)i(of)f(the)h(image)0 894 y(without)d(ha)m(ving)h(to)g (uncompress)e(the)h(whole)g(image.)62 b(The)37 b(default)g(tiling)h (pattern)g(treats)g(eac)m(h)g(ro)m(w)f(of)h(a)0 1007 y(2-dimensional)e(image)g(\(or)f(higher)f(dimensional)h(cub)s(e\))g(as) g(a)g(tile,)j(suc)m(h)c(that)i(eac)m(h)g(tile)g(con)m(tains)g(NAXIS1)0 1120 y(pixels)29 b(\(except)h(the)f(default)g(with)g(the)g(HCOMPRESS)e (algorithm)j(is)f(to)h(compress)f(the)g(whole)g(2D)h(image)g(as)0 1233 y(a)35 b(single)g(tile\).)56 b(An)m(y)34 b(other)h(rectangular)h (tiling)g(pattern)f(ma)m(y)g(also)h(b)s(e)e(de\014ned.)52 b(In)34 b(the)h(case)h(of)f(relativ)m(ely)0 1346 y(small)25 b(images)h(it)f(ma)m(y)g(b)s(e)f(su\016cien)m(t)h(to)h(compress)e(the)h (en)m(tire)g(image)h(as)f(a)g(single)h(tile,)h(resulting)d(in)h(an)f (output)0 1458 y(binary)29 b(table)i(with)f(1)g(ro)m(w.)41 b(In)29 b(the)h(case)h(of)f(3-dimensional)h(data)g(cub)s(es,)e(it)i(ma) m(y)f(b)s(e)f(adv)-5 b(an)m(tageous)32 b(to)f(treat)0 1571 y(eac)m(h)i(plane)f(of)g(the)g(cub)s(e)f(as)h(a)g(separate)h(tile) g(if)f(application)h(soft)m(w)m(are)h(t)m(ypically)f(needs)f(to)g (access)i(the)e(cub)s(e)0 1684 y(on)e(a)h(plane)f(b)m(y)h(plane)f (basis.)0 1844 y(See)41 b(section)g(5.6)h(\\Image)f(Compression")f(for) g(more)h(information)g(on)f(using)g(this)g(tile-compressed)i(image)0 1957 y(format.)p eop end %%Page: 158 166 TeXDict begin 158 165 bop 0 299 a Fj(158)1741 b Fh(CHAPTER)30 b(12.)112 b(LOCAL)29 b(FITS)h(CONVENTIONS)p eop end %%Page: 159 167 TeXDict begin 159 166 bop 0 1225 a Fg(Chapter)65 b(13)0 1687 y Fm(Optimizing)76 b(Programs)0 2180 y Fj(CFITSIO)22 b(has)h(b)s(een)f(carefully)i(designed)f(to)h(obtain)g(the)f(highest)h (p)s(ossible)e(sp)s(eed)h(when)f(reading)h(and)g(writing)0 2293 y(FITS)33 b(\014les.)51 b(In)33 b(order)h(to)g(ac)m(hiev)m(e)i (the)e(b)s(est)g(p)s(erformance,)g(ho)m(w)m(ev)m(er,)i(application)g (programmers)d(m)m(ust)h(b)s(e)0 2406 y(careful)24 b(to)h(call)g(the)f (CFITSIO)f(routines)g(appropriately)i(and)e(in)h(an)f(e\016cien)m(t)j (sequence;)h(inappropriate)c(usage)0 2518 y(of)31 b(CFITSIO)d(routines) j(can)f(greatly)i(slo)m(w)f(do)m(wn)f(the)h(execution)g(sp)s(eed)f(of)g (a)h(program.)0 2679 y(The)f(maxim)m(um)h(p)s(ossible)f(I/O)h(sp)s(eed) f(of)h(CFITSIO)e(dep)s(ends)g(of)i(course)g(on)f(the)h(t)m(yp)s(e)g(of) g(computer)g(system)0 2791 y(that)g(it)f(is)g(running)e(on.)41 b(As)30 b(a)g(rough)g(guide,)g(the)g(curren)m(t)g(generation)h(of)f(w)m (orkstations)h(can)g(ac)m(hiev)m(e)h(sp)s(eeds)0 2904 y(of)j(2)g({)g(10)g(MB/s)h(when)e(reading)h(or)f(writing)h(FITS)f (images)i(and)e(similar,)i(or)f(sligh)m(tly)h(slo)m(w)m(er)g(sp)s(eeds) d(with)0 3017 y(FITS)c(binary)h(tables.)41 b(Reading)31 b(of)f(FITS)g(\014les)g(can)h(o)s(ccur)f(at)h(ev)m(en)f(higher)g(rates) h(\(30MB/s)i(or)d(more\))h(if)f(the)0 3130 y(FITS)c(\014le)h(is)f (still)i(cac)m(hed)g(in)e(system)h(memory)f(follo)m(wing)j(a)e (previous)f(read)g(or)h(write)g(op)s(eration)g(on)g(the)g(same)0 3243 y(\014le.)44 b(T)-8 b(o)32 b(more)g(accurately)h(predict)e(the)h (b)s(est)f(p)s(erformance)g(that)h(is)f(p)s(ossible)g(on)h(an)m(y)g (particular)f(system,)i(a)0 3356 y(diagnostic)h(program)f(called)h (\\sp)s(eed.c")f(is)g(included)f(with)h(the)g(CFITSIO)e(distribution)h (whic)m(h)h(can)g(b)s(e)f(run)0 3469 y(to)f(appro)m(ximately)h(measure) e(the)h(maxim)m(um)f(p)s(ossible)g(sp)s(eed)f(of)i(writing)f(and)g (reading)h(a)f(test)i(FITS)d(\014le.)0 3629 y(The)k(follo)m(wing)h(2)g (sections)g(pro)m(vide)g(some)f(bac)m(kground)g(on)h(ho)m(w)f(CFITSIO)f (in)m(ternally)i(manages)g(the)f(data)0 3742 y(I/O)g(and)g(describ)s (es)f(some)i(strategies)h(that)f(ma)m(y)g(b)s(e)e(used)h(to)h(optimize) g(the)g(pro)s(cessing)f(sp)s(eed)f(of)h(soft)m(w)m(are)0 3855 y(that)e(uses)f(CFITSIO.)0 4271 y Ff(13.1)136 b(Ho)l(w)45 b(CFITSIO)f(Manages)i(Data)g(I/O)0 4538 y Fj(Man)m(y)22 b(CFITSIO)e(op)s(erations)i(in)m(v)m(olv)m(e)i(transferring)d(only)h(a) g(small)g(n)m(um)m(b)s(er)f(of)h(b)m(ytes)g(to)g(or)g(from)f(the)h (FITS)f(\014le)0 4650 y(\(e.g,)31 b(reading)e(a)g(k)m(eyw)m(ord,)h(or)f (writing)g(a)g(ro)m(w)g(in)f(a)h(table\);)i(it)f(w)m(ould)e(b)s(e)g(v)m (ery)i(ine\016cien)m(t)g(to)f(ph)m(ysically)h(read)0 4763 y(or)i(write)h(suc)m(h)f(small)g(blo)s(c)m(ks)h(of)f(data)h (directly)g(in)f(the)g(FITS)g(\014le)g(on)g(disk,)h(therefore)f (CFITSIO)f(main)m(tains)0 4876 y(a)38 b(set)g(of)g(in)m(ternal)h (Input{Output)c(\(IO\))j(bu\013ers)f(in)g(RAM)h(memory)g(that)g(eac)m (h)h(con)m(tain)g(one)f(FITS)f(blo)s(c)m(k)0 4989 y(\(2880)27 b(b)m(ytes\))f(of)f(data.)40 b(Whenev)m(er)25 b(CFITSIO)f(needs)g(to)i (access)g(data)g(in)f(the)g(FITS)f(\014le,)j(it)e(\014rst)f(transfers)h (the)0 5102 y(FITS)30 b(blo)s(c)m(k)h(con)m(taining)h(those)f(b)m(ytes) g(in)m(to)g(one)g(of)f(the)h(IO)f(bu\013ers)f(in)h(memory)-8 b(.)42 b(The)30 b(next)g(time)h(CFITSIO)0 5215 y(needs)36 b(to)g(access)i(b)m(ytes)e(in)g(the)g(same)h(blo)s(c)m(k)f(it)h(can)f (then)g(go)h(to)f(the)h(fast)f(IO)f(bu\013er)g(rather)h(than)g(using)g (a)0 5328 y(m)m(uc)m(h)c(slo)m(w)m(er)i(system)e(disk)g(access)h (routine.)46 b(The)32 b(n)m(um)m(b)s(er)f(of)h(a)m(v)-5 b(ailable)35 b(IO)d(bu\013ers)f(is)h(determined)g(b)m(y)g(the)0 5441 y(NIOBUF)f(parameter)g(\(in)f(\014tsio2.h\))h(and)f(is)h(curren)m (tly)f(set)h(to)g(40)g(b)m(y)g(default.)0 5601 y(Whenev)m(er)24 b(CFITSIO)f(reads)g(or)h(writes)g(data)g(it)h(\014rst)e(c)m(hec)m(ks)i (to)g(see)f(if)g(that)g(blo)s(c)m(k)h(of)f(the)g(FITS)f(\014le)g(is)h (already)0 5714 y(loaded)33 b(in)m(to)g(one)f(of)g(the)g(IO)g (bu\013ers.)44 b(If)32 b(not,)h(and)e(if)h(there)g(is)g(an)g(empt)m(y)h (IO)e(bu\013er)g(a)m(v)-5 b(ailable,)35 b(then)d(it)h(will)1882 5942 y(159)p eop end %%Page: 160 168 TeXDict begin 160 167 bop 0 299 a Fj(160)1876 b Fh(CHAPTER)30 b(13.)112 b(OPTIMIZING)29 b(PR)m(OGRAMS)0 555 y Fj(load)k(that)h(blo)s (c)m(k)f(in)m(to)g(the)g(IO)g(bu\013er)e(\(when)h(reading)h(a)g(FITS)f (\014le\))h(or)g(will)g(initialize)i(a)e(new)f(blo)s(c)m(k)i(\(when)0 668 y(writing)j(to)h(a)g(FITS)f(\014le\).)62 b(If)37 b(all)h(the)g(IO)e(bu\013ers)h(are)g(already)h(full,)h(it)f(m)m(ust)g (decide)f(whic)m(h)g(one)h(to)g(reuse)0 781 y(\(generally)c(the)f(one)g (that)g(has)f(b)s(een)g(accessed)i(least)f(recen)m(tly\),)i(and)d (\015ush)f(the)i(con)m(ten)m(ts)h(bac)m(k)g(to)f(disk)f(if)g(it)0 894 y(has)e(b)s(een)g(mo)s(di\014ed)f(b)s(efore)h(loading)h(the)g(new)f (blo)s(c)m(k.)0 1054 y(The)g(one)g(ma)5 b(jor)30 b(exception)i(to)f (the)f(ab)s(o)m(v)m(e)h(pro)s(cess)f(o)s(ccurs)g(whenev)m(er)g(a)g (large)i(con)m(tiguous)f(set)g(of)f(b)m(ytes)h(are)0 1167 y(accessed,)37 b(as)d(migh)m(t)i(o)s(ccur)e(when)f(reading)i(or)f (writing)g(a)h(FITS)f(image.)54 b(In)34 b(this)g(case)h(CFITSIO)e(b)m (ypasses)0 1280 y(the)i(in)m(ternal)h(IO)f(bu\013ers)f(and)g(simply)h (reads)g(or)g(writes)h(the)f(desired)g(b)m(ytes)g(directly)h(in)f(the)g (disk)g(\014le)g(with)0 1393 y(a)i(single)g(call)g(to)g(a)g(lo)m(w-lev) m(el)i(\014le)d(read)g(or)h(write)f(routine.)58 b(The)36 b(minim)m(um)g(threshold)f(for)h(the)h(n)m(um)m(b)s(er)e(of)0 1506 y(b)m(ytes)40 b(to)g(read)f(or)g(write)g(this)h(w)m(a)m(y)g(is)f (set)h(b)m(y)f(the)g(MINDIRECT)g(parameter)h(and)e(is)i(curren)m(tly)f (set)h(to)g(3)0 1619 y(FITS)28 b(blo)s(c)m(ks)g(=)g(8640)i(b)m(ytes.)41 b(This)28 b(is)g(the)g(most)h(e\016cien)m(t)h(w)m(a)m(y)f(to)g(read)g (or)f(write)h(large)g(c)m(h)m(unks)f(of)g(data)i(and)0 1732 y(can)37 b(ac)m(hiev)m(e)i(IO)d(transfer)g(rates)h(of)g(5)g({)g (10MB/s)i(or)d(greater.)61 b(Note)38 b(that)f(this)g(fast)g(direct)g (IO)f(pro)s(cess)g(is)0 1844 y(not)29 b(applicable)g(when)e(accessing)j (columns)f(of)f(data)h(in)f(a)h(FITS)f(table)h(b)s(ecause)g(the)f(b)m (ytes)h(are)g(generally)h(not)0 1957 y(con)m(tiguous)g(since)f(they)g (are)h(in)m(terlea)m(v)m(ed)h(b)m(y)e(the)g(other)g(columns)g(of)g (data)g(in)g(the)g(table.)41 b(This)28 b(explains)h(wh)m(y)0 2070 y(the)i(sp)s(eed)e(for)h(accessing)i(FITS)e(tables)h(is)f (generally)i(slo)m(w)m(er)f(than)g(accessing)g(FITS)f(images.)0 2230 y(Giv)m(en)i(this)g(bac)m(kground)f(information,)h(the)g(general)g (strategy)h(for)e(e\016cien)m(tly)i(accessing)g(FITS)e(\014les)g (should)0 2343 y(b)s(e)e(apparen)m(t:)41 b(when)28 b(dealing)j(with)e (FITS)g(images,)i(read)e(or)h(write)g(large)g(c)m(h)m(unks)g(of)g(data) g(at)g(a)g(time)g(so)g(that)0 2456 y(the)25 b(direct)g(IO)f(mec)m (hanism)g(will)h(b)s(e)f(in)m(v)m(ok)m(ed;)k(when)c(accessing)i(FITS)e (headers)g(or)g(FITS)g(tables,)j(on)d(the)h(other)0 2569 y(hand,)35 b(once)g(a)g(particular)g(FITS)f(blo)s(c)m(k)i(has)e(b)s (een)g(loading)i(in)m(to)f(one)g(of)g(the)g(IO)f(bu\013ers,)h(try)g(to) g(access)h(all)0 2682 y(the)30 b(needed)g(information)g(in)g(that)g (blo)s(c)m(k)h(b)s(efore)f(it)g(gets)h(\015ushed)d(out)j(of)f(the)g(IO) f(bu\013er.)40 b(It)30 b(is)g(imp)s(ortan)m(t)g(to)0 2795 y(a)m(v)m(oid)e(the)f(situation)g(where)f(the)h(same)g(FITS)e(blo) s(c)m(k)i(is)g(b)s(eing)f(read)g(then)g(\015ushed)f(from)h(a)h(IO)f (bu\013er)f(m)m(ultiple)0 2908 y(times.)0 3068 y(The)30 b(follo)m(wing)i(section)f(giv)m(es)h(more)e(sp)s(eci\014c)h (suggestions)g(for)f(optimizing)i(the)e(use)g(of)h(CFITSIO.)0 3411 y Ff(13.2)136 b(Optimization)46 b(Strategies)0 3663 y Fj(1.)d(Because)32 b(the)f(data)g(in)g(FITS)f(\014les)h(is)g(alw)m(a) m(ys)h(stored)f(in)g("big-endian")h(b)m(yte)f(order,)g(where)f(the)h (\014rst)f(b)m(yte)0 3776 y(of)g(n)m(umeric)h(v)-5 b(alues)30 b(con)m(tains)i(the)e(most)h(signi\014can)m(t)g(bits)f(and)g(the)g (last)i(b)m(yte)e(con)m(tains)i(the)e(least)i(signi\014can)m(t)0 3889 y(bits,)e(CFITSIO)f(m)m(ust)h(sw)m(ap)g(the)g(order)f(of)h(the)h (b)m(ytes)f(when)f(reading)h(or)g(writing)g(FITS)g(\014les)g(when)f (running)0 4002 y(on)k(little-endian)i(mac)m(hines)f(\(e.g.,)i(Lin)m (ux)d(and)g(Microsoft)i(Windo)m(ws)e(op)s(erating)h(systems)g(running)d (on)j(PCs)0 4115 y(with)c(x86)h(CPUs\).)0 4275 y(On)i(fairly)h(new)f (CPUs)g(that)i(supp)s(ort)d("SSSE3")h(mac)m(hine)h(instructions)g (\(e.g.,)i(starting)f(with)e(In)m(tel)i(Core)f(2)0 4388 y(CPUs)21 b(in)h(2007,)j(and)d(in)f(AMD)i(CPUs)e(b)s(eginning)g(in)h (2011\))i(signi\014can)m(tly)f(faster)f(4-b)m(yte)h(and)e(8-b)m(yte)i (sw)m(apping)0 4501 y(algorithms)k(are)g(a)m(v)-5 b(ailable.)42 b(These)26 b(faster)h(b)m(yte)g(sw)m(apping)f(functions)g(are)h(not)g (used)e(b)m(y)i(default)f(in)g(CFITSIO)0 4614 y(\(b)s(ecause)c(of)f (the)h(p)s(oten)m(tial)g(co)s(de)g(p)s(ortablilit)m(y)g(issues\),)i (but)c(users)h(can)g(enable)h(them)f(on)h(supp)s(orted)d(platforms)0 4727 y(b)m(y)38 b(adding)f(the)h(appropriate)f(compiler)i(\015ags)e (\(-mssse3)i(with)e(gcc)i(or)f(icc)g(on)g(lin)m(ux\))g(when)e (compiling)j(the)0 4840 y(sw)m(appro)s(c.c)30 b(source)g(\014le,)g (whic)m(h)g(will)g(allo)m(w)i(the)e(compiler)g(to)h(generate)h(co)s(de) e(using)f(the)h(SSSE3)f(instruction)0 4952 y(set.)41 b(A)28 b(con)m(v)m(enien)m(t)i(w)m(a)m(y)f(to)g(do)g(this)f(is)g(to)h (con\014gure)f(the)g(CFITSIO)f(library)h(with)g(the)g(follo)m(wing)i (command:)95 5220 y Fe(>)96 b(./configure)44 b(--enable-ssse3)0 5488 y Fj(Note,)37 b(ho)m(w)m(ev)m(er,)h(that)d(a)g(binary)f (executable)j(\014le)e(that)g(is)g(created)h(using)e(these)h(faster)g (functions)g(will)g(only)0 5601 y(run)c(on)h(mac)m(hines)g(that)h(supp) s(ort)d(the)i(SSSE3)f(mac)m(hine)i(instructions.)45 b(It)33 b(will)f(crash)g(on)g(mac)m(hines)g(that)h(do)0 5714 y(not)e(supp)s(ort)d(them.)p eop end %%Page: 161 169 TeXDict begin 161 168 bop 0 299 a Fh(13.2.)73 b(OPTIMIZA)-8 b(TION)29 b(STRA)-8 b(TEGIES)2186 b Fj(161)0 555 y(F)-8 b(or)36 b(faster)f(2-b)m(yte)i(sw)m(aps)e(on)g(virtually)g(all)h (x86-64)h(CPUs)e(\(ev)m(en)h(those)g(that)f(do)g(not)h(supp)s(ort)d (SSSE3\),)j(a)0 668 y(v)-5 b(arian)m(t)26 b(using)e(only)g(SSE2)g (instructions)h(exists.)39 b(SSE2)24 b(is)h(enabled)f(b)m(y)h(default)g (on)f(x86)p 3066 668 28 4 v 34 w(64)h(CPUs)f(with)h(64-bit)0 781 y(op)s(erating)30 b(systems)f(\(and)g(is)g(also)i(automatically)h (enabled)d(b)m(y)g(the)g({enable-ssse3)i(\015ag\).)41 b(When)30 b(running)d(on)0 894 y(x86)p 143 894 V 34 w(64)k(CPUs)g(with) f(32-bit)i(op)s(erating)g(systems,)f(these)g(faster)h(2-b)m(yte)g(sw)m (apping)f(algorithms)g(are)h(not)f(used)0 1007 y(b)m(y)f(default)h(in)f (CFITSIO,)f(but)h(can)g(b)s(e)g(enabled)g(explicitly)i(with:)0 1233 y Fe(./configure)45 b(--enable-sse2)0 1460 y Fj(Preliminary)f (testing)h(indicates)g(that)g(these)f(SSSE3)f(and)g(SSE2)g(based)h(b)m (yte-sw)m(apping)h(algorithms)g(can)0 1573 y(b)s(o)s(ost)31 b(the)h(CFITSIO)e(p)s(erformance)h(when)f(reading)i(or)f(writing)h (FITS)f(images)h(b)m(y)g(20\045)g(-)g(30\045)g(or)f(more.)45 b(It)0 1686 y(is)36 b(imp)s(ortan)m(t)g(to)g(note,)i(ho)m(w)m(ev)m(er,) h(that)d(compiler)g(optimization)i(m)m(ust)e(b)s(e)f(turned)f(on)i (\(e.g.,)j(b)m(y)d(using)f(the)0 1799 y(-O1)f(or)g(-O2)g(\015ags)g(in)g (gcc\))h(when)e(building)g(programs)h(that)g(use)g(these)g(fast)g(b)m (yte-sw)m(apping)h(algorithms)f(in)0 1912 y(order)d(to)h(reap)f(the)h (full)f(b)s(ene\014t)g(of)g(the)h(SSSE3)e(and)h(SSE2)g(instructions;)h (without)f(optimization,)j(the)e(co)s(de)0 2025 y(ma)m(y)f(actually)h (run)d(slo)m(w)m(er)i(than)f(when)g(using)g(more)g(traditional)i(b)m (yte-sw)m(apping)f(tec)m(hniques.)0 2185 y(2.)54 b(When)34 b(dealing)h(with)g(a)g(FITS)e(primary)h(arra)m(y)h(or)g(IMA)m(GE)g (extension,)i(it)e(is)f(more)h(e\016cien)m(t)h(to)f(read)g(or)0 2298 y(write)c(large)g(c)m(h)m(unks)f(of)g(the)h(image)g(at)h(a)e(time) h(\(at)h(least)f(3)g(FITS)f(blo)s(c)m(ks)g(=)g(8640)i(b)m(ytes\))f(so)g (that)g(the)f(direct)0 2411 y(IO)j(mec)m(hanism)h(will)f(b)s(e)g(used)g (as)g(describ)s(ed)g(in)g(the)g(previous)g(section.)51 b(Smaller)34 b(c)m(h)m(unks)f(of)g(data)h(are)g(read)0 2524 y(or)d(written)g(via)h(the)f(IO)f(bu\013ers,)g(whic)m(h)h(is)g (somewhat)g(less)g(e\016cien)m(t)i(b)s(ecause)e(of)g(the)g(extra)h(cop) m(y)f(op)s(eration)0 2636 y(and)26 b(additional)h(b)s(o)s(okk)m(eeping) g(steps)g(that)g(are)g(required.)39 b(In)26 b(principle)g(it)h(is)g (more)f(e\016cien)m(t)i(to)g(read)e(or)h(write)0 2749 y(as)i(big)g(an)g(arra)m(y)h(of)f(image)h(pixels)f(at)h(one)f(time)g (as)h(p)s(ossible,)f(ho)m(w)m(ev)m(er,)h(if)f(the)h(arra)m(y)f(b)s (ecomes)g(so)g(large)h(that)0 2862 y(the)i(op)s(erating)g(system)f (cannot)h(store)g(it)g(all)h(in)e(RAM,)h(then)f(the)h(p)s(erformance)f (ma)m(y)h(b)s(e)f(degraded)g(b)s(ecause)0 2975 y(of)g(the)f(increased)h (sw)m(apping)f(of)g(virtual)h(memory)f(to)h(disk.)0 3135 y(3.)51 b(When)33 b(dealing)i(with)e(FITS)g(tables,)j(the)e(most)g(imp) s(ortan)m(t)g(e\016ciency)g(factor)h(in)e(the)h(soft)m(w)m(are)h (design)f(is)0 3248 y(to)j(read)f(or)g(write)g(the)g(data)h(in)f(the)g (FITS)g(\014le)g(in)g(a)g(single)h(pass)f(through)f(the)h(\014le.)58 b(An)36 b(example)h(of)f(p)s(o)s(or)0 3361 y(program)g(design)h(w)m (ould)f(b)s(e)g(to)h(read)g(a)f(large,)k(3-column)d(table)g(b)m(y)g (sequen)m(tially)h(reading)f(the)f(en)m(tire)i(\014rst)0 3474 y(column,)25 b(then)f(going)h(bac)m(k)f(to)h(read)e(the)h(2nd)g (column,)h(and)e(\014nally)h(the)g(3rd)f(column;)j(this)e(ob)m(viously) g(requires)0 3587 y(3)j(passes)g(through)g(the)g(\014le)g(whic)m(h)g (could)g(triple)g(the)h(execution)g(time)g(of)f(an)g(IO)f(limited)i (program.)40 b(F)-8 b(or)27 b(small)0 3700 y(tables)k(this)f(is)h(not)f (imp)s(ortan)m(t,)h(but)f(when)f(reading)h(m)m(ulti-megab)m(yte)j (sized)e(tables)g(these)g(ine\016ciencies)h(can)0 3813 y(b)s(ecome)d(signi\014can)m(t.)41 b(The)28 b(more)h(e\016cien)m(t)h (pro)s(cedure)d(in)i(this)f(case)i(is)e(to)i(read)e(or)h(write)g(only)f (as)h(man)m(y)g(ro)m(ws)0 3926 y(of)j(the)g(table)g(as)g(will)g(\014t)g (in)m(to)g(the)g(a)m(v)-5 b(ailable)34 b(in)m(ternal)e(IO)f(bu\013ers,) h(then)f(access)i(all)f(the)g(necessary)g(columns)0 4039 y(of)f(data)h(within)e(that)i(range)f(of)g(ro)m(ws.)43 b(Then)29 b(after)j(the)f(program)g(is)g(completely)h(\014nished)e (with)g(the)i(data)f(in)0 4152 y(those)i(ro)m(ws)e(it)i(can)f(mo)m(v)m (e)i(on)e(to)g(the)h(next)f(range)g(of)g(ro)m(ws)g(that)h(will)f(\014t) g(in)g(the)g(bu\013ers,)f(con)m(tin)m(uing)i(in)f(this)0 4264 y(w)m(a)m(y)c(un)m(til)f(the)f(en)m(tire)i(\014le)f(has)f(b)s(een) g(pro)s(cessed.)39 b(By)27 b(using)f(this)h(pro)s(cedure)e(of)i (accessing)h(all)g(the)e(columns)h(of)0 4377 y(a)j(table)g(in)f (parallel)h(rather)f(than)g(sequen)m(tially)-8 b(,)32 b(eac)m(h)e(blo)s(c)m(k)g(of)g(the)f(FITS)g(\014le)g(will)g(only)h(b)s (e)e(read)i(or)f(written)0 4490 y(once.)0 4650 y(The)g(optimal)h(n)m (um)m(b)s(er)e(of)i(ro)m(ws)f(to)i(read)e(or)g(write)h(at)g(one)g(time) g(in)f(a)h(giv)m(en)g(table)h(dep)s(ends)c(on)j(the)f(width)g(of)0 4763 y(the)c(table)h(ro)m(w)f(and)f(on)h(the)g(n)m(um)m(b)s(er)e(of)i (IO)g(bu\013ers)e(that)j(ha)m(v)m(e)g(b)s(een)e(allo)s(cated)j(in)e (CFITSIO.)e(The)h(CFITSIO)0 4876 y(Iterator)h(routine)f(will)g (automatically)j(use)c(the)h(optimal-sized)i(bu\013er,)e(but)g(there)g (is)g(also)g(a)h(CFITSIO)d(routine)0 4989 y(that)31 b(will)g(return)f (the)h(optimal)h(n)m(um)m(b)s(er)d(of)i(ro)m(ws)g(for)f(a)h(giv)m(en)h (table:)43 b(\014ts)p 2629 4989 V 32 w(get)p 2781 4989 V 34 w(ro)m(wsize.)g(It)31 b(is)g(not)g(critical)h(to)0 5102 y(use)h(exactly)j(the)e(v)-5 b(alue)34 b(of)g(nro)m(ws)f(returned) f(b)m(y)i(this)g(routine,)g(as)g(long)h(as)f(one)g(do)s(es)f(not)h (exceed)h(it.)51 b(Using)0 5215 y(a)37 b(v)m(ery)g(small)g(v)-5 b(alue)37 b(ho)m(w)m(ev)m(er)h(can)f(also)g(lead)g(to)h(p)s(o)s(or)d(p) s(erformance)h(b)s(ecause)g(of)h(the)g(o)m(v)m(erhead)h(from)e(the)0 5328 y(larger)31 b(n)m(um)m(b)s(er)e(of)i(subroutine)e(calls.)0 5488 y(The)36 b(optimal)h(n)m(um)m(b)s(er)e(of)h(ro)m(ws)g(returned)f (b)m(y)i(\014ts)p 1829 5488 V 32 w(get)p 1981 5488 V 34 w(ro)m(wsize)g(is)g(v)-5 b(alid)36 b(only)g(as)h(long)g(as)f(the)h (application)0 5601 y(program)27 b(is)g(only)g(reading)h(or)f(writing)g (data)h(in)f(the)g(sp)s(eci\014ed)f(table.)41 b(An)m(y)27 b(other)g(calls)i(to)f(access)g(data)g(in)f(the)0 5714 y(table)i(header)f(w)m(ould)f(cause)i(additional)g(blo)s(c)m(ks)f(of)g (data)g(to)h(b)s(e)e(loaded)i(in)m(to)g(the)f(IO)f(bu\013ers)g (displacing)h(data)p eop end %%Page: 162 170 TeXDict begin 162 169 bop 0 299 a Fj(162)1876 b Fh(CHAPTER)30 b(13.)112 b(OPTIMIZING)29 b(PR)m(OGRAMS)0 555 y Fj(from)34 b(the)h(original)h(table,)h(and)d(should)f(b)s(e)h(a)m(v)m(oided)i (during)e(the)h(critical)h(p)s(erio)s(d)e(while)g(the)h(table)h(is)e(b) s(eing)0 668 y(read)c(or)h(written.)0 828 y(4.)39 b(Use)25 b(the)g(CFITSIO)e(Iterator)j(routine.)39 b(This)24 b(routine)h(pro)m (vides)f(a)i(more)e(`ob)5 b(ject)26 b(orien)m(ted')g(w)m(a)m(y)g(of)f (reading)0 941 y(and)34 b(writing)g(FITS)g(\014les)g(whic)m(h)h (automatically)i(uses)d(the)g(most)h(appropriate)g(data)g(bu\013er)e (size)i(to)h(ac)m(hiev)m(e)0 1054 y(the)31 b(maxim)m(um)f(I/O)g (throughput.)0 1214 y(5.)39 b(Use)24 b(binary)f(table)h(extensions)g (rather)f(than)h(ASCI)s(I)e(table)i(extensions)g(for)f(b)s(etter)h (e\016ciency)h(when)d(dealing)0 1327 y(with)37 b(tabular)h(data.)62 b(The)37 b(I/O)g(to)h(ASCI)s(I)e(tables)i(is)g(slo)m(w)m(er)g(b)s (ecause)g(of)f(the)h(o)m(v)m(erhead)h(in)e(formatting)h(or)0 1440 y(parsing)32 b(the)g(ASCI)s(I)f(data)i(\014elds)f(and)g(b)s (ecause)g(ASCI)s(I)f(tables)i(are)g(ab)s(out)f(t)m(wice)i(as)f(large)g (as)g(binary)e(tables)0 1553 y(that)g(ha)m(v)m(e)h(the)e(same)h (information)g(con)m(ten)m(t.)0 1713 y(6.)64 b(Design)39 b(soft)m(w)m(are)g(so)g(that)f(it)h(reads)f(the)g(FITS)f(header)h(k)m (eyw)m(ords)g(in)g(the)g(same)h(order)e(in)h(whic)m(h)g(they)0 1826 y(o)s(ccur)28 b(in)h(the)g(\014le.)40 b(When)28 b(reading)h(k)m(eyw)m(ords,)h(CFITSIO)d(searc)m(hes)i(forw)m(ard)g (starting)g(from)f(the)h(p)s(osition)g(of)0 1939 y(the)g(last)i(k)m (eyw)m(ord)e(that)h(w)m(as)g(read.)40 b(If)29 b(it)g(reac)m(hes)i(the)e (end)g(of)g(the)h(header)f(without)g(\014nding)f(the)h(k)m(eyw)m(ord,)h (it)0 2052 y(then)j(go)s(es)h(bac)m(k)g(to)h(the)e(start)h(of)g(the)g (header)f(and)g(con)m(tin)m(ues)h(the)g(searc)m(h)g(do)m(wn)f(to)h(the) g(p)s(osition)f(where)g(it)0 2165 y(started.)41 b(In)30 b(practice,)i(as)e(long)h(as)g(the)f(en)m(tire)i(FITS)d(header)h(can)h (\014t)f(at)h(one)g(time)g(in)f(the)g(a)m(v)-5 b(ailable)33 b(in)m(ternal)0 2278 y(IO)23 b(bu\013ers,)i(then)e(the)i(header)e(k)m (eyw)m(ord)i(access)g(will)f(b)s(e)g(relativ)m(ely)i(fast)e(and)g(it)g (mak)m(es)h(little)h(di\013erence)e(whic)m(h)0 2391 y(order)30 b(they)g(are)h(accessed.)0 2551 y(7.)40 b(Av)m(oid)29 b(the)e(use)h(of)f(scaling)i(\(b)m(y)f(using)f(the)h(BSCALE)e(and)h (BZER)m(O)h(or)f(TSCAL)g(and)g(TZER)m(O)f(k)m(eyw)m(ords\))0 2664 y(in)35 b(FITS)f(\014les)g(since)i(the)f(scaling)h(op)s(erations)f (add)f(to)i(the)f(pro)s(cessing)f(time)i(needed)e(to)i(read)f(or)g (write)g(the)0 2777 y(data.)k(In)24 b(some)h(cases)h(it)f(ma)m(y)g(b)s (e)f(more)g(e\016cien)m(t)i(to)g(temp)s(orarily)e(turn)g(o\013)h(the)f (scaling)i(\(using)e(\014ts)p 3490 2777 28 4 v 33 w(set)p 3634 2777 V 33 w(bscale)0 2889 y(or)30 b(\014ts)p 238 2889 V 33 w(set)p 382 2889 V 33 w(tscale\))j(and)c(then)h(read)h(or)f (write)h(the)f(ra)m(w)h(unscaled)f(v)-5 b(alues)31 b(in)f(the)g(FITS)g (\014le.)0 3050 y(8.)77 b(Av)m(oid)43 b(using)f(the)h(`implicit)g(data) h(t)m(yp)s(e)e(con)m(v)m(ersion')i(capabilit)m(y)g(in)e(CFITSIO.)f(F)-8 b(or)44 b(instance,)i(when)0 3163 y(reading)28 b(a)g(FITS)f(image)i (with)e(BITPIX)h(=)f(-32)i(\(32-bit)g(\015oating)g(p)s(oin)m(t)f (pixels\),)h(read)e(the)h(data)g(in)m(to)h(a)f(single)0 3275 y(precision)40 b(\015oating)h(p)s(oin)m(t)f(data)h(arra)m(y)f(in)g (the)g(program.)69 b(F)-8 b(orcing)41 b(CFITSIO)e(to)i(con)m(v)m(ert)g (the)f(data)h(to)g(a)0 3388 y(di\013eren)m(t)31 b(data)g(t)m(yp)s(e)f (can)h(slo)m(w)g(the)g(program.)0 3548 y(9.)57 b(Where)36 b(feasible,)i(design)e(FITS)f(binary)g(tables)h(using)f(v)m(ector)j (column)d(elemen)m(ts)i(so)f(that)g(the)g(data)h(are)0 3661 y(written)30 b(as)g(a)g(con)m(tiguous)h(set)f(of)g(b)m(ytes,)g (rather)g(than)f(as)h(single)g(elemen)m(ts)h(in)f(m)m(ultiple)g(ro)m (ws.)41 b(F)-8 b(or)30 b(example,)0 3774 y(it)36 b(is)g(faster)g(to)g (access)h(the)f(data)h(in)e(a)h(table)h(that)f(con)m(tains)h(a)f (single)g(ro)m(w)g(and)f(2)h(columns)f(with)h(TF)m(ORM)0 3887 y(k)m(eyw)m(ords)d(equal)h(to)g('10000E')h(and)e('10000J',)j(than) d(it)g(is)g(to)h(access)g(the)g(same)f(amoun)m(t)h(of)f(data)h(in)f(a)g (table)0 4000 y(with)40 b(10000)j(ro)m(ws)d(whic)m(h)h(has)f(columns)g (with)g(the)h(TF)m(ORM)g(k)m(eyw)m(ords)g(equal)g(to)g('1E')h(and)e ('1J'.)h(In)f(the)0 4113 y(former)27 b(case)i(the)f(10000)i(\015oating) f(p)s(oin)m(t)f(v)-5 b(alues)28 b(in)g(the)g(\014rst)f(column)h(are)g (all)h(written)f(in)f(a)h(con)m(tiguous)h(blo)s(c)m(k)0 4226 y(of)d(the)f(\014le)h(whic)m(h)f(can)h(b)s(e)f(read)g(or)g (written)h(quic)m(kly)-8 b(,)28 b(whereas)d(in)g(the)h(second)f(case)i (eac)m(h)g(\015oating)f(p)s(oin)m(t)f(v)-5 b(alue)0 4339 y(in)34 b(the)g(\014rst)f(column)g(is)h(in)m(terlea)m(v)m(ed)j(with)c (the)h(in)m(teger)i(v)-5 b(alue)34 b(in)g(the)g(second)g(column)f(of)h (the)g(same)h(ro)m(w)f(so)0 4452 y(CFITSIO)29 b(has)h(to)h(explicitly)h (mo)m(v)m(e)g(to)f(the)g(p)s(osition)f(of)h(eac)m(h)g(elemen)m(t)h(to)f (b)s(e)f(read)g(or)g(written.)0 4612 y(10.)45 b(Av)m(oid)33 b(the)f(use)f(of)h(v)-5 b(ariable)32 b(length)g(v)m(ector)h(columns)f (in)f(binary)g(tables,)i(since)f(an)m(y)g(reading)f(or)h(writing)0 4725 y(of)h(these)g(data)g(requires)f(that)h(CFITSIO)f(\014rst)f(lo)s (ok)j(up)d(or)i(compute)g(the)f(starting)i(address)e(of)g(eac)m(h)i(ro) m(w)f(of)0 4838 y(data)e(in)f(the)h(heap.)40 b(In)30 b(practice,)i(this)e(is)g(probably)g(not)h(a)f(signi\014can)m(t)i (e\016ciency)f(issue.)0 4998 y(11.)73 b(When)40 b(cop)m(ying)i(data)g (from)e(one)h(FITS)f(table)i(to)f(another,)j(it)e(is)e(faster)i(to)f (transfer)g(the)f(ra)m(w)h(b)m(ytes)0 5111 y(instead)28 b(of)h(reading)f(then)g(writing)g(eac)m(h)h(column)f(of)g(the)g(table.) 41 b(The)28 b(CFITSIO)e(routines)i(\014ts)p 3349 5111 V 33 w(read)p 3554 5111 V 32 w(tblb)m(ytes)0 5224 y(and)36 b(\014ts)p 310 5224 V 32 w(write)p 544 5224 V 33 w(tblb)m(ytes)i(will)f (p)s(erform)e(lo)m(w-lev)m(el)k(reads)e(or)f(writes)h(of)g(an)m(y)g (con)m(tiguous)g(range)g(of)g(b)m(ytes)g(in)0 5337 y(a)d(table)g (extension.)51 b(These)33 b(routines)h(can)f(b)s(e)g(used)g(to)h(read)f (or)h(write)g(a)f(whole)h(ro)m(w)g(\(or)g(m)m(ultiple)g(ro)m(ws)f(for)0 5450 y(ev)m(en)e(greater)h(e\016ciency\))h(of)e(a)g(table)h(with)e(a)h (single)h(function)e(call.)43 b(These)31 b(routines)g(are)g(fast)g(b)s (ecause)g(they)0 5562 y(b)m(ypass)36 b(all)h(the)g(usual)f(data)h (scaling,)i(error)d(c)m(hec)m(king)i(and)e(mac)m(hine)h(dep)s(enden)m (t)e(data)i(con)m(v)m(ersion)h(that)f(is)0 5675 y(normally)g(done)g(b)m (y)f(CFITSIO,)g(and)g(they)h(allo)m(w)h(the)g(program)e(to)i(write)f (the)g(data)g(to)h(the)f(output)f(\014le)h(in)p eop end %%Page: 163 171 TeXDict begin 163 170 bop 0 299 a Fh(13.2.)73 b(OPTIMIZA)-8 b(TION)29 b(STRA)-8 b(TEGIES)2186 b Fj(163)0 555 y(exactly)30 b(the)e(same)h(b)m(yte)g(order.)40 b(F)-8 b(or)29 b(these)f(same)h (reasons,)g(these)g(routines)f(can)g(corrupt)g(the)g(FITS)g(data)h (\014le)0 668 y(if)36 b(used)e(incorrectly)j(b)s(ecause)f(no)f(v)-5 b(alidation)37 b(or)f(mac)m(hine)g(dep)s(enden)m(t)e(con)m(v)m(ersion)j (is)f(p)s(erformed)e(b)m(y)h(these)0 781 y(routines.)55 b(These)35 b(routines)g(are)h(only)f(recommended)g(for)g(optimizing)h (critical)h(pieces)f(of)g(co)s(de)f(and)g(should)0 894 y(only)e(b)s(e)g(used)g(b)m(y)g(programmers)g(who)g(thoroughly)g (understand)e(the)j(in)m(ternal)g(format)g(of)f(the)h(FITS)e(tables)0 1007 y(they)f(are)f(reading)h(or)f(writing.)0 1167 y(12.)41 b(Another)30 b(strategy)g(for)g(impro)m(ving)f(the)h(sp)s(eed)e(of)i (writing)g(a)f(FITS)g(table,)i(similar)f(to)g(the)f(previous)g(one,)0 1280 y(is)j(to)g(directly)h(construct)f(the)f(en)m(tire)i(b)m(yte)f (stream)g(for)g(a)g(whole)g(table)g(ro)m(w)g(\(or)g(m)m(ultiple)h(ro)m (ws\))f(within)f(the)0 1393 y(application)g(program)e(and)g(then)h (write)g(it)g(to)g(the)g(FITS)f(\014le)h(with)f(\014ts)p 2520 1393 28 4 v 32 w(write)p 2754 1393 V 33 w(tblb)m(ytes.)41 b(This)29 b(a)m(v)m(oids)i(all)g(the)0 1506 y(o)m(v)m(erhead)f (normally)g(presen)m(t)f(in)g(the)h(column-orien)m(ted)g(CFITSIO)e (write)h(routines.)40 b(This)29 b(tec)m(hnique)h(should)0 1619 y(only)35 b(b)s(e)e(used)h(for)g(critical)i(applications)g(b)s (ecause)e(it)h(mak)m(es)h(the)e(co)s(de)h(more)f(di\016cult)h(to)g (understand)e(and)0 1732 y(main)m(tain,)38 b(and)d(it)h(mak)m(es)g(the) g(co)s(de)f(more)h(system)g(dep)s(enden)m(t)e(\(e.g.,)39 b(do)c(the)h(b)m(ytes)g(need)f(to)h(b)s(e)f(sw)m(app)s(ed)0 1844 y(b)s(efore)30 b(writing)g(to)h(the)g(FITS)f(\014le?\).)0 2005 y(13.)40 b(Finally)-8 b(,)29 b(external)e(factors)g(suc)m(h)e(as)i (the)f(sp)s(eed)f(of)i(the)f(data)h(storage)g(device,)h(the)f(size)g (of)f(the)g(data)h(cac)m(he,)0 2118 y(the)34 b(amoun)m(t)h(of)f(disk)g (fragmen)m(tation,)j(and)c(the)i(amoun)m(t)f(of)h(RAM)f(a)m(v)-5 b(ailable)37 b(on)d(the)g(system)g(can)h(all)g(ha)m(v)m(e)0 2230 y(a)k(signi\014can)m(t)g(impact)g(on)f(o)m(v)m(erall)j(I/O)d (e\016ciency)-8 b(.)66 b(F)-8 b(or)39 b(critical)h(applications,)i(the) c(en)m(tire)i(hardw)m(are)e(and)0 2343 y(soft)m(w)m(are)32 b(system)e(should)g(b)s(e)f(review)m(ed)i(to)h(iden)m(tify)e(an)m(y)h (p)s(oten)m(tial)h(I/O)e(b)s(ottlenec)m(ks.)p eop end %%Page: 164 172 TeXDict begin 164 171 bop 0 299 a Fj(164)1876 b Fh(CHAPTER)30 b(13.)112 b(OPTIMIZING)29 b(PR)m(OGRAMS)p eop end %%Page: 165 173 TeXDict begin 165 172 bop 0 1225 a Fg(App)5 b(endix)64 b(A)0 1687 y Fm(Index)77 b(of)h(Routines)50 2154 y Fj(\014ts)p 177 2154 28 4 v 32 w(add)p 356 2154 V 32 w(group)p 616 2154 V 33 w(mem)m(b)s(er)245 b(88)50 2267 y(\014ts)p 177 2267 V 32 w(ascii)p 380 2267 V 34 w(tform)579 b(66)50 2380 y(\014ts)p 177 2380 V 32 w(binary)p 465 2380 V 32 w(tform)496 b(66)50 2493 y(\014ts)p 177 2493 V 32 w(calculator)617 b(57)50 2606 y(\014ts)p 177 2606 V 32 w(calculator)p 596 2606 V 35 w(rng)450 b(57)50 2719 y(\014ts)p 177 2719 V 32 w(calc)p 359 2719 V 35 w(binning)520 b(58)50 2832 y(\014ts)p 177 2832 V 32 w(calc)p 359 2832 V 35 w(ro)m(ws)639 b(56)50 2945 y(\014ts)p 177 2945 V 32 w(c)m(hange)p 478 2945 V 34 w(group)473 b(86)50 3057 y(\014ts)p 177 3057 V 32 w(clear)p 395 3057 V 34 w(errmark)467 b(30)50 3170 y(\014ts)p 177 3170 V 32 w(clear)p 395 3170 V 34 w(errmsg)515 b(30)50 3283 y(\014ts)p 177 3283 V 32 w(close)p 395 3283 V 34 w(\014le)668 b(33)50 3396 y(\014ts)p 177 3396 V 32 w(compact)p 541 3396 V 34 w(group)410 b(87)50 3509 y(\014ts)p 177 3509 V 32 w(compare)p 542 3509 V 34 w(str)530 b(63)50 3622 y(\014ts)p 177 3622 V 32 w(compress)p 569 3622 V 33 w(heap)379 b(111)50 3735 y(\014ts)p 177 3735 V 32 w(con)m(v)m(ert)p 498 3735 V 35 w(hdr2str)244 b(37,)31 b(82)50 3848 y(\014ts)p 177 3848 V 32 w(cop)m(y)p 390 3848 V 34 w(cell2image)383 b(41)50 3961 y(\014ts)p 177 3961 V 32 w(cop)m(y)p 390 3961 V 34 w(col)679 b(53)50 4074 y(\014ts)p 177 4074 V 32 w(cop)m(y)p 390 4074 V 34 w(data)613 b(96)50 4187 y(\014ts)p 177 4187 V 32 w(cop)m(y)p 390 4187 V 34 w(\014le)673 b(34)50 4299 y(\014ts)p 177 4299 V 32 w(cop)m(y)p 390 4299 V 34 w(group)561 b(87)50 4412 y(\014ts)p 177 4412 V 32 w(cop)m(y)p 390 4412 V 34 w(hdu)636 b(34)50 4525 y(\014ts)p 177 4525 V 32 w(cop)m(y)p 390 4525 V 34 w(header)526 b(34)50 4638 y(\014ts)p 177 4638 V 32 w(cop)m(y)p 390 4638 V 34 w(image2cell)383 b(41)50 4751 y(\014ts)p 177 4751 V 32 w(cop)m(y)p 390 4751 V 34 w(image)p 655 4751 V 34 w(section)252 b(44)50 4864 y(\014ts)p 177 4864 V 32 w(cop)m(y)p 390 4864 V 34 w(k)m(ey)611 b(101)50 4977 y(\014ts)p 177 4977 V 32 w(cop)m(y)p 390 4977 V 34 w(mem)m(b)s(er)470 b(89)50 5090 y(\014ts)p 177 5090 V 32 w(cop)m(y)p 390 5090 V 34 w(pixlist2image)268 b(58)50 5203 y(\014ts)p 177 5203 V 32 w(cop)m(y)p 390 5203 V 34 w(ro)m(ws)609 b(53)50 5316 y(\014ts)p 177 5316 V 32 w(create)p 445 5316 V 35 w(disk\014le)457 b(32)50 5429 y(\014ts)p 177 5429 V 32 w(create)p 445 5429 V 35 w(\014le)617 b(32)50 5541 y(\014ts)p 177 5541 V 32 w(create)p 445 5541 V 35 w(group)505 b(86)50 5654 y(\014ts)p 177 5654 V 32 w(create)p 445 5654 V 35 w(hdu)580 b(95)1419 2154 y(\014ts)p 1546 2154 V 32 w(create)p 1814 2154 V 35 w(img)565 b(41)1419 2267 y(\014ts)p 1546 2267 V 32 w(create)p 1814 2267 V 35 w(mem\014le)403 b(92)1419 2380 y(\014ts)p 1546 2380 V 32 w(create)p 1814 2380 V 35 w(tbl)600 b(49)1419 2493 y(\014ts)p 1546 2493 V 32 w(create)p 1814 2493 V 35 w(template)364 b(92)1419 2606 y(\014ts)p 1546 2606 V 32 w(date2str)659 b(61)1419 2719 y(\014ts)p 1546 2719 V 32 w(deco)s(de)p 1848 2719 V 33 w(c)m(hksum)380 b(61)1419 2832 y(\014ts)p 1546 2832 V 32 w(deco)s(de)p 1848 2832 V 33 w(tdim)492 b(51)1419 2945 y(\014ts)p 1546 2945 V 32 w(delete)p 1809 2945 V 34 w(col)607 b(52)1419 3057 y(\014ts)p 1546 3057 V 32 w(delete)p 1809 3057 V 34 w(\014le)601 b(33)1419 3170 y(\014ts)p 1546 3170 V 32 w(delete)p 1809 3170 V 34 w(hdu)564 b(35)1419 3283 y(\014ts)p 1546 3283 V 32 w(delete)p 1809 3283 V 34 w(k)m(ey)584 b(39)1419 3396 y(\014ts)p 1546 3396 V 32 w(delete)p 1809 3396 V 34 w(record)469 b(39)1419 3509 y(\014ts)p 1546 3509 V 32 w(delete)p 1809 3509 V 34 w(ro)m(wlist)452 b(52)1419 3622 y(\014ts)p 1546 3622 V 32 w(delete)p 1809 3622 V 34 w(ro)m(wrange)356 b(52)1419 3735 y(\014ts)p 1546 3735 V 32 w(delete)p 1809 3735 V 34 w(ro)m(ws)537 b(52)1419 3848 y(\014ts)p 1546 3848 V 32 w(delete)p 1809 3848 V 34 w(str)610 b(39)1419 3961 y(\014ts)p 1546 3961 V 32 w(enco)s(de)p 1848 3961 V 33 w(c)m(hksum)380 b(61)1419 4074 y(\014ts)p 1546 4074 V 32 w(\014le)p 1694 4074 V 33 w(exists)613 b(94)1419 4187 y(\014ts)p 1546 4187 V 32 w(\014le)p 1694 4187 V 33 w(mo)s(de)618 b(33)1419 4299 y(\014ts)p 1546 4299 V 32 w(\014le)p 1694 4299 V 33 w(name)j(33)1419 4412 y(\014ts)p 1546 4412 V 32 w(\014nd)p 1731 4412 V 32 w(\014rst)p 1921 4412 V 32 w(ro)m(w)463 b(56)1419 4525 y(\014ts)p 1546 4525 V 32 w(\014nd)p 1731 4525 V 32 w(nextk)m(ey)490 b(37)1419 4638 y(\014ts)p 1546 4638 V 32 w(\014nd)p 1731 4638 V 32 w(ro)m(ws)617 b(56)1419 4751 y(\014ts)p 1546 4751 V 32 w(\015ush)p 1767 4751 V 32 w(bu\013er)530 b(94)1419 4864 y(\014ts)p 1546 4864 V 32 w(\015ush)p 1767 4864 V 32 w(\014le)645 b(94)1419 4977 y(\014ts)p 1546 4977 V 32 w(free)p 1722 4977 V 33 w(memory)438 b(103)1419 5090 y(\014ts)p 1546 5090 V 32 w(get)p 1698 5090 V 34 w(acolparms)383 b(110)1419 5203 y(\014ts)p 1546 5203 V 32 w(get)p 1698 5203 V 34 w(b)s(colparms)374 b(110)1419 5316 y(\014ts)p 1546 5316 V 32 w(get)p 1698 5316 V 34 w(c)m(hksum)529 b(60)1419 5429 y(\014ts)p 1546 5429 V 32 w(get)p 1698 5429 V 34 w(col)p 1842 5429 V 34 w(displa)m(y)p 2154 5429 V 33 w(width)145 b(51)1419 5541 y(\014ts)p 1546 5541 V 32 w(get)p 1698 5541 V 34 w(colname)506 b(49)1419 5654 y(\014ts)p 1546 5654 V 32 w(get)p 1698 5654 V 34 w(coln)m(um)543 b(49)2765 2154 y(\014ts)p 2892 2154 V 33 w(get)p 3045 2154 V 34 w(colt)m(yp)s(e)650 b(50)2765 2267 y(\014ts)p 2892 2267 V 33 w(get)p 3045 2267 V 34 w(compression)p 3560 2267 V 32 w(t)m(yp)s(e)247 b(46)2765 2380 y(\014ts)p 2892 2380 V 33 w(get)p 3045 2380 V 34 w(eqcolt)m(yp)s(e)562 b(50)2765 2493 y(\014ts)p 2892 2493 V 33 w(get)p 3045 2493 V 34 w(errstatus)584 b(29)2765 2606 y(\014ts)p 2892 2606 V 33 w(get)p 3045 2606 V 34 w(hdrp)s(os)661 b(97)2765 2719 y(\014ts)p 2892 2719 V 33 w(get)p 3045 2719 V 34 w(hdrspace)584 b(35)2765 2832 y(\014ts)p 2892 2832 V 33 w(get)p 3045 2832 V 34 w(hdu)p 3232 2832 V 31 w(n)m(um)575 b(34)2765 2945 y(\014ts)p 2892 2945 V 33 w(get)p 3045 2945 V 34 w(hdu)p 3232 2945 V 31 w(t)m(yp)s(e)h(34)2765 3057 y(\014ts)p 2892 3057 V 33 w(get)p 3045 3057 V 34 w(hduaddr)598 b(95)2765 3170 y(\014ts)p 2892 3170 V 33 w(get)p 3045 3170 V 34 w(hduaddrll)548 b(95)2765 3283 y(\014ts)p 2892 3283 V 33 w(get)p 3045 3283 V 34 w(img)p 3225 3283 V 33 w(dim)603 b(41)2765 3396 y(\014ts)p 2892 3396 V 33 w(get)p 3045 3396 V 34 w(img)p 3225 3396 V 33 w(equivt)m(yp)s(e)369 b(40)2765 3509 y(\014ts)p 2892 3509 V 33 w(get)p 3045 3509 V 34 w(img)p 3225 3509 V 33 w(param)502 b(41)2765 3622 y(\014ts)p 2892 3622 V 33 w(get)p 3045 3622 V 34 w(img)p 3225 3622 V 33 w(size)614 b(41)2765 3735 y(\014ts)p 2892 3735 V 33 w(get)p 3045 3735 V 34 w(img)p 3225 3735 V 33 w(t)m(yp)s(e)581 b(40)2765 3848 y(\014ts)p 2892 3848 V 33 w(get)p 3045 3848 V 34 w(in)m(tt)m(yp)s(e)652 b(65)2765 3961 y(\014ts)p 2892 3961 V 33 w(get)p 3045 3961 V 34 w(k)m(eyclass)619 b(65)2765 4074 y(\014ts)p 2892 4074 V 33 w(get)p 3045 4074 V 34 w(k)m(eyname)589 b(64)2765 4187 y(\014ts)p 2892 4187 V 33 w(get)p 3045 4187 V 34 w(k)m(eyt)m(yp)s(e)627 b(64)2765 4299 y(\014ts)p 2892 4299 V 33 w(get)p 3045 4299 V 34 w(noise)p 3276 4299 V 33 w(bits)557 b(46)2765 4412 y(\014ts)p 2892 4412 V 33 w(get)p 3045 4412 V 34 w(n)m(um)p 3254 4412 V 32 w(cols)581 b(49)2765 4525 y(\014ts)p 2892 4525 V 33 w(get)p 3045 4525 V 34 w(n)m(um)p 3254 4525 V 32 w(groups)463 b(89)2765 4638 y(\014ts)p 2892 4638 V 33 w(get)p 3045 4638 V 34 w(n)m(um)p 3254 4638 V 32 w(hdus)538 b(34)2765 4751 y(\014ts)p 2892 4751 V 33 w(get)p 3045 4751 V 34 w(n)m(um)p 3254 4751 V 32 w(mem)m(b)s(ers)372 b(88)2765 4864 y(\014ts)p 2892 4864 V 33 w(get)p 3045 4864 V 34 w(n)m(um)p 3254 4864 V 32 w(ro)m(ws)547 b(49)2765 4977 y(\014ts)p 2892 4977 V 33 w(get)p 3045 4977 V 34 w(ro)m(wsize)603 b(111)2765 5090 y(\014ts)p 2892 5090 V 33 w(get)p 3045 5090 V 34 w(system)p 3350 5090 V 33 w(time)454 b(61)2765 5203 y(\014ts)p 2892 5203 V 33 w(get)p 3045 5203 V 34 w(tile)p 3204 5203 V 34 w(dim)623 b(46)2765 5316 y(\014ts)p 2892 5316 V 33 w(get)p 3045 5316 V 34 w(tb)s(col)735 b(66)2765 5429 y(\014ts)p 2892 5429 V 33 w(get)p 3045 5429 V 34 w(v)m(ersion)656 b(62)2765 5541 y(\014ts)p 2892 5541 V 33 w(hdr2str)651 b(37,)32 b(82)2765 5654 y(\014ts)p 2892 5654 V 33 w(insert)p 3148 5654 V 32 w(atbl)677 b(96)1882 5942 y(165)p eop end %%Page: 166 174 TeXDict begin 166 173 bop 0 299 a Fj(166)2084 b Fh(APPENDIX)31 b(A.)61 b(INDEX)31 b(OF)f(R)m(OUTINES)50 543 y Fj(\014ts)p 177 543 28 4 v 32 w(insert)p 432 543 V 33 w(btbl)541 b(96)50 656 y(\014ts)p 177 656 V 32 w(insert)p 432 656 V 33 w(col)593 b(52)50 769 y(\014ts)p 177 769 V 32 w(insert)p 432 769 V 33 w(cols)557 b(52)50 882 y(\014ts)p 177 882 V 32 w(insert)p 432 882 V 33 w(group)475 b(86)50 995 y(\014ts)p 177 995 V 32 w(insert)p 432 995 V 33 w(img)557 b(95)50 1107 y(\014ts)p 177 1107 V 32 w(insert)p 432 1107 V 33 w(k)m(ey)p 598 1107 V 34 w(n)m(ull)342 b(102)50 1220 y(\014ts)p 177 1220 V 32 w(insert)p 432 1220 V 33 w(k)m(ey)p 598 1220 V 34 w(TYP)295 b(102)50 1333 y(\014ts)p 177 1333 V 32 w(insert)p 432 1333 V 33 w(record)410 b(102)50 1446 y(\014ts)p 177 1446 V 32 w(insert)p 432 1446 V 33 w(ro)m(ws)523 b(52)50 1559 y(\014ts)p 177 1559 V 32 w(is)p 270 1559 V 33 w(reen)m(tran)m(t)502 b(71)50 1672 y(\014ts)p 177 1672 V 32 w(iterate)p 465 1672 V 35 w(data)492 b(79)50 1785 y(\014ts)p 177 1785 V 32 w(mak)m(e)p 415 1785 V 34 w(hist)572 b(59)50 1898 y(\014ts)p 177 1898 V 32 w(mak)m(e)p 415 1898 V 34 w(k)m(eyn)535 b(64)50 2011 y(\014ts)p 177 2011 V 32 w(mak)m(e)p 415 2011 V 34 w(nk)m(ey)g(64)50 2124 y(\014ts)p 177 2124 V 32 w(merge)p 446 2124 V 34 w(groups)424 b(87)50 2237 y(\014ts)p 177 2237 V 32 w(mo)s(dify)p 485 2237 V 32 w(card)434 b(104)50 2349 y(\014ts)p 177 2349 V 32 w(mo)s(dify)p 485 2349 V 32 w(commen)m(t)291 b(39)50 2462 y(\014ts)p 177 2462 V 32 w(mo)s(dify)p 485 2462 V 32 w(k)m(ey)p 650 2462 V 34 w(n)m(ull)f(105)50 2575 y(\014ts)p 177 2575 V 32 w(mo)s(dify)p 485 2575 V 32 w(k)m(ey)p 650 2575 V 34 w(TYP)243 b(104)50 2688 y(\014ts)p 177 2688 V 32 w(mo)s(dify)p 485 2688 V 32 w(name)439 b(39)50 2801 y(\014ts)p 177 2801 V 32 w(mo)s(dify)p 485 2801 V 32 w(record)358 b(104)50 2914 y(\014ts)p 177 2914 V 32 w(mo)s(dify)p 485 2914 V 32 w(v)m(ector)p 758 2914 V 35 w(len)259 b(53)50 3027 y(\014ts)p 177 3027 V 32 w(mo)m(v)-5 b(abs)p 502 3027 V 33 w(hdu)480 b(33)50 3140 y(\014ts)p 177 3140 V 32 w(mo)m(vnam)p 547 3140 V 33 w(hdu)435 b(33)50 3253 y(\014ts)p 177 3253 V 32 w(mo)m(vrel)p 476 3253 V 34 w(hdu)505 b(33)50 3366 y(\014ts)p 177 3366 V 32 w(n)m(ull)p 358 3366 V 33 w(c)m(hec)m(k)564 b(64)50 3479 y(\014ts)p 177 3479 V 32 w(op)s(en)p 399 3479 V 32 w(data)d(30)50 3591 y(\014ts)p 177 3591 V 32 w(op)s(en)p 399 3591 V 32 w(disk\014le)461 b(30)50 3704 y(\014ts)p 177 3704 V 32 w(op)s(en)p 399 3704 V 32 w(\014le)621 b(30)50 3817 y(\014ts)p 177 3817 V 32 w(op)s(en)p 399 3817 V 32 w(image)506 b(30)50 3930 y(\014ts)p 177 3930 V 32 w(op)s(en)p 399 3930 V 32 w(table)541 b(30)50 4043 y(\014ts)p 177 4043 V 32 w(op)s(en)p 399 4043 V 32 w(group)509 b(88)50 4156 y(\014ts)p 177 4156 V 32 w(op)s(en)p 399 4156 V 32 w(mem)m(b)s(er)418 b(89)50 4269 y(\014ts)p 177 4269 V 32 w(op)s(en)p 399 4269 V 32 w(mem\014le)429 b(91)50 4382 y(\014ts)p 177 4382 V 32 w(parse)p 417 4382 V 33 w(extn)m(um)420 b(93)50 4495 y(\014ts)p 177 4495 V 32 w(parse)p 417 4495 V 33 w(input)p 663 4495 V 32 w(\014lename)145 b(93)50 4608 y(\014ts)p 177 4608 V 32 w(parse)p 417 4608 V 33 w(input)p 663 4608 V 32 w(url)361 b(93)50 4721 y(\014ts)p 177 4721 V 32 w(parse)p 417 4721 V 33 w(range)501 b(71)50 4833 y(\014ts)p 177 4833 V 32 w(parse)p 417 4833 V 33 w(ro)s(otname)342 b(94)50 4946 y(\014ts)p 177 4946 V 32 w(parse)p 417 4946 V 33 w(template)371 b(67)50 5059 y(\014ts)p 177 5059 V 32 w(parse)p 417 5059 V 33 w(v)-5 b(alue)514 b(64)50 5172 y(\014ts)p 177 5172 V 32 w(pix)p 333 5172 V 33 w(to)p 446 5172 V 33 w(w)m(orld)469 b(83)50 5285 y(\014ts)p 177 5285 V 32 w(read)p 381 5285 V 33 w(2d)p 510 5285 V 33 w(TYP)384 b(110)50 5398 y(\014ts)p 177 5398 V 32 w(read)p 381 5398 V 33 w(3d)p 510 5398 V 33 w(TYP)g(110)50 5511 y(\014ts)p 177 5511 V 32 w(read)p 381 5511 V 33 w(atblhdr)460 b(99)50 5624 y(\014ts)p 177 5624 V 32 w(read)p 381 5624 V 33 w(btblhdr)454 b(99)50 5737 y(\014ts)p 177 5737 V 32 w(read)p 381 5737 V 33 w(card)582 b(36)50 5850 y(\014ts)p 177 5850 V 32 w(read)p 381 5850 V 33 w(col)644 b(55)1374 543 y(\014ts)p 1501 543 V 32 w(read)p 1705 543 V 33 w(col)p 1848 543 V 34 w(bit)p 1993 543 V 639 w(116)1374 656 y(\014ts)p 1501 656 V 32 w(read)p 1705 656 V 33 w(col)p 1848 656 V 34 w(TYP)554 b(114)1374 769 y(\014ts)p 1501 769 V 32 w(read)p 1705 769 V 33 w(coln)m(ull)680 b(55)1374 882 y(\014ts)p 1501 882 V 32 w(read)p 1705 882 V 33 w(coln)m(ull)p 1997 882 V 34 w(TYP)405 b(114)1374 995 y(\014ts)p 1501 995 V 32 w(read)p 1705 995 V 33 w(descript)580 b(116)1374 1107 y(\014ts)p 1501 1107 V 32 w(read)p 1705 1107 V 33 w(descripts)544 b(116)1374 1220 y(\014ts)p 1501 1220 V 32 w(read)p 1705 1220 V 33 w(errmsg)670 b(30)1374 1333 y(\014ts)p 1501 1333 V 32 w(read)p 1705 1333 V 33 w(ext)816 b(96)1374 1446 y(\014ts)p 1501 1446 V 32 w(read)p 1705 1446 V 33 w(grppar)p 2002 1446 V 32 w(TYP)402 b(109)1374 1559 y(\014ts)p 1501 1559 V 32 w(read)p 1705 1559 V 33 w(img)748 b(109)1374 1672 y(\014ts)p 1501 1672 V 32 w(read)p 1705 1672 V 33 w(img)p 1884 1672 V 33 w(co)s(ord)540 b(83)1374 1785 y(\014ts)p 1501 1785 V 32 w(read)p 1705 1785 V 33 w(img)p 1884 1785 V 33 w(TYP)519 b(109)1374 1898 y(\014ts)p 1501 1898 V 32 w(read)p 1705 1898 V 33 w(imghdr)655 b(99)1374 2011 y(\014ts)p 1501 2011 V 32 w(read)p 1705 2011 V 33 w(imgn)m(ull)599 b(109)1374 2124 y(\014ts)p 1501 2124 V 32 w(read)p 1705 2124 V 33 w(imgn)m(ull)p 2033 2124 V 33 w(TYP)370 b(109)1374 2237 y(\014ts)p 1501 2237 V 32 w(read)p 1705 2237 V 33 w(k)m(ey)806 b(36)1374 2349 y(\014ts)p 1501 2349 V 32 w(read)p 1705 2349 V 33 w(k)m(ey)p 1871 2349 V 33 w(longstr)455 b(103)1374 2462 y(\014ts)p 1501 2462 V 32 w(read)p 1705 2462 V 33 w(k)m(ey)p 1871 2462 V 33 w(triple)516 b(104)1374 2575 y(\014ts)p 1501 2575 V 32 w(read)p 1705 2575 V 33 w(k)m(ey)p 1871 2575 V 33 w(unit)611 b(37)1374 2688 y(\014ts)p 1501 2688 V 32 w(read)p 1705 2688 V 33 w(k)m(ey)p 1871 2688 V 33 w(TYP)532 b(103)1374 2801 y(\014ts)p 1501 2801 V 32 w(read)p 1705 2801 V 33 w(k)m(eyn)755 b(36)1374 2914 y(\014ts)p 1501 2914 V 32 w(read)p 1705 2914 V 33 w(k)m(eys)p 1907 2914 V 33 w(TYP)496 b(103)1374 3027 y(\014ts)p 1501 3027 V 32 w(read)p 1705 3027 V 33 w(k)m(eyw)m(ord)611 b(36)1374 3140 y(\014ts)p 1501 3140 V 32 w(read)p 1705 3140 V 33 w(pix)815 b(43)1374 3253 y(\014ts)p 1501 3253 V 32 w(read)p 1705 3253 V 33 w(pixn)m(ull)666 b(43)1374 3366 y(\014ts)p 1501 3366 V 32 w(read)p 1705 3366 V 33 w(record)691 b(36)1374 3479 y(\014ts)p 1501 3479 V 32 w(read)p 1705 3479 V 33 w(str)832 b(36)1374 3591 y(\014ts)p 1501 3591 V 32 w(read)p 1705 3591 V 33 w(subset)p 1987 3591 V 32 w(TYP)250 b(110)32 b(115)1374 3704 y(\014ts)p 1501 3704 V 32 w(read)p 1705 3704 V 33 w(subsetn)m(ull)p 2136 3704 V 32 w(TYP)101 b(110)32 b(115)1374 3817 y(\014ts)p 1501 3817 V 32 w(read)p 1705 3817 V 33 w(tbl)p 1849 3817 V 33 w(co)s(ord)575 b(83)1374 3930 y(\014ts)p 1501 3930 V 32 w(read)p 1705 3930 V 33 w(tblb)m(ytes)h(112)1374 4043 y(\014ts)p 1501 4043 V 32 w(read)p 1705 4043 V 33 w(tdim)752 b(51)1374 4156 y(\014ts)p 1501 4156 V 32 w(read)p 1705 4156 V 33 w(w)m(cstab)669 b(82)1374 4269 y(\014ts)p 1501 4269 V 32 w(rebin)p 1736 4269 V 32 w(w)m(cs)770 b(59)1374 4382 y(\014ts)p 1501 4382 V 32 w(remo)m(v)m(e)p 1812 4382 V 34 w(group)603 b(87)1374 4495 y(\014ts)p 1501 4495 V 32 w(remo)m(v)m(e)p 1812 4495 V 34 w(mem)m(b)s(er)512 b(90)1374 4608 y(\014ts)p 1501 4608 V 32 w(reop)s(en)p 1799 4608 V 32 w(\014le)730 b(92)1374 4721 y(\014ts)p 1501 4721 V 32 w(rep)s(ort)p 1779 4721 V 32 w(error)673 b(30)1374 4833 y(\014ts)p 1501 4833 V 32 w(resize)p 1750 4833 V 34 w(img)747 b(96)1374 4946 y(\014ts)p 1501 4946 V 32 w(rms)p 1681 4946 V 32 w(\015oat)788 b(71)1374 5059 y(\014ts)p 1501 5059 V 32 w(rms)p 1681 5059 V 32 w(short)761 b(71)1374 5172 y(\014ts)p 1501 5172 V 32 w(select)p 1749 5172 V 35 w(ro)m(ws)713 b(56)1374 5285 y(\014ts)p 1501 5285 V 32 w(set)p 1644 5285 V 34 w(atbln)m(ull)649 b(106)1374 5398 y(\014ts)p 1501 5398 V 32 w(set)p 1644 5398 V 34 w(bscale)717 b(106)1374 5511 y(\014ts)p 1501 5511 V 32 w(set)p 1644 5511 V 34 w(btbln)m(ull)643 b(106)1374 5624 y(\014ts)p 1501 5624 V 32 w(set)p 1644 5624 V 34 w(compression)p 2159 5624 V 32 w(t)m(yp)s(e)312 b(46)1374 5737 y(\014ts)p 1501 5737 V 32 w(set)p 1644 5737 V 34 w(hdrsize)720 b(97)1374 5850 y(\014ts)p 1501 5850 V 32 w(set)p 1644 5850 V 34 w(hdustruc)648 b(97)2883 543 y(\014ts)p 3010 543 V 33 w(set)p 3154 543 V 33 w(imgn)m(ull)408 b(106)2883 656 y(\014ts)p 3010 656 V 33 w(set)p 3154 656 V 33 w(noise)p 3384 656 V 33 w(bits)372 b(46)2883 769 y(\014ts)p 3010 769 V 33 w(set)p 3154 769 V 33 w(tile)p 3312 769 V 34 w(dim)438 b(46)2883 882 y(\014ts)p 3010 882 V 33 w(set)p 3154 882 V 33 w(tscale)482 b(106)2883 995 y(\014ts)p 3010 995 V 33 w(split)p 3215 995 V 32 w(names)441 b(63)2883 1107 y(\014ts)p 3010 1107 V 33 w(str2date)570 b(61)2883 1220 y(\014ts)p 3010 1220 V 33 w(str2time)565 b(61)2883 1333 y(\014ts)p 3010 1333 V 33 w(test)p 3189 1333 V 33 w(expr)539 b(57)2883 1446 y(\014ts)p 3010 1446 V 33 w(test)p 3189 1446 V 33 w(heap)481 b(111)2883 1559 y(\014ts)p 3010 1559 V 33 w(test)p 3189 1559 V 33 w(k)m(eyw)m(ord)386 b(63)2883 1672 y(\014ts)p 3010 1672 V 33 w(test)p 3189 1672 V 33 w(record)466 b(63)2883 1785 y(\014ts)p 3010 1785 V 33 w(time2str)565 b(61)2883 1898 y(\014ts)p 3010 1898 V 33 w(transfer)p 3350 1898 V 32 w(mem)m(b)s(er)235 b(89)2883 2011 y(\014ts)p 3010 2011 V 33 w(translate)p 3391 2011 V 33 w(k)m(eyw)m(ord)184 b(69)2883 2124 y(\014ts)p 3010 2124 V 33 w(up)s(date)p 3319 2124 V 31 w(card)414 b(39)2883 2237 y(\014ts)p 3010 2237 V 33 w(up)s(date)p 3319 2237 V 31 w(c)m(hksum)287 b(60)2883 2349 y(\014ts)p 3010 2349 V 33 w(up)s(date)p 3319 2349 V 31 w(k)m(ey)453 b(38)2883 2462 y(\014ts)p 3010 2462 V 33 w(up)s(date)p 3319 2462 V 31 w(k)m(ey)p 3483 2462 V 34 w(longstr)100 b(105)2883 2575 y(\014ts)p 3010 2575 V 33 w(up)s(date)p 3319 2575 V 31 w(k)m(ey)p 3483 2575 V 34 w(n)m(ull)270 b(38)2883 2688 y(\014ts)p 3010 2688 V 33 w(up)s(date)p 3319 2688 V 31 w(k)m(ey)p 3483 2688 V 34 w(TYP)177 b(105)2883 2801 y(\014ts)p 3010 2801 V 33 w(upp)s(ercase)500 b(63)2883 2914 y(\014ts)p 3010 2914 V 33 w(url)p 3155 2914 V 32 w(t)m(yp)s(e)575 b(33)2883 3027 y(\014ts)p 3010 3027 V 33 w(v)m(erify)p 3265 3027 V 33 w(c)m(hksum)339 b(60)2883 3140 y(\014ts)p 3010 3140 V 33 w(v)m(erify)p 3265 3140 V 33 w(group)410 b(88)2883 3253 y(\014ts)p 3010 3253 V 33 w(w)m(orld)p 3263 3253 V 32 w(to)p 3375 3253 V 34 w(pix)403 b(83)2883 3366 y(\014ts)p 3010 3366 V 33 w(write)p 3245 3366 V 33 w(2d)p 3374 3366 V 32 w(TYP)288 b(109)2883 3479 y(\014ts)p 3010 3479 V 33 w(write)p 3245 3479 V 33 w(3d)p 3374 3479 V 32 w(TYP)g(109)2883 3591 y(\014ts)p 3010 3591 V 33 w(write)p 3245 3591 V 33 w(atblhdr)364 b(98)2883 3704 y(\014ts)p 3010 3704 V 33 w(write)p 3245 3704 V 33 w(btblhdr)358 b(99)2883 3817 y(\014ts)p 3010 3817 V 33 w(write)p 3245 3817 V 33 w(c)m(hksum)h(60)2883 3930 y(\014ts)p 3010 3930 V 33 w(write)p 3245 3930 V 33 w(col)548 b(54)2883 4043 y(\014ts)p 3010 4043 V 33 w(write)p 3245 4043 V 33 w(col)p 3388 4043 V 33 w(bit)358 b(113)2883 4156 y(\014ts)p 3010 4156 V 33 w(write)p 3245 4156 V 33 w(col)p 3388 4156 V 33 w(TYP)273 b(112)2883 4269 y(\014ts)p 3010 4269 V 33 w(write)p 3245 4269 V 33 w(col)p 3388 4269 V 33 w(n)m(ull)366 b(54)2883 4382 y(\014ts)p 3010 4382 V 33 w(write)p 3245 4382 V 33 w(coln)m(ull)399 b(54)2883 4495 y(\014ts)p 3010 4495 V 33 w(write)p 3245 4495 V 33 w(coln)m(ull)p 3537 4495 V 33 w(TYP)124 b(112)2883 4608 y(\014ts)p 3010 4608 V 33 w(write)p 3245 4608 V 33 w(commen)m(t)298 b(38)2883 4721 y(\014ts)p 3010 4721 V 33 w(write)p 3245 4721 V 33 w(date)487 b(38)2883 4833 y(\014ts)p 3010 4833 V 33 w(write)p 3245 4833 V 33 w(descript)298 b(113)2883 4946 y(\014ts)p 3010 4946 V 33 w(write)p 3245 4946 V 33 w(errmark)341 b(30)2883 5059 y(\014ts)p 3010 5059 V 33 w(write)p 3245 5059 V 33 w(errmsg)389 b(62)2883 5172 y(\014ts)p 3010 5172 V 33 w(write)p 3245 5172 V 33 w(ext)535 b(96)2883 5285 y(\014ts)p 3010 5285 V 33 w(write)p 3245 5285 V 33 w(exthdr)397 b(98)2883 5398 y(\014ts)p 3010 5398 V 33 w(write)p 3245 5398 V 33 w(grphdr)388 b(98)2883 5511 y(\014ts)p 3010 5511 V 33 w(write)p 3245 5511 V 33 w(grppar)p 3542 5511 V 31 w(TYP)121 b(108)2883 5624 y(\014ts)p 3010 5624 V 33 w(write)p 3245 5624 V 33 w(hdu)505 b(34)2883 5737 y(\014ts)p 3010 5737 V 33 w(write)p 3245 5737 V 33 w(history)382 b(38)2883 5850 y(\014ts)p 3010 5850 V 33 w(write)p 3245 5850 V 33 w(img)466 b(108)p eop end %%Page: 167 175 TeXDict begin 167 174 bop 3764 299 a Fj(167)50 543 y(\014ts)p 177 543 28 4 v 32 w(write)p 411 543 V 33 w(img)p 590 543 V 33 w(n)m(ull)300 b(108)50 656 y(\014ts)p 177 656 V 32 w(write)p 411 656 V 33 w(img)p 590 656 V 33 w(TYP)253 b(108)50 769 y(\014ts)p 177 769 V 32 w(write)p 411 769 V 33 w(imghdr)389 b(98)50 882 y(\014ts)p 177 882 V 32 w(write)p 411 882 V 33 w(imgn)m(ull)333 b(108)50 995 y(\014ts)p 177 995 V 32 w(write)p 411 995 V 33 w(imgn)m(ull)p 739 995 V 33 w(TYP)104 b(108)50 1107 y(\014ts)p 177 1107 V 32 w(write)p 411 1107 V 33 w(k)m(ey)540 b(38)50 1220 y(\014ts)p 177 1220 V 32 w(write)p 411 1220 V 33 w(k)m(ey)p 577 1220 V 34 w(longstr)188 b(100)50 1333 y(\014ts)p 177 1333 V 32 w(write)p 411 1333 V 33 w(k)m(ey)p 577 1333 V 34 w(longw)m(arn)100 b(100)50 1446 y(\014ts)p 177 1446 V 32 w(write)p 411 1446 V 33 w(k)m(ey)p 577 1446 V 34 w(n)m(ull)357 b(38)50 1559 y(\014ts)p 177 1559 V 32 w(write)p 411 1559 V 33 w(k)m(ey)p 577 1559 V 34 w(template)114 b(101)50 1672 y(\014ts)p 177 1672 V 32 w(write)p 411 1672 V 33 w(k)m(ey)p 577 1672 V 34 w(triple)249 b(101)50 1785 y(\014ts)p 177 1785 V 32 w(write)p 411 1785 V 33 w(k)m(ey)p 577 1785 V 34 w(unit)344 b(39)50 1898 y(\014ts)p 177 1898 V 32 w(write)p 411 1898 V 33 w(k)m(ey)p 577 1898 V 34 w(TYP)265 b(100)50 2011 y(\014ts)p 177 2011 V 32 w(write)p 411 2011 V 33 w(k)m(eys)p 613 2011 V 34 w(TYP)229 b(101)50 2124 y(\014ts)p 177 2124 V 32 w(write)p 411 2124 V 33 w(k)m(eys)p 613 2124 V 34 w(histo)278 b(59)50 2237 y(\014ts)p 177 2237 V 32 w(write)p 411 2237 V 33 w(n)m(ull)p 593 2237 V 33 w(img)345 b(43)50 2349 y(\014ts)p 177 2349 V 32 w(write)p 411 2349 V 33 w(n)m(ullro)m(ws)f(54)50 2462 y(\014ts)p 177 2462 V 32 w(write)p 411 2462 V 33 w(pix)549 b(42)50 2575 y(\014ts)p 177 2575 V 32 w(write)p 411 2575 V 33 w(pixn)m(ull)400 b(42)50 2688 y(\014ts)p 177 2688 V 32 w(write)p 411 2688 V 33 w(record)425 b(39)50 2801 y(\014ts)p 177 2801 V 32 w(write)p 411 2801 V 33 w(subset)f(42)50 2914 y(\014ts)p 177 2914 V 32 w(write)p 411 2914 V 33 w(subset)p 693 2914 V 32 w(TYP)151 b(109)50 3027 y(\014ts)p 177 3027 V 32 w(write)p 411 3027 V 33 w(tblb)m(ytes)310 b(112)50 3140 y(\014ts)p 177 3140 V 32 w(write)p 411 3140 V 33 w(tdim)486 b(51)50 3253 y(\014ts)p 177 3253 V 32 w(write)p 411 3253 V 33 w(theap)406 b(111)p eop end %%Page: 168 176 TeXDict begin 168 175 bop 0 299 a Fj(168)2084 b Fh(APPENDIX)31 b(A.)61 b(INDEX)31 b(OF)f(R)m(OUTINES)50 543 y Fj(\013asfm)276 b(66)50 656 y(\013bnfm)255 b(66)50 769 y(\013calc)311 b(57)50 882 y(\013calc)p 258 882 28 4 v 34 w(rng)145 b(57)50 995 y(\013clos)315 b(33)50 1107 y(\013cmph)197 b(111)50 1220 y(\013cmps)258 b(63)50 1333 y(\013cmrk)j(30)50 1446 y(\013cmsg)j(30)50 1559 y(\013cop)m(y)280 b(34)50 1672 y(\013cp)s(cl)302 b(53)50 1785 y(\013cp)s(dt)281 b(96)50 1898 y(\013cp\015)319 b(34)50 2011 y(\013cphd)268 b(34)50 2124 y(\013cpimg)224 b(44)50 2237 y(\013cpky)k(101)50 2349 y(\013cprw)268 b(53)50 2462 y(\013crhd)283 b(95)50 2575 y(\013crim)h(41)50 2688 y(\013cro)m(w)277 b(56)50 2801 y(\013crtb)299 b(49)50 2914 y(\013dcol)h(52)50 3027 y(\013delt)310 b(33)50 3140 y(\013dhdu)257 b(35)50 3253 y(\013dk)m(ey)277 b(39)50 3366 y(\013dkinit)226 b(32)50 3479 y(\013dk)m(op)s(en)175 b(30)50 3591 y(\013dopn)263 b(30)50 3704 y(\013drec)294 b(39)50 3817 y(\013dro)m(w)266 b(52)50 3930 y(\013drrg)293 b(52)50 4043 y(\013drws)272 b(52)50 4156 y(\013dstr)303 b(39)50 4269 y(\013dsum)247 b(61)50 4382 y(\013dt2s)294 b(61)50 4495 y(\013dtdm)248 b(51)50 4608 y(\013dt)m(yp)279 b(64)50 4721 y(\013eqt)m(y)293 b(50)50 4833 y(\013esum)258 b(61)50 4946 y(\013exest)k(94)50 5059 y(\013extn)287 b(93)50 5172 y(\013\013rw)306 b(56)50 5285 y(\013\015md)283 b(33)50 5398 y(\013\015nm)g(33)50 5511 y(\013\015sh)323 b(94)50 5624 y(\013\015us)g(94)50 5737 y(\013free)271 b(103)50 5850 y(\013fro)m(w)289 b(56)785 543 y(\013g2d)p 984 543 V 191 w(110)785 656 y(\013g3d)p 984 656 V 191 w(110)785 769 y(\013gab)s(c)193 b(66)785 882 y(\013gacl)177 b(110)785 995 y(\013gb)s(cl)168 b(110)785 1107 y(\013gcdw)175 b(51)785 1220 y(\013gcf)264 b(55)785 1333 y(\013gcf)p 956 1333 V 219 w(114)785 1446 y(\013gc)m(ks)211 b(60)785 1559 y(\013gcnn)190 b(49)785 1672 y(\013gcno)196 b(49)785 1785 y(\013gcrd)205 b(36)785 1898 y(\013gcv)244 b(55)785 2011 y(\013gcv)p 976 2011 V 199 w(114)785 2124 y(\013gcx)199 b(116)785 2237 y(\013gdes)160 b(116)785 2349 y(\013gdess)124 b(116)785 2462 y(\013gerr)220 b(29)785 2575 y(\013gextn)158 b(96)785 2688 y(\013ggp)p 984 2688 V 191 w(109)785 2801 y(\013ghad)185 b(95)785 2914 y(\013gh)m(bn)d(99) 785 3027 y(\013ghdn)d(34)785 3140 y(\013ghdt)195 b(34)785 3253 y(\013ghpr)f(99)785 3366 y(\013ghps)g(97)785 3479 y(\013ghsp)g(35)785 3591 y(\013gh)m(tb)k(99)785 3704 y(\013gics)231 b(83)785 3817 y(\013gidm)180 b(41)785 3930 y(\013gidt)221 b(40)785 4043 y(\013giet)232 b(40)785 4156 y(\013gipr)220 b(41)785 4269 y(\013gisz)231 b(41)785 4382 y(\013gk)m(cl)222 b(65)785 4495 y(\013gk)m(ey)199 b(36)785 4608 y(\013gkls)178 b(103)785 4721 y(\013gkn)p 987 4721 V 188 w(103)785 4833 y(\013gknm)157 b(64)785 4946 y(\013gky)236 b(36)785 5059 y(\013gkyn)185 b(36)785 5172 y(\013gkyt)156 b(104)785 5285 y(\013gky)p 984 5285 V 191 w(103)785 5398 y(\013gmcp)165 b(89)785 5511 y(\013gmng)160 b(89)785 5624 y(\013gmop)g(89)785 5737 y(\013gmrm)144 b(90)785 5850 y(\013gmsg)175 b(30)1436 543 y(\013gm)m(tf)368 b(89)1436 656 y(\013gncl)388 b(49)1436 769 y(\013gnrw)351 b(49)1436 882 y(\013gnxk)357 b(37)1436 995 y(\013gpf)380 b(109)1436 1107 y(\013gpf)p 1618 1107 V 380 w(109)1436 1220 y(\013gp)m(v)363 b(109)1436 1333 y(\013gp)m(v)p 1635 1333 V 363 w(109)1436 1446 y(\013gp)m(xv)d(43)1436 1559 y(\013gp)m(xf)380 b(43)1436 1672 y(\013grec)388 b(36)1436 1785 y(\013grsz)347 b(111)1436 1898 y(\013gsdt)382 b(61)1436 2011 y(\013gsf)p 1603 2011 V 228 w(110)32 b(115)1436 2124 y(\013gstm)357 b(61)1436 2237 y(\013gstr)397 b(36)1436 2349 y(\013gsv)p 1623 2349 V 208 w(110)32 b(115)1436 2462 y(\013gtam)348 b(88)1436 2575 y(\013gtbb)322 b(112)1436 2688 y(\013gtc)m(h)381 b(86)1436 2801 y(\013gtcl)404 b(50)1436 2914 y(\013gtcm)353 b(87)1436 3027 y(\013gtcp)378 b(87)1436 3140 y(\013gtcr)393 b(86)1436 3253 y(\013gtcs)g(83)1436 3366 y(\013gtdm)342 b(51)1436 3479 y(\013gthd)367 b(67)1436 3591 y(\013gtis)408 b(86)1436 3704 y(\013gtmg)348 b(87)1436 3817 y(\013gtnm)342 b(88)1436 3930 y(\013gtop)373 b(88)1436 4043 y(\013gtrm)357 b(87)1436 4156 y(\013gtvf)393 b(88)1436 4269 y(\013gun)m(t)370 b(37)1436 4382 y(\013hdef)379 b(97)1436 4495 y(\016bin)399 b(96)1436 4608 y(\016cls)425 b(52)1436 4721 y(\016col)416 b(52)1436 4833 y(\016\014le)410 b(93)1436 4946 y(\016img)380 b(95)1436 5059 y(\016kls)372 b(102)1436 5172 y(\016kyu)334 b(102)1436 5285 y(\016ky)p 1613 5285 V 385 w(102)1436 5398 y(\016mem)g(92)1436 5511 y(\016nit)415 b(32)1436 5624 y(\016n)m(tt)m(yp)312 b(65)1436 5737 y(\016opn)379 b(30)1436 5850 y(\016rec)365 b(102)2259 543 y(\016ro)m(w)226 b(52)2259 656 y(\016tab)239 b(96)2259 769 y(\016ter)259 b(79)2259 882 y(\016url)f(93)2259 995 y(\013k)m(eyn)209 b(64)2259 1107 y(\013mahd)170 b(33)2259 1220 y(\013mcom)156 b(39)2259 1333 y(\013mcrd)144 b(104)2259 1446 y(\013mkls)162 b(104)2259 1559 y(\013mkyu)124 b(105)2259 1672 y(\013mky)p 2489 1672 V 175 w(104)2259 1785 y(\013mnam)145 b(39)2259 1898 y(\013mnhd)164 b(33)2259 2011 y(\013mrec)155 b(104)2259 2124 y(\013mrhd)179 b(33)2259 2237 y(\013m)m(v)m(ec)195 b(53)2259 2349 y(\013nc)m(hk)206 b(64)2259 2462 y(\013nk)m(ey)j(64)2259 2575 y(\013omem)156 b(91)2259 2688 y(\013op)s(en)203 b(30)2259 2801 y(\013p2d)p 2464 2801 V 200 w(109)2259 2914 y(\013p3d)p 2464 2914 V 200 w(109)2259 3027 y(\013p)s(c)m(ks)218 b(60)2259 3140 y(\013p)s(cl)274 b(54)2259 3253 y(\013p)s(cls)192 b(112)2259 3366 y(\013p)s(cl)p 2436 3366 V 228 w(113)2259 3479 y(\013p)s(clu)223 b(54)2259 3591 y(\013p)s(cn)248 b(54)2259 3704 y(\013p)s(cn)p 2462 3704 V 202 w(112)2259 3817 y(\013p)s(com)178 b(38)2259 3930 y(\013p)s(dat)208 b(38)2259 4043 y(\013p)s(des)166 b(113)2259 4156 y(\013p)s(extn)f(96) 2259 4269 y(\013pgp)p 2464 4269 V 200 w(108)2259 4382 y(\013ph)m(bn)192 b(99)2259 4495 y(\013phext)168 b(98)2259 4608 y(\013phis)230 b(38)2259 4721 y(\013phpr)204 b(98)2259 4833 y(\013phps)g(98)2259 4946 y(\013ph)m(tb)k(98)2259 5059 y(\013pkls)187 b(100)2259 5172 y(\013pkn)p 2467 5172 V 197 w(101)2259 5285 y(\013pktp)162 b(101)2259 5398 y(\013pky)246 b(38)2259 5511 y(\013pkyt)165 b(101)2259 5624 y(\013pkyu)195 b(38)2259 5737 y(\013pky)p 2464 5737 V 200 w(100)2259 5850 y(\013plsw)169 b(100)2926 543 y(\013pmrk)199 b(30)2926 656 y(\013pmsg)j(62)2926 769 y(\013pn)m(ul)190 b(106)2926 882 y(\013ppn)212 b(108)2926 995 y(\013ppn)p 3137 995 V 212 w(108)2926 1107 y(\013ppr)227 b(108)2926 1220 y(\013pprn)221 b(43)2926 1333 y(\013ppru)176 b(108)2926 1446 y(\013ppr)p 3122 1446 V 227 w(108)2926 1559 y(\013pp)m(x)263 b(42)2926 1672 y(\013pp)m(xn)212 b(42)2926 1785 y(\013prec)243 b(39)2926 1898 y(\013prwu)206 b(54)2926 2011 y(\013pscl)213 b(106)2926 2124 y(\013pss)287 b(42)2926 2237 y(\013pss)p 3107 2237 V 242 w(109)2926 2349 y(\013psv)m(c)238 b(64)2926 2462 y(\013ptbb)177 b(112)2926 2575 y(\013ptdm)197 b(51)2926 2688 y(\013pthp)177 b(111)2926 2801 y(\013pun)m(t)225 b(39)2926 2914 y(\013rdef)255 b(97)2926 3027 y(\013reop)s(en)144 b(92)2926 3140 y(\013rprt)252 b(30)2926 3253 y(\013rsim)237 b(96)2926 3366 y(\013rtnm)212 b(94)2926 3479 y(\013rwrg)227 b(71)2926 3591 y(\013s2dt)243 b(61)2926 3704 y(\013s2tm)218 b(61)2926 3817 y(\013sn)m(ul)205 b(106)2926 3930 y(\013sro)m(w)230 b(56)2926 4043 y(\013texp)236 b(57)2926 4156 y(\013thdu)222 b(34)2926 4269 y(\013theap)143 b(111)2926 4382 y(\013tk)m(ey)242 b(63)2926 4495 y(\013tm2s)218 b(61)2926 4608 y(\013tn)m(ul)206 b(106)2926 4721 y(\013topn)228 b(30)2926 4833 y(\013tplt)264 b(92)2926 4946 y(\013trec)259 b(63)2926 5059 y(\013tscl)229 b(106)2926 5172 y(\013ucrd)j(39)2926 5285 y(\013ukls)205 b(105)2926 5398 y(\013uky)263 b(38)2926 5511 y(\013ukyu)212 b(38)2926 5624 y(\013uky)p 3131 5624 V 218 w(105)2926 5737 y(\013up)s(c)m(h)217 b(63)2926 5850 y(\013up)s(c)m(k)j(60)p eop end %%Page: 169 177 TeXDict begin 169 176 bop 3764 299 a Fj(169)50 543 y(\013urlt)205 b(33)50 656 y(\013v)m(c)m(ks)186 b(60)50 769 y(\013v)m(ers)195 b(62)50 882 y(\013wldp)159 b(83)50 995 y(\013wrhdu)97 b(34)50 1107 y(\013xyp)m(x)160 b(83)p eop end %%Page: 170 178 TeXDict begin 170 177 bop 0 299 a Fj(170)2084 b Fh(APPENDIX)31 b(A.)61 b(INDEX)31 b(OF)f(R)m(OUTINES)p eop end %%Page: 171 179 TeXDict begin 171 178 bop 0 1225 a Fg(App)5 b(endix)64 b(B)0 1687 y Fm(P)-6 b(arameter)77 b(De\014nitions)0 2180 y Fe(anynul)142 b(-)47 b(set)g(to)g(TRUE)g(\(=1\))f(if)i(any)e (returned)g(values)g(are)h(undefined,)e(else)i(FALSE)0 2293 y(array)190 b(-)47 b(array)f(of)i(numerical)d(data)h(values)h(to)g (read)f(or)i(write)0 2406 y(ascii)190 b(-)47 b(encoded)f(checksum)f (string)0 2518 y(binspec)94 b(-)47 b(the)g(input)f(table)h(binning)e (specifier)0 2631 y(bitpix)142 b(-)47 b(bits)g(per)g(pixel.)f(The)h (following)e(symbolic)g(mnemonics)h(are)h(predefined:)716 2744 y(BYTE_IMG)141 b(=)i(8)47 b(\(unsigned)f(char\))716 2857 y(SHORT_IMG)93 b(=)i(16)47 b(\(signed)f(short)g(integer\))716 2970 y(LONG_IMG)141 b(=)95 b(32)47 b(\(signed)f(long)h(integer\))716 3083 y(LONGLONG_IMG)d(=)96 b(64)47 b(\(signed)f(long)g(64-bit)g (integer\))716 3196 y(FLOAT_IMG)93 b(=)47 b(-32)g(\(float\))716 3309 y(DOUBLE_IMG)e(=)i(-64)g(\(double\).)525 3422 y(The)g (LONGLONG_IMG)d(type)j(is)g(experimental)e(and)i(is)g(not)g(officially) 525 3535 y(recognized)e(in)i(the)g(FITS)g(Standard)e(document.)525 3648 y(Two)i(additional)e(values,)h(USHORT_IMG)f(and)i(ULONG_IMG)e(are) i(also)f(available)525 3760 y(for)h(creating)e(unsigned)h(integer)g (images.)93 b(These)47 b(are)g(equivalent)e(to)525 3873 y(creating)h(a)h(signed)f(integer)g(image)g(with)h(BZERO)f(offset)g (keyword)g(values)525 3986 y(of)h(32768)g(or)g(2147483648,)d (respectively,)h(which)h(is)h(the)g(convention)e(that)525 4099 y(FITS)i(uses)f(to)h(store)g(unsigned)e(integers.)0 4212 y(card)238 b(-)47 b(header)f(record)g(to)h(be)h(read)e(or)h (written)f(\(80)h(char)g(max,)f(null-terminated\))0 4325 y(casesen)94 b(-)47 b(CASESEN)f(\(=1\))g(for)h(case-sensitive)d(string) i(matching,)g(else)g(CASEINSEN)g(\(=0\))0 4438 y(cmopt)190 b(-)47 b(grouping)f(table)g("compact")f(option)h(parameter.)f(Allowed)h (values)g(are:)525 4551 y(OPT_CMT_MBR)f(and)i(OPT_CMT_MBR_DEL.)0 4664 y(colname)94 b(-)47 b(name)g(of)g(the)g(column)f (\(null-terminated\))0 4777 y(colnum)142 b(-)47 b(column)f(number)g (\(first)g(column)g(=)i(1\))0 4890 y(colspec)94 b(-)47 b(the)g(input)f(file)h(column)f(specification;)e(used)j(to)g(delete,)f (create,)f(or)j(rename)525 5002 y(table)e(columns)0 5115 y(comment)94 b(-)47 b(the)g(keyword)f(comment)g(field)g(\(72)h(char)f (max,)h(null-terminated\))0 5228 y(complm)142 b(-)47 b(should)f(the)h(checksum)f(be)h(complemented?)0 5341 y(comptype)f(-)h(compression)e(algorithm)g(to)i(use:)g(GZIP_1,)f (RICE_1,)f(HCOMPRESS_1,)g(or)i(PLIO_1)0 5454 y(coordtype-)e(type)i(of)g (coordinate)e(projection)g(\(-SIN,)h(-TAN,)g(-ARC,)h(-NCP,)525 5567 y(-GLS,)f(-MER,)h(or)g(-AIT\))0 5680 y(cpopt)190 b(-)47 b(grouping)f(table)g(copy)h(option)f(parameter.)f(Allowed)g (values)i(are:)1882 5942 y Fj(171)p eop end %%Page: 172 180 TeXDict begin 172 179 bop 0 299 a Fj(172)1822 b Fh(APPENDIX)31 b(B.)61 b(P)-8 b(ARAMETER)30 b(DEFINITIONS)525 555 y Fe(OPT_GCP_GPT,)44 b(OPT_GCP_MBR,)h(OPT_GCP_ALL,)f(OPT_MCP_ADD,)h (OPT_MCP_NADD,)525 668 y(OPT_MCP_REPL,)f(amd)j(OPT_MCP_MOV.)0 781 y(create_col-)e(If)i(TRUE,)f(then)h(insert)f(a)h(new)g(column)f(in) i(the)f(table,)f(otherwise)525 894 y(overwrite)f(the)i(existing)f (column.)0 1007 y(current)94 b(-)47 b(if)g(TRUE,)g(then)f(the)h (current)f(HDU)h(will)f(be)i(copied)0 1120 y(dataok)142 b(-)47 b(was)g(the)g(data)f(unit)h(verification)e(successful)g(\(=1\))h (or)525 1233 y(not)h(\(=)g(-1\).)94 b(Equals)47 b(zero)f(if)h(the)g (DATASUM)f(keyword)g(is)h(not)g(present.)0 1346 y(datasum)94 b(-)47 b(32-bit)f(1's)h(complement)e(checksum)h(for)g(the)h(data)g (unit)0 1458 y(dataend)94 b(-)47 b(address)f(\(in)h(bytes\))f(of)h(the) g(end)g(of)g(the)g(HDU)0 1571 y(datastart-)e(address)h(\(in)h(bytes\))f (of)h(the)g(start)f(of)h(the)g(data)g(unit)0 1684 y(datatype)f(-)h (specifies)e(the)i(data)g(type)f(of)i(the)f(value.)93 b(Allowed)46 b(value)h(are:)94 b(TSTRING,)525 1797 y(TLOGICAL,)45 b(TBYTE,)h(TSBYTE,)g(TSHORT,)g(TUSHORT,)g(TINT,)g(TUINT,)g(TLONG,)g (TULONG,)525 1910 y(TFLOAT,)g(TDOUBLE,)f(TCOMPLEX,)h(and)h(TDBLCOMPLEX) 0 2023 y(datestr)94 b(-)47 b(FITS)g(date/time)e(string:)h ('YYYY-MM-DDThh:mm:ss.dd)o(d',)41 b('YYYY-MM-dd',)525 2136 y(or)47 b('dd/mm/yy')0 2249 y(day)286 b(-)47 b(calendar)f(day)g (\(UTC\))h(\(1-31\))0 2362 y(decimals)f(-)h(number)f(of)h(decimal)f (places)g(to)h(be)h(displayed)0 2475 y(deltasize)d(-)j(increment)d(for) i(allocating)e(more)i(memory)0 2588 y(dim1)238 b(-)47 b(declared)f(size)g(of)h(the)g(first)g(dimension)e(of)i(the)g(image)f (or)i(cube)e(array)0 2700 y(dim2)238 b(-)47 b(declared)f(size)g(of)h (the)g(second)f(dimension)g(of)h(the)g(data)f(cube)h(array)0 2813 y(dispwidth)e(-)j(display)e(width)g(of)h(a)h(column)e(=)h(length)f (of)h(string)f(that)h(will)g(be)g(read)0 2926 y(dtype)190 b(-)47 b(data)g(type)f(of)h(the)g(keyword)f(\('C',)h('L',)f('I',)h('F') g(or)g('X'\))764 3039 y(C)g(=)h(character)d(string)764 3152 y(L)i(=)h(logical)764 3265 y(I)f(=)h(integer)764 3378 y(F)f(=)h(floating)d(point)h(number)764 3491 y(X)h(=)h(complex,)d (e.g.,)h("\(1.23,)g(-4.56\)")0 3604 y(err_msg)94 b(-)47 b(error)f(message)g(on)h(the)g(internal)f(stack)g(\(80)h(chars)f(max\)) 0 3717 y(err_text)g(-)h(error)f(message)g(string)g(corresponding)e(to)k (error)e(number)g(\(30)h(chars)f(max\))0 3830 y(exact)190 b(-)47 b(TRUE)g(\(=1\))f(if)h(the)g(strings)f(match)h(exactly;)525 3942 y(FALSE)f(\(=0\))h(if)g(wildcards)e(are)i(used)0 4055 y(exclist)94 b(-)47 b(array)f(of)i(pointers)d(to)i(keyword)f (names)g(to)i(be)f(excluded)e(from)i(search)0 4168 y(exists)142 b(-)47 b(flag)g(indicating)e(whether)g(the)i(file)g(or)g(compressed)e (file)i(exists)f(on)h(disk)0 4281 y(expr)238 b(-)47 b(boolean)f(or)h (arithmetic)e(expression)0 4394 y(extend)142 b(-)47 b(TRUE)g(\(=1\))f (if)h(FITS)g(file)g(may)g(have)f(extensions,)f(else)i(FALSE)f(\(=0\))0 4507 y(extname)94 b(-)47 b(value)f(of)i(the)e(EXTNAME)g(keyword)g (\(null-terminated\))0 4620 y(extspec)94 b(-)47 b(the)g(extension)e(or) i(HDU)g(specifier;)e(a)j(number)e(or)h(name,)f(version,)g(and)h(type)0 4733 y(extver)142 b(-)47 b(value)f(of)i(the)e(EXTVER)h(keyword)e(=)j (integer)e(version)f(number)0 4846 y(filename)h(-)h(full)g(name)f(of)h (the)g(FITS)g(file,)f(including)g(optional)f(HDU)i(and)g(filtering)e (specs)0 4959 y(filetype)h(-)h(type)g(of)g(file)f(\(file://,)g(ftp://,) g(http://,)f(etc.\))0 5072 y(filter)142 b(-)47 b(the)g(input)f(file)h (filtering)e(specifier)0 5185 y(firstchar-)g(starting)h(byte)g(in)h (the)g(row)g(\(first)f(byte)h(of)g(row)g(=)g(1\))0 5297 y(firstfailed)e(-)i(member)f(HDU)h(ID)g(\(if)g(positive\))f(or)h (grouping)e(table)i(GRPIDn)f(index)525 5410 y(value)g(\(if)h (negative\))f(that)g(failed)g(grouping)g(table)g(verification.)0 5523 y(firstelem-)f(first)h(element)g(in)h(a)h(vector)e(\(ignored)f (for)i(ASCII)g(tables\))0 5636 y(firstrow)f(-)h(starting)f(row)g (number)h(\(first)f(row)h(of)g(table)f(=)i(1\))p eop end %%Page: 173 181 TeXDict begin 173 180 bop 3764 299 a Fj(173)0 555 y Fe(following-)45 b(if)i(TRUE,)g(any)f(HDUs)h(following)e(the)i(current)f(HDU)h(will)g (be)g(copied)0 668 y(fpixel)142 b(-)47 b(coordinate)e(of)i(the)g(first) f(pixel)h(to)g(be)g(read)g(or)g(written)f(in)h(the)525 781 y(FITS)g(array.)93 b(The)47 b(array)g(must)f(be)i(of)f(length)f (NAXIS)g(and)h(have)g(values)f(such)525 894 y(that)h(fpixel[0])e(is)i (in)g(the)g(range)g(1)g(to)g(NAXIS1,)f(fpixel[1])f(is)i(in)h(the)525 1007 y(range)e(1)i(to)f(NAXIS2,)f(etc.)0 1120 y(fptr)238 b(-)47 b(pointer)f(to)h(a)g('fitsfile')e(structure)h(describing)f(the)i (FITS)f(file.)0 1233 y(frac)238 b(-)47 b(factional)e(part)i(of)g(the)g (keyword)f(value)0 1346 y(gcount)142 b(-)47 b(number)f(of)h(groups)f (in)i(the)e(primary)g(array)h(\(usually)e(=)j(1\))0 1458 y(gfptr)190 b(-)47 b(fitsfile*)e(pointer)h(to)h(a)h(grouping)d(table)i (HDU.)0 1571 y(group)190 b(-)47 b(GRPIDn/GRPLCn)d(index)j(value)f (identifying)f(a)i(grouping)f(table)g(HDU,)h(or)525 1684 y(data)g(group)f(number)g(\(=0)h(for)g(non-grouped)e(data\))0 1797 y(grouptype)g(-)j(Grouping)d(table)i(parameter)e(that)i(specifies) e(the)i(columns)f(to)h(be)525 1910 y(created)f(in)h(a)g(grouping)f (table)g(HDU.)h(Allowed)f(values)g(are:)h(GT_ID_ALL_URI,)525 2023 y(GT_ID_REF,)e(GT_ID_POS,)g(GT_ID_ALL,)g(GT_ID_REF_URI,)f(and)j (GT_ID_POS_URI.)0 2136 y(grpname)94 b(-)47 b(value)f(to)i(use)e(for)h (the)g(GRPNAME)f(keyword)g(value.)0 2249 y(hdunum)142 b(-)47 b(sequence)f(number)g(of)h(the)g(HDU)g(\(Primary)e(array)i(=)g (1\))0 2362 y(hduok)190 b(-)47 b(was)g(the)g(HDU)g(verification)d (successful)h(\(=1\))i(or)525 2475 y(not)g(\(=)g(-1\).)94 b(Equals)47 b(zero)f(if)h(the)g(CHECKSUM)f(keyword)g(is)h(not)g (present.)0 2588 y(hdusum)142 b(-)47 b(32)g(bit)g(1's)g(complement)e (checksum)h(for)g(the)h(entire)f(CHDU)0 2700 y(hdutype)94 b(-)47 b(HDU)g(type:)f(IMAGE_HDU)g(\(0\),)g(ASCII_TBL)f(\(1\),)i (BINARY_TBL)e(\(2\),)i(ANY_HDU)f(\(-1\))0 2813 y(header)142 b(-)47 b(returned)f(character)f(string)h(containing)f(all)i(the)g (keyword)f(records)0 2926 y(headstart-)f(starting)h(address)f(\(in)i (bytes\))f(of)i(the)e(CHDU)0 3039 y(heapsize)g(-)h(size)g(of)g(the)g (binary)f(table)g(heap,)h(in)g(bytes)0 3152 y(history)94 b(-)47 b(the)g(HISTORY)f(keyword)g(comment)f(string)h(\(70)h(char)g (max,)g(null-terminated\))0 3265 y(hour)238 b(-)47 b(hour)g(within)f (day)h(\(UTC\))f(\(0)h(-)h(23\))0 3378 y(inc)286 b(-)47 b(sampling)f(interval)f(for)i(pixels)f(in)h(each)g(FITS)g(dimension)0 3491 y(inclist)94 b(-)47 b(array)f(of)i(pointers)d(to)i(matching)f (keyword)g(names)0 3604 y(incolnum)g(-)h(input)f(column)g(number;)g (range)h(=)g(1)h(to)f(TFIELDS)0 3717 y(infile)142 b(-)47 b(the)g(input)f(filename,)g(including)f(path)h(if)i(specified)0 3830 y(infptr)142 b(-)47 b(pointer)f(to)h(a)g('fitsfile')e(structure)h (describing)f(the)i(input)f(FITS)h(file.)0 3942 y(intval)142 b(-)47 b(integer)f(part)g(of)i(the)f(keyword)e(value)0 4055 y(iomode)142 b(-)47 b(file)g(access)f(mode:)g(either)g(READONLY)g (\(=0\))g(or)i(READWRITE)d(\(=1\))0 4168 y(keyname)94 b(-)47 b(name)g(of)g(a)g(keyword)f(\(8)h(char)g(max,)g (null-terminated\))0 4281 y(keynum)142 b(-)47 b(position)f(of)h (keyword)f(in)h(header)f(\(1st)g(keyword)g(=)i(1\))0 4394 y(keyroot)94 b(-)47 b(root)g(string)f(for)h(the)g(keyword)e(name)i (\(5)g(char)g(max,)f(null-terminated\))0 4507 y(keysexist-)f(number)h (of)h(existing)f(keyword)g(records)f(in)j(the)f(CHU)0 4620 y(keytype)94 b(-)47 b(header)f(record)g(type:)h(-1=delete;)92 b(0=append)46 b(or)h(replace;)907 4733 y(1=append;)e(2=this)h(is)h(the) g(END)g(keyword)0 4846 y(longstr)94 b(-)47 b(arbitrarily)e(long)h (string)g(keyword)g(value)h(\(null-terminated\))0 4959 y(lpixel)142 b(-)47 b(coordinate)e(of)i(the)g(last)g(pixel)f(to)h(be)g (read)g(or)g(written)f(in)h(the)525 5072 y(FITS)g(array.)93 b(The)47 b(array)g(must)f(be)i(of)f(length)f(NAXIS)g(and)h(have)g (values)f(such)525 5185 y(that)h(lpixel[0])e(is)i(in)g(the)g(range)g(1) g(to)g(NAXIS1,)f(lpixel[1])f(is)i(in)h(the)525 5297 y(range)e(1)i(to)f (NAXIS2,)f(etc.)0 5410 y(match)190 b(-)47 b(TRUE)g(\(=1\))f(if)h(the)g (2)h(strings)e(match,)g(else)g(FALSE)h(\(=0\))0 5523 y(maxdim)142 b(-)47 b(maximum)f(number)g(of)h(values)f(to)h(return)0 5636 y(member)142 b(-)47 b(row)g(number)f(of)h(a)h(grouping)d(table)i (member)f(HDU.)p eop end %%Page: 174 182 TeXDict begin 174 181 bop 0 299 a Fj(174)1822 b Fh(APPENDIX)31 b(B.)61 b(P)-8 b(ARAMETER)30 b(DEFINITIONS)0 555 y Fe(memptr)142 b(-)47 b(pointer)f(to)h(the)g(a)g(FITS)g(file)g(in)g(memory)0 668 y(mem_realloc)e(-)i(pointer)f(to)h(a)h(function)d(for)i (reallocating)e(more)h(memory)0 781 y(memsize)94 b(-)47 b(size)g(of)g(the)g(memory)f(block)g(allocated)f(for)i(the)g(FITS)g (file)0 894 y(mfptr)190 b(-)47 b(fitsfile*)e(pointer)h(to)h(a)h (grouping)d(table)i(member)f(HDU.)0 1007 y(mgopt)190 b(-)47 b(grouping)f(table)g(merge)g(option)g(parameter.)f(Allowed)h (values)g(are:)525 1120 y(OPT_MRG_COPY,)e(and)j(OPT_MRG_MOV.)0 1233 y(minute)142 b(-)47 b(minute)f(within)g(hour)h(\(UTC\))f(\(0)h(-)h (59\))0 1346 y(month)190 b(-)47 b(calendar)f(month)g(\(UTC\))g(\(1)h(-) h(12\))0 1458 y(morekeys)e(-)h(space)f(in)i(the)e(header)h(for)f(this)h (many)g(more)f(keywords)0 1571 y(n_good_rows)f(-)i(number)f(of)h(rows)g (evaluating)e(to)i(TRUE)0 1684 y(namelist)f(-)h(string)f(containing)f (a)j(comma)e(or)h(space)f(delimited)g(list)g(of)i(names)0 1797 y(naxes)190 b(-)47 b(size)g(of)g(each)f(dimension)g(in)h(the)g (FITS)f(array)0 1910 y(naxis)190 b(-)47 b(number)f(of)h(dimensions)e (in)i(the)g(FITS)g(array)0 2023 y(naxis1)142 b(-)47 b(length)f(of)h (the)g(X/first)f(axis)h(of)g(the)g(FITS)f(array)0 2136 y(naxis2)142 b(-)47 b(length)f(of)h(the)g(Y/second)f(axis)g(of)i(the)e (FITS)h(array)0 2249 y(naxis3)142 b(-)47 b(length)f(of)h(the)g(Z/third) f(axis)h(of)g(the)g(FITS)f(array)0 2362 y(nbytes)142 b(-)47 b(number)f(of)h(bytes)g(or)g(characters)e(to)i(read)g(or)g (write)0 2475 y(nchars)142 b(-)47 b(number)f(of)h(characters)e(to)i (read)g(or)g(write)0 2588 y(nelements-)e(number)h(of)h(data)g(elements) e(to)j(read)e(or)h(write)0 2700 y(newfptr)94 b(-)47 b(returned)f (pointer)f(to)j(the)e(reopened)g(file)0 2813 y(newveclen-)f(new)i (value)f(for)h(the)g(column)f(vector)g(repeat)g(parameter)0 2926 y(nexc)238 b(-)47 b(number)f(of)h(names)g(in)g(the)g(exclusion)e (list)i(\(may)f(=)i(0\))0 3039 y(nfound)142 b(-)47 b(number)f(of)h (keywords)f(found)g(\(highest)g(keyword)g(number\))0 3152 y(nkeys)190 b(-)47 b(number)f(of)h(keywords)f(in)h(the)g(sequence) 0 3265 y(ninc)238 b(-)47 b(number)f(of)h(names)g(in)g(the)g(inclusion)e (list)0 3378 y(nmembers)h(-)h(Number)f(of)h(grouping)f(table)g(members) g(\(NAXIS2)g(value\).)0 3491 y(nmove)190 b(-)47 b(number)f(of)h(HDUs)g (to)g(move)g(\(+)g(or)g(-\),)g(relative)f(to)h(current)f(position)0 3604 y(nocomments)f(-)i(if)h(equal)e(to)h(TRUE,)g(then)f(no)h (commentary)e(keywords)h(will)h(be)g(copied)0 3717 y(noisebits-)e (number)h(of)h(bits)g(to)g(ignore)f(when)h(compressing)e(floating)g (point)h(images)0 3830 y(nrows)190 b(-)47 b(number)f(of)h(rows)g(in)g (the)g(table)0 3942 y(nstart)142 b(-)47 b(first)f(integer)g(value)0 4055 y(nullarray-)f(set)i(to)g(TRUE)g(\(=1\))f(if)i(corresponding)c (data)i(element)g(is)h(undefined)0 4168 y(nulval)142 b(-)47 b(numerical)e(value)i(to)g(represent)e(undefined)g(pixels)0 4281 y(nulstr)142 b(-)47 b(character)e(string)h(used)h(to)g(represent)e (undefined)h(values)g(in)h(ASCII)f(table)0 4394 y(numval)142 b(-)47 b(numerical)e(data)i(value,)f(of)h(the)g(appropriate)e(data)h (type)0 4507 y(offset)142 b(-)47 b(byte)g(offset)f(in)h(the)g(heap)f (or)i(data)e(unit)h(to)g(the)g(first)f(element)g(of)h(the)g(vector)0 4620 y(openfptr)f(-)h(pointer)f(to)h(a)g(currently)f(open)g(FITS)h (file)0 4733 y(overlap)94 b(-)47 b(number)f(of)h(bytes)g(in)g(the)g (binary)f(table)g(heap)h(pointed)f(to)h(by)g(more)g(than)f(1)525 4846 y(descriptor)0 4959 y(outcolnum-)f(output)h(column)g(number;)g (range)g(=)i(1)f(to)g(TFIELDS)f(+)i(1)0 5072 y(outfile)94 b(-)47 b(and)g(optional)e(output)i(filename;)e(the)i(input)f(file)h (will)f(be)i(copied)e(to)h(this)f(prior)525 5185 y(to)h(opening)f(the)h (file)0 5297 y(outfptr)94 b(-)47 b(pointer)f(to)h(a)g('fitsfile')e (structure)h(describing)f(the)i(output)f(FITS)g(file.)0 5410 y(pcount)142 b(-)47 b(value)f(of)i(the)e(PCOUNT)h(keyword)e(=)j (size)e(of)i(binary)e(table)g(heap)0 5523 y(previous)g(-)h(if)g(TRUE,)g (any)f(previous)g(HDUs)h(in)g(the)g(input)f(file)h(will)f(be)i(copied.) 0 5636 y(repeat)142 b(-)47 b(length)f(of)h(column)f(vector)g(\(e.g.)h (12J\);)f(==)h(1)h(for)f(ASCII)f(table)p eop end %%Page: 175 183 TeXDict begin 175 182 bop 3764 299 a Fj(175)0 555 y Fe(rmopt)190 b(-)47 b(grouping)f(table)g(remove)g(option)g(parameter.)f(Allowed)h (values)g(are:)525 668 y(OPT_RM_GPT,)f(OPT_RM_ENTRY,)f(OPT_RM_MBR,)h (and)i(OPT_RM_ALL.)0 781 y(rootname)f(-)h(root)g(filename,)e(minus)h (any)h(extension)e(or)j(filtering)d(specifications)0 894 y(rot)286 b(-)47 b(celestial)e(coordinate)g(rotation)h(angle)g (\(degrees\))0 1007 y(rowlen)142 b(-)47 b(length)f(of)h(a)h(table)e (row,)h(in)g(characters)e(or)i(bytes)0 1120 y(rowlist)94 b(-)47 b(sorted)f(list)h(of)g(row)g(numbers)f(to)h(be)g(deleted)f(from) g(the)h(table)0 1233 y(rownum)142 b(-)47 b(number)f(of)h(the)g(row)g (\(first)f(row)h(=)h(1\))0 1346 y(rowrange)e(-)h(list)g(of)g(rows)f(or) i(row)f(ranges:)e('3,6-8,12,56-80')f(or)j('500-')0 1458 y(row_status)e(-)i(array)g(of)g(True/False)e(results)h(for)h(each)f (row)h(that)g(was)g(evaluated)0 1571 y(scale)190 b(-)47 b(linear)f(scaling)g(factor;)g(true)g(value)h(=)g(\(FITS)g(value\))f(*) h(scale)f(+)i(zero)0 1684 y(second)142 b(-)47 b(second)f(within)g (minute)g(\(0)h(-)h(60.9999999999\))c(\(leap)i(second!\))0 1797 y(section)94 b(-)47 b(section)f(of)h(image)f(to)i(be)f(copied)f (\(e.g.)g(21:80,101:200\))0 1910 y(simple)142 b(-)47 b(TRUE)g(\(=1\))f(if)h(FITS)g(file)g(conforms)e(to)i(the)g(Standard,)f (else)g(FALSE)h(\(=0\))0 2023 y(space)190 b(-)47 b(number)f(of)h(blank) g(spaces)f(to)h(leave)f(between)g(ASCII)g(table)h(columns)0 2136 y(status)142 b(-)47 b(returned)f(error)g(status)g(code)h(\(0)g(=)g (OK\))0 2249 y(sum)286 b(-)47 b(32)g(bit)g(unsigned)f(checksum)f(value) 0 2362 y(tbcol)190 b(-)47 b(byte)g(position)e(in)i(row)g(to)g(start)g (of)g(column)f(\(1st)h(col)g(has)g(tbcol)f(=)h(1\))0 2475 y(tdisp)190 b(-)47 b(Fortran)f(style)g(display)g(format)g(for)h (the)g(table)f(column)0 2588 y(tdimstr)94 b(-)47 b(the)g(value)f(of)h (the)g(TDIMn)g(keyword)0 2700 y(templt)142 b(-)47 b(template)f(string)g (used)g(in)h(comparison)e(\(null-terminated\))0 2813 y(tfields)94 b(-)47 b(number)f(of)h(fields)f(\(columns\))g(in)h(the)g (table)0 2926 y(tfopt)190 b(-)47 b(grouping)f(table)g(member)g (transfer)g(option)g(parameter.)f(Allowed)g(values)i(are:)525 3039 y(OPT_MCP_ADD,)d(and)j(OPT_MCP_MOV.)0 3152 y(tform)190 b(-)47 b(format)f(of)h(the)g(column)f(\(null-terminated\);)d(allowed)j (values)g(are:)525 3265 y(ASCII)g(tables:)94 b(Iw,)47 b(Aw,)g(Fww.dd,)f(Eww.dd,)f(or)j(Dww.dd)525 3378 y(Binary)e(tables:)g (rL,)h(rX,)g(rB,)g(rI,)g(rJ,)f(rA,)h(rAw,)g(rE,)g(rD,)g(rC,)g(rM)525 3491 y(where)f('w'=width)g(of)h(the)g(field,)f('d'=no.)g(of)h (decimals,)e('r'=repeat)g(count.)525 3604 y(Variable)h(length)g(array)g (columns)g(are)h(denoted)f(by)h(a)g('1P')g(before)f(the)h(data)f(type) 525 3717 y(character)f(\(e.g.,)h('1PJ'\).)94 b(When)47 b(creating)e(a)j(binary)e(table,)g(2)h(addition)f(tform)525 3830 y(data)h(type)f(codes)h(are)g(recognized)e(by)i(CFITSIO:)e('rU')i (and)g('rV')f(for)h(unsigned)525 3942 y(16-bit)f(and)h(unsigned)f (32-bit)g(integer,)f(respectively.)0 4168 y(theap)190 b(-)47 b(zero)g(indexed)e(byte)i(offset)f(of)h(starting)f(address)g(of) h(the)g(heap)525 4281 y(relative)f(to)h(the)g(beginning)e(of)i(the)g (binary)f(table)g(data)0 4394 y(tilesize)g(-)h(array)f(of)i(length)e (NAXIS)g(that)h(specifies)e(the)i(dimensions)e(of)525 4507 y(the)i(image)f(compression)f(tiles)0 4620 y(ttype)190 b(-)47 b(label)f(or)i(name)e(for)h(table)f(column)h (\(null-terminated\))0 4733 y(tunit)190 b(-)47 b(physical)f(unit)g(for) h(table)f(column)h(\(null-terminated\))0 4846 y(typechar)f(-)h (symbolic)f(code)g(of)h(the)g(table)g(column)f(data)g(type)0 4959 y(typecode)g(-)h(data)g(type)f(code)h(of)g(the)g(table)f(column.) 94 b(The)47 b(negative)e(of)525 5072 y(the)i(value)f(indicates)g(a)h (variable)f(length)g(array)g(column.)764 5185 y(Datatype)618 b(typecode)189 b(Mnemonic)764 5297 y(bit,)46 b(X)907 b(1)381 b(TBIT)764 5410 y(byte,)46 b(B)811 b(11)381 b(TBYTE)764 5523 y(logical,)45 b(L)668 b(14)381 b(TLOGICAL)764 5636 y(ASCII)46 b(character,)f(A)286 b(16)381 b(TSTRING)p eop end %%Page: 176 184 TeXDict begin 176 183 bop 0 299 a Fj(176)1822 b Fh(APPENDIX)31 b(B.)61 b(P)-8 b(ARAMETER)30 b(DEFINITIONS)764 555 y Fe(short)46 b(integer,)g(I)381 b(21)g(TSHORT)764 668 y(integer,)45 b(J)668 b(41)381 b(TINT32BIT)46 b(\(same)g(as)h(TLONG\)) 764 781 y(long)f(long)h(integer,)e(K)191 b(81)381 b(TLONGLONG)764 894 y(real,)46 b(E)811 b(42)381 b(TFLOAT)764 1007 y(double)46 b(precision,)f(D)238 b(82)381 b(TDOUBLE)764 1120 y(complex,)45 b(C)668 b(83)381 b(TCOMPLEX)764 1233 y(double)46 b(complex,)f(M)286 b(163)381 b(TDBLCOMPLEX)0 1346 y(unit)238 b(-)47 b(the)g(physical)e (unit)i(string)f(\(e.g.,)g('km/s'\))g(for)h(a)g(keyword)0 1458 y(unused)142 b(-)47 b(number)f(of)h(unused)f(bytes)h(in)g(the)g (binary)f(table)g(heap)0 1571 y(urltype)94 b(-)47 b(the)g(file)g(type)f (of)h(the)g(FITS)g(file)g(\(file://,)e(ftp://,)h(mem://,)f(etc.\))0 1684 y(validheap-)g(returned)h(value)g(=)h(FALSE)g(if)g(any)g(of)g(the) g(variable)e(length)i(array)525 1797 y(address)f(are)h(outside)f(the)g (valid)h(range)f(of)h(addresses)f(in)h(the)g(heap)0 1910 y(value)190 b(-)47 b(the)g(keyword)f(value)g(string)g(\(70)h(char)g (max,)f(null-terminated\))0 2023 y(version)94 b(-)47 b(current)f(version)g(number)g(of)h(the)g(CFITSIO)f(library)0 2136 y(width)190 b(-)47 b(width)f(of)i(the)e(character)g(string)g (field)0 2249 y(xcol)238 b(-)47 b(number)f(of)h(the)g(column)f (containing)f(the)i(X)h(coordinate)d(values)0 2362 y(xinc)238 b(-)47 b(X)g(axis)g(coordinate)e(increment)g(at)j(reference)d(pixel)h (\(deg\))0 2475 y(xpix)238 b(-)47 b(X)g(axis)g(pixel)f(location)0 2588 y(xpos)238 b(-)47 b(X)g(axis)g(celestial)e(coordinate)g(\(usually) h(RA\))h(\(deg\))0 2700 y(xrefpix)94 b(-)47 b(X)g(axis)g(reference)e (pixel)i(array)f(location)0 2813 y(xrefval)94 b(-)47 b(X)g(axis)g(coordinate)e(value)h(at)i(the)f(reference)e(pixel)h (\(deg\))0 2926 y(ycol)238 b(-)47 b(number)f(of)h(the)g(column)f (containing)f(the)i(X)h(coordinate)d(values)0 3039 y(year)238 b(-)47 b(calendar)f(year)g(\(e.g.)h(1999,)f(2000,)g(etc\))0 3152 y(yinc)238 b(-)47 b(Y)g(axis)g(coordinate)e(increment)g(at)j (reference)d(pixel)h(\(deg\))0 3265 y(ypix)238 b(-)47 b(y)g(axis)g(pixel)f(location)0 3378 y(ypos)238 b(-)47 b(y)g(axis)g(celestial)e(coordinate)g(\(usually)h(DEC\))h(\(deg\))0 3491 y(yrefpix)94 b(-)47 b(Y)g(axis)g(reference)e(pixel)i(array)f (location)0 3604 y(yrefval)94 b(-)47 b(Y)g(axis)g(coordinate)e(value)h (at)i(the)f(reference)e(pixel)h(\(deg\))0 3717 y(zero)238 b(-)47 b(scaling)f(offset;)g(true)g(value)h(=)g(\(FITS)f(value\))h(*)g (scale)f(+)i(zero)p eop end %%Page: 177 185 TeXDict begin 177 184 bop 0 1225 a Fg(App)5 b(endix)64 b(C)0 1687 y Fm(CFITSIO)76 b(Error)h(Status)h(Co)6 b(des)0 2180 y Fj(The)28 b(follo)m(wing)h(table)g(lists)g(all)g(the)f(error)g (status)g(co)s(des)g(used)f(b)m(y)h(CFITSIO.)f(Programmers)h(are)g (encouraged)0 2293 y(to)37 b(use)e(the)h(sym)m(b)s(olic)h(mnemonics)e (\(de\014ned)g(in)h(the)g(\014le)g(\014tsio.h\))h(rather)e(than)h(the)g (actual)h(in)m(teger)h(status)0 2406 y(v)-5 b(alues)31 b(to)g(impro)m(v)m(e)g(the)g(readabilit)m(y)g(of)g(their)f(co)s(de.)48 2665 y Fe(Symbolic)45 b(Const)190 b(Value)237 b(Meaning)48 2778 y(--------------)187 b(-----)94 b(------------------------)o(----) o(---)o(----)o(----)o(--)1002 2891 y(0)191 b(OK,)47 b(no)g(error)48 3004 y(SAME_FILE)427 b(101)190 b(input)46 b(and)h(output)f(files)h(are) g(the)f(same)48 3117 y(TOO_MANY_FILES)187 b(103)j(tried)46 b(to)h(open)g(too)g(many)g(FITS)f(files)h(at)g(once)48 3230 y(FILE_NOT_OPENED)139 b(104)190 b(could)46 b(not)h(open)g(the)g (named)f(file)48 3343 y(FILE_NOT_CREATED)91 b(105)190 b(could)46 b(not)h(create)f(the)h(named)g(file)48 3456 y(WRITE_ERROR)331 b(106)190 b(error)46 b(writing)g(to)h(FITS)g(file)48 3569 y(END_OF_FILE)331 b(107)190 b(tried)46 b(to)h(move)g(past)g(end)g (of)g(file)48 3681 y(READ_ERROR)379 b(108)190 b(error)46 b(reading)g(from)h(FITS)f(file)48 3794 y(FILE_NOT_CLOSED)139 b(110)190 b(could)46 b(not)h(close)g(the)f(file)48 3907 y(ARRAY_TOO_BIG)235 b(111)190 b(array)46 b(dimensions)f(exceed)h (internal)g(limit)48 4020 y(READONLY_FILE)235 b(112)190 b(Cannot)46 b(write)g(to)i(readonly)d(file)48 4133 y(MEMORY_ALLOCATION) e(113)190 b(Could)46 b(not)h(allocate)f(memory)48 4246 y(BAD_FILEPTR)331 b(114)190 b(invalid)46 b(fitsfile)f(pointer)48 4359 y(NULL_INPUT_PTR)187 b(115)j(NULL)47 b(input)f(pointer)g(to)h (routine)48 4472 y(SEEK_ERROR)379 b(116)190 b(error)46 b(seeking)g(position)g(in)h(file)48 4698 y(BAD_URL_PREFIX)235 b(121)142 b(invalid)46 b(URL)h(prefix)f(on)h(file)g(name)48 4811 y(TOO_MANY_DRIVERS)139 b(122)j(tried)46 b(to)h(register)f(too)h (many)g(IO)g(drivers)48 4924 y(DRIVER_INIT_FAILED)c(123)142 b(driver)46 b(initialization)e(failed)48 5036 y(NO_MATCHING_DRIVER)f (124)142 b(matching)45 b(driver)i(is)g(not)g(registered)48 5149 y(URL_PARSE_ERROR)187 b(125)142 b(failed)46 b(to)h(parse)g(input)f (file)h(URL)48 5262 y(RANGE_PARSE_ERROR)91 b(126)142 b(parse)46 b(error)h(in)g(range)f(list)48 5488 y(SHARED_BADARG)235 b(151)190 b(bad)47 b(argument)e(in)j(shared)e(memory)g(driver)48 5601 y(SHARED_NULPTR)235 b(152)190 b(null)47 b(pointer)e(passed)h(as)i (an)f(argument)48 5714 y(SHARED_TABFULL)187 b(153)j(no)47 b(more)g(free)f(shared)g(memory)h(handles)1882 5942 y Fj(177)p eop end %%Page: 178 186 TeXDict begin 178 185 bop 0 299 a Fj(178)1589 b Fh(APPENDIX)31 b(C.)61 b(CFITSIO)29 b(ERR)m(OR)h(ST)-8 b(A)g(TUS)30 b(CODES)48 555 y Fe(SHARED_NOTINIT)187 b(154)j(shared)46 b(memory)g(driver)g(is)h(not)g(initialized)48 668 y(SHARED_IPCERR)235 b(155)190 b(IPC)47 b(error)f(returned)g(by)h(a)g(system)f(call)48 781 y(SHARED_NOMEM)283 b(156)190 b(no)47 b(memory)f(in)h(shared)f (memory)h(driver)48 894 y(SHARED_AGAIN)283 b(157)190 b(resource)45 b(deadlock)h(would)g(occur)48 1007 y(SHARED_NOFILE)235 b(158)190 b(attempt)46 b(to)h(open/create)e(lock)h(file)h(failed)48 1120 y(SHARED_NORESIZE)139 b(159)190 b(shared)46 b(memory)g(block)g (cannot)h(be)g(resized)f(at)h(the)g(moment)48 1346 y(HEADER_NOT_EMPTY) 91 b(201)190 b(header)46 b(already)g(contains)f(keywords)48 1458 y(KEY_NO_EXIST)283 b(202)190 b(keyword)46 b(not)h(found)f(in)h (header)48 1571 y(KEY_OUT_BOUNDS)187 b(203)j(keyword)46 b(record)g(number)g(is)h(out)g(of)g(bounds)48 1684 y(VALUE_UNDEFINED) 139 b(204)190 b(keyword)46 b(value)g(field)g(is)i(blank)48 1797 y(NO_QUOTE)475 b(205)190 b(string)46 b(is)h(missing)f(the)h (closing)f(quote)48 1910 y(BAD_INDEX_KEY)235 b(206)190 b(illegal)46 b(indexed)g(keyword)f(name)i(\(e.g.)f('TFORM1000'\))48 2023 y(BAD_KEYCHAR)331 b(207)190 b(illegal)46 b(character)f(in)i (keyword)f(name)h(or)g(card)48 2136 y(BAD_ORDER)427 b(208)190 b(required)45 b(keywords)h(out)h(of)g(order)48 2249 y(NOT_POS_INT)331 b(209)190 b(keyword)46 b(value)g(is)h(not)g(a)h(positive)d(integer)48 2362 y(NO_END)571 b(210)190 b(couldn't)45 b(find)i(END)g(keyword)48 2475 y(BAD_BITPIX)379 b(211)190 b(illegal)46 b(BITPIX)g(keyword)g (value)48 2588 y(BAD_NAXIS)427 b(212)190 b(illegal)46 b(NAXIS)g(keyword)g(value)48 2700 y(BAD_NAXES)427 b(213)190 b(illegal)46 b(NAXISn)g(keyword)g(value)48 2813 y(BAD_PCOUNT)379 b(214)190 b(illegal)46 b(PCOUNT)g(keyword)g(value)48 2926 y(BAD_GCOUNT)379 b(215)190 b(illegal)46 b(GCOUNT)g(keyword)g (value)48 3039 y(BAD_TFIELDS)331 b(216)190 b(illegal)46 b(TFIELDS)g(keyword)f(value)48 3152 y(NEG_WIDTH)427 b(217)190 b(negative)45 b(table)i(row)g(size)48 3265 y(NEG_ROWS)475 b(218)190 b(negative)45 b(number)i(of)g(rows)f(in)i(table)48 3378 y(COL_NOT_FOUND)235 b(219)190 b(column)46 b(with)h(this)f(name)h (not)g(found)f(in)h(table)48 3491 y(BAD_SIMPLE)379 b(220)190 b(illegal)46 b(value)g(of)h(SIMPLE)f(keyword)48 3604 y(NO_SIMPLE)427 b(221)190 b(Primary)46 b(array)g(doesn't)g(start)g (with)h(SIMPLE)48 3717 y(NO_BITPIX)427 b(222)190 b(Second)46 b(keyword)g(not)h(BITPIX)48 3830 y(NO_NAXIS)475 b(223)190 b(Third)46 b(keyword)g(not)h(NAXIS)48 3942 y(NO_NAXES)475 b(224)190 b(Couldn't)45 b(find)i(all)g(the)g(NAXISn)f(keywords)48 4055 y(NO_XTENSION)331 b(225)190 b(HDU)47 b(doesn't)f(start)g(with)h (XTENSION)e(keyword)48 4168 y(NOT_ATABLE)379 b(226)190 b(the)47 b(CHDU)f(is)i(not)f(an)g(ASCII)f(table)g(extension)48 4281 y(NOT_BTABLE)379 b(227)190 b(the)47 b(CHDU)f(is)i(not)f(a)g (binary)f(table)g(extension)48 4394 y(NO_PCOUNT)427 b(228)190 b(couldn't)45 b(find)i(PCOUNT)f(keyword)48 4507 y(NO_GCOUNT)427 b(229)190 b(couldn't)45 b(find)i(GCOUNT)f(keyword)48 4620 y(NO_TFIELDS)379 b(230)190 b(couldn't)45 b(find)i(TFIELDS)f (keyword)48 4733 y(NO_TBCOL)475 b(231)190 b(couldn't)45 b(find)i(TBCOLn)f(keyword)48 4846 y(NO_TFORM)475 b(232)190 b(couldn't)45 b(find)i(TFORMn)f(keyword)48 4959 y(NOT_IMAGE)427 b(233)190 b(the)47 b(CHDU)f(is)i(not)f(an)g(IMAGE)f(extension)48 5072 y(BAD_TBCOL)427 b(234)190 b(TBCOLn)46 b(keyword)g(value)g(<)i(0)f (or)g(>)h(rowlength)48 5185 y(NOT_TABLE)427 b(235)190 b(the)47 b(CHDU)f(is)i(not)f(a)g(table)48 5297 y(COL_TOO_WIDE)283 b(236)190 b(column)46 b(is)h(too)g(wide)g(to)g(fit)g(in)g(table)48 5410 y(COL_NOT_UNIQUE)187 b(237)j(more)47 b(than)f(1)i(column)e(name)g (matches)g(template)48 5523 y(BAD_ROW_WIDTH)235 b(241)190 b(sum)47 b(of)g(column)f(widths)g(not)h(=)h(NAXIS1)48 5636 y(UNKNOWN_EXT)331 b(251)190 b(unrecognizable)44 b(FITS)i(extension)g(type)p eop end %%Page: 179 187 TeXDict begin 179 186 bop 3764 299 a Fj(179)48 555 y Fe(UNKNOWN_REC)331 b(252)190 b(unknown)46 b(record;)g(1st)g(keyword)g (not)h(SIMPLE)f(or)h(XTENSION)48 668 y(END_JUNK)475 b(253)190 b(END)47 b(keyword)f(is)h(not)g(blank)48 781 y(BAD_HEADER_FILL)139 b(254)190 b(Header)46 b(fill)h(area)f(contains)g(non-blank)f(chars)48 894 y(BAD_DATA_FILL)235 b(255)190 b(Illegal)46 b(data)g(fill)h(bytes)f (\(not)h(zero)g(or)g(blank\))48 1007 y(BAD_TFORM)427 b(261)190 b(illegal)46 b(TFORM)g(format)g(code)48 1120 y(BAD_TFORM_DTYPE)139 b(262)190 b(unrecognizable)44 b(TFORM)i(data)h (type)f(code)48 1233 y(BAD_TDIM)475 b(263)190 b(illegal)46 b(TDIMn)g(keyword)g(value)48 1346 y(BAD_HEAP_PTR)283 b(264)190 b(invalid)46 b(BINTABLE)f(heap)i(pointer)f(is)h(out)g(of)g (range)48 1571 y(BAD_HDU_NUM)331 b(301)190 b(HDU)47 b(number)f(<)h(1)48 1684 y(BAD_COL_NUM)331 b(302)190 b(column)46 b(number)g(<)i(1)f(or)g(>) h(tfields)48 1797 y(NEG_FILE_POS)283 b(304)190 b(tried)46 b(to)h(move)g(to)g(negative)f(byte)g(location)g(in)h(file)48 1910 y(NEG_BYTES)427 b(306)190 b(tried)46 b(to)h(read)g(or)g(write)g (negative)e(number)h(of)h(bytes)48 2023 y(BAD_ROW_NUM)331 b(307)190 b(illegal)46 b(starting)f(row)i(number)f(in)h(table)48 2136 y(BAD_ELEM_NUM)283 b(308)190 b(illegal)46 b(starting)f(element)h (number)g(in)h(vector)48 2249 y(NOT_ASCII_COL)235 b(309)190 b(this)47 b(is)g(not)g(an)g(ASCII)f(string)g(column)48 2362 y(NOT_LOGICAL_COL)139 b(310)190 b(this)47 b(is)g(not)g(a)g (logical)f(data)h(type)f(column)48 2475 y(BAD_ATABLE_FORMAT)d(311)190 b(ASCII)46 b(table)h(column)f(has)h(wrong)f(format)48 2588 y(BAD_BTABLE_FORMAT)d(312)190 b(Binary)46 b(table)g(column)g(has)h (wrong)g(format)48 2700 y(NO_NULL)523 b(314)190 b(null)47 b(value)f(has)h(not)g(been)f(defined)48 2813 y(NOT_VARI_LEN)283 b(317)190 b(this)47 b(is)g(not)g(a)g(variable)f(length)g(column)48 2926 y(BAD_DIMEN)427 b(320)190 b(illegal)46 b(number)g(of)h(dimensions) e(in)i(array)48 3039 y(BAD_PIX_NUM)331 b(321)190 b(first)46 b(pixel)h(number)f(greater)g(than)g(last)h(pixel)48 3152 y(ZERO_SCALE)379 b(322)190 b(illegal)46 b(BSCALE)g(or)h(TSCALn)f (keyword)g(=)h(0)48 3265 y(NEG_AXIS)475 b(323)190 b(illegal)46 b(axis)g(length)g(<)i(1)48 3491 y(NOT_GROUP_TABLE)330 b(340)142 b(Grouping)46 b(function)f(error)48 3604 y (HDU_ALREADY_MEMBER)186 b(341)48 3717 y(MEMBER_NOT_FOUND)282 b(342)48 3830 y(GROUP_NOT_FOUND)330 b(343)48 3942 y(BAD_GROUP_ID)474 b(344)48 4055 y(TOO_MANY_HDUS_TRACKED)42 b(345)48 4168 y(HDU_ALREADY_TRACKED)138 b(346)48 4281 y(BAD_OPTION)570 b(347)48 4394 y(IDENTICAL_POINTERS)186 b(348)48 4507 y(BAD_GROUP_ATTACH)282 b(349)48 4620 y(BAD_GROUP_DETACH)g(350)48 4846 y(NGP_NO_MEMORY)426 b(360)238 b(malloc)46 b(failed)48 4959 y(NGP_READ_ERR)474 b(361)238 b(read)46 b(error)h(from)f(file)48 5072 y(NGP_NUL_PTR)522 b(362)238 b(null)46 b(pointer)g(passed)g(as)h (an)g(argument.)1575 5185 y(Passing)f(null)g(pointer)g(as)h(a)h(name)f (of)1575 5297 y(template)f(file)g(raises)g(this)h(error)48 5410 y(NGP_EMPTY_CURLINE)234 b(363)k(line)46 b(read)h(seems)f(to)h(be)h (empty)e(\(used)1575 5523 y(internally\))48 5636 y (NGP_UNREAD_QUEUE_FULL)c(364)238 b(cannot)46 b(unread)g(more)g(then)h (1)g(line)g(\(or)g(single)p eop end %%Page: 180 188 TeXDict begin 180 187 bop 0 299 a Fj(180)1589 b Fh(APPENDIX)31 b(C.)61 b(CFITSIO)29 b(ERR)m(OR)h(ST)-8 b(A)g(TUS)30 b(CODES)1575 555 y Fe(line)47 b(twice\))48 668 y(NGP_INC_NESTING)330 b(365)238 b(too)46 b(deep)h(include)f(file)h(nesting)e(\(infinite)1575 781 y(loop,)h(template)g(includes)f(itself)i(?\))48 894 y(NGP_ERR_FOPEN)426 b(366)238 b(fopen\(\))45 b(failed,)h(cannot)g(open) h(template)e(file)48 1007 y(NGP_EOF)714 b(367)238 b(end)46 b(of)i(file)e(encountered)f(and)i(not)g(expected)48 1120 y(NGP_BAD_ARG)522 b(368)238 b(bad)46 b(arguments)g(passed.)g(Usually)f (means)1575 1233 y(internal)h(parser)g(error.)g(Should)g(not)h(happen) 48 1346 y(NGP_TOKEN_NOT_EXPECT)90 b(369)238 b(token)46 b(not)h(expected)e(here)48 1571 y(BAD_I2C)523 b(401)190 b(bad)47 b(int)g(to)g(formatted)e(string)h(conversion)48 1684 y(BAD_F2C)523 b(402)190 b(bad)47 b(float)f(to)h(formatted)f (string)g(conversion)48 1797 y(BAD_INTKEY)379 b(403)190 b(can't)46 b(interpret)g(keyword)f(value)i(as)g(integer)48 1910 y(BAD_LOGICALKEY)187 b(404)j(can't)46 b(interpret)g(keyword)f (value)i(as)g(logical)48 2023 y(BAD_FLOATKEY)283 b(405)190 b(can't)46 b(interpret)g(keyword)f(value)i(as)g(float)48 2136 y(BAD_DOUBLEKEY)235 b(406)190 b(can't)46 b(interpret)g(keyword)f (value)i(as)g(double)48 2249 y(BAD_C2I)523 b(407)190 b(bad)47 b(formatted)e(string)h(to)h(int)g(conversion)48 2362 y(BAD_C2F)523 b(408)190 b(bad)47 b(formatted)e(string)h(to)h (float)g(conversion)48 2475 y(BAD_C2D)523 b(409)190 b(bad)47 b(formatted)e(string)h(to)h(double)f(conversion)48 2588 y(BAD_DATATYPE)283 b(410)190 b(illegal)46 b(datatype)f(code)i(value)48 2700 y(BAD_DECIM)427 b(411)190 b(bad)47 b(number)f(of)h(decimal)f (places)g(specified)48 2813 y(NUM_OVERFLOW)283 b(412)190 b(overflow)45 b(during)i(data)f(type)h(conversion)48 2926 y(DATA_COMPRESSION_ERR)137 b(413)95 b(error)46 b(compressing)f (image)48 3039 y(DATA_DECOMPRESSION_ERR)c(414)95 b(error)46 b(uncompressing)f(image)48 3265 y(BAD_DATE)475 b(420)190 b(error)46 b(in)h(date)g(or)g(time)g(conversion)48 3491 y(PARSE_SYNTAX_ERR)91 b(431)190 b(syntax)46 b(error)g(in)i(parser)e (expression)48 3604 y(PARSE_BAD_TYPE)187 b(432)j(expression)45 b(did)i(not)g(evaluate)e(to)i(desired)f(type)48 3717 y(PARSE_LRG_VECTOR)91 b(433)190 b(vector)46 b(result)g(too)h(large)f (to)i(return)e(in)h(array)48 3830 y(PARSE_NO_OUTPUT)139 b(434)190 b(data)47 b(parser)f(failed)g(not)h(sent)f(an)h(out)g(column) 48 3942 y(PARSE_BAD_COL)235 b(435)190 b(bad)47 b(data)f(encounter)g (while)g(parsing)g(column)48 4055 y(PARSE_BAD_OUTPUT)91 b(436)190 b(Output)46 b(file)h(not)g(of)g(proper)f(type)48 4281 y(ANGLE_TOO_BIG)235 b(501)190 b(celestial)45 b(angle)i(too)f (large)h(for)g(projection)48 4394 y(BAD_WCS_VAL)331 b(502)190 b(bad)47 b(celestial)e(coordinate)g(or)i(pixel)g(value)48 4507 y(WCS_ERROR)427 b(503)190 b(error)46 b(in)h(celestial)f (coordinate)f(calculation)48 4620 y(BAD_WCS_PROJ)283 b(504)190 b(unsupported)45 b(type)h(of)h(celestial)f(projection)48 4733 y(NO_WCS_KEY)379 b(505)190 b(celestial)45 b(coordinate)g(keywords) h(not)h(found)48 4846 y(APPROX_WCS_KEY)187 b(506)j(approximate)45 b(wcs)i(keyword)e(values)h(were)h(returned)p eop end %%Trailer userdict /end-hook known{end-hook}if %%EOF