Blame view

src/idl/dustem_plot_fit_sed.pro 11 KB
452c334e   Ilyes Choubani   Implementation Of...
1
2
 PRO dustem_plot_fit_sed,st,sed, $
                         res=res,errors=errors,chi2=chi2,rchi2=rchi2, $
4750086c   Ilyes Choubani   nouvelle philosph...
3
                         no_spec_error=no_spec_error,title=title, $
452c334e   Ilyes Choubani   Implementation Of...
4
5
6
                         help=help,win=win,ps=ps, $
                         legend_xpos=legend_xpos,legend_ypos=legend_ypos,legend_offset=legend_offset, $
                         _extra=_extra
427f1205   Jean-Michel Glorian   version 4.2 merged
7

427f1205   Jean-Michel Glorian   version 4.2 merged
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
; NAME:
;    dustem_plot_fit_sed
; PURPOSE:
;    Plots a Dustem model and SED. Parameter values and error are
;    printed on plot. Used for plotting results during fit.
; CATEGORY:
;    Dustem
; CALLING SEQUENCE:
;    dustem_plot_fit_sed,st,sed,cont[,/no_spec_error][,res=][,errors=][,chi2=][,rchi2=][/help][_extra=]
; INPUTS:
;    st        = Dustem model output structure
;    sed       = Dustem model SED
;    cont      = Dustem model NIR continuum
; OPTIONAL INPUT PARAMETERS:
;    res       = fit result values. If set values are written on plot.
;    errors    = fit result errors. If set values are written on plot.
;    chi2      = fit chi^2. if set value is written on plot.
;    rchi2     = Reduced fit chi^2. if set value is written on plot.
;    _extra    = extra parameters for the plot routine
; OUTPUTS:
;    None
; OPTIONAL OUTPUT PARAMETERS:
;    None
; ACCEPTED KEY-WORDS:
;    help      = If set, print this help
; COMMON BLOCKS:
;    None
; SIDE EFFECTS:
;    SED and model are plotted
; RESTRICTIONS:
;    The dustem idl wrapper must be installed
; PROCEDURE:
;    None
; EXAMPLES
;    dustem_plot_fit_sed,st,sed,cont
; MODIFICATION HISTORY:
;    Written by J.-Ph. Bernard
;    see evolution details on the dustem cvs maintained at CESR
;    Contact J.-Ph. Bernard (Jean-Philippe.Bernard@cesr.fr) in case of problems.
;-

9ccf7615   Jean-Philippe Bernard   modified to fit u...
49
50
;stop

427f1205   Jean-Michel Glorian   version 4.2 merged
51
52
53
54
55
IF keyword_set(help) THEN BEGIN
  doc_library,'dustem_plot_fit_sed'
  goto,the_end
ENDIF

9ccf7615   Jean-Philippe Bernard   modified to fit u...
56
IF keyword_set(ps) THEN BEGIN
452c334e   Ilyes Choubani   Implementation Of...
57
58
59
    set_plot, 'PS'
    device, filename=ps, /color, /encapsulated
ENDIF ELSE BEGIN
4750086c   Ilyes Choubani   nouvelle philosph...
60

452c334e   Ilyes Choubani   Implementation Of...
61
62
63
  set_plot,'X'
    IF keyword_set(win) then window,win
ENDELSE
427f1205   Jean-Michel Glorian   version 4.2 merged
64
65
66

fact = 1.e4*1.E20/(4.*!pi)/(3.e8/1.e-6/st.sed.wav)*1.e20/1.e7

9ccf7615   Jean-Philippe Bernard   modified to fit u...
67
68
69
;use_col_data_filt=70
;use_col_sed_spec=170
use_col_data_filt='blue'
9be94157   Jean-Philippe Bernard   improved
70
71
;use_col_sed_spec='red'
use_col_sed_spec='grey'
427f1205   Jean-Michel Glorian   version 4.2 merged
72
IF not keyword_set(col_sed) THEN BEGIN
9ccf7615   Jean-Philippe Bernard   modified to fit u...
73
74
  ;use_col_sed_filt=250     ;red
  use_col_sed_filt='red'     ;red
427f1205   Jean-Michel Glorian   version 4.2 merged
75
76
77
78
ENDIF ELSE BEGIN
  use_col_sed_filt=col_sed
