source: trunk/MagicSoft/Simulation/Detector/Starfield/README@ 341

Last change on this file since 341 was 341, checked in by petry, 25 years ago
First version of the Starfield Generator in this repository. Fully functional version using the SKY2000 star catalog.
File size: 7.5 KB
Line 
1$Id: README,v 1.1 2000-01-21 13:36:36 petry Exp $
2
3STARFIELD README
4
5D. Petry, IFAE, Campus UAB, Spain
6
7
8This is the first useful version of the starfield generator (SG).
9
10Purpose:
11
12The SG is needed to simulate the non-diffuse part of the night
13sky background (NSB) in images taken by Cherenkov telescopes.
14It reads data from star catalogues (presently only SKY2000, see below)
15and calculated from the given position of the telescopes optical
16axis (in celestial coordinates), the positional and spectral data
17for each star from the catalog, how many photons of which wavelength
18(presently 290 nm - 800 nm are simulated) will hit a circular surface
19of given radius ("mirror radius") in a given time ("integration time").
20For each photon the director cosines are calculated.
21Arrival time, wavelength and ground position are randomized within the
22integration time, the four wavebands (U, B, V, R) and the mirror area
23respectively with flat distributions.
24
25SG finally writes the generated photons into a binary file of
26CORSIKA format which can be read by the "Reflector" simulation.
27The output form the Reflector can then be fed to the camera.
28
29The camera will pixelize the photons and calculate the average
30NSB photon rate for each pixel. From this, the camera can then
31generate the NSB contribution in each shower image using a Poisson
32random generator (at present, 21-1-2000, this is not yet implemented
33but it will be very soon) and also taking into account the
34atmospheric extinction and its dependence on the zenith angle.
35
36
37Installation and first test:
38
391) Adjust the Makefile to your system and type
40
41 make depend
42 make
43
44 The result should be an executable named "starfield"
45
462) Download the star catalog:
47
48 ftp cdsarc.u-strasbg.fr
49
50 (log in as user anonymous)
51
52 cd pub/cats/V/102
53 prompt
54 hash
55 bin
56 mget sky*.dat.gz
57 bye
58
593) Unzip the 24 files you have downloaded and put them into some permanent
60 directory e.g. the Data directory of the Monte Carlo source code.
61
624) Edit the parameter file. The distribution includes an
63 example file named "starfield.par" which looks like this:
64
65 Starfield Generator Parameters, Date: 21-1-2000, Comment: Example (Crab Nebula)
66 Center of FOV: ira_hours ira_min ira_sec idec_degrees idec_arcmin dec_arcsec:
67 05 34 32 +22 00 52.1
68 Radius of the FOV for the catalog readout (degrees):
69 2.0
70 Integration time for the calculation of the number of photons (seconds):
71 50e-9
72 Mirror radius for the generation of random impact points (meters):
73 10.0
74 Path inside which the star catalog data can be found:
75 /usr/users/xf/stardata
76 Verbosity level (0 = not verbose, 1 = verbose, 2 = very verbose, 3 = very very ...):
77 0
78
79 Note that the there is a header line followed by pairs of an explanatory
80 line and a data line. You may write in the header line and the explanaroy
81 lines whatever you like, but the data lines matter. The lines may be as long
82 as you like but don't add any carriage returns.
83
84 For a first test run, you will only have to edit the path for the
85 star data which is the one defined by yourself in step (3).
86
87
885) Test run.
89 Run the program by entering
90
91 starfield
92
93 The diagnostic output to the screen should be ending with
94
95 Opened starfield.par for reading ...
96 Starfield Generator Parameters, Date: 21-1-2000, Comment: Example (Crab Nebula)
97 Position RA DEC: 5 34 32 22 0 52.1
98 FOV Radius:2 degrees
99 Integration Time:5e-08 s
100 Mirror Radius:10 m
101 Catalog Data Path: ... your path ...
102 Verbosity: 0
103 SKY2000 - Master Star Catalog - Star Catalog Database, Version 2
104 Sande C.B., Warren W.H.Jr., Tracewell D.A., Home A.T., Miller A.C.
105 <Goddard Space Flight Center, Flight Dynamics Division (1998)>
106 Opened file ...your path.../sky04.dat for reading ...
107 EOF reached; accepted 0 stars from this segment.
108 Opened file ...your path.../sky05.dat for reading ...
109 Warning: star no. 53701440 is bright (Vmag =3, Bmag = 2.85)
110 and has no Umag measurement. Estimated Umag is 2.2395
111 EOF reached; accepted 120 stars from this segment.
112 Opened file ...your path .../sky06.dat for reading ...
113 EOF reached; accepted 0 stars from this segment.
114 Accepted 120 stars in total.
115 Writing binary Cherenkov file ./cer050220 ...
116 Done.
117 Writing binary statistics file ./sta050220 ...
118 Done.
119
1206) Using the output.
121 The two output files (in this case cer050220 and sta050220) are
122 of the same format as the file for a single event in the CORSIKA
123 shower simulation. The number in the name is generated from the
124 RA (h) and DEC (deg) of the telescope position in order to allow
125 a distinction.
126
127 The further processing has to be done with the reflector.
128 A sample parameter file for the reflector is the following:
129
130 reflector 0.3 -*- sh -*-
131 #
132 # Sample parameters file
133 #
134 verbose_level 2
135 #
136 fixed_target 0. 0.
137 ct_file ../Data/magic.def
138 output_file starfield.rfl
139 atm_model ATM_NOATMOSPHERE
140 data_paths 1
141 ... the diretory in which the output of starfield is found
142 end_file
143
144 Note that the line "fixed_target 0. 0." is a must.
145 Also the line "atm_model ATM_NOATMOSPHERE" is necessary
146 because the extinction will be simulated in the camera (see above).
147
1487) Notes on the input parameters of starfield
149
150 a) Center of FOV: ira_hours ira_min ira_sec idec_degrees idec_arcmin dec_arcsec:
151
152 Here you can put any valid celestial coordinates on the sky.
153 The program doesn't veto invalid coordinates yet, but the result
154 is undefined.
155
156 b) Radius of the FOV for the catalog readout (degrees):
157
158 This should be a number larger than the outermost radius of the
159 CT's field of view (FOV), but not too much larger because there
160 is a limit to the number of photons which can be stored by the
161 program and the number of generated photons grows with the number
162 of stars in the FOV. If you hit the limit, try decreasing the
163 integration time.
164
165 c) Integration time for the calculation of the number of photons (seconds):
166
167 Since we are dealing with a ray-tracing approach, we need actual
168 individual photons, not just rates. This integration time is needed
169 in order to normalize the numbers of generated photons for each star.
170 The camera program will later calculate the photon rates for each
171 pixel by dividing by this number.
172
173 Not that this number is given in seconds, but only up to about 100 ns
174 make sense, i.e. you have to write something like 100e-9
175
176 d) Mirror radius for the generation of random impact points (meters):
177
178 This number is needed for the flux normalization and the generation
179 of the ground impact points of the photons. Adjust it to the size
180 of the simulated telescope.
181
182 e) Path inside which the star catalog data can be found:
183
184 This is the directory containing the SKY2000 data (see point 3)
185
186 f) Verbosity level (0 = not verbose, 1 = verbose, 2 = very verbose, 3 = very very ...):
187
188 Set this value to 0 for normal usage. Increase it to discover
189 what is going on in detail.
190
1918) parameter file name
192
193 starfield accepts as its only command line argument the name
194 of the parameter file. Typing
195
196 starfield my.par
197
198 will make starfield look for the parameter file "my.par" in
199 the current directory. If no argument is given, it assumes the
200 name of the parameter file is "starfield.par".
201
202
203
204
205
Note: See TracBrowser for help on using the repository browser.