Spectrum.divide(other, sampling='min', method='linear', fill_value=0)[source]

Divide Spectrum and other, element-wise

  • other (scalar, sequence, or Spectrum) – Any accepted data structure

  • sampling ({'min', 'left', 'right'} or float, optional) –

    Method used for computing wavelength sampling when Spectrum resampling is required prior to adding

    • ’min’ uses the minimum sampling in either Spectrum (Default)

    • ’left’ uses the minimum sampling in the left Spectrum

    • ’right’ uses the minimum sampling in the right Spectrum

    • <float> uses the float value specified

  • method ({'linear', 'quadratic', 'cubic'}, optional) –

    • ‘linear’ uses linear interpolation (Default)

    • ’quadratic’ uses second-order spline interpolation

    • ’cubic’ uses third-order spline interpolation

  • fill_value (float or array_like, optional) –

    • If a float, this value will be used to fill in requested points outside of the data range.

    • If a two-element array, the first element is used to fill value_new < value[0] and the second element is used for value_new > value[-1].

    • If not provided, the default is 0.


result – Result of the arithmetic operation.

Return type