Blame view

Docs/DustemWrapp.html 28.4 KB
427f1205   Jean-Michel Glorian   version 4.2 merged
1
2
3
4
5
6
7
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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
<!-- This file was generated by mk_html_help.pro -->
<html>
 
<head>
<TITLE>Extended Help for DustemWrap routines</TITLE>
</head>
 
<body>
<H1>Extended Help for DustemWrap routines</H1>
<P>
This page was created by the IDL library routine 
<CODE>mk_html_help</CODE>.  For more information on 
this routine, refer to the IDL Online Help Navigator 
or type: <P>
<PRE>     ? mk_html_help</PRE><P>
at the IDL command line prompt.<P>
<STRONG>Last modified: </STRONG>Wed Jun  8 12:10:31 2011.<P>
 
<HR>
 
<A NAME="ROUTINELIST">
<H1>List of Routines</H1></A>
<UL>
<LI><A HREF="#DUSTEM_CC">DUSTEM_CC</A>
<LI><A HREF="#DUSTEM_COMPUTE_SED">DUSTEM_COMPUTE_SED</A>
<LI><A HREF="#DUSTEM_FILTER2FLUXCONV">DUSTEM_FILTER2FLUXCONV</A>
<LI><A HREF="#DUSTEM_FILTER2INSTRU">DUSTEM_FILTER2INSTRU</A>
<LI><A HREF="#DUSTEM_FILTER2WAV">DUSTEM_FILTER2WAV</A>
<LI><A HREF="#DUSTEM_FILTER_INIT">DUSTEM_FILTER_INIT</A>
<LI><A HREF="#DUSTEM_FIT_SED_README">DUSTEM_FIT_SED_README</A>
<LI><A HREF="#DUSTEM_INIT">DUSTEM_INIT</A>
<LI><A HREF="#DUSTEM_PLANCK_FUNCTION">DUSTEM_PLANCK_FUNCTION</A>
<LI><A HREF="#DUSTEM_PLOT_EXTINCTION">DUSTEM_PLOT_EXTINCTION</A>
<LI><A HREF="#DUSTEM_PLOT_FIT_SED">DUSTEM_PLOT_FIT_SED</A>
<LI><A HREF="#DUSTEM_PLOT_NUINU_EM">DUSTEM_PLOT_NUINU_EM</A>
<LI><A HREF="#DUSTEM_READ_ALL">DUSTEM_READ_ALL</A>
<LI><A HREF="#DUSTEM_READ_ALL_RES">DUSTEM_READ_ALL_RES</A>
<LI><A HREF="#DUSTEM_RESTORE_SED_FIT">DUSTEM_RESTORE_SED_FIT</A>
<LI><A HREF="#DUSTEM_RUN">DUSTEM_RUN</A>
<LI><A HREF="#DUSTEM_RUN_README">DUSTEM_RUN_README</A>
<LI><A HREF="#DUSTEM_SAVE_SED_FIT">DUSTEM_SAVE_SED_FIT</A>
<LI><A HREF="#DUSTEM_SET_DATA">DUSTEM_SET_DATA</A>
<LI><A HREF="#DUSTEM_SET_FUNC_IND">DUSTEM_SET_FUNC_IND</A>
<LI><A HREF="#DUSTEM_WRITE_ALL">DUSTEM_WRITE_ALL</A>
</UL><P>
 
<HR>
 
<H1>Routine Descriptions</H1>
<A NAME="DUSTEM_CC">
<H2>DUSTEM_CC</H2></A>
<A HREF="#DUSTEM_COMPUTE_SED">[Next Routine]</A>
<A HREF="#ROUTINELIST">[List of Routines]</A>
<PRE>
 NAME:
    dustem_cc
 PURPOSE:
    Computes observed sed and color correction for a given spectrum in a given filter
 CATEGORY:
    Dustem
 CALLING SEQUENCE:
    sed=dustem_cc(wave,spec,filter_names,cc=cc,fluxconv=fluxconv,help=help)
 INPUTS:
    wave: array of wavelengths for spec
    spec: spectrum (must be in brightness units)
    filter_names: names of filters for which color correction is needed
 OPTIONAL INPUT PARAMETERS:
    None
 OUTPUTS:
    sed: SED as observed in filters provided in filter_names
 OPTIONAL OUTPUT PARAMETERS:
    cc        = color correction coefficients (spec*cc=sed)
 ACCEPTED KEY-WORDS:
    fluxconv  = if set, these are taken for flux conventions
              possible values: 'nuInu=cste', 'IRAC', 'MIPS', 'CMB'
    help      = If set, print this help
 COMMON BLOCKS:
    None
 SIDE EFFECTS:
    None
 RESTRICTIONS:
    The dustem idl wrapper must be installed
 PROCEDURE:
    None
 EXAMPLES
    
 MODIFICATION HISTORY:
    Written by J.P. Bernard April 18th 2011
    replaces individual cc routines for various instruments
    see evolution details on the dustem cvs maintained at CESR
    Contact J.-Ph. Bernard (Jean-Philippe.Bernard@cesr.fr) in case of problems.
