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

Last change on this file since 13363 was 431, checked in by harald, 24 years ago
Oscar changed the code just to run it on alpha machines. I just commit the changes due to problems with the repository.
File size: 7.6 KB
Line 
1$Id: README,v 1.2 2000-09-21 10:08:10 harald 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 and also taking into account the
33atmospheric extinction and its dependence on the zenith angle.
34
35
36Installation and first test:
37
381) Adjust the Makefile to your system and type
39
40 make depend
41 make
42
43 The result should be an executable named "starfield"
44
452) Download the star catalog:
46
47 ftp cdsarc.u-strasbg.fr
48
49 (log in as user anonymous)
50
51 cd pub/cats/V/102
52 prompt
53 hash
54 bin
55 mget sky*.dat.gz
56 bye
57
583) Unzip the 24 files you have downloaded and put them into some permanent
59 directory e.g. the Data directory of the Monte Carlo source code.
60
614) Edit the parameter file. The distribution includes an
62 example file named "starfield.par" which looks like this:
63
64 Starfield Generator Parameters, Date: 21-1-2000, Comment: Example (Crab Nebula)
65 Center of FOV: ira_hours ira_min ira_sec idec_degrees idec_arcmin dec_arcsec:
66 05 34 32 +22 00 52.1
67 Radius of the FOV for the catalog readout (degrees):
68 2.0
69 Integration time for the calculation of the number of photons (seconds):
70 50e-9
71 Mirror radius for the generation of random impact points (meters):
72 10.0
73 Path inside which the star catalog data can be found:
74 /usr/users/xf/stardata
75 Verbosity level (0 = not verbose, 1 = verbose, 2 = very verbose, 3 = very very ...):
76 0
77 Output file name, starfiel will generate cerXXXX and staXXXXX
78 CrabNebula
79
80 Note that the there is a header line followed by pairs of an explanatory
81 line and a data line. You may write in the header line and the explanaroy
82 lines whatever you like, but the data lines matter. The lines may be as long
83 as you like but don't add any carriage returns.
84
85 For a first test run, you will only have to edit the path for the
86 star data which is the one defined by yourself in step (3).
87
88
895) Test run.
90 Run the program by entering
91
92 starfield
93
94 The diagnostic output to the screen should be ending with
95
96 Opened starfield.par for reading ...
97 Starfield Generator Parameters, Date: 21-1-2000, Comment: Example (Crab Nebula)
98 Position RA DEC: 5 34 32 22 0 52.1
99 FOV Radius:2 degrees
100 Integration Time:5e-08 s
101 Mirror Radius:10 m
102 Catalog Data Path: ... your path ...
103 Verbosity: 0
104 SKY2000 - Master Star Catalog - Star Catalog Database, Version 2
105 Sande C.B., Warren W.H.Jr., Tracewell D.A., Home A.T., Miller A.C.
106 <Goddard Space Flight Center, Flight Dynamics Division (1998)>
107 Opened file ...your path.../sky04.dat for reading ...
108 EOF reached; accepted 0 stars from this segment.
109 Opened file ...your path.../sky05.dat for reading ...
110 Warning: star no. 53701440 is bright (Vmag =3, Bmag = 2.85)
111 and has no Umag measurement. Estimated Umag is 2.2395
112 EOF reached; accepted 120 stars from this segment.
113 Opened file ...your path .../sky06.dat for reading ...
114 EOF reached; accepted 0 stars from this segment.
115 Accepted 120 stars in total.
116 Writing binary Cherenkov file ./cerCrabNebula ...
117 Done.
118 Writing binary statistics file ./staCrabNebula ...
119 Done.
120
1216) Using the output.
122 The two output files (in this case cerCrabNebula and staCrabNebula) are
123 of the same format as the file for a single event in the CORSIKA
124 shower simulation. The number in the name is generated from the
125 RA (h) and DEC (deg) of the telescope position in order to allow
126 a distinction.
127
128 The further processing has to be done with the reflector.
129 A sample parameter file for the reflector is the following:
130
131 reflector 0.3 -*- sh -*-
132 #
133 # Sample parameters file
134 #
135 verbose_level 2
136 #
137 fixed_target 0. 0.
138 ct_file ../Data/magic.def
139 output_file starfield.rfl
140 atm_model ATM_NOATMOSPHERE
141 data_paths 1
142 ... the diretory in which the output of starfield is found
143 end_file
144
145 Note that the line "fixed_target 0. 0." is a must.
146 Also the line "atm_model ATM_NOATMOSPHERE" is necessary
147 because the extinction will be simulated in the camera (see above).
148
1497) Notes on the input parameters of starfield
150
151 a) Center of FOV: ira_hours ira_min ira_sec idec_degrees idec_arcmin dec_arcsec:
152
153 Here you can put any valid celestial coordinates on the sky.
154 The program doesn't veto invalid coordinates yet, but the result
155 is undefined.
156
157 b) Radius of the FOV for the catalog readout (degrees):
158
159 This should be a number larger than the outermost radius of the
160 CT's field of view (FOV), but not too much larger because there
161 is a limit to the number of photons which can be stored by the
162 program and the number of generated photons grows with the number
163 of stars in the FOV. If you hit the limit, try decreasing the
164 integration time.
165
166 c) Integration time for the calculation of the number of photons (seconds):
167
168 Since we are dealing with a ray-tracing approach, we need actual
169 individual photons, not just rates. This integration time is needed
170 in order to normalize the numbers of generated photons for each star.
171 The camera program will later calculate the photon rates for each
172 pixel by dividing by this number.
173
174 Not that this number is given in seconds, but only up to about 100 ns
175 make sense, i.e. you have to write something like 100e-9
176
177 d) Mirror radius for the generation of random impact points (meters):
178
179 This number is needed for the flux normalization and the generation
180 of the ground impact points of the photons. Adjust it to the size
181 of the simulated telescope.
182
183 e) Path inside which the star catalog data can be found:
184
185 This is the directory containing the SKY2000 data (see point 3)
186
187 f) Verbosity level (0 = not verbose, 1 = verbose, 2 = very verbose, 3 = very very ...):
188
189 Set this value to 0 for normal usage. Increase it to discover
190 what is going on in detail.
191
192 g) Output file name, starfiel will generate cerXXXX and staXXXXX
193
194 This the key name for the output files
195
1968) parameter file name
197
198 starfield accepts as its only command line argument the name
199 of the parameter file. Typing
200
201 starfield my.par
202
203 will make starfield look for the parameter file "my.par" in
204 the current directory. If no argument is given, it assumes the
205 name of the parameter file is "starfield.par".
Note: See TracBrowser for help on using the repository browser.