-
Notifications
You must be signed in to change notification settings - Fork 59
/
sun268.tex
1456 lines (1346 loc) · 41.7 KB
/
sun268.tex
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
\documentstyle[11pt]{article}
\pagestyle{myheadings}
% -----------------------------------------------------------------------------
% ? Document identification
%------------------------------------------------------------------------------
\newcommand{\stardoccategory} {Starlink User Note}
\newcommand{\stardocinitials} {SUN}
\newcommand{\stardocsource} {sun268.0}
\newcommand{\stardocnumber} {268.0}
\newcommand{\stardocauthors} {D.S. Berry \& M.J. Currie}
\newcommand{\stardocdate} {14th November 2013}
\newcommand{\stardoctitle} {CVG \\ [\latex{1ex}]
A Library of Format Conversion Utilities}
\newcommand{\stardocversion} {Version 1.0}
\newcommand{\stardocmanual} {Programmer's Manual}
% ? End of document identification
% -----------------------------------------------------------------------------
\newcommand{\stardocname}{\stardocinitials /\stardocnumber}
\markright{\stardocname}
\setlength{\textwidth}{160mm}
\setlength{\textheight}{230mm}
\setlength{\topmargin}{-2mm}
\setlength{\oddsidemargin}{0mm}
\setlength{\evensidemargin}{0mm}
\setlength{\parindent}{0mm}
\setlength{\parskip}{\medskipamount}
\setlength{\unitlength}{1mm}
% -----------------------------------------------------------------------------
% Hypertext definitions.
% ======================
% These are used by the LaTeX2HTML translator in conjunction with star2html.
% Comment.sty: version 2.0, 19 June 1992
% Selectively in/exclude pieces of text.
%
% Author
% Victor Eijkhout <eijkhout@cs.utk.edu>
% Department of Computer Science
% University Tennessee at Knoxville
% 104 Ayres Hall
% Knoxville, TN 37996
% USA
% Do not remove the %begin{latexonly} and %end{latexonly} lines (used by
% star2html to signify raw TeX that latex2html cannot process).
%begin{latexonly}
\makeatletter
\def\makeinnocent#1{\catcode`#1=12 }
\def\csarg#1#2{\expandafter#1\csname#2\endcsname}
\def\ThrowAwayComment#1{\begingroup
\def\CurrentComment{#1}%
\let\do\makeinnocent \dospecials
\makeinnocent\^^L% and whatever other special cases
\endlinechar`\^^M \catcode`\^^M=12 \xComment}
{\catcode`\^^M=12 \endlinechar=-1 %
\gdef\xComment#1^^M{\def\test{#1}
\csarg\ifx{PlainEnd\CurrentComment Test}\test
\let\html@next\endgroup
\else \csarg\ifx{LaLaEnd\CurrentComment Test}\test
\edef\html@next{\endgroup\noexpand\end{\CurrentComment}}
\else \let\html@next\xComment
\fi \fi \html@next}
}
\makeatother
\def\includecomment
#1{\expandafter\def\csname#1\endcsname{}%
\expandafter\def\csname end#1\endcsname{}}
\def\excludecomment
#1{\expandafter\def\csname#1\endcsname{\ThrowAwayComment{#1}}%
{\escapechar=-1\relax
\csarg\xdef{PlainEnd#1Test}{\string\\end#1}%
\csarg\xdef{LaLaEnd#1Test}{\string\\end\string\{#1\string\}}%
}}
% Define environments that ignore their contents.
\excludecomment{comment}
\excludecomment{rawhtml}
\excludecomment{htmlonly}
% Hypertext commands etc. This is a condensed version of the html.sty
% file supplied with LaTeX2HTML by: Nikos Drakos <nikos@cbl.leeds.ac.uk> &
% Jelle van Zeijl <jvzeijl@isou17.estec.esa.nl>. The LaTeX2HTML documentation
% should be consulted about all commands (and the environments defined above)
% except \xref and \xlabel which are Starlink specific.
\newcommand{\htmladdnormallinkfoot}[2]{#1\footnote{#2}}
\newcommand{\htmladdnormallink}[2]{#1}
\newcommand{\htmladdimg}[1]{}
\newenvironment{latexonly}{}{}
\newcommand{\hyperref}[4]{#2\ref{#4}#3}
\newcommand{\htmlref}[2]{#1}
\newcommand{\htmlimage}[1]{}
\newcommand{\htmladdtonavigation}[1]{}
\newcommand{\latexhtml}[2]{#1}
\newcommand{\html}[1]{}
% Starlink cross-references and labels.
\newcommand{\xref}[3]{#1}
\newcommand{\xlabel}[1]{}
% LaTeX2HTML symbol.
\newcommand{\latextohtml}{{\bf LaTeX}{2}{\tt{HTML}}}
% Define command to re-centre underscore for Latex and leave as normal
% for HTML (severe problems with \_ in tabbing environments and \_\_
% generally otherwise).
\newcommand{\latex}[1]{#1}
\newcommand{\setunderscore}{\renewcommand{\_}{{\tt\symbol{95}}}}
\latex{\setunderscore}
% Redefine the \tableofcontents command. This procrastination is necessary
% to stop the automatic creation of a second table of contents page
% by latex2html.
\newcommand{\latexonlytoc}[0]{\tableofcontents}
% -----------------------------------------------------------------------------
% Debugging.
% =========
% Remove % on the following to debug links in the HTML version using Latex.
% \newcommand{\hotlink}[2]{\fbox{\begin{tabular}[t]{@{}c@{}}#1\\\hline{\footnotesize #2}\end{tabular}}}
% \renewcommand{\htmladdnormallinkfoot}[2]{\hotlink{#1}{#2}}
% \renewcommand{\htmladdnormallink}[2]{\hotlink{#1}{#2}}
% \renewcommand{\hyperref}[4]{\hotlink{#1}{\S\ref{#4}}}
% \renewcommand{\htmlref}[2]{\hotlink{#1}{\S\ref{#2}}}
% \renewcommand{\xref}[3]{\hotlink{#1}{#2 -- #3}}
%end{latexonly}
% -----------------------------------------------------------------------------
% ? Document specific \newcommand or \newenvironment commands.
%+
% Name:
% SST.TEX
% Purpose:
% Define LaTeX commands for laying out Starlink routine descriptions.
% Language:
% LaTeX
% Type of Module:
% LaTeX data file.
% Description:
% This file defines LaTeX commands which allow routine documentation
% produced by the SST application PROLAT to be processed by LaTeX and
% by LaTeX2html. The contents of this file should be included in the
% source prior to any statements that make of the sst commnds.
% Notes:
% The style file html.sty provided with LaTeX2html needs to be used.
% This must be before this file.
% Authors:
% RFWS: R.F. Warren-Smith (STARLINK)
% PDRAPER: P.W. Draper (Starlink - Durham University)
% History:
% 10-SEP-1990 (RFWS):
% Original version.
% 10-SEP-1990 (RFWS):
% Added the implementation status section.
% 12-SEP-1990 (RFWS):
% Added support for the usage section and adjusted various spacings.
% 8-DEC-1994 (PDRAPER):
% Added support for simplified formatting using LaTeX2html.
% {enter_further_changes_here}
% Bugs:
% {note_any_bugs_here}
%-
% Define length variables.
\newlength{\sstbannerlength}
\newlength{\sstcaptionlength}
\newlength{\sstexampleslength}
\newlength{\sstexampleswidth}
% Define a \tt font of the required size.
\latex{\newfont{\ssttt}{cmtt10 scaled 1095}}
\html{\newcommand{\ssttt}{\tt}}
% Define a command to produce a routine header, including its name,
% a purpose description and the rest of the routine's documentation.
\newcommand{\sstroutine}[3]{
\goodbreak
\rule{\textwidth}{0.5mm}
\vspace{-7ex}
\newline
\settowidth{\sstbannerlength}{{\Large {\bf #1}}}
\setlength{\sstcaptionlength}{\textwidth}
\setlength{\sstexampleslength}{\textwidth}
\addtolength{\sstbannerlength}{0.5em}
\addtolength{\sstcaptionlength}{-2.0\sstbannerlength}
\addtolength{\sstcaptionlength}{-5.0pt}
\settowidth{\sstexampleswidth}{{\bf Examples:}}
\addtolength{\sstexampleslength}{-\sstexampleswidth}
\parbox[t]{\sstbannerlength}{\flushleft{\Large {\bf #1}}}
\parbox[t]{\sstcaptionlength}{\center{\Large #2}}
\parbox[t]{\sstbannerlength}{\flushright{\Large {\bf #1}}}
\begin{description}
#3
\end{description}
}
% Format the description section.
\newcommand{\sstdescription}[1]{\item[Description:] #1}
% Format the usage section.
\newcommand{\sstusage}[1]{\item[Usage:] \mbox{}
\\[1.3ex]{\raggedright \ssttt #1}}
% Format the invocation section.
\newcommand{\sstinvocation}[1]{\item[Invocation:]\hspace{0.4em}{\tt #1}}
% Format the arguments section.
\newcommand{\sstarguments}[1]{
\item[Arguments:] \mbox{} \\
\vspace{-3.5ex}
\begin{description}
#1
\end{description}
}
% Format the returned value section (for a function).
\newcommand{\sstreturnedvalue}[1]{
\item[Returned Value:] \mbox{} \\
\vspace{-3.5ex}
\begin{description}
#1
\end{description}
}
% Format the parameters section (for an application).
\newcommand{\sstparameters}[1]{
\item[Parameters:] \mbox{} \\
\vspace{-3.5ex}
\begin{description}
#1
\end{description}
}
% Format the examples section.
\newcommand{\sstexamples}[1]{
\item[Examples:] \mbox{} \\
\vspace{-3.5ex}
\begin{description}
#1
\end{description}
}
% Define the format of a subsection in a normal section.
\newcommand{\sstsubsection}[1]{ \item[{#1}] \mbox{} \\}
% Define the format of a subsection in the examples section.
\newcommand{\sstexamplesubsection}[2]{\sloppy
\item[\parbox{\sstexampleslength}{\ssttt #1}] \mbox{} \vspace{1.0ex}
\\ #2 }
% Format the notes section.
\newcommand{\sstnotes}[1]{\item[Notes:] \mbox{} \\[1.3ex] #1}
% Provide a general-purpose format for additional (DIY) sections.
\newcommand{\sstdiytopic}[2]{\item[{\hspace{-0.35em}#1\hspace{-0.35em}:}]
\mbox{} \\[1.3ex] #2}
% Format the implementation status section.
\newcommand{\sstimplementationstatus}[1]{
\item[{Implementation Status:}] \mbox{} \\[1.3ex] #1}
% Format the bugs section.
\newcommand{\sstbugs}[1]{\item[Bugs:] #1}
% Format a list of items while in paragraph mode.
\newcommand{\sstitemlist}[1]{
\mbox{} \\
\vspace{-3.5ex}
\begin{itemize}
#1
\end{itemize}
}
% Define the format of an item.
\newcommand{\sstitem}{\item}
%% Now define html equivalents of those already set. These are used by
% latex2html and are defined in the html.sty files.
\begin{htmlonly}
% sstroutine.
\newcommand{\sstroutine}[3]{
\subsection{#1\xlabel{#1}-\label{#1}#2}
\begin{description}
#3
\end{description}
}
% sstdescription
\newcommand{\sstdescription}[1]{\item[Description:]
\begin{description}
#1
\end{description}
\\
}
% sstusage
\newcommand{\sstusage}[1]{\item[Usage:]
\begin{description}
{\ssttt #1}
\end{description}
\\
}
% sstinvocation
\newcommand{\sstinvocation}[1]{\item[Invocation:]
\begin{description}
{\ssttt #1}
\end{description}
\\
}
% sstarguments
\newcommand{\sstarguments}[1]{
\item[Arguments:] \\
\begin{description}
#1
\end{description}
\\
}
% sstreturnedvalue
\newcommand{\sstreturnedvalue}[1]{
\item[Returned Value:] \\
\begin{description}
#1
\end{description}
\\
}
% sstparameters
\newcommand{\sstparameters}[1]{
\item[Parameters:] \\
\begin{description}
#1
\end{description}
\\
}
% sstexamples
\newcommand{\sstexamples}[1]{
\item[Examples:] \\
\begin{description}
#1
\end{description}
\\
}
% sstsubsection
\newcommand{\sstsubsection}[1]{\item[{#1}]}
% sstexamplesubsection
\newcommand{\sstexamplesubsection}[2]{\item[{\ssttt #1}] #2}
% sstnotes
\newcommand{\sstnotes}[1]{\item[Notes:] #1 }
% sstdiytopic
\newcommand{\sstdiytopic}[2]{\item[{#1}] #2 }
% sstimplementationstatus
\newcommand{\sstimplementationstatus}[1]{
\item[Implementation Status:] #1
}
% sstitemlist
\newcommand{\sstitemlist}[1]{
\begin{itemize}
#1
\end{itemize}
\\
}
% sstitem
\newcommand{\sstitem}{\item}
\end{htmlonly}
% End of "sst.tex" layout definitions.
%.
% ? End of document specific commands
% -----------------------------------------------------------------------------
% Title Page.
% ===========
\renewcommand{\thepage}{\roman{page}}
\begin{document}
\thispagestyle{empty}
% Latex document header.
% ======================
\begin{latexonly}
STFC / {\sc Joint Astronomy Centre, Hawaii} \hfill {\bf \stardocname}\\
{\large Science \& Technology Facilities Council}\\
{\large Starlink Project\\}
{\large \stardoccategory\ \stardocnumber}
\begin{flushright}
\stardocauthors\\
\stardocdate
\end{flushright}
\vspace{-4mm}
\rule{\textwidth}{0.5mm}
\vspace{5mm}
\begin{center}
{\Huge\bf \stardoctitle \\ [2.5ex]}
{\LARGE\bf \stardocversion \\ [4ex]}
{\Huge\bf \stardocmanual}
\end{center}
\vspace{5mm}
% ? Heading for abstract if used.
\vspace{10mm}
\begin{center}
{\Large\bf Abstract}
\end{center}
% ? End of heading for abstract.
\end{latexonly}
% HTML documentation header.
% ==========================
\begin{htmlonly}
\xlabel{}
\begin{rawhtml} <H1> \end{rawhtml}
\stardoctitle\\
\stardocversion\\
\stardocmanual
\begin{rawhtml} </H1> \end{rawhtml}
% ? Add picture here if required.
% ? End of picture
\begin{rawhtml} <P> <I> \end{rawhtml}
\stardoccategory\ \stardocnumber \\
\stardocauthors \\
\stardocdate
\begin{rawhtml} </I> </P> <H3> \end{rawhtml}
\htmladdnormallink{CCLRC}{http://www.cclrc.ac.uk} /
\htmladdnormallink{Rutherford Appleton Laboratory}
{http://www.cclrc.ac.uk/ral} \\
\htmladdnormallink{Particle Physics \& Astronomy Research Council}
{http://www.pparc.ac.uk} \\
\begin{rawhtml} </H3> <H2> \end{rawhtml}
\htmladdnormallink{Starlink Project}{http://www.starlink.ac.uk/}
\begin{rawhtml} </H2> \end{rawhtml}
\htmladdnormallink{\htmladdimg{source.gif} Retrieve hardcopy}
{http://www.starlink.ac.uk/cgi-bin/hcserver?\stardocsource}\\
% HTML document table of contents.
% ================================
% Add table of contents header and a navigation button to return to this
% point in the document (this should always go before the abstract \section).
\label{stardoccontents}
\begin{rawhtml}
<HR>
<H2>Contents</H2>
\end{rawhtml}
\renewcommand{\latexonlytoc}[0]{}
\htmladdtonavigation{\htmlref{\htmladdimg{contents_motif.gif}}
{stardoccontents}}
% ? New section for abstract if used.
\section{\xlabel{abstract}Abstract}
% ? End of new section for abstract
\end{htmlonly}
% -----------------------------------------------------------------------------
% ? Document Abstract. (if used)
% ==================
CVG provides utility functions for handling data format conversion tasks.
% ? End of document
% -----------------------------------------------------------------------------
% ? Latex document Table of Contents (if used).
% ===========================================
\newpage
\begin{latexonly}
\setlength{\parskip}{0mm}
\latexonlytoc
\setlength{\parskip}{\medskipamount}
\markright{\stardocname}
\end{latexonly}
% ? End of Latex document table of contents
% -----------------------------------------------------------------------------
\newpage
\renewcommand{\thepage}{\arabic{page}}
\setcounter{page}{1}
\section {Introduction}
This library contains routines that originally formed part of the CONVERT
application package, but which are are of more general use and so have
been moved into a separate library.
\appendix
\section{\label{APP:SPEC}Routine Descriptions}
% Routine descriptions:
% =====================
\small
\sstroutine{
CVG\_ASSOC
}{
Opens an existing FITS file specified by an environment parameter
}{
\sstdescription{
This function opens an existing FITS file with a path obtained from
the environment, and returns a logical unit number that can be used
to access it using CVG and FITSIO functions.
}
\sstinvocation{
CALL CVG\_ASSOC( PARAM, MODE, FUNIT, BLOCKF, STATUS )
}
\sstarguments{
\sstsubsection{
PARAM = CHARACTER $*$ ( $*$ ) (Given)
}{
The name of the environemt parameter to use.
}
\sstsubsection{
MODE = CHARACTER $*$ ( $*$ ) (Given)
}{
The access mode: {\tt '}READ{\tt '} or {\tt '}UPDATE. Case insensitive.
Abbreviations can be used.
}
\sstsubsection{
FUNIT = INTEGER (Returned)
}{
The logical unit number of the FITS file. Returned equal to
CVG\_NOLUN if an error occurs.
}
\sstsubsection{
BLOCKF = INTEGER (Returned)
}{
The logical record blocking factor.
}
\sstsubsection{
STATUS = INTEGER (Given and Returned)
}{
The global status.
}
}
}
\sstroutine{
CVG\_BT2FT
}{
Creates an AST FitsTable from a FITS binary table
}{
\sstdescription{
This function creates a new AST FitsTable object holding the data
read from a FITS binary table held in a named extension of the
supplied FITS file.
}
\sstinvocation{
CALL CVG\_BT2FT( FUNIT, EXTNAM, EXTVER, EXTLEVEL, TABLE, STATUS )
}
\sstarguments{
\sstsubsection{
FUNIT = INTEGER (Given)
}{
The FITSIO unit number for the FITS file.
}
\sstsubsection{
EXTNAM = CHARACTER $*$ ( $*$ ) (Given)
}{
The name of the FITS extension containing the required binary
table.
}
\sstsubsection{
EXTVER = INTEGER (Given)
}{
The value of the EXTVER keyword in the required binary-table
HDU.
}
\sstsubsection{
EXTLEVEL = INTEGER (Given)
}{
The value of the EXTLEVEL keyword in the required binary-table
HDU.
}
\sstsubsection{
TABLE = INTEGER (Returned)
}{
A pointer to the new FitsTable. A value of AST\_\_NULL is
returned (without error) if the named extension cannot be
found.
}
\sstsubsection{
STATUS = INTEGER (Given and Returned)
}{
The global status.
}
}
}
\sstroutine{
CVG\_CLEAN
}{
Removes standard header cards from a FitsCHan
}{
\sstdescription{
This removes the following cards, if present, from the supplied
FitsChan: SIMPLE, BITPIX, EXTEND, NAXIS, NAXISj, all WCS related
cards.
}
\sstinvocation{
CALL CVG\_CLEAN( IPROV, FC, STATUS )
}
\sstarguments{
\sstsubsection{
FC = INTEGER (Given)
}{
The FitsChan to clean.
}
\sstsubsection{
STATUS = INTEGER (Given and Returned)
}{
The global status.
}
}
}
\sstroutine{
CVG\_CLOSE
}{
Closes a FITS file
}{
\sstdescription{
This function closes the FITS files specified by the supplied
logical unit number. It returns without error if the supplied
logical unit number is currently not attached to a file.
}
\sstinvocation{
CALL CVG\_CLOSE( FUNIT, STATUS )
}
\sstarguments{
\sstsubsection{
FUNIT = INTEGER (Given and Returned)
}{
The logical unit number of the FITS file. Always returned equal
to CVG\_\_NOLUN.
}
\sstsubsection{
STATUS = INTEGER (Given and Returned)
}{
The global status.
}
}
\sstnotes{
\sstitemlist{
\sstitem
This function attempts to run even if an error has already
occurred.
}
}
}
\sstroutine{
CVG\_CREAT
}{
Create a new FITS file specified by an environment parameter
}{
\sstdescription{
This function creates a new FITS file with a path obtained from the
environment, and returns a logical unit number that can be used to
access it using CVG and FITSIO functions.
}
\sstinvocation{
CALL CVG\_CREAT( PARAM, BLOCKF, OVRWRT, FUNIT, STATUS )
}
\sstarguments{
\sstsubsection{
PARAM = CHARACTER $*$ ( $*$ ) (Given)
}{
The name of the environemt parameter to use.
}
\sstsubsection{
BLOCKF = INTEGER (Given)
}{
The blocking factor for the new file. It must be a positive
integer between 1 and 10.
}
\sstsubsection{
OVRWRT = LOGICAL (Returned)
}{
If .TRUE., any existing file with the given name is silently
over-written. Otherwise, an error is reported if the file
already exists.
}
\sstsubsection{
FUNIT = INTEGER (Returned)
}{
The logical unit number of the FITS file. Returned equal to
CVG\_NOLUN if an error occurs.
}
\sstsubsection{
STATUS = INTEGER (Given and Returned)
}{
The global status.
}
}
}
\sstroutine{
CVG\_FC2HD
}{
Copies all headers from a FitsChan to the current HDU
}{
\sstdescription{
This routine extracts all headers from the supplied FitsChan and
stores them in the current HDU of the supplied FITS file. The HDU
header may be emptied first (see argument CLEAR).
}
\sstinvocation{
CALL CVG\_FC2HD( FC, CLEAR, FUNIT, STATUS )
}
\sstarguments{
\sstsubsection{
FC = INTEGER (Given)
}{
Pointer to the FitsChan.
}
\sstsubsection{
CLEAR = LOGICAL (Given)
}{
Should he header be cleared before copying in the new cards?
Otherwise, the new cards are appended to the end of the HDU.
}
\sstsubsection{
FUNIT = INTEGER (Given)
}{
The FITSIO unit number for the FITS file.
}
\sstsubsection{
STATUS = INTEGER (Given and Returned)
}{
The global status.
}
}
\sstdiytopic{
Prior Requirements
}{
The FITS file must already be opened with the FITSIO library.
}
}
\sstroutine{
CVG\_FIOER
}{
Reports error messages associated with a call to a FITSIO routine
}{
\sstdescription{
This routine writes a standard error report for an error arising
within a FITSIO-library routine. The report comprises two parts.
First there is a contextual error report. The error number is
translated to an error string and appended to the supplied
message. Thus the contextual message is of the form:
$<$ROUTIN$>$: $<$MESSGE$>$ Error was:
or
$<$MESSGE$>$ Error was:
when ROUTIN is a blank string. After this header message, the
FITSIO error stack is flushed. If for some strange reason, there
are no error messages in the stack, this routine appends the
short translation of the error number, and if there is no
translation, it reports the FITSIO error number and instruct the
reader to consult the FITSIO User{\tt '}s Guide.
The global status is set to SAI\_\_ERROR. This routine attempts
to work even if the global status is bad on entry.
}
\sstinvocation{
CALL CVG\_FIOER( FSTAT, PARAM, ROUTIN, MESSGE, STATUS )
}
\sstarguments{
\sstsubsection{
FSTAT = INTEGER (Given)
}{
The FITSIO status.
}
\sstsubsection{
PARAM = CHARACTER $*$ ( $*$ ) (Given)
}{
The parameter name of the error report. It usually comprises
the name of the routine where the FITSIO routine is called
followed by some suitable suffix like {\tt '}\_ERR{\tt '}.
}
\sstsubsection{
ROUTIN = CHARACTER $*$ ( $*$ ) (Given)
}{
The name of the FITSIO routine where the error occurred.
It may be blank to prevent it appearing in the error report.
}
\sstsubsection{
MESSGE = CHARACTER $*$ ( $*$ ) (Given)
}{
A contextual error message to form part of the error report.
It should indicate what was happening when the call to the
FITSIO routine was made. No punctuation is added between
this and the {\tt "}Error was{\tt "} text, so a full stop should appear
in this message.
}
\sstsubsection{
STATUS = INTEGER (Given and Returned)
}{
The global status.
}
}
\sstnotes{
The error name for the FITSIO error messages is FITSIO\_ERR.
[optional\_subroutine\_items]...
}
}
\sstroutine{
CVG\_FT2BT
}{
Creates a FITS binary table from a AST FitsTable
}{
\sstdescription{
This function creates a new FITS binary table holding data copied
from an AST FitsTable. If a binary table extension with the given
extension name already exists in the FITS file, it is replaced by
the new one. Otherwise, the table is written into the current HDU.
The current HDU on exit can be selected using MKCHDU.
}
\sstinvocation{
CALL CVG\_FT2BT( TABLE, FUNIT, EXTNAM, ASTVER, MKCHDU, STATUS )
}
\sstarguments{
\sstsubsection{
TABLE = INTEGER (Given)
}{
A pointer to the FitsTable.
}
\sstsubsection{
FUNIT = INTEGER (Given)
}{
The FITSIO unit number for the FITS file.
}
\sstsubsection{
EXTNAM = CHARACTER $*$ ( $*$ ) (Given)
}{
The name of the new FITS extension containing the binary table.
}
\sstsubsection{
ASTVER = INTEGER (Given)
}{
This parameter determines what to do if the FITS file already
contains an extension with the name given by EXTNAM. Normally,
an error is reported, but if the extension was created by AST
(i.e. if EXTNAM is equal to the symbolic constant AST\_\_TABEXTNAME),
and the table version for the existing table is equal to the
value of ASTVER, then no error is reported and this function
returns without action.
}
\sstsubsection{
MKCHDU = LOGICAL (Given)
}{
If .TRUE., the new binary table extension is made the current
HDU on exit. Otherwise, the original current HDU is unchanged on
exit.
}
\sstsubsection{
STATUS = INTEGER (Given and Returned)
}{
The global status.
}
}
}
\sstroutine{
CVG\_HD2FC
}{
Copies all headers from the current HDU into a FitsChan
}{
\sstdescription{
This routine extracts all headers from the current HDU and stores
them in the supplied FitsChan. The FitsChan is first emptied.
}
\sstinvocation{
CALL CVG\_HD2FC( FUNIT, FC, STATUS )
}
\sstarguments{
\sstsubsection{
FUNIT = INTEGER (Given)
}{
The FITSIO unit number for the FITS file.
}
\sstsubsection{
FC = INTEGER (Given)
}{
Pointer to the FitsChan.
}
\sstsubsection{
STATUS = INTEGER (Given and Returned)
}{
The global status.
}
}
\sstdiytopic{
Prior Requirements
}{
The FITS file must already be opened with the FITSIO library.
}
}
\sstroutine{
CVG\_HDATE
}{
Converts the NDF history date into a more-pleasing format
}{
\sstdescription{
This makes a few minor modifications to the date string obtained
from NDF history records to make it more like UNIX and
astronomical style. Specifically two hyphens around the month are
replaced by spaces, and the second and third letters of the month
are made lowercase.
}
\sstinvocation{
CALL CVG\_HDATE( DATE, STATUS )
}
\sstarguments{
\sstsubsection{
DATE = CHARACTER $*$ ( $*$ ) (Given and Returned)
}{
On input the NDF format for a date and time, namely
YYYY-MMM-DD HH:MM:SS.SSS. On exit, the ISO-order format for a
date and time, namely YYYY Mmm DD HH:MM:SS.SSS
}
\sstsubsection{
STATUS = INTEGER (Given and Returned)
}{
The global status.
}
}
}
\sstroutine{
CVG\_HECHO
}{
Writes history text to the FITS headers
}{
\sstdescription{
This routine appends the history text associated with an
NDF to the current FITS header. It is not called directly (by
CVG\_WHISR), but is passed as an external argument to routine
NDF\_HOUT. (It is an equivalent to NDF\_HECHO. See SUN/33 for
more details.)
}
\sstinvocation{
CALL CVG\_HECHO( NLINES, TEXT, STATUS )
}
\sstarguments{
\sstsubsection{
NLINES = INTEGER (Given)
}{
Number of lines of history text.
}
\sstsubsection{
TEXT( NLINES ) = CHARACTER $*$ ( $*$ ) (Given)
}{
The history text.
}
\sstsubsection{
STATUS = INTEGER (Given and Returned)
}{
The global status.
}
}
\sstnotes{
\sstitemlist{
\sstitem
The argument list should not be changed.
\sstitem
There is no error checking of the FITSIO status.
}
}
\sstdiytopic{
Prior Requirements
}{
The NDF and the FITS file must already be open. The current
HDU in the FITS file should be the primary and the other headers
should have been written.
}
}
\sstroutine{
CVG\_NEW