Blame view

src/idl/dustem_plugin_continuum.pro 1.46 KB
cbf75ef0   Ilyes Choubani   dustem_init_plugi...
1
FUNCTION dustem_plugin_continuum,key=key,val=val,scope=scope,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'
452c334e   Ilyes Choubani   Implementation Of...
50

b5ccb706   Jean-Philippe Bernard   improved to fit p...
51
52
53
IF keyword_set(key) THEN BEGIN 
  a=where(key EQ 1,count1)
  b=where(key EQ 2,count2)
452c334e   Ilyes Choubani   Implementation Of...
54
  
b5ccb706   Jean-Philippe Bernard   improved to fit p...
55
56
  IF count1 NE 0 then temp=(val(a))(0)
  IF count2 NE 0 then ampl=(val(b))(0)
452c334e   Ilyes Choubani   Implementation Of...
57
58
   
  
b5ccb706   Jean-Philippe Bernard   improved to fit p...
59
ENDIF
427f1205   Jean-Michel Glorian   version 4.2 merged
60
  
cbf75ef0   Ilyes Choubani   dustem_init_plugi...
61
62
63
64
65
66
67
; 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...
68
69
70
71

;=== 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
72

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