anchor.diff:      type(photon),intent(inout) :: p
       ! the emitted photon
   
  -    real(dp) :: xi, pos(3)
       integer :: i_source
   
       ! Set position to that of one of the point sources
  -    call random(xi)
  -    i_source = int(xi * real(size(src%position_collection, 2), dp))
  -    pos = src%position_collection(:,i_source)
  -    p%r%x = pos(1)
  -    p%r%y = pos(2)
  -    p%r%z = pos(3)
  +    i_source = sample_pdf(src%collection_pdf)
  +    p%r = src%position_collection(i_source)
   
       ! Sample isotropic angle
       call random_sphere_angle3d(p%a)
  
positive.code:      type(vector3d_dp) :: position
  
       ! Collection of positions (used for PointSourceCollection)
       real(dp),allocatable :: position_collection(:,:)
  
       ! Spot position and size
       integer :: n_spots = 0
  
negative.code: 
         s%type = 8
  
         call mp_read_keyword(group, '.', 'peeloff', s%peeloff)
         call mp_read_array_auto(group, 'position', position_collection)
         call mp_read_array_auto(group, 'luminosity', luminosity_collection)
  
         s%position_collection%x = position_collection(1,:)
         s%position_collection%y = position_collection(2,:)
         s%position_collection%z = position_collection(3,:)
  
         s%luminosity = sum(luminosity_collection)
         call set_pdf(s%collection_pdf, luminosity_collection)
  
         call set_spectrum(group, s%freq_type, s%spectrum, s%temperature)
  
  