dustem_initialize_sed.pro 1.74 KB
FUNCTION dustem_initialize_sed,Nsed,help=help

;+
; NAME:
;    dustem_initialize_sed
; PURPOSE:
;    Initializes an empty Dustem SED structure
; CATEGORY:
;    DUSTEM Wrapper
; CALLING SEQUENCE:
;    st=dustem_initialize_sed(Nsed[,/help])
; INPUTS:
;    Nsed: Number of elements in the SED structure
; OPTIONAL INPUT PARAMETERS:
;    kNone
; OUTPUTS:
;    st = SED structure
;    The structure contains the following tags
;      instru  : name of the instrument. Actually not used by DustemWrap.
;      filter  : name of the filter. Actually defines the wavelength, the flux convention, etc ...
;      wave    : wavelength in microns. Actually not used by DustemWrap.
;      spec    : Total intensity Intensity (a.k.a. Stokes I)
;      error   : uncertainty on spec = sqrt(variance) on spec (a.k.a. sqrt(sigmaII))
;      sigmaII : = error^2 (for completness on sigmas)
;      StokesQ : Stokes Q intensity
;      sigmaQQ : variance on Q
;      StokesU : Stokes U intensity
;      sigmaUU : variance on U
;      sigmaIQ : IQ covariance
;      sigmaIU : IU covariance
;      sigmaQU : QU covariance
; OPTIONAL OUTPUT PARAMETERS:
;    None
; ACCEPTED KEY-WORDS:
;    help                  = if set, print this help
; COMMON BLOCKS:
;    None
; SIDE EFFECTS:
;    None
; RESTRICTIONS:
;    None
; PROCEDURE:
;    Straightforward
; EXAMPLES
;    st=dustem_initialize_sed(10)
;    help,st
; MODIFICATION HISTORY:
;    Written by JPB 
;-

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

;one_st={instru:'',filter:'',wave:0.,spec:0.,error:0.}
one_st={instru:'',filter:'',wave:0.,spec:0.,error:0.,sigmaII:0.,StokesQ:0.,sigmaQQ:0.,StokesU:0.,sigmaUU:0.,sigmaIQ:0.,sigmaIU:0.,sigmaQU:0.}
sed=replicate(one_st,Nsed)

the_end:
RETURN,sed

END