</PRE><P>
<STRONG>(See /Users/jpb/Soft_Librairies/DUSTEM/src/idl/dustem_cc.pro)</STRONG><P>
<HR>
 
<A NAME="DUSTEM_COMPUTE_SED">
<H2>DUSTEM_COMPUTE_SED</H2></A>
<A HREF="#DUSTEM_CC">[Previous Routine]</A>
<A HREF="#DUSTEM_FILTER2FLUXCONV">[Next Routine]</A>
<A HREF="#ROUTINELIST">[List of Routines]</A>
<PRE>
 NAME:
    dustem_compute_sed
 PURPOSE:
    Computes an SED from a given Dustem spectrum
 CATEGORY:
    Dustem
 CALLING SEQUENCE:
    sed=dustem_compute_sed(p_dim[,st=][,cont=][,_extra=][,/help])
 INPUTS:
    p_dim      = parameter values
 OPTIONAL INPUT PARAMETERS:
    None
 OUTPUTS:
    sed       = computed SED for filters in !dustem_data
 OPTIONAL OUTPUT PARAMETERS:
    st        = Dustem output structure
    cont      = NIR continuum
 ACCEPTED KEY-WORDS:
    help      = If set, print this help
 COMMON BLOCKS:
    None
 SIDE EFFECTS:
    None
 RESTRICTIONS:
    The dustem idl wrapper must be installed
 PROCEDURE:
    None
 EXAMPLES
    
 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.
</PRE><P>
<STRONG>(See /Users/jpb/Soft_Librairies/DUSTEM/src/idl/dustem_compute_sed.pro)</STRONG><P>
<HR>
 
<A NAME="DUSTEM_FILTER2FLUXCONV">
<H2>DUSTEM_FILTER2FLUXCONV</H2></A>
<A HREF="#DUSTEM_COMPUTE_SED">[Previous Routine]</A>
<A HREF="#DUSTEM_FILTER2INSTRU">[Next Routine]</A>
<A HREF="#ROUTINELIST">[List of Routines]</A>
<PRE>
 NAME:
    dustem_filter2fluxconv
 PURPOSE:
    Returns flux convention given filter name
 CATEGORY:
    Dustem
 CALLING SEQUENCE:
    flx_conv=dustem_filter2fluxconv(filter[,/help])
 INPUTS:
    filter  = Filter name
 OPTIONAL INPUT PARAMETERS:
    None
 OUTPUTS:
    flx_conv = Flux convention string
 OPTIONAL OUTPUT PARAMETERS:
    None
 ACCEPTED KEY-WORDS:
    help      = If set, print this help
 COMMON BLOCKS:
    None
 SIDE EFFECTS:
    Reads instrument_description.xcat at each call. Not optimal.
 RESTRICTIONS:
    The dustem idl wrapper must be installed
 PROCEDURE:
    None
 EXAMPLES
    print,dustem_filter2fluxconv(['IRAS1','MIPS3'])
 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.
</PRE><P>
<STRONG>(See /Users/jpb/Soft_Librairies/DUSTEM/src/idl/dustem_filter2fluxconv.pro)</STRONG><P>
<HR>
 
<A NAME="DUSTEM_FILTER2INSTRU">
<H2>DUSTEM_FILTER2INSTRU</H2></A>
<A HREF="#DUSTEM_FILTER2FLUXCONV">[Previous Routine]</A>
<A HREF="#DUSTEM_FILTER2WAV">[Next Routine]</A>
<A HREF="#ROUTINELIST">[List of Routines]</A>
<PRE>
 NAME:
    dustem_filter2instru
 PURPOSE:
    Returns instrument name given filter name
 CATEGORY:
    Dustem
 CALLING SEQUENCE:
    inst_name=dustem_filter2instru(filter[,/help])
 INPUTS:
    filter  = Filter name
 OPTIONAL INPUT PARAMETERS:
    None
 OUTPUTS:
    inst_name = Instrument name
 OPTIONAL OUTPUT PARAMETERS:
    None
 ACCEPTED KEY-WORDS:
    help      = If set, print this help
 COMMON BLOCKS:
    None
 SIDE EFFECTS:
    Reads instrument_description.xcat at each call. Not optimal.
 RESTRICTIONS:
    The dustem idl wrapper must be installed
 PROCEDURE:
    None
 EXAMPLES
    print,dustem_filter2instru(['IRAS1','MIPS3'])
 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.