ENDELSE
IF not keyword_set(col_tot) THEN BEGIN
9ccf7615   Jean-Philippe Bernard   modified to fit u...
79
80
  ;use_col_tot=200
  use_col_tot='black'
427f1205   Jean-Michel Glorian   version 4.2 merged
81
82
83
84
85
86
87
88
ENDIF ELSE BEGIN
  use_col_tot=col_tot
ENDELSE
IF not keyword_set(line_tot) THEN BEGIN
  use_line_tot=0
ENDIF ELSE BEGIN
  use_line_tot=line_tot
ENDELSE
427f1205   Jean-Michel Glorian   version 4.2 merged
89

452c334e   Ilyes Choubani   Implementation Of...
90

427f1205   Jean-Michel Glorian   version 4.2 merged
91
spec = st.sed.em_tot * fact
452c334e   Ilyes Choubani   Implementation Of...
92
93
94

;ADDING PLUGIN(S) TO SPECTRUM----------------
;if n_tags(!dustem_data.sed) gt 1 then begin 
79991f38   Jean-Philippe Bernard   fixed for whan sc...
95
96
97
98
99
100
scopes=tag_names((*!dustem_scope))
IF scopes[0] NE 'NONE' THEN BEGIN
  FOR i=0L,n_tags(*!dustem_scope)-1 DO BEGIN
    IF total(strsplit((*(*!dustem_scope).(i)),'+',/extract) EQ 'ADD_SED') THEN spec+=(*(*!dustem_plugin).(i))[*,0]
  ENDFOR
ENDIF
452c334e   Ilyes Choubani   Implementation Of...
101
102
;endif
;------------------------------------------
427f1205   Jean-Michel Glorian   version 4.2 merged
103

6730c3f8   Jean-Philippe Bernard   modified to be co...
104
105
;stop

427f1205   Jean-Michel Glorian   version 4.2 merged
106
107
;use_cols=[use_col_pah,use_col_vsg,use_col_bg,use_col_cont]
;use_lines=[use_line_pah,use_line_vsg,use_line_bg,use_line_cont]
4750086c   Ilyes Choubani   nouvelle philosph...
108
;col_off=30
6730c3f8   Jean-Philippe Bernard   modified to be co...
109
110
;Ngrains=(*!dustem_params).grain.Ngrains
Ngrains=(*!dustem_params).Ngrains
9ccf7615   Jean-Philippe Bernard   modified to fit u...
111
112
;use_cols=long(findgen(Ngrains)/(Ngrains-1)*(255-col_off)+col_off)
use_cols=dustem_grains_colors(Ngrains,/cgplot)
9ccf7615   Jean-Philippe Bernard   modified to fit u...
113
114
115
116
use_lines=replicate(0,Ngrains)

norm = sed * 0. + 1

4750086c   Ilyes Choubani   nouvelle philosph...
117
xr=[1,6e4]
607060e5   Ilyes Choubani   test version
118
yr=[1e-7,5e3]
452c334e   Ilyes Choubani   Implementation Of...
119

389a2b1d   Jean-Philippe Bernard   improved
120
;====== PLOT THE SED
4750086c   Ilyes Choubani   nouvelle philosph...
121
122
123
124
125

IF keyword_set(title) THEN title = title ELSE title = 'Spectral Energy Distribution (Running)'

;deffo define a title variable here. The procedures are not communicating with each other. 

1fa79b40   Jean-Philippe Bernard   added back passin...
126
127
;cgplot,(*!dustem_data.sed).wav,(*!dustem_data.sed).values/norm,/nodata,xtit='',ytit=textoidl('Brightness/N_H (MJy/sr/H)'),tit=title,ylog=1,/xlog,xr=xr,yr=yr,/ys,/xs,position=[0.12,0.35,0.96,0.90],xtickformat='(A1)'
cgplot,(*!dustem_data.sed).wav,(*!dustem_data.sed).values/norm,/nodata,xtit='',ytit=textoidl('Brightness/N_H (MJy/sr/H)'),tit=title,ylog=1,/xlog,/ys,/xs,position=[0.12,0.35,0.96,0.90],xtickformat='(A1)',_extra=_extra
452c334e   Ilyes Choubani   Implementation Of...
128
129
130
131
132
133
134


