Blame view

src/idl/dustem_plugin_stellar_population.pro 215 KB
97d9335d   Annie Hughes   moved location of...
1
FUNCTION dustem_plugin_stellar_population, key=key, val=val, scope=scope, paramtag=paramtag,help=help,test=test
4750086c   Ilyes Choubani   nouvelle philosph...
2
3
4

;+
; NAME:
cbf75ef0   Ilyes Choubani   dustem_init_plugi...
5
;    dustem_plugin_stellar_population
4750086c   Ilyes Choubani   nouvelle philosph...
6
; PURPOSE:
bffa7018   Ilyes Choubani   update
7
;    replaces the default DUSTEM ISRF with a composite stellar spectrum
4750086c   Ilyes Choubani   nouvelle philosph...
8
9
10
; CATEGORY:
;    DUSTEM Wrapper
; CALLING SEQUENCE:
bffa7018   Ilyes Choubani   update
11
;    dustem_plugin_stellar_population(key=key,val=val)
4750086c   Ilyes Choubani   nouvelle philosph...
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
; INPUTS:
;    None
; OPTIONAL INPUT PARAMETERS:
;    key  = input parameter number
;    val  = input parameter value
; OUTPUTS:
;    None
; OPTIONAL OUTPUT PARAMETERS:
;    None
; ACCEPTED KEY-WORDS:
;    help                  = if set, print this help
; COMMON BLOCKS:
;    None
; SIDE EFFECTS:
;    None
; RESTRICTIONS:
;    The dustem fortran code must be installed
;    The dustem idl wrapper must be installed
; PROCEDURE:
;    This is a dustem plugin
;-
dcf48925   Ilyes Choubani   added spectral class
33
;- HISTORY: ADDED STELLAR LUMINOSITY CLASSES
01612ee4   Ilyes Choubani   General update: I...
34

2bbb56cf   Jean-Philippe Bernard   modified to fix b...
35
36
IF keyword_set(test) THEN stop

4750086c   Ilyes Choubani   nouvelle philosph...
37
IF keyword_set(help) THEN BEGIN
cbf75ef0   Ilyes Choubani   dustem_init_plugi...
38
  doc_library,'dustem_plugin_stellar_population'
4750086c   Ilyes Choubani   nouvelle philosph...
39
40
41
  goto,the_end
ENDIF

f9089dc2   Ilyes Choubani   implementing the ...
42
IF keyword_set(scope) THEN BEGIN    
01612ee4   Ilyes Choubani   General update: I...
43
    out=0
f9089dc2   Ilyes Choubani   implementing the ...
44
    goto, the_scope
01612ee4   Ilyes Choubani   General update: I...
45
ENDIF 
4750086c   Ilyes Choubani   nouvelle philosph...
46

f9089dc2   Ilyes Choubani   implementing the ...
47
IF keyword_set(paramtag) THEN BEGIN   
01612ee4   Ilyes Choubani   General update: I...
48
    out=0
f9089dc2   Ilyes Choubani   implementing the ...
49
    goto, the_paramtag
01612ee4   Ilyes Choubani   General update: I...
50
ENDIF
955f09f4   Ilyes Choubani   Retrieving data f...
51

f9089dc2   Ilyes Choubani   implementing the ...
52
out=0;Do we need to initialize the output?
955f09f4   Ilyes Choubani   Retrieving data f...
53

4750086c   Ilyes Choubani   nouvelle philosph...
54
;===========Initializing the defaut stellar population structure===========
dcf48925   Ilyes Choubani   added spectral class
55
one_pop={radius:0.,temperature:0.,distance:0.,nstars:0.,popid:''} 
4750086c   Ilyes Choubani   nouvelle philosph...
56
57
58
59
60
61
62
63
64
65

;===========Counters===========
popnumber = 0.
counto = 0.
countb = 0.
counta = 0.
countf = 0.
countg = 0.
;==============================

4750086c   Ilyes Choubani   nouvelle philosph...
66
67
68
;===========Constants (in cgs)========== (except for the stellar population distance (in pc))
rsun2cm = 6.957e10 

4750086c   Ilyes Choubani   nouvelle philosph...
69
;================NOTA BENE========================================================================== 
f9089dc2   Ilyes Choubani   implementing the ...
70
71
72
73
74
75
76
77
78
;DATA IS NOW RETRIEVED FROM THIS TEXT FILE: "A Modern Mean Dwarf Stellar Color and Effective Temperature Sequence"  
;NB: intermediate spectral classes '.5' are not taken into account - this will probably have to change
;NB: Also contact we need to contact the reasercher who wrote the text file because he said so in it.
;Other luminosity classes Should be included (only MS so far). 
;BB approximation is a first degree 'bad' approximation because of the lack of radiative transfer especially at the 
;photosphere of stars. 
;REMARKS: BECAUSE WE STILL HAVEN'T SET THE DEFAULT VALUE FOR THE MAJORIY OF THE STELLAR POULATIONS,THE CORRESPONDING LINES ARE COMMENTED INSTEAD OF SETTING ARBITRARY VALUES. 
;CONSIDERED STARS: SPEC_TYPE(N=5) = OBAFG, LUM_CLASS(N=10) = IA+,IA,IAB,IB,II,III,IV,V,VI,VII 
;KM spectral types are not included because their UV part was not that important to excite the dust.
4750086c   Ilyes Choubani   nouvelle philosph...
79
;This will help ease and shorten the fitting procedure
f9089dc2   Ilyes Choubani   implementing the ...
80
;If the user wants to use them without having to read the entirety of this plugin please contact the DustEmWrap team. 
4750086c   Ilyes Choubani   nouvelle philosph...
81
82

IF keyword_set(key) THEN BEGIN 
01612ee4   Ilyes Choubani   General update: I...
83
       
858e1c83   Ilyes Choubani   small corrections...
84
85
    
    ;###READING OF MS DATA###
97d9335d   Annie Hughes   moved location of...
86
    file = !dustem_wrap_soft_dir+'Data/STELLARPOPS/EEM_dwarf_UBVIJHK_colors_Teff.txt'
01612ee4   Ilyes Choubani   General update: I...
87
88
    frmt = '(A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A)'

491838b5   Ilyes Choubani   Corrected comment...
89
    readcol, file, V1,V2,V3,V4,V5,V6,V7,V8,V9,V10,V11,V12,V13,V14,V15,V16,V17,V18,V20,V21,V22,V23,V24,V25,V26,V27,V28,V29,V30,V31,V32, format=frmt, delim=' ', comment='#',/nan,/silent
01612ee4   Ilyes Choubani   General update: I...
90
91
92
93
94
    ;Paramters that are needed for the BB approximation (horrible approximation even for MS stars)
    SpecType_MS = V1
    T_eff_MS = V2
    R_star_MS = V7
    
2bbb56cf   Jean-Philippe Bernard   modified to fix b...
95
96
    ;JPB: This is highly non standard and makes Fawlty go "Segmentation fault"
    ;lumclass = (strmid(key,2)).remove(-1) ; extracting the luminosity class strings 
8ef68669   Ilyes Choubani   Accounting for al...
97
98
    ;IC: Yes but we need to take into account when luminosity class is two characters and not just one. ie: IV instead of V. 
    ;But since we only have MS (V) data, (lumclass[i]=strmid(key[i],2,1)) should be ok but I'm correcting it for future input.
2bbb56cf   Jean-Philippe Bernard   modified to fix b...
99
100
    lumclass=strarr(n_elements(key))
    FOR i=0L,n_elements(key)-1 DO BEGIN
8ef68669   Ilyes Choubani   Accounting for al...
101
        lumclass[i]=strmid(key[i],2,strlen(key[i])-3)
2bbb56cf   Jean-Philippe Bernard   modified to fix b...
102
    ENDFOR
8ef68669   Ilyes Choubani   Accounting for al...
103
104
    
    
dcf48925   Ilyes Choubani   added spectral class
105
    params = strmid(key,0,/reverse_offset) ; extracting the indices (in the 'key' array) of the stellar parameters to fit  
4750086c   Ilyes Choubani   nouvelle philosph...
106
    
dcf48925   Ilyes Choubani   added spectral class
107
    ; Locating the O3 stellar population parameters - this new code structure accounts for the presence of different luminosity classes.
955f09f4   Ilyes Choubani   Retrieving data f...
108
    testo3 = strupcase(strmid(key,0,2)) EQ 'O3' ;NB: test is like this so that user can use lowercase for spectral class
dcf48925   Ilyes Choubani   added spectral class
109
    ind = where(testo3,countindo3) 
955f09f4   Ilyes Choubani   Retrieving data f...
110
111
112
113
114
115
116
117
118
119
120
    
    ; retrieveing the defaut values from the txt database
    tsto3 = strtrim(strmid(SpecType_MS,0,2),2) EQ 'O3' and strtrim(strmid(SpecType_MS,2,1),2) NE '.'
    indat  = where(tsto3,ctdato3)
    if ctdato3 ne 0 then begin
        
        T_eff_MS_o3 = double(T_eff_MS(indat))
        R_star_MS_o3 = double(R_star_MS(indat))
        
    endif
    
4750086c   Ilyes Choubani   nouvelle philosph...
121
    IF countindo3 NE 0 THEN BEGIN 
dcf48925   Ilyes Choubani   added spectral class
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
        lumclasso3 = lumclass(ind)
        nlmo3 = n_elements(lumclasso3)
        indo3_1 = fltarr(nlmo3)
        indo3_2 = indo3_1
        indo3_3 = indo3_1
        indo3_4 = indo3_1  
        countindo3_1 = indo3_1
        countindo3_2 = indo3_1 
        countindo3_3 = indo3_1
        countindo3_4 = indo3_1  
        FOR i=0L,nlmo3-1 DO BEGIN
            popnumber+=1
            counto+=1
            indo3_1[i] =  where(testo3 and params EQ 1, countindo3_1x); index of radius of this stellar population in the val array
            countindo3_1[i] = countindo3_1x
            indo3_2[i] =  where(testo3 and params EQ 2, countindo3_2x); index of temperature of this stellar population in the val array
            countindo3_2[i] = countindo3_2x
            indo3_3[i] =  where(testo3 and params EQ 3, countindo3_3x); index of distance of this stellar population in the val array
            countindo3_3[i] = countindo3_3x
            indo3_4[i] =  where(testo3 and params EQ 4, countindo3_4x); index of the nstars of this stellar population in the val array (Q: does it make sense to have an nstars>1.? If not upper limiting it in the general fitting procedure might be handy)
            countindo3_4[i] = countindo3_4x
        ENDFOR  
4750086c   Ilyes Choubani   nouvelle philosph...
144
145
146
    ENDIF
    
    ; Locating the O4 stellar population parameters
955f09f4   Ilyes Choubani   Retrieving data f...
147
    testo4 = strupcase(strmid(key,0,2)) EQ 'O4'
dcf48925   Ilyes Choubani   added spectral class
148
    ind = where(testo4,countindo4)
955f09f4   Ilyes Choubani   Retrieving data f...
149
150
151
152
153
154
155
156
157
158
    
    ; retrieveing the defaut values from the txt database
    tsto4 = strtrim(strmid(SpecType_MS,0,2),2) EQ 'O4' and strtrim(strmid(SpecType_MS,2,1),2) NE '.'
    indat  = where(tsto4,ctdato4)
    if ctdato4 ne 0 then begin
        
        T_eff_MS_o4 = double(T_eff_MS(indat))
        R_star_MS_o4 = double(R_star_MS(indat))
        
    endif
4750086c   Ilyes Choubani   nouvelle philosph...
159
    IF countindo4 NE 0 THEN BEGIN 
dcf48925   Ilyes Choubani   added spectral class
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
        lumclasso4 = lumclass(ind)
        nlmo4 = n_elements(lumclasso4)
        indo4_1 = fltarr(nlmo4)
        indo4_2 = indo4_1
        indo4_3 = indo4_1
        indo4_4 = indo4_1 
        countindo4_1 = indo4_1
        countindo4_2 = indo4_1
        countindo4_3 = indo4_1
        countindo4_4 = indo4_1
        FOR i=0L,nlmo4-1 DO BEGIN
            popnumber+=1
            counto+=1
            indo4_1[i] =  where(testo4 and params EQ 1, countindo4_1x); index of radius of this stellar population in the val array
            countindo4_1[i] = countindo4_1x
            indo4_2[i] =  where(testo4 and params EQ 2, countindo4_2x); index of temperature of this stellar population in the val array
            countindo4_2[i] = countindo4_2x
            indo4_3[i] =  where(testo4 and params EQ 3, countindo4_3x); index of distance of this stellar population in the val array
            countindo4_3[i] = countindo4_3x
            indo4_4[i] =  where(testo4 and params EQ 4, countindo4_4x); index of the nstars of this stellar population in the val array
            countindo4_4[i] = countindo4_4x
        ENDFOR
4750086c   Ilyes Choubani   nouvelle philosph...
182
183
184
    ENDIF
    
    ; Locating the O5 stellar population parameters
955f09f4   Ilyes Choubani   Retrieving data f...
185
    testo5 = strupcase(strmid(key,0,2)) EQ 'O5' 
dcf48925   Ilyes Choubani   added spectral class
186
    ind = where(testo5,countindo5)
955f09f4   Ilyes Choubani   Retrieving data f...
187
188
189
190
191
192
193
194
195
196
    
    ; retrieveing the defaut values from the txt database
    tsto5 = strtrim(strmid(SpecType_MS,0,2),2) EQ 'O5' and strtrim(strmid(SpecType_MS,2,1),2) NE '.'
    indat  = where(tsto5,ctdato5)
    if ctdato5 ne 0 then begin
        
        T_eff_MS_o5 = double(T_eff_MS(indat))
        R_star_MS_o5 = double(R_star_MS(indat))
        
    endif
4750086c   Ilyes Choubani   nouvelle philosph...
197
    IF countindo5 NE 0 THEN BEGIN
dcf48925   Ilyes Choubani   added spectral class
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
        lumclasso5 = lumclass(ind)
        nlmo5 = n_elements(lumclasso5)
        indo5_1 = fltarr(nlmo5)
        indo5_2 = indo5_1
        indo5_3 = indo5_1
        indo5_4 = indo5_1   
        countindo5_1 = indo5_1
        countindo5_2 = indo5_1
        countindo5_3 = indo5_1
        countindo5_4 = indo5_1
        FOR i=0L,nlmo5-1 DO BEGIN
            popnumber+=1
            counto+=1
            indo5_1[i] =  where(testo5 and params EQ 1, countindo5_1x); index of radius of this stellar population in the val array
            countindo5_1[i] = countindo5_1x
            indo5_2[i] =  where(testo5 and params EQ 2, countindo5_2x); index of temperature of this stellar population in the val array
            countindo5_2[i] = countindo5_2x
            indo5_3[i] =  where(testo5 and params EQ 3, countindo5_3x); index of distance of this stellar population in the val array
            countindo5_3[i] = countindo5_3x
            indo5_4[i] =  where(testo5 and params EQ 4, countindo5_4x); index of the nstars of this stellar population in the val array
            countindo5_4[i] = countindo5_4x
        ENDFOR
4750086c   Ilyes Choubani   nouvelle philosph...
220
221
222
    ENDIF
    
    ; Locating the O6 stellar population parameters
955f09f4   Ilyes Choubani   Retrieving data f...
223
    testo6 = strupcase(strmid(key,0,2)) EQ 'O6'
dcf48925   Ilyes Choubani   added spectral class
224
    ind = where(testo6,countindo6)
955f09f4   Ilyes Choubani   Retrieving data f...
225
226
227
228
229
230
231
232
233
    ; retrieveing the defaut values from the txt database
    tsto6 = strtrim(strmid(SpecType_MS,0,2),2) EQ 'O6' and strtrim(strmid(SpecType_MS,2,1),2) NE '.'
    indat  = where(tsto6,ctdato6)
    if ctdato6 ne 0 then begin
        
        T_eff_MS_o6 = double(T_eff_MS(indat))
        R_star_MS_o6 = double(R_star_MS(indat))
        
    endif
4750086c   Ilyes Choubani   nouvelle philosph...
234
    IF countindo6 NE 0 THEN BEGIN
dcf48925   Ilyes Choubani   added spectral class
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
        lumclasso6 = lumclass(ind)
        nlmo6 = long(n_elements(lumclasso6))
        indo6_1 = fltarr(nlmo6)
        indo6_2 = indo6_1
        indo6_3 = indo6_1
        indo6_4 = indo6_1    
        countindo6_1 = indo6_1
        countindo6_2 = indo6_1
        countindo6_3 = indo6_1
        countindo6_4 = indo6_1
        FOR i=0L,nlmo6-1 DO BEGIN
            popnumber+=1
            counto+=1
            indo6_1[i] =  where(testo6 and params EQ 1, countindo6_1x); index of radius of this stellar population in the val array
            countindo6_1[i] = countindo6_1x
            indo6_2[i] =  where(testo6 and params EQ 2, countindo6_2x); index of temperature of this stellar population in the val array
            countindo6_2[i] = countindo6_2x
            indo6_3[i] =  where(testo6 and params EQ 3, countindo6_3x); index of distance of this stellar population in the val array
            countindo6_3[i] = countindo6_3x
            indo6_4[i] =  where(testo6 and params EQ 4, countindo6_4x); index of the nstars of this stellar population in the val array
            countindo6_4[i] = countindo6_4x
        ENDFOR
4750086c   Ilyes Choubani   nouvelle philosph...
257
258
    ENDIF
    
dcf48925   Ilyes Choubani   added spectral class
259
    
4750086c   Ilyes Choubani   nouvelle philosph...
260
    ; Locating the O7 stellar population parameters
955f09f4   Ilyes Choubani   Retrieving data f...
261
    testo7 = strupcase(strmid(key,0,2)) EQ 'O7' 
dcf48925   Ilyes Choubani   added spectral class
262
    ind = where(testo7,countindo7)
955f09f4   Ilyes Choubani   Retrieving data f...
263
264
265
266
267
268
269
270
271
    ; retrieveing the defaut values from the txt database
    tsto7 = strtrim(strmid(SpecType_MS,0,2),2) EQ 'O7' and strtrim(strmid(SpecType_MS,2,1),2) NE '.'
    indat  = where(tsto7,ctdato7)
    if ctdato7 ne 0 then begin
        
        T_eff_MS_o7 = double(T_eff_MS(indat))
        R_star_MS_o7 = double(R_star_MS(indat))
        
    endif
4750086c   Ilyes Choubani   nouvelle philosph...
272
    IF countindo7 NE 0 THEN BEGIN
dcf48925   Ilyes Choubani   added spectral class
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
        lumclasso7 = lumclass(ind)
        nlmo7 = n_elements(lumclasso7)
        indo7_1 = fltarr(nlmo7)
        indo7_2 = indo7_1
        indo7_3 = indo7_1
        indo7_4 = indo7_1    
        countindo7_1 = indo7_1
        countindo7_2 = indo7_1
        countindo7_3 = indo7_1
        countindo7_4 = indo7_1
        FOR i=0L,nlmo7-1 DO BEGIN
            popnumber+=1
            counto+=1
            indo7_1[i] =  where(testo7 and params EQ 1, countindo7_1x); index of radius of this stellar population in the val array
            countindo7_1[i] = countindo7_1x
            indo7_2[i] =  where(testo7 and params EQ 2, countindo7_2x); index of temperature of this stellar population in the val array
            countindo7_2[i] = countindo7_2x
            indo7_3[i] =  where(testo7 and params EQ 3, countindo7_3x); index of distance of this stellar population in the val array
            countindo7_3[i] = countindo7_3x
            indo7_4[i] =  where(testo7 and params EQ 4, countindo7_4x); index of the nstars of this stellar population in the val array
            countindo7_4[i] = countindo7_4x
        ENDFOR
4750086c   Ilyes Choubani   nouvelle philosph...
295
296
297
    ENDIF
    
    ; Locating the O8 stellar population parameters
955f09f4   Ilyes Choubani   Retrieving data f...
298
    testo8 = strupcase(strmid(key,0,2)) EQ 'O8' 
dcf48925   Ilyes Choubani   added spectral class
299
    ind = where(testo8,countindo8)
955f09f4   Ilyes Choubani   Retrieving data f...
300
301
302
303
304
305
306
307
308
    ; retrieveing the defaut values from the txt database
    tsto8 = strtrim(strmid(SpecType_MS,0,2),2) EQ 'O8' and strtrim(strmid(SpecType_MS,2,1),2) NE '.'
    indat  = where(tsto8,ctdato8)
    if ctdato8 ne 0 then begin
        
        T_eff_MS_o8 = double(T_eff_MS(indat))
        R_star_MS_o8 = double(R_star_MS(indat))
        
    endif
4750086c   Ilyes Choubani   nouvelle philosph...
309
    IF countindo8 NE 0 THEN BEGIN
dcf48925   Ilyes Choubani   added spectral class
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
        lumclasso8 = lumclass(ind)
        nlmo8 = n_elements(lumclasso8)
        indo8_1 = fltarr(nlmo8)
        indo8_2 = indo8_1
        indo8_3 = indo8_1
        indo8_4 = indo8_1   
        countindo8_1 = indo8_1
        countindo8_2 = indo8_1
        countindo8_3 = indo8_1
        countindo8_4 = indo8_1
        FOR i=0L,nlmo8-1 DO BEGIN
            popnumber+=1
            counto+=1
            indo8_1[i] =  where(testo8 and params EQ 1, countindo8_1x); index of radius of this stellar population in the val array
            countindo8_1[i] = countindo8_1x
            indo8_2[i] =  where(testo8 and params EQ 2, countindo8_2x); index of temperature of this stellar population in the val array
            countindo8_2[i] = countindo8_2x
            indo8_3[i] =  where(testo8 and params EQ 3, countindo8_3x); index of distance of this stellar population in the val array
            countindo8_3[i] = countindo8_3x
            indo8_4[i] =  where(testo8 and params EQ 4, countindo8_4x); index of the nstars of this stellar population in the val array
            countindo8_4[i] = countindo8_4x
        ENDFOR
4750086c   Ilyes Choubani   nouvelle philosph...
332
333
334
    ENDIF
    
    ; Locating the O9 stellar population parameters
955f09f4   Ilyes Choubani   Retrieving data f...
335
    testo9 = strupcase(strmid(key,0,2)) EQ 'O9' 
dcf48925   Ilyes Choubani   added spectral class
336
    ind = where(testo9,countindo9)
955f09f4   Ilyes Choubani   Retrieving data f...
337
338
339
340
341
342
343
344
345
    ; retrieveing the defaut values from the txt database
    tsto9 = strtrim(strmid(SpecType_MS,0,2),2) EQ 'O9' and strtrim(strmid(SpecType_MS,2,1),2) NE '.'
    indat  = where(tsto9,ctdato9)
    if ctdato9 ne 0 then begin
        
        T_eff_MS_o9 = double(T_eff_MS(indat))
        R_star_MS_o9 = double(R_star_MS(indat))
        
    endif
4750086c   Ilyes Choubani   nouvelle philosph...
346
    IF countindo9 NE 0 THEN BEGIN
dcf48925   Ilyes Choubani   added spectral class
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
        lumclasso9 = strupcase(lumclass(ind))
        nlmo9 = long(n_elements(lumclasso9))
        indo9_1 = fltarr(nlmo9)
        indo9_2 = indo9_1 
        indo9_3 = indo9_1 
        indo9_4 = indo9_1    
        countindo9_1 = indo9_1 
        countindo9_2 = indo9_1 
        countindo9_3 = indo9_1 
        countindo9_4 = indo9_1  
        FOR i=0L,nlmo9-1 DO BEGIN
            popnumber+=1
            counto+=1
            indo9_1[i] =  where(testo9 and params EQ 1, countindo9_1x); index of radius of this stellar population in the val array
            countindo9_1[i] = countindo9_1x
            indo9_2[i] =  where(testo9 and params EQ 2, countindo9_2x); index of temperature of this stellar population in the val array
            countindo9_2[i] = countindo9_2x
            indo9_3[i] =  where(testo9 and params EQ 3, countindo9_3x); index of distance of this stellar population in the val array
            countindo9_3[i] = countindo9_3x
            indo9_4[i] =  where(testo9 and params EQ 4, countindo9_4x); index of the nstars of this stellar population in the val array
            countindo9_4[i] = countindo9_4x
        ENDFOR
4750086c   Ilyes Choubani   nouvelle philosph...
369
370
371
372
373
    ENDIF
    
    ;======================================================
    
    ; Locating the B0 stellar population parameters
955f09f4   Ilyes Choubani   Retrieving data f...
374
    testb0 = strupcase(strmid(key,0,2)) EQ 'B0' 
dcf48925   Ilyes Choubani   added spectral class
375
    ind = where(testb0,countindb0)
955f09f4   Ilyes Choubani   Retrieving data f...
376
377
378
379
380
381
382
383
384
    ; retrieveing the defaut values from the txt database
    tstb0 = strtrim(strmid(SpecType_MS,0,2),2) EQ 'B0' and strtrim(strmid(SpecType_MS,2,1),2) NE '.'
    indat  = where(tstb0,ctdatb0)
    if ctdatb0 ne 0 then begin
        
        T_eff_MS_b0 = double(T_eff_MS(indat))
        R_star_MS_b0 = double(R_star_MS(indat))
        
    endif
4750086c   Ilyes Choubani   nouvelle philosph...
385
    IF countindb0 NE 0 THEN BEGIN
dcf48925   Ilyes Choubani   added spectral class
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
         lumclassb0 = uniq(lumclass(ind))
         nlmb0 = n_elements(lumclassb0)
         indb0_1 = fltarr(nlmb0)
         indb0_2 = indb0_1
         indb0_3 = indb0_1
         indb0_4 = indb0_1  
         countindb0_1 = indb0_1
         countindb0_2 = indb0_1
         countindb0_3 = indb0_1
         countindb0_4 = indb0_1       
         FOR i=0L,nlmb0-1 DO BEGIN   
            popnumber+=1
            countb+=1
            indb0_1[i] =  where(testb0 and params EQ 1, countindb0_1x); index of radius of this stellar population in the val array
            countindb0_1[i] = countindb0_1x
            indb0_2[i] =  where(testb0 and params EQ 2, countindb0_2x); index of temperature of this stellar population in the val array
            countindb0_2[i] = countindb0_2x
            indb0_3[i] =  where(testb0 and params EQ 3, countindb0_3x); index of distance of this stellar population in the val array
            countindb0_3[i] = countindb0_3x
            indb0_4[i] =  where(testb0 and params EQ 4, countindb0_4x); index of the nstars of this stellar population in the val array
            countindb0_4[i] = countindb0_4x
        ENDFOR
4750086c   Ilyes Choubani   nouvelle philosph...
408
409
410
    ENDIF
    
    ; Locating the B1 stellar population parameters
955f09f4   Ilyes Choubani   Retrieving data f...
411
    testb1 = strupcase(strmid(key,0,2)) EQ 'B1' 
dcf48925   Ilyes Choubani   added spectral class
412
    ind = where(testb1,countindb1)
955f09f4   Ilyes Choubani   Retrieving data f...
413
414
415
416
417
418
419
420
421
    ; retrieveing the defaut values from the txt database
    tstb1 = strtrim(strmid(SpecType_MS,0,2),2) EQ 'B1' and strtrim(strmid(SpecType_MS,2,1),2) NE '.'
    indat  = where(tstb1,ctdatb1)
    if ctdatb1 ne 0 then begin
        
        T_eff_MS_b1 = double(T_eff_MS(indat))
        R_star_MS_b1 = double(R_star_MS(indat))
        
    endif
4750086c   Ilyes Choubani   nouvelle philosph...
422
    IF countindb1 NE 0 THEN BEGIN
dcf48925   Ilyes Choubani   added spectral class
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
        lumclassb1 = strupcase(lumclass(ind))
        nlmb1 = long(n_elements(lumclassb1))
        indb1_1 = fltarr(nlmb1)
        indb1_2 = indb1_1
        indb1_3 = indb1_1
        indb1_4 = indb1_1 
        countindb1_1 = indb1_1
        countindb1_2 = indb1_1
        countindb1_3 = indb1_1
        countindb1_4 = indb1_1     
        FOR i=0L,nlmb1-1 DO BEGIN 
            popnumber+=1
            countb+=1
            indb1_1[i] =  where(testb1 and params EQ 1, countindb1_1x); index of radius of this stellar population in the val array
            countindb1_1[i] = countindb1_1x
            indb1_2[i] =  where(testb1 and params EQ 2, countindb1_2x); index of temperature of this stellar population in the val array
            countindb1_2[i] = countindb1_2x
            indb1_3[i] =  where(testb1 and params EQ 3, countindb1_3x); index of distance of this stellar population in the val array
            countindb1_3[i] = countindb1_3x
            indb1_4[i] =  where(testb1 and params EQ 4, countindb1_4x); index of the nstars of this stellar population in the val array
            countindb1_4[i] = countindb1_4x
        ENDFOR
4750086c   Ilyes Choubani   nouvelle philosph...
445
446
447
    ENDIF
    
    ; Locating the B2 stellar population parameters
955f09f4   Ilyes Choubani   Retrieving data f...
448
    testb2 = strupcase(strmid(key,0,2)) EQ 'B2' 
dcf48925   Ilyes Choubani   added spectral class
449
    ind = where(testb2,countindb2)
955f09f4   Ilyes Choubani   Retrieving data f...
450
451
452
453
454
455
456
457
458
    ; retrieveing the defaut values from the txt database
    tstb2 = strtrim(strmid(SpecType_MS,0,2),2) EQ 'B2' and strtrim(strmid(SpecType_MS,2,1),2) NE '.'
    indat  = where(tstb2,ctdatb2)
    if ctdatb2 ne 0 then begin
        
        T_eff_MS_b2 = double(T_eff_MS(indat))
        R_star_MS_b2 = double(R_star_MS(indat))
        
    endif
4750086c   Ilyes Choubani   nouvelle philosph...
459
    IF countindb2 NE 0 THEN BEGIN
dcf48925   Ilyes Choubani   added spectral class
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
        lumclassb2 = uniq(lumclass(ind))
        nlmb2 = n_elements(lumclassb2)
        indb2_1 = fltarr(nlmb2)
        indb2_2 = indb2_1
        indb2_3 = indb2_1
        indb2_4 = indb2_1    
        countindb2_1 = indb2_1
        countindb2_2 = indb2_1
        countindb2_3 = indb2_1
        countindb2_4 = indb2_1
        FOR i=0L,nlmb2-1 DO BEGIN 
            popnumber+=1
            countb+=1
            indb2_1[i] =  where(testb2 and params EQ 1, countindb2_1x); index of radius of this stellar population in the val array
            countindb2_1[i] = countindb2_1x
            indb2_2[i] =  where(testb2 and params EQ 2, countindb2_2x); index of temperature of this stellar population in the val array
            countindb2_2[i] = countindb2_2x
            indb2_3[i] =  where(testb2 and params EQ 3, countindb2_3x); index of distance of this stellar population in the val array
            countindb2_3[i] = countindb2_3x
            indb2_4[i] =  where(testb2 and params EQ 4, countindb2_4x); index of the nstars of this stellar population in the val array
            countindb2_4[i] = countindb2_4x
        ENDFOR
4750086c   Ilyes Choubani   nouvelle philosph...
482
483
484
    ENDIF
    
    ; Locating the B3 stellar population parameters
955f09f4   Ilyes Choubani   Retrieving data f...
485
    testb3 = strupcase(strmid(key,0,2)) EQ 'B3' 
dcf48925   Ilyes Choubani   added spectral class
486
    ind = where(testb3,countindb3)
955f09f4   Ilyes Choubani   Retrieving data f...
487
488
489
490
491
492
493
494
495
    ; retrieveing the defaut values from the txt database
    tstb3 = strtrim(strmid(SpecType_MS,0,2),2) EQ 'B3' and strtrim(strmid(SpecType_MS,2,1),2) NE '.'
    indat  = where(tstb3,ctdatb3)
    if ctdatb3 ne 0 then begin
        
        T_eff_MS_b3 = double(T_eff_MS(indat))
        R_star_MS_b3 = double(R_star_MS(indat))
        
    endif
4750086c   Ilyes Choubani   nouvelle philosph...
496
    IF countindb3 NE 0 THEN BEGIN
dcf48925   Ilyes Choubani   added spectral class
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
        lumclassb3 = uniq(lumclass(ind))
        nlmb3 = n_elements(lumclassb3)
        indb3_1 = fltarr(nlmb3)
        indb3_2 = indb3_1
        indb3_3 = indb3_1
        indb3_4 = indb3_1
        countindb3_1 = indb3_1
        countindb3_2 = indb3_1
        countindb3_3 = indb3_1
        countindb3_4 = indb3_1
        FOR i=0L,nlmb3-1 DO BEGIN 
            popnumber+=1
            countb+=1
            indb3_1[i] =  where(testb3 and params EQ 1, countindb3_1x); index of radius of this stellar population in the val array
            countindb3_1[i] = countindb3_1x
            indb3_2[i] =  where(testb3 and params EQ 2, countindb3_2x); index of temperature of this stellar population in the val array
            countindb3_2[i] = countindb3_2x
            indb3_3[i] =  where(testb3 and params EQ 3, countindb3_3x); index of distance of this stellar population in the val array
            countindb3_3[i] = countindb3_3x
            indb3_4[i] =  where(testb3 and params EQ 4, countindb3_4x); index of the nstars of this stellar population in the val array
            countindb3_4[i] = countindb3_4x
        ENDFOR
4750086c   Ilyes Choubani   nouvelle philosph...
519
520
521
    ENDIF
    
    ; Locating the B4 stellar population parameters
955f09f4   Ilyes Choubani   Retrieving data f...
522
    testb4 = strupcase(strmid(key,0,2)) EQ 'B4' 
dcf48925   Ilyes Choubani   added spectral class
523
    ind = where(testb4,countindb4)
955f09f4   Ilyes Choubani   Retrieving data f...
524
525
526
527
528
529
530
531
532
    ; retrieveing the defaut values from the txt database
    tstb4 = strtrim(strmid(SpecType_MS,0,2),2) EQ 'B4' and strtrim(strmid(SpecType_MS,2,1),2) NE '.'
    indat  = where(tstb4,ctdatb4)
    if ctdatb4 ne 0 then begin
        
        T_eff_MS_b4 = double(T_eff_MS(indat))
        R_star_MS_b4 = double(R_star_MS(indat))
        
    endif
4750086c   Ilyes Choubani   nouvelle philosph...
533
    IF countindb4 NE 0 THEN BEGIN
dcf48925   Ilyes Choubani   added spectral class
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
        lumclassb4 = uniq(lumclass(ind))
        nlmb4 = n_elements(lumclassb4)
        indb4_1 = fltarr(nlmb4)
        indb4_2 = indb4_1
        indb4_3 = indb4_1
        indb4_4 = indb4_1
        countindb4_1 = indb4_1
        countindb4_2 = indb4_1
        countindb4_3 = indb4_1
        countindb4_4 = indb4_1
        FOR i=0L,nlmb4-1 DO BEGIN 
            popnumber+=1
            countb+=1
            indb4_1[i] =  where(testb4 and params EQ 1, countindb4_1x); index of radius of this stellar population in the val array
            countindb4_1[i] = countindb4_1x
            indb4_2[i] =  where(testb4 and params EQ 2, countindb4_2x); index of temperature of this stellar population in the val array
            countindb4_2[i] = countindb4_2x
            indb4_3[i] =  where(testb4 and params EQ 3, countindb4_3x); index of distance of this stellar population in the val array
            countindb4_3[i] = countindb4_3x
            indb4_4[i] =  where(testb4 and params EQ 4, countindb4_4x); index of the nstars of this stellar population in the val array
            countindb4_4[i] = countindb4_4x
        ENDFOR
4750086c   Ilyes Choubani   nouvelle philosph...
556
557
558
    ENDIF
    
    ; Locating the B5 stellar population parameters
955f09f4   Ilyes Choubani   Retrieving data f...
559
    testb5 = strupcase(strmid(key,0,2)) EQ 'B5' 
dcf48925   Ilyes Choubani   added spectral class
560
    ind = where(testb5,countindb5)
955f09f4   Ilyes Choubani   Retrieving data f...
561
562
563
564
565
566
567
568
569
    ; retrieveing the defaut values from the txt database
    tstb5 = strtrim(strmid(SpecType_MS,0,2),2) EQ 'B5' and strtrim(strmid(SpecType_MS,2,1),2) NE '.'
    indat  = where(tstb5,ctdatb5)
    if ctdatb5 ne 0 then begin
        
        T_eff_MS_b5 = double(T_eff_MS(indat))
        R_star_MS_b5 = double(R_star_MS(indat))
        
    endif
4750086c   Ilyes Choubani   nouvelle philosph...
570
    IF countindb5 NE 0 THEN BEGIN
dcf48925   Ilyes Choubani   added spectral class
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
        lumclassb5 = uniq(lumclass(ind))
        nlmb5 = n_elements(lumclassb5)
        indb5_1 = fltarr(nlmb5)
        indb5_2 = indb5_1
        indb5_3 = indb5_1
        indb5_4 = indb5_1
        countindb5_1 = indb5_1
        countindb5_2 = indb5_1
        countindb5_3 = indb5_1
        countindb5_4 = indb5_1
        FOR i=0L,nlmb5-1 DO BEGIN    
            popnumber+=1
            countb+=1
            indb5_1[i] =  where(testb5 and params EQ 1, countindb5_1x); index of radius of this stellar population in the val array
            countindb5_1[i] = countindb5_1x
            indb5_2[i] =  where(testb5 and params EQ 2, countindb5_2x); index of temperature of this stellar population in the val array
            countindb5_2[i] = countindb5_2x
            indb5_3[i] =  where(testb5 and params EQ 3, countindb5_3x); index of distance of this stellar population in the val array
            countindb5_3[i] = countindb5_3x
            indb5_4[i] =  where(testb5 and params EQ 4, countindb5_4x); index of the nstars of this stellar population in the val array
            countindb5_4[i] = countindb5_4x
        ENDFOR
4750086c   Ilyes Choubani   nouvelle philosph...
593
594
595
    ENDIF
    
    ; Locating the B6 stellar population parameters
955f09f4   Ilyes Choubani   Retrieving data f...
596
    testb6 = strupcase(strmid(key,0,2)) EQ 'B6'
dcf48925   Ilyes Choubani   added spectral class
597
    ind = where(testb6,countindb6)
955f09f4   Ilyes Choubani   Retrieving data f...
598
599
600
601
602
603
604
605
606
    ; retrieveing the defaut values from the txt database
    tstb6 = strtrim(strmid(SpecType_MS,0,2),2) EQ 'B6' and strtrim(strmid(SpecType_MS,2,1),2) NE '.'
    indat  = where(tstb6,ctdatb6)
    if ctdatb6 ne 0 then begin
        
        T_eff_MS_b6 = double(T_eff_MS(indat))
        R_star_MS_b6 = double(R_star_MS(indat))
        
    endif
4750086c   Ilyes Choubani   nouvelle philosph...
607
    IF countindb6 NE 0 THEN BEGIN
dcf48925   Ilyes Choubani   added spectral class
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
        lumclassb6 = uniq(lumclass(ind))
        nlmb6 = n_elements(lumclassb6)
        indb6_1 = fltarr(nlmb6)
        indb6_2 = indb6_1
        indb6_3 = indb6_1
        indb6_4 = indb6_1
        countindb6_1 = indb6_1
        countindb6_2 = indb6_1
        countindb6_3 = indb6_1
        countindb6_4 = indb6_1
        FOR i=0L,nlmb6-1 DO BEGIN 
            popnumber+=1
            countb+=1
            indb6_1[i] =  where(testb6 and params EQ 1, countindb6_1x); index of radius of this stellar population in the val array
            countindb6_1[i] = countindb6_1x
            indb6_2[i] =  where(testb6 and params EQ 2, countindb6_2x); index of temperature of this stellar population in the val array
            countindb6_2[i] = countindb6_2x
            indb6_3[i] =  where(testb6 and params EQ 3, countindb6_3x); index of distance of this stellar population in the val array
            countindb6_3[i] = countindb6_3x
            indb6_4[i] =  where(testb6 and params EQ 4, countindb6_4x); index of the nstars of this stellar population in the val array
            countindb6_4[i] = countindb6_4x
        ENDFOR
4750086c   Ilyes Choubani   nouvelle philosph...
630
631
632
    ENDIF
    
    ; Locating the B7 stellar population parameters
955f09f4   Ilyes Choubani   Retrieving data f...
633
    testb7 = strupcase(strmid(key,0,2)) EQ 'B7' 
dcf48925   Ilyes Choubani   added spectral class
634
    ind = where(testb7,countindb7)
955f09f4   Ilyes Choubani   Retrieving data f...
635
636
637
638
639
640
641
642
643
    ; retrieveing the defaut values from the txt database
    tstb7 = strtrim(strmid(SpecType_MS,0,2),2) EQ 'B7' and strtrim(strmid(SpecType_MS,2,1),2) NE '.'
    indat  = where(tstb7,ctdatb7)
    if ctdatb7 ne 0 then begin
        
        T_eff_MS_b7 = double(T_eff_MS(indat))
        R_star_MS_b7 = double(R_star_MS(indat))
        
    endif
4750086c   Ilyes Choubani   nouvelle philosph...
644
    IF countindb7 NE 0 THEN BEGIN
dcf48925   Ilyes Choubani   added spectral class
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
        lumclassb7 = uniq(lumclass(ind))
        nlmb7 = n_elements(lumclassb7)
        indb7_1 = fltarr(nlmb7)
        indb7_2 = indb7_1
        indb7_3 = indb7_1
        indb7_4 = indb7_1  
        countindb7_1 = indb7_1
        countindb7_2 = indb7_1
        countindb7_3 = indb7_1
        countindb7_4 = indb7_1
        FOR i=0L,nlmb7-1 DO BEGIN 
            popnumber+=1
            countb+=1
            indb7_1[i] =  where(testb7 and params EQ 1, countindb7_1x); index of radius of this stellar population in the val array
            countindb7_1[i] = countindb7_1x
            indb7_2[i] =  where(testb7 and params EQ 2, countindb7_2x); index of temperature of this stellar population in the val array
            countindb7_2[i] = countindb7_2x
            indb7_3[i] =  where(testb7 and params EQ 3, countindb7_3x); index of distance of this stellar population in the val array
            countindb7_3[i] = countindb7_3x
            indb7_4[i] =  where(testb7 and params EQ 4, countindb7_4x); index of the nstars of this stellar population in the val array
            countindb7_4[i] = countindb7_4x
        ENDFOR
4750086c   Ilyes Choubani   nouvelle philosph...
667
668
669
    ENDIF
    
    ; Locating the B8 stellar population parameters
955f09f4   Ilyes Choubani   Retrieving data f...
670
    testb8 = strupcase(strmid(key,0,2)) EQ 'B8'  
dcf48925   Ilyes Choubani   added spectral class
671
    ind = where(testb8,countindb8)
955f09f4   Ilyes Choubani   Retrieving data f...
672
673
674
675
676
677
678
679
680
    ; retrieveing the defaut values from the txt database
    tstb8 = strtrim(strmid(SpecType_MS,0,2),2) EQ 'B8' and strtrim(strmid(SpecType_MS,2,1),2) NE '.'
    indat  = where(tstb8,ctdatb8)
    if ctdatb8 ne 0 then begin
        
        T_eff_MS_b8 = double(T_eff_MS(indat))
        R_star_MS_b8 = double(R_star_MS(indat))
        
    endif
4750086c   Ilyes Choubani   nouvelle philosph...
681
    IF countindb8 NE 0 THEN BEGIN
dcf48925   Ilyes Choubani   added spectral class
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
        lumclassb8 = uniq(lumclass(ind))
        nlmb8 = n_elements(lumclassb8)
        indb8_1 = fltarr(nlmb8)
        indb8_2 = indb8_1
        indb8_3 = indb8_1
        indb8_4 = indb8_1   
        countindb8_1 = indb8_1
        countindb8_2 = indb8_1
        countindb8_3 = indb8_1
        countindb8_4 = indb8_1
        FOR i=0L,nlmb8-1 DO BEGIN
            popnumber+=1
            countb+=1
            indb8_1[i] =  where(testb8 and params EQ 1, countindb8_1x); index of radius of this stellar population in the val array
            countindb8_1[i] = countindb8_1x
            indb8_2[i] =  where(testb8 and params EQ 2, countindb8_2x); index of temperature of this stellar population in the val array
            countindb8_2[i] = countindb8_2x
            indb8_3[i] =  where(testb8 and params EQ 3, countindb8_3x); index of distance of this stellar population in the val array
            countindb8_3[i] = countindb8_3x
            indb8_4[i] =  where(testb8 and params EQ 4, countindb8_4x); index of the nstars of this stellar population in the val array
            countindb8_4[i] = countindb8_4x
        ENDFOR
4750086c   Ilyes Choubani   nouvelle philosph...
704
705
706
    ENDIF
    
    ; Locating the B9 stellar population parameters
955f09f4   Ilyes Choubani   Retrieving data f...
707
    testb9 = strupcase(strmid(key,0,2)) EQ 'B9' 
dcf48925   Ilyes Choubani   added spectral class
708
    ind = where(testb9,countindb9)
955f09f4   Ilyes Choubani   Retrieving data f...
709
710
711
712
713
714
715
716
717
    ; retrieveing the defaut values from the txt database
    tstb9 = strtrim(strmid(SpecType_MS,0,2),2) EQ 'B9' and strtrim(strmid(SpecType_MS,2,1),2) NE '.'
    indat  = where(tstb9,ctdatb9)
    if ctdatb9 ne 0 then begin
        
        T_eff_MS_b9 = double(T_eff_MS(indat))
        R_star_MS_b9 = double(R_star_MS(indat))
        
    endif
4750086c   Ilyes Choubani   nouvelle philosph...
718
    IF countindb9 NE 0 THEN BEGIN
dcf48925   Ilyes Choubani   added spectral class
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
        lumclassb9 = uniq(lumclass(ind))
        nlmb9 = n_elements(lumclassb9)
        indb9_1 = fltarr(nlmb9)
        indb9_2 = indb9_1
        indb9_3 = indb9_1
        indb9_4 = indb9_1   
        countindb9_1 = indb9_1
        countindb9_2 = indb9_1
        countindb9_3 = indb9_1
        countindb9_4 = indb9_1
        FOR i=0L,nlmb9-1 DO BEGIN
            popnumber+=1
            countb+=1
            indb9_1[i] =  where(testb9 and params EQ 1, countindb9_1x); index of radius of this stellar population in the val array
            countindb9_1[i] = countindb9_1x
            indb9_2[i] =  where(testb9 and params EQ 2, countindb9_2x); index of temperature of this stellar population in the val array
            countindb9_2[i] = countindb9_2x
            indb9_3[i] =  where(testb9 and params EQ 3, countindb9_3x); index of distance of this stellar population in the val array
            countindb9_3[i] = countindb9_3x
            indb9_4[i] =  where(testb9 and params EQ 4, countindb9_4x); index of the nstars of this stellar population in the val array
            countindb9_4[i] = countindb9_4x
        ENDFOR
4750086c   Ilyes Choubani   nouvelle philosph...
741
742
743
744
745
746
    ENDIF
    
    
    ;======================================================
    
    ; Locating the A0 stellar population parameters
955f09f4   Ilyes Choubani   Retrieving data f...
747
    testa0 = strupcase(strmid(key,0,2)) EQ 'A0' 
dcf48925   Ilyes Choubani   added spectral class
748
    ind = where(testa0,countinda0)
955f09f4   Ilyes Choubani   Retrieving data f...
749
750
751
752
753
754
755
756
757
    ; retrieveing the defaut values from the txt database
    tsta0 = strtrim(strmid(SpecType_MS,0,2),2) EQ 'A0' and strtrim(strmid(SpecType_MS,2,1),2) NE '.'
    indat  = where(tsta0,ctdata0)
    if ctdata0 ne 0 then begin
        
        T_eff_MS_a0 = double(T_eff_MS(indat))
        R_star_MS_a0 = double(R_star_MS(indat))
        
    endif
4750086c   Ilyes Choubani   nouvelle philosph...
758
    IF countinda0 NE 0 THEN BEGIN
dcf48925   Ilyes Choubani   added spectral class
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
        lumclassA0 = uniq(lumclass(ind))
        nlmA0 = n_elements(lumclassA0)
        indA0_1 = fltarr(nlmA0)
        indA0_2 = indA0_1 
        indA0_3 = indA0_1 
        indA0_4 = indA0_1    
        countindA0_1 = indA0_1 
        countindA0_2 = indA0_1 
        countindA0_3 = indA0_1 
        countindA0_4 = indA0_1  
        FOR i=0L,nlmA0-1 DO BEGIN
            popnumber+=1
            counta+=1
            inda0_1[i] =  where(testa0 and params EQ 1, countinda0_1x); index of radius of this stellar population in the val array
            countinda0_1[i] = countinda0_1x
            inda0_2[i] =  where(testa0 and params EQ 2, countinda0_2x); index of temperature of this stellar population in the val array
            countinda0_2[i] = countinda0_2x
            inda0_3[i] =  where(testa0 and params EQ 3, countinda0_3x); index of distance of this stellar population in the val array
            countinda0_3[i] = countinda0_3x
            inda0_4[i] =  where(testa0 and params EQ 4, countinda0_4x); index of the nstars of this stellar population in the val array
            countinda0_4[i] =  countinda0_4x
        ENDFOR
4750086c   Ilyes Choubani   nouvelle philosph...
781
782
783
    ENDIF
    
    ; Locating the A1 stellar population parameters
955f09f4   Ilyes Choubani   Retrieving data f...
784
    testa1 = strupcase(strmid(key,0,2)) EQ 'A1' 
dcf48925   Ilyes Choubani   added spectral class
785
    ind = where(testa1,countinda1)
955f09f4   Ilyes Choubani   Retrieving data f...
786
787
788
789
790
791
792
793
794
795
     ; retrieveing the defaut values from the txt database
     tsta1 = strtrim(strmid(SpecType_MS,0,2),2) EQ 'A1' and strtrim(strmid(SpecType_MS,2,1),2) NE '.'
     indat  = where(tsta1,ctdata1)
     if ctdata1 ne 0 then begin
         
         T_eff_MS_a1 = double(T_eff_MS(indat))
         R_star_MS_a1 = double(R_star_MS(indat))
         
     endif
     
4750086c   Ilyes Choubani   nouvelle philosph...
796
    IF countinda1 NE 0 THEN BEGIN
dcf48925   Ilyes Choubani   added spectral class
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
        lumclassA1 = lumclass(ind)
        nlmA1 = n_elements(lumclassA1)
        indA1_1 = fltarr(nlmA1)
        indA1_2 = indA1_1
        indA1_3 = indA1_1
        indA1_4 = indA1_1  
        countindA1_1 = indA1_1
        countindA1_2 = indA1_1
        countindA1_3 = indA1_1
        countindA1_4 = indA1_1
        FOR i=0L,nlmA1-1 DO BEGIN
            popnumber+=1
            counta+=1
            inda1_1[i] =  where(testa1 and params EQ 1, countinda1_1x); index of radius of this stellar population in the val array
            countinda1_1[i] = countinda1_1x
            inda1_2[i] =  where(testa1 and params EQ 2, countinda1_2x); index of temperature of this stellar population in the val array
            countinda1_2[i] = countinda1_2x
            inda1_3[i] =  where(testa1 and params EQ 3, countinda1_3x); index of distance of this stellar population in the val array
            countinda1_3[i] = countinda1_3x
            inda1_4[i] =  where(testa1 and params EQ 4, countinda1_4x); index of the nstars of this stellar population in the val array
            countinda1_4[i] = countinda1_4x
        ENDFOR
4750086c   Ilyes Choubani   nouvelle philosph...
819
820
821
    ENDIF
    
    ; Locating the A2 stellar population parameters
955f09f4   Ilyes Choubani   Retrieving data f...
822
    testa2 = strupcase(strmid(key,0,2)) EQ 'A2' 
dcf48925   Ilyes Choubani   added spectral class
823
    ind = where(testa2,countinda2)
955f09f4   Ilyes Choubani   Retrieving data f...
824
825
826
827
828
829
830
831
832
     ; retrieveing the defaut values from the txt database
     tsta2 = strtrim(strmid(SpecType_MS,0,2),2) EQ 'A2' and strtrim(strmid(SpecType_MS,2,1),2) NE '.'
     indat  = where(tsta2,ctdata2)
     if ctdata2 ne 0 then begin
         
         T_eff_MS_a2 = double(T_eff_MS(indat))
         R_star_MS_a2 = double(R_star_MS(indat))
         
     endif
4750086c   Ilyes Choubani   nouvelle philosph...
833
    IF countinda2 NE 0 THEN BEGIN
dcf48925   Ilyes Choubani   added spectral class
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
        lumclassA2 = lumclass(ind)
        nlmA2 = n_elements(lumclassA2)
        indA2_1 = fltarr(nlmA2)
        indA2_2 = indA2_1
        indA2_3 = indA2_1
        indA2_4 = indA2_1
        countindA2_1 = indA2_1
        countindA2_2 = indA2_1
        countindA2_3 = indA2_1
        countindA2_4 = indA2_1
        FOR i=0L,nlmA2-1 DO BEGIN
            popnumber+=1
            counta+=1
            inda2_1[i] =  where(testa2 and params EQ 1, countinda2_1x); index of radius of this stellar population in the val array
            countinda2_1[i] = countinda2_1x
            inda2_2[i] =  where(testa2 and params EQ 2, countinda2_2x); index of temperature of this stellar population in the val array
            countinda2_2[i] = countinda2_2x
            inda2_3[i] =  where(testa2 and params EQ 3, countinda2_3x); index of distance of this stellar population in the val array
            countinda2_3[i] = countinda2_3x
            inda2_4[i] =  where(testa2 and params EQ 4, countinda2_4x); index of the nstars of this stellar population in the val array
            countinda2_4[i] = countinda2_4x
        ENDFOR
4750086c   Ilyes Choubani   nouvelle philosph...
856
857
858
    ENDIF
    
    ; Locating the A3 stellar population parameters
955f09f4   Ilyes Choubani   Retrieving data f...
859
    testa3 = strupcase(strmid(key,0,2)) EQ 'A3' 
dcf48925   Ilyes Choubani   added spectral class
860
    ind = where(testa3,countinda3)
955f09f4   Ilyes Choubani   Retrieving data f...
861
862
863
864
865
866
867
868
869
     ; retrieveing the defaut values from the txt database
     tsta3 = strtrim(strmid(SpecType_MS,0,2),2) EQ 'A3' and strtrim(strmid(SpecType_MS,2,1),2) NE '.'
     indat  = where(tsta3,ctdata3)
     if ctdata3 ne 0 then begin
         
         T_eff_MS_a3 = double(T_eff_MS(indat))
         R_star_MS_a3 = double(R_star_MS(indat))
         
     endif
4750086c   Ilyes Choubani   nouvelle philosph...
870
    IF countinda3 NE 0 THEN BEGIN
dcf48925   Ilyes Choubani   added spectral class
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
        lumclassA3 = lumclass(ind)
        nlmA3 = n_elements(lumclassA3)
        indA3_1 = fltarr(nlmA3)
        indA3_2 = indA3_1
        indA3_3 = indA3_1
        indA3_4 = indA3_1    
        countindA3_1 = indA3_1
        countindA3_2 = indA3_1
        countindA3_3 = indA3_1
        countindA3_4 = indA3_1
        FOR i=0L,nlmA3-1 DO BEGIN
            popnumber+=1
            counta+=1
            inda3_1[i] =  where(testa3 and params EQ 1, countinda3_1x); index of radius of this stellar population in the val array
            countinda3_1[i] = countinda3_1x
            inda3_2[i] =  where(testa3 and params EQ 2, countinda3_2x); index of temperature of this stellar population in the val array
            countinda3_2[i] = countinda3_2x
            inda3_3[i] =  where(testa3 and params EQ 3, countinda3_3x); index of distance of this stellar population in the val array
            countinda3_3[i] = countinda3_3x
            inda3_4[i] =  where(testa3 and params EQ 4, countinda3_4x); index of the nstars of this stellar population in the val array
            countinda3_4[i] = countinda3_4x
        ENDFOR
4750086c   Ilyes Choubani   nouvelle philosph...
893
894
895
    ENDIF
    
    ; Locating the A4 stellar population parameters
955f09f4   Ilyes Choubani   Retrieving data f...
896
    testa4 = strupcase(strmid(key,0,2)) EQ 'A4' 
dcf48925   Ilyes Choubani   added spectral class
897
    ind = where(testa4,countinda4)
955f09f4   Ilyes Choubani   Retrieving data f...
898
899
900
901
902
903
904
905
906
     ; retrieveing the defaut values from the txt database
     tsta4 = strtrim(strmid(SpecType_MS,0,2),2) EQ 'A4' and strtrim(strmid(SpecType_MS,2,1),2) NE '.'
     indat  = where(tsta4,ctdata4)
     if ctdata4 ne 0 then begin
         
         T_eff_MS_a4 = double(T_eff_MS(indat))
         R_star_MS_a4 = double(R_star_MS(indat))
         
     endif
4750086c   Ilyes Choubani   nouvelle philosph...
907
    IF countinda4 NE 0 THEN BEGIN
dcf48925   Ilyes Choubani   added spectral class
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
        lumclassA4 = lumclass(ind)
        nlmA4 = n_elements(lumclassA4)
        indA4_1 = fltarr(nlmA4)
        indA4_2 = indA4_1
        indA4_3 = indA4_1
        indA4_4 = indA4_1   
        countindA4_1 = indA4_1
        countindA4_2 = indA4_1
        countindA4_3 = indA4_1
        countindA4_4 = indA4_1
        FOR i=0L,nlmA4-1 DO BEGIN
            popnumber+=1
            counta+=1
            inda4_1[i] =  where(testa4 and params EQ 1, countinda4_1x); index of radius of this stellar population in the val array
            countinda4_1[i] = countinda4_1x
            inda4_2[i] =  where(testa4 and params EQ 2, countinda4_2x); index of temperature of this stellar population in the val array
            countinda4_2[i] = countinda4_2x
            inda4_3[i] =  where(testa4 and params EQ 3, countinda4_3x); index of distance of this stellar population in the val array
            countinda4_3[i] = countinda4_3x
            inda4_4[i] =  where(testa4 and params EQ 4, countinda4_4x); index of the nstars of this stellar population in the val array
            countinda4_4[i] = countinda4_4x
        ENDFOR
4750086c   Ilyes Choubani   nouvelle philosph...
930
931
932
    ENDIF
    
    ; Locating the A5 stellar population parameters
955f09f4   Ilyes Choubani   Retrieving data f...
933
    testa5 = strupcase(strmid(key,0,2)) EQ 'A5' 
dcf48925   Ilyes Choubani   added spectral class
934
    ind = where(testa5,countinda5)
955f09f4   Ilyes Choubani   Retrieving data f...
935
936
937
938
939
940
941
942
943
     ; retrieveing the defaut values from the txt database
     tsta5 = strtrim(strmid(SpecType_MS,0,2),2) EQ 'A5' and strtrim(strmid(SpecType_MS,2,1),2) NE '.'
     indat  = where(tsta5,ctdata5)
     if ctdata5 ne 0 then begin
         
         T_eff_MS_a5 = double(T_eff_MS(indat))
         R_star_MS_a5 = double(R_star_MS(indat))
         
     endif
4750086c   Ilyes Choubani   nouvelle philosph...
944
    IF countinda5 NE 0 THEN BEGIN
dcf48925   Ilyes Choubani   added spectral class
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
        lumclassA5 = lumclass(ind)
        nlmA5 = n_elements(lumclassA5)
        indA5_1 = fltarr(nlmA5)
        indA5_2 = indA5_1
        indA5_3 = indA5_1
        indA5_4 = indA5_1   
        countindA5_1 = indA5_1
        countindA5_2 = indA5_1
        countindA5_3 = indA5_1
        countindA5_4 = indA5_1
        FOR i=0L,nlmA5-1 DO BEGIN
            popnumber+=1
            counta+=1
            inda5_1[i] =  where(testa5 and params EQ 1, countinda5_1x); index of radius of this stellar population in the val array
            countinda5_1[i] = countinda5_1x
            inda5_2[i] =  where(testa5 and params EQ 2, countinda5_2x); index of temperature of this stellar population in the val array
            countinda5_2[i] = countinda5_2x
            inda5_3[i] =  where(testa5 and params EQ 3, countinda5_3x); index of distance of this stellar population in the val array
            countinda5_3[i] = countinda5_3x
            inda5_4[i] =  where(testa5 and params EQ 4, countinda5_4x); index of the nstars of this stellar population in the val array
            countinda5_4[i] = countinda5_4x
        ENDFOR
4750086c   Ilyes Choubani   nouvelle philosph...
967
968
969
    ENDIF
    
    ; Locating the A6 stellar population parameters
955f09f4   Ilyes Choubani   Retrieving data f...
970
    testa6 = strupcase(strmid(key,0,2)) EQ 'A6'
dcf48925   Ilyes Choubani   added spectral class
971
    ind = where(testa6,countinda6)
955f09f4   Ilyes Choubani   Retrieving data f...
972
973
974
975
976
977
978
979
980
     ; retrieveing the defaut values from the txt database
     tsta6 = strtrim(strmid(SpecType_MS,0,2),2) EQ 'A6' and strtrim(strmid(SpecType_MS,2,1),2) NE '.'
     indat  = where(tsta6,ctdata6)
     if ctdata6 ne 0 then begin
         
         T_eff_MS_a6 = double(T_eff_MS(indat))
         R_star_MS_a6 = double(R_star_MS(indat))
         
     endif
4750086c   Ilyes Choubani   nouvelle philosph...
981
    IF countinda6 NE 0 THEN BEGIN
dcf48925   Ilyes Choubani   added spectral class
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
        lumclassA6 = lumclass(ind)
        nlmA6 = n_elements(lumclassA6)
        indA6_1 = fltarr(nlmA6)
        indA6_2 = indA6_1
        indA6_3 = indA6_1
        indA6_4 = indA6_1   
        countindA6_1 = indA6_1
        countindA6_2 = indA6_1
        countindA6_3 = indA6_1
        countindA6_4 = indA6_1
        FOR i=0L,nlmA6-1 DO BEGIN
            popnumber+=1
            counta+=1
            inda6_1[i] =  where(testa6 and params EQ 1, countinda6_1x); index of radius of this stellar population in the val array
            countinda6_1[i] = countinda6_1x
            inda6_2[i] =  where(testa6 and params EQ 2, countinda6_2x); index of temperature of this stellar population in the val array
            countinda6_2[i] = countinda6_2x
            inda6_3[i] =  where(testa6 and params EQ 3, countinda6_3x); index of distance of this stellar population in the val array
            countinda6_3[i] = countinda6_3x
            inda6_4[i] =  where(testa6 and params EQ 4, countinda6_4x); index of the nstars of this stellar population in the val array
            countinda6_4[i] = countinda6_4x
        ENDFOR
4750086c   Ilyes Choubani   nouvelle philosph...
1004
1005
1006
    ENDIF
    
    ; Locating the A7 stellar population parameters
955f09f4   Ilyes Choubani   Retrieving data f...
1007
    testa7 = strupcase(strmid(key,0,2)) EQ 'A7'
dcf48925   Ilyes Choubani   added spectral class
1008
    ind = where(testa7,countinda7)
955f09f4   Ilyes Choubani   Retrieving data f...
1009
1010
1011
1012
1013
1014
1015
1016
1017
    ; retrieveing the defaut values from the txt database
    tsta7 = strtrim(strmid(SpecType_MS,0,2),2) EQ 'A7' and strtrim(strmid(SpecType_MS,2,1),2) NE '.'
    indat  = where(tsta7,ctdata7)
    if ctdata7 ne 0 then begin
         
        T_eff_MS_a7 = double(T_eff_MS(indat))
        R_star_MS_a7 = double(R_star_MS(indat))
        
    endif
4750086c   Ilyes Choubani   nouvelle philosph...
1018
    IF countinda7 NE 0 THEN BEGIN
dcf48925   Ilyes Choubani   added spectral class
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
        lumclassA7 = lumclass(ind)
        nlmA7 = n_elements(lumclassA7)
        indA7_1 = fltarr(nlmA7)
        indA7_2 = indA7_1
        indA7_3 = indA7_1
        indA7_4 = indA7_1  
        countindA7_1 = indA7_1
        countindA7_2 = indA7_1
        countindA7_3 = indA7_1
        countindA7_4 = indA7_1
        FOR i=0L,nlmA7-1 DO BEGIN
            popnumber+=1
            counta+=1
            inda7_1[i] =  where(testa7 and params EQ 1, countinda7_1x); index of radius of this stellar population in the val array
            countinda7_1[i] = countinda7_1x
            inda7_2[i] =  where(testa7 and params EQ 2, countinda7_2x); index of temperature of this stellar population in the val array
            countinda7_2[i] = countinda7_2x
            inda7_3[i] =  where(testa7 and params EQ 3, countinda7_3x); index of distance of this stellar population in the val array
            countinda7_3[i] = countinda7_3x
            inda7_4[i] =  where(testa7 and params EQ 4, countinda7_4x); index of the nstars of this stellar population in the val array
            countinda7_4[i] = countinda7_4x
       ENDFOR
4750086c   Ilyes Choubani   nouvelle philosph...
1041
1042
1043
    ENDIF
    
    ; Locating the A8 stellar population parameters
955f09f4   Ilyes Choubani   Retrieving data f...
1044
    testa8 = strupcase(strmid(key,0,2)) EQ 'A8'
dcf48925   Ilyes Choubani   added spectral class
1045
    ind = where(testa8,countinda8)
955f09f4   Ilyes Choubani   Retrieving data f...
1046
1047
1048
1049
1050
1051
1052
1053
1054
    ; retrieveing the defaut values from the txt database
    tsta8 = strtrim(strmid(SpecType_MS,0,2),2) EQ 'A8' and strtrim(strmid(SpecType_MS,2,1),2) NE '.'
    indat  = where(tsta8,ctdata8)
    if ctdata8 ne 0 then begin
         
        T_eff_MS_a8 = double(T_eff_MS(indat))
        R_star_MS_a8 = double(R_star_MS(indat))
        
    endif
4750086c   Ilyes Choubani   nouvelle philosph...
1055
    IF countinda8 NE 0 THEN BEGIN
dcf48925   Ilyes Choubani   added spectral class
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
        lumclassA8 = lumclass(ind)
        nlmA8 = n_elements(lumclassA8)
        indA8_1 = fltarr(nlmA8)
        indA8_2 = indA8_1
        indA8_3 = indA8_1
        indA8_4 = indA8_1
        countindA8_1 = indA8_1
        countindA8_2 = indA8_1
        countindA8_3 = indA8_1
        countindA8_4 = indA8_1
        FOR i=0L,nlmA8-1 DO BEGIN
            popnumber+=1
            counta+=1
            inda8_1[i] =  where(testa8 and params EQ 1, countinda8_1x); index of radius of this stellar population in the val array
            countinda8_1[i] = countinda8_1x
            inda8_2[i] =  where(testa8 and params EQ 2, countinda8_2x); index of temperature of this stellar population in the val array
            countinda8_2[i] = countinda8_2x
            inda8_3[i] =  where(testa8 and params EQ 3, countinda8_3x); index of distance of this stellar population in the val array
            countinda8_3[i] = countinda8_3x
            inda8_4[i] =  where(testa8 and params EQ 4, countinda8_4x); index of the nstars of this stellar population in the val array
            countinda8_4[i] = countinda8_4x
        ENDFOR
4750086c   Ilyes Choubani   nouvelle philosph...
1078
1079
1080
    ENDIF
   
    ; Locating the A9 stellar population parameters
955f09f4   Ilyes Choubani   Retrieving data f...
1081
    testa9 = strupcase(strmid(key,0,2)) EQ 'A9' 
dcf48925   Ilyes Choubani   added spectral class
1082
    ind = where(testa9,countinda9)
955f09f4   Ilyes Choubani   Retrieving data f...
1083
1084
1085
1086
1087
1088
1089
1090
1091
    ; retrieveing the defaut values from the txt database
    tsta9 = strtrim(strmid(SpecType_MS,0,2),2) EQ 'A9' and strtrim(strmid(SpecType_MS,2,1),2) NE '.'
    indat  = where(tsta9,ctdata9)
    if ctdata9 ne 0 then begin
         
        T_eff_MS_a9 = double(T_eff_MS(indat))
        R_star_MS_a9 = double(R_star_MS(indat))
        
    endif
4750086c   Ilyes Choubani   nouvelle philosph...
1092
    IF countinda9 NE 0 THEN BEGIN
dcf48925   Ilyes Choubani   added spectral class
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
        lumclassA9 = lumclass(ind)
        nlmA9 = n_elements(lumclassA9)
        indA9_1 = fltarr(nlmA9)
        indA9_2 = indA9_1
        indA9_3 = indA9_1
        indA9_4 = indA9_1    
        countindA9_1 = indA9_1
        countindA9_2 = indA9_1
        countindA9_3 = indA9_1
        countindA9_4 = indA9_1
        FOR i=0L,nlmA9-1 DO BEGIN
            popnumber+=1  
            counta+=1
            inda9_1[i] =  where(testa9 and params EQ 1, countinda9_1x); index of radius of this stellar population in the val array
            countinda9_1[i] = countinda9_1x
            inda9_2[i] =  where(testa9 and params EQ 2, countinda9_2x); index of temperature of this stellar population in the val array
            countinda9_2[i] = countinda9_2x
            inda9_3[i] =  where(testa9 and params EQ 3, countinda9_3x); index of distance of this stellar population in the val array
            countinda9_3[i] = countinda9_3x
            inda9_4[i] =  where(testa9 and params EQ 4, countinda9_4x); index of the nstars of this stellar population in the val array
            countinda9_4[i] = countinda9_4x
        ENDFOR
4750086c   Ilyes Choubani   nouvelle philosph...
1115
1116
1117
1118
1119
1120
    ENDIF
    
    
    ;====================================================== 
     
    ; Locating the F0 stellar population parameters 
955f09f4   Ilyes Choubani   Retrieving data f...
1121
    testf0 = strupcase(strmid(key,0,2)) EQ 'F0' 
dcf48925   Ilyes Choubani   added spectral class
1122
    ind = where(testf0,countindf0)
955f09f4   Ilyes Choubani   Retrieving data f...
1123
1124
1125
1126
1127
1128
1129
1130
1131
    ; retrieveing the defaut values from the txt database
    tstf0 = strtrim(strmid(SpecType_MS,0,2),2) EQ 'F0' and strtrim(strmid(SpecType_MS,2,1),2) NE '.'
    indat  = where(tstf0,ctdatf0)
    if ctdatf0 ne 0 then begin
         
        T_eff_MS_f0 = double(T_eff_MS(indat))
        R_star_MS_f0 = double(R_star_MS(indat))
        
    endif
4750086c   Ilyes Choubani   nouvelle philosph...
1132
    IF countindf0 NE 0 THEN BEGIN
dcf48925   Ilyes Choubani   added spectral class
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
        lumclassF0 = lumclass(ind)
        nlmF0 = n_elements(lumclassF0)
        indF0_1 = fltarr(nlmF0)
        indF0_2 = indF0_1
        indF0_3 = indF0_1
        indF0_4 = indF0_1
        countindF0_1 = indF0_1
        countindF0_2 = indF0_1
        countindF0_3 = indF0_1
        countindF0_4 = indF0_1
        FOR i=0L,nlmF0-1 DO BEGIN
            popnumber+=1
            countf+=1
            indf0_1[i] =  where(testf0 and params EQ 1, countindf0_1x); index of radius of this stellar population in the val array
            countindf0_1[i] = countindf0_1x
            indf0_2[i] =  where(testf0 and params EQ 2, countindf0_2x); index of temperature of this stellar population in the val array
            countindf0_2[i] = countindf0_2x
            indf0_3[i] =  where(testf0 and params EQ 3, countindf0_3x); index of distance of this stellar population in the val array
            countindf0_3[i] = countindf0_3x
            indf0_4[i] =  where(testf0 and params EQ 4, countindf0_4x); index of the nstars of this stellar population in the val array
            countindf0_4[i] = countindf0_4x
        ENDFOR
4750086c   Ilyes Choubani   nouvelle philosph...
1155
1156
1157
    ENDIF
    
    ; Locating the F1 stellar population parameters
955f09f4   Ilyes Choubani   Retrieving data f...
1158
    testf1 = strupcase(strmid(key,0,2)) EQ 'F1' 
dcf48925   Ilyes Choubani   added spectral class
1159
    ind = where(testf1,countindf1)
955f09f4   Ilyes Choubani   Retrieving data f...
1160
1161
1162
1163
1164
1165
1166
1167
1168
    ; retrieveing the defaut values from the txt database
    tstf1 = strtrim(strmid(SpecType_MS,0,2),2) EQ 'F1' and strtrim(strmid(SpecType_MS,2,1),2) NE '.'
    indat  = where(tstf1,ctdatf1)
    if ctdatf1 ne 0 then begin
         
        T_eff_MS_f1 = double(T_eff_MS(indat))
        R_star_MS_f1 = double(R_star_MS(indat))
        
    endif
4750086c   Ilyes Choubani   nouvelle philosph...
1169
    IF countindf1 NE 0 THEN BEGIN
dcf48925   Ilyes Choubani   added spectral class
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
        lumclassF1 = lumclass(ind)
        nlmF1 = n_elements(lumclassF1)
        indF1_1 = fltarr(nlmF1)
        indF1_2 = indF1_1
        indF1_3 = indF1_1
        indF1_4 = indF1_1
        countindF1_1 = indF1_1
        countindF1_2 = indF1_1
        countindF1_3 = indF1_1
        countindF1_4 = indF1_1
        FOR i=0L,nlmF1-1 DO BEGIN
            popnumber+=1
            countf+=1
            indf1_1[i] =  where(testf1 and params EQ 1, countindf1_1x); index of radius of this stellar population in the val array
            countindf1_1[i] = countindf1_1x
            indf1_2[i] =  where(testf1 and params EQ 2, countindf1_2x); index of temperature of this stellar population in the val array
            countindf1_2[i] = countindf1_2x
            indf1_3[i] =  where(testf1 and params EQ 3, countindf1_3x); index of distance of this stellar population in the val array
            countindf1_3[i] = countindf1_3x
            indf1_4[i] =  where(testf1 and params EQ 4, countindf1_4x); index of the nstars of this stellar population in the val array
            countindf1_4[i] = countindf1_4x
        ENDFOR
4750086c   Ilyes Choubani   nouvelle philosph...
1192
1193
1194
    ENDIF
    
    ; Locating the F2 stellar population parameters
955f09f4   Ilyes Choubani   Retrieving data f...
1195
    testf2 = strupcase(strmid(key,0,2)) EQ 'F2' 
dcf48925   Ilyes Choubani   added spectral class
1196
    ind = where(testf2,countindf2)
955f09f4   Ilyes Choubani   Retrieving data f...
1197
1198
1199
1200
1201
1202
1203
1204
1205
    ; retrieveing the defaut values from the txt database
    tstf2 = strtrim(strmid(SpecType_MS,0,2),2) EQ 'F2' and strtrim(strmid(SpecType_MS,2,1),2) NE '.'
    indat  = where(tstf2,ctdatf2)
    if ctdatf2 ne 0 then begin
         
        T_eff_MS_f2 = double(T_eff_MS(indat))
        R_star_MS_f2 = double(R_star_MS(indat))
        
    endif
4750086c   Ilyes Choubani   nouvelle philosph...
1206
    IF countindf2 NE 0 THEN BEGIN
dcf48925   Ilyes Choubani   added spectral class
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
        lumclassF2 = lumclass(ind)
        nlmF2 = n_elements(lumclassF2)
        indF2_1 = fltarr(nlmF2)
        indF2_2 = testf2
        indF2_3 = testf2
        indF2_4 = testf2
        countindF2_1 = testf2
        countindF2_2 = testf2
        countindF2_3 = testf2
        countindF2_4 = testf2
        FOR i=0L,nlmF2-1 DO BEGIN
            popnumber+=1
            countf+=1
            indf2_1[i] =  where(testf2 and params EQ 1, countindf2_1x); index of radius of this stellar population in the val array
            countindf2_1[i] = countindf2_1x
            indf2_2[i] =  where(testf2 and params EQ 2, countindf2_2x); index of temperature of this stellar population in the val array
            countindf2_2[i] = countindf2_2x
            indf2_3[i] =  where(testf2 and params EQ 3, countindf2_3x); index of distance of this stellar population in the val array
            countindf2_3[i] = countindf2_3x
            indf2_4[i] =  where(testf2 and params EQ 4, countindf2_4x); index of the nstars of this stellar population in the val array
            countindf2_4[i] = countindf2_4x
        ENDFOR
4750086c   Ilyes Choubani   nouvelle philosph...
1229
1230
1231
    ENDIF
    
    ; Locating the F3 stellar population parameters
955f09f4   Ilyes Choubani   Retrieving data f...
1232
    testf3 = strupcase(strmid(key,0,2)) EQ 'F3' 
dcf48925   Ilyes Choubani   added spectral class
1233
    ind = where(testf3,countindf3)
955f09f4   Ilyes Choubani   Retrieving data f...
1234
1235
1236
1237
1238
1239
1240
1241
1242
    ; retrieveing the defaut values from the txt database
    tstf3 = strtrim(strmid(SpecType_MS,0,2),2) EQ 'F3' and strtrim(strmid(SpecType_MS,2,1),2) NE '.'
    indat  = where(tstf3,ctdatf3)
    if ctdatf3 ne 0 then begin
         
        T_eff_MS_f3 = double(T_eff_MS(indat))
        R_star_MS_f3 = double(R_star_MS(indat))
        
    endif
4750086c   Ilyes Choubani   nouvelle philosph...
1243
    IF countindf3 NE 0 THEN BEGIN
dcf48925   Ilyes Choubani   added spectral class
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
        lumclassF3 = lumclass(ind)
        nlmF3 = n_elements(lumclassF3)
        indF3_1 = fltarr(nlmF3)
        indF3_2 = indF3_1
        indF3_3 = indF3_1
        indF3_4 = indF3_1
        countindF3_1 = indF3_1
        countindF3_2 = indF3_1
        countindF3_3 = indF3_1
        countindF3_4 = indF3_1
        FOR i=0L,nlmF3-1 DO BEGIN
            popnumber+=1
            countf+=1
            indf3_1[i] =  where(testf3 and params EQ 1, countindf3_1x); index of radius of this stellar population in the val array
            countindf3_1[i] = countindf3_1x
            indf3_2[i] =  where(testf3 and params EQ 2, countindf3_2x); index of temperature of this stellar population in the val array
            countindf3_2[i] = countindf3_2x
            indf3_3[i] =  where(testf3 and params EQ 3, countindf3_3x); index of distance of this stellar population in the val array
            countindf3_3[i] = countindf3_3x
            indf3_4[i] =  where(testf3 and params EQ 4, countindf3_4x); index of the nstars of this stellar population in the val array
            countindf3_4[i] = countindf3_4x
        ENDFOR
4750086c   Ilyes Choubani   nouvelle philosph...
1266
1267
1268
    ENDIF
    
    ; Locating the F4 stellar population parameters
955f09f4   Ilyes Choubani   Retrieving data f...
1269
    testf4 = strupcase(strmid(key,0,2)) EQ 'F4'
dcf48925   Ilyes Choubani   added spectral class
1270
    ind = where(testf4,countindf4)
955f09f4   Ilyes Choubani   Retrieving data f...
1271
1272
1273
1274
1275
1276
1277
1278
1279
    ; retrieveing the defaut values from the txt database
    tstf4 = strtrim(strmid(SpecType_MS,0,2),2) EQ 'F4' and strtrim(strmid(SpecType_MS,2,1),2) NE '.'
    indat  = where(tstf4,ctdatf4)
    if ctdatf4 ne 0 then begin
         
        T_eff_MS_f4 = double(T_eff_MS(indat))
        R_star_MS_f4 = double(R_star_MS(indat))
        
    endif
4750086c   Ilyes Choubani   nouvelle philosph...
1280
    IF countindf4 NE 0 THEN BEGIN
dcf48925   Ilyes Choubani   added spectral class
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
        lumclassF4 = lumclass(ind)
        nlmF4 = n_elements(lumclassF4)
        indF4_1 = fltarr(nlmF4)
        indF4_2 = indF4_1
        indF4_3 = indF4_1
        indF4_4 = indF4_1
        countindF4_1 = indF4_1
        countindF4_2 = indF4_1
        countindF4_3 = indF4_1
        countindF4_4 = indF4_1
        FOR i=0L,nlmF4-1 DO BEGIN
            popnumber+=1
            countf+=1
            indf4_1[i] =  where(testf4 and params EQ 1, countindf4_1x); index of radius of this stellar population in the val array
            countindf4_1[i] = countindf4_1x
            indf4_2[i] =  where(testf4 and params EQ 2, countindf4_2x); index of temperature of this stellar population in the val array
            countindf4_2[i] = countindf4_2x
            indf4_3[i] =  where(testf4 and params EQ 3, countindf4_3x); index of distance of this stellar population in the val array
            countindf4_3[i] = countindf4_3x
            indf4_4[i] =  where(testf4 and params EQ 4, countindf4_4x); index of the nstars of this stellar population in the val array
            countindf4_4[i] = countindf4_4x
        ENDFOR
4750086c   Ilyes Choubani   nouvelle philosph...
1303
1304
1305
    ENDIF
    
    ; Locating the F5 stellar population parameters
955f09f4   Ilyes Choubani   Retrieving data f...
1306
    testf5 = strupcase(strmid(key,0,2)) EQ 'F5'
dcf48925   Ilyes Choubani   added spectral class
1307
    ind = where(testf5,countindf5)
955f09f4   Ilyes Choubani   Retrieving data f...
1308
1309
1310
1311
1312
1313
1314
1315
1316
    ; retrieveing the defaut values from the txt database
    tstf5 = strtrim(strmid(SpecType_MS,0,2),2) EQ 'F5' and strtrim(strmid(SpecType_MS,2,1),2) NE '.'
    indat  = where(tstf5,ctdatf5)
    if ctdatf5 ne 0 then begin
         
        T_eff_MS_f5 = double(T_eff_MS(indat))
        R_star_MS_f5 = double(R_star_MS(indat))
        
    endif
4750086c   Ilyes Choubani   nouvelle philosph...
1317
    IF countindf5 NE 0 THEN BEGIN
dcf48925   Ilyes Choubani   added spectral class
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
       lumclassF5 = lumclass(ind)
       nlmF5 = n_elements(lumclassF5)
       indF5_1 = fltarr(nlmF5)
       indF5_2 = indF5_1
       indF5_3 = indF5_1
       indF5_4 = indF5_1
       countindF5_1 = indF5_1
       countindF5_2 = indF5_1
       countindF5_3 = indF5_1
       countindF5_4 = indF5_1
       FOR i=0L,nlmF5-1 DO BEGIN
            popnumber+=1
            countf+=1
            indf5_1[i] =  where(testf5 and params EQ 1, countindf5_1x); index of radius of this stellar population in the val array
            countindf5_1[i] = countindf5_1x
            indf5_2[i] =  where(testf5 and params EQ 2, countindf5_2x); index of temperature of this stellar population in the val array
            countindf5_2[i] = countindf5_2x
            indf5_3[i] =  where(testf5 and params EQ 3, countindf5_3x); index of distance of this stellar population in the val array
            countindf5_3[i] = countindf5_3x
            indf5_4[i] =  where(testf5 and params EQ 4, countindf5_4x); index of the nstars of this stellar population in the val array
            countindf5_4[i] = countindf5_4x
        ENDFOR
4750086c   Ilyes Choubani   nouvelle philosph...
1340
1341
1342
    ENDIF
    
    ; Locating the F6 stellar population parameters
955f09f4   Ilyes Choubani   Retrieving data f...
1343
    testf6 = strupcase(strmid(key,0,2)) EQ 'F6' 
dcf48925   Ilyes Choubani   added spectral class
1344
    ind = where(testf6,countindf6)
955f09f4   Ilyes Choubani   Retrieving data f...
1345
1346
1347
1348
1349
1350
1351
1352
1353
    ; retrieveing the defaut values from the txt database
    tstf6 = strtrim(strmid(SpecType_MS,0,2),2) EQ 'F6' and strtrim(strmid(SpecType_MS,2,1),2) NE '.'
    indat  = where(tstf6,ctdatf6)
    if ctdatf6 ne 0 then begin
         
        T_eff_MS_f6 = double(T_eff_MS(indat))
        R_star_MS_f6 = double(R_star_MS(indat))
        
    endif
4750086c   Ilyes Choubani   nouvelle philosph...
1354
    IF countindf6 NE 0 THEN BEGIN
dcf48925   Ilyes Choubani   added spectral class
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
         lumclassF6 = lumclass(ind)
         nlmF6 = n_elements(lumclassF6)
         indF6_1 = fltarr(nlmF6)
         indF6_2 = indF6_1
         indF6_3 = indF6_1
         indF6_4 = indF6_1
         countindF6_1 = indF6_1
         countindF6_2 = indF6_1
         countindF6_3 = indF6_1
         countindF6_4 = indF6_1
         FOR i=0L,nlmF6-1 DO BEGIN   
            popnumber+=1
            countf+=1
            indf6_1[i] =  where(testf6 and params EQ 1, countindf6_1x); index of radius of this stellar population in the val array
            countindf6_1[i] = countindf6_1x
            indf6_2[i] =  where(testf6 and params EQ 2, countindf6_2x); index of temperature of this stellar population in the val array
            countindf6_2[i] = countindf6_2x
            indf6_3[i] =  where(testf6 and params EQ 3, countindf6_3x); index of distance of this stellar population in the val array
            countindf6_3[i] = countindf6_3x
            indf6_4[i] =  where(testf6 and params EQ 4, countindf6_4x); index of the nstars of this stellar population in the val array
            countindf6_4[i] = countindf6_4x
         ENDFOR
     ENDIF
4750086c   Ilyes Choubani   nouvelle philosph...
1378
1379
    
    ; Locating the F7 stellar population parameters
955f09f4   Ilyes Choubani   Retrieving data f...
1380
    testf7 = strupcase(strmid(key,0,2)) EQ 'F7' 
dcf48925   Ilyes Choubani   added spectral class
1381
    ind = where(testf7,countindf7)
955f09f4   Ilyes Choubani   Retrieving data f...
1382
1383
1384
1385
1386
1387
1388
1389
1390
    ; retrieveing the defaut values from the txt database
    tstf7 = strtrim(strmid(SpecType_MS,0,2),2) EQ 'F7' and strtrim(strmid(SpecType_MS,2,1),2) NE '.'
    indat  = where(tstf7,ctdatf7)
    if ctdatf7 ne 0 then begin
         
        T_eff_MS_f7 = double(T_eff_MS(indat))
        R_star_MS_f7 = double(R_star_MS(indat))
        
    endif
4750086c   Ilyes Choubani   nouvelle philosph...
1391
    IF countindf7 NE 0 THEN BEGIN
dcf48925   Ilyes Choubani   added spectral class
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
        umclassF7 = lumclass(ind)
        nlmF7 = n_elements(lumclassF7)
        indF7_1 = fltarr(nlmF7)
        indF7_2 = indF7_1
        indF7_3 = indF7_1
        indF7_4 = indF7_1
        countindF7_1 = indF7_1
        countindF7_2 = indF7_1
        countindF7_3 = indF7_1
        countindF7_4 = indF7_1
        FOR i=0L,nlmF7-1 DO BEGIN
            popnumber+=1
            countf+=1
            indf7_1[i] =  where(testf7 and params EQ 1, countindf7_1x); index of radius of this stellar population in the val array
            countindf7_1[i] = countindf7_1x
            indf7_2[i] =  where(testf7 and params EQ 2, countindf7_2x); index of temperature of this stellar population in the val array
            countindf7_2[i] = countindf7_2x
            indf7_3[i] =  where(testf7 and params EQ 3, countindf7_3x); index of distance of this stellar population in the val array
            countindf7_3[i] = countindf7_3x
            indf7_4[i] =  where(testf7 and params EQ 4, countindf7_4x); index of the nstars of this stellar population in the val array
            countindf7_4[i] = countindf7_4x
        ENDFOR
4750086c   Ilyes Choubani   nouvelle philosph...
1414
1415
1416
    ENDIF
    
    ; Locating the F8 stellar population parameters
955f09f4   Ilyes Choubani   Retrieving data f...
1417
    testf8 = strupcase(strmid(key,0,2)) EQ 'F8' 
dcf48925   Ilyes Choubani   added spectral class
1418
    ind = where(testf8,countindf8)
955f09f4   Ilyes Choubani   Retrieving data f...
1419
1420
1421
1422
1423
1424
1425
1426
1427
    ; retrieveing the defaut values from the txt database
    tstf8 = strtrim(strmid(SpecType_MS,0,2),2) EQ 'F8' and strtrim(strmid(SpecType_MS,2,1),2) NE '.'
    indat  = where(tstf8,ctdatf8)
    if ctdatf8 ne 0 then begin
         
        T_eff_MS_f8 = double(T_eff_MS(indat))
        R_star_MS_f8 = double(R_star_MS(indat))
        
    endif
4750086c   Ilyes Choubani   nouvelle philosph...
1428
    IF countindf8 NE 0 THEN BEGIN
dcf48925   Ilyes Choubani   added spectral class
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
        lumclassF8 = lumclass(ind)
        nlmF8 = n_elements(lumclassF8)
        indF8_1 = fltarr(nlmF8)
        indF8_2 = indF8_1
        indF8_3 = indF8_1
        indF8_4 = indF8_1
        countindF8_1 = indF8_1
        countindF8_2 = indF8_1
        countindF8_3 = indF8_1
        countindF8_4 = indF8_1
        FOR i=0L,nlmF8-1 DO BEGIN
            popnumber+=1
            countf+=1
            indf8_1[i] =  where(testf8 and params EQ 1, countindf8_1x); index of radius of this stellar population in the val array
            countindf8_1[i] = countindf8_1x
            indf8_2[i] =  where(testf8 and params EQ 2, countindf8_2x); index of temperature of this stellar population in the val array
            countindf8_2[i] = countindf8_2x
            indf8_3[i] =  where(testf8 and params EQ 3, countindf8_3x); index of distance of this stellar population in the val array
            countindf8_3[i] = countindf8_3x
            indf8_4[i] =  where(testf8 and params EQ 4, countindf8_4x); index of the nstars of this stellar population in the val array
            countindf8_4[i] = countindf8_4x
        ENDFOR
4750086c   Ilyes Choubani   nouvelle philosph...
1451
1452
1453
    ENDIF
    
    ; Locating the F9 stellar population parameters
955f09f4   Ilyes Choubani   Retrieving data f...
1454
    testf9 = strupcase(strmid(key,0,2)) EQ 'F9' 
dcf48925   Ilyes Choubani   added spectral class
1455
    ind = where(testf9,countindf9)
955f09f4   Ilyes Choubani   Retrieving data f...
1456
1457
1458
1459
1460
1461
1462
1463
1464
    ; retrieveing the defaut values from the txt database
    tstf9 = strtrim(strmid(SpecType_MS,0,2),2) EQ 'F9' and strtrim(strmid(SpecType_MS,2,1),2) NE '.'
    indat  = where(tstf9,ctdatf9)
    if ctdatf9 ne 0 then begin
         
        T_eff_MS_f9 = double(T_eff_MS(indat))
        R_star_MS_f9 = double(R_star_MS(indat))
        
    endif
4750086c   Ilyes Choubani   nouvelle philosph...
1465
    IF countindf9 NE 0 THEN BEGIN
dcf48925   Ilyes Choubani   added spectral class
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
        lumclassF9 = lumclass(ind)
        nlmF9 = n_elements(lumclassF9)
        indF9_1 = fltarr(nlmF9)
        indF9_2 = indF9_1
        indF9_3 = indF9_1
        indF9_4 = indF9_1
        countindF9_1 = indF9_1
        countindF9_2 = indF9_1
        countindF9_3 = indF9_1
        countindF9_4 = indF9_1
        FOR i=0L,nlmF9-1 DO BEGIN 
            popnumber+=1  
            countf+=1
            indf9_1[i] =  where(testf9 and params EQ 1, countindf9_1x); index of radius of this stellar population in the val array
            countindf9_1[i] = countindf9_1x
            indf9_2[i] =  where(testf9 and params EQ 2, countindf9_2x); index of temperature of this stellar population in the val array
            countindf9_2[i] = countindf9_2x
            indf9_3[i] =  where(testf9 and params EQ 3, countindf9_3x); index of distance of this stellar population in the val array
            countindf9_3[i] = countindf9_3x
            indf9_4[i] =  where(testf9 and params EQ 4, countindf9_4x); index of the nstars of this stellar population in the val array
            countindf9_4[i] = countindf9_4x
        ENDFOR
4750086c   Ilyes Choubani   nouvelle philosph...
1488
1489
1490
1491
1492
    ENDIF
    
    
    ;======================================================
    
dcf48925   Ilyes Choubani   added spectral class
1493
    ; Locating the G0 stellar population parameters 
955f09f4   Ilyes Choubani   Retrieving data f...
1494
    testg0 = strupcase(strmid(key,0,2)) EQ 'G0' 
dcf48925   Ilyes Choubani   added spectral class
1495
    ind = where(testg0,countindg0)
955f09f4   Ilyes Choubani   Retrieving data f...
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
    
    ; retrieveing the defaut values from the txt database
    tstg0 = strtrim(strmid(SpecType_MS,0,2),2) EQ 'G0' and strtrim(strmid(SpecType_MS,2,1),2) NE '.'
    indat  = where(tstg0,ctdatg0)
    if ctdatg0 ne 0 then begin
         
        T_eff_MS_g0 = double(T_eff_MS(indat))
        R_star_MS_g0 = double(R_star_MS(indat))
        
    endif
    
4750086c   Ilyes Choubani   nouvelle philosph...
1507
    IF countindg0 NE 0 THEN BEGIN
dcf48925   Ilyes Choubani   added spectral class
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
        lumclassG0 = lumclass(ind)
        nlmG0 = n_elements(lumclassG0)
        indG0_1 = fltarr(nlmG0)
        indG0_2 = indG0_1
        indG0_3 = indG0_1
        indG0_4 = indG0_1
        countindG0_1 = indG0_1
        countindG0_2 = indG0_1
        countindG0_3 = indG0_1
        countindG0_4 = indG0_1
        FOR i=0L,nlmG0-1 DO BEGIN
            popnumber+=1
            countg+=1
            indg0_1[i] =  where(testg0 and params EQ 1, countindg0_1x); index of radius of this stellar population in the val array
            countindg0_1[i] = countindg0_1x
            indg0_2[i] =  where(testg0 and params EQ 2, countindg0_2x); index of temperature of this stellar population in the val array
            countindg0_2[i] = countindg0_2x
            indg0_3[i] =  where(testg0 and params EQ 3, countindg0_3x); index of distance of this stellar population in the val array
            countindg0_3[i] = countindg0_3x
            indg0_4[i] =  where(testg0 and params EQ 4, countindg0_4x); index of the nstars of this stellar population in the val array
            countindg0_4[i] = countindg0_4x
        ENDFOR
4750086c   Ilyes Choubani   nouvelle philosph...
1530
1531
1532
    ENDIF
    
    ; Locating the G1 stellar population parameters
955f09f4   Ilyes Choubani   Retrieving data f...
1533
    testg1 = strupcase(strmid(key,0,2)) EQ 'G1'  
dcf48925   Ilyes Choubani   added spectral class
1534
    ind = where(testg1,countindg1)
955f09f4   Ilyes Choubani   Retrieving data f...
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
    
    ; retrieveing the defaut values from the txt database
    tstg1 = strtrim(strmid(SpecType_MS,0,2),2) EQ 'G1' and strtrim(strmid(SpecType_MS,2,1),2) NE '.'
    indat  = where(tstg1,ctdatg1)
    if ctdatg1 ne 0 then begin
         
        T_eff_MS_g1 = double(T_eff_MS(indat))
        R_star_MS_g1 = double(R_star_MS(indat))
        
    endif
4750086c   Ilyes Choubani   nouvelle philosph...
1545
    IF countindg1 NE 0 THEN BEGIN
dcf48925   Ilyes Choubani   added spectral class
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
        lumclassG1 = lumclass(ind)
        nlmG1 = n_elements(lumclassG1)
        indG1_1 = fltarr(nlmG1)
        indG1_2 = indG1_1
        indG1_3 = indG1_1
        indG1_4 = indG1_1    
        countindG1_1 = indG1_1
        countindG1_2 = indG1_1
        countindG1_3 = indG1_1
        countindG1_4 = indG1_1
        FOR i=0L,nlmG1-1 DO BEGIN
            popnumber+=1
            countg+=1
            indg1_1[i] =  where(testg1 and params EQ 1, countindg1_1x); index of radius of this stellar population in the val array
            countindg1_1[i] = countindg1_1x
            indg1_2[i] =  where(testg1 and params EQ 2, countindg1_2x); index of temperature of this stellar population in the val array
            countindg1_2[i] = countindg1_2x
            indg1_3[i] =  where(testg1 and params EQ 3, countindg1_3x); index of distance of this stellar population in the val array
            countindg1_3[i] = countindg1_3x
            indg1_4[i] =  where(testg1 and params EQ 4, countindg1_4x); index of the nstars of this stellar population in the val array
            countindg1_4[i] = countindg1_4x
        ENDFOR
4750086c   Ilyes Choubani   nouvelle philosph...
1568
1569
1570
    ENDIF
    
    ; Locating the G2 stellar population parameters
955f09f4   Ilyes Choubani   Retrieving data f...
1571
    testg2 = strupcase(strmid(key,0,2)) EQ 'G2' 
dcf48925   Ilyes Choubani   added spectral class
1572
    ind = where(testg2,countindg2) ;sun-like star
955f09f4   Ilyes Choubani   Retrieving data f...
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
    ; retrieveing the defaut values from the txt database
    tstg2 = strtrim(strmid(SpecType_MS,0,2),2) EQ 'G2' and strtrim(strmid(SpecType_MS,2,1),2) NE '.'
    indat  = where(tstg2,ctdatg2)
    if ctdatg2 ne 0 then begin
         
        T_eff_MS_g2 = double(T_eff_MS(indat))
        R_star_MS_g2 = double(R_star_MS(indat))
        
    endif
    
4750086c   Ilyes Choubani   nouvelle philosph...
1583
    IF countindg2 NE 0 THEN BEGIN
dcf48925   Ilyes Choubani   added spectral class
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
        lumclassG2 = lumclass(ind)
        nlmG2 = n_elements(lumclassG2)
        indG2_1 = fltarr(nlmG2)
        indG2_2 = indG2_1
        indG2_3 = indG2_1
        indG2_4 = indG2_1
        countindG2_1 = indG2_1
        countindG2_2 = indG2_1
        countindG2_3 = indG2_1
        countindG2_4 = indG2_1
        FOR i=0L,nlmG2-1 DO BEGIN
            popnumber+=1
            countg+=1
            indg2_1[i] =  where(testg2 and params EQ 1, countindg2_1x); index of radius of this stellar population in the val array
            countindg2_1[i] = countindg2_1x
            indg2_2[i] =  where(testg2 and params EQ 2, countindg2_2x); index of temperature of this stellar population in the val array
            countindg2_2[i] = countindg2_2x
            indg2_3[i] =  where(testg2 and params EQ 3, countindg2_3x); index of distance of this stellar population in the val array
            countindg2_3[i] = countindg2_3x
            indg2_4[i] =  where(testg2 and params EQ 4, countindg2_4x); index of the nstars of this stellar population in the val array
            countindg2_4[i] = countindg2_4x
        ENDFOR
4750086c   Ilyes Choubani   nouvelle philosph...
1606
1607
1608
    ENDIF
    
    ; Locating the G3 stellar population parameters
955f09f4   Ilyes Choubani   Retrieving data f...
1609
    testg3 = strupcase(strmid(key,0,2)) EQ 'G3' 
dcf48925   Ilyes Choubani   added spectral class
1610
    ind = where(testg3,countindg3)
955f09f4   Ilyes Choubani   Retrieving data f...
1611
1612
1613
1614
1615
1616
1617
1618
1619
    ; retrieveing the defaut values from the txt database
    tstg3 = strtrim(strmid(SpecType_MS,0,2),2) EQ 'G3' and strtrim(strmid(SpecType_MS,2,1),2) NE '.'
    indat  = where(tstg3,ctdatg3)
    if ctdatg3 ne 0 then begin
         
        T_eff_MS_g3 = double(T_eff_MS(indat))
        R_star_MS_g3 = double(R_star_MS(indat))
        
    endif
4750086c   Ilyes Choubani   nouvelle philosph...
1620
    IF countindg3 NE 0 THEN BEGIN
dcf48925   Ilyes Choubani   added spectral class
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
        lumclassG3 = lumclass(ind)
        nlmG3 = n_elements(lumclassG3)
        indG3_1 = fltarr(nlmG3)
        indG3_2 = indG3_1
        indG3_3 = indG3_1
        indG3_4 = indG3_1   
        countindG3_1 = indG3_1
        countindG3_2 = indG3_1
        countindG3_3 = indG3_1
        countindG3_4 = indG3_1
        FOR i=0L,nlmG3-1 DO BEGIN
            popnumber+=1
            countg+=1
            indg3_1[i] =  where(testg3 and params EQ 1, countindg3_1x); index of radius of this stellar population in the val array
            countindg3_1[i] = countindg3_1x
            indg3_2[i] =  where(testg3 and params EQ 2, countindg3_2x); index of temperature of this stellar population in the val array
            countindg3_2[i] = countindg3_2x
            indg3_3[i] =  where(testg3 and params EQ 3, countindg3_3x); index of distance of this stellar population in the val array
            countindg3_3[i] = countindg3_3x
            indg3_4[i] =  where(testg3 and params EQ 4, countindg3_4x); index of the nstars of this stellar population in the val array
            countindg3_4[i] = countindg3_4x
        ENDFOR
4750086c   Ilyes Choubani   nouvelle philosph...
1643
1644
1645
    ENDIF
    
    ; Locating the G4 stellar population parameters
955f09f4   Ilyes Choubani   Retrieving data f...
1646
    testg3 = strupcase(strmid(key,0,2)) EQ 'G4' 
dcf48925   Ilyes Choubani   added spectral class
1647
    ind = where(testg3,countindg4)
955f09f4   Ilyes Choubani   Retrieving data f...
1648
1649
1650
1651
1652
1653
1654
1655
1656
    ; retrieveing the defaut values from the txt database
    tstg4 = strtrim(strmid(SpecType_MS,0,2),2) EQ 'G4' and strtrim(strmid(SpecType_MS,2,1),2) NE '.'
    indat  = where(tstg4,ctdatg4)
    if ctdatg4 ne 0 then begin
         
        T_eff_MS_g4 = double(T_eff_MS(indat))
        R_star_MS_g4 = double(R_star_MS(indat))
        
    endif
4750086c   Ilyes Choubani   nouvelle philosph...
1657
    IF countindg4 NE 0 THEN BEGIN
dcf48925   Ilyes Choubani   added spectral class
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
        lumclassG4 = lumclass(ind)
        nlmG4 = n_elements(lumclassG4)
        indG4_1 = fltarr(nlmG4)
        indG4_2 = indG4_1
        indG4_3 = indG4_1
        indG4_4 = indG4_1    
        countindG4_1 = indG4_1
        countindG4_2 = indG4_1
        countindG4_3 = indG4_1
        countindG4_4 = indG4_1
        FOR i=0L,nlmG4-1 DO BEGIN
            popnumber+=1
            countg+=1
            indg4_1[i] =  where(testg3 and params EQ 1, countindg4_1x); index of radius of this stellar population in the val array
            countindg4_1[i] = countindg4_1x
            indg4_2[i] =  where(testg3 and params EQ 2, countindg4_2x); index of temperature of this stellar population in the val array
            countindg4_2[i] = countindg4_2x
            indg4_3[i] =  where(testg3 and params EQ 3, countindg4_3x); index of distance of this stellar population in the val array
            countindg4_3[i] = countindg4_3x
            indg4_4[i] =  where(testg3 and params EQ 4, countindg4_4x); index of the nstars of this stellar population in the val array
            countindg4_4[i] = countindg4_4x
        ENDFOR
4750086c   Ilyes Choubani   nouvelle philosph...
1680
1681
1682
    ENDIF
    
    ; Locating the G5 stellar population parameters
955f09f4   Ilyes Choubani   Retrieving data f...
1683
    testg5 = strupcase(strmid(key,0,2)) EQ 'G5' 
dcf48925   Ilyes Choubani   added spectral class
1684
    ind = where(testg5,countindg5)
955f09f4   Ilyes Choubani   Retrieving data f...
1685
1686
1687
1688
1689
1690
1691
1692
1693
    ; retrieveing the defaut values from the txt database
    tstg5 = strtrim(strmid(SpecType_MS,0,2),2) EQ 'G5' and strtrim(strmid(SpecType_MS,2,1),2) NE '.'
    indat  = where(tstg5,ctdatg5)
    if ctdatg5 ne 0 then begin
         
        T_eff_MS_g5 = double(T_eff_MS(indat))
        R_star_MS_g5 = double(R_star_MS(indat))
        
    endif
4750086c   Ilyes Choubani   nouvelle philosph...
1694
    IF countindg5 NE 0 THEN BEGIN
dcf48925   Ilyes Choubani   added spectral class
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
        lumclassG5 = lumclass(ind)
        nlmG5 = n_elements(lumclassG5)
        indG5_1 = fltarr(nlmG5)
        indG5_2 = indG5_1
        indG5_3 = indG5_1
        indG5_4 = indG5_1
        countindG5_1 = indG5_1
        countindG5_2 = indG5_1
        countindG5_3 = indG5_1
        countindG5_4 = indG5_1
        FOR i=0L,nlmG5-1 DO BEGIN
            popnumber+=1
            countg+=1
            indg5_1[i] =  where(testg5 and params EQ 1, countindg5_1x); index of radius of this stellar population in the val array
            countindg5_1[i] = countindg5_1x
            indg5_2[i] =  where(testg5 and params EQ 2, countindg5_2x); index of temperature of this stellar population in the val array
            countindg5_2[i] = countindg5_2x
            indg5_3[i] =  where(testg5 and params EQ 3, countindg5_3x); index of distance of this stellar population in the val array
            countindg5_3[i] = countindg5_3x
            indg5_4[i] =  where(testg5 and params EQ 4, countindg5_4x); index of the nstars of this stellar population in the val array
            countindg5_4[i] = countindg5_4x
       ENDFOR
4750086c   Ilyes Choubani   nouvelle philosph...
1717
1718
1719
    ENDIF
    
    ; Locating the G6 stellar population parameters
955f09f4   Ilyes Choubani   Retrieving data f...
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
    testg6 = strupcase(strmid(key,0,2)) EQ 'G6' 
    ind = where(testg6,countindg6)
    ; retrieveing the defaut values from the txt database
    tstg6 = strtrim(strmid(SpecType_MS,0,2),2) EQ 'G6' and strtrim(strmid(SpecType_MS,2,1),2) NE '.'
    indat  = where(tstg6,ctdatg6)
    if ctdatg6 ne 0 then begin
         
        T_eff_MS_g6 = double(T_eff_MS(indat))
        R_star_MS_g6 = double(R_star_MS(indat))
        
    endif  
4750086c   Ilyes Choubani   nouvelle philosph...
1731
    IF countindg6 NE 0 THEN BEGIN
dcf48925   Ilyes Choubani   added spectral class
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
        lumclassG6 = lumclass(ind)
        nlmG6 = n_elements(lumclassG6) 
        indG6_1 = fltarr(nlmG6)
        indG6_2 = indG6_1
        indG6_3 = indG6_1
        indG6_4 = indG6_1 
        countindG6_1 = indG6_1
        countindG6_2 = indG6_1
        countindG6_3 = indG6_1
        countindG6_4 = indG6_1
        FOR i=0L,nlmG6-1 DO BEGIN     
            popnumber+=1
            countg+=1
            indg6_1[i] =  where(testg6 and params EQ 1, countindg6_1x); index of radius of this stellar population in the val array
            countindg6_1[i] = countindg6_1x
            indg6_2[i] =  where(testg6 and params EQ 2, countindg6_2x); index of temperature of this stellar population in the val array
            countindg6_2[i] = countindg6_2x
            indg6_3[i] =  where(testg6 and params EQ 3, countindg6_3x); index of distance of this stellar population in the val array
            countindg6_3[i] = countindg6_3x
            indg6_4[i] =  where(testg6 and params EQ 4, countindg6_4x); index of the nstars of this stellar population in the val array
            countindg6_4[i] = countindg6_4x
        ENDFOR
4750086c   Ilyes Choubani   nouvelle philosph...
1754
1755
1756
    ENDIF
    
    ; Locating the G7 stellar population parameters
955f09f4   Ilyes Choubani   Retrieving data f...
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
    testg7 = strupcase(strmid(key,0,2)) EQ 'G7' 
    ind = where(testg7,countindg7)  
    ; retrieveing the defaut values from the txt database
    tstg7 = strtrim(strmid(SpecType_MS,0,2),2) EQ 'G7' and strtrim(strmid(SpecType_MS,2,1),2) NE '.'
    indat  = where(tstg7,ctdatg7)
    if ctdatg7 ne 0 then begin
         
        T_eff_MS_g7 = double(T_eff_MS(indat))
        R_star_MS_g7 = double(R_star_MS(indat))
        
    endif 
4750086c   Ilyes Choubani   nouvelle philosph...
1768
    IF countindg7 NE 0 THEN BEGIN
dcf48925   Ilyes Choubani   added spectral class
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
        lumclassG7 = lumclass(ind)
        nlmG7 = n_elements(lumclassG7)
        indG7_1 = fltarr(nlmG7)
        indG7_2 = indG7_1
        indG7_3 = indG7_1
        indG7_4 = indG7_1
        countindG7_1 = indG7_1
        countindG7_2 = indG7_1
        countindG7_3 = indG7_1
        countindG7_4 = indG7_1
        FOR i=0L,nlmG7-1 DO BEGIN 
            popnumber+=1
            countg+=1
            indg7_1[i] =  where(testg7 and params EQ 1, countindg7_1x); index of radius of this stellar population in the val array
            countindg7_1[i] = countindg7_1x
            indg7_2[i] =  where(testg7 and params EQ 2, countindg7_2x); index of temperature of this stellar population in the val array
            countindg7_2[i] = countindg7_2x
            indg7_3[i] =  where(testg7 and params EQ 3, countindg7_3x); index of distance of this stellar population in the val array
            countindg7_3[i] = countindg7_3x
            indg7_4[i] =  where(testg7 and params EQ 4, countindg7_4x); index of the nstars of this stellar population in the val array
            countindg7_4[i] = countindg7_4x
        ENDFOR
4750086c   Ilyes Choubani   nouvelle philosph...
1791
1792
1793
    ENDIF
    
    ; Locating the G8 stellar population parameters
955f09f4   Ilyes Choubani   Retrieving data f...
1794
    testg8 = strupcase(strmid(key,0,2)) EQ 'G8'     
dcf48925   Ilyes Choubani   added spectral class
1795
    ind = where(testg8,countindg8)
955f09f4   Ilyes Choubani   Retrieving data f...
1796
1797
1798
1799
1800
1801
1802
1803
1804
    ; retrieveing the defaut values from the txt database
    tstg8 = strtrim(strmid(SpecType_MS,0,2),2) EQ 'G8' and strtrim(strmid(SpecType_MS,2,1),2) NE '.'
    indat  = where(tstg8,ctdatg8)
    if ctdatg8 ne 0 then begin
         
        T_eff_MS_g8 = double(T_eff_MS(indat))
        R_star_MS_g8 = double(R_star_MS(indat))
        
    endif
4750086c   Ilyes Choubani   nouvelle philosph...
1805
    IF countindg8 NE 0 THEN BEGIN
dcf48925   Ilyes Choubani   added spectral class
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
        lumclassG8 = lumclass(ind)
        nlmG8 = n_elements(lumclassG8)
        indG8_1 = fltarr(nlmG8)
        indG8_2 = indG8_1
        indG8_3 = indG8_1
        indG8_4 = indG8_1    
        countindG8_1 = indG8_1
        countindG8_2 = indG8_1
        countindG8_3 = indG8_1
        countindG8_4 = indG8_1
        FOR i=0L,nlmG8-1 DO BEGIN
            popnumber+=1
            countg+=1
            indg8_1[i] =  where(testg8 and params EQ 1, countindg8_1x); index of radius of this stellar population in the val array
            countindg8_1[i] = countindg8_1x
            indg8_2[i] =  where(testg8 and params EQ 2, countindg8_2x); index of temperature of this stellar population in the val array
            countindg8_2[i] = countindg8_2x
            indg8_3[i] =  where(testg8 and params EQ 3, countindg8_3x); index of distance of this stellar population in the val array
            countindg8_3[i] = countindg8_3x
            indg8_4[i] =  where(testg8 and params EQ 4, countindg8_4x); index of the nstars of this stellar population in the val array
            countindg8_4[i] = countindg8_4x
        ENDFOR
4750086c   Ilyes Choubani   nouvelle philosph...
1828
1829
1830
    ENDIF
    
    ; Locating the G9 stellar population parameters
955f09f4   Ilyes Choubani   Retrieving data f...
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
    testg9 = strupcase(strmid(key,0,2)) EQ 'G9' 
    ind = where(testg9,countindg9)  
    ; retrieveing the defaut values from the txt database
    tstg9 = strtrim(strmid(SpecType_MS,0,2),2) EQ 'G9' and strtrim(strmid(SpecType_MS,2,1),2) NE '.'
    indat  = where(tstg9,ctdatg9)
    if ctdatg9 ne 0 then begin
         
        T_eff_MS_g9 = double(T_eff_MS(indat))
        R_star_MS_g9 = double(R_star_MS(indat))
        
    endif     
4750086c   Ilyes Choubani   nouvelle philosph...
1842
    IF countindg9 NE 0 THEN BEGIN
dcf48925   Ilyes Choubani   added spectral class
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
        lumclassG9 = lumclass(ind)
        nlmG9 = n_elements(lumclassG9)
        indG9_1 = fltarr(nlmG9)
        indG9_2 = indG9_1
        indG9_3 = indG9_1
        indG9_4 = indG9_1   
        countindG9_1 = indG9_1
        countindG9_2 = indG9_1
        countindG9_3 = indG9_1
        countindG9_4 = indG9_1
        FOR i=0L,nlmG9-1 DO BEGIN
            popnumber+=1   
            countg+=1
            indg9_1[i] =  where(testg9 and params EQ 1, countindg9_1x); index of radius of this stellar population in the val array
            countindg9_1[i] = countindg9_1x
            indg9_2[i] =  where(testg9 and params EQ 2, countindg9_2x); index of temperature of this stellar population in the val array
            countindg9_2[i] = countindg9_2x
            indg9_3[i] =  where(testg9 and params EQ 3, countindg9_3x); index of distance of this stellar population in the val array
            countindg9_3[i] = countindg9_3x
            indg9_4[i] =  where(testg9 and params EQ 4, countindg9_4x); index of the nstars of this stellar population in the val array
            countindg9_4[i] = countindg9_4x
        ENDFOR
4750086c   Ilyes Choubani   nouvelle philosph...
1865
1866
    ENDIF
    
dcf48925   Ilyes Choubani   added spectral class
1867
     
4750086c   Ilyes Choubani   nouvelle philosph...
1868
1869
    comp_pop=replicate(one_pop,popnumber) ; Replication of the default and initialized stellar population structure to create the composite stellar population structure. All the tag values are by default set to te null value
    
2bbb56cf   Jean-Philippe Bernard   modified to fix b...
1870
    ;stop
4750086c   Ilyes Choubani   nouvelle philosph...
1871
1872
1873
1874
1875
1876
    
    ;Filling the tags of the compsite stellar population structure using the indices defined above
    
    FOR i=0L,popnumber-1 DO BEGIN ; Looping over all the structure fields 
   
        IF counto NE 0 THEN BEGIN ; Filling the structure of the O STELLAR POPULATION(S)
dcf48925   Ilyes Choubani   added spectral class
1877
                        
4750086c   Ilyes Choubani   nouvelle philosph...
1878
            FOR k=0L,counto-1 DO BEGIN 
dcf48925   Ilyes Choubani   added spectral class
1879
          
4750086c   Ilyes Choubani   nouvelle philosph...
1880
                IF countindo3 NE 0 THEN BEGIN
dcf48925   Ilyes Choubani   added spectral class
1881
1882
                    FOR l=0L,nlmO3-1 DO BEGIN
                        comp_pop(k+i+l).popid = 'O3'+lumclasso3(l)+'_stellar_population'
759a527d   Ilyes Choubani   general update
1883
                        IF countindo3_1[l] NE 0 THEN comp_pop(k+i+l).radius = (val(indo3_1[l]))(0)*rsun2cm ELSE BEGIN
dcf48925   Ilyes Choubani   added spectral class
1884
1885
1886
1887
1888
1889
1890
;                             IF lumclasso3(l) EQ 'IA+' THEN comp_pop(k+i+l).radius = ;Hypergiants or extremely luminous supergiants
;                             IF lumclasso3(l) EQ 'IA' THEN comp_pop(k+i+l).radius =  ;Luminos supergiants
;                             IF lumclasso3(l) EQ 'IAB' THEN comp_pop(k+i+l).radius = ;Intermediate-size luminous supergiants
;                             IF lumclasso3(l) EQ 'IB' THEN comp_pop(k+i+l).radius =   ;Less luminous supergiants
;                             IF lumclasso3(l) EQ 'II' THEN comp_pop(k+i+l).radius =  ;Bright giants
;                             IF lumclasso3(l) EQ 'III' THEN comp_pop(k+i+l).radius = ;Normal giants
;                             IF lumclasso3(l) EQ 'IV' THEN comp_pop(k+i+l).radius =  ;Subgiants
955f09f4   Ilyes Choubani   Retrieving data f...
1891
                            IF lumclasso3(l) EQ 'V' THEN comp_pop(k+i+l).radius = R_star_MS_o3*rsun2cm;15.0*rsun2cm ;(cm,cgs);Dwarfs: Main-sequence stars
dcf48925   Ilyes Choubani   added spectral class
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
;                             IF lumclasso3(l) EQ 'VI' THEN comp_pop(k+i+l).radius = ;Subdwarfs
;                             IF lumclasso3(l) EQ 'VII' THEN comp_pop(k+i+l).radius = ;White dwarfs   
                        ENDELSE
                        IF countindo3_2[l] NE 0 THEN comp_pop(k+i+l).temperature = (val(indo3_2[l]))(0) ELSE BEGIN       
;                             IF lumclasso3(l) EQ 'IA+' THEN comp_pop(k+i+l).temperature =
;                             IF lumclasso3(l) EQ 'IA' THEN comp_pop(k+i+l).temperature =
;                             IF lumclasso3(l) EQ 'IAB' THEN comp_pop(k+i+l).temperature =
;                             IF lumclasso3(l) EQ 'IB' THEN comp_pop(k+i+l).temperature =
;                             IF lumclasso3(l) EQ 'II' THEN comp_pop(k+i+l).temperature =
;                             IF lumclasso3(l) EQ 'III' THEN comp_pop(k+i+l).temperature = 
;                             IF lumclasso3(l) EQ 'IV' THEN comp_pop(k+i+l).temperature =
955f09f4   Ilyes Choubani   Retrieving data f...
1903
                            IF lumclasso3(l) EQ 'V' THEN comp_pop(k+i+l).temperature = T_eff_MS_o3;44.9e3 ;(K)
dcf48925   Ilyes Choubani   added spectral class
1904
1905
1906
1907
;                             IF lumclasso3(l) EQ 'VI' THEN comp_pop(k+i+l).temperature =
;                             IF lumclasso3(l) EQ 'VII' THEN comp_pop(k+i+l).temperature =   
                        ENDELSE      
                        IF countindo3_3[l] NE 0 THEN comp_pop(k+i+l).distance = (val(indo3_3[l]))(0) ELSE comp_pop(k+i+l).distance = 10.0 ; should be lower limited in the general procedure because this is the average distance between two stars
f9089dc2   Ilyes Choubani   implementing the ...
1908
                        IF countindo3_4[l] NE 0 THEN comp_pop(k+i+l).nstars = (val(indo3_4[l]))(0) ELSE comp_pop(k+i+l).nstars = 1;stellar_density*(4.*!pi/3)*comp_pop(k+i+l).distance
dcf48925   Ilyes Choubani   added spectral class
1909
1910
1911
                        ;K+=1 
                    ENDFOR
                    k+=nlmo3
4750086c   Ilyes Choubani   nouvelle philosph...
1912
1913
1914
                ENDIF
            
                IF countindo4 NE 0 THEN BEGIN
dcf48925   Ilyes Choubani   added spectral class
1915
1916
                    FOR l=0L,nlmO4-1 DO BEGIN
                        comp_pop(k+i+l).popid = 'O4'+lumclasso4(l)+'_stellar_population'
759a527d   Ilyes Choubani   general update
1917
                        IF countindo4_1[l] NE 0 THEN comp_pop(k+i+l).radius = (val(indo4_1[l]))(0)*rsun2cm ELSE BEGIN
dcf48925   Ilyes Choubani   added spectral class
1918
1919
1920
1921
1922
1923
1924
;                             IF lumclasso4(l) EQ 'IA+' THEN comp_pop(k+i+l).radius = ;Hypergiants or extremely luminous supergiants
;                             IF lumclasso4(l) EQ 'IA' THEN comp_pop(k+i+l).radius =  ;Luminos supergiants
;                             IF lumclasso4(l) EQ 'IAB' THEN comp_pop(k+i+l).radius = ;Intermediate-size luminous supergiants
;                             IF lumclasso4(l) EQ 'IB' THEN comp_pop(k+i+l).radius    ;Less luminous supergiants
;                             IF lumclasso4(l) EQ 'II' THEN comp_pop(k+i+l).radius =  ;Bright giants
;                             IF lumclasso4(l) EQ 'III' THEN comp_pop(k+i+l).radius = ;Normal giants
;                             IF lumclasso4(l) EQ 'IV' THEN comp_pop(k+i+l).radius =  ;Subgiants
955f09f4   Ilyes Choubani   Retrieving data f...
1925
                            IF lumclasso4(l) EQ 'V' THEN comp_pop(k+i+l).radius = R_star_MS_o4*rsun2cm;13.43*rsun2cm ;(cm,cgs);Dwarfs: Main-sequence stars
dcf48925   Ilyes Choubani   added spectral class
1926
1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
;                             IF lumclasso4(l) EQ 'VI' THEN comp_pop(k+i+l).radius = ;Subdwarfs
;                             IF lumclasso4(l) EQ 'VII' THEN comp_pop(k+i+l).radius = ;White dwarfs
                        ENDELSE
                        IF countindo4_2[l] NE 0 THEN comp_pop(k+i+l).temperature = (val(indo4_2[l]))(0) ELSE BEGIN
;                             IF lumclasso4(l) EQ 'IA+' THEN comp_pop(k+i+l).temperature =
;                             IF lumclasso4(l) EQ 'IA' THEN comp_pop(k+i+l).temperature =
;                             IF lumclasso4(l) EQ 'IAB' THEN comp_pop(k+i+l).temperature =
;                             IF lumclasso4(l) EQ 'IB' THEN comp_pop(k+i+l).temperature =
;                             IF lumclasso4(l) EQ 'II' THEN comp_pop(k+i+l).temperature =
;                             IF lumclasso4(l) EQ 'III' THEN comp_pop(k+i+l).temperature = 
;                             IF lumclasso4(l) EQ 'IV' THEN comp_pop(k+i+l).temperature =
955f09f4   Ilyes Choubani   Retrieving data f...
1937
                            IF lumclasso4(l) EQ 'V' THEN comp_pop(k+i+l).temperature = T_eff_MS_o4;42.9e3
dcf48925   Ilyes Choubani   added spectral class
1938
1939
1940
1941
;                             IF lumclasso4(l) EQ 'VI' THEN comp_pop(k+i+l).temperature =
;                             IF lumclasso4(l) EQ 'VII' THEN comp_pop(k+i+l).temperature =
                        ENDELSE
                        IF countindo4_3[l] NE 0 THEN comp_pop(k+i+l).distance = (val(indo4_3[l]))(0) ELSE comp_pop(k+i+l).distance = 10.0
f9089dc2   Ilyes Choubani   implementing the ...
1942
                        IF countindo4_4[l] NE 0 THEN comp_pop(k+i+l).nstars = (val(indo4_4[l]))(0) ELSE comp_pop(k+i+l).nstars = 1;stellar_density*(4.*!pi/3)*comp_pop(k+i+l).distance
dcf48925   Ilyes Choubani   added spectral class
1943
1944
1945
                        ;K+=1  
                    ENDFOR 
                    k+=nlmo4 
4750086c   Ilyes Choubani   nouvelle philosph...
1946
1947
1948
1949
                ENDIF
                
                
                IF countindo5 NE 0 THEN BEGIN
dcf48925   Ilyes Choubani   added spectral class
1950
1951
                    FOR l=0L,nlmo5-1 DO BEGIN
                        comp_pop(k+i+l).popid = 'O5'+lumclasso5(l)+'_stellar_population'
759a527d   Ilyes Choubani   general update
1952
                        IF countindo5_1[l] NE 0 THEN comp_pop(k+i+l).radius = (val(indo5_1[l]))(0)*rsun2cm ELSE BEGIN
dcf48925   Ilyes Choubani   added spectral class
1953
1954
1955
1956
1957
1958
1959
;                             IF lumclasso5(l) EQ 'IA+' THEN comp_pop(k+i+l).radius = ;Hypergiants or extremely luminous supergiants
;                             IF lumclasso5(l) EQ 'IA' THEN comp_pop(k+i+l).radius =  ;Luminos supergiants
;                             IF lumclasso5(l) EQ 'IAB' THEN comp_pop(k+i+l).radius = ;Intermediate-size luminous supergiants
;                             IF lumclasso5(l) EQ 'IB' THEN comp_pop(k+i+l).radius    ;Less luminous supergiants
;                             IF lumclasso5(l) EQ 'II' THEN comp_pop(k+i+l).radius =  ;Bright giants
;                             IF lumclasso5(l) EQ 'III' THEN comp_pop(k+i+l).radius = ;Normal giants
;                             IF lumclasso5(l) EQ 'IV' THEN comp_pop(k+i+l).radius =  ;Subgiants
955f09f4   Ilyes Choubani   Retrieving data f...
1960
                            IF lumclasso5(l) EQ 'V' THEN comp_pop(k+i+l).radius = R_star_MS_o5*rsun2cm;12*rsun2cm ;(cm,cgs);Dwarfs: Main-sequence stars
dcf48925   Ilyes Choubani   added spectral class
1961
1962
1963
1964
1965
1966
1967
1968
1969
1970
1971
;                             IF lumclasso5(l) EQ 'VI' THEN comp_pop(k+i+l).radius = ;Subdwarfs
;                             IF lumclasso5(l) EQ 'VII' THEN comp_pop(k+i+l).radius = ;White dwarfs         
                        ENDELSE
                        IF countindo5_2[l] NE 0 THEN comp_pop(k+i+l).temperature = (val(indo5_2[l]))(0) ELSE BEGIN
;                             IF lumclasso5(l) EQ 'IA+' THEN comp_pop(k+i+l).temperature =
;                             IF lumclasso5(l) EQ 'IA' THEN comp_pop(k+i+l).temperature =
;                             IF lumclasso5(l) EQ 'IAB' THEN comp_pop(k+i+l).temperature =
;                             IF lumclasso5(l) EQ 'IB' THEN comp_pop(k+i+l).temperature =
;                             IF lumclasso5(l) EQ 'II' THEN comp_pop(k+i+l).temperature =
;                             IF lumclasso5(l) EQ 'III' THEN comp_pop(k+i+l).temperature = 
;                             IF lumclasso5(l) EQ 'IV' THEN comp_pop(k+i+l).temperature =
955f09f4   Ilyes Choubani   Retrieving data f...
1972
                            IF lumclasso5(l) EQ 'V' THEN comp_pop(k+i+l).temperature = T_eff_MS_o5;41.4e3
dcf48925   Ilyes Choubani   added spectral class
1973
1974
1975
1976
;                             IF lumclasso5(l) EQ 'VI' THEN comp_pop(k+i+l).temperature =
;                             IF lumclasso5(l) EQ 'VII' THEN comp_pop(k+i+l).temperature =
                        ENDELSE
                            IF countindo5_3[l] NE 0 THEN comp_pop(k+i+l).distance = (val(indo5_3[l]))(0) ELSE comp_pop(k+i+l).distance = 10.0
f9089dc2   Ilyes Choubani   implementing the ...
1977
                            IF countindo5_4[l] NE 0 THEN comp_pop(k+i+l).nstars = (val(indo5_4[l]))(0) ELSE comp_pop(k+i+l).nstars = 1;stellar_density*(4.*!pi/3)*comp_pop(k+i+l).distance
dcf48925   Ilyes Choubani   added spectral class
1978
1979
1980
                            ;K+=1
                    ENDFOR
                    k+=nlmo5         
4750086c   Ilyes Choubani   nouvelle philosph...
1981
1982
1983
1984
1985
                ENDIF
        
                
                
                IF countindo6 NE 0 THEN BEGIN
dcf48925   Ilyes Choubani   added spectral class
1986
1987
                    FOR l=0L,nlmo6-1 DO BEGIN
                        comp_pop(k+i+l).popid = 'O6'+lumclasso6(l)+'_stellar_population'
759a527d   Ilyes Choubani   general update
1988
                        IF countindo6_1[l] NE 0 THEN comp_pop(k+i+l).radius = (val(indo6_1[l]))(0)*rsun2cm ELSE BEGIN
dcf48925   Ilyes Choubani   added spectral class
1989
1990
1991
1992
1993
1994
1995
;                             IF lumclasso6(l) EQ 'IA+' THEN comp_pop(k+i+l).radius =
;                             IF lumclasso6(l) EQ 'IA' THEN comp_pop(k+i+l).radius =
;                             IF lumclasso6(l) EQ 'IAB' THEN comp_pop(k+i+l).radius =
;                             IF lumclasso6(l) EQ 'IB' THEN comp_pop(k+i+l).radius =
;                             IF lumclasso6(l) EQ 'II' THEN comp_pop(k+i+l).radius =
;                             IF lumclasso6(l) EQ 'III' THEN comp_pop(k+i+l).radius =
;                             IF lumclasso6(l) EQ 'IV' THEN comp_pop(k+i+l).radius =
955f09f4   Ilyes Choubani   Retrieving data f...
1996
                            IF lumclasso6(l) EQ 'V' THEN comp_pop(k+i+l).radius = R_star_MS_o6*rsun2cm;10.71*rsun2cm
dcf48925   Ilyes Choubani   added spectral class
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
;                             IF lumclasso6(l) EQ 'VI' THEN comp_pop(k+i+l).radius =
;                             IF lumclasso6(l) EQ 'VII' THEN comp_pop(k+i+l).radius =
                        ENDELSE 
                        IF countindo6_2[l] NE 0 THEN comp_pop(k+i+l).temperature = (val(indo6_2[l]))(0) ELSE BEGIN
;                             IF lumclasso6(l) EQ 'IA+' THEN comp_pop(k+i+l).temperature =
;                             IF lumclasso6(l) EQ 'IA' THEN comp_pop(k+i+l).temperature =
;                             IF lumclasso6(l) EQ 'IAB' THEN comp_pop(k+i+l).temperature =
;                             IF lumclasso6(l) EQ 'IB' THEN comp_pop(k+i+l).temperature =
;                             IF lumclasso6(l) EQ 'II' THEN comp_pop(k+i+l).temperature =
;                             IF lumclasso6(l) EQ 'III' THEN comp_pop(k+i+l).temperature =
;                             IF lumclasso6(l) EQ 'IV' THEN comp_pop(k+i+l).temperature =
955f09f4   Ilyes Choubani   Retrieving data f...
2008
                            IF lumclasso6(l) EQ 'V' THEN comp_pop(k+i+l).temperature = T_eff_MS_o6;39.5e3
dcf48925   Ilyes Choubani   added spectral class
2009
2010
2011
2012
2013
2014
2015
2016
;                             IF lumclasso6(l) EQ 'VI' THEN comp_pop(k+i+l).temperature =
;                             IF lumclasso6(l) EQ 'VII' THEN comp_pop(k+i+l).temperature =
                        ENDELSE
                        IF countindo6_3[l] NE 0 THEN comp_pop(k+i+l).distance = (val(indo6_3[l]))(0) ELSE comp_pop(k+i+l).distance = 10.0
                        IF countindo6_4[l] NE 0 THEN comp_pop(k+i+l).nstars = (val(indo6_4[l]))(0) ELSE comp_pop(k+i+l).nstars = 1;stellar_density*(4.*!pi/3)*comp_pop(k+i+l).distance
                        ;K+=1        
                    ENDFOR
                    k+=nlmo6
4750086c   Ilyes Choubani   nouvelle philosph...
2017
2018
2019
2020
                ENDIF
        
                
                IF countindo7 NE 0 THEN BEGIN
dcf48925   Ilyes Choubani   added spectral class
2021
                    FOR l=0L,nlmo7-1 DO BEGIN
a73f6031   Ilyes Choubani   small corrections...
2022
                        comp_pop(k+l+i).popid = 'O7'+lumclasso7(l)+'_stellar_population'
858e1c83   Ilyes Choubani   small corrections...
2023
                        IF countindo7_1[l] NE 0 THEN comp_pop(k+i+l).radius = (val(indo7_1[l]))(0)*rsun2cm ELSE BEGIN
dcf48925   Ilyes Choubani   added spectral class
2024
2025
2026
2027
2028
2029
2030
;                             IF lumclasso7(l) EQ 'IA+' THEN comp_pop(k+i+l).radius =
;                             IF lumclasso7(l) EQ 'IA' THEN comp_pop(k+i+l).radius =
;                             IF lumclasso7(l) EQ 'IAB' THEN comp_pop(k+i+l).radius =
;                             IF lumclasso7(l) EQ 'IB' THEN comp_pop(k+i+l).radius =
;                             IF lumclasso7(l) EQ 'II' THEN comp_pop(k+i+l).radius =
;                             IF lumclasso7(l) EQ 'III' THEN comp_pop(k+i+l).radius =
;                             IF lumclasso7(l) EQ 'IV' THEN comp_pop(k+i+l).radius =
955f09f4   Ilyes Choubani   Retrieving data f...
2031
                            IF lumclasso7(l) EQ 'V' THEN comp_pop(k+i+l).radius = R_star_MS_o7*rsun2cm;9.52*rsun2cm
dcf48925   Ilyes Choubani   added spectral class
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
;                             IF lumclasso7(l) EQ 'VI' THEN comp_pop(k+i+l).radius =
;                             IF lumclasso7(l) EQ 'VII' THEN comp_pop(k+i+l).radius =
                            
                        ENDELSE
                        IF countindo7_2[l] NE 0 THEN comp_pop(k+i+l).temperature = (val(indo7_2[l]))(0) ELSE BEGIN
;                             IF lumclasso7(l) EQ 'IA+' THEN comp_pop(k+i+l).temperature =
;                             IF lumclasso7(l) EQ 'IA' THEN comp_pop(k+i+l).temperature =
;                             IF lumclasso7(l) EQ 'IAB' THEN comp_pop(k+i+l).temperature =
;                             IF lumclasso7(l) EQ 'IB' THEN comp_pop(k+i+l).temperature =
;                             IF lumclasso7(l) EQ 'II' THEN comp_pop(k+i+l).temperature =
;                             IF lumclasso7(l) EQ 'III' THEN comp_pop(k+i+l).temperature =
;                             IF lumclasso7(l) EQ 'IV' THEN comp_pop(k+i+l).temperature =
955f09f4   Ilyes Choubani   Retrieving data f...
2044
                            IF lumclasso7(l) EQ 'V' THEN comp_pop(k+i+l).temperature = T_eff_MS_o7;37.1e3
dcf48925   Ilyes Choubani   added spectral class
2045
2046
2047
2048
;                             IF lumclasso7(l) EQ 'VI' THEN comp_pop(k+i+l).temperature =
;                             IF lumclasso7(l) EQ 'VII' THEN comp_pop(k+i+l).temperature =
                        ENDELSE
                        IF countindo7_3[l] NE 0 THEN comp_pop(k+i+l).distance = (val(indo7_3[l]))(0) ELSE comp_pop(k+i+l).distance = 10.0
f9089dc2   Ilyes Choubani   implementing the ...
2049
                        IF countindo7_4[l] NE 0 THEN comp_pop(k+i+l).nstars = (val(indo7_4[l]))(0) ELSE comp_pop(k+i+l).nstars = 1;stellar_density*(4.*!pi/3)*comp_pop(k+i+l).distance
dcf48925   Ilyes Choubani   added spectral class
2050
2051
2052
                        ;K+=1 
                    ENDFOR 
                    k+=nlmo7       
4750086c   Ilyes Choubani   nouvelle philosph...
2053
2054
2055
2056
                ENDIF
                    
                
                IF countindo8 NE 0 THEN BEGIN
dcf48925   Ilyes Choubani   added spectral class
2057
2058
                    FOR l=0L,nlmo8-1 DO BEGIN
                        comp_pop(k+i+l).popid = 'O8'+lumclasso8(l)+'_stellar_population'
858e1c83   Ilyes Choubani   small corrections...
2059
                        IF countindo8_1[l] NE 0 THEN comp_pop(k+i+l).radius = (val(indo8_1[l]))(0)*rsun2cm ELSE BEGIN
dcf48925   Ilyes Choubani   added spectral class
2060
2061
2062
2063
2064
2065
2066
;                             IF lumclasso8(l) EQ 'IA+' THEN comp_pop(k+i+l).radius =
;                             IF lumclasso8(l) EQ 'IA' THEN comp_pop(k+i+l).radius =
;                             IF lumclasso8(l) EQ 'IAB' THEN comp_pop(k+i+l).radius =
;                             IF lumclasso8(l) EQ 'IB' THEN comp_pop(k+i+l).radius =
;                             IF lumclasso8(l) EQ 'II' THEN comp_pop(k+i+l).radius =
;                             IF lumclasso8(l) EQ 'III' THEN comp_pop(k+i+l).radius =
;                             IF lumclasso8(l) EQ 'IV' THEN comp_pop(k+i+l).radius =
955f09f4   Ilyes Choubani   Retrieving data f...
2067
                            IF lumclasso8(l) EQ 'V' THEN comp_pop(k+i+l).radius = R_star_MS_o8*rsun2cm;8.5*rsun2cm
dcf48925   Ilyes Choubani   added spectral class
2068
2069
2070
2071
2072
2073
2074
2075
2076
2077
2078
;                             IF lumclasso8(l) EQ 'VI' THEN comp_pop(k+i+l).radius =
;                             IF lumclasso8(l) EQ 'VII' THEN comp_pop(k+i+l).radius =
                        ENDELSE
                        IF countindo8_2[l] NE 0 THEN comp_pop(k+i+l).temperature = (val(indo8_2[l]))(0) ELSE BEGIN
;                             IF lumclasso8(l) EQ 'IA+' THEN comp_pop(k+i+l).temperature =
;                             IF lumclasso8(l) EQ 'IA' THEN comp_pop(k+i+l).temperature =
;                             IF lumclasso8(l) EQ 'IAB' THEN comp_pop(k+i+l).temperature =
;                             IF lumclasso8(l) EQ 'IB' THEN comp_pop(k+i+l).temperature =
;                             IF lumclasso8(l) EQ 'II' THEN comp_pop(k+i+l).temperature =
;                             IF lumclasso8(l) EQ 'III' THEN comp_pop(k+i+l).temperature =
;                             IF lumclasso8(l) EQ 'IV' THEN comp_pop(k+i+l).temperature =
955f09f4   Ilyes Choubani   Retrieving data f...
2079
                            IF lumclasso8(l) EQ 'V' THEN comp_pop(k+i+l).temperature = T_eff_MS_o8*rsun2cm;35.1e3
dcf48925   Ilyes Choubani   added spectral class
2080
2081
2082
2083
;                             IF lumclasso8(l) EQ 'VI' THEN comp_pop(k+i+l).temperature =
;                             IF lumclasso8(l) EQ 'VII' THEN comp_pop(k+i+l).temperature =
                        ENDELSE
                        IF countindo8_3[l] NE 0 THEN comp_pop(k+i+l).distance = (val(indo8_3[l]))(0) ELSE comp_pop(k+i+l).distance = 10.0
f9089dc2   Ilyes Choubani   implementing the ...
2084
                        IF countindo8_4[l] NE 0 THEN comp_pop(k+i+l).nstars = (val(indo8_4[l]))(0) ELSE comp_pop(k+i+l).nstars = 1;stellar_density*(4.*!pi/3)*comp_pop(k+i+l).distance
dcf48925   Ilyes Choubani   added spectral class
2085
2086
2087
                        ;K+=1  
                    ENDFOR
                    k+=nlmo8       
4750086c   Ilyes Choubani   nouvelle philosph...
2088
2089
2090
2091
                ENDIF
        
                
                IF countindo9 NE 0 THEN BEGIN
dcf48925   Ilyes Choubani   added spectral class
2092
2093
2094
                    FOR l=0L,nlmo9-1 DO BEGIN
                        comp_pop(k+i+l).popid = 'O9'+lumclasso9(l)+'_stellar_population'
                          
858e1c83   Ilyes Choubani   small corrections...
2095
                        IF countindo9_1[l] NE 0 THEN comp_pop(k+i+l).radius = (val(indo9_1[l]))(0)*rsun2cm ELSE BEGIN  
dcf48925   Ilyes Choubani   added spectral class
2096
2097
2098
2099
2100
2101
2102
;                             IF lumclasso9(l) EQ 'IA+' THEN comp_pop(k+i+l).radius =
;                             IF lumclasso9(l) EQ 'IA' THEN comp_pop(k+i+l).radius = 
                            IF lumclasso9(l) EQ 'IAB' THEN comp_pop(k+i+l).radius = 20.0*rsun2cm ;taken from Alnitak Aa's data. Even though its spec type is O9.5 (not O9)
;                             IF lumclasso9(l) EQ 'IB' THEN comp_pop(k+i+l).radius =
;                             IF lumclasso9(l) EQ 'II' THEN comp_pop(k+i+l).radius =
;                             IF lumclasso9(l) EQ 'III' THEN comp_pop(k+i+l).radius =
;                             IF lumclasso9(l) EQ 'IV' THEN comp_pop(k+i+l).radius =
955f09f4   Ilyes Choubani   Retrieving data f...
2103
                            IF lumclasso9(l) EQ 'V' THEN comp_pop(k+i+l).radius = R_star_MS_o9*rsun2cm;7.51*rsun2cm
dcf48925   Ilyes Choubani   added spectral class
2104
2105
2106
2107
2108
2109
2110
2111
2112
2113
2114
;                             IF lumclasso9(l) EQ 'VI' THEN comp_pop(k+i+l).radius =
;                             IF lumclasso9(l) EQ 'VII' THEN comp_pop(k+i+l).radius =
                        ENDELSE
                        IF countindo9_2[l] NE 0 THEN comp_pop(k+i+l).temperature = (val(indo9_2[l]))(0) ELSE BEGIN
;                             IF lumclasso9(l) EQ 'IA+' THEN comp_pop(k+i+l).temperature =
;                             IF lumclasso9(l) EQ 'IA' THEN comp_pop(k+i+l).temperature =
                            IF lumclasso9(l) EQ 'IAB' THEN comp_pop(k+i+l).temperature = 29.5e3 ;taken from Alnitak Aa's data. Even though its spec type is O9.5 (not O9)
;                             IF lumclasso9(l) EQ 'IB' THEN comp_pop(k+i+l).temperature =
;                             IF lumclasso9(l) EQ 'II' THEN comp_pop(k+i+l).temperature =
;                             IF lumclasso9(l) EQ 'III' THEN comp_pop(k+i+l).temperature =
;                             IF lumclasso9(l) EQ 'IV' THEN comp_pop(k+i+l).temperature =
955f09f4   Ilyes Choubani   Retrieving data f...
2115
                            IF lumclasso9(l) EQ 'V' THEN comp_pop(k+i+l).temperature = T_eff_MS_o9*rsun2cm;33.3e3
dcf48925   Ilyes Choubani   added spectral class
2116
2117
2118
2119
2120
2121
2122
2123
2124
2125
2126
;                             IF lumclasso9(l) EQ 'VI' THEN comp_pop(k+i+l).temperature =
;                             IF lumclasso9(l) EQ 'VI' THEN comp_pop(k+i+l).temperature =
                        ENDELSE
                          
                        IF countindo9_3[l] NE 0 THEN comp_pop(k+i+l).distance = (val(indo9_3[l]))(0) ELSE comp_pop(k+i+l).distance = 1.0E+00
                        IF countindo9_4[l] NE 0 THEN comp_pop(k+i+l).nstars = (val(indo9_4[l]))(0) ELSE comp_pop(k+i+l).nstars = 1;stellar_density*(4.*!pi/3)*comp_pop(k+i+l).distance
                        ;K+=1
                           
                    ENDFOR
                    k+=nlmo9
                              
4750086c   Ilyes Choubani   nouvelle philosph...
2127
                ENDIF
4750086c   Ilyes Choubani   nouvelle philosph...
2128
2129
                    
            ENDFOR
dcf48925   Ilyes Choubani   added spectral class
2130
2131
2132
                  
            counto=0L 
    
4750086c   Ilyes Choubani   nouvelle philosph...
2133
2134
        i+=k-1
        ENDIF
4750086c   Ilyes Choubani   nouvelle philosph...
2135
2136
                    
    ;==============================================================================================
4750086c   Ilyes Choubani   nouvelle philosph...
2137
2138
2139
2140
2141
2142
                        
        IF countb NE 0 THEN BEGIN ; Filling the structure of the B STELLAR POPULATION(S)
                    
            FOR k=0L,countb-1 DO BEGIN
                
                IF countindb0 NE 0 THEN BEGIN
dcf48925   Ilyes Choubani   added spectral class
2143
2144
                    FOR l=0L,nlmb0-1 DO BEGIN
                        comp_pop(k+i+l).popid = 'B0'+lumclassb0(l)+'_stellar_population'
858e1c83   Ilyes Choubani   small corrections...
2145
                        IF countindb0_1[l] NE 0 THEN comp_pop(k+i+l).radius = (val(indb0_1[l]))(0)*rsun2cm ELSE BEGIN
dcf48925   Ilyes Choubani   added spectral class
2146
2147
2148
2149
2150
2151
2152
;                              IF lumclassb0(l) EQ 'IA+' THEN comp_pop(k+i+l).radius =
;                              IF lumclassb0(l) EQ 'IA' THEN comp_pop(k+i+l).radius =
;                              IF lumclassb0(l) EQ 'IAB' THEN comp_pop(k+i+l).radius =
;                              IF lumclassb0(l) EQ 'IB' THEN comp_pop(k+i+l).radius =
;                              IF lumclassb0(l) EQ 'II' THEN comp_pop(k+i+l).radius =
;                              IF lumclassb0(l) EQ 'III' THEN comp_pop(k+i+l).radius =
;                              IF lumclassb0(l) EQ 'IV' THEN comp_pop(k+i+l).radius =
955f09f4   Ilyes Choubani   Retrieving data f...
2153
                             IF lumclassb0(l) EQ 'V' THEN comp_pop(k+i+l).radius = R_star_MS_b0*rsun2cm;7.16*rsun2cm
dcf48925   Ilyes Choubani   added spectral class
2154
2155
2156
2157
2158
2159
2160
2161
2162
2163
2164
;                              IF lumclassb0(l) EQ 'VI' THEN comp_pop(k+i+l).radius =
;                              IF lumclassb0(l) EQ 'VII' THEN comp_pop(k+i+l).radius =
                        ENDELSE
                        IF countindb0_2[l] NE 0 THEN comp_pop(k+i+l).temperature = (val(indb0_2[l]))(0) ELSE BEGIN
;                             IF lumclasb0(l) EQ 'IA+' THEN comp_pop(k+i+l).temperature =
;                             IF lumclasb0(l) EQ 'IA' THEN comp_pop(k+i+l).temperature =
;                             IF lumclasb0(l) EQ 'IAB' THEN comp_pop(k+i+l).temperature =
;                             IF lumclasb0(l) EQ 'IB' THEN comp_pop(k+i+l).temperature =
;                             IF lumclasb0(l) EQ 'II' THEN comp_pop(k+i+l).temperature =
;                             IF lumclasb0(l) EQ 'III' THEN comp_pop(k+i+l).temperature =
;                             IF lumclasb0(l) EQ 'IV' THEN comp_pop(k+i+l).temperature =
955f09f4   Ilyes Choubani   Retrieving data f...
2165
                            IF lumclasb0(l) EQ 'V' THEN comp_pop(k+i+l).temperature = T_eff_MS_b0;31.4e3
dcf48925   Ilyes Choubani   added spectral class
2166
2167
2168
2169
;                             IF lumclasb0(l) EQ 'VI' THEN comp_pop(k+i+l).temperature =
;                             IF lumclasb0(l) EQ 'VII' THEN comp_pop(k+i+l).temperature =
                        ENDELSE
                        IF countindb0_3[l] NE 0 THEN comp_pop(k+i+l).distance = (val(indb0_3[l]))(0) ELSE comp_pop(k+i+l).distance = 10.0
f9089dc2   Ilyes Choubani   implementing the ...
2170
                        IF countindb0_4[l] NE 0 THEN comp_pop(k+i+l).nstars = (val(indb0_4[l]))(0) ELSE comp_pop(k+i+l).nstars = 1;stellar_density*(4.*!pi/3)*comp_pop(k+i+l).distance
dcf48925   Ilyes Choubani   added spectral class
2171
2172
2173
                        ;K+=1         
                    ENDFOR
                    k+=nlmb0
4750086c   Ilyes Choubani   nouvelle philosph...
2174
2175
                ENDIF
                
4750086c   Ilyes Choubani   nouvelle philosph...
2176
                IF countindb1 NE 0 THEN BEGIN
dcf48925   Ilyes Choubani   added spectral class
2177
2178
                    FOR l=0L,nlmb1-1 DO BEGIN
                        comp_pop(k+i+l).popid = 'B1'+lumclassb1(l)+'_stellar_population'
858e1c83   Ilyes Choubani   small corrections...
2179
                        IF countindb1_1[l] NE 0 THEN comp_pop(k+i+l).radius = (val(indb1_1[l]))(0)*rsun2cm ELSE BEGIN
dcf48925   Ilyes Choubani   added spectral class
2180
2181
2182
2183
2184
2185
2186
;                             IF lumclassb1(l) EQ 'IA+' THEN comp_pop(k+i+l).radius =
;                             IF lumclassb1(l) EQ 'IA' THEN comp_pop(k+i+l).radius =
;                             IF lumclassb1(l) EQ 'IAB' THEN comp_pop(k+i+l).radius = 
;                             IF lumclassb1(l) EQ 'IB' THEN comp_pop(k+i+l).radius =
;                             IF lumclassb1(l) EQ 'II' THEN comp_pop(k+i+l).radius =
;                             IF lumclassb1(l) EQ 'III' THEN comp_pop(k+i+l).radius =
                            IF lumclassb1(l) EQ 'IV' THEN comp_pop(k+i+l).radius = 7.3*rsun2cm ;taken from Alnitak Ab's data.
955f09f4   Ilyes Choubani   Retrieving data f...
2187
                            IF lumclassb1(l) EQ 'V' THEN comp_pop(k+i+l).radius = R_star_MS_b1*rsun2cm;5.71*rsun2cm
dcf48925   Ilyes Choubani   added spectral class
2188
2189
2190
2191
2192
2193
2194
2195
2196
2197
2198
;                             IF lumclassb1(l) EQ 'VI' THEN comp_pop(k+i+l).radius =
;                             IF lumclassb1(l) EQ 'VII' THEN comp_pop(k+i+l).radius =
                        ENDELSE
                        IF countindb1_2[l] NE 0 THEN comp_pop(k+i+l).temperature = (val(indb1_2[l]))(0) ELSE BEGIN
;                             IF lumclassb1(l) EQ 'IA+' THEN comp_pop(k+i+l).temperature =
;                             IF lumclassb1(l) EQ 'IA' THEN comp_pop(k+i+l).temperature =
;                             IF lumclasb1(l) EQ 'IAB' THEN comp_pop(k+i+l).temperature =
;                             IF lumclassb1(l) EQ 'IB' THEN comp_pop(k+i+l).temperature =
;                             IF lumclassb1(l) EQ 'II' THEN comp_pop(k+i+l).temperature =
;                             IF lumclassb1(l) EQ 'III' THEN comp_pop(k+i+l).temperature =
                            IF lumclassb1(l) EQ 'IV' THEN comp_pop(k+i+l).temperature = 29.0e3 ;taken from Alnitak Ab's data.
955f09f4   Ilyes Choubani   Retrieving data f...
2199
                            IF lumclassb1(l) EQ 'V' THEN comp_pop(k+i+l).temperature = T_eff_MS_b1*rsun2cm;26.0e3
dcf48925   Ilyes Choubani   added spectral class
2200
2201
2202
2203
2204
2205
2206
2207
;                             IF lumclassb1(l) EQ 'VI' THEN comp_pop(k+i+l).temperature =
;                             IF lumclassb1(l) EQ 'VII' THEN comp_pop(k+i+l).temperature = 
                        ENDELSE
                        IF countindb1_3[l] NE 0 THEN comp_pop(k+i+l).distance = (val(indb1_3[l]))(0) ELSE comp_pop(k+i+l).distance = 1.0E+00
                        IF countindb1_4[l] NE 0 THEN comp_pop(k+i+l).nstars = (val(indb1_4[l]))(0) ELSE comp_pop(k+i+l).nstars = 1;stellar_density*(4.*!pi/3)*comp_pop(k+i+l).distance
                        ;K+=1
                    ENDFOR
                    k+=nlmb1         
4750086c   Ilyes Choubani   nouvelle philosph...
2208
2209
                ENDIF
                
4750086c   Ilyes Choubani   nouvelle philosph...
2210
                IF countindb2 NE 0 THEN BEGIN
dcf48925   Ilyes Choubani   added spectral class
2211
2212
                    FOR l=0L,nlmb2-1 DO BEGIN
                        comp_pop(k+i+l).popid = 'B2'+lumclassb2(l)+'_stellar_population'
858e1c83   Ilyes Choubani   small corrections...
2213
                        IF countindb2_1[l] NE 0 THEN comp_pop(k+i+l).radius = (val(indb2_1[l]))(0)*rsun2cm ELSE BEGIN
dcf48925   Ilyes Choubani   added spectral class
2214
2215
2216
2217
2218
2219
2220
;                             IF lumclassb2(l) EQ 'IA+' THEN comp_pop(k+i+l).radius =
;                             IF lumclassb2(l) EQ 'IA' THEN comp_pop(k+i+l).radius =
;                             IF lumclassb2(l) EQ 'IAB' THEN comp_pop(k+i+l).radius =
;                             IF lumclassb2(l) EQ 'IB' THEN comp_pop(k+i+l).radius =
;                             IF lumclassb2(l) EQ 'II' THEN comp_pop(k+i+l).radius =
;                             IF lumclassb2(l) EQ 'III' THEN comp_pop(k+i+l).radius =
;                             IF lumclassb2(l) EQ 'IV' THEN comp_pop(k+i+l).radius =
955f09f4   Ilyes Choubani   Retrieving data f...
2221
                            IF lumclassb2(l) EQ 'V' THEN comp_pop(k+i+l).radius = R_star_MS_b2*rsun2cm;4.06*rsun2cm
dcf48925   Ilyes Choubani   added spectral class
2222
2223
2224
2225
2226
2227
2228
2229
2230
2231
2232
;                             IF lumclassb2(l) EQ 'VI' THEN comp_pop(k+i+l).radius =
;                             IF lumclassb2(l) EQ 'VII' THEN comp_pop(k+i+l).radius =
                        ENDELSE
                        IF countindb2_2[l] NE 0 THEN comp_pop(k+i+l).temperature = (val(indb2_2[l]))(0) ELSE BEGIN
;                             IF lumclasb2(l) EQ 'IA+' THEN comp_pop(k+i+l).temperature =
;                             IF lumclasb2(l) EQ 'IA' THEN comp_pop(k+i+l).temperature =
;                             IF lumclasb2(l) EQ 'IAB' THEN comp_pop(k+i+l).temperature =
;                             IF lumclasb2(l) EQ 'IB' THEN comp_pop(k+i+l).temperature =
;                             IF lumclasb2(l) EQ 'II' THEN comp_pop(k+i+l).temperature =
;                             IF lumclasb2(l) EQ 'III' THEN comp_pop(k+i+l).temperature =
;                             IF lumclasb2(l) EQ 'IV' THEN comp_pop(k+i+l).temperature =
955f09f4   Ilyes Choubani   Retrieving data f...
2233
                            IF lumclasb2(l) EQ 'V' THEN comp_pop(k+i+l).temperature = T_eff_MS_b2;20.6e3 
dcf48925   Ilyes Choubani   added spectral class
2234
2235
2236
2237
;                             IF lumclasb2(l) EQ 'VI' THEN comp_pop(k+i+l).temperature =
;                             IF lumclasb2(l) EQ 'VII' THEN comp_pop(k+i+l).temperature =
                        ENDELSE
                        IF countindb2_3[l] NE 0 THEN comp_pop(k+i+l).distance = (val(indb2_3[l]))(0) ELSE comp_pop(k+i+l).distance = 10.0
f9089dc2   Ilyes Choubani   implementing the ...
2238
                        IF countindb2_4[l] NE 0 THEN comp_pop(k+i+l).nstars = (val(indb2_4[l]))(0) ELSE comp_pop(k+i+l).nstars = 1;stellar_density*(4.*!pi/3)*comp_pop(k+i+l).distance
dcf48925   Ilyes Choubani   added spectral class
2239
2240
2241
                        ;K+=1
                    ENDFOR
                    k+=nlmb2          
4750086c   Ilyes Choubani   nouvelle philosph...
2242
2243
                ENDIF
                
4750086c   Ilyes Choubani   nouvelle philosph...
2244
                IF countindb3 NE 0 THEN BEGIN
dcf48925   Ilyes Choubani   added spectral class
2245
2246
                    FOR l=0L,nlmb3-1 DO BEGIN
                        comp_pop(k+i+l).popid = 'B3'+lumclassb3(l)+'_stellar_population'
858e1c83   Ilyes Choubani   small corrections...
2247
                        IF countindb3_1[l] NE 0 THEN comp_pop(k+i+l).radius = (val(indb3_1[l]))(0)*rsun2cm ELSE BEGIN
dcf48925   Ilyes Choubani   added spectral class
2248
2249
2250
2251
2252
2253
2254
;                             IF lumclassb3(l) EQ 'IA+' THEN comp_pop(k+i+l).radius =
;                             IF lumclassb3(l) EQ 'IA' THEN comp_pop(k+i+l).radius =
;                             IF lumclassb3(l) EQ 'IAB' THEN comp_pop(k+i+l).radius =
;                             IF lumclassb3(l) EQ 'IB' THEN comp_pop(k+i+l).radius =
;                             IF lumclassb3(l) EQ 'II' THEN comp_pop(k+i+l).radius =
;                             IF lumclassb3(l) EQ 'III' THEN comp_pop(k+i+l).radius =
;                             IF lumclassb3(l) EQ 'IV' THEN comp_pop(k+i+l).radius =
955f09f4   Ilyes Choubani   Retrieving data f...
2255
                            IF lumclassb3(l) EQ 'V' THEN comp_pop(k+i+l).radius = R_star_MS_b3*rsun2cm;3.61*rsun2cm
dcf48925   Ilyes Choubani   added spectral class
2256
2257
2258
2259
2260
2261
2262
2263
2264
2265
2266
;                             IF lumclassb3(l) EQ 'VI' THEN comp_pop(k+i+l).radius =
;                             IF lumclassb3(l) EQ 'VII' THEN comp_pop(k+i+l).radius =
                        ENDELSE
                        IF countindb3_2[l] NE 0 THEN comp_pop(k+i+l).temperature = (val(indb3_2[l]))(0) ELSE BEGIN
;                             IF lumclasb3(l) EQ 'IA+' THEN comp_pop(k+i+l).temperature =
;                             IF lumclasb3(l) EQ 'IA' THEN comp_pop(k+i+l).temperature =
;                             IF lumclasb3(l) EQ 'IAB' THEN comp_pop(k+i+l).temperature =
;                             IF lumclasb3(l) EQ 'IB' THEN comp_pop(k+i+l).temperature =
;                             IF lumclasb3(l) EQ 'II' THEN comp_pop(k+i+l).temperature =
;                             IF lumclasb3(l) EQ 'III' THEN comp_pop(k+i+l).temperature =
;                             IF lumclasb3(l) EQ 'IV' THEN comp_pop(k+i+l).temperature =
955f09f4   Ilyes Choubani   Retrieving data f...
2267
                            IF lumclasb3(l) EQ 'V' THEN comp_pop(k+i+l).temperature = T_eff_MS_b3;17.0e3
dcf48925   Ilyes Choubani   added spectral class
2268
2269
2270
2271
;                             IF lumclasb3(l) EQ 'VI' THEN comp_pop(k+i+l).temperature =
;                             IF lumclasb3(l) EQ 'VII' THEN comp_pop(k+i+l).temperature =
                        ENDELSE
                        IF countindb3_3[l] NE 0 THEN comp_pop(k+i+l).distance = (val(indb3_3[l]))(0) ELSE comp_pop(k+i+l).distance = 10.0
f9089dc2   Ilyes Choubani   implementing the ...
2272
                        IF countindb3_4[l] NE 0 THEN comp_pop(k+i+l).nstars = (val(indb3_4[l]))(0) ELSE comp_pop(k+i+l).nstars = 1;stellar_density*(4.*!pi/3)*comp_pop(k+i+l).distance
dcf48925   Ilyes Choubani   added spectral class
2273
2274
2275
                        ;K+=1
                    ENDFOR
                    k+=nlmb3          
4750086c   Ilyes Choubani   nouvelle philosph...
2276
2277
2278
                ENDIF
            
                IF countindb4 NE 0 THEN BEGIN
dcf48925   Ilyes Choubani   added spectral class
2279
2280
                    FOR l=0L,nlmb4-1 DO BEGIN
                        comp_pop(k+i+l).popid = 'B4'+lumclassb4(l)+'_stellar_population'
858e1c83   Ilyes Choubani   small corrections...
2281
                        IF countindb4_1[l] NE 0 THEN comp_pop(k+i+l).radius = (val(indb4_1[l]))(0)*rsun2cm ELSE BEGIN
dcf48925   Ilyes Choubani   added spectral class
2282
2283
2284
2285
2286
2287
2288
;                             IF lumclassb4(l) EQ 'IA+' THEN comp_pop(k+i+l).radius =
;                             IF lumclassb4(l) EQ 'IA' THEN comp_pop(k+i+l).radius =
;                             IF lumclassb4(l) EQ 'IAB' THEN comp_pop(k+i+l).radius =
;                             IF lumclassb4(l) EQ 'IB' THEN comp_pop(k+i+l).radius =
;                             IF lumclassb4(l) EQ 'II' THEN comp_pop(k+i+l).radius =
;                             IF lumclassb4(l) EQ 'III' THEN comp_pop(k+i+l).radius =
;                             IF lumclassb4(l) EQ 'IV' THEN comp_pop(k+i+l).radius =
955f09f4   Ilyes Choubani   Retrieving data f...
2289
                            IF lumclassb4(l) EQ 'V' THEN comp_pop(k+i+l).radius = R_star_MS_b4*rsun2cm;3.46*rsun2cm
dcf48925   Ilyes Choubani   added spectral class
2290
2291
2292
2293
2294
2295
2296
2297
2298
2299
;                             IF lumclassb4(l) EQ 'VI' THEN comp_pop(k+i+l).radius =
;                             IF lumclassb4(l) EQ 'VII' THEN comp_pop(k+i+l).radius =
                        ENDELSE
                        IF countindb4_2[l] NE 0 THEN comp_pop(k+i+l).temperature = (val(indb4_2[l]))(0) ELSE BEGIN
;                             IF lumclasb4(l) EQ 'IA+' THEN comp_pop(k+i+l).temperature =
;                             IF lumclasb4(l) EQ 'IA' THEN comp_pop(k+i+l).temperature =
;                             IF lumclasb4(l) EQ 'IAB' THEN comp_pop(k+i+l).temperature =
;                             IF lumclasb4(l) EQ 'IB' THEN comp_pop(k+i+l).temperature =
;                             IF lumclasb4(l) EQ 'III' THEN comp_pop(k+i+l).temperature =
;                             IF lumclasb4(l) EQ 'IV' THEN comp_pop(k+i+l).temperature =
955f09f4   Ilyes Choubani   Retrieving data f...
2300
                            IF lumclasb4(l) EQ 'V' THEN comp_pop(k+i+l).temperature = T_eff_MS_b4;16.4e3
dcf48925   Ilyes Choubani   added spectral class
2301
2302
2303
2304
;                             IF lumclasb4(l) EQ 'VI' THEN comp_pop(k+i+l).temperature =
;                             IF lumclasb4(l) EQ 'VII' THEN comp_pop(k+i+l).temperature = 
                        ENDELSE
                        IF countindb4_3[l] NE 0 THEN comp_pop(k+i+l).distance = (val(indb4_3[l]))(0) ELSE comp_pop(k+i+l).distance = 10.0
f9089dc2   Ilyes Choubani   implementing the ...
2305
                        IF countindb4_4[l] NE 0 THEN comp_pop(k+i+l).nstars = (val(indb4_4[l]))(0) ELSE comp_pop(k+i+l).nstars = 1;stellar_density*(4.*!pi/3)*comp_pop(k+i+l).distance
dcf48925   Ilyes Choubani   added spectral class
2306
2307
2308
                        ;K+=1
                    ENDFOR
                    k+=nlmb4       
4750086c   Ilyes Choubani   nouvelle philosph...
2309
2310
2311
2312
                ENDIF
                
                
                IF countindb5 NE 0 THEN BEGIN
dcf48925   Ilyes Choubani   added spectral class
2313
2314
                    FOR l=0L,nlmb5-1 DO BEGIN
                        comp_pop(k+i+l).popid = 'B5'+lumclassb5(l)+'_stellar_population'
858e1c83   Ilyes Choubani   small corrections...
2315
                        IF countindb5_1[l] NE 0 THEN comp_pop(k+i+l).radius = (val(indb5_1[l]))(0)*rsun2cm ELSE BEGIN
dcf48925   Ilyes Choubani   added spectral class
2316
2317
2318
2319
2320
2321
2322
;                             IF lumclassb5(l) EQ 'IA+' THEN comp_pop(k+i+l).radius =
;                             IF lumclassb5(l) EQ 'IA' THEN comp_pop(k+i+l).radius =
;                             IF lumclassb5(l) EQ 'IAB' THEN comp_pop(k+i+l).radius =
;                             IF lumclassb5(l) EQ 'IB' THEN comp_pop(k+i+l).radius =
;                             IF lumclassb5(l) EQ 'II' THEN comp_pop(k+i+l).radius =
;                             IF lumclassb5(l) EQ 'III' THEN comp_pop(k+i+l).radius =
;                             IF lumclassb5(l) EQ 'IV' THEN comp_pop(k+i+l).radius =
955f09f4   Ilyes Choubani   Retrieving data f...
2323
                            IF lumclassb5(l) EQ 'V' THEN comp_pop(k+i+l).radius = R_star_MS_b5*rsun2cm;3.36*rsun2cm
dcf48925   Ilyes Choubani   added spectral class
2324
2325
2326
2327
2328
2329
2330
2331
2332
2333
2334
;                             IF lumclassb5(l) EQ 'VI' THEN comp_pop(k+i+l).radius =
;                             IF lumclassb5(l) EQ 'VII' THEN comp_pop(k+i+l).radius =
                        ENDELSE
                        IF countindb5_2[l] NE 0 THEN comp_pop(k+i+l).temperature = (val(indb5_2[l]))(0) ELSE BEGIN
;                             IF lumclasb5(l) EQ 'IA+' THEN comp_pop(k+i+l).temperature =
;                             IF lumclasb5(l) EQ 'IA' THEN comp_pop(k+i+l).temperature =
;                             IF lumclasb5(l) EQ 'IAB' THEN comp_pop(k+i+l).temperature =
;                             IF lumclasb5(l) EQ 'IB' THEN comp_pop(k+i+l).temperature =
;                             IF lumclasb5(l) EQ 'II' THEN comp_pop(k+i+l).temperature =
;                             IF lumclasb5(l) EQ 'III' THEN comp_pop(k+i+l).temperature =
;                             IF lumclasb5(l) EQ 'IV' THEN comp_pop(k+i+l).temperature =
955f09f4   Ilyes Choubani   Retrieving data f...
2335
                            IF lumclasb5(l) EQ 'V' THEN comp_pop(k+i+l).temperature = T_eff_MS_b5;15.7e3 
dcf48925   Ilyes Choubani   added spectral class
2336
2337
2338
2339
;                             IF lumclasb5(l) EQ 'VI' THEN comp_pop(k+i+l).temperature =
;                             IF lumclasb5(l) EQ 'VII' THEN comp_pop(k+i+l).temperature =
                        ENDELSE
                        IF countindb5_3[l] NE 0 THEN comp_pop(k+i+l).distance = (val(indb5_3[l]))(0) ELSE comp_pop(k+i+l).distance = 10.0
f9089dc2   Ilyes Choubani   implementing the ...
2340
                        IF countindb5_4[l] NE 0 THEN comp_pop(k+i+l).nstars = (val(indb5_4[l]))(0) ELSE comp_pop(k+i+l).nstars = 1;stellar_density*(4.*!pi/3)*comp_pop(k+i+l).distance
dcf48925   Ilyes Choubani   added spectral class
2341
2342
2343
                        ;K+=1
                    ENDFOR
                    k+=nlmb5         
4750086c   Ilyes Choubani   nouvelle philosph...
2344
2345
2346
2347
                ENDIF
        
                
                IF countindb6 NE 0 THEN BEGIN
dcf48925   Ilyes Choubani   added spectral class
2348
2349
                    FOR l=0L,nlmb6-1 DO BEGIN
                        comp_pop(k+i+l).popid = 'B6'+lumclassb6(l)+'_stellar_population'
858e1c83   Ilyes Choubani   small corrections...
2350
                        IF countindb6_1[l] NE 0 THEN comp_pop(k+i+l).radius = (val(indb6_1[l]))(0)*rsun2cm ELSE BEGIN
dcf48925   Ilyes Choubani   added spectral class
2351
2352
2353
2354
2355
2356
2357
;                             IF lumclassb6(l) EQ 'IA+' THEN comp_pop(k+i+l).radius =
;                             IF lumclassb6(l) EQ 'IA' THEN comp_pop(k+i+l).radius =
;                             IF lumclassb6(l) EQ 'IAB' THEN comp_pop(k+i+l).radius =
;                             IF lumclassb6(l) EQ 'IB' THEN comp_pop(k+i+l).radius =
;                             IF lumclassb6(l) EQ 'II' THEN comp_pop(k+i+l).radius =
;                             IF lumclassb6(l) EQ 'III' THEN comp_pop(k+i+l).radius =
;                             IF lumclassb6(l) EQ 'IV' THEN comp_pop(k+i+l).radius =
955f09f4   Ilyes Choubani   Retrieving data f...
2358
                            IF lumclassb6(l) EQ 'V' THEN comp_pop(k+i+l).radius = R_star_MS_b6*rsun2cm;3.27*rsun2cm
dcf48925   Ilyes Choubani   added spectral class
2359
2360
2361
2362
2363
2364
2365
2366
2367
2368
2369
;                             IF lumclassb6(l) EQ 'VI' THEN comp_pop(k+i+l).radius =
;                             IF lumclassb6(l) EQ 'VII' THEN comp_pop(k+i+l).radius =
                        ENDELSE
                        IF countindb6_2[l] NE 0 THEN comp_pop(k+i+l).temperature = (val(indb6_2[l]))(0) ELSE BEGIN
;                             IF lumclasb6(l) EQ 'IA+' THEN comp_pop(k+i+l).temperature = 
;                             IF lumclasb6(l) EQ 'IA' THEN comp_pop(k+i+l).temperature =
;                             IF lumclasb6(l) EQ 'IAB' THEN comp_pop(k+i+l).temperature =
;                             IF lumclasb6(l) EQ 'IB' THEN comp_pop(k+i+l).temperature =
;                             IF lumclasb6(l) EQ 'II' THEN comp_pop(k+i+l).temperature =
;                             IF lumclasb6(l) EQ 'III' THEN comp_pop(k+i+l).temperature =
;                             IF lumclasb6(l) EQ 'IV' THEN comp_pop(k+i+l).temperature =
955f09f4   Ilyes Choubani   Retrieving data f...
2370
                            IF lumclasb6(l) EQ 'V' THEN comp_pop(k+i+l).temperature = T_eff_MS_b6;14.5e3 
dcf48925   Ilyes Choubani   added spectral class
2371
2372
2373
2374
;                             IF lumclasb6(l) EQ 'VI' THEN comp_pop(k+i+l).temperature =
;                             IF lumclasb6(l) EQ 'VII' THEN comp_pop(k+i+l).temperature =
                        ENDELSE
                        IF countindb6_3[l] NE 0 THEN comp_pop(k+i+l).distance = (val(indb6_3[l]))(0) ELSE comp_pop(k+i+l).distance = 10.0
f9089dc2   Ilyes Choubani   implementing the ...
2375
                        IF countindb6_4[l] NE 0 THEN comp_pop(k+i+l).nstars = (val(indb6_4[l]))(0) ELSE comp_pop(k+i+l).nstars = 1;stellar_density*(4.*!pi/3)*comp_pop(k+i+l).distance
dcf48925   Ilyes Choubani   added spectral class
2376
2377
2378
                        ;K+=1
                    ENDFOR
                    k+=nlmb6        
4750086c   Ilyes Choubani   nouvelle philosph...
2379
2380
2381
2382
                ENDIF
        
                
                IF countindb7 NE 0 THEN BEGIN
dcf48925   Ilyes Choubani   added spectral class
2383
2384
                    FOR l=0L,nlmb7-1 DO BEGIN
                        comp_pop(k+i+l).popid = 'B7'+lumclassb7(l)+'_stellar_population'
858e1c83   Ilyes Choubani   small corrections...
2385
                        IF countindb7_1[l] NE 0 THEN comp_pop(k+i+l).radius = (val(indb7_1[l]))(0)*rsun2cm ELSE BEGIN
dcf48925   Ilyes Choubani   added spectral class
2386
2387
2388
2389
2390
2391
2392
;                             IF lumclassb7(l) EQ 'IA+' THEN comp_pop(k+i+l).radius =
;                             IF lumclassb7(l) EQ 'IA' THEN comp_pop(k+i+l).radius =
;                             IF lumclassb7(l) EQ 'IAB' THEN comp_pop(k+i+l).radius =
;                             IF lumclassb7(l) EQ 'IB' THEN comp_pop(k+i+l).radius =
;                             IF lumclassb7(l) EQ 'II' THEN comp_pop(k+i+l).radius =
;                             IF lumclassb7(l) EQ 'III' THEN comp_pop(k+i+l).radius =
;                             IF lumclassb7(l) EQ 'IV' THEN comp_pop(k+i+l).radius =
955f09f4   Ilyes Choubani   Retrieving data f...
2393
                            IF lumclassb7(l) EQ 'V' THEN comp_pop(k+i+l).radius = R_star_MS_b7*rsun2cm;2.94*rsun2cm
dcf48925   Ilyes Choubani   added spectral class
2394
2395
2396
;                             IF lumclassb7(l) EQ 'VI' THEN comp_pop(k+i+l).radius =
;                             IF lumclassb7(l) EQ 'VII' THEN comp_pop(k+i+l).radius =
                        ENDELSE
858e1c83   Ilyes Choubani   small corrections...
2397
                        IF countindb7_2[l] NE 0 THEN comp_pop(k+i+l).temperature = (val(indb7_2[l]))(0)*rsun2cm ELSE BEGIN
dcf48925   Ilyes Choubani   added spectral class
2398
2399
2400
2401
2402
2403
2404
;                             IF lumclasb7(l) EQ 'IA+' THEN comp_pop(k+i+l).temperature = 
;                             IF lumclasb7(l) EQ 'IA' THEN comp_pop(k+i+l).temperature = 
;                             IF lumclasb7(l) EQ 'IAB' THEN comp_pop(k+i+l).temperature =
;                             IF lumclasb7(l) EQ 'IB' THEN comp_pop(k+i+l).temperature = 
;                             IF lumclasb7(l) EQ 'II' THEN comp_pop(k+i+l).temperature =  
;                             IF lumclasb7(l) EQ 'III' THEN comp_pop(k+i+l).temperature = 
;                             IF lumclasb7(l) EQ 'IV' THEN comp_pop(k+i+l).temperature =
955f09f4   Ilyes Choubani   Retrieving data f...
2405
                            IF lumclasb7(l) EQ 'V' THEN comp_pop(k+i+l).temperature = T_eff_MS_b7;14.0e3   
dcf48925   Ilyes Choubani   added spectral class
2406
2407
2408
2409
;                             IF lumclasb7(l) EQ 'VI' THEN comp_pop(k+i+l).temperature = 
;                             IF lumclasb7(l) EQ 'VII' THEN comp_pop(k+i+l).temperature = 
                        ENDELSE
                        IF countindb7_3[l] NE 0 THEN comp_pop(k+i+l).distance = (val(indb7_3[l]))(0) ELSE comp_pop(k+i+l).distance = 10.0
f9089dc2   Ilyes Choubani   implementing the ...
2410
                        IF countindb7_4[l] NE 0 THEN comp_pop(k+i+l).nstars = (val(indb7_4[l]))(0) ELSE comp_pop(k+i+l).nstars = 1;stellar_density*(4.*!pi/3)*comp_pop(k+i+l).distance
dcf48925   Ilyes Choubani   added spectral class
2411
2412
2413
                        ;K+=1  
                    ENDFOR
                    k+=nlmb7        
4750086c   Ilyes Choubani   nouvelle philosph...
2414
2415
2416
2417
                ENDIF
                    
                
                IF countindb8 NE 0 THEN BEGIN
dcf48925   Ilyes Choubani   added spectral class
2418
2419
                    FOR l=0L,nlmb7-1 DO BEGIN
                        comp_pop(k+i+l).popid = 'B8'+lumclassb8(l)+'_stellar_population'
858e1c83   Ilyes Choubani   small corrections...
2420
                        IF countindb8_1[l] NE 0 THEN comp_pop(k+i+l).radius = (val(indb8_1[l]))(0)*rsun2cm ELSE BEGIN
dcf48925   Ilyes Choubani   added spectral class
2421
2422
2423
2424
2425
2426
2427
;                             IF lumclassb8(l) EQ 'IA+' THEN comp_pop(k+i+l).radius =
;                             IF lumclassb9(l) EQ 'IA' THEN comp_pop(k+i+l).radius =
;                             IF lumclassb8(l) EQ 'IAB' THEN comp_pop(k+i+l).radius =
;                             IF lumclassb8(l) EQ 'IB' THEN comp_pop(k+i+l).radius =
;                             IF lumclassb8(l) EQ 'II' THEN comp_pop(k+i+l).radius =
;                             IF lumclassb8(l) EQ 'III' THEN comp_pop(k+i+l).radius =
;                             IF lumclassb8(l) EQ 'IV' THEN comp_pop(k+i+l).radius =
955f09f4   Ilyes Choubani   Retrieving data f...
2428
                            IF lumclassb8(l) EQ 'V' THEN comp_pop(k+i+l).radius = R_star_MS_b8*rsun2cm;2.86*rsun2cm
dcf48925   Ilyes Choubani   added spectral class
2429
2430
2431
2432
2433
2434
2435
2436
2437
2438
2439
;                             IF lumclassb8(l) EQ 'VI' THEN comp_pop(k+i+l).radius =
;                             IF lumclassb8(l) EQ 'VII' THEN comp_pop(k+i+l).radius =
                        ENDELSE
                        IF countindb8_2[l] NE 0 THEN comp_pop(k+i+l).temperature = (val(indb8_2[l]))(0) ELSE BEGIN
;                             IF lumclasb8(l) EQ 'IA+' THEN comp_pop(k+i+l).temperature =
;                             IF lumclasb8(l) EQ 'IA' THEN comp_pop(k+i+l).temperature =
;                             IF lumclasb8(l) EQ 'IAB' THEN comp_pop(k+i+l).temperature =
;                             IF lumclasb8(l) EQ 'IB' THEN comp_pop(k+i+l).temperature =
;                             IF lumclasb8(l) EQ 'II' THEN comp_pop(k+i+l).temperature =
;                             IF lumclasb8(l) EQ 'III' THEN comp_pop(k+i+l).temperature =
;                             IF lumclasb8(l) EQ 'IV' THEN comp_pop(k+i+l).temperature =
955f09f4   Ilyes Choubani   Retrieving data f...
2440
                            IF lumclasb8(l) EQ 'V' THEN comp_pop(k+i+l).temperature = T_eff_MS_b8;12.3e3 
dcf48925   Ilyes Choubani   added spectral class
2441
2442
2443
2444
;                             IF lumclasb8(l) EQ 'VI' THEN comp_pop(k+i+l).temperature =
;                             IF lumclasb8(l) EQ 'VII' THEN comp_pop(k+i+l).temperature =
                        ENDELSE
                        IF countindb8_3[l] NE 0 THEN comp_pop(k+i+l).distance = (val(indb8_3[l]))(0) ELSE comp_pop(k+i+l).distance = 10.0
f9089dc2   Ilyes Choubani   implementing the ...
2445
                        IF countindb8_4[l] NE 0 THEN comp_pop(k+i+l).nstars = (val(indb8_4[l]))(0) ELSE comp_pop(k+i+l).nstars = 1;stellar_density*(4.*!pi/3)*comp_pop(k+i+l).distance
dcf48925   Ilyes Choubani   added spectral class
2446
2447
2448
                    ;K+=1 
                    ENDFOR  
                    k+=nlmb8      
4750086c   Ilyes Choubani   nouvelle philosph...
2449
2450
2451
2452
                ENDIF
        
                
                IF countindb9 NE 0 THEN BEGIN
dcf48925   Ilyes Choubani   added spectral class
2453
2454
                    FOR l=0L,nlmb9-1 DO BEGIN
                    comp_pop(k+i+l).popid = 'B9'+lumclassb9(l)+'_stellar_population'
858e1c83   Ilyes Choubani   small corrections...
2455
                    IF countindb9_1[l] NE 0 THEN comp_pop(k+i+l).radius = (val(indb9_1[l]))(0)*rsun2cm ELSE BEGIN
dcf48925   Ilyes Choubani   added spectral class
2456
2457
2458
2459
2460
2461
2462
;                         IF lumclassb9(l) EQ 'IA+' THEN comp_pop(k+i+l).radius =
;                         IF lumclassb9(l) EQ 'IA' THEN comp_pop(k+i+l).radius =
;                         IF lumclassb9(l) EQ 'IAB' THEN comp_pop(k+i+l).radius =
;                         IF lumclassb9(l) EQ 'IB' THEN comp_pop(k+i+l).radius =
;                         IF lumclassb9(l) EQ 'II' THEN comp_pop(k+i+l).radius =
;                         IF lumclassb9(l) EQ 'III' THEN comp_pop(k+i+l).radius =
;                         IF lumclassb9(l) EQ 'IV' THEN comp_pop(k+i+l).radius =
955f09f4   Ilyes Choubani   Retrieving data f...
2463
                        IF lumclassb9(l) EQ 'V' THEN comp_pop(k+i+l).radius = R_star_MS_b9*rsun2cm;2.49*rsun2cm
dcf48925   Ilyes Choubani   added spectral class
2464
2465
2466
2467
2468
2469
2470
2471
2472
2473
2474
;                         IF lumclassb9(l) EQ 'VI' THEN comp_pop(k+i+l).radius =
;                         IF lumclassb9(l) EQ 'VII' THEN comp_pop(k+i+l).radius =
                    ENDELSE
                    IF countindb9_2[l] NE 0 THEN comp_pop(k+i+l).temperature = (val(indb9_2[l]))(0) ELSE BEGIN
;                         IF lumclasb9(l) EQ 'IA+' THEN comp_pop(k+i+l).temperature =
;                         IF lumclasb9(l) EQ 'IA' THEN comp_pop(k+i+l).temperature =
;                         IF lumclasb9(l) EQ 'IAB' THEN comp_pop(k+i+l).temperature =
;                         IF lumclasb9(l) EQ 'IB' THEN comp_pop(k+i+l).temperature =
;                         IF lumclasb9(l) EQ 'II' THEN comp_pop(k+i+l).temperature =
;                         IF lumclasb9(l) EQ 'III' THEN comp_pop(k+i+l).temperature =
;                         IF lumclasb9(l) EQ 'IV' THEN comp_pop(k+i+l).temperature =
955f09f4   Ilyes Choubani   Retrieving data f...
2475
                        IF lumclasb9(l) EQ 'V' THEN comp_pop(k+i+l).temperature = T_eff_MS_b9;10.7e3 
dcf48925   Ilyes Choubani   added spectral class
2476
2477
2478
2479
;                         IF lumclasb9(l) EQ 'VI' THEN comp_pop(k+i+l).temperature =
;                         IF lumclasb9(l) EQ 'VII' THEN comp_pop(k+i+l).temperature =
                    ENDELSE
                    IF countindb9_3[l] NE 0 THEN comp_pop(k+i+l).distance = (val(indb9_3[l]))(0) ELSE comp_pop(k+i+l).distance = 10.0
f9089dc2   Ilyes Choubani   implementing the ...
2480
                    IF countindb9_4[l] NE 0 THEN comp_pop(k+i+l).nstars = (val(indb9_4[l]))(0) ELSE comp_pop(k+i+l).nstars = 1;stellar_density*(4.*!pi/3)*comp_pop(k+i+l).distance
dcf48925   Ilyes Choubani   added spectral class
2481
2482
2483
                    ;K+=1 
                    ENDFOR
                    k+=nlmb9         
4750086c   Ilyes Choubani   nouvelle philosph...
2484
2485
2486
2487
2488
2489
2490
2491
2492
                ENDIF
                        
                    
            ENDFOR
                    
            countb=0. 
  
        i+=k-1
        ENDIF 
dcf48925   Ilyes Choubani   added spectral class
2493
                                               
4750086c   Ilyes Choubani   nouvelle philosph...
2494
2495
2496
2497
2498
2499
2500
    ;==============================================================================================
                        
        IF counta NE 0 THEN BEGIN ; Filling the structure of the A STELLAR POPULATION(S)
                    
            FOR k=0L+i,counta-1+i DO BEGIN
                
                IF countinda0 NE 0 THEN BEGIN
dcf48925   Ilyes Choubani   added spectral class
2501
2502
                    FOR l=0L,nlma0-1 DO BEGIN
                        comp_pop(k+i+l).popid = 'A0'+lumclassa0(l)+'_stellar_population'
858e1c83   Ilyes Choubani   small corrections...
2503
                        IF countinda0_1[l] NE 0 THEN comp_pop(k+i+l).radius = (val(inda0_1[l]))(0)*rsun2cm ELSE BEGIN
dcf48925   Ilyes Choubani   added spectral class
2504
2505
2506
2507
2508
2509
2510
;                             IF lumclassa0(l) EQ 'IA+' THEN comp_pop(k+i+l).radius =
;                             IF lumclassa0(l) EQ 'IA' THEN comp_pop(k+i+l).radius =
;                             IF lumclassa0(l) EQ 'IAB' THEN comp_pop(k+i+l).radius =
;                             IF lumclassa0(l) EQ 'IB' THEN comp_pop(k+i+l).radius =
;                             IF lumclassa0(l) EQ 'II' THEN comp_pop(k+i+l).radius =
;                             IF lumclassa0(l) EQ 'III' THEN comp_pop(k+i+l).radius =
;                             IF lumclassa0(l) EQ 'IV' THEN comp_pop(k+i+l).radius =
955f09f4   Ilyes Choubani   Retrieving data f...
2511
                            IF lumclassa0(l) EQ 'V' THEN comp_pop(k+i+l).radius = R_star_MS_a0*rsun2cm;2.193*rsun2cm
dcf48925   Ilyes Choubani   added spectral class
2512
2513
2514
2515
2516
2517
2518
2519
2520
2521
2522
;                             IF lumclassa0(l) EQ 'VI' THEN comp_pop(k+i+l).radius =
;                             IF lumclassa0(l) EQ 'VII' THEN comp_pop(k+i+l).radius =
                        ENDELSE
                        IF countinda0_2[l] NE 0 THEN comp_pop(k+i+l).temperature = (val(inda0_2[l]))(0) ELSE BEGIN
;                             IF lumclasa0(l) EQ 'IA+' THEN comp_pop(k+i+l).temperature =
;                             IF lumclasa0(l) EQ 'IA' THEN comp_pop(k+i+l).temperature =
;                             IF lumclasa0(l) EQ 'IAB' THEN comp_pop(k+i+l).temperature =
;                             IF lumclasa0(l) EQ 'IB' THEN comp_pop(k+i+l).temperature =
;                             IF lumclasa0(l) EQ 'II' THEN comp_pop(k+i+l).temperature =
;                             IF lumclasa0(l) EQ 'III' THEN comp_pop(k+i+l).temperature =
;                             IF lumclasa0(l) EQ 'IV' THEN comp_pop(k+i+l).temperature =
955f09f4   Ilyes Choubani   Retrieving data f...
2523
                            IF lumclasa0(l) EQ 'V' THEN comp_pop(k+i+l).temperature =T_eff_MS_a0; 9.7e3
dcf48925   Ilyes Choubani   added spectral class
2524
2525
2526
2527
;                             IF lumclasa0(l) EQ 'VI' THEN comp_pop(k+i+l).temperature =
;                             IF lumclasa0(l) EQ 'VII' THEN comp_pop(k+i+l).temperature =
                        ENDELSE
                        IF countinda0_3[l] NE 0 THEN comp_pop(k+i+l).distance = (val(inda0_3[l]))(0) ELSE comp_pop(k+i+l).distance = 10.0
f9089dc2   Ilyes Choubani   implementing the ...
2528
                        IF countinda0_4[l] NE 0 THEN comp_pop(k+i+l).nstars = (val(inda0_4[l]))(0) ELSE comp_pop(k+i+l).nstars = 1;stellar_density*(4.*!pi/3)*comp_pop(k+i+l).distance
dcf48925   Ilyes Choubani   added spectral class
2529
2530
2531
                        ;K+=1 
                    ENDFOR 
                    k+=nlma0        
4750086c   Ilyes Choubani   nouvelle philosph...
2532
2533
2534
2535
2536
                ENDIF
                
                
                
                IF countinda1 NE 0 THEN BEGIN
dcf48925   Ilyes Choubani   added spectral class
2537
2538
                    FOR l=0L,nlma1-1 DO BEGIN
                        comp_pop(k+i+l).popid = 'A1'+lumclassa1(l)+'_stellar_population'
858e1c83   Ilyes Choubani   small corrections...
2539
                        IF countinda1_1[l] NE 0 THEN comp_pop(k+i+l).radius = (val(inda1_1[l]))(0)*rsun2cm ELSE BEGIN
dcf48925   Ilyes Choubani   added spectral class
2540
2541
2542
2543
2544
2545
2546
;                             IF lumclassa1(l) EQ 'IA+' THEN comp_pop(k+i+l).radius =
;                             IF lumclassa1(l) EQ 'IA' THEN comp_pop(k+i+l).radius =
;                             IF lumclassa1(l) EQ 'IAB' THEN comp_pop(k+i+l).radius =
;                             IF lumclassa1(l) EQ 'IB' THEN comp_pop(k+i+l).radius =
;                             IF lumclassa1(l) EQ 'II' THEN comp_pop(k+i+l).radius =
;                             IF lumclassa1(l) EQ 'III' THEN comp_pop(k+i+l).radius =
;                             IF lumclassa1(l) EQ 'IV' THEN comp_pop(k+i+l).radius =
955f09f4   Ilyes Choubani   Retrieving data f...
2547
                            IF lumclassa1(l) EQ 'V' THEN comp_pop(k+i+l).radius = R_star_MS_a1*rsun2cm;2.136*rsun2cm
dcf48925   Ilyes Choubani   added spectral class
2548
2549
2550
2551
2552
2553
2554
2555
2556
2557
2558
;                             IF lumclassa1(l) EQ 'VI' THEN comp_pop(k+i+l).radius =
;                             IF lumclassa1(l) EQ 'VII' THEN comp_pop(k+i+l).radius =
                        ENDELSE
                        IF countinda1_2[l] NE 0 THEN comp_pop(k+i+l).temperature = (val(inda1_2[l]))(0) ELSE BEGIN
;                             IF lumclasa1(l) EQ 'IA+' THEN comp_pop(k+i+l).temperature =
;                             IF lumclasa1(l) EQ 'IA' THEN comp_pop(k+i+l).temperature =
;                             IF lumclasa1(l) EQ 'IAB' THEN comp_pop(k+i+l).temperature =
;                             IF lumclasa1(l) EQ 'IB' THEN comp_pop(k+i+l).temperature =
;                             IF lumclasa1(l) EQ 'II' THEN comp_pop(k+i+l).temperature =
;                             IF lumclasa1(l) EQ 'III' THEN comp_pop(k+i+l).temperature =
;                             IF lumclasa1(l) EQ 'IV' THEN comp_pop(k+i+l).temperature =
955f09f4   Ilyes Choubani   Retrieving data f...
2559
                            IF lumclasa1(l) EQ 'V' THEN comp_pop(k+i+l).temperature = T_eff_MS_a1;9.3e3
dcf48925   Ilyes Choubani   added spectral class
2560
2561
2562
2563
;                             IF lumclasa1(l) EQ 'VI' THEN comp_pop(k+i+l).temperature =
;                             IF lumclasa1(l) EQ 'VII' THEN comp_pop(k+i+l).temperature =
                        ENDELSE
                        IF countinda1_3[l] NE 0 THEN comp_pop(k+i+l).distance = (val(inda1_3[l]))(0) ELSE comp_pop(k+i+l).distance = 10.0
f9089dc2   Ilyes Choubani   implementing the ...
2564
                        IF countinda1_4[l] NE 0 THEN comp_pop(k+i+l).nstars = (val(inda1_4[l]))(0) ELSE comp_pop(k+i+l).nstars = 1;stellar_density*(4.*!pi/3)*comp_pop(k+i+l).distance
dcf48925   Ilyes Choubani   added spectral class
2565
2566
2567
                       ; K+=1 
                    ENDFOR 
                    k+=nlma1      
4750086c   Ilyes Choubani   nouvelle philosph...
2568
2569
                ENDIF
                
4750086c   Ilyes Choubani   nouvelle philosph...
2570
                IF countinda2 NE 0 THEN BEGIN
dcf48925   Ilyes Choubani   added spectral class
2571
2572
                    FOR l=0L,nlma2-1 DO BEGIN
                        comp_pop(k+i+l).popid = 'A2'+lumclassa2(l)+'_stellar_population'
858e1c83   Ilyes Choubani   small corrections...
2573
                        IF countinda2_1[l] NE 0 THEN comp_pop(k+i+l).radius = (val(inda2_1[l]))(0)*rsun2cm ELSE BEGIN
dcf48925   Ilyes Choubani   added spectral class
2574
2575
2576
2577
2578
2579
2580
;                             IF lumclassa2(l) EQ 'IA+' THEN comp_pop(k+i+l).radius =
;                             IF lumclassa2(l) EQ 'IA' THEN comp_pop(k+i+l).radius =
;                             IF lumclassa2(l) EQ 'IAB' THEN comp_pop(k+i+l).radius =
;                             IF lumclassa2(l) EQ 'IB' THEN comp_pop(k+i+l).radius =
;                             IF lumclassa2(l) EQ 'II' THEN comp_pop(k+i+l).radius =
;                             IF lumclassa2(l) EQ 'III' THEN comp_pop(k+i+l).radius =
;                             IF lumclassa2(l) EQ 'IV' THEN comp_pop(k+i+l).radius =
955f09f4   Ilyes Choubani   Retrieving data f...
2581
                            IF lumclassa2(l) EQ 'V' THEN comp_pop(k+i+l).radius = R_star_MS_a2*rsun2cm;2.117*rsun2cm
dcf48925   Ilyes Choubani   added spectral class
2582
2583
2584
2585
2586
2587
2588
2589
2590
2591
2592
;                             IF lumclassa2(l) EQ 'VI' THEN comp_pop(k+i+l).radius =
;                             IF lumclassa2(l) EQ 'VII' THEN comp_pop(k+i+l).radius =
                        ENDELSE
                        IF countinda2_2[l] NE 0 THEN comp_pop(k+i+l).temperature = (val(inda2_2[l]))(0) ELSE BEGIN
;                             IF lumclasa2(l) EQ 'IA+' THEN comp_pop(k+i+l).temperature =
;                             IF lumclasa2(l) EQ 'IA' THEN comp_pop(k+i+l).temperature =
;                             IF lumclasa2(l) EQ 'IAB' THEN comp_pop(k+i+l).temperature =
;                             IF lumclasa2(l) EQ 'IB' THEN comp_pop(k+i+l).temperature =
;                             IF lumclasa2(l) EQ 'II' THEN comp_pop(k+i+l).temperature =
;                             IF lumclasa2(l) EQ 'III' THEN comp_pop(k+i+l).temperature =
;                             IF lumclasa2(l) EQ 'IV' THEN comp_pop(k+i+l).temperature =
955f09f4   Ilyes Choubani   Retrieving data f...
2593
                            IF lumclasa2(l) EQ 'V' THEN comp_pop(k+i+l).temperature = T_eff_MS_a2;8.8e3
dcf48925   Ilyes Choubani   added spectral class
2594
2595
2596
2597
;                             IF lumclasa2(l) EQ 'VI' THEN comp_pop(k+i+l).temperature =
;                             IF lumclasa2(l) EQ 'VII' THEN comp_pop(k+i+l).temperature =
                        ENDELSE
                        IF countinda2_3[l] NE 0 THEN comp_pop(k+i+l).distance = (val(inda2_3[l]))(0) ELSE comp_pop(k+i+l).distance = 10.0
f9089dc2   Ilyes Choubani   implementing the ...
2598
                        IF countinda2_4[l] NE 0 THEN comp_pop(k+i+l).nstars = (val(inda2_4[l]))(0) ELSE comp_pop(k+i+l).nstars = 1;stellar_density*(4.*!pi/3)*comp_pop(k+i+l).distance
dcf48925   Ilyes Choubani   added spectral class
2599
2600
2601
                        ;K+=1
                    ENDFOR
                    k+=nlma2        
4750086c   Ilyes Choubani   nouvelle philosph...
2602
2603
2604
2605
2606
                ENDIF
                
                
                
                IF countinda3 NE 0 THEN BEGIN
dcf48925   Ilyes Choubani   added spectral class
2607
2608
                    FOR l=0L,nlma3-1 DO BEGIN
                        comp_pop(k+i+l).popid = 'A3'+lumclassa3(l)+'_stellar_population'
858e1c83   Ilyes Choubani   small corrections...
2609
                        IF countinda3_1[l] NE 0 THEN comp_pop(k+i+l).radius = (val(inda3_1[l]))(0)*rsun2cm ELSE BEGIN
dcf48925   Ilyes Choubani   added spectral class
2610
2611
2612
2613
2614
2615
2616
;                             IF lumclassa3(l) EQ 'IA+' THEN comp_pop(k+i+l).radius =
;                             IF lumclassa3(l) EQ 'IA' THEN comp_pop(k+i+l).radius =
;                             IF lumclassa3(l) EQ 'IAB' THEN comp_pop(k+i+l).radius =
;                             IF lumclassa3(l) EQ 'IB' THEN comp_pop(k+i+l).radius =
;                             IF lumclassa3(l) EQ 'II' THEN comp_pop(k+i+l).radius =
;                             IF lumclassa3(l) EQ 'III' THEN comp_pop(k+i+l).radius =
;                             IF lumclassa3(l) EQ 'IV' THEN comp_pop(k+i+l).radius =
955f09f4   Ilyes Choubani   Retrieving data f...
2617
                            IF lumclassa3(l) EQ 'V' THEN comp_pop(k+i+l).radius = R_star_MS_a3*rsun2cm;1.861*rsun2cm
dcf48925   Ilyes Choubani   added spectral class
2618
2619
2620
2621
2622
2623
2624
2625
2626
2627
2628
;                             IF lumclassa3(l) EQ 'VI' THEN comp_pop(k+i+l).radius =
;                             IF lumclassa3(l) EQ 'VII' THEN comp_pop(k+i+l).radius = 
                        ENDELSE
                        IF countinda3_2[l] NE 0 THEN comp_pop(k+i+l).temperature = (val(inda3_2[l]))(0) ELSE BEGIN
;                             IF lumclasa3(l) EQ 'IA+' THEN comp_pop(k+i+l).temperature =
;                             IF lumclasa3(l) EQ 'IA' THEN comp_pop(k+i+l).temperature =
;                             IF lumclasa3(l) EQ 'IAB' THEN comp_pop(k+i+l).temperature =
;                             IF lumclasa3(l) EQ 'IB' THEN comp_pop(k+i+l).temperature =
;                             IF lumclasa3(l) EQ 'II' THEN comp_pop(k+i+l).temperature =
;                             IF lumclasa3(l) EQ 'III' THEN comp_pop(k+i+l).temperature =
;                             IF lumclasa3(l) EQ 'IV' THEN comp_pop(k+i+l).temperature =
955f09f4   Ilyes Choubani   Retrieving data f...
2629
                            IF lumclasa3(l) EQ 'V' THEN comp_pop(k+i+l).temperature = T_eff_MS_a3;8.6e3
dcf48925   Ilyes Choubani   added spectral class
2630
2631
2632
2633
;                             IF lumclasa3(l) EQ 'VI' THEN comp_pop(k+i+l).temperature =
;                             IF lumclasa3(l) EQ 'VII' THEN comp_pop(k+i+l).temperature =
                        ENDELSE
                        IF countinda3_3[l] NE 0 THEN comp_pop(k+i+l).distance = (val(inda3_3[l]))(0) ELSE comp_pop(k+i+l).distance = 10.0
f9089dc2   Ilyes Choubani   implementing the ...
2634
                        IF countinda3_4[l] NE 0 THEN comp_pop(k+i+l).nstars = (val(inda3_4[l]))(0) ELSE comp_pop(k+i+l).nstars = 1;stellar_density*(4.*!pi/3)*comp_pop(k+i+l).distance
dcf48925   Ilyes Choubani   added spectral class
2635
2636
2637
                        ;K+=1
                    ENDFOR
                    k+=nlma3          
4750086c   Ilyes Choubani   nouvelle philosph...
2638
2639
2640
                ENDIF
            
                IF countinda4 NE 0 THEN BEGIN
dcf48925   Ilyes Choubani   added spectral class
2641
2642
                    FOR l=0L,nlma4-1 DO BEGIN
                        comp_pop(k+i+l).popid = 'A4'+lumclassa4(l)+'_stellar_population'
858e1c83   Ilyes Choubani   small corrections...
2643
                        IF countinda4_1 NE 0 THEN comp_pop(k+i+l).radius = (val(inda4_1))(0)*rsun2cm ELSE BEGIN
dcf48925   Ilyes Choubani   added spectral class
2644
2645
2646
2647
2648
2649
2650
;                             IF lumclassa4(l) EQ 'IA+' THEN comp_pop(k+i+l).radius =
;                             IF lumclassa4(l) EQ 'IA' THEN comp_pop(k+i+l).radius =
;                             IF lumclassa4(l) EQ 'IAB' THEN comp_pop(k+i+l).radius =
;                             IF lumclassa4(l) EQ 'IB' THEN comp_pop(k+i+l).radius =
;                             IF lumclassa4(l) EQ 'II' THEN comp_pop(k+i+l).radius =
;                             IF lumclassa4(l) EQ 'III' THEN comp_pop(k+i+l).radius =
;                             IF lumclassa4(l) EQ 'IV' THEN comp_pop(k+i+l).radius =
955f09f4   Ilyes Choubani   Retrieving data f...
2651
                            IF lumclassa4(l) EQ 'V' THEN comp_pop(k+i+l).radius = R_star_MS_a4*rsun2cm;1.794*rsun2cm
dcf48925   Ilyes Choubani   added spectral class
2652
2653
2654
2655
2656
2657
2658
2659
2660
2661
2662
;                             IF lumclassa4(l) EQ 'VI' THEN comp_pop(k+i+l).radius =
;                             IF lumclassa4(l) EQ 'VII' THEN comp_pop(k+i+l).radius = 
                        ENDELSE
                        IF countinda4_2 NE 0 THEN comp_pop(k+i+l).temperature = (val(inda4_2))(0) ELSE BEGIN
;                             IF lumclasa4(l) EQ 'IA+' THEN comp_pop(k+i+l).temperature =
;                             IF lumclasa4(l) EQ 'IA' THEN comp_pop(k+i+l).temperature =
;                             IF lumclasa4(l) EQ 'IAB' THEN comp_pop(k+i+l).temperature =
;                             IF lumclasa4(l) EQ 'IB' THEN comp_pop(k+i+l).temperature =
;                             IF lumclasa4(l) EQ 'II' THEN comp_pop(k+i+l).temperature =
;                             IF lumclasa4(l) EQ 'III' THEN comp_pop(k+i+l).temperature =
;                             IF lumclasa4(l) EQ 'IV' THEN comp_pop(k+i+l).temperature =
955f09f4   Ilyes Choubani   Retrieving data f...
2663
                            IF lumclasa4(l) EQ 'V' THEN comp_pop(k+i+l).temperature = T_eff_MS_a4;8.25e3
dcf48925   Ilyes Choubani   added spectral class
2664
2665
2666
2667
;                             IF lumclasa4(l) EQ 'VI' THEN comp_pop(k+i+l).temperature =
;                             IF lumclasa4(l) EQ 'VII' THEN comp_pop(k+i+l).temperature = 
                        ENDELSE
                        IF countinda4_3 NE 0 THEN comp_pop(k+i+l).distance = (val(inda4_3))(0) ELSE comp_pop(k+i+l).distance = 10.0
f9089dc2   Ilyes Choubani   implementing the ...
2668
                        IF countinda4_4 NE 0 THEN comp_pop(k+i+l).nstars = (val(inda4_4))(0) ELSE comp_pop(k+i+l).nstars = 1;stellar_density*(4.*!pi/3)*comp_pop(k+i+l).distance
dcf48925   Ilyes Choubani   added spectral class
2669
2670
2671
                        ;K+=1
                    ENDFOR
                    k+=nlma4         
4750086c   Ilyes Choubani   nouvelle philosph...
2672
2673
2674
2675
                ENDIF
                
                
                IF countinda5 NE 0 THEN BEGIN
dcf48925   Ilyes Choubani   added spectral class
2676
2677
                    FOR l=0L,nlma5-1 DO BEGIN
                        comp_pop(k+i+l).popid = 'A5'+lumclassa5(l)+'_stellar_population'
858e1c83   Ilyes Choubani   small corrections...
2678
                        IF countinda5_1[l] NE 0 THEN comp_pop(k+i+l).radius = (val(inda5_1[l]))(0)*rsun2cm ELSE BEGIN
dcf48925   Ilyes Choubani   added spectral class
2679
2680
2681
2682
2683
2684
2685
;                             IF lumclassa5(l) EQ 'IA+' THEN comp_pop(k+i+l).radius =
;                             IF lumclassa5(l) EQ 'IA' THEN comp_pop(k+i+l).radius =
;                             IF lumclassa5(l) EQ 'IAB' THEN comp_pop(k+i+l).radius =
;                             IF lumclassa5(l) EQ 'IB' THEN comp_pop(k+i+l).radius =
;                             IF lumclassa5(l) EQ 'II' THEN comp_pop(k+i+l).radius =
;                             IF lumclassa5(l) EQ 'III' THEN comp_pop(k+i+l).radius =
;                             IF lumclassa5(l) EQ 'IV' THEN comp_pop(k+i+l).radius =
955f09f4   Ilyes Choubani   Retrieving data f...
2686
                            IF lumclassa5(l) EQ 'V' THEN omp_pop(k+i+l).radius = R_star_MS_a5*rsun2cm;1.785*rsun2cm
dcf48925   Ilyes Choubani   added spectral class
2687
2688
2689
2690
2691
2692
2693
2694
2695
2696
2697
;                             IF lumclassa5(l) EQ 'VI' THEN comp_pop(k+i+l).radius =
;                             IF lumclassa5(l) EQ 'VII' THEN comp_pop(k+i+l).radius =
                        ENDELSE
                        IF countinda5_2[l] NE 0 THEN comp_pop(k+i+l).temperature = (val(inda5_2[l]))(0) ELSE BEGIN
;                             IF lumclasa5(l) EQ 'IA+' THEN comp_pop(k+i+l).temperature =
;                             IF lumclasa5(l) EQ 'IA' THEN comp_pop(k+i+l).temperature =
;                             IF lumclasa5(l) EQ 'IAB' THEN comp_pop(k+i+l).temperature =
;                             IF lumclasa5(l) EQ 'IB' THEN comp_pop(k+i+l).temperature =
;                             IF lumclasa5(l) EQ 'II' THEN comp_pop(k+i+l).temperature =
;                             IF lumclasa5(l) EQ 'III' THEN comp_pop(k+i+l).temperature =
;                             IF lumclasa5(l) EQ 'IV' THEN comp_pop(k+i+l).temperature =
955f09f4   Ilyes Choubani   Retrieving data f...
2698
                            IF lumclasa5(l) EQ 'V' THEN comp_pop(k+i+l).temperature = T_eff_MS_a5;8.1e3
dcf48925   Ilyes Choubani   added spectral class
2699
2700
2701
2702
;                             IF lumclasa5(l) EQ 'VI' THEN comp_pop(k+i+l).temperature =
;                             IF lumclasa5(l) EQ 'VII' THEN comp_pop(k+i+l).temperature =
                        ENDELSE
                        IF countinda5_3[l] NE 0 THEN comp_pop(k+i+l).distance = (val(inda5_3[l]))(0) ELSE comp_pop(k+i+l).distance = 10.0
f9089dc2   Ilyes Choubani   implementing the ...
2703
                        IF countinda5_4[l] NE 0 THEN comp_pop(k+i+l).nstars = (val(inda5_4[l]))(0) ELSE comp_pop(k+i+l).nstars = 1;stellar_density*(4.*!pi/3)*comp_pop(k+i+l).distance
dcf48925   Ilyes Choubani   added spectral class
2704
2705
2706
                        ;K+=1  
                    ENDFOR   
                    k+=nlma5     
4750086c   Ilyes Choubani   nouvelle philosph...
2707
2708
2709
2710
                ENDIF
        
                
                IF countinda6 NE 0 THEN BEGIN
dcf48925   Ilyes Choubani   added spectral class
2711
2712
                    FOR l=0L,nlma6-1 DO BEGIN
                        comp_pop(k+i+l).popid = 'A6'+lumclassa6(l)+'_stellar_population'
858e1c83   Ilyes Choubani   small corrections...
2713
                        IF countinda6_1[l] NE 0 THEN comp_pop(k+i+l).radius = (val(inda6_1[l]))(0)*rsun2cm ELSE BEGIN
dcf48925   Ilyes Choubani   added spectral class
2714
2715
2716
2717
2718
2719
2720
;                             IF lumclassa6(l) EQ 'IA+' THEN comp_pop(k+i+l).radius =
;                             IF lumclassa6(l) EQ 'IA' THEN comp_pop(k+i+l).radius =
;                             IF lumclassa6(l) EQ 'IAB' THEN comp_pop(k+i+l).radius =
;                             IF lumclassa6(l) EQ 'IB' THEN comp_pop(k+i+l).radius =
;                             IF lumclassa6(l) EQ 'II' THEN comp_pop(k+i+l).radius =
;                             IF lumclassa6(l) EQ 'III' THEN comp_pop(k+i+l).radius =
;                             IF lumclassa6(l) EQ 'IV' THEN comp_pop(k+i+l).radius =
955f09f4   Ilyes Choubani   Retrieving data f...
2721
                            IF lumclassa6(l) EQ 'V' THEN comp_pop(k+i+l).radius = R_star_MS_a6*rsun2cm;1.775*rsun2cm
dcf48925   Ilyes Choubani   added spectral class
2722
2723
2724
2725
2726
2727
2728
2729
2730
2731
2732
;                             IF lumclassa6(l) EQ 'VI' THEN comp_pop(k+i+l).radius =
;                             IF lumclassa6(l) EQ 'VII' THEN comp_pop(k+i+l).radius =
                        ENDELSE
                        IF countinda6_2[l] NE 0 THEN comp_pop(k+i+l).temperature = (val(inda6_2[l]))(0) ELSE BEGIN
;                             IF lumclasa6(l) EQ 'IA+' THEN comp_pop(k+i+l).temperature =
;                             IF lumclasa6(l) EQ 'IA' THEN comp_pop(k+i+l).temperature =
;                             IF lumclasa6(l) EQ 'IAB' THEN comp_pop(k+i+l).temperature =
;                             IF lumclasa6(l) EQ 'IB' THEN comp_pop(k+i+l).temperature =
;                             IF lumclasa6(l) EQ 'II' THEN comp_pop(k+i+l).temperature =
;                             IF lumclasa6(l) EQ 'III' THEN comp_pop(k+i+l).temperature =
;                             IF lumclasa6(l) EQ 'IV' THEN comp_pop(k+i+l).temperature =
955f09f4   Ilyes Choubani   Retrieving data f...
2733
                            IF lumclasa6(l) EQ 'V' THEN comp_pop(k+i+l).temperature = T_eff_MS_a6;7.91e3 
dcf48925   Ilyes Choubani   added spectral class
2734
2735
2736
2737
;                             IF lumclasa6(l) EQ 'VI' THEN comp_pop(k+i+l).temperature =
;                             IF lumclasa6(l) EQ 'VII' THEN comp_pop(k+i+l).temperature =
                        ENDELSE
                        IF countinda6_3[l] NE 0 THEN comp_pop(k+i+l).distance = (val(inda6_3[l]))(0) ELSE comp_pop(k+i+l).distance = 10.0
f9089dc2   Ilyes Choubani   implementing the ...
2738
                        IF countinda6_4[l] NE 0 THEN comp_pop(k+i+l).nstars = (val(inda6_5[l]))(0) ELSE comp_pop(k+i+l).nstars = 1;stellar_density*(4.*!pi/3)*comp_pop(k+i+l).distance
dcf48925   Ilyes Choubani   added spectral class
2739
2740
2741
                        ;K+=1
                    ENDFOR 
                    k+=nlma6       
4750086c   Ilyes Choubani   nouvelle philosph...
2742
2743
2744
2745
                ENDIF
        
                
                IF countinda7 NE 0 THEN BEGIN
dcf48925   Ilyes Choubani   added spectral class
2746
2747
                    FOR l=0L,nlma7-1 DO BEGIN
                        comp_pop(k+i+l).popid = 'A7'+lumclassa7(l)+'_stellar_population'
858e1c83   Ilyes Choubani   small corrections...
2748
                        IF countinda7_1[l] NE 0 THEN comp_pop(k+i+l).radius = (val(inda7_1[l]))(0)*rsun2cm ELSE BEGIN
dcf48925   Ilyes Choubani   added spectral class
2749
2750
2751
2752
2753
2754
2755
;                             IF lumclassa7(l) EQ 'IA+' THEN comp_pop(k+i+l).radius =
;                             IF lumclassa7(l) EQ 'IA' THEN comp_pop(k+i+l).radius =
;                             IF lumclassa7(l) EQ 'IAB' THEN comp_pop(k+i+l).radius =
;                             IF lumclassa7(l) EQ 'IB' THEN comp_pop(k+i+l).radius =
;                             IF lumclassa7(l) EQ 'II' THEN comp_pop(k+i+l).radius =
;                             IF lumclassa7(l) EQ 'III' THEN comp_pop(k+i+l).radius =
;                             IF lumclassa7(l) EQ 'IV' THEN comp_pop(k+i+l).radius =
955f09f4   Ilyes Choubani   Retrieving data f...
2756
                            IF lumclassa7(l) EQ 'V' THEN comp_pop(k+i+l).radius = R_star_MS_a7*rsun2cm;1.75*rsun2cm
dcf48925   Ilyes Choubani   added spectral class
2757
2758
2759
2760
2761
2762
2763
2764
2765
2766
;                             IF lumclassa7(l) EQ 'VI' THEN comp_pop(k+i+l).radius =
;                             IF lumclassa7(l) EQ 'VII' THEN comp_pop(k+i+l).radius =
                         ENDELSE
                        IF countinda7_2[l] NE 0 THEN comp_pop(k+i+l).temperature = (val(inda7_2[l]))(0) ELSE BEGIN
;                             IF lumclasa7(l) EQ 'IA+' THEN comp_pop(k+i+l).temperature =
;                             IF lumclasa7(l) EQ 'IA' THEN comp_pop(k+i+l).temperature =
;                             IF lumclasa7(l) EQ 'IAB' THEN comp_pop(k+i+l).temperature =
;                             IF lumclasa7(l) EQ 'II' THEN comp_pop(k+i+l).temperature =
;                             IF lumclasa7(l) EQ 'III' THEN comp_pop(k+i+l).temperature =
;                             IF lumclasa7(l) EQ 'IV' THEN comp_pop(k+i+l).temperature =
955f09f4   Ilyes Choubani   Retrieving data f...
2767
                            IF lumclasa7(l) EQ 'V' THEN comp_pop(k+i+l).temperature = T_eff_MS_a7;7.76e3
dcf48925   Ilyes Choubani   added spectral class
2768
2769
2770
2771
;                             IF lumclasa7(l) EQ 'VI' THEN comp_pop(k+i+l).temperature =
;                             IF lumclasa7(l) EQ 'VII' THEN comp_pop(k+i+l).temperature = 
                        ENDELSE
                        IF countinda7_3[l] NE 0 THEN comp_pop(k+i+l).distance = (val(inda7_3[l]))(0) ELSE comp_pop(k+i+l).distance = 10.0
f9089dc2   Ilyes Choubani   implementing the ...
2772
                        IF countinda7_4[l] NE 0 THEN comp_pop(k+i+l).nstars = (val(inda7_4[l]))(0) ELSE comp_pop(k+i+l).nstars = 1;stellar_density*(4.*!pi/3)*comp_pop(k+i+l).distance
dcf48925   Ilyes Choubani   added spectral class
2773
2774
2775
                        ;K+=1 
                    ENDFOR 
                    k+=nlma7       
4750086c   Ilyes Choubani   nouvelle philosph...
2776
2777
2778
2779
                ENDIF
                    
                
                IF countinda8 NE 0 THEN BEGIN
dcf48925   Ilyes Choubani   added spectral class
2780
2781
                    FOR l=0L,nlma8-1 DO BEGIN
                        comp_pop(k+i+l).popid = 'A8'+lumclassa8(l)+'_stellar_population'
858e1c83   Ilyes Choubani   small corrections...
2782
                        IF countinda8_1[l] NE 0 THEN comp_pop(k+i+l).radius = (val(inda8_1[l]))(0)*rsun2cm ELSE BEGIN
dcf48925   Ilyes Choubani   added spectral class
2783
2784
2785
2786
2787
2788
2789
;                             IF lumclassa8(l) EQ 'IA+' THEN comp_pop(k+i+l).radius =
;                             IF lumclassa8(l) EQ 'IA' THEN comp_pop(k+i+l).radius =
;                             IF lumclassa8(l) EQ 'IAB' THEN comp_pop(k+i+l).radius =
;                             IF lumclassa8(l) EQ 'IB' THEN comp_pop(k+i+l).radius =
;                             IF lumclassa8(l) EQ 'II' THEN comp_pop(k+i+l).radius =
;                             IF lumclassa8(l) EQ 'III' THEN comp_pop(k+i+l).radius =
;                             IF lumclassa8(l) EQ 'IV' THEN comp_pop(k+i+l).radius =
955f09f4   Ilyes Choubani   Retrieving data f...
2790
                            IF lumclassa8(l) EQ 'V' THEN comp_pop(k+i+l).radius = R_star_MS_a8*rsun2cm;1.747*rsun2cm
dcf48925   Ilyes Choubani   added spectral class
2791
2792
2793
2794
2795
2796
2797
2798
2799
2800
2801
;                             IF lumclassa8(l) EQ 'VI' THEN comp_pop(k+i+l).radius =
;                             IF lumclassa8(l) EQ 'VII' THEN comp_pop(k+i+l).radius =
                        ENDELSE
                        IF countinda8_2[l] NE 0 THEN comp_pop(k+i+l).temperature = (val(inda8_2[l]))(0) ELSE BEGIN
;                             IF lumclasa8(l) EQ 'IA+' THEN comp_pop(k+i+l).temperature =
;                             IF lumclasa8(l) EQ 'IA' THEN comp_pop(k+i+l).temperature =
;                             IF lumclasa8(l) EQ 'IAB' THEN comp_pop(k+i+l).temperature =
;                             IF lumclasa8(l) EQ 'IB' THEN comp_pop(k+i+l).temperature =
;                             IF lumclasa8(l) EQ 'II' THEN comp_pop(k+i+l).temperature =
;                             IF lumclasa8(l) EQ 'III' THEN comp_pop(k+i+l).temperature =
;                             IF lumclasa8(l) EQ 'IV' THEN comp_pop(k+i+l).temperature =
955f09f4   Ilyes Choubani   Retrieving data f...
2802
                            IF lumclasa8(l) EQ 'V' THEN comp_pop(k+i+l).temperature = T_eff_MS_a8;7.590e3
dcf48925   Ilyes Choubani   added spectral class
2803
2804
2805
2806
;                             IF lumclasa8(l) EQ 'VI' THEN comp_pop(k+i+l).temperature =
;                             IF lumclasa8(l) EQ 'VII' THEN comp_pop(k+i+l).temperature =
                        ENDELSE
                        IF countinda8_3[l] NE 0 THEN comp_pop(k+i+l).distance = (val(inda8_3[l]))(0) ELSE comp_pop(k+i+l).distance = 10.0
f9089dc2   Ilyes Choubani   implementing the ...
2807
                        IF countinda8_4[l] NE 0 THEN comp_pop(k+i+l).nstars = (val(inda8_4[l]))(0) ELSE comp_pop(k+i+l).nstars =1; stellar_density*(4.*!pi/3)*comp_pop(k+i+l).distance
dcf48925   Ilyes Choubani   added spectral class
2808
2809
2810
                        ;K+=1
                    ENDFOR 
                    k+=nlma8       
4750086c   Ilyes Choubani   nouvelle philosph...
2811
2812
2813
2814
                ENDIF
        
                
                IF countinda9 NE 0 THEN BEGIN
dcf48925   Ilyes Choubani   added spectral class
2815
2816
                    FOR l=0L,nlma9-1 DO BEGIN
                        comp_pop(k+i+l).popid = 'A9'+lumclassa9(l)+'_stellar_population'
858e1c83   Ilyes Choubani   small corrections...
2817
                        IF countinda9_1[l] NE 0 THEN comp_pop(k+i+l).radius = (val(inda9_1[l]))(0)*rsun2cm ELSE BEGIN
dcf48925   Ilyes Choubani   added spectral class
2818
2819
2820
2821
2822
2823
2824
;                             IF lumclassa9(l) EQ 'IA+' THEN comp_pop(k+i+l).radius =
;                             IF lumclassa9(l) EQ 'IA' THEN comp_pop(k+i+l).radius =
;                             IF lumclassa9(l) EQ 'IAB' THEN comp_pop(k+i+l).radius =
;                             IF lumclassa9(l) EQ 'IB' THEN comp_pop(k+i+l).radius =
;                             IF lumclassa9(l) EQ 'II' THEN comp_pop(k+i+l).radius =
;                             IF lumclassa9(l) EQ 'III' THEN comp_pop(k+i+l).radius =
;                             IF lumclassa9(l) EQ 'IV' THEN comp_pop(k+i+l).radius =
955f09f4   Ilyes Choubani   Retrieving data f...
2825
                            IF lumclassa9(l) EQ 'V' THEN comp_pop(k+i+l).radius = R_star_MS_a9*rsun2cm;1.747*rsun2cm
dcf48925   Ilyes Choubani   added spectral class
2826
2827
2828
2829
2830
2831
2832
2833
2834
2835
2836
;                             IF lumclassa9(l) EQ 'VI' THEN comp_pop(k+i+l).radius =
;                             IF lumclassa9(l) EQ 'VII' THEN comp_pop(k+i+l).radius =
                        ENDELSE
                        IF countinda9_2[l] NE 0 THEN comp_pop(k+i+l).temperature = (val(inda9_2[l]))(0) ELSE begin
;                             IF lumclasa9(l) EQ 'IA+' THEN comp_pop(k+i+l).temperature =
;                             IF lumclasa9(l) EQ 'IA' THEN comp_pop(k+i+l).temperature =
;                             IF lumclasa9(l) EQ 'IAB' THEN comp_pop(k+i+l).temperature =
;                             IF lumclasa9(l) EQ 'IB' THEN comp_pop(k+i+l).temperature =
;                             IF lumclasa9(l) EQ 'II' THEN comp_pop(k+i+l).temperature =
;                             IF lumclasa9(l) EQ 'III' THEN comp_pop(k+i+l).temperature =
;                             IF lumclasa9(l) EQ 'IV' THEN comp_pop(k+i+l).temperature =
955f09f4   Ilyes Choubani   Retrieving data f...
2837
                            IF lumclasa9(l) EQ 'V' THEN comp_pop(k+i+l).temperature = T_eff_MS_a9;7.4e3 
dcf48925   Ilyes Choubani   added spectral class
2838
2839
2840
2841
;                             IF lumclasa9(l) EQ 'VI' THEN comp_pop(k+i+l).temperature =
;                             IF lumclasa9(l) EQ 'VII' THEN comp_pop(k+i+l).temperature =
                        ENDELSE
                        IF countinda9_3[l] NE 0 THEN comp_pop(k+i+l).distance = (val(inda9_3[l]))(0) ELSE comp_pop(k+i+l).distance = 10.0
f9089dc2   Ilyes Choubani   implementing the ...
2842
                        IF countinda9_4[l] NE 0 THEN comp_pop(k+i+l).nstars = (val(inda9_4[l]))(0) ELSE comp_pop(k+i+l).nstars = 1;stellar_density*(4.*!pi/3)*comp_pop(k+i+l).distance
dcf48925   Ilyes Choubani   added spectral class
2843
2844
2845
                        ;K+=1
                    ENDFOR
                    k+=nlma9       
4750086c   Ilyes Choubani   nouvelle philosph...
2846
2847
2848
2849
2850
2851
2852
2853
                ENDIF
                        
                        
            ENDFOR
                        
            counta=0. 
        i+=k-1
        ENDIF
dcf48925   Ilyes Choubani   added spectral class
2854
          
4750086c   Ilyes Choubani   nouvelle philosph...
2855
2856
2857
2858
2859
2860
2861
2862
                            
    ;==============================================================================================    
                        
                    
        IF countf NE 0 THEN BEGIN ; Filling the structure of the F STELLAR POPULATION(S)
                 
            FOR k=0L+i,countf-1+i DO BEGIN
                
dcf48925   Ilyes Choubani   added spectral class
2863
2864
2865
                 IF countindf0 NE 0 THEN BEGIN
                    FOR l=0L,nlmaf0-1 DO BEGIN
                    comp_pop(k+i+l).popid = 'F0'+lumclassf0(l)+'_stellar_population'
858e1c83   Ilyes Choubani   small corrections...
2866
                        IF countindf0_1[l] NE 0 THEN comp_pop(k+i+l).radius = (val(indf0_1[l]))(0)*rsun2cm ELSE BEGIN
dcf48925   Ilyes Choubani   added spectral class
2867
2868
2869
2870
2871
2872
2873
;                             IF lumclassf0(l) EQ 'IA+' THEN comp_pop(k+i+l).radius =
;                             IF lumclassf0(l) EQ 'IA' THEN comp_pop(k+i+l).radius =
;                             IF lumclassf0(l) EQ 'IAB' THEN comp_pop(k+i+l).radius =
;                             IF lumclassf0(l) EQ 'IB' THEN comp_pop(k+i+l).radius =
;                             IF lumclassf0(l) EQ 'II' THEN comp_pop(k+i+l).radius =
;                             IF lumclassf0(l) EQ 'III' THEN comp_pop(k+i+l).radius =
;                             IF lumclassf0(l) EQ 'IV' THEN comp_pop(k+i+l).radius =
955f09f4   Ilyes Choubani   Retrieving data f...
2874
                            IF lumclassf0(l) EQ 'V' THEN omp_pop(k+i+l).radius = R_star_MS_f0*rsun2cm;1.728*rsun2cm
dcf48925   Ilyes Choubani   added spectral class
2875
2876
2877
2878
2879
2880
2881
2882
2883
2884
2885
;                             IF lumclassf0(l) EQ 'VI' THEN comp_pop(k+i+l).radius =
;                             IF lumclassf0(l) EQ 'VII' THEN comp_pop(k+i+l).radius =
                        ENDELSE
                        IF countindf0_2[l] NE 0 THEN comp_pop(k+i+l).temperature = (val(indf0_2[l]))(0) ELSE BEGIN
;                             IF lumclassf0(l) EQ 'IA+' THEN comp_pop(k+i+l).temperature =
;                             IF lumclassf0(l) EQ 'IA' THEN comp_pop(k+i+l).temperature =
;                             IF lumclassf0(l) EQ 'IAB' THEN comp_pop(k+i+l).temperature =
;                             IF lumclassf0(l) EQ 'IB' THEN comp_pop(k+i+l).temperature =
;                             IF lumclassf0(l) EQ 'II' THEN comp_pop(k+i+l).temperature =
;                             IF lumclassf0(l) EQ 'III' THEN comp_pop(k+i+l).temperature =
;                             IF lumclassf0(l) EQ 'IV' THEN comp_pop(k+i+l).temperature =
955f09f4   Ilyes Choubani   Retrieving data f...
2886
                            IF lumclassf0(l) EQ 'V' THEN comp_pop(k+i+l).temperature = T_eff_MS_f0;7.22e3
dcf48925   Ilyes Choubani   added spectral class
2887
2888
2889
2890
;                             IF lumclassf0(l) EQ 'VI' THEN comp_pop(k+i+l).temperature =
;                             IF lumclassf0(l) EQ 'VII' THEN comp_pop(k+i+l).temperature =
                        ENDELSE
                        IF countindf0_3[l] NE 0 THEN comp_pop(k+i+l).distance = (val(indf0_3[l]))(0) ELSE comp_pop(k+i+l).distance = 10.0
f9089dc2   Ilyes Choubani   implementing the ...
2891
                        IF countindf0_4[l] NE 0 THEN comp_pop(k+i+l).nstars = (val(indf0_4[l]))(0) ELSE comp_pop(k+i+l).nstars = 1;stellar_density*(4.*!pi/3)*comp_pop(k+i+l).distance
dcf48925   Ilyes Choubani   added spectral class
2892
2893
2894
                        ;K+=1 
                    ENDFOR 
                    k+=nlmf0      
4750086c   Ilyes Choubani   nouvelle philosph...
2895
2896
2897
2898
                ENDIF
                
                
                
dcf48925   Ilyes Choubani   added spectral class
2899
2900
2901
                 IF countindf1 NE 0 THEN BEGIN
                    FOR l=0L,nlmaf1-1 DO BEGIN
                        comp_pop(k+i+l).popid = 'F1'+lumclassf1(l)+'_stellar_population'
858e1c83   Ilyes Choubani   small corrections...
2902
                        IF countindf1_1[l] NE 0 THEN comp_pop(k+i+l).radius = (val(indf1_1[l]))(0)*rsun2cm ELSE BEGIN
dcf48925   Ilyes Choubani   added spectral class
2903
2904
2905
2906
2907
2908
2909
;                             IF lumclassf1(l) EQ 'IA+' THEN comp_pop(k+i+l).radius =
;                             IF lumclassf1(l) EQ 'IA' THEN comp_pop(k+i+l).radius =
;                             IF lumclassf1(l) EQ 'IAB' THEN comp_pop(k+i+l).radius =
;                             IF lumclassf1(l) EQ 'IB' THEN comp_pop(k+i+l).radius =
;                             IF lumclassf1(l) EQ 'II' THEN comp_pop(k+i+l).radius =
;                             IF lumclassf1(l) EQ 'III' THEN comp_pop(k+i+l).radius =
;                             IF lumclassf1(l) EQ 'IV' THEN comp_pop(k+i+l).radius =
955f09f4   Ilyes Choubani   Retrieving data f...
2910
                            IF lumclassf1(l) EQ 'V' THEN comp_pop(k+i+l).radius = R_star_MS_f1*rsun2cm;1.679*rsun2cm
dcf48925   Ilyes Choubani   added spectral class
2911
2912
2913
2914
2915
2916
2917
2918
2919
2920
2921
;                             IF lumclassf1(l) EQ 'VI' THEN comp_pop(k+i+l).radius =
;                             IF lumclassf1(l) EQ 'VII' THEN comp_pop(k+i+l).radius =
                        ENDELSE
                        IF countindf1_2[l] NE 0 THEN comp_pop(k+i+l).temperature = (val(indf1_2[l]))(0) ELSE BEGIN
;                             IF lumclassf1(l) EQ 'IA+' THEN comp_pop(k+i+l).temperature =
;                             IF lumclassf1(l) EQ 'IA' THEN comp_pop(k+i+l).temperature =
;                             IF lumclassf1(l) EQ 'IAB' THEN comp_pop(k+i+l).temperature =
;                             IF lumclassf1(l) EQ 'IB' THEN comp_pop(k+i+l).temperature =
;                             IF lumclassf1(l) EQ 'II' THEN comp_pop(k+i+l).temperature =
;                             IF lumclassf1(l) EQ 'III' THEN comp_pop(k+i+l).temperature =
;                             IF lumclassf1(l) EQ 'IV' THEN comp_pop(k+i+l).temperature =
955f09f4   Ilyes Choubani   Retrieving data f...
2922
                            IF lumclassf1(l) EQ 'V' THEN comp_pop(k+i+l).temperature = T_eff_MS_f1;7.02e3
dcf48925   Ilyes Choubani   added spectral class
2923
2924
2925
2926
;                             IF lumclassf1(l) EQ 'VI' THEN comp_pop(k+i+l).temperature =
;                             IF lumclassf1(l) EQ 'VIII' THEN comp_pop(k+i+l).temperature =
                        ENDELSE
                        IF countindf1_3[l] NE 0 THEN comp_pop(k+i+l).distance = (val(indf1_3[l]))(0) ELSE comp_pop(k+i+l).distance = 10.0
f9089dc2   Ilyes Choubani   implementing the ...
2927
                        IF countindf1_4[l] NE 0 THEN comp_pop(k+i+l).nstars = (val(indf1_4[l]))(0) ELSE comp_pop(k+i+l).nstars = 1;stellar_density*(4.*!pi/3)*comp_pop(k+i+l).distance
dcf48925   Ilyes Choubani   added spectral class
2928
2929
2930
                        ;K+=1  
                    ENDFOR
                    k+=nlmf1        
4750086c   Ilyes Choubani   nouvelle philosph...
2931
                ENDIF
f9089dc2   Ilyes Choubani   implementing the ...
2932

4750086c   Ilyes Choubani   nouvelle philosph...
2933
                IF countindf2 NE 0 THEN BEGIN
dcf48925   Ilyes Choubani   added spectral class
2934
2935
                    FOR l=0L,nlmaf2-1 DO BEGIN
                        comp_pop(k+i+l).popid = 'F2'+lumclassf2(l)+'_stellar_population'
858e1c83   Ilyes Choubani   small corrections...
2936
                        IF countindf2_1[l] NE 0 THEN comp_pop(k+i+l).radius = (val(indf2_1[l]))(0)*rsun2cm ELSE BEGIN
dcf48925   Ilyes Choubani   added spectral class
2937
2938
2939
2940
2941
2942
2943
;                             IF lumclassf2(l) EQ 'IA+' THEN comp_pop(k+i+l).radius =
;                             IF lumclassf2(l) EQ 'IA' THEN comp_pop(k+i+l).radius =
;                             IF lumclassf2(l) EQ 'IAB' THEN comp_pop(k+i+l).radius =
;                             IF lumclassf2(l) EQ 'IB' THEN comp_pop(k+i+l).radius =
;                             IF lumclassf2(l) EQ 'II' THEN comp_pop(k+i+l).radius =
;                             IF lumclassf2(l) EQ 'III' THEN comp_pop(k+i+l).radius =
;                             IF lumclassf2(l) EQ 'IV' THEN comp_pop(k+i+l).radius =
955f09f4   Ilyes Choubani   Retrieving data f...
2944
                            IF lumclassf2(l) EQ 'V' THEN comp_pop(k+i+l).radius = R_star_MS_f2*rsun2cm;1.622*rsun2cm
dcf48925   Ilyes Choubani   added spectral class
2945
2946
2947
2948
2949
2950
2951
2952
2953
2954
2955
;                             IF lumclassf2(l) EQ 'VI' THEN comp_pop(k+i+l).radius =
;                             IF lumclassf2(l) EQ 'VII' THEN comp_pop(k+i+l).radius =
                        ENDELSE
                        IF countindf2_2[l] NE 0 THEN comp_pop(k+i+l).temperature = (val(indf2_2[l]))(0) ELSE BEGIN
;                             IF lumclassf2(l) EQ 'IA+' THEN comp_pop(k+i+l).temperature =
;                             IF lumclassf2(l) EQ 'IA' THEN comp_pop(k+i+l).temperature =
;                             IF lumclassf2(l) EQ 'IAB' THEN comp_pop(k+i+l).temperature =
;                             IF lumclassf2(l) EQ 'IB' THEN comp_pop(k+i+l).temperature =
;                             IF lumclassf2(l) EQ 'II' THEN comp_pop(k+i+l).temperature =
;                             IF lumclassf2(l) EQ 'III' THEN comp_pop(k+i+l).temperature =
;                             IF lumclassf2(l) EQ 'IV' THEN comp_pop(k+i+l).temperature =
955f09f4   Ilyes Choubani   Retrieving data f...
2956
                            IF lumclassf2(l) EQ 'V' THEN comp_pop(k+i+l).temperature = T_eff_MS_f2;6.820e3
dcf48925   Ilyes Choubani   added spectral class
2957
2958
2959
2960
;                             IF lumclassf2(l) EQ 'VI' THEN comp_pop(k+i+l).temperature =
;                             IF lumclassf2(l) EQ 'VII' THEN comp_pop(k+i+l).temperature =
                        ENDELSE
                        IF countindf2_3[l] NE 0 THEN comp_pop(k+i+l).distance = (val(indf2_3[l]))(0) ELSE comp_pop(k+i+l).distance = 10.0
f9089dc2   Ilyes Choubani   implementing the ...
2961
                        IF countindf2_4[l] NE 0 THEN comp_pop(k+i+l).nstars = (val(indf2_4[l]))(0) ELSE comp_pop(k+i+l).nstars =  1;stellar_density*(4.*!pi/3)*comp_pop(k+i+l).distance
dcf48925   Ilyes Choubani   added spectral class
2962
2963
2964
                        ;K+=1 
                    ENDFOR 
                    k+=nlmf2        
4750086c   Ilyes Choubani   nouvelle philosph...
2965
2966
2967
2968
2969
                ENDIF
                
                
                
                IF countindf3 NE 0 THEN BEGIN
dcf48925   Ilyes Choubani   added spectral class
2970
2971
                    FOR l=0L,nlmaf3-1 DO BEGIN
                        comp_pop(k+i+l).popid = 'F3'+lumclassf3(l)+'_stellar_population'
858e1c83   Ilyes Choubani   small corrections...
2972
                        IF countindf3_1[l] NE 0 THEN comp_pop(k+i+l).radius = (val(indf3_1[l]))(0)*rsun2cm ELSE BEGIN
dcf48925   Ilyes Choubani   added spectral class
2973
2974
2975
2976
2977
2978
2979
;                             IF lumclassf3(l) EQ 'IA+' THEN comp_pop(k+i+l).radius =
;                             IF lumclassf3(l) EQ 'IA' THEN comp_pop(k+i+l).radius =
;                             IF lumclassf3(l) EQ 'IAB' THEN comp_pop(k+i+l).radius =
;                             IF lumclassf3(l) EQ 'IB' THEN comp_pop(k+i+l).radius =
;                             IF lumclassf3(l) EQ 'II' THEN comp_pop(k+i+l).radius =
;                             IF lumclassf3(l) EQ 'III' THEN comp_pop(k+i+l).radius =
;                             IF lumclassf3(l) EQ 'IV' THEN comp_pop(k+i+l).radius =
955f09f4   Ilyes Choubani   Retrieving data f...
2980
                            IF lumclassf3(l) EQ 'V' THEN comp_pop(k+i+l).radius = R_star_MS_f3*rsun2cm;1.578*rsun2cm
dcf48925   Ilyes Choubani   added spectral class
2981
2982
2983
2984
2985
2986
2987
2988
2989
2990
2991
;                             IF lumclassf3(l) EQ 'VI' THEN comp_pop(k+i+l).radius =
;                             IF lumclassf3(l) EQ 'VII' THEN comp_pop(k+i+l).radius =
                        ENDELSE
                        IF countindf3_2[l] NE 0 THEN comp_pop(k+i+l).temperature = (val(indf3_2[l]))(0) ELSE BEGIN
;                             IF lumclassf3(l) EQ 'IA+' THEN comp_pop(k+i+l).temperature =
;                             IF lumclassf3(l) EQ 'IA' THEN comp_pop(k+i+l).temperature =
;                             IF lumclassf3(l) EQ 'IAB' THEN comp_pop(k+i+l).temperature =
;                             IF lumclassf3(l) EQ 'IB' THEN comp_pop(k+i+l).temperature =
;                             IF lumclassf3(l) EQ 'II' THEN comp_pop(k+i+l).temperature =
;                             IF lumclassf3(l) EQ 'III' THEN comp_pop(k+i+l).temperature =
;                             IF lumclassf3(l) EQ 'IV' THEN comp_pop(k+i+l).temperature =
955f09f4   Ilyes Choubani   Retrieving data f...
2992
                            IF lumclassf3(l) EQ 'V' THEN comp_pop(k+i+l).temperature = T_eff_MS_f3;6.75e3
dcf48925   Ilyes Choubani   added spectral class
2993
2994
2995
2996
;                             IF lumclassf3(l) EQ 'VI' THEN comp_pop(k+i+l).temperature =
;                             IF lumclassf3(l) EQ 'VII' THEN comp_pop(k+i+l).temperature =
                        ENDELSE
                        IF countindf3_3[l] NE 0 THEN comp_pop(k+i+l).distance = (val(indf3_3[l]))(0) ELSE comp_pop(k+i+l).distance = 10.0
f9089dc2   Ilyes Choubani   implementing the ...
2997
                        IF countindf3_4[l] NE 0 THEN comp_pop(k+i+l).nstars = (val(indf3_4[l]))(0) ELSE comp_pop(k+i+l).nstars = 1;stellar_density*(4.*!pi/3)*comp_pop(k+i+l).distance
dcf48925   Ilyes Choubani   added spectral class
2998
2999
3000
                        ;K+=1 
                    ENDFOR
                    k+=nlmf3         
4750086c   Ilyes Choubani   nouvelle philosph...
3001
3002
3003
                ENDIF
            
                IF countindf4 NE 0 THEN BEGIN
dcf48925   Ilyes Choubani   added spectral class
3004
3005
                    FOR l=0L,nlmaf4-1 DO BEGIN
                        comp_pop(k+i+l).popid = 'F4'+lumclassf4(l)+'_stellar_population'
858e1c83   Ilyes Choubani   small corrections...
3006
                        IF countindf4_1[l] NE 0 THEN comp_pop(k+i+l).radius = (val(indf4_1[l]))(0)*rsun2cm ELSE BEGIN
dcf48925   Ilyes Choubani   added spectral class
3007
3008
3009
3010
3011
3012
3013
;                             IF lumclassf4(l) EQ 'IA+' THEN comp_pop(k+i+l).radius =
;                             IF lumclassf4(l) EQ 'IA' THEN comp_pop(k+i+l).radius =
;                             IF lumclassf4(l) EQ 'IAB' THEN comp_pop(k+i+l).radius =
;                             IF lumclassf4(l) EQ 'IB' THEN comp_pop(k+i+l).radius =
;                             IF lumclassf4(l) EQ 'II' THEN comp_pop(k+i+l).radius =
;                             IF lumclassf4(l) EQ 'III' THEN comp_pop(k+i+l).radius =
;                             IF lumclassf4(l) EQ 'IV' THEN comp_pop(k+i+l).radius =
955f09f4   Ilyes Choubani   Retrieving data f...
3014
                            IF lumclassf4(l) EQ 'V' THEN comp_pop(k+i+l).radius = R_star_MS_f4*rsun2cm;1.533*rsun2cm
dcf48925   Ilyes Choubani   added spectral class
3015
3016
3017
3018
3019
3020
3021
3022
3023
3024
3025
;                             IF lumclassf4(l) EQ 'VI' THEN comp_pop(k+i+l).radius =
;                             IF lumclassf4(l) EQ 'VII' THEN comp_pop(k+i+l).radius =
                        ENDELSE
                        IF countindf4_2[l] NE 0 THEN comp_pop(k+i+l).temperature = (val(indf4_2[l]))(0) ELSE BEGIN
;                             IF lumclassf4(l) EQ 'IA+' THEN comp_pop(k+i+l).temperature =
;                             IF lumclassf4(l) EQ 'IA' THEN comp_pop(k+i+l).temperature =
;                             IF lumclassf4(l) EQ 'IAB' THEN comp_pop(k+i+l).temperature =
;                             IF lumclassf4(l) EQ 'IB' THEN comp_pop(k+i+l).temperature =
;                             IF lumclassf4(l) EQ 'II' THEN comp_pop(k+i+l).temperature =
;                             IF lumclassf4(l) EQ 'III' THEN comp_pop(k+i+l).temperature =
;                             IF lumclassf4(l) EQ 'IV' THEN comp_pop(k+i+l).temperature =
955f09f4   Ilyes Choubani   Retrieving data f...
3026
                            IF lumclassf4(l) EQ 'V' THEN comp_pop(k+i+l).temperature = T_eff_MS_f4;6.67e3
dcf48925   Ilyes Choubani   added spectral class
3027
3028
3029
3030
;                             IF lumclassf4(l) EQ 'VI' THEN comp_pop(k+i+l).temperature =
;                             IF lumclassf4(l) EQ 'VII' THEN comp_pop(k+i+l).temperature =
                        ENDELSE
                        IF countindf4_3[l] NE 0 THEN comp_pop(k+i+l).distance = (val(indf4_3[l]))(0) ELSE comp_pop(k+i+l).distance = 10.0
f9089dc2   Ilyes Choubani   implementing the ...
3031
                        IF countindf4_4[l] NE 0 THEN comp_pop(k+i+l).nstars = (val(indf4_4[l]))(0) ELSE comp_pop(k+i+l).nstars = 1;stellar_density*(4.*!pi/3)*comp_pop(k+i+l).distance
dcf48925   Ilyes Choubani   added spectral class
3032
3033
3034
                        ;K+=1
                    ENDFOR
                    k+=nlmf4          
4750086c   Ilyes Choubani   nouvelle philosph...
3035
3036
3037
3038
                ENDIF
                
                
                IF countindf5 NE 0 THEN BEGIN
dcf48925   Ilyes Choubani   added spectral class
3039
3040
                    FOR l=0L,nlmaf5-1 DO BEGIN
                        comp_pop(k+i+l).popid = 'F5'+lumclassf5(l)+'_stellar_population'
858e1c83   Ilyes Choubani   small corrections...
3041
                        IF countindf5_1[l] NE 0 THEN comp_pop(k+i+l).radius = (val(indf5_1[l]))(0)*rsun2cm ELSE BEGIN
dcf48925   Ilyes Choubani   added spectral class
3042
3043
3044
3045
3046
3047
3048
;                             IF lumclassf5(l) EQ 'IA+' THEN comp_pop(k+i+l).radius =
;                             IF lumclassf5(l) EQ 'IA' THEN comp_pop(k+i+l).radius =
;                             IF lumclassf5(l) EQ 'IAB' THEN comp_pop(k+i+l).radius =
;                             IF lumclassf5(l) EQ 'IB' THEN comp_pop(k+i+l).radius =
;                             IF lumclassf5(l) EQ 'II' THEN comp_pop(k+i+l).radius =
;                             IF lumclassf5(l) EQ 'III' THEN comp_pop(k+i+l).radius =
;                             IF lumclassf5(l) EQ 'IV' THEN comp_pop(k+i+l).radius =
955f09f4   Ilyes Choubani   Retrieving data f...
3049
                            IF lumclassf5(l) EQ 'V' THEN comp_pop(k+i+l).radius = R_star_MS_f5*rsun2cm;1.473*rsun2cm
dcf48925   Ilyes Choubani   added spectral class
3050
3051
3052
3053
3054
3055
3056
3057
3058
3059
3060
;                             IF lumclassf5(l) EQ 'VI' THEN comp_pop(k+i+l).radius =
;                             IF lumclassf5(l) EQ 'VII' THEN comp_pop(k+i+l).radius =
                        ENDELSE
                        IF countindf5_2[l] NE 0 THEN comp_pop(k+i+l).temperature = (val(indf5_2[l]))(0) ELSE BEGIN
;                             IF lumclassf5(l) EQ 'IA+' THEN comp_pop(k+i+l).temperature =
;                             IF lumclassf5(l) EQ 'IA' THEN comp_pop(k+i+l).temperature =
;                             IF lumclassf5(l) EQ 'IAB' THEN comp_pop(k+i+l).temperature =
;                             IF lumclassf5(l) EQ 'IB' THEN comp_pop(k+i+l).temperature =
;                             IF lumclassf5(l) EQ 'II' THEN comp_pop(k+i+l).temperature =
;                             IF lumclassf5(l) EQ 'III' THEN comp_pop(k+i+l).temperature =
;                             IF lumclassf5(l) EQ 'IV' THEN comp_pop(k+i+l).temperature =
955f09f4   Ilyes Choubani   Retrieving data f...
3061
                            IF lumclassf5(l) EQ 'V' THEN comp_pop(k+i+l).temperature = T_eff_MS_f5;6.55e3
dcf48925   Ilyes Choubani   added spectral class
3062
3063
3064
3065
;                             IF lumclassf5(l) EQ 'VI' THEN comp_pop(k+i+l).temperature =
;                             IF lumclassf5(l) EQ 'VII' THEN comp_pop(k+i+l).temperature =
                        ENDELSE
                        IF countindf5_3[l] NE 0 THEN comp_pop(k+i+l).distance = (val(indf5_3[l]))(0) ELSE comp_pop(k+i+l).distance = 10.0
f9089dc2   Ilyes Choubani   implementing the ...
3066
                        IF countindf5_4[l] NE 0 THEN comp_pop(k+i+l).nstars = (val(indf5_4[l]))(0) ELSE comp_pop(k+i+l).nstars = 1;stellar_density*(4.*!pi/3)*comp_pop(k+i+l).distance
dcf48925   Ilyes Choubani   added spectral class
3067
3068
3069
                    ;K+=1
                    ENDFOR
                    k+=nlmf5          
4750086c   Ilyes Choubani   nouvelle philosph...
3070
3071
3072
3073
                ENDIF
        
                
                IF countindf6 NE 0 THEN BEGIN
dcf48925   Ilyes Choubani   added spectral class
3074
3075
                    FOR l=0L,nlmaf6-1 DO BEGIN
                        comp_pop(k+i+l).popid = 'F6'+lumclassf6(l)+'_stellar_population'
858e1c83   Ilyes Choubani   small corrections...
3076
                        IF countindf6_1[l] NE 0 THEN comp_pop(k+i+l).radius = (val(indf6_1[l]))(0)*rsun2cm ELSE BEGIN
dcf48925   Ilyes Choubani   added spectral class
3077
3078
3079
3080
3081
3082
3083
;                             IF lumclassf6(l) EQ 'IA+' THEN comp_pop(k+i+l).radius =
;                             IF lumclassf6(l) EQ 'IA' THEN comp_pop(k+i+l).radius =
;                             IF lumclassf6(l) EQ 'IAB' THEN comp_pop(k+i+l).radius =
;                             IF lumclassf6(l) EQ 'IB' THEN comp_pop(k+i+l).radius =
;                             IF lumclassf6(l) EQ 'II' THEN comp_pop(k+i+l).radius =
;                             IF lumclassf6(l) EQ 'III' THEN comp_pop(k+i+l).radius =
;                             IF lumclassf6(l) EQ 'IV' THEN comp_pop(k+i+l).radius =
955f09f4   Ilyes Choubani   Retrieving data f...
3084
                            IF lumclassf6(l) EQ 'V' THEN comp_pop(k+i+l).radius = R_star_MS_f6*rsun2cm;1.359*rsun2cm
dcf48925   Ilyes Choubani   added spectral class
3085
3086
3087
3088
3089
3090
3091
3092
3093
3094
3095
;                             IF lumclassf6(l) EQ 'VI' THEN comp_pop(k+i+l).radius =
;                             IF lumclassf6(l) EQ 'VII' THEN comp_pop(k+i+l).radius =
                         ENDELSE
                        IF countindf6_2[l] NE 0 THEN comp_pop(k+i+l).temperature = (val(indf6_2[l]))(0) ELSE BEGIN
;                             IF lumclassf6(l) EQ 'IA+' THEN comp_pop(k+i+l).temperature =
;                             IF lumclassf6(l) EQ 'IA' THEN comp_pop(k+i+l).temperature =
;                             IF lumclassf6(l) EQ 'IAB' THEN comp_pop(k+i+l).temperature =
;                             IF lumclassf6(l) EQ 'IB' THEN comp_pop(k+i+l).temperature =
;                             IF lumclassf6(l) EQ 'II' THEN comp_pop(k+i+l).temperature =
;                             IF lumclassf6(l) EQ 'III' THEN comp_pop(k+i+l).temperature =
;                             IF lumclassf6(l) EQ 'IV' THEN comp_pop(k+i+l).temperature =
955f09f4   Ilyes Choubani   Retrieving data f...
3096
                            IF lumclassf6(l) EQ 'V' THEN comp_pop(k+i+l).temperature = T_eff_MS_f6;6.35e3
dcf48925   Ilyes Choubani   added spectral class
3097
3098
3099
3100
;                             IF lumclassf6(l) EQ 'VI' THEN comp_pop(k+i+l).temperature =
;                             IF lumclassf6(l) EQ 'VII' THEN comp_pop(k+i+l).temperature =
                        ENDELSE
                        IF countindf6_3[l] NE 0 THEN comp_pop(k+i+l).distance = (val(indf6_3[l]))(0) ELSE comp_pop(k+i+l).distance = 10.0
f9089dc2   Ilyes Choubani   implementing the ...
3101
                        IF countindf6_4[l] NE 0 THEN comp_pop(k+i+l).nstars = (val(indf6_4[l]))(0) ELSE comp_pop(k+i+l).nstars = 1;stellar_density*(4.*!pi/3)*comp_pop(k+i+l).distance
dcf48925   Ilyes Choubani   added spectral class
3102
3103
3104
                        ;K+=1
                    ENDFOR
                    k+=nlmf6           
4750086c   Ilyes Choubani   nouvelle philosph...
3105
3106
3107
3108
                ENDIF
        
                
                IF countindf7 NE 0 THEN BEGIN
dcf48925   Ilyes Choubani   added spectral class
3109
3110
                    FOR l=0L,nlmaf7-1 DO BEGIN
                        comp_pop(k+i+l).popid = 'F7'+lumclassf7(l)+'_stellar_population'
858e1c83   Ilyes Choubani   small corrections...
3111
                        IF countindf7_1[l] NE 0 THEN comp_pop(k+i+l).radius = (val(indf7_1[l]))(0)*rsun2cm ELSE BEGIN
dcf48925   Ilyes Choubani   added spectral class
3112
3113
3114
3115
3116
3117
3118
;                             IF lumclassf7(l) EQ 'IA+' THEN comp_pop(k+i+l).radius =
;                             IF lumclassf7(l) EQ 'IA' THEN comp_pop(k+i+l).radius =
;                             IF lumclassf7(l) EQ 'IAB' THEN comp_pop(k+i+l).radius =
;                             IF lumclassf7(l) EQ 'IB' THEN comp_pop(k+i+l).radius =
;                             IF lumclassf7(l) EQ 'II' THEN comp_pop(k+i+l).radius =
;                             IF lumclassf7(l) EQ 'III' THEN comp_pop(k+i+l).radius =
;                             IF lumclassf7(l) EQ 'IV' THEN comp_pop(k+i+l).radius =
955f09f4   Ilyes Choubani   Retrieving data f...
3119
                            IF lumclassf7(l) EQ 'V' THEN comp_pop(k+i+l).radius = R_star_MS_f7*rsun2cm;1.324*rsun2cm
dcf48925   Ilyes Choubani   added spectral class
3120
3121
3122
3123
3124
3125
3126
3127
3128
3129
3130
;                             IF lumclassf7(l) EQ 'VI' THEN comp_pop(k+i+l).radius =
;                             IF lumclassf7(l) EQ 'VII' THEN comp_pop(k+i+l).radius =
                        ENDELSE
                        IF countindf7_2[l] NE 0 THEN comp_pop(k+i+l).temperature = (val(indf7_2[l]))(0) ELSE BEGIN
;                             IF lumclassf7(l) EQ 'IA+' THEN comp_pop(k+i+l).temperature =
;                             IF lumclassf7(l) EQ 'IA' THEN comp_pop(k+i+l).temperature =
;                             IF lumclassf7(l) EQ 'IAB' THEN comp_pop(k+i+l).temperature =
;                             IF lumclassf7(l) EQ 'IB' THEN comp_pop(k+i+l).temperature =
;                             IF lumclassf7(l) EQ 'II' THEN comp_pop(k+i+l).temperature =
;                             IF lumclassf7(l) EQ 'III' THEN comp_pop(k+i+l).temperature =
;                             IF lumclassf7(l) EQ 'IV' THEN comp_pop(k+i+l).temperature =
955f09f4   Ilyes Choubani   Retrieving data f...
3131
                            IF lumclassf7(l) EQ 'V' THEN comp_pop(k+i+l).temperature = T_eff_MS_f7;6.28e3
dcf48925   Ilyes Choubani   added spectral class
3132
3133
3134
3135
;                             IF lumclassf7(l) EQ 'VI' THEN comp_pop(k+i+l).temperature =
;                             IF lumclassf7(l) EQ 'VII' THEN comp_pop(k+i+l).temperature =
                        ENDELSE
                        IF countindf7_3[l] NE 0 THEN comp_pop(k+i+l).distance = (val(indf7_3[l]))(0) ELSE comp_pop(k+i+l).distance = 10.0
f9089dc2   Ilyes Choubani   implementing the ...
3136
                        IF countindf7_4[l] NE 0 THEN comp_pop(k+i+l).nstars = (val(indf7_4[l]))(0) ELSE comp_pop(k+i+l).nstars = 1;stellar_density*(4.*!pi/3)*comp_pop(k+i+l).distance
dcf48925   Ilyes Choubani   added spectral class
3137
3138
3139
                    ;K+=1 
                    ENDFOR
                    k+=nlmf7          
4750086c   Ilyes Choubani   nouvelle philosph...
3140
3141
3142
3143
                ENDIF
                    
                
                IF countindf8 NE 0 THEN BEGIN
dcf48925   Ilyes Choubani   added spectral class
3144
3145
                    FOR l=0L,nlmaf8-1 DO BEGIN
                        comp_pop(k+i+l).popid = 'F8'+lumclassf8(l)+'_stellar_population'
858e1c83   Ilyes Choubani   small corrections...
3146
                        IF countindf8_1[l] NE 0 THEN comp_pop(k+i+l).radius = (val(indf8_1[l]))(0)*rsun2cm ELSE BEGIN
dcf48925   Ilyes Choubani   added spectral class
3147
3148
3149
3150
3151
3152
3153
;                             IF lumclassf8(l) EQ 'IA+' THEN comp_pop(k+i+l).radius =
;                             IF lumclassf8(l) EQ 'IA' THEN comp_pop(k+i+l).radius =
;                             IF lumclassf8(l) EQ 'IAB' THEN comp_pop(k+i+l).radius =
;                             IF lumclassf8(l) EQ 'IB' THEN comp_pop(k+i+l).radius =
;                             IF lumclassf8(l) EQ 'II' THEN comp_pop(k+i+l).radius =
;                             IF lumclassf8(l) EQ 'III' THEN comp_pop(k+i+l).radius =
;                             IF lumclassf8(l) EQ 'IV' THEN comp_pop(k+i+l).radius =
955f09f4   Ilyes Choubani   Retrieving data f...
3154
                            IF lumclassf8(l) EQ 'V' THEN comp_pop(k+i+l).radius = R_star_MS_f8*rsun2cm;1.221*rsun2cm
dcf48925   Ilyes Choubani   added spectral class
3155
3156
3157
3158
3159
3160
3161
3162
3163
3164
3165
;                             IF lumclassf8(l) EQ 'VI' THEN comp_pop(k+i+l).radius =
;                             IF lumclassf8(l) EQ 'VII' THEN comp_pop(k+i+l).radius =
                        ENDELSE
                        IF countindf8_2[l] NE 0 THEN comp_pop(k+i+l).temperature = (val(indf8_2[l]))(0) ELSE BEGIN
;                             IF lumclassf8(l) EQ 'IA+' THEN comp_pop(k+i+l).temperature =
;                             IF lumclassf8(l) EQ 'IA' THEN comp_pop(k+i+l).temperature =
;                             IF lumclassf8(l) EQ 'IAB' THEN comp_pop(k+i+l).temperature =
;                             IF lumclassf8(l) EQ 'IB' THEN comp_pop(k+i+l).temperature =
;                             IF lumclassf8(l) EQ 'II' THEN comp_pop(k+i+l).temperature =
;                             IF lumclassf8(l) EQ 'III' THEN comp_pop(k+i+l).temperature =
;                             IF lumclassf8(l) EQ 'IV' THEN comp_pop(k+i+l).temperature =
955f09f4   Ilyes Choubani   Retrieving data f...
3166
                            IF lumclassf8(l) EQ 'V' THEN comp_pop(k+i+l).temperature = T_eff_MS_f8;6.18e3
dcf48925   Ilyes Choubani   added spectral class
3167
3168
3169
3170
;                             IF lumclassf8(l) EQ 'VI' THEN comp_pop(k+i+l).temperature =
;                             IF lumclassf8(l) EQ 'VII' THEN comp_pop(k+i+l).temperature =   
                        ENDELSE
                        IF countindf8_3[l] NE 0 THEN comp_pop(k+i+l).distance = (val(indf8_3[l]))(0) ELSE comp_pop(k+i+l).distance = 10.0
f9089dc2   Ilyes Choubani   implementing the ...
3171
                        IF countindf8_4[l] NE 0 THEN comp_pop(k+i+l).nstars = (val(indf8_4[l]))(0) ELSE comp_pop(k+i+l).nstars = 1;stellar_density*(4.*!pi/3)*comp_pop(k+i+l).distance
dcf48925   Ilyes Choubani   added spectral class
3172
3173
3174
                    ;K+=1
                    ENDFOR
                    k+=nlmf8           
4750086c   Ilyes Choubani   nouvelle philosph...
3175
3176
3177
3178
                ENDIF
        
                
                IF countindf9 NE 0 THEN BEGIN
dcf48925   Ilyes Choubani   added spectral class
3179
3180
                    FOR l=0L,nlmaf9-1 DO BEGIN
                        comp_pop(k+i+l).popid = 'F9'+lumclassf9(l)+'_stellar_population'
858e1c83   Ilyes Choubani   small corrections...
3181
                        IF countindf9_1[l] NE 0 THEN comp_pop(k+i+l).radius = (val(indf9_1[l]))(0)*rsun2cm ELSE BEGIN
dcf48925   Ilyes Choubani   added spectral class
3182
3183
3184
3185
3186
3187
3188
;                             IF lumclassf9(l) EQ 'IA+' THEN comp_pop(k+i+l).radius =
;                             IF lumclassf9(l) EQ 'IA' THEN comp_pop(k+i+l).radius =
;                             IF lumclassf9(l) EQ 'IAB' THEN comp_pop(k+i+l).radius =
;                             IF lumclassf9(l) EQ 'IB' THEN comp_pop(k+i+l).radius =
;                             IF lumclassf9(l) EQ 'II' THEN comp_pop(k+i+l).radius =
;                             IF lumclassf9(l) EQ 'III' THEN comp_pop(k+i+l).radius =
;                             IF lumclassf9(l) EQ 'IV' THEN comp_pop(k+i+l).radius =
955f09f4   Ilyes Choubani   Retrieving data f...
3189
                            IF lumclassf9(l) EQ 'V' THEN comp_pop(k+i+l).radius = R_star_MS_f9*rsun2cm;1.167*rsun2cm
dcf48925   Ilyes Choubani   added spectral class
3190
3191
3192
3193
3194
3195
3196
3197
3198
3199
3200
;                             IF lumclassf9(l) EQ 'VI' THEN comp_pop(k+i+l).radius =
;                             IF lumclassf9(l) EQ 'VII' THEN comp_pop(k+i+l).radius =
                        ENDELSE
                        IF countindf9_2[l] NE 0 THEN comp_pop(k+i+l).temperature = (val(indf9_2[l]))(0) ELSE BEGIN
;                             IF lumclassf9(l) EQ 'IA+' THEN comp_pop(k+i+l).temperature =
;                             IF lumclassf9(l) EQ 'IA' THEN comp_pop(k+i+l).temperature =
;                             IF lumclassf9(l) EQ 'IAB' THEN comp_pop(k+i+l).temperature =
;                             IF lumclassf9(l) EQ 'IB' THEN comp_pop(k+i+l).temperature =
;                             IF lumclassf9(l) EQ 'II' THEN comp_pop(k+i+l).temperature =
;                             IF lumclassf9(l) EQ 'III' THEN comp_pop(k+i+l).temperature =
;                             IF lumclassf9(l) EQ 'IV' THEN comp_pop(k+i+l).temperature =
955f09f4   Ilyes Choubani   Retrieving data f...
3201
                            IF lumclassf9(l) EQ 'V' THEN comp_pop(k+i+l).temperature = T_eff_MS_f9;6.05e3
dcf48925   Ilyes Choubani   added spectral class
3202
3203
3204
3205
;                             IF lumclassf9(l) EQ 'VI' THEN comp_pop(k+i+l).temperature =
;                             IF lumclassf9(l) EQ 'VII' THEN comp_pop(k+i+l).temperature =    
                        ENDELSE
                        IF countindf9_3[l] NE 0 THEN comp_pop(k+i+l).distance = (val(indf9_3[l]))(0) ELSE comp_pop(k+i+l).distance = 10.0
f9089dc2   Ilyes Choubani   implementing the ...
3206
                        IF countindf9_4[l] NE 0 THEN comp_pop(k+i+l).nstars = (val(indf9_4[l]))(0) ELSE comp_pop(k+i+l).nstars = 1;stellar_density*(4.*!pi/3)*comp_pop(k+i+l).distance
dcf48925   Ilyes Choubani   added spectral class
3207
3208
3209
                    ;K+=1 
                    ENDFOR
                    k+=nlmf9          
4750086c   Ilyes Choubani   nouvelle philosph...
3210
3211
3212
3213
3214
3215
3216
3217
                ENDIF
                                    
                                        
            ENDFOR
                                                        
            countf=0.  
        i+=k-1
        ENDIF
dcf48925   Ilyes Choubani   added spectral class
3218
         
4750086c   Ilyes Choubani   nouvelle philosph...
3219
3220
3221
3222
3223
3224
3225
3226
                                                                    
    ;============================================================================================== 
                            
        IF countg NE 0 THEN BEGIN ; Filling the structure of the G STELLAR POPULATION(S)
                    
            FOR k=0L+i,countg-1+i DO BEGIN
                
                IF countindg0 NE 0 THEN BEGIN
dcf48925   Ilyes Choubani   added spectral class
3227
3228
                    FOR l=0L,nlmg0-1 DO BEGIN
                        comp_pop(k+i+l).popid = 'G0'+lumclassg0(l)+'_stellar_population'
858e1c83   Ilyes Choubani   small corrections...
3229
                        IF countindg0_1[l] NE 0 THEN comp_pop(k+i+l).radius = (val(indg0_1[l]))(0)*rsun2cm ELSE BEGIN
dcf48925   Ilyes Choubani   added spectral class
3230
3231
3232
3233
3234
3235
3236
;                             IF lumclassg0(l) EQ 'IA+' THEN comp_pop(k+i+l).radius =
;                             IF lumclassg0(l) EQ 'IA' THEN comp_pop(k+i+l).radius =
;                             IF lumclassg0(l) EQ 'IAB' THEN comp_pop(k+i+l).radius =
;                             IF lumclassg0(l) EQ 'IB' THEN comp_pop(k+i+l).radius =
;                             IF lumclassg0(l) EQ 'II' THEN comp_pop(k+i+l).radius =
;                             IF lumclassg0(l) EQ 'III' THEN comp_pop(k+i+l).radius =
;                             IF lumclassg0(l) EQ 'IV' THEN comp_pop(k+i+l).radius =
955f09f4   Ilyes Choubani   Retrieving data f...
3237
                            IF lumclassg0(l) EQ 'V' THEN comp_pop(k+i+l).radius = R_star_MS_g0*rsun2cm;1.1*rsun2cm
dcf48925   Ilyes Choubani   added spectral class
3238
3239
3240
3241
3242
3243
3244
3245
3246
3247
3248
3249
;                             IF lumclassg0(l) EQ 'VI' THEN comp_pop(k+i+l).radius =
;                             IF lumclassg0(l) EQ 'VII' THEN comp_pop(k+i+l).radius =

                        ENDELSE
                        IF countindg0_2[l] NE 0 THEN comp_pop(k+i+l).temperature = (val(indg0_2[l]))(0) ELSE BEGIN
;                             IF lumclassfg0(l) EQ 'IA+' THEN comp_pop(k+i+l).temperature =
;                             IF lumclassfg0(l) EQ 'IA' THEN comp_pop(k+i+l).temperature =
;                             IF lumclassfg0(l) EQ 'IAB' THEN comp_pop(k+i+l).temperature =
;                             IF lumclassfg0(l) EQ 'IB' THEN comp_pop(k+i+l).temperature =
;                             IF lumclassfg0(l) EQ 'II' THEN comp_pop(k+i+l).temperature =
;                             IF lumclassfg0(l) EQ 'III' THEN comp_pop(k+i+l).temperature =
;                             IF lumclassfg0(l) EQ 'IV' THEN comp_pop(k+i+l).temperature =
955f09f4   Ilyes Choubani   Retrieving data f...
3250
                            IF lumclassfg0(l) EQ 'V' THEN comp_pop(k+i+l).temperature = T_eff_MS_g0;5.93e3
dcf48925   Ilyes Choubani   added spectral class
3251
3252
3253
3254
;                             IF lumclassfg0(l) EQ 'VI' THEN comp_pop(k+i+l).temperature =
;                             IF lumclassfg0(l) EQ 'VII' THEN comp_pop(k+i+l).temperature =
                        ENDELSE
                        IF countindg0_3[l] NE 0 THEN comp_pop(k+i+l).distance = (val(indg0_3[l]))(0) ELSE comp_pop(k+i+l).distance = 10.0
f9089dc2   Ilyes Choubani   implementing the ...
3255
                        IF countindg0_4[l] NE 0 THEN comp_pop(k+i+l).nstars = (val(indg0_4[l]))(0) ELSE comp_pop(k+i+l).nstars = 1;stellar_density*(4.*!pi/3)*comp_pop(k+i+l).distance
dcf48925   Ilyes Choubani   added spectral class
3256
3257
3258
                        ;K+=1 
                    ENDFOR  
                    k+=nlmg0      
4750086c   Ilyes Choubani   nouvelle philosph...
3259
3260
3261
3262
3263
                ENDIF
                
                
                
                IF countindg1 NE 0 THEN BEGIN
dcf48925   Ilyes Choubani   added spectral class
3264
3265
                    FOR l=0L,nlmg1-1 DO BEGIN
                        comp_pop(k+i+l).popid = 'G1'+lumclassg1(l)+'_stellar_population'
858e1c83   Ilyes Choubani   small corrections...
3266
                        IF countindg1_1[l] NE 0 THEN comp_pop(k+i+l).radius = (val(indg1_1[l]))(0)*rsun2cm ELSE BEGIN
dcf48925   Ilyes Choubani   added spectral class
3267
3268
3269
3270
3271
3272
3273
;                             IF lumclassg1(l) EQ 'IA+' THEN comp_pop(k+i+l).radius =
;                             IF lumclassg1(l) EQ 'IA' THEN comp_pop(k+i+l).radius =
;                             IF lumclassg1(l) EQ 'IAB' THEN comp_pop(k+i+l).radius =
;                             IF lumclassg1(l) EQ 'IB' THEN comp_pop(k+i+l).radius =
;                             IF lumclassg1(l) EQ 'II' THEN comp_pop(k+i+l).radius =
;                             IF lumclassg1(l) EQ 'III' THEN comp_pop(k+i+l).radius =
;                             IF lumclassg1(l) EQ 'IV' THEN comp_pop(k+i+l).radius =
955f09f4   Ilyes Choubani   Retrieving data f...
3274
                            IF lumclassg1(l) EQ 'V' THEN omp_pop(k+i+l).radius = R_star_MS_g1*rsun2cm;1.06*rsun2cm
dcf48925   Ilyes Choubani   added spectral class
3275
3276
3277
3278
3279
3280
3281
3282
3283
3284
3285
;                             IF lumclassg1(l) EQ 'VI' THEN comp_pop(k+i+l).radius =
;                             IF lumclassg1(l) EQ 'VII' THEN comp_pop(k+i+l).radius =
                        ENDELSE
                        IF countindg1_2[l] NE 0 THEN comp_pop(k+i+l).temperature = (val(indg1_2[l]))(0) ELSE begin
;                             IF lumclassfg1(l) EQ 'IA+' THEN comp_pop(k+i+l).temperature =
;                             IF lumclassfg1(l) EQ 'IA' THEN comp_pop(k+i+l).temperature =
;                             IF lumclassfg1(l) EQ 'IAB' THEN comp_pop(k+i+l).temperature =
;                             IF lumclassfg1(l) EQ 'IB' THEN comp_pop(k+i+l).temperature =
;                             IF lumclassfg1(l) EQ 'II' THEN comp_pop(k+i+l).temperature =
;                             IF lumclassfg1(l) EQ 'III' THEN comp_pop(k+i+l).temperature =
;                             IF lumclassfg1(l) EQ 'IV' THEN comp_pop(k+i+l).temperature =
955f09f4   Ilyes Choubani   Retrieving data f...
3286
                            IF lumclassfg1(l) EQ 'V' THEN comp_pop(k+i+l).temperature = T_eff_MS_g1;5.86e3
dcf48925   Ilyes Choubani   added spectral class
3287
3288
3289
3290
;                             IF lumclassfg1(l) EQ 'VI' THEN comp_pop(k+i+l).temperature =
;                             IF lumclassfg1(l) EQ 'VII' THEN comp_pop(k+i+l).temperature = 
                        ENDELSE
                        IF countindg1_3[l] NE 0 THEN comp_pop(k+i+l).distance = (val(indg1_3[l]))(0) ELSE comp_pop(k+i+l).distance = 10.0
f9089dc2   Ilyes Choubani   implementing the ...
3291
                        IF countindg1_4[l] NE 0 THEN comp_pop(k+i+l).nstars = (val(indg1_4[l]))(0) ELSE comp_pop(k+i+l).nstars = 1;stellar_density*(4.*!pi/3)*comp_pop(k+i+l).distance
dcf48925   Ilyes Choubani   added spectral class
3292
3293
3294
                    ;K+=1 
                    ENDFOR
                    k+=nlmg1
4750086c   Ilyes Choubani   nouvelle philosph...
3295
3296
3297
3298
3299
                ENDIF
                
                
                
                IF countindg2 NE 0 THEN BEGIN
dcf48925   Ilyes Choubani   added spectral class
3300
3301
                    FOR l=0L,nlmg2-1 DO BEGIN
                        comp_pop(k+i+l).popid = 'G2'+lumclassg2(l)+'_stellar_population'
858e1c83   Ilyes Choubani   small corrections...
3302
                        IF countindg2_1[l] NE 0 THEN comp_pop(k+i+l).radius = (val(indg2_1[l]))(0)*rsun2cm ELSE BEGIN
dcf48925   Ilyes Choubani   added spectral class
3303
3304
3305
3306
3307
3308
3309
;                             IF lumclassg2(l) EQ 'IA+' THEN comp_pop(k+i+l).radius =
;                             IF lumclassg2(l) EQ 'IA' THEN comp_pop(k+i+l).radius =
;                             IF lumclassg2(l) EQ 'IAB' THEN comp_pop(k+i+l).radius =
;                             IF lumclassg2(l) EQ 'IB' THEN comp_pop(k+i+l).radius =
;                             IF lumclassg2(l) EQ 'II' THEN comp_pop(k+i+l).radius =
;                             IF lumclassg2(l) EQ 'III' THEN comp_pop(k+i+l).radius =
;                             IF lumclassg2(l) EQ 'IV' THEN comp_pop(k+i+l).radius =
955f09f4   Ilyes Choubani   Retrieving data f...
3310
                            IF lumclassg2(l) EQ 'V' THEN comp_pop(k+i+l).radius = R_star_MS_g2*rsun2cm;1.012*rsun2cm
dcf48925   Ilyes Choubani   added spectral class
3311
3312
3313
3314
3315
3316
3317
3318
3319
3320
3321
;                             IF lumclassg2(l) EQ 'VI' THEN comp_pop(k+i+l).radius =
;                             IF lumclassg2(l) EQ 'VII' THEN comp_pop(k+i+l).radius =
                        ENDELSE
                        IF countindg2_2[l] NE 0 THEN comp_pop(k+i+l).temperature = (val(indg2_2[l]))(0) ELSE BEGIN
;                             IF lumclassfg2(l) EQ 'IA+' THEN comp_pop(k+i+l).temperature =
;                             IF lumclassfg2(l) EQ 'IA' THEN comp_pop(k+i+l).temperature =
;                             IF lumclassfg2(l) EQ 'IAB' THEN comp_pop(k+i+l).temperature =
;                             IF lumclassfg2(l) EQ 'IB' THEN comp_pop(k+i+l).temperature =
;                             IF lumclassfg2(l) EQ 'II' THEN comp_pop(k+i+l).temperature =
;                             IF lumclassfg2(l) EQ 'III' THEN comp_pop(k+i+l).temperature =
;                             IF lumclassfg2(l) EQ 'IV' THEN comp_pop(k+i+l).temperature =
955f09f4   Ilyes Choubani   Retrieving data f...
3322
                            IF lumclassfg2(l) EQ 'V' THEN comp_pop(k+i+l).temperature = T_eff_MS_g2;5.77e3
dcf48925   Ilyes Choubani   added spectral class
3323
3324
3325
3326
;                             IF lumclassfg2(l) EQ 'VI' THEN comp_pop(k+i+l).temperature =
;                             IF lumclassfg2(l) EQ 'VII' THEN comp_pop(k+i+l).temperature =
                        ENDELSE
                        IF countindg2_3[l] NE 0 THEN comp_pop(k+i+l).distance = (val(indg2_3[l]))(0) ELSE comp_pop(k+i+l).distance = 10.0
f9089dc2   Ilyes Choubani   implementing the ...
3327
                        IF countindg2_4[l] NE 0 THEN comp_pop(k+i+l).nstars = (val(indg2_4[l]))(0) ELSE comp_pop(k+i+l).nstars = 1;stellar_density*(4.*!pi/3)*comp_pop(k+i+l).distance
dcf48925   Ilyes Choubani   added spectral class
3328
3329
3330
                        ;K+=1 
                    ENDFOR
                    k+=nlmg2         
4750086c   Ilyes Choubani   nouvelle philosph...
3331
3332
3333
3334
3335
                ENDIF
                
                
                
                IF countindg3 NE 0 THEN BEGIN
dcf48925   Ilyes Choubani   added spectral class
3336
3337
                    FOR l=0L,nlmg3-1 DO BEGIN
                        comp_pop(k+i+l).popid = 'G3'+lumclassg3(l)+'_stellar_population'
858e1c83   Ilyes Choubani   small corrections...
3338
                        IF countindg3_1[l] NE 0 THEN comp_pop(k+i+l).radius = (val(indg3_1[l]))(0)*rsun2cm ELSE BEGIN
dcf48925   Ilyes Choubani   added spectral class
3339
3340
3341
3342
3343
3344
3345
;                             IF lumclassg3(l) EQ 'IA+' THEN comp_pop(k+i+l).radius =
;                             IF lumclassg3(l) EQ 'IA' THEN comp_pop(k+i+l).radius =
;                             IF lumclassg3(l) EQ 'IAB' THEN comp_pop(k+i+l).radius =
;                             IF lumclassg3(l) EQ 'IB' THEN comp_pop(k+i+l).radius =
;                             IF lumclassg3(l) EQ 'II' THEN comp_pop(k+i+l).radius =
;                             IF lumclassg3(l) EQ 'III' THEN comp_pop(k+i+l).radius =
;                             IF lumclassg3(l) EQ 'IV' THEN comp_pop(k+i+l).radius =
955f09f4   Ilyes Choubani   Retrieving data f...
3346
                            IF lumclassg3(l) EQ 'V' THEN comp_pop(k+i+l).radius = R_star_MS_g3*rsun2cm;1.002*rsun2cm
dcf48925   Ilyes Choubani   added spectral class
3347
3348
3349
3350
3351
3352
3353
3354
3355
3356
3357
;                             IF lumclassg3(l) EQ 'VI' THEN comp_pop(k+i+l).radius =
;                             IF lumclassg3(l) EQ 'VII' THEN comp_pop(k+i+l).radius =
                        ENDELSE
                        IF countindg3_2[l] NE 0 THEN comp_pop(k+i+l).temperature = (val(indg3_2[l]))(0) ELSE BEGIN
;                             IF lumclassfg3(l) EQ 'IA+' THEN comp_pop(k+i+l).temperature =
;                             IF lumclassfg3(l) EQ 'IA' THEN comp_pop(k+i+l).temperature =
;                             IF lumclassfg3(l) EQ 'IAB' THEN comp_pop(k+i+l).temperature =
;                             IF lumclassfg3(l) EQ 'IB' THEN comp_pop(k+i+l).temperature =
;                             IF lumclassfg3(l) EQ 'II' THEN comp_pop(k+i+l).temperature =
;                             IF lumclassfg3(l) EQ 'III' THEN comp_pop(k+i+l).temperature =
;                             IF lumclassfg3(l) EQ 'IV' THEN comp_pop(k+i+l).temperature =
955f09f4   Ilyes Choubani   Retrieving data f...
3358
                            IF lumclassfg3(l) EQ 'V' THEN comp_pop(k+i+l).temperature = T_eff_MS_g3;5.72e3
dcf48925   Ilyes Choubani   added spectral class
3359
3360
3361
3362
;                             IF lumclassfg3(l) EQ 'VI' THEN comp_pop(k+i+l).temperature =
;                             IF lumclassfg3(l) EQ 'VII' THEN comp_pop(k+i+l).temperature 
                        ENDELSE
                        IF countindg3_3[l] NE 0 THEN comp_pop(k+i+l).distance = (val(indg3_3[l]))(0) ELSE comp_pop(k+i+l).distance = 10.0
f9089dc2   Ilyes Choubani   implementing the ...
3363
                        IF countindg3_4[l] NE 0 THEN comp_pop(k+i+l).nstars = (val(indg3_4[l]))(0) ELSE comp_pop(k+i+l).nstars = 1;stellar_density*(4.*!pi/3)*comp_pop(k+i+l).distance
dcf48925   Ilyes Choubani   added spectral class
3364
3365
3366
                        ;K+=1 
                    ENDFOR 
                    k+=nlmg3
4750086c   Ilyes Choubani   nouvelle philosph...
3367
3368
3369
                ENDIF
            
                IF countindg4 NE 0 THEN BEGIN
dcf48925   Ilyes Choubani   added spectral class
3370
3371
                    FOR l=0L,nlmg4-1 DO BEGIN
                        comp_pop(k+i+l).popid = 'G4'+lumclassg4(l)+'_stellar_population'
858e1c83   Ilyes Choubani   small corrections...
3372
                        IF countindg4_1[l] NE 0 THEN comp_pop(k+i+l).radius = (val(indg4_1[l]))(0)*rsun2cm ELSE BEGIN
dcf48925   Ilyes Choubani   added spectral class
3373
3374
3375
3376
3377
3378
3379
;                             IF lumclassg4(l) EQ 'IA+' THEN comp_pop(k+i+l).radius =
;                             IF lumclassg4(l) EQ 'IA' THEN comp_pop(k+i+l).radius =
;                             IF lumclassg4(l) EQ 'IAB' THEN comp_pop(k+i+l).radius =
;                             IF lumclassg4(l) EQ 'IB' THEN comp_pop(k+i+l).radius =
;                             IF lumclassg4(l) EQ 'II' THEN comp_pop(k+i+l).radius =
;                             IF lumclassg4(l) EQ 'III' THEN comp_pop(k+i+l).radius =
;                             IF lumclassg4(l) EQ 'IV' THEN comp_pop(k+i+l).radius =
955f09f4   Ilyes Choubani   Retrieving data f...
3380
                            IF lumclassg4(l) EQ 'V' THEN comp_pop(k+i+l).radius = R_star_MS_g4*rsun2cm;0.991*rsun2cm
dcf48925   Ilyes Choubani   added spectral class
3381
3382
3383
3384
3385
3386
3387
3388
3389
3390
3391
;                             IF lumclassg4(l) EQ 'VI' THEN comp_pop(k+i+l).radius =
;                             IF lumclassg4(l) EQ 'VII' THEN comp_pop(k+i+l).radius =
                        ENDELSE
                        IF countindg4_2[l] NE 0 THEN comp_pop(k+i+l).temperature = (val(indg4_2[l]))(0) ELSE BEGIN
;                             IF lumclassfg4(l) EQ 'IA+' THEN comp_pop(k+i+l).temperature =
;                             IF lumclassfg4(l) EQ 'IA' THEN comp_pop(k+i+l).temperature =
;                             IF lumclassfg4(l) EQ 'IAB' THEN comp_pop(k+i+l).temperature =
;                             IF lumclassfg4(l) EQ 'IB' THEN comp_pop(k+i+l).temperature =
;                             IF lumclassfg4(l) EQ 'II' THEN comp_pop(k+i+l).temperature =
;                             IF lumclassfg4(l) EQ 'III' THEN comp_pop(k+i+l).temperature =
;                             IF lumclassfg4(l) EQ 'IV' THEN comp_pop(k+i+l).temperature =
955f09f4   Ilyes Choubani   Retrieving data f...
3392
                            IF lumclassfg4(l) EQ 'V' THEN comp_pop(k+i+l).temperature = T_eff_MS_g4;5.68e3
dcf48925   Ilyes Choubani   added spectral class
3393
3394
3395
3396
;                             IF lumclassfg4(l) EQ 'VI' THEN comp_pop(k+i+l).temperature =
;                             IF lumclassfg4(l) EQ 'VII' THEN comp_pop(k+i+l).temperature =
                        ENDELSE
                        IF countindg4_3[l] NE 0 THEN comp_pop(k+i+l).distance = (val(indg4_3[l]))(0) ELSE comp_pop(k+i+l).distance = 10.0
f9089dc2   Ilyes Choubani   implementing the ...
3397
                        IF countindg4_4[l] NE 0 THEN comp_pop(k+i+l).nstars = (val(indg4_4[l]))(0) ELSE comp_pop(k+i+l).nstars = 1;stellar_density*(4.*!pi/3)*comp_pop(k+i+l).distance
dcf48925   Ilyes Choubani   added spectral class
3398
3399
3400
                        ;K+=1
                    ENDFOR
                    k+=nlmg4 
4750086c   Ilyes Choubani   nouvelle philosph...
3401
3402
3403
3404
                ENDIF
                
                
                IF countindg5 NE 0 THEN BEGIN
dcf48925   Ilyes Choubani   added spectral class
3405
3406
                    FOR l=0L,nlmg5-1 DO BEGIN
                        comp_pop(k+i+l).popid = 'G5'+lumclassg5(l)+'_stellar_population'
858e1c83   Ilyes Choubani   small corrections...
3407
                        IF countindg5_1[l] NE 0 THEN comp_pop(k+i+l).radius = (val(indg5_1[l]))(0)*rsun2cm ELSE BEGIN
dcf48925   Ilyes Choubani   added spectral class
3408
3409
3410
3411
3412
3413
3414
;                             IF lumclassg5(l) EQ 'IA+' THEN comp_pop(k+i+l).radius =
;                             IF lumclassg5(l) EQ 'IA' THEN comp_pop(k+i+l).radius =
;                             IF lumclassg5(l) EQ 'IAB' THEN comp_pop(k+i+l).radius =
;                             IF lumclassg5(l) EQ 'IB' THEN comp_pop(k+i+l).radius =
;                             IF lumclassg5(l) EQ 'II' THEN comp_pop(k+i+l).radius =
;                             IF lumclassg5(l) EQ 'III' THEN comp_pop(k+i+l).radius =
;                             IF lumclassg5(l) EQ 'IV' THEN comp_pop(k+i+l).radius =
955f09f4   Ilyes Choubani   Retrieving data f...
3415
                            IF lumclassg5(l) EQ 'V' THEN comp_pop(k+i+l).radius = R_star_MS_g5*rsun2cm;0.977*rsun2cm
dcf48925   Ilyes Choubani   added spectral class
3416
3417
3418
3419
3420
3421
3422
3423
3424
3425
3426
;                             IF lumclassg5(l) EQ 'VI' THEN comp_pop(k+i+l).radius =
;                             IF lumclassg5(l) EQ 'VII' THEN comp_pop(k+i+l).radius =
                        ENDELSE
                        IF countindg5_2[l] NE 0 THEN comp_pop(k+i+l).temperature = (val(indg5_2[l]))(0) ELSE BEGIn
;                             IF lumclassfg5(l) EQ 'IA+' THEN comp_pop(k+i+l).temperature =
;                             IF lumclassfg5(l) EQ 'IA' THEN comp_pop(k+i+l).temperature =
;                             IF lumclassfg5(l) EQ 'IAB' THEN comp_pop(k+i+l).temperature =
;                             IF lumclassfg5(l) EQ 'IB' THEN comp_pop(k+i+l).temperature =
;                             IF lumclassfg5(l) EQ 'II' THEN comp_pop(k+i+l).temperature =
;                             IF lumclassfg5(l) EQ 'III' THEN comp_pop(k+i+l).temperature =
;                             IF lumclassfg5(l) EQ 'IV' THEN comp_pop(k+i+l).temperature =
955f09f4   Ilyes Choubani   Retrieving data f...
3427
                            IF lumclassfg5(l) EQ 'V' THEN comp_pop(k+i+l).temperature = T_eff_MS_g5;5.66e3
dcf48925   Ilyes Choubani   added spectral class
3428
3429
3430
3431
;                             IF lumclassfg5(l) EQ 'VI' THEN comp_pop(k+i+l).temperature =
;                             IF lumclassfg5(l) EQ 'VII' THEN comp_pop(k+i+l).temperature =
                        ENDELSE
                        IF countindg5_3[l] NE 0 THEN comp_pop(k+i+l).distance = (val(indg5_3[l]))(0) ELSE comp_pop(k+i+l).distance = 10.0
f9089dc2   Ilyes Choubani   implementing the ...
3432
                        IF countindg5_4[l] NE 0 THEN comp_pop(k+i+l).nstars = (val(indg5_4[l]))(0) ELSE comp_pop(k+i+l).nstars = 1;stellar_density*(4.*!pi/3)*comp_pop(k+i+l).distance
dcf48925   Ilyes Choubani   added spectral class
3433
3434
3435
                        ;K+=1 
                    ENDFOR 
                    k+=nlmg5       
4750086c   Ilyes Choubani   nouvelle philosph...
3436
3437
3438
3439
                ENDIF
        
                
                IF countindg6 NE 0 THEN BEGIN
dcf48925   Ilyes Choubani   added spectral class
3440
3441
                    FOR l=0L,nlmg6-1 DO BEGIN
                        comp_pop(k+i+l).popid = 'G6'+lumclassg6(l)+'_stellar_population'
858e1c83   Ilyes Choubani   small corrections...
3442
                        IF countindg6_1[l] NE 0 THEN comp_pop(k+i+l).radius = (val(indg6_1[l]))(0)*rsun2cm ELSE BEGIN
dcf48925   Ilyes Choubani   added spectral class
3443
3444
3445
3446
3447
3448
3449
;                             IF lumclassg6(l) EQ 'IA+' THEN comp_pop(k+i+l).radius =
;                             IF lumclassg6(l) EQ 'IA' THEN comp_pop(k+i+l).radius =
;                             IF lumclassg6(l) EQ 'IAB' THEN comp_pop(k+i+l).radius =
;                             IF lumclassg6(l) EQ 'IB' THEN comp_pop(k+i+l).radius =
;                             IF lumclassg6(l) EQ 'II' THEN comp_pop(k+i+l).radius =
;                             IF lumclassg6(l) EQ 'III' THEN comp_pop(k+i+l).radius =
;                             IF lumclassg6(l) EQ 'IV' THEN comp_pop(k+i+l).radius =
955f09f4   Ilyes Choubani   Retrieving data f...
3450
                            IF lumclassg6(l) EQ 'V' THEN comp_pop(k+i+l).radius = R_star_MS_g6*rsun2cm;0.949*rsun2cm
dcf48925   Ilyes Choubani   added spectral class
3451
3452
3453
3454
3455
3456
3457
3458
3459
3460
3461
;                             IF lumclassg6(l) EQ 'VI' THEN comp_pop(k+i+l).radius =
;                             IF lumclassg6(l) EQ 'VII' THEN comp_pop(k+i+l).radius =
                         ENDELSE
                        IF countindg6_2[l] NE 0 THEN comp_pop(k+i+l).temperature = (val(indg6_2[l]))(0) ELSE BEGIN
;                             IF lumclassfg6(l) EQ 'IA+' THEN comp_pop(k+i+l).temperature =
;                             IF lumclassfg6(l) EQ 'IA' THEN comp_pop(k+i+l).temperature =
;                             IF lumclassfg6(l) EQ 'IAB' THEN comp_pop(k+i+l).temperature =
;                             IF lumclassfg6(l) EQ 'IB' THEN comp_pop(k+i+l).temperature =
;                             IF lumclassfg6(l) EQ 'II' THEN comp_pop(k+i+l).temperature =
;                             IF lumclassfg6(l) EQ 'III' THEN comp_pop(k+i+l).temperature =
;                             IF lumclassfg6(l) EQ 'IV' THEN comp_pop(k+i+l).temperature =
955f09f4   Ilyes Choubani   Retrieving data f...
3462
                            IF lumclassfg6(l) EQ 'V' THEN comp_pop(k+i+l).temperature = T_eff_MS_g6;5.6e3
dcf48925   Ilyes Choubani   added spectral class
3463
3464
3465
3466
;                             IF lumclassfg6(l) EQ 'VI' THEN comp_pop(k+i+l).temperature =
;                             IF lumclassfg6(l) EQ 'VII' THEN comp_pop(k+i+l).temperature =
                        ENDELSE
                        IF countindg6_3[l] NE 0 THEN comp_pop(k+i+l).distance = (val(indg6_3[l]))(0) ELSE comp_pop(k+i+l).distance = 10.0
f9089dc2   Ilyes Choubani   implementing the ...
3467
                        IF countindg6_4[l] NE 0 THEN comp_pop(k+i+l).nstars = (val(indg6_4[l]))(0) ELSE comp_pop(k+i+l).nstars = 1;stellar_density*(4.*!pi/3)*comp_pop(k+i+l).distance
dcf48925   Ilyes Choubani   added spectral class
3468
3469
3470
                        ;K+=1 
                    ENDFOR
                    k+=nlmg6         
4750086c   Ilyes Choubani   nouvelle philosph...
3471
3472
3473
3474
                ENDIF
        
                
                IF countindg7 NE 0 THEN BEGIN
dcf48925   Ilyes Choubani   added spectral class
3475
3476
                    FOR l=0L,nlmg7-1 DO BEGIN
                        comp_pop(k+i+l).popid = 'G7'+lumclassg7(l)+'_stellar_population'
858e1c83   Ilyes Choubani   small corrections...
3477
                        IF countindg7_1[l] NE 0 THEN comp_pop(k+i+l).radius = (val(indg7_1[l]))(0)*rsun2cm ELSE BEGIN
dcf48925   Ilyes Choubani   added spectral class
3478
3479
3480
3481
3482
3483
3484
;                             IF lumclassg7(l) EQ 'IA+' THEN comp_pop(k+i+l).radius =
;                             IF lumclassg7(l) EQ 'IA' THEN comp_pop(k+i+l).radius =
;                             IF lumclassg7(l) EQ 'IAB' THEN comp_pop(k+i+l).radius =
;                             IF lumclassg7(l) EQ 'IB' THEN comp_pop(k+i+l).radius =
;                             IF lumclassg7(l) EQ 'II' THEN comp_pop(k+i+l).radius =
;                             IF lumclassg7(l) EQ 'III' THEN comp_pop(k+i+l).radius =
;                             IF lumclassg7(l) EQ 'IV' THEN comp_pop(k+i+l).radius =
955f09f4   Ilyes Choubani   Retrieving data f...
3485
                            IF lumclassg7(l) EQ 'V' THEN comp_pop(k+i+l).radius = R_star_MS_g7*rsun2cm;0.927*rsun2cm
dcf48925   Ilyes Choubani   added spectral class
3486
3487
3488
3489
3490
3491
3492
3493
3494
3495
3496
;                             IF lumclassg7(l) EQ 'VI' THEN comp_pop(k+i+l).radius =
;                             IF lumclassg7(l) EQ 'VII' THEN comp_pop(k+i+l).radius =
                        ENDELSE
                        IF countindg7_2[l] NE 0 THEN comp_pop(k+i+l).temperature = (val(indg7_2[l]))(0) ELSE BEGIN
;                             IF lumclassfg7(l) EQ 'IA+' THEN comp_pop(k+i+l).temperature =
;                             IF lumclassfg7(l) EQ 'IA' THEN comp_pop(k+i+l).temperature =
;                             IF lumclassfg7(l) EQ 'IAB' THEN comp_pop(k+i+l).temperature =
;                             IF lumclassfg7(l) EQ 'IB' THEN comp_pop(k+i+l).temperature =
;                             IF lumclassfg7(l) EQ 'II' THEN comp_pop(k+i+l).temperature =
;                             IF lumclassfg7(l) EQ 'III' THEN comp_pop(k+i+l).temperature =
;                             IF lumclassfg7(l) EQ 'IV' THEN comp_pop(k+i+l).temperature =
955f09f4   Ilyes Choubani   Retrieving data f...
3497
                            IF lumclassfg7(l) EQ 'V' THEN ccomp_pop(k+i+l).temperature = T_eff_MS_g7;5.55e3
dcf48925   Ilyes Choubani   added spectral class
3498
3499
3500
3501
;                             IF lumclassfg7(l) EQ 'VI' THEN comp_pop(k+i+l).temperature =
;                             IF lumclassfg7(l) EQ 'VII' THEN comp_pop(k+i+l).temperature =
                        ENDELSE
                        IF countindg7_3[l] NE 0 THEN comp_pop(k+i+l).distance = (val(indg7_3[l]))(0) ELSE comp_pop(k+i+l).distance = 10.0
f9089dc2   Ilyes Choubani   implementing the ...
3502
                        IF countindg7_4[l] NE 0 THEN comp_pop(k+i+l).nstars = (val(indg7_4[l]))(0) ELSE comp_pop(k+i+l).nstars = 1;stellar_density*(4.*!pi/3)*comp_pop(k+i+l).distance
dcf48925   Ilyes Choubani   added spectral class
3503
3504
3505
                        ;K+=1 
                    ENDFOR 
                    k+=nlmg7     
4750086c   Ilyes Choubani   nouvelle philosph...
3506
3507
3508
3509
                ENDIF
                    
                
                IF countindg8 NE 0 THEN BEGIN
dcf48925   Ilyes Choubani   added spectral class
3510
3511
                    FOR l=0L,nlmg8-1 DO BEGIN
                        comp_pop(k+i+l).popid = 'G8'+lumclassg8(l)+'_stellar_population'
858e1c83   Ilyes Choubani   small corrections...
3512
                        IF countindg8_1[l] NE 0 THEN comp_pop(k+i+l).radius = (val(indg8_1[l]))(0)*rsun2cm ELSE BEGIN
dcf48925   Ilyes Choubani   added spectral class
3513
3514
3515
3516
3517
3518
3519
;                             IF lumclassg8(l) EQ 'IA+' THEN comp_pop(k+i+l).radius =
;                             IF lumclassg8(l) EQ 'IA' THEN comp_pop(k+i+l).radius =
;                             IF lumclassg8(l) EQ 'IAB' THEN comp_pop(k+i+l).radius =
;                             IF lumclassg8(l) EQ 'IB' THEN comp_pop(k+i+l).radius =
;                             IF lumclassg8(l) EQ 'II' THEN comp_pop(k+i+l).radius =
;                             IF lumclassg8(l) EQ 'III' THEN comp_pop(k+i+l).radius =
;                             IF lumclassg8(l) EQ 'IV' THEN comp_pop(k+i+l).radius =
955f09f4   Ilyes Choubani   Retrieving data f...
3520
                            IF lumclassg8(l) EQ 'V' THEN comp_pop(k+i+l).radius = R_star_MS_g8*rsun2cm;0.914*rsun2cm
dcf48925   Ilyes Choubani   added spectral class
3521
3522
3523
3524
3525
3526
3527
3528
3529
3530
3531
;                             IF lumclassg8(l) EQ 'VI' THEN comp_pop(k+i+l).radius =
;                             IF lumclassg8(l) EQ 'VII' THEN comp_pop(k+i+l).radius =
                        ENDELSE
                        IF countindg8_2[l] NE 0 THEN comp_pop(k+i+l).temperature = (val(indg8_2[l]))(0) ELSE BEGIN
;                             IF lumclassfg8(l) EQ 'IA+' THEN comp_pop(k+i+l).temperature =
;                             IF lumclassfg8(l) EQ 'IA' THEN comp_pop(k+i+l).temperature =
;                             IF lumclassfg8(l) EQ 'IAB' THEN comp_pop(k+i+l).temperature =
;                             IF lumclassfg8(l) EQ 'IB' THEN comp_pop(k+i+l).temperature =
;                             IF lumclassfg8(l) EQ 'II' THEN comp_pop(k+i+l).temperature =
;                             IF lumclassfg8(l) EQ 'III' THEN comp_pop(k+i+l).temperature =
;                             IF lumclassfg8(l) EQ 'IV' THEN comp_pop(k+i+l).temperature =
955f09f4   Ilyes Choubani   Retrieving data f...
3532
                            IF lumclassfg8(l) EQ 'V' THEN comp_pop(k+i+l).temperature = T_eff_MS_g8;5.48e3
dcf48925   Ilyes Choubani   added spectral class
3533
3534
3535
3536
;                             IF lumclassfg8(l) EQ 'VI' THEN comp_pop(k+i+l).temperature =
;                             IF lumclassfg8(l) EQ 'VI' THEN comp_pop(k+i+l).temperature =
                        ENDELSE
                        IF countindg8_3[l] NE 0 THEN comp_pop(k+i+l).distance = (val(indg8_3[l]))(0) ELSE comp_pop(k+i+l).distance = 10.0
f9089dc2   Ilyes Choubani   implementing the ...
3537
                        IF countindg8_4[l] NE 0 THEN comp_pop(k+i+l).nstars = (val(indg8_4[l]))(0) ELSE comp_pop(k+i+l).nstars = 1;stellar_density*(4.*!pi/3)*comp_pop(k+i+l).distance
dcf48925   Ilyes Choubani   added spectral class
3538
3539
3540
                        ;K+=1 
                    ENDFOR
                    k+=nlmg8  
4750086c   Ilyes Choubani   nouvelle philosph...
3541
3542
3543
3544
                ENDIF
        
                
                IF countindg9 NE 0 THEN BEGIN
dcf48925   Ilyes Choubani   added spectral class
3545
3546
                    FOR l=0L,nlmg9-1 DO BEGIN
                        comp_pop(k+i+l).popid = 'G9'+lumclassg9(l)+'_stellar_population'
858e1c83   Ilyes Choubani   small corrections...
3547
                        IF countindg9_1[l] NE 0 THEN comp_pop(k+i+l).radius = (val(indg9_1[l]))(0)*rsun2cm ELSE BEGIN
dcf48925   Ilyes Choubani   added spectral class
3548
3549
3550
3551
3552
3553
3554
;                             IF lumclassg9(l) EQ 'IA+' THEN comp_pop(k+i+l).radius =
;                             IF lumclassg9(l) EQ 'IA' THEN comp_pop(k+i+l).radius =
;                             IF lumclassg9(l) EQ 'IAB' THEN comp_pop(k+i+l).radius =
;                             IF lumclassg9(l) EQ 'IB' THEN comp_pop(k+i+l).radius =
;                             IF lumclassg9(l) EQ 'II' THEN comp_pop(k+i+l).radius =
;                             IF lumclassg9(l) EQ 'III' THEN comp_pop(k+i+l).radius =
;                             IF lumclassg9(l) EQ 'IV' THEN comp_pop(k+i+l).radius =
955f09f4   Ilyes Choubani   Retrieving data f...
3555
                            IF lumclassg9(l) EQ 'V' THEN comp_pop(k+i+l).radius = R_star_MS_g9*rsun2cm;0.853*rsun2cm
dcf48925   Ilyes Choubani   added spectral class
3556
3557
3558
3559
3560
3561
3562
3563
3564
3565
3566
;                             IF lumclassg9(l) EQ 'VI' THEN comp_pop(k+i+l).radius =
;                             IF lumclassg9(l) EQ 'VII' THEN comp_pop(k+i+l).radius =
                        ENDELSE
                        IF countindg9_2[l] NE 0 THEN comp_pop(k+i+l).temperature = (val(indg9_2[l]))(0) ELSE BEGIN
;                             IF lumclassfg9(l) EQ 'IA+' THEN comp_pop(k+i+l).temperature =
;                             IF lumclassfg9(l) EQ 'IA' THEN comp_pop(k+i+l).temperature =
;                             IF lumclassfg9(l) EQ 'IAB' THEN comp_pop(k+i+l).temperature =
;                             IF lumclassfg9(l) EQ 'IB' THEN comp_pop(k+i+l).temperature =
;                             IF lumclassfg9(l) EQ 'II' THEN comp_pop(k+i+l).temperature =
;                             IF lumclassfg9(l) EQ 'III' THEN comp_pop(k+i+l).temperature =
;                             IF lumclassfg9(l) EQ 'IV' THEN comp_pop(k+i+l).temperature =
955f09f4   Ilyes Choubani   Retrieving data f...
3567
                            IF lumclassfg9(l) EQ 'V' THEN comp_pop(k+i+l).temperature = T_eff_MS_g9;5.38e3
dcf48925   Ilyes Choubani   added spectral class
3568
3569
3570
3571
;                             IF lumclassfg9(l) EQ 'VI' THEN comp_pop(k+i+l).temperature =
;                             IF lumclassfg9(l) EQ 'VII' THEN comp_pop(k+i+l).temperature =
                        ENDELSE
                        IF countindg9_3[l] NE 0 THEN comp_pop(k+i+l).distance = (val(indg9_3[l]))(0) ELSE comp_pop(k+i+l).distance = 10.0
f9089dc2   Ilyes Choubani   implementing the ...
3572
                        IF countindg9_4[l] NE 0 THEN comp_pop(k+i+l).nstars = (val(indg9_4[l]))(0) ELSE comp_pop(k+i+l).nstars = 1;stellar_density*(4.*!pi/3)*comp_pop(k+i+l).distance 
dcf48925   Ilyes Choubani   added spectral class
3573
3574
3575
                        ;K+=1 
                    ENDFOR 
                    k+=nlmg9 
4750086c   Ilyes Choubani   nouvelle philosph...
3576
3577
3578
3579
3580
3581
3582
                ENDIF
           
            ENDFOR
    
            countg=0.  
        i+=k-1
        ENDIF 
dcf48925   Ilyes Choubani   added spectral class
3583
 
4750086c   Ilyes Choubani   nouvelle philosph...
3584
3585
3586
3587
    
    ;==============================================================================================    
    
    ENDFOR
4750086c   Ilyes Choubani   nouvelle philosph...
3588

19e26da9   Ilyes Choubani   corrected stellar...
3589
st=((*!dustem_params).isrf)
f9089dc2   Ilyes Choubani   implementing the ...
3590

dcf48925   Ilyes Choubani   added spectral class
3591
3592
3593
3594
3595
3596
3597
c2a = 3e18 ;speed of light in ansgtroms/s (because of the Astron's PLANCK function)
pc2cm = 3.086e18 ;cm (cgs)

wave_angstrom = st.lambisrf*1.e4 ;mic to Angstrom (Astron Planck's function uses wavelengths in Angstroms)

stellar_component=fltarr(n_elements(st)) ; array of zeros to contain the new ISRF values. 

dcf48925   Ilyes Choubani   added spectral class
3598
FOR i=0L,n_elements(comp_pop.popid)-1 DO BEGIN ; Looping over all the stellar populations
3ff9cac3   Ilyes Choubani   general update
3599
     
dcf48925   Ilyes Choubani   added spectral class
3600
3601
    omega =  ((comp_pop.radius)[i]/((comp_pop.distance)[i]*pc2cm))^2 ; Dilution factor of a stellar population
        
3ff9cac3   Ilyes Choubani   general update
3602
    Inu = planck(wave_angstrom,(comp_pop.temperature)[i])*(wave_angstrom)^2/c2a ; ergs/cm2/s/Hz/sr
dcf48925   Ilyes Choubani   added spectral class
3603
    
3d0f6b67   Ilyes Choubani   rest of plotting ...
3604
3605
3606
3607
3608
3609
3610
3611
3612
3613
3614
3615
3616
3617
3618
3619
3620
3621
3622
3623
3624
3625
3626
3627
3628
3629
3630
3631
3632
;     ;THIS PART IS ONLY FOR ORION. 
;     ;IT SHOULD NOT BE PROVIDED IN THE RELEASE 
;     if isa(!dustem_current) then begin
;     
;         idff = where(tag_names(*!dustem_plugin) EQ 'FREEFREE',ct_ff)
;     
;         if ct_ff ne 0 then begin
;     
;         ;look for freefree temperature in the pd vector (sysvar)
;         ;we need an index
;     
;         id_fftmp = where(strupcase(strmid((*(*!dustem_fit).param_descs),14)) EQ 'FREEFREE_1',ct_fftmp)
;         if ct_fftmp ne 0 then Te = ((*(*!dustem_fit).current_param_values)[id_fftmp])[0]*(((*(*!dustem_fit).param_init_values))[id_fftmp])[0]
;            ; test if Te is correct
;     
;         Beta2 = 2.e-10*(Te)^(-3/4) ;cm^3/s-1
;         Rs_p3 = 1.1355d+57 ;Rs^3 for orion nebula
;         nH_stromgren = sqrt(Rs_p3*4*!pi*Beta2/(3*(!const.sigma)*1.0d-04*((comp_pop.temperature)[i])^4*!pi))
;     
;     
;         Inu *= exp(((*!dustem_current).ext.ext_tot)*(-nh_stromgren)*4/3*Rs_p3^(1/3)/1.0d21)
;     
;            
;         endif
;     
;     ENDIF
    
    
    If !dustem_dim and isa(!dustem_current) then Inu *= exp(((*!dustem_current).ext.ext_tot)*(-(*!dustem_HCD))/1.0d21)
955f09f4   Ilyes Choubani   Retrieving data f...
3633
    
955f09f4   Ilyes Choubani   Retrieving data f...
3634
    
858e1c83   Ilyes Choubani   small corrections...
3635
    stellar_component=stellar_component+(comp_pop.nstars)[i]*omega*Inu 
dcf48925   Ilyes Choubani   added spectral class
3636
    
dcf48925   Ilyes Choubani   added spectral class
3637

dcf48925   Ilyes Choubani   added spectral class
3638
ENDFOR
f9089dc2   Ilyes Choubani   implementing the ...
3639
out = stellar_component
19e26da9   Ilyes Choubani   corrected stellar...
3640
3641
;============This block creates a composite (9V) stellar population structure for when the function isn't used as a plugin=================== 
ENDIF ELSE BEGIN 
19e26da9   Ilyes Choubani   corrected stellar...
3642
3643
3644
    
    popnumber = 5.
    comp_pop = replicate(one_pop,popnumber)
f9089dc2   Ilyes Choubani   implementing the ...
3645
    stellar_density = 0.14 ;stars/pc^3
19e26da9   Ilyes Choubani   corrected stellar...
3646
3647
3648
3649
3650
3651
3652
3653
3654
3655
3656
3657
3658
3659
3660
3661
3662
3663
3664
3665
3666
3667
3668
3669
3670
3671
3672
3673
3674
3675
3676
3677
3678
3679
3680
3681
3682
3683
3684
3685
3686
3687
    
    ;###BY DEFAULT ALL STELLAR POPULATIONS ARE ON THE MS###
    ;BECAUSE LESS MASSIVE (COLDER) STARS ARE MORE ABUNDANT, THEY WILL BE CHOSEN TO BUILD THE COMPOSITE STELLAR STRUCTURE
    ;THIS MEANS THAT THE CHOSEN SPECTRAL TYPE IS 9V (MAIN SEQUENCE)

    ;CHOSEN STELLAR POPULATIONS
    ;O9V
    ;B9V
    ;A9V
    ;F9V
    ;G9V
    
    comp_pop(0).popid = 'O9V_stellar_population'
    comp_pop(0).radius = 7.51*rsun2cm 
    comp_pop(0).temperature = 33.3e3
    comp_pop(0).distance = 10.0
    comp_pop(0).nstars = stellar_density*(4.*!pi/3)*comp_pop(0).distance
    
    comp_pop(1).popid = 'B9V_stellar_population'
    comp_pop(1).radius = 2.49*rsun2cm  
    comp_pop(1).temperature = 10.7e3 
    comp_pop(1).distance = 10.0
    comp_pop(1).nstars = stellar_density*(4.*!pi/3)*comp_pop(1).distance
    
    comp_pop(2).popid = 'A9V_stellar_population'
    comp_pop(2).radius = 1.747*rsun2cm
    comp_pop(2).temperature = 7.4e3
    comp_pop(2).distance = 10.0
    comp_pop(2).nstars = stellar_density*(4.*!pi/3)*comp_pop(2).distance
    
    comp_pop(3).popid = 'F9V_stellar_population'
    comp_pop(3).radius = 1.167*rsun2cm
    comp_pop(3).temperature = 6.05e3
    comp_pop(3).distance = 10.0
    comp_pop(3).nstars = stellar_density*(4.*!pi/3)*comp_pop(3).distance
    
    comp_pop(4).popid = 'G9V_stellar_population'
    comp_pop(4).radius = 0.853*rsun2cm 
    comp_pop(4).temperature = 5.38e3
    comp_pop(4).distance = 10.0
    comp_pop(4).nstars = stellar_density*(4.*!pi/3)*comp_pop(4).distance
    
f9089dc2   Ilyes Choubani   implementing the ...
3688
    st=((*!dustem_params).isrf)
19e26da9   Ilyes Choubani   corrected stellar...
3689

f9089dc2   Ilyes Choubani   implementing the ...
3690
3691
    c2a = 3e18 ;speed of light in ansgtroms/s (because of the Astron's PLANCK function)
    pc2cm = 3.086e18 ;cm (cgs)
b0cabd3c   Ilyes Choubani   general update
3692

f9089dc2   Ilyes Choubani   implementing the ...
3693
    wave_angstrom = st.lambisrf*1.e4 ;mic to Angstrom (Astron Planck's function uses wavelengths in Angstroms)
b0cabd3c   Ilyes Choubani   general update
3694

f9089dc2   Ilyes Choubani   implementing the ...
3695
    stellar_component=fltarr(n_elements(st)) ; array of zeros to contain the new ISRF values. 
266ae799   Ilyes Choubani   General update
3696

f9089dc2   Ilyes Choubani   implementing the ...
3697
3698
3699
3700
3701
3702
3703
3704
3705
3706
3707
    FOR i=0L,n_elements(comp_pop.popid)-1 DO BEGIN ; Looping over all the stellar populations
         
        omega =  ((comp_pop.radius)[i]/((comp_pop.distance)[i]*pc2cm))^2 ; Dilution factor of a stellar population
            
        Inu = 4*planck(wave_angstrom,(comp_pop.temperature)[i])*(wave_angstrom)^2/c2a ; ergs/cm2/s/Hz/sr ;*4 and not using Lambert's cosine law
        
        stellar_component=stellar_component+(comp_pop.nstars)[i]*omega*Inu 
        
    ENDFOR
    
    out = stellar_component
266ae799   Ilyes Choubani   General update
3708

f9089dc2   Ilyes Choubani   implementing the ...
3709
3710
3711
ENDELSE
  
the_scope:
91e991b5   Ilyes Choubani   Applying correcti...
3712
scope='STELLAR_POPULATION'
f9089dc2   Ilyes Choubani   implementing the ...
3713
the_paramtag:
91e991b5   Ilyes Choubani   Applying correcti...
3714
paramtag=['R_star (R_sol)','T_BB (K)','D (pc)','N_stars']
f9089dc2   Ilyes Choubani   implementing the ...
3715
the_end:
19e26da9   Ilyes Choubani   corrected stellar...
3716
return, out
97d9335d   Annie Hughes   moved location of...
3717
end