</PRE><P>
<STRONG>(See /Users/jpb/Soft_Librairies/DUSTEM/src/idl/dustem_filter2instru.pro)</STRONG><P>
<HR>
 
<A NAME="DUSTEM_FILTER2WAV">
<H2>DUSTEM_FILTER2WAV</H2></A>
<A HREF="#DUSTEM_FILTER2INSTRU">[Previous Routine]</A>
<A HREF="#DUSTEM_FILTER_INIT">[Next Routine]</A>
<A HREF="#ROUTINELIST">[List of Routines]</A>
<PRE>
 NAME:
    dustem_filter2wav
 PURPOSE:
    Returns reference wavelength given filter name
 CATEGORY:
    Dustem
 CALLING SEQUENCE:
    wave=dustem_filter2wav(filter[,/help])
 INPUTS:
    filter  = Filter name
 OPTIONAL INPUT PARAMETERS:
    None
 OUTPUTS:
    wave = reference wavelength (microns)
 OPTIONAL OUTPUT PARAMETERS:
    None
 ACCEPTED KEY-WORDS:
    help      = If set, print this help
 COMMON BLOCKS:
    None
 SIDE EFFECTS:
    Reads instrument_description.xcat at each call. Not optimal.
 RESTRICTIONS:
    The dustem idl wrapper must be installed
 PROCEDURE:
    None
 EXAMPLES
    print,dustem_filter2wav(['IRAS1','MIPS3'])
 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.
</PRE><P>
<STRONG>(See /Users/jpb/Soft_Librairies/DUSTEM/src/idl/dustem_filter2wav.pro)</STRONG><P>
<HR>
 
<A NAME="DUSTEM_FILTER_INIT">
<H2>DUSTEM_FILTER_INIT</H2></A>
<A HREF="#DUSTEM_FILTER2WAV">[Previous Routine]</A>
<A HREF="#DUSTEM_FIT_SED_README">[Next Routine]</A>
<A HREF="#ROUTINELIST">[List of Routines]</A>
<PRE>
 NAME:
    dustem_filter_init
 PURPOSE:
    Initializes the dustem filter structure (!dustem_filters)
 CATEGORY:
    Dustem
 CALLING SEQUENCE:
    dustem_filter_init[,dir=]
 INPUTS:
    None
 OPTIONAL INPUT PARAMETERS:
    None
 OUTPUTS:
    None
 OPTIONAL OUTPUT PARAMETERS:
    None
 ACCEPTED KEY-WORDS:
    help      = If set print this help
 COMMON BLOCKS:
    None
 SIDE EFFECTS:
    initializes !dustem_filters
 RESTRICTIONS:
    The dustem idl wrapper must be installed
 PROCEDURE:
    None
 EXAMPLES
    dustem_init
    dustem_filter_init
 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.
</PRE><P>
<STRONG>(See /Users/jpb/Soft_Librairies/DUSTEM/src/idl/dustem_filter_init.pro)</STRONG><P>
<HR>
 
<A NAME="DUSTEM_FIT_SED_README">
<H2>DUSTEM_FIT_SED_README</H2></A>
<A HREF="#DUSTEM_FILTER_INIT">[Previous Routine]</A>
<A HREF="#DUSTEM_INIT">[Next Routine]</A>
<A HREF="#ROUTINELIST">[List of Routines]</A>
<PRE>
 NAME:
    dustem_fit_sed_readme
 PURPOSE:
    This is an example of how to fit SEDs with the dustem wrapper.
    It is meant to be an example to follow when writing your own
    programs using the dustem IDL wrapper.
    It is not meant to reproduce the result in Compiegne et al 2010
    The SED used here is in sample_SED.xcat
 CATEGORY:
    Dustem
 CALLING SEQUENCE:
    dustem_fit_sed_readme,postcript=postcript,mode=mode,help=help
 INPUTS:
    None
 OPTIONAL INPUT PARAMETERS:
    None
 OUTPUTS:
    None
 OPTIONAL OUTPUT PARAMETERS:
    None
 ACCEPTED KEY-WORDS:
    mode = Selects one of the dust mixture used by dustem
           'COMPIEGNE_ETAL2010' from Compiegne et al 2010 (default)
           'DBP90' from Desert et al 1990
           'DL01' from Draine & Li 2001
           'DL07' from Draine & Li 2007
    postcript = if set plot is done in DUSTEM/Docs/Figures/Last_dustem_fit.ps
    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:
    None
 EXAMPLES
    dustem_fit_sed_readme,mode='COMPIEGNE_ETAL2010'
 MODIFICATION HISTORY:
    Written by J.P. Bernard April 1st 2011
    see evolution details on the dustem cvs maintained at CESR
    Contact J.-Ph. Bernard (Jean-Philippe.Bernard@cesr.fr) in case of problems.