;cgplot,st.polsed.wav,Q_sed*fact,xtit='',ytit=ytitstq,tit=titstq,ylog=ylog,/xlog,xr=xr,yr=yr,/ys,/xs,position=[0.17,0.35,0.95,0.95],xtickformat='(A1)'

;this is where you will add the normalized sed


427f1205   Jean-Michel Glorian   version 4.2 merged
135
136
137
138
139
ind_filt=where((*!dustem_data.sed).filt_names NE 'SPECTRUM',count_filt)
ind_spec=where((*!dustem_data.sed).filt_names EQ 'SPECTRUM',count_spec)
;=== Plot the data
IF count_spec NE 0 THEN BEGIN
  plotsym,0,/fill
9ccf7615   Jean-Philippe Bernard   modified to fit u...
140
141
142
  xx=((*!dustem_data.sed).wav)[ind_spec]
  yy=((*!dustem_data.sed).values)[ind_spec]/norm[ind_spec]
  rms=3.*((*!dustem_data.sed).sigma)[ind_spec]/2./norm[ind_spec]
452c334e   Ilyes Choubani   Implementation Of...
143
  cgoplot,xx,yy,psym=8,syms=0.5,color=use_col_sed_spec
427f1205   Jean-Michel Glorian   version 4.2 merged
144
  IF not keyword_set(no_spec_error) THEN BEGIN
9be94157   Jean-Philippe Bernard   improved
145
    cgerrplot,xx,yy-rms,yy+rms,color=use_col_sed_spec
9ccf7615   Jean-Philippe Bernard   modified to fit u...
146
    ;err_bar,((*!dustem_data.sed).wav)(ind_spec),((*!dustem_data.sed).values)(ind_spec)/norm(ind_spec),yrms=3.*((*!dustem_data.sed).sigma)(ind_spec)/2./norm(ind_spec)
427f1205   Jean-Michel Glorian   version 4.2 merged
147
148
149
  ENDIF
ENDIF
IF count_filt NE 0 THEN BEGIN
b5ccb706   Jean-Philippe Bernard   improved to fit p...
150
  ;stop
9ccf7615   Jean-Philippe Bernard   modified to fit u...
151
152
153
  xx=((*!dustem_data.sed).wav)[ind_filt]
  yy=((*!dustem_data.sed).values)[ind_filt]/norm[ind_filt]
  rms=3.*((*!dustem_data.sed).sigma)[ind_filt]/2./norm[ind_filt]
427f1205   Jean-Michel Glorian   version 4.2 merged
154
  plotsym,0,/fill
452c334e   Ilyes Choubani   Implementation Of...
155
  cgoplot,xx,yy,psym=8,color='Dodger Blue';use_col_data_filt
9ccf7615   Jean-Philippe Bernard   modified to fit u...
156
  ;err_bar,((*!dustem_data.sed).wav)(ind_filt),((*!dustem_data.sed).values)(ind_filt)/norm(ind_filt),yrms=3.*((*!dustem_data.sed).sigma)(ind_filt)/2./norm(ind_filt),color=use_col_data_filt
452c334e   Ilyes Choubani   Implementation Of...
157
  cgerrplot,xx,yy-rms,yy+rms,color='Dodger Blue';use_col_data_filt
427f1205   Jean-Michel Glorian   version 4.2 merged
158
159
160
161
ENDIF
;=== Plot the computed SED
IF count_filt NE 0 THEN BEGIN
  plotsym,8
9ccf7615   Jean-Philippe Bernard   modified to fit u...
162
163
164
  xx=((*!dustem_data.sed).wav)[ind_filt]
  yy=sed[ind_filt]/norm[ind_filt]
  cgoplot,xx,yy,color=use_col_sed_filt,psym=8,syms=2
427f1205   Jean-Michel Glorian   version 4.2 merged
165
166
167
ENDIF
IF count_spec NE 0 THEN BEGIN
  plotsym,0
9ccf7615   Jean-Philippe Bernard   modified to fit u...
168
169
170
  xx=((*!dustem_data.sed).wav)[ind_spec]
  yy=sed[ind_spec]/norm[ind_spec]
  cgoplot,xx,yy,color=use_col_sed_spec,psym=8,syms=0.5
