Blame view

src/idl/dustem_create_continuum.pro 1.38 KB
b5ccb706   Jean-Philippe Bernard   improved to fit p...
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
FUNCTION dustem_create_continuum,key=key,val=val,help=help

;+
; NAME:
;    dustem_create_continuum
; PURPOSE:
;    Make products for a given flight
; CATEGORY:
;    DUSTEM Wrapper
; CALLING SEQUENCE:
;    cont=dustem_create_continuum([,key=][,val=])
; 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:
;    This is a dustem pluggin
; EXAMPLES
;
; MODIFICATION HISTORY:
;    Written by JPB 
;-

IF keyword_set(help) THEN BEGIN
  doc_library,'dustem_create_continuum'
  output=0.
  goto,the_end
ENDIF

;default values of input parameters
temp=1000.
ampl=1.d-2

IF keyword_set(key) THEN BEGIN 
  a=where(key EQ 1,count1)
  b=where(key EQ 2,count2)
  IF count1 NE 0 then temp=(val(a))(0)
  IF count2 NE 0 then ampl=(val(b))(0)
ENDIF
427f1205   Jean-Michel Glorian   version 4.2 merged
53
  
b5ccb706   Jean-Philippe Bernard   improved to fit p...
54
55
56
57
58
59
60
61
62
IF !dustem_which EQ 'DESERT' THEN BEGIN
  lambir=((*!dustem_params).gemissiv.lambir)
ENDIF ELSE BEGIN
  lambir=((*!dustem_params).lambda.lambda)
ENDELSE

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

b5ccb706   Jean-Philippe Bernard   improved to fit p...
64
65
the_end:
RETURN,output
427f1205   Jean-Michel Glorian   version 4.2 merged
66
67
  
END