FUNCTION dustem_compute_polext ,p_dim,sti,POLEXT_spec,_extra=extra,out_st=out_st,dustem_qext,dustem_uext,Q_ext,U_ext ;CREATED AS A CONSEQUENCE OF THE INCLUSION OF THE PLUGINS ;written to homogonize DustEM IF not keyword_set(sti) THEN BEGIN dustem_activate_plugins,p_dim/(*(*!dustem_fit).param_init_values) sti=dustem_run(p_dim) ENDIF POLEXT_spec = sti.polext.ext_tot * (*!dustem_HCD)/1.0e21 ; ;ADDING PLUGIN TO SPECTRUM---------------- scopes=tag_names((*!dustem_plugin)) IF scopes[0] NE 'NONE' THEN BEGIN ;IF ptr_valid(!dustem_plugin) THEN BEGIN for i=0L,n_tags(*!dustem_plugin)-1 do begin if total(strsplit((*(*!dustem_plugin).(i).scope),'+',/extract) eq 'ADD_EXT') then POLEXT_spec+=(*(*!dustem_plugin).(i).spec)[*,0] endfor ENDIF dustem_polext = interpol(POLEXT_spec,sti.polext.wav,(*!dustem_data.polext).wav) return, dustem_polext END