</PRE><P>
<STRONG>(See /Users/jpb/Soft_Librairies/DUSTEM/src/idl/dustem_fit_sed_readme.pro)</STRONG><P>
<HR>
 
<A NAME="DUSTEM_INIT">
<H2>DUSTEM_INIT</H2></A>
<A HREF="#DUSTEM_FIT_SED_README">[Previous Routine]</A>
<A HREF="#DUSTEM_PLANCK_FUNCTION">[Next Routine]</A>
<A HREF="#ROUTINELIST">[List of Routines]</A>
<PRE>
 NAME:
   dustem_init
 CALLING SEQUENCE:
   dustem_init
 PURPOSE:
   Defines system variables to run the DUSTEM code
 INPUTS:
    mode    = Selects one of the dust mixture used by dustem
              'COMPIEGNE_ETAL2010' from Compiegne et al 2010 (default)
              'DBP90' from Desert et al 1990
              'DL01' from Draine & Li 2001
              'DL07' from Draine & Li 2007
   dir      = overrides default directory where to read data
   wraptest = test running dustem f90 through the wrapper
   plot_it  = plots run result (only if wraptest)
   help     = If set print this help
 OPTIONAL INPUT:
   None
 OUTPUTS:
   None
 PROCEDURE AND SUBROUTINE USED
    1/ The folowing system variables are initialized to null values
	or empty pointers:
       !dustem_fit
       !dustem_data
       !dustem_inputs
       !dustem_params
       !run_ionfrac
       !dustem_idl_continuum
       !dustem_filters
       !dustem_verbose
       !dustem_show_plot
    2/ optionally runs the fortran code (if wraptest)
       This step calls the Fortran code to run a standard model
    3/ !dustem_filters is initialized calling dustem_filter_init.pro.
 RESTRICTIONS:
    The dustem fortran code must be installed
    The dustem idl wrapper must be installed
 EXAMPLES
    dustem_init,/wrap,/plot_it
 MODIFICATION HISTORY:
    See cvs logs
    Written by JPB,NF,DP Jan-2007
    see evolution details on the dustem cvs maintained at CESR
</PRE><P>
<STRONG>(See /Users/jpb/Soft_Librairies/DUSTEM/src/idl/dustem_init.pro)</STRONG><P>
<HR>
 
<A NAME="DUSTEM_PLANCK_FUNCTION">
<H2>DUSTEM_PLANCK_FUNCTION</H2></A>
<A HREF="#DUSTEM_INIT">[Previous Routine]</A>
<A HREF="#DUSTEM_PLOT_EXTINCTION">[Next Routine]</A>
<A HREF="#ROUTINELIST">[List of Routines]</A>
<PRE>
 NAME:
	dustem_planck_function
 PURPOSE: 
	To calculate the Planck function in units of MJy/sr 

 CALLING SEQUENCE: 
	bbflux = dustem_planck_function(temp,wave) 

 INPUT PARAMETERS: 
	WAVE   in microns
	TEMP   Scalar giving the temperature of the planck function in degree K

 OUTPUT PARAMETERS:
	BBFLUX - Scalar or vector giving the planck function at the specified
		wavelength points.

 EXAMPLES:

 RESTRICTIONS:
	Values less than approximately 1E-24 are truncated to 0.

 PROCEDURE:

 MODIFICATION HISTORY:
</PRE><P>
<STRONG>(See /Users/jpb/Soft_Librairies/DUSTEM/src/idl/dustem_planck_function.pro)</STRONG><P>
<HR>
 
