parseFrequencyArgumentToGHz

Return to directory of Todd's CASA extensions

Converts a string frequency into floating point in GHz. See also parseFrequencyArgument, parseAntennaArgument, and getBand. If the units are not present, then the value is assumed to be GHz if less than 1000, otherwise Hz

Usage:

au.parseFrequencyArgumentToGHz(bandwidth)
  • bandwidth: a string with units, e.g. '1.34GHz' (supported units: GHz, MHz, kHz, Hz)

Examples:

CASA <3>: au.parseFrequencyArgumentToGHz('56.4MHz')
  Out[3]: 0.056400000000000006
CASA <3>: au.parseFrequencyArgumentToGHz('318')
  Out[3]: 318.0
CASA <3>: au.parseFrequencyArgumentToGHz(318)
  Out[3]: 318.0

--Main.ToddHunter - 2014-03-06
Topic revision: r1 - 2014-03-06, ToddHunter
This site is powered by FoswikiCopyright © by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding NRAO Public Wiki? Send feedback