Blame view

src/idl/dustem_sed_plot.pro 2.31 KB
266ae799   Ilyes Choubani   General update
1
PRO dustem_sed_plot,p_min,_extra=_extra,function_name=function_name,pol=pol,legend_xpos=legend_xpos,legend_ypos=legend_ypos,ps=ps,png=png,fpol=fpol
427f1205   Jean-Michel Glorian   version 4.2 merged
2
3

IF not keyword_set(function_name) THEN BEGIN
dc72d0b6   Ilyes Choubani   initial procedure...
4
  ;Run dustem with as an interface to mpfitfun; what does this mean? This whole procedure will have to be changed
6730c3f8   Jean-Philippe Bernard   modified to be co...
5
6
7
;stop
  ;== JPB: st used to come out from here
  ;even when not set. Had to replavce by out_st ...
dc72d0b6   Ilyes Choubani   initial procedure...
8
9
10
11
12
13
14
 
;   act_wins=0   
;   FOR i=0L,n_tags(!dustem_data)-1 DO BEGIN
;       IF isa(!dustem_data.(i)) THEN act_wins+=1   
;   ENDFOR   
 
  dustem_sed=dustem_compute_sed(p_min,st=st,out_st=out_st) 
6730c3f8   Jean-Philippe Bernard   modified to be co...
15
  st=out_st
452c334e   Ilyes Choubani   Implementation Of...
16
  ;dustem_plot_fit_sed,st,dustem_sed,cont,freefree,synchrotron,_extra=_extra,legend_xpos=legend_xpos,legend_ypos=legend_ypos
dc72d0b6   Ilyes Choubani   initial procedure...
17
  win=1;win-act_wins+1
1f4818fe   Jean-Philippe Bernard   modified to work ...
18
19
20
21
22
  IF keyword_set(ps) THEN BEGIN
    dustem_plot_fit_sed,st,dustem_sed,win=win,_extra=_extra,legend_xpos=legend_xpos,legend_ypos=legend_ypos,ps=ps,png=png,use_model=use_model,fpol=fpol
  ENDIF ELSE BEGIN
    dustem_plot_fit_sed,st,dustem_sed,_extra=_extra,win=win,legend_xpos=legend_xpos,legend_ypos=legend_ypos,use_model=use_model,fpol=fpol
  ENDELSE
4750086c   Ilyes Choubani   nouvelle philosph...
23
24
  
  ;I do not understand the reason begind the stop below - either way polarization is handled by other procedures
b5ccb706   Jean-Philippe Bernard   improved to fit p...
25
  IF keyword_set(pol) THEN BEGIN
7d2d66e7   Ilyes Choubani   replacing polsed,...
26
    ;stop
b0cabd3c   Ilyes Choubani   general update
27
    IF tag_exist(!dustem_data,'polsed') THEN BEGIN
266ae799   Ilyes Choubani   General update
28
        IF isa(!dustem_data.polsed) THEN BEGIN
b0cabd3c   Ilyes Choubani   general update
29
30
31
32
            win+=1
            dustem_polsed=dustem_compute_polsed(p_min,st=st)
            dustem_plot_polsed, st, p_dim, dustem_polsed, aligned=aligned, win=win,_Extra=extra
        ENDIF
dc72d0b6   Ilyes Choubani   initial procedure...
33
    ENDIF
b0cabd3c   Ilyes Choubani   general update
34
    IF tag_exist(!dustem_data,'polext') THEN BEGIN
266ae799   Ilyes Choubani   General update
35
        IF isa(!dustem_data.polext) THEN BEGIN
b0cabd3c   Ilyes Choubani   general update
36
37
38
39
            win+=1
            dustem_polext=dustem_compute_polext(p_min,st=st)
            dustem_plot_polext, st, p_dim, dustem_polext, aligned=aligned, win=win,_Extra=extra
        ENDIF
dc72d0b6   Ilyes Choubani   initial procedure...
40
41
42
    ENDIF
    
     ;dustem_plot_polar,st,ps=ps,_Extra=extra,help=help,UV=UV,SED=SED,Pfrac=Pfrac,print_ratio=print_ratio,win=win,cont=cont,donotclose=donotclose,aligned=aligned,noerrbars=noerrbars,multi=multi,almabands=almabands,nsmooth=nsmooth
b5ccb706   Jean-Philippe Bernard   improved to fit p...
43
  ENDIF
427f1205   Jean-Michel Glorian   version 4.2 merged
44
45
46
ENDIF ELSE BEGIN
  CASE function_name OF
    'dustem_greybody_mpfit':BEGIN
6730c3f8   Jean-Philippe Bernard   modified to be co...
47
       dustem_sed=dustem_compute_gb_sed_fast(p_min,waves=ww,spec=spec)
427f1205   Jean-Michel Glorian   version 4.2 merged
48
49
50
51
52
53
54
;       stop
       dustem_gb_plot_fit_sed,ww,spec,dustem_sed,_extra=extra
    END
  ENDCASE
ENDELSE

END