<A NAME="DUSTEM_PLOT_EXTINCTION">
<H2>DUSTEM_PLOT_EXTINCTION</H2></A>
<A HREF="#DUSTEM_PLANCK_FUNCTION">[Previous Routine]</A>
<A HREF="#DUSTEM_PLOT_FIT_SED">[Next Routine]</A>
<A HREF="#ROUTINELIST">[List of Routines]</A>
<PRE>
 NAME:
     dustem_plot_extinction
 PURPOSE:
    Plots a Dustem extinction
 CATEGORY:
    Dustem
 CALLING SEQUENCE:
    dustem_plot_extinction,st,st_model[,/help][,_extra=]
 INPUTS:
    st        = Dustem model output structure
    st_model  = Dustem model parameters structure
 OPTIONAL INPUT PARAMETERS:
    _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:
    model is plotted
 RESTRICTIONS:
    The dustem idl wrapper must be installed
 PROCEDURE:
    None
 EXAMPLES
    dustem_init,/wrap
    dir_in=getenv('DUSTEM_SOFT_DIR')+'/src/dustem3.8_web/'
    st_model=dustem_read_all(dir_in)
    dir=getenv('DUSTEM_RES')
    st=dustem_read_all_res(dir_in)
    loadct,13
    dustem_plot_extinction,st,st_model,yr=[1.e-6,1.e0],/ysty,xr=[1.,400],/xsty
 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.
</PRE><P>
<STRONG>(See /Users/jpb/Soft_Librairies/DUSTEM/src/idl/dustem_plot_extinction.pro)</STRONG><P>
<HR>
 
<A NAME="DUSTEM_PLOT_FIT_SED">
<H2>DUSTEM_PLOT_FIT_SED</H2></A>
<A HREF="#DUSTEM_PLOT_EXTINCTION">[Previous Routine]</A>
<A HREF="#DUSTEM_PLOT_NUINU_EM">[Next Routine]</A>
<A HREF="#ROUTINELIST">[List of Routines]</A>
<PRE>
 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.
</PRE><P>
<STRONG>(See /Users/jpb/Soft_Librairies/DUSTEM/src/idl/dustem_plot_fit_sed.pro)</STRONG><P>
<HR>
 
<A NAME="DUSTEM_PLOT_NUINU_EM">
<H2>DUSTEM_PLOT_NUINU_EM</H2></A>
<A HREF="#DUSTEM_PLOT_FIT_SED">[Previous Routine]</A>
<A HREF="#DUSTEM_READ_ALL">[Next Routine]</A>
<A HREF="#ROUTINELIST">[List of Routines]</A>
<PRE>
 NAME:
     dustem_plot_nuinu_em
 PURPOSE:
    Plots a Dustem spectrum
 CATEGORY:
    Dustem
 CALLING SEQUENCE:
    dustem_plot_fit_sed,st[,/help][,_extra=]
 INPUTS:
    st        = Dustem model output structure
 OPTIONAL INPUT PARAMETERS:
    _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:
    model is plotted
 RESTRICTIONS:
    The dustem idl wrapper must be installed
 PROCEDURE:
    None
 EXAMPLES
    dustem_init,/wrap
    dir=getenv('DUSTEM_RES')
    st=dustem_read_all_res(dir)
    dustem_plot_nuinu_em,st,yr=[1e-28,1.e-22],/ysty,xr=[1,5e3],/xsty
 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.
</PRE><P>
<STRONG>(See /Users/jpb/Soft_Librairies/DUSTEM/src/idl/dustem_plot_nuinu_em.pro)</STRONG><P>
<HR>
 
<A NAME="DUSTEM_READ_ALL">
<H2>DUSTEM_READ_ALL</H2></A>
<A HREF="#DUSTEM_PLOT_NUINU_EM">[Previous Routine]</A>
<A HREF="#DUSTEM_READ_ALL_RES">[Next Routine]</A>
<A HREF="#ROUTINELIST">[List of Routines]</A>
<PRE>
 NAME:
    dustem_read_all
 PURPOSE:
    Reads all Dustem input data
 CATEGORY:
    Dustem
 CALLING SEQUENCE:
    st=dustem_read_all(dir_in,silent=silent,help=help)
 INPUTS:
    dir_in: input directory
 OPTIONAL INPUT PARAMETERS:
    None
 OUTPUTS:
    st: input structure
 OPTIONAL OUTPUT PARAMETERS:
    None
 ACCEPTED KEY-WORDS:
    silent    = If set, function is silent
    help      = If set, print this help
 COMMON BLOCKS:
    None
 SIDE EFFECTS:
    None
 RESTRICTIONS:
    The dustem idl wrapper must be installed
 PROCEDURE:
    None
 EXAMPLES
    dustem_init
    dir=getenv('DUSTEM_SOFT_DIR')+'/src/dustem3.8_web/'
    st=dustem_read_all(dir)
 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.