427f1205   Jean-Michel Glorian   version 4.2 merged
171
172
173
ENDIF


9ccf7615   Jean-Philippe Bernard   modified to fit u...
174
IF !dustem_show_plot EQ 2 THEN BEGIN
427f1205   Jean-Michel Glorian   version 4.2 merged
175
	norm = spec
9ccf7615   Jean-Philippe Bernard   modified to fit u...
176
ENDIF ELSE BEGIN
427f1205   Jean-Michel Glorian   version 4.2 merged
177
	norm = spec * 0. + 1
9ccf7615   Jean-Philippe Bernard   modified to fit u...
178
ENDELSE
427f1205   Jean-Michel Glorian   version 4.2 merged
179
FOR i=0L,Ngrains-1 DO BEGIN
9ccf7615   Jean-Philippe Bernard   modified to fit u...
180
  cgoplot,st.sed.wav,st.sed.(i+1)*fact/norm,color=use_cols[i],linestyle=use_lines[i]
427f1205   Jean-Michel Glorian   version 4.2 merged
181
ENDFOR
452c334e   Ilyes Choubani   Implementation Of...
182

1fa79b40   Jean-Philippe Bernard   added back passin...
183
;stop
452c334e   Ilyes Choubani   Implementation Of...
184
185
186

;PLOTTING OF THE PLUGIN(S)---------------
IF tag_exist(*!dustem_scope,'CONTINUUM') THEN BEGIN
4fd64cbb   Ilyes Choubani   dustem_fit_sed_po...
187
  cgoplot,st.sed.wav,(*(*!dustem_plugin).continuum)[*,0],color='Navy',linestyle=3
427f1205   Jean-Michel Glorian   version 4.2 merged
188
ENDIF
4750086c   Ilyes Choubani   nouvelle philosph...
189
IF tag_exist(*!dustem_scope,'FREEFREE') THEN BEGIN
4fd64cbb   Ilyes Choubani   dustem_fit_sed_po...
190
  cgoplot,st.sed.wav,(*(*!dustem_plugin).freefree)[*,0],color='Dark Red',linestyle=3
b5ccb706   Jean-Philippe Bernard   improved to fit p...
191
ENDIF
452c334e   Ilyes Choubani   Implementation Of...
192
IF tag_exist(*!dustem_scope,'SYNCHROTRON') THEN BEGIN
4fd64cbb   Ilyes Choubani   dustem_fit_sed_po...
193
  cgoplot,st.sed.wav,(*(*!dustem_plugin).synchrotron)[*,0],color='Crimson',linestyle=3
b5ccb706   Jean-Philippe Bernard   improved to fit p...
194
ENDIF
452c334e   Ilyes Choubani   Implementation Of...
195

9ccf7615   Jean-Philippe Bernard   modified to fit u...
196
cgoplot,st.sed.wav,spec/norm,color=use_col_tot,linestyle=use_line_tot
452c334e   Ilyes Choubani   Implementation Of...
197
198
;plot the normalized data as well. 
;----------------------------------------
427f1205   Jean-Michel Glorian   version 4.2 merged
199

9ccf7615   Jean-Philippe Bernard   modified to fit u...
200
;==== print the legend
607060e5   Ilyes Choubani   test version
201
frmt0='(A40)'
427f1205   Jean-Michel Glorian   version 4.2 merged
202
203
frmt1='(1E10.2)'
frmt2='(F7.2)'
4750086c   Ilyes Choubani   nouvelle philosph...
204
205
use_legend_xpos=0.50
use_legend_ypos=0.84
9be94157   Jean-Philippe Bernard   improved
206
use_legend_offset=0.03             ;This is the offset between lines of the legend in normalized units
4750086c   Ilyes Choubani   nouvelle philosph...
207
208
209
210
legend_charsize=0.86

k=0.

b5ccb706   Jean-Philippe Bernard   improved to fit p...
211
212
IF keyword_set(legend_xpos) THEN use_legend_xpos=legend_xpos
IF keyword_set(legend_ypos) THEN use_legend_ypos=legend_ypos
9be94157   Jean-Philippe Bernard   improved
213
IF keyword_set(legend_offset) THEN use_legend_offset=legend_offset
b5ccb706   Jean-Philippe Bernard   improved to fit p...
214

