-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathICD_mkgrmf_ard_1.0.0.tex
723 lines (617 loc) · 21.4 KB
/
ICD_mkgrmf_ard_1.0.0.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
\documentclass[twoside]{article}
%\documentstyle[11pt]{article}
\usepackage{hyperref}
\usepackage{graphicx}
\usepackage{array}
%%%%%%%%%%%% DRAFT setting %%%%%%%%%%%%%%%%%%
%% Comment out the following three lines for actual versions
%\usepackage{draftwatermark}
%\SetWatermarkText{Draft}
%\SetWatermarkScale{5}
%%%%%%%%%%%% DRAFT setting %%%%%%%%%%%%%%%%%%
\textwidth=6.5in
\textheight=8.9in
\topmargin=-0.5in
\oddsidemargin=0in
\evensidemargin=0in
\def\nodata{ ~$\cdots$~ }
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% To change the margins of a document within the document,
% modifying the parameters listed on page 163 will not work. They
% can only be changed in the preamble of the document, i.e, before
% the \begin{document} statement. To adjust the margins within a
% document we define an environment which does it:
\newenvironment{changemargin}[2]{\begin{list}{}{
\setlength{\topsep}{0pt}\setlength{\leftmargin}{0pt}
\setlength{\rightmargin}{0pt}
\setlength{\listparindent}{\parindent}
\setlength{\itemindent}{\parindent}
\setlength{\parsep}{0pt plus 1pt}
\addtolength{\leftmargin}{#1}\addtolength{\rightmargin}{#2}
}\item }{\end{list}}
% This environment takes two arguments, and will indent the left
% and right margins by their values, respectively. Negative values
% will cause the margins to be widened, so
% \begin{changemargin}{-1cm}{-1cm} widens the left and right margins
% by 1cm.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\newcommand{\Header}[2]{
\pagestyle{myheadings} %%%%%%%%%%
\markboth{\bf \qquad #1 \hfill #2 \qquad}%%%%%%%%%%
{\bf \qquad #1 \hfill #2 \qquad}%%%%%%%%%%
}
%%%%%%%%%%%%%%%%%%%%%% END dph useful macros %%%%%%%%%%--------------
%%%
%%% Look for occurrences of five pound characters: #####, to locate places
%%% where updates are necessary
%%%
%%%
%%% revision info
%%%
\newcommand{\Revision}{\mbox{\em%
%%%
%%% ##### Update the revision information
%%%
%Revision 0.0---16 Mar 2001 % my first draft, uncirculated
%Revision 0.1.1---27 Mar 2001 % Format change incorporated
%Revision 0.1.2---02 May 2001 % Four Columns added
%Revision 0.2.1---28 Dec 2001 % Comments incorperated
Revision 1.0.0---04 Feb 2021 % Fix errors in functions, improve explanation on EE_FRACS
%Revision 1.2.0 15 Dec 1999 % Comments incorperated
%Revision 1.0---02 Feb 1998 % reviewed, updated.
}}
\hyphenation{pipe-line}
\hyphenation{pipe-lines}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\Header{Data Product Interface Document: /}{\Revision}
\begin{document}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%
%%% title stuff, no need to change anything
%%%
\begin{titlepage}
\begin{tabular}{p{0.5\textwidth}>{\raggedleft}p{0.5\textwidth}}
\includegraphics[height=8cm]{Kavli_Logo} & \includegraphics[height=8cm]{cxc-logo}
\end{tabular}
\begin{center}
\vspace*{.5in}
{\Huge\bf Chandra X-ray Center}
\vspace*{1in}
{\LARGE\bf Data Product Interface Document:}
\vspace*{.2in}
{\LARGE\bf mkgrmf LSF Input Data}
\vspace*{.2in}
\Revision
\vfill
\begin{tabular}{|l|l|}
\hline
version & author\\\hline\hline
1.0.0 & H. M. G\"unther\\\hline
0.2.1 & David S. Davis\\\hline
0.1.2 & David S. Davis\\\hline
0.1.1 & David S. Davis\\\hline
\end{tabular}
\end{center}
\begin{tabular}{ll}
\textbf{To:} & Jonathan McDowell, SDS Group Leader\\
& Janet DePonte Evans, DS Software Development Manager\\
& Dale Graessele, CALDB manager\\
\end{tabular}
\end{titlepage}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%
%%% update info
%%%
\pagenumbering{roman}\setcounter{page}{2}
%%%
%%% ##### update as necessary
%%%
\begin{center}
\begin{tabular}{|c|c|c|p{2.5in}|} \hline
\multicolumn{4}{|c|}{}\\[1mm]
\multicolumn{4}{|c|}{\bf Document and Change Control Log}\\[3mm]\hline
{\bf Date} & {\bf Version} & {\bf Section} & {\bf Status} \\ \hline
19 Mar 2001& 0.1.0 & all&Initial Draft \\\hline
23 Apr 2001& 0.1.1 & all&Format Changes \\\hline
02 May 2001& 0.1.2 & all&Four columns added \\\hline
21 Sep 2001& 0.2.0 & all&Revised \\\hline
28 Dec 2001& 0.2.1 & all&Revised \\\hline
15 Jan 2021& 1.0.0 & all & Bring definitions of functions in line with CIAO practice, add ACIS-I and HRC-I as detectors. Address Defocus.\\\hline
%04 Feb 99& 1.1.0& all&Revived as a separate document \\\hline
%30 Apr 99& 1.1.1& 4.1&Added enumerated axis or radial coord\\\hline
%30 Apr 99& 1.1.1& 4.1&changed TTYPE names\\\hline
%14 Jun 99& 1.2.0& all&Revised document using comments from DPH,KJG,AR
%and JCM\\\hline
%
\hline
%
\end{tabular}
\end{center}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%
%%% table of contents, list of tables
%%%
\tableofcontents
\clearpage
% \listoftables
% \clearpage
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\pagenumbering{arabic}
\section{Introduction}
This document describes the interface to be employed in accessing
the PSF Library products, according to the requirements stipulated in
Applicable Document~\ref{appdoc:se03}.%
%
\subsection{Purpose}
The purpose of this document is to define the input data for the Line
Spread Function (generically referring to LSF) Library to be used in
Level 2 processing for the grating RMF generator (mkgrmf).
%
\subsection{Scope}
This interface shall apply to all Grating specific LSF
data products used by the tool {\tt mkgrmf}
and distributed to the CXC Data
Archive during the course of
the Chandra mission.
\section{Applicable Documents}
The Applicable Documents required for background and detail on
grating products are as follows:
\begin{enumerate}
\item\label{appdoc:data-prod}
AXAF Data Products Guide:\newline
\url{https://cxc.cfa.harvard.edu/ciao/data_products_guide/}
\item\label{appdoc:coord}
AXAF Coordinate Systems:\newline
\url{https://cxc.cfa.harvard.edu/ciao/manuals.html} (see section General - Chandra Coordinate Systems)
\item\label{appdoc:se03}
ASC AMO-2400 (SE03):\newline
ASC Data System Requirements (ASC.302.93.0008)
\item\label{appdoc:ds01}
ASC AMO-2401 (DS01) \newline
ASC Data System Software Design (ASC.500.93.0006)
\item\label{appdoc:fitsstd}
HEASARC FITS Standards:\newline
\url{https://heasarc.gsfc.nasa.gov/docs/heasarc/ofwg/ofwg_recomm.html}
\item\label{appdoc:ascfits}
ASC FITS File Designers' Guide:\newline
\url{https://cxc.cfa.harvard.edu/contrib/arots/fits/ascfits.ps}
\item\label{appdoc:heasarccaldb}
HEASARC FITS CALDB Standards:\newline
\url{https://heasarc.gsfc.nasa.gov/docs/heasarc/caldb/caldb_doc.html}
\item\label{appdoc:asccaldb}
AXAF CALDB Architecture\newline
\url{https://cxc.cfa.harvard.edu/caldb/index.html}
\end{enumerate}
% synopsis for editing purposes...
%
% 1 appdoc:data-prod AXAF Data Products Guide
% 2 appdoc:coord AXAF Coordinate Systems
% 3 appdoc:se03 ASC AMO-2400 (SE03)
% 4 appdoc:ds01 ASC AMO-2401 (DS01)
% 7 appdoc:ascfits ASC FITS Designers' Guide
% 5 appdoc:fitsdef NOST 100-1.1, Definition of the FITS
%
% 6 appdoc:fitsstd HEASARC FITS Standards:
% 8 appdoc:hrcicd HRC Data Products Guide:
% 9 appdoc:acisicd ACIS Data Products Guide:
\section{Functional Description}
\subsection{Data Content Summary}
All Grating LSF Library files shall
consist of data files conforming to the FITS format (Applicable
Document~\ref{appdoc:fitsstd}). These files
contain header keyword entries and binary table (BINTABLE) extensions.
These files will contain a primary header, possibly null, followed
by a set of binary tables as described in Applicable
Document~\ref{appdoc:ascfits}. In addition, these files will conform to the
HEASARC CALDB conventions (Applicable Document~\ref{appdoc:heasarccaldb}) and
have CONTENT, EXTNAME, and HDUCLASS keywords that conform to
Applicable Document~\ref{appdoc:asccaldb}.
\subsection{Recipients and Utilization}
The primary recipients, via distribution from the archive, of the LSF
Library are Chandra observers, who will utilize these data products for
scientific data analysis. The CXC may also make use of specific LSF
Library data products for instrument calibration, instrument and/or
spacecraft monitoring and trends analysis, and validation and
verification of the Level 0, Level 1, and Level 1.5 software and of
the data products themselves.
\subsection{Pertinent Relationships with Other Interfaces}
Changes to the definition of CXC FITS, as described in Applicable
Documents~\ref{appdoc:ascfits}, may affect the format of the PSF data
products described in the current document.
\section{Assumptions and Constraints}
It is assumed that these products are placed into an exportable calibration database
(CALDB) for users.
\subsection{Products Not Covered}
PSF products that are used for maintenance and diagnostic purposes
(those that are not supplied to the user for scientific data
analysis), or which are generic AXAF Level 2 products, are not
currently included within the interface defined by this document.
\subsection{Substructure Definition and Format}
The header components for the primary header and all binary table
extensions are defined and listed in the Applicable Documents. In
general, the column or row numbers in the example FITS headers
are arbirary unless otherwise indicated. It is the column name and
its attributes that specify the requirment. Additional columns not
specified here may be added to the file also long as they do not
violate the interface. Software used to process the data can
ignore the additional columns, copy them to the output file, or
optional use them for data processing. Likewise, HDU order is
arbitrary, except for the primary HDU which must be first. HDUs
are intended to be referenced by name, not position.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\section{Access}
\subsection{Access Tools; Input/Output Protocol}
Since LSF Library products obey the formatting rules described in
Applicable Documents~\ref{appdoc:ascfits},
they may be accessed by any software that conforms to those standards,
including all versions of the FITSIO libraries that support the
BINTABLE extension. In addition, since they adhere to HEASARC
standards (Applicable Document~\ref{appdoc:fitsstd}), LSF data product
files are compatible with the input/output routines that constitute
the CXC data interface.
\subsection{Retrieval from the CALDB}
The LSF input data isassumed to be placed in the CALDB, and the CALDB
specification determines keywords and other pertinent information
required for this purpose (Applicable Document~\ref{appdoc:asccaldb}
and any subsequent updates). To help read the FITS file headers
though, a few informational remarks are in order:
\begin{itemize}
\item For the HRC, the DETNAM is set to either HRC-I or HRC-S. On
the other hand, for ACIS, the DETNAM is not one of the columns
that the CALDB uses. Instead, the SIM\_Z values is used to
distinguish between ACIS-S and ACIS-I.
\item LSFs calculated with different settings of RAND\_TG can be
stored in different files with different applicable keywords, such
that the correct version can be retried from the CALDB by the
user.
\end{itemize}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\section{The File Structure for the Grating LSF Data}
This section describes the LSF parameter library which is a FITS file
containing the LSF fit parameters for the Chandra gratings. Each file
will contain the parameters for one grating type. The * in the table
below denotes the ASC principal HDU.
\begin{table}[h]
{\footnotesize
\noindent\begin{tabular}{|llcccccp{1.2in}|}\hline
HDU
& \sc HDU Type
& \sc EXTNAME
& \sc EXTVER
& \sc CONTENT
& \sc HDUCLAS1
& \sc HDUCLAS3
& Description
\\
\hline
%
0
& \sc NULL
& \nodata
& \nodata
& \nodata
& \nodata
& \nodata
& \nodata
\\
%
1 (*)
& \sc BINTABLE
& \sc MEG
& 1
& \sc LSF\_PARAM
& RESPONSE
& \sc LSF
& LSF coefficients
\\
%
\\\hline
%
\end{tabular}
}% close \small
\caption{File structure for the table with the LSF fit coefficients}
\label{tab:fstruct}
\end{table}
%
\subsection{File Names}
The filename convention shall be
$$\{ det\} \{grat\}\{order\}D \{date\} lsfparmN\{version\}.fits$$
where $\{det\}$ is one $aciss$, $hrcs$, $acisi$, or $hrci$ and $\{grat\}$ is one of $leg$, $meg$,
or $heg$. $\{order\}$ gives the diffraction order of the grating. Negative orders are prefixed with ``-''; positive orders have no sign, i.e. ``-1'' and ``1'' are the negative and positive first diffraction order, respectively.
$\{date\}$ follows the date convention in Applicable
Document~\ref{appdoc:ascfits}.
As an example the lsf file for the HRC-S using the LETG grating should
be of the form \\\mbox{\texttt{hrcsleg1D1999-07-22lsfparmN0000.fits}}
while the file for the MEG using ACIS-S should be
\\\mbox{\texttt{acissmeg1D1999-07-22lsfparmN0001.fits}}.
\subsection{Column Descriptions}
\begin{table}[h]
\begin{center}
{\small
\begin{tabular}{|c|c|c|c|c|c|p{1.8in}|}
\hline
& & & & & & \\
\#
& TTYPE
& TUNIT
& TFORM
& TLMIN
& TLMAX
& \multicolumn{1}{|c|}{Comment}\\
& & & & & & \\\hline
%
1
& NUM\_WIDTHS
&
& I
& 0
& \sc TBD
& Number of Extraction Widths \\\hline
%
2
& WIDTH
& Degrees
& 3E
& 0
& \sc TBD
& Extraction Width \\\hline
%
3
& NUM\_LAMBDAS
&
& J
& 0
& \sc TBD
& Number of wavelength points \\\hline
%
4
& TG\_LAM\_LO
& Angstroms
& nD
& $0.0$
& \sc TBD
& Low wavelength of the extraction region\\\hline
%
5
& TG\_LAM\_HI
& Angstroms
& nD
& $0.0$
& \sc TBD
& High wavelength of the extraction region\\\hline
%
6
& LAMBDAS
& Angstroms
& nD
& $0.0$
& \sc TBD
& Input Photon Wavelength \\\hline
%
7
& EE\_FRACS
& N/A
& mD
& $0.0$
& $1.0$
& Encircled Energy fraction\\\hline
%
8
& GAUSS$i$\_PARMS
& N/A
& kE
& N/A
& N/A
& vector containing Gaussian parameters\\\hline
%
9
& LORENTZ$i$\_PARMS
& N/A
& kE
& N/A
& N/A
& vector containing Lorentzian parameters\\\hline
%
10
& THETA\_MIN
& degrees
& E
& 0
& N/A
& min off-axis angle\\\hline
%
11
& THETA\_MAX
& degrees
& E
& 0
& N/A
& max off-axis angle for which this is valid\\\hline
%
12
& PHI\_MIN
& degrees
& E
& 0
& N/A
& min azimuthal angle for which this is valid\\\hline
%
13
& PHI\_MAX
& degrees
& E
& 0
& N/A
& max azimuthal angle for which this is valid\\\hline
%
14
& SIM\_X\_MIN
& mm
& E
& -9
& +10
& minimum SIM\_X (focus) for which this is valid\\\hline
%
15
& SIM\_X\_MAX
& mm
& E
& -9
& +10
& maximum SIM\_X (focus) for which this is valid\\\hline
%
\end{tabular}
}% close \small
\caption{Binary table with the LSF fit coefficients}
\label{tab:parms}
\end{center}
\end{table}%
Multiple parameter
sets are allowed for 8 and 9. So for instance, LSFs descrbied by two Gaussian components will have columns named GAUSS1\_PARM and GAUSS2\_PARM.
Also, n is the number of wavelengths, m is 3$\times$n, and k is
3$\times$n$\times$NUM\_WIDTHS.
%
\subsubsection{Comments on the Columns}
The {\tt NUM\_WIDTH} column give the number of widths for which the LSF
was extracted and tabulated. In the current incarnation
this value is three for the MEG and HEG files. For the LETG only one
width is currently implemented.
The {\tt WIDTH} column gives the width, in degrees, of the extraction
region used to extract the LSF data. The next column gives the
number of wavelengths at which the LSF is tabluated. Currently these
must be the same for each extraction width and are assumed to be in
angstroms. The columns {\tt TG\_LAM\_LO} and {\tt TG\_LAM\_HI} give
that lower and upper wavelength of the box that was used to extract
the LSF data. The {\tt LAMBDA} column gives the wavelength of the peak
position of the LSF.
The encircled energy fraction is tablulated in the {\tt EE\_FRAC}
column. The vector column containing the EE\_FRAC is a
2-dimensional vector with the ee\_frac for each wavelength as a vector
and additional rows are for the ee\_frac for each different width as
defined above. This means that the dimensionality of the vector will
be num\_lambdas $\times$ num\_widths.
%$$ \sum_{j=0}^{num\_widths-1} \sum_{i=0}^{num\_lambdas-1}
%{\rm ee\_vector}(i+j) = ee\_frac(i,j)$$
%
%Each of the vectors containing the LSF fits parameters are
%arranged as a matrix and are 3 x NUM\_LAMBDAS x NUM\_WIDTHS.
%For the Gaussian parameters
%
%$$ \sum_{i=0}^{num\_widths-1} \sum_{j=0}^{num\_lambdas-1} \sum_{k=0}^2
%{\rm Gaussian\_parms\_vector}(i+j+k) = {\rm gauss\_parms}(i,j,k)$$
%
The columns for the fit parameters shall be a matrix of
n$\times$j$\times$k where n is the number of parameters and
their order is
\begin{enumerate}
\item gauss\_parms(0,j,k) = Gaussian amplitude,
\item gauss\_parms(1,j,k) = Gaussian $\sigma$ in \AA,
\item gauss\_parms(2,j,k) = peak position in \AA.
\end{enumerate}
The number of elements is given by $j$ and the maximum value of $j$ is
NUM\_LAMBDAS. The number of widths is given by $k$. The function
parameters at a given j must be for
the wavelength range TG\_LAM\_LO(j) and TG\_LAM\_HI(j) and the maximum
value of $j$ is given by NUM\_WIDTHS.
%
%For the Lorentzian parameters
%
%$$ \sum_{i=0}^{num\_widths-1} \sum_{j=0}^{num\_lambdas-1}
%{\rm \sum_{k=0}^2 Lorentzian\_parms\_vector}(i+j+k) =
%{\rm lore\_parms}(i,j,k)$$
%
For the Lorenzian parameters the order of the parameters in the matrix
shall be
\begin{enumerate}
\item lorentzian\_parms(0,j,k) = Lorentzian amplitude,
\item lorentzian\_parms(1,j,k) = Lorentzian FWHM in \AA,
\item lorentzian\_parms(2,j,k) = peak position in \AA,
\end{enumerate}
with the $j$, $k$ obeying the convention for the Gaussian
parameters above.
\subsection{Allowed Functional Forms}
The functional forms that are allowed for the LSF in mkgrmf are
currently a Gaussian and a Lorentzian.
\begin{equation}\label{eqn:gauss}
G(r) = \frac{A}{\sqrt{2\pi\sigma^2}} e^{\frac{-(r-r_0)^2}{2\sigma^2}}
\end{equation}
where $A$ is the amplitude, $\sigma$ is the Gaussian width in
angstroms and $r_0$ is the peak of this component of the LSF.
\begin{equation}\label{eqn:lorentz}
L(r) = \frac{A}{2\pi} \frac{FWHM}{(r - r_0)^2 + \left(\frac{FWHM}{2}\right)^2)}
\end{equation}
where $A$ is the amplitude, $r_0$ is the peak position of the
Lorenztian component in questions, which need not be the same any of
the other compoments, and $FWHM$ is the full width of the line profile
at half the maximum.
\subsection{Normalization of components}
All Gaussian and Lorentzian components have an ampitude defined in
their parameters. However, the total normalization of each RMF is
given by the \texttt{EE\_FRACS} column. That means that for LSFs
defined by just a single component, the given component amplitude is
arbitrary. For LSFs with multiple components the amplitude of each
component only matters in a relative sense: After adding up all LSF
components, the LSF is normalized such that the sum over all channels
is the number given in the \texttt{EE\_FRACS} column. If, for example,
all amplitudes $A$ are doubled but the \texttt{EE\_FRACS} values is
constant, the resulting LSF does not change.
\subsection{Size Estimates}
The ASC primary extension of each file will have 15-20 columns to
describe the LSF parameters at each energy (depending on how many
components are used). The vector columns are real floating point
numbers so the size of the file can be estimated by the number of
entries $\times$ 11 (the number of vector columns). So for a typical
MEG LSF file with $\sim$2500 entries the size of the data area should
be 30-50 MB.
\section{FITS Header Templates}
The following header sections are examples, based on the ASC FITS file
specification and the format of CALDB v4. The following header
sections have been taken from the ASC FITS file specifications. The
example FITS headers given here are examples only, the column numbers,
axis numbers, and keyword values are {\it not} necessarily those in
the LSF data files.
\subsection{Content description and observation component}
\begin{verbatim}
CREATOR = 'makelsftable.py' / Version 1.0 by H. Moritz Guenther
DATE = '2004-03-19T21:55:51' / file creation date (YYYY-MM-DDThh:mm:ss UTC)
CONTENT = 'CDB_LEG_LSFPARM' /
HDUCLASS= 'ASC ' /
HDUCLAS1= 'PARAMETERS' /
HDUCLAS2= 'PSF ' /
HDUCLAS3= 'LSF ' /
TELESCOP= 'CHANDRA ' /
FILTER = 'NONE ' /
GRATING = 'LETG ' /
GRATTYPE= 'LEG ' /
TG_M = 1 /
ORDER = 1 /
SHELL = '1111 ' /
RAND_TG = 0.00000 /
DETNAM = 'ACIS-S ' /
INSTRUME= 'ACIS ' /
CCLS0001= 'CPF ' /
CDTP0001= 'DATA ' /
CCNM0001= 'LSFPARM ' /
CVSD0001= '1999-07-22T00:00:00' /
CVST0001= '00:00:00' /
CDES0001= 'LEG line spread function, input for mkgrmf' /
\end{verbatim}
\subsection{CALDB keywords}
\begin{verbatim}
CBD10001= 'ORDER(1)'
CBD20001= 'RAND_TG(0.0)'
CBD30001= 'SHELL(1111)'
CBD40001= 'SIM_Z(-206.8000030518:-174.1999969482)mm'
CBO10001= 'GRATING(LETG)'
CBO20001= 'GRATTYPE(LEG)'
CBO30001= 'TG_M(1) '
FDLT0001= 0.0000000000000E+00 / Calibration fidelity or precision
CAL_QUAL= 0 / Calibration quality 0-5 integer
\end{verbatim}
\end{document}