</PRE><P>
<STRONG>(See /Users/jpb/Soft_Librairies/DUSTEM/src/idl/dustem_read_all.pro)</STRONG><P>
<HR>
 
<A NAME="DUSTEM_READ_ALL_RES">
<H2>DUSTEM_READ_ALL_RES</H2></A>
<A HREF="#DUSTEM_READ_ALL">[Previous Routine]</A>
<A HREF="#DUSTEM_RESTORE_SED_FIT">[Next Routine]</A>
<A HREF="#ROUTINELIST">[List of Routines]</A>
<PRE>
 NAME:
    dustem_read_all_res
 PURPOSE:
    Reads all Dustem outputs
 CATEGORY:
    Dustem
 CALLING SEQUENCE:
    st=dustem_read_all_res(dir_out[,/silent][,/help])
 INPUTS:
    dir_out: Dustem output directory
 OPTIONAL INPUT PARAMETERS:
    None
 OUTPUTS:
    st: Dustem output structure
      structure:
      DUSTEM          STRUCT    -> <Anonymous> Array[800]
        WAV             FLOAT         0.0400000
        EM_GRAIN_1      FLOAT           0.00000
        EM_GRAIN_2      FLOAT           0.00000
        EM_GRAIN_3      FLOAT           0.00000
        EM_GRAIN_4      FLOAT           0.00000
        EM_GRAIN_5      FLOAT           0.00000
        EM_TOT          FLOAT           0.00000
      EXT             STRUCT    -> <Anonymous> Array[799]
        WAV             FLOAT         0.0406570
        ABS_GRAIN       FLOAT     Array[5]
        SCA_GRAIN       FLOAT     Array[5]
 OPTIONAL OUTPUT PARAMETERS:
    None
 ACCEPTED KEY-WORDS:
    help      = If set, print this help
    silent    = If set, function is silent
 COMMON BLOCKS:
    None
 SIDE EFFECTS:
    None
 RESTRICTIONS:
    The dustem idl wrapper must be installed
 PROCEDURE:
    None
 EXAMPLES
    dustem_init,/wrap
    dir=getenv('DUSTEM_RES')
    st=dustem_read_all_res(dir)
    help,st,/str
 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.
</PRE><P>
<STRONG>(See /Users/jpb/Soft_Librairies/DUSTEM/src/idl/dustem_read_all_res.pro)</STRONG><P>
<HR>
 
<A NAME="DUSTEM_RESTORE_SED_FIT">
<H2>DUSTEM_RESTORE_SED_FIT</H2></A>
<A HREF="#DUSTEM_READ_ALL_RES">[Previous Routine]</A>
<A HREF="#DUSTEM_RUN">[Next Routine]</A>
<A HREF="#ROUTINELIST">[List of Routines]</A>
<PRE>
 NAME:
    dustem_restore_sed_fit
 PURPOSE:
    Restore Dustem SED fit results from a file.
 CATEGORY:
    Dustem
 CALLING SEQUENCE:
    dustem_restore_sed_fit,file[,/help]
 INPUTS:
    file      = File name
 OPTIONAL INPUT PARAMETERS:
    None
 OUTPUTS:
    None
 OPTIONAL OUTPUT PARAMETERS:
    None
 ACCEPTED KEY-WORDS:
    help      = If set, print this help
 COMMON BLOCKS:
    None
 SIDE EFFECTS:
    The !dustem_fit structure is updated
    The !dustem_data, !dustem_filters, !dustem_verbose and
    !run_ionfrac are also affected.
 RESTRICTIONS:
    The dustem idl wrapper must be installed
 PROCEDURE:
    None
 EXAMPLES
    dustem_fit_sed_readme
    file=getenv('DUSTEM_RES')+'DUSTEM_fit_example.sav'
    dustem_restore_sed_fit,file
 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.
</PRE><P>
<STRONG>(See /Users/jpb/Soft_Librairies/DUSTEM/src/idl/dustem_restore_sed_fit.pro)</STRONG><P>
<HR>
 