1a808a22   Jean-Philippe Bernard   improved
215
IF !d.name NE 'PS' THEN cleanplot
427f1205   Jean-Michel Glorian   version 4.2 merged
216
IF keyword_set(res) THEN BEGIN
427f1205   Jean-Michel Glorian   version 4.2 merged
217
  Npar=n_elements(res)
7609fcde   Jean-Philippe Bernard   improved on crazy...
218
  ;print,'=============='
427f1205   Jean-Michel Glorian   version 4.2 merged
219
  FOR i=0L,Npar-1 DO BEGIN
7609fcde   Jean-Philippe Bernard   improved on crazy...
220
221
    parameter_description=(*(*!dustem_fit).param_descs)[i]
    parameter_type=dustem_parameter_description2type(parameter_description,string_name=string_name)
4750086c   Ilyes Choubani   nouvelle philosph...
222
    str=string(string_name+' = ',format=frmt0)+string(res[i],format=frmt1)
7609fcde   Jean-Philippe Bernard   improved on crazy...
223
    IF keyword_set(errors) THEN BEGIN
4750086c   Ilyes Choubani   nouvelle philosph...
224
      str=str+textoidl(' \pm ')+string(errors(i),format=frmt1)
9be94157   Jean-Philippe Bernard   improved
225
    ENDIF
452c334e   Ilyes Choubani   Implementation Of...
226
227
   
    if STRUPCASE(strmid(strtrim(parameter_description,2),0,6)) eq 'DUSTEM' then begin
4750086c   Ilyes Choubani   nouvelle philosph...
228
229
230
231
232
233
    xxpos=use_legend_xpos*0.07
    yypos=use_legend_ypos*0.03
    xyouts,xxpos,yypos,'Model: '+!dustem_model,color=0,/normal,charsize=legend_charsize
    xxpos=use_legend_xpos*0.7
    yypos=use_legend_ypos*1.03
    xyouts,xxpos,yypos,'--Plugins--',color=0,/normal,charsize=legend_charsize
452c334e   Ilyes Choubani   Implementation Of...
234
    yypos=use_legend_ypos-(i-k)*use_legend_offset 
4750086c   Ilyes Choubani   nouvelle philosph...
235
236
    xxpos=use_legend_xpos*0.26
    ii = strsplit(string_name,'_',count=countx) & ii = ii(countx-1)-1 ; Locating the last underscore to automate the extraction of the plugin's keyword
607060e5   Ilyes Choubani   test version
237
    str=string(strmid(string_name,7,ii-7)+' ('+strmid(string_name,ii+1)+') '+' = ',format=frmt0)+string(res[i],format=frmt1)
4750086c   Ilyes Choubani   nouvelle philosph...
238
239
240
241
242
243
    

     IF keyword_set(errors) THEN BEGIN
       str=str+textoidl(' \pm ')+string(errors(i),format=frmt1)
     ENDIF
    xyouts,xxpos,yypos,str,color=0,/normal,charsize=legend_charsize
452c334e   Ilyes Choubani   Implementation Of...
244
    endif else begin
4750086c   Ilyes Choubani   nouvelle philosph...
245
246
247
248
249
250
251
252
    k+=1
    xxpos=use_legend_xpos*1.5
    yypos=use_legend_ypos*1.03
    xyouts,xxpos,yypos,'--Parameters--',color=0,/normal,charsize=legend_charsize
    yypos=use_legend_ypos-(i)*use_legend_offset 
    xxpos=use_legend_xpos*1.03
    xyouts,xxpos,yypos,str,color=0,/normal,charsize=legend_charsize    
    
452c334e   Ilyes Choubani   Implementation Of...
253
    endelse
427f1205   Jean-Michel Glorian   version 4.2 merged
254
  ENDFOR
7609fcde   Jean-Philippe Bernard   improved on crazy...
255
  ;stop
427f1205   Jean-Michel Glorian   version 4.2 merged
256
257
ENDIF
IF keyword_set(chi2) THEN BEGIN
4750086c   Ilyes Choubani   nouvelle philosph...
258
259
  xxpos=1.36*use_legend_xpos
  yypos=1.13*use_legend_ypos
452c334e   Ilyes Choubani   Implementation Of...
260
  xyouts,xxpos,yypos,string('chi2=',format=frmt0)+string(chi2,format=frmt2),color=0,/normal,charsize=legend_charsize
