anchor.diff:         if (zeit < tend) then
             if (zeit >= tstart) then
                if (all_laserfields(ii)%omega==0) then
  +                ! for fields without oscillation, we want 500 steps for the whole field
                   dt = min(dt,(all_laserfields(ii)%duration+2*all_laserfields(ii)%rampon)/500)
                else
                   ! if it's currently active, dt has to be at most TX(zeit)/minimum_steps_per_laser_period, where TX depends on zeit for chirped pulses
  
positive.code:                 dt = min(dt,TX/minimum_steps_per_laser_period)
               end if
            else if (zeit+dt > tstart) then
               ! if dt would go beyond the starttime, decrease it
               ! to go only from zeit to tstart
               dt = tstart - zeit
            end if
         end if
  
negative.code:     end do
    end function laserfields_smallest_TX
    !---------------------------------------------------------------------------
    !> This function gives the maximum timestep that resolves the current oscillation well.
    !> the global parameter minimum_steps_per_laser_period determines how large the timestep here is allowed to be.
    real(dp) function laserfields_largest_possible_dt(zeit,endzeit,global) result(dt)
      real(dp), intent(in) :: zeit
      real(dp), intent(in), optional :: endzeit
  