anchor.diff:       real(dp),allocatable :: j_nu_var(:)          ! independent emissivity variable
        real(dp),allocatable :: log10_j_nu_var(:)    ! independent emissivity variable [Log10]
        type(pdf_dp),allocatable :: j_nu(:)          ! emissivity
  -     type(pdf_dp),allocatable :: e_nu(:)          ! emissivity for diffusion (includes scattering)
   
        ! integer :: beta ! power of the photon energy sampling
        ! real(dp),allocatable  :: a(:) ! Energy of the emitted photon = a*nu^beta * incoming energy
  
positive.code:     nu = 10._dp**nu
  
    end subroutine dust_sample_emit_frequency
  
    subroutine dust_sample_emit_frequency_eta_nu(d,jnu_var_id,jnu_var_frac,nu)
  
      implicit none
  
      type(dust),intent(in)          :: d
      integer,intent(in)             :: jnu_var_id
      real(dp),intent(in)            :: jnu_var_frac
      real(dp),intent(out)           :: nu
  
      real(dp) :: nu1,nu2,xi
  
      call random(xi)
  
      nu1 = sample_pdf(d%e_nu(jnu_var_id),xi)
      nu2 = sample_pdf(d%e_nu(jnu_var_id+1),xi)
  
      nu = log10(nu1) + jnu_var_frac * (log10(nu2) - log10(nu1))
      nu = 10._dp**nu
  
    end subroutine dust_sample_emit_frequency_eta_nu
  
    subroutine dust_scatter_peeloff(d,nu,a,s,a_req)
      implicit none
  
negative.code:   public :: dust_scatter_peeloff
    public :: dust_sample_emit_probability
    public :: dust_sample_emit_frequency
    public :: dust_jnu_var_pos_frac
  
    type dust
  