427f1205   Jean-Michel Glorian   version 4.2 merged
261
262
ENDIF
IF keyword_set(rchi2) THEN BEGIN
4750086c   Ilyes Choubani   nouvelle philosph...
263
264
  xxpos=1.36*use_legend_xpos
  yypos=1.13*use_legend_ypos-use_legend_offset
452c334e   Ilyes Choubani   Implementation Of...
265
  xyouts,xxpos,yypos,string('red. chi2=',format=frmt0)+string(rchi2,format=frmt2),color=0,/normal,charsize=legend_charsize
427f1205   Jean-Michel Glorian   version 4.2 merged
266
267
ENDIF

452c334e   Ilyes Choubani   Implementation Of...
268
xtit=textoidl('\lambda (\mum)')
8a88c1a3   Jean-Philippe Bernard   can't remember wh...
269
270
271
272
273
274
275
276
277
;cgplot,(*!dustem_data.sed).wav,(*!dustem_data.sed).values/sed,/nodata,xtit=xtit,ytit='Normalized',tit='',/xlog,xr=xr,/ys,/xs,yr=[0,2],ylog=0,position=[0.12,0.14,0.96,0.35],/noerase,yticks=2,ymino=2,xticklen=0.1
;stop
IF keyword_set(_extra) THEN BEGIN
  extra_kept={XRANGE:[0.,0.]}
  extra_tags=tag_names(_extra)
  ind=where(extra_tags EQ 'XRANGE',count)
  IF count NE 0 THEN extra_kept.XRANGE=_extra.(ind[0]) ;ELSE extra_kept=0
ENDIF
cgplot,(*!dustem_data.sed).wav,(*!dustem_data.sed).values/sed,_extra=extra_kept,/nodata,xtit=xtit,ytit='Normalized',tit='',/xlog,/ys,/xs,yr=[0,2],ylog=0,position=[0.12,0.14,0.96,0.35],/noerase,yticks=2,ymino=2,xticklen=0.1
452c334e   Ilyes Choubani   Implementation Of...
278
;plot the normalized data as well. 
7f2710c1   Jean-Philippe Bernard   modified to match...
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
IF count_spec NE 0 THEN BEGIN
  xx=((*!dustem_data.sed).wav)[ind_spec]
  yy=((*!dustem_data.sed).values/sed)[ind_spec]
  cgoplot,xx,yy,psym=16,symsize=1,thick=2,color=use_col_sed_spec
  trois_sigma=(3.*((*!dustem_data.sed).sigma)/2./sed)[ind_spec]
  cgerrplot,xx,yy-trois_sigma,yy+trois_sigma,color=use_col_sed_spec
ENDIF
IF count_filt NE 0 THEN BEGIN
  xx=((*!dustem_data.sed).wav)[ind_filt]
  yy=((*!dustem_data.sed).values/sed)[ind_filt]
  cgoplot,xx,yy,psym=16,symsize=1,thick=2,color='Dodger Blue'
  trois_sigma=(3.*((*!dustem_data.sed).sigma)/2./sed)[ind_filt]
  cgerrplot,xx,yy-trois_sigma,yy+trois_sigma,color='Dodger Blue'
ENDIF
;stop
;cgoplot,(*!dustem_data.sed).wav,(*!dustem_data.sed).values/sed,psym=16,symsize=1,thick=2,color='Dodger Blue'
cgoplot,10^!x.crange,replicate(1.,2),color='black',linestyle=0
;cgoplot,st.sed.wav,spec/spec,color='black'
;cgerrplot,((*!dustem_data.sed).wav),((*!dustem_data.sed).values)/sed-3.*((*!dustem_data.sed).sigma)/2./sed,((*!dustem_data.sed).values)/sed+3.*((*!dustem_data.sed).sigma)/2./sed,color='Dodger Blue'
452c334e   Ilyes Choubani   Implementation Of...
298
299
300



9ccf7615   Jean-Philippe Bernard   modified to fit u...
301
302
303
304
305
306
IF keyword_set(ps) THEN BEGIN
  device,/close
  set_plot,'X'
ENDIF

;stop
427f1205   Jean-Michel Glorian   version 4.2 merged
307
308
309
310

the_end:

END