<A NAME="DUSTEM_RUN">
<H2>DUSTEM_RUN</H2></A>
<A HREF="#DUSTEM_RESTORE_SED_FIT">[Previous Routine]</A>
<A HREF="#DUSTEM_RUN_README">[Next Routine]</A>
<A HREF="#ROUTINELIST">[List of Routines]</A>
<PRE>
 NAME:
    dustem_run
 PURPOSE:
    Runs the DUSTEM code and returns the results into a structure.
 CATEGORY:
    Dustem
 CALLING SEQUENCE:
    st=dustem_run(params[,/help])
 INPUTS:
    params = model parameter values
 OPTIONAL INPUT PARAMETERS:
    None
 OUTPUTS:
    st: output structure
 OPTIONAL OUTPUT PARAMETERS:
    None
 ACCEPTED KEY-WORDS:
    help      = If set, print this help
 COMMON BLOCKS:
    None
 SIDE EFFECTS:
    None
 RESTRICTIONS:
    The dustem idl wrapper must be installed
 PROCEDURE:
    None
 EXAMPLES
    st=dustem_run(params)
 MODIFICATION HISTORY:
    Written by J.-Ph. Bernard, N. Flagey, D. Paradis Jan 2007
    see evolution details on the dustem cvs maintained at CESR
    Contact J.-Ph. Bernard (Jean-Philippe.Bernard@cesr.fr) in case of problems.
</PRE><P>
<STRONG>(See /Users/jpb/Soft_Librairies/DUSTEM/src/idl/dustem_run.pro)</STRONG><P>
<HR>
 
<A NAME="DUSTEM_RUN_README">
<H2>DUSTEM_RUN_README</H2></A>
<A HREF="#DUSTEM_RUN">[Previous Routine]</A>
<A HREF="#DUSTEM_SAVE_SED_FIT">[Next Routine]</A>
<A HREF="#ROUTINELIST">[List of Routines]</A>
<PRE>
 NAME:
    dustem_run_readme
 PURPOSE:
    This is an example of how to run dustem SEDs with the dustem wrapper.
 CATEGORY:
    Dustem
 CALLING SEQUENCE:
    dustem_run_readme,mode=mode,help=help,/postcript,/help,/plot_it
 INPUTS:
    None
 OPTIONAL INPUT PARAMETERS:
    None
 OUTPUTS:
    None
 OPTIONAL OUTPUT PARAMETERS:
    None
 ACCEPTED KEY-WORDS:
    mode = Selects one of the dust mixture used by dustem
           'COMPIEGNE_ETAL2010' from Compiegne et al 2010 (default)
           'DBP90' from Desert et al 1990
           'DL01' from Draine & Li 2001
           'DL07' from Draine & Li 2007
    postcript = if set, plot is done in DUSTEM/Docs/Figures/Last_dustem_fit.ps
    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:
    None
 EXAMPLES
    dustem_run_readme,mode='COMPIEGNE_ETAL2010'
 MODIFICATION HISTORY:
    Written by J.P. Bernard April 1st 2011
    see evolution details on the dustem cvs maintained at CESR
    Contact J.-Ph. Bernard (Jean-Philippe.Bernard@cesr.fr) in case of problems.
</PRE><P>
<STRONG>(See /Users/jpb/Soft_Librairies/DUSTEM/src/idl/dustem_run_readme.pro)</STRONG><P>
<HR>
 
<A NAME="DUSTEM_SAVE_SED_FIT">
<H2>DUSTEM_SAVE_SED_FIT</H2></A>
<A HREF="#DUSTEM_RUN_README">[Previous Routine]</A>
<A HREF="#DUSTEM_SET_DATA">[Next Routine]</A>
<A HREF="#ROUTINELIST">[List of Routines]</A>
<PRE>
 NAME:
    dustem_save_sed_fit
 PURPOSE:
    Save Dustem SED fit results in a file
 CATEGORY:
    Dustem
 CALLING SEQUENCE:
    dustem_save_sed_fit,file[,/help]
 INPUTS:
    file      = File name
 OPTIONAL INPUT PARAMETERS:
    None
 OUTPUTS:
    None
 OPTIONAL OUTPUT PARAMETERS:
    None
 ACCEPTED KEY-WORDS:
    help      = If set, print this help
 COMMON BLOCKS:
    None
 SIDE EFFECTS:
    File is stored.
    The stored data are taken from !dustem_fit, !dustem_data,
    !dustem_filters, !dustem_verbose and !run_ionfrac
 RESTRICTIONS:
    The dustem idl wrapper must be installed
 PROCEDURE:
    None
 EXAMPLES
    
 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.
</PRE><P>
<STRONG>(See /Users/jpb/Soft_Librairies/DUSTEM/src/idl/dustem_save_sed_fit.pro)</STRONG><P>
<HR>
 
