vunits.convert.freq_to_energy

vunits.convert.freq_to_energy(freq, units_in='Hz', return_quantity=False, units_out='J')

Converts frequency to energy

Parameters
  • freq (float) – Frequency

  • units_in (str, optional) – Units corresponding to energy. Default is ‘Hz’.

  • return_quantity (bool, optional) – If True, returns Quantity. Otherwise, returns float.

  • units_out (str, optional) – Units corresponding to energy. Default is ‘J’.

Returns

energy – Energy corresponding to units_out.

Return type

float or Quantity obj