Blame view

src/idl/dustem_plugin_continuum.pro 1.5 KB
759a527d   Ilyes Choubani   general update
1
FUNCTION dustem_plugin_continuum,key=key,val=val,scope=scope,paramtag=paramtag,help=help
b5ccb706   Jean-Philippe Bernard   improved to fit p...
2
3
4

;+
; NAME:
cbf75ef0   Ilyes Choubani   dustem_init_plugi...
5
;    dustem_plugin_continuum
b5ccb706   Jean-Philippe Bernard   improved to fit p...
6
7
8
9
10
; PURPOSE:
;    Make products for a given flight
; CATEGORY:
;    DUSTEM Wrapper
; CALLING SEQUENCE:
cbf75ef0   Ilyes Choubani   dustem_init_plugi...
11
;    cont=dustem_plugin_continuum([,key=][,val=])
b5ccb706   Jean-Philippe Bernard   improved to fit p...
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
; INPUTS:
;    
; OPTIONAL INPUT PARAMETERS:
;    key  = input parameter number
;    val  = input parameter value
; OUTPUTS:
;    cont = continuum spectrum (on dustem wavelengths)
; OPTIONAL OUTPUT PARAMETERS:
;    None
; ACCEPTED KEY-WORDS:
;    help                  = if set, print this help
; COMMON BLOCKS:
;    None
; SIDE EFFECTS:
;    None
; RESTRICTIONS:
;    None
; PROCEDURE:
cbf75ef0   Ilyes Choubani   dustem_init_plugi...
30
;    This is a dustem plugin
b5ccb706   Jean-Philippe Bernard   improved to fit p...
31
32
; EXAMPLES
;
4750086c   Ilyes Choubani   nouvelle philosph...
33
;
b5ccb706   Jean-Philippe Bernard   improved to fit p...
34
35
36
37
; MODIFICATION HISTORY:
;    Written by JPB 
;-

452c334e   Ilyes Choubani   Implementation Of...
38

b5ccb706   Jean-Philippe Bernard   improved to fit p...
39
IF keyword_set(help) THEN BEGIN
cbf75ef0   Ilyes Choubani   dustem_init_plugi...
40
  doc_library,'dustem_plugin_continuum'
9e6a6a33   Ilyes Choubani   a JP /BUT HAS FAU...
41
  output=0.
b5ccb706   Jean-Philippe Bernard   improved to fit p...
42
43
44
  goto,the_end
ENDIF

4750086c   Ilyes Choubani   nouvelle philosph...
45

b5ccb706   Jean-Philippe Bernard   improved to fit p...
46
47
48
;default values of input parameters
temp=1000.
ampl=1.d-2
cbf75ef0   Ilyes Choubani   dustem_init_plugi...
49
scope='ADD_SED'
759a527d   Ilyes Choubani   general update
50
paramtag=['T_BB (K)','Amp']
452c334e   Ilyes Choubani   Implementation Of...
51

b5ccb706   Jean-Philippe Bernard   improved to fit p...
52
53
54
IF keyword_set(key) THEN BEGIN 
  a=where(key EQ 1,count1)
  b=where(key EQ 2,count2)
452c334e   Ilyes Choubani   Implementation Of...
55
  
b5ccb706   Jean-Philippe Bernard   improved to fit p...
56
57
  IF count1 NE 0 then temp=(val(a))(0)
  IF count2 NE 0 then ampl=(val(b))(0)
452c334e   Ilyes Choubani   Implementation Of...
58
59
   
  
b5ccb706   Jean-Philippe Bernard   improved to fit p...
60
ENDIF
427f1205   Jean-Michel Glorian   version 4.2 merged
61
  
cbf75ef0   Ilyes Choubani   dustem_init_plugi...
62
63
64
65
66
67
68
; IF !dustem_which EQ 'DESERT' THEN BEGIN
;   lambir=((*!dustem_params).gemissiv.lambir)
; ENDIF ELSE BEGIN
;   lambir=((*!dustem_params).lambda.lambda)
; ENDELSE

lambir=dustem_get_wavelengths()
b5ccb706   Jean-Philippe Bernard   improved to fit p...
69
70
71
72

;=== normalize spectrum to the requested amplitude.
norm = max(dustem_planck_function(temp,lambir))
output = ampl*dustem_planck_function(temp,lambir)/norm
427f1205   Jean-Michel Glorian   version 4.2 merged
73

b5ccb706   Jean-Philippe Bernard   improved to fit p...
74
75
the_end:
RETURN,output
427f1205   Jean-Michel Glorian   version 4.2 merged
76
77
  
END