Commit d0eb81ec7e6819eda178a33d81a52f07e32f6c93

Authored by Annie Hughes
2 parents f197ecae 2449233a
Exists in master

Merge branch 'master' of https://gitlab.irap.omp.eu/OV-GSO-DC/dustem-wrapper_idl

src/idl/dustem_plugin_stellar_population.pro
... ... @@ -95,7 +95,7 @@ paramtag=strarr(Nparam)
95 95 ii=0L
96 96 FOR i=0L,Nparam-1 DO BEGIN
97 97 ij=index2ij([i],[Nstars,2])
98   - IF ij[0,1] EQ 0 THEN cc='dist to' ELSE cc='N of '
  98 + IF ij[0,1] EQ 0 THEN cc='dist to ' ELSE cc='N of '
99 99 paramtag[ii]=cc+spectral_types[ij[0,0]]
100 100 ii=ii+1
101 101 ENDFOR
... ...
src/idl/dustem_stellarpopisrf_example.pro
... ... @@ -118,23 +118,19 @@ dustem_define_la_common
118 118 ;; Here we attempt to fit the distance to a single O7V star
119 119 ;; Other ISRF contributions are fixed to ~zero
120 120 toto=dustem_plugin_stellar_population(/initialize)
  121 +;=== get the parameter tagnames
  122 +toto=dustem_plugin_stellar_population(paramtag=paramtag)
121 123  
122   -Nstars=n_elements(!dustem_plugin_stellar_population)
123   -params=fltarr(Nstars,2)
  124 +;stop
124 125 spt='O7V'
125   -ind=where(!dustem_plugin_stellar_population.spt EQ spt,count)
126   -ij=lonarr(2,2)
127   -ij[*,0]=ind
128   -ij[0,1]=0 ;This is N
129   -ij[1,1]=1 ;This is dist
130   -indexes=ij2index(ij,[Nstars,2])
131   -print,indexes
132   -
133   -pd = ['dustem_plugin_stellar_population_'+strtrim(indexes[0]+1,2)]; ;distance to O7V star
  126 +ind1=where(paramtag EQ 'dist to '+spt,count1)
  127 +ind2=where(paramtag EQ 'N of '+spt,count2)
  128 +
  129 +pd = ['dustem_plugin_stellar_population_'+strtrim(ind1+1,2)]; ;distance to O7V star
134 130 true_vals = [2.] ; true distance to the star
135 131 iv = true_vals+[1.] ; distance we use as an initial guess
136 132  
137   -fpd=['dustem_plugin_stellar_population_'+strtrim(indexes[1]+1,2) , $ ;number of O7V star (FIXED)
  133 +fpd=['dustem_plugin_stellar_population_'+strtrim(ind2+1,2) , $ ;number of O7V star (FIXED)
138 134 '(*!dustem_params).G0'] ; Mathis field (FIXED TO ~ZERO)
139 135 fiv=[1.,1.e-12]
140 136  
... ...