Commit 6a523633a45d41461f405de38c273cb5b41889f0

Authored by Annie Hughes
1 parent 6562282d
Exists in master

unknown

src/idl/dustem_plugin_modify_dust_pol.pro
... ... @@ -3,33 +3,47 @@ FUNCTION dustem_plugin_modify_dust_pol, key=key, val=val, scope=scope, paramtag=
3 3 ;+
4 4 ; NAME:
5 5 ; dustem_plugin_modify_dust_pol
  6 +;
6 7 ; PURPOSE:
7   -; modifies stokes Q,U values for dust polarization in st according to the given keywords and values
  8 +; modifies Emission Stokes Q,U values for dust polarization in st according to the given keywords and values
  9 +;
8 10 ; CATEGORY:
9   -; DUSTEM Wrapper
  11 +; DustEMWrap, Plugin, Mid-level, Distributed
  12 +;
10 13 ; CALLING SEQUENCE:
11 14 ; a=dustem_plugin_modify_dust_pol(st,[key=][val=][,scope=][,paramtag=][,paramdefault=][,/help])
  15 +;
12 16 ; INPUTS:
13 17 ; st = dustem structure
  18 +;
14 19 ; OPTIONAL INPUT PARAMETERS:
15 20 ; key = input parameter numbers (first = polarization fraction in %, default=1.%, second=polarization angle, default=0.)
16 21 ; val = input parameter values
  22 +;
17 23 ; OUTPUTS:
18 24 ; out = array containing the stokes emission parameters associated to the dust/synchrotron component or a concatenated version for both
  25 +;
19 26 ; OPTIONAL OUTPUT PARAMETERS:
20 27 ; scope = if set, returns only the scope of the pluggin
21 28 ; paramtag = if set, returns only the parameter tags
  29 +;
22 30 ; ACCEPTED KEY-WORDS:
23 31 ; help = if set, print this help
  32 +;
24 33 ; COMMON BLOCKS:
25 34 ; None
  35 +;
26 36 ; SIDE EFFECTS:
27 37 ; None
  38 +;
28 39 ; RESTRICTIONS:
29 40 ; The dustem fortran code must be installed
30 41 ; The dustem idl wrapper must be installed
31   -; PROCEDURE:
32   -; This is a dustem plugin
  42 +;
  43 +; MODIFICATION HISTORY:
  44 +; Written by IC 2022
  45 +; Evolution details on the DustEMWrap gitlab.
  46 +; See http://dustemwrap.irap.omp.eu/ for FAQ and help.
33 47 ;-
34 48  
35 49 IF keyword_set(help) THEN BEGIN
... ... @@ -74,9 +88,9 @@ Nwaves=(size(I))[1]
74 88 ;0/0 division in frac
75 89 ;since we divide by I we only need to avoid its null indices
76 90  
  91 +frac_model=P*0.
77 92 indI = where(I ne 0, countI)
78   -if countI ne 0 then frac_model = P*0. & frac_model[indI] = P[indI]/I[indI] ;This is the polarization fraction in the model
79   -
  93 +if countI ne 0 then frac_model[indI] = P[indI]/I[indI] ;This is the polarization fraction in the model
80 94  
81 95 frac_used=frac_model*smallp_fact
82 96  
... ...
src/idl/dustem_plugin_modify_dust_polx.pro
... ... @@ -3,35 +3,50 @@ FUNCTION dustem_plugin_modify_dust_polx, key=key, val=val, scope=scope, paramtag
3 3 ;+
4 4 ; NAME:
5 5 ; dustem_plugin_modify_dust_polx
  6 +;
6 7 ; PURPOSE:
7   -; modifies stokes Q,U values for dust polarization in st according to the given keywords and values
  8 +; modifies Extinction Stokes Q,U values for dust polarization in st according to the given keywords and values
  9 +;
8 10 ; CATEGORY:
9   -; DUSTEM Wrapper
  11 +; DustEMWrap, Plugin, Mid-level, Distributed
  12 +;
10 13 ; CALLING SEQUENCE:
11 14 ; a=dustem_plugin_modify_dust_polx(st,[key=][val=][,scope=][,paramtag=][,/help])
  15 +;
12 16 ; INPUTS:
13 17 ; st = dustem structure
  18 +;
14 19 ; OPTIONAL INPUT PARAMETERS:
15 20 ; key = input parameter numbers (first = polarization fraction in %, default=1.%, second=polarization angle, default=0.)
16 21 ; val = input parameter values
  22 +;
17 23 ; OUTPUTS:
18 24 ; out = array containing the stokes emission parameters associated to the dust/synchrotron component or a concatenated version for both
  25 +;
19 26 ; OPTIONAL OUTPUT PARAMETERS:
20 27 ; scope = if set, returns only the scope of the pluggin
21 28 ; paramtag = if set, returns only the parameter tags
  29 +;
22 30 ; ACCEPTED KEY-WORDS:
23 31 ; help = if set, print this help
  32 +;
24 33 ; COMMON BLOCKS:
25 34 ; None
  35 +;
26 36 ; SIDE EFFECTS:
27 37 ; None
  38 +;
28 39 ; RESTRICTIONS:
29 40 ; The dustem fortran code must be installed
30 41 ; The dustem idl wrapper must be installed
31   -; PROCEDURE:
32   -; This is a dustem plugin
  42 +;
  43 +; MODIFICATION HISTORY:
  44 +; Written by IC 2022
  45 +; Evolution details on the DustEMWrap gitlab.
  46 +; See http://dustemwrap.irap.omp.eu/ for FAQ and help.
33 47 ;-
34 48  
  49 +
35 50 IF keyword_set(help) THEN BEGIN
36 51 doc_library,'dustem_plugin_modify_dust_polx'
37 52 out=0.
... ... @@ -88,7 +103,8 @@ ENDIF
88 103 ;since we divide by I we only need to avoid its null indices
89 104  
90 105 indx = where(EXT_spec ne 0, countx)
91   -if countx ne 0 then frac_model = POLEXT_spec*0. & frac_model[indx] = POLEXT_spec[indx]/EXT_spec[indx] ;This is the polarization fraction in the model
  106 +frac_model = POLEXT_spec*0.
  107 +if countx ne 0 then frac_model[indx] = POLEXT_spec[indx]/EXT_spec[indx] ;This is the polarization fraction in the model
92 108  
93 109  
94 110 frac_used=frac_model*smallp_fact
... ...
src/idl/dustem_plugin_modify_isrf.pro
... ... @@ -83,7 +83,7 @@ ENDIF
83 83 if isa(!dustem_isrf_file) then user_ISRF = dustem_read_isrf(*!dustem_isrf_file)
84 84  
85 85 out=amp*User_ISRF.isrf
86   -
  86 +
87 87 the_end:
88 88 scope='USER_ISRF'
89 89  
... ...