def v(dose)
      raise RangeError, "Argument 'dose' cannot be negative." if dose.to_f < 0
      # How many dose values are higher than the threshold?
      num_above = (@doses.ge dose.to_f).where.length
      # Divide by total number of elements and convert to percentage:
      return num_above / @doses.length.to_f * 100
    end
def v(dose)
      raise RangeError, "Argument 'dose' cannot be negative." if dose.to_f < 0
      # How many dose values are higher than the threshold?
      num_above = (@doses.ge dose.to_f).where.length
      # Divide by total number of elements and convert to percentage:
      return num_above / @doses.length.to_f * 100
    end
Calculates the percentage of the volume that receives a dose higher than
 or equal to the specified dose.

 @param [#to_f] dose the dose threshold value to apply to the dose distribution (in units of Gy)
 @return [Float] the corresponding percentage
 @example Calculate the low dose spread (e.g. the percentage of the lung that receives a dose higher than 5 Gy):
   coverage_low = lung_distribution.v(5)
 @example Calculate the high dose spread (e.g. the percentage of the lung that receives a dose higher than 20 Gy):
   coverage_high = lung_distribution.v(20)