<A NAME="DUSTEM_SET_DATA">
<H2>DUSTEM_SET_DATA</H2></A>
<A HREF="#DUSTEM_SAVE_SED_FIT">[Previous Routine]</A>
<A HREF="#DUSTEM_SET_FUNC_IND">[Next Routine]</A>
<A HREF="#ROUTINELIST">[List of Routines]</A>
<PRE>
 NAME:
    dustem_set_data
 PURPOSE:
    Initializes the dustem data structure (!dustem_data)
 CATEGORY:
    Dustem
 CALLING SEQUENCE:
    dustem_set_data,spec[,help=]
 INPUTS:
    spec: array of structures containing a SED
 OPTIONAL INPUT PARAMETERS:
    None
 OUTPUTS:
    None
 OPTIONAL OUTPUT PARAMETERS:
    None
 ACCEPTED KEY-WORDS:
    help      = If set print this help
 COMMON BLOCKS:
    None
 SIDE EFFECTS:
    initializes !dustem_data
    wavelengths are forced to be the central filter wavelength for
    photometric data
 RESTRICTIONS:
    The dustem idl wrapper must be installed
 PROCEDURE:
    None
 EXAMPLES
    dustem_init
    dir=getenv('DUSTEM_SOFT_DIR')+'/src/dustem3.8_web/SEDs/'
    file=dir+'Gal_composite_spectrum.xcat'
    spec=read_xcat(file,/silent)
    dustem_set_data,spec
 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.
</PRE><P>
<STRONG>(See /Users/jpb/Soft_Librairies/DUSTEM/src/idl/dustem_set_data.pro)</STRONG><P>
<HR>
 
<A NAME="DUSTEM_SET_FUNC_IND">
<H2>DUSTEM_SET_FUNC_IND</H2></A>
<A HREF="#DUSTEM_SET_DATA">[Previous Routine]</A>
<A HREF="#DUSTEM_WRITE_ALL">[Next Routine]</A>
<A HREF="#ROUTINELIST">[List of Routines]</A>
<PRE>
 NAME:
       dustem_set_func_ind
 CALLING SEQUENCE:
       dustem_set_func_ind
 PURPOSE:
	Sorts the parameter descriptions and values the way they must
	be processed.
 INPUTS:
       None
 OPTIONAL INPUT:
       None
 OUTPUTS:
       None
 PROCEDURE AND SUBROUTINE USED
       Parameter description (!param_desc) and values (!init_value) are
       ordered the way they should be processed. The ordered information
       is put into system variables !PDO and !IDO respectively
       If the isrf is being modified, then, PAH ionization fraction
       is set to be updated as well.
 SIDE EFFECTS:
       !PDO and !IDO variables are set.
       Optionally !ionfrac is set.
       The !func_ind variable is set.
 MODIFICATION HISTORY:
       See cvs logs
       Written by NF,JPB,DP Jan-2007
</PRE><P>
<STRONG>(See /Users/jpb/Soft_Librairies/DUSTEM/src/idl/dustem_set_func_ind.pro)</STRONG><P>
<HR>
 
<A NAME="DUSTEM_WRITE_ALL">
<H2>DUSTEM_WRITE_ALL</H2></A>
<A HREF="#DUSTEM_SET_FUNC_IND">[Previous Routine]</A>
<A HREF="#ROUTINELIST">[List of Routines]</A>
<PRE>
 NAME:
    dustem_write_all
 PURPOSE:
    Write all Dustem input data
 CATEGORY:
    Dustem
 CALLING SEQUENCE:
    dustem_write_all,st,dir_out[,/help]
 INPUTS:
    st: Dustem input structure
    dir_out: output directory
 OPTIONAL INPUT PARAMETERS:
    None
 OUTPUTS:
    None
 OPTIONAL OUTPUT PARAMETERS:
    None
 ACCEPTED KEY-WORDS:
    help      = If set, print this help
 COMMON BLOCKS:
    None
 SIDE EFFECTS:
    None
 RESTRICTIONS:
    The dustem idl wrapper must be installed
 PROCEDURE:
    None
 EXAMPLES
    dustem_init
    dir=getenv('DUSTEM_SOFT_DIR')+'/src/dustem3.8_web/'
    st=dustem_read_all(dir)
    dirout=getenv('DUSTEM_DAT')
    dustem_write_all,st,dirout
 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.
</PRE><P>
<STRONG>(See /Users/jpb/Soft_Librairies/DUSTEM/src/idl/dustem_write_all.pro)</STRONG><P>
<HR>
 
</body>
</html>