LAL  7.1.7.1-ab2cc12
Units.h File Reference

Prototypes

char * XLALUnitAsString (char *string, UINT4 length, const LALUnit *input)
 Returns the pointer to the input string, which is populated with the unit string if successful. More...
 
char * XLALUnitToString (const LALUnit *input)
 Allocates and returns a new string, which is populated with the unit string. More...
 
LALUnitXLALParseUnitString (LALUnit *output, const char *string)
 Returns the pointer output upon return or a pointer to newly allocated memory if output was NULL; on failure, XLALParseUnitString() returns NULL and sets xlalErrno to one of the following values: XLAL_ENOMEM if the routine was unable to allocate memory for the output or XLAL_EFAILED if the routine was unable to parse the unit string. More...
 
int XLALUnitNormalize (LALUnit *unit)
 Returns 0 upon success or XLAL_FAILURE if the input pointer is NULL, in which case xlalErrno is set to XLAL_EFAULT. More...
 
int XLALUnitCompare (const LALUnit *unit1, const LALUnit *unit2)
 Returns 0 if the the normal form of the two unit structures are the same or > 0 if they are different. More...
 
LALUnitXLALUnitMultiply (LALUnit *output, const LALUnit *unit1, const LALUnit *unit2)
 This function multiplies together the LALUnit structures *(input->unitOne) and *(input->unitTwo), thus allowing a module to eg, multiply two REAL8TimeSeries and give the resulting REAL8TimeSeries the correct units. More...
 
LALUnitXLALUnitDivide (LALUnit *output, const LALUnit *unit1, const LALUnit *unit2)
 UNDOCUMENTED. More...
 
LALUnitXLALUnitRaiseRAT4 (LALUnit *output, const LALUnit *input, const RAT4 *power)
 Raises a LALUnit structure to a rational power given by the RAT4 structure power. More...
 
LALUnitXLALUnitRaiseINT2 (LALUnit *output, const LALUnit *input, INT2 power)
 Raises a LALUnit structure to an integer power power. More...
 
LALUnitXLALUnitSquare (LALUnit *output, const LALUnit *input)
 Produces the square of a LALUnit structure. More...
 
LALUnitXLALUnitSqrt (LALUnit *output, const LALUnit *input)
 Produces the square-root of a LALUnit structure. More...
 
LALUnitXLALUnitInvert (LALUnit *output, const LALUnit *input)
 UNDOCUMENTED. More...
 
REAL8 XLALUnitPrefactor (const LALUnit *unit)
 Return the unit's prefactor. More...
 
int XLALUnitIsDimensionless (const LALUnit *unit)
 Return 1 if a unit is dimensionless, 0 otherwise. More...
 
REAL8 XLALUnitRatio (const LALUnit *unit1, const LALUnit *unit2)
 Return the ratio unit1 / unit2. More...
 

Go to the source code of this file.

Data Structures

struct  RAT4
 A four-byte rational number, used as a parameter structure for XLALUnitRaiseRAT4(). More...
 

Enumerations

enum  enumLALUnitNameSize { LALUnitNameSize = sizeof("strain") }
 
enum  enumLALUnitTextSize { LALUnitTextSize }
 

Variables

const CHAR lalUnitName [LALNumUnits][LALUnitNameSize]
 To convert a units structure to a string repesentation, we need to define the names of the basic units. More...
 
const LALUnit lalDimensionlessUnit
 dimensionless units More...
 
const LALUnit lalMeterUnit
 meter [m] More...
 
const LALUnit lalKiloGramUnit
 kilogram [kg] More...
 
const LALUnit lalSecondUnit
 second [s] More...
 
const LALUnit lalAmpereUnit
 Ampere [A]. More...
 
const LALUnit lalKelvinUnit
 Kelvin [K]. More...
 
const LALUnit lalStrainUnit
 Strain [1]. More...
 
const LALUnit lalADCCountUnit
 ADC count [count]. More...
 
const LALUnit lalHertzUnit
 Hertz [Hz]. More...
 
const LALUnit lalNewtonUnit
 Newton [N]. More...
 
const LALUnit lalJouleUnit
 Joule [J]. More...
 
const LALUnit lalWattUnit
 Watt [W ]. More...
 
const LALUnit lalPascalUnit
 Pascal [Pa]. More...
 
const LALUnit lalCoulombUnit
 Coulomb [C]. More...
 
const LALUnit lalVoltUnit
 Volt [V]. More...
 
const LALUnit lalOhmUnit
 Ohm [ \(\Omega\)]. More...
 
const LALUnit lalFaradUnit
 Farad [F]. More...
 
const LALUnit lalWeberUnit
 Weber [Wb]. More...
 
const LALUnit lalTeslaUnit
 Tesla [T]. More...
 
const LALUnit lalHenryUnit
 Henry [H]. More...
 
const LALUnit lalYottaUnit
 Yotta [1e24]. More...
 
const LALUnit lalZettaUnit
 Zetta [1e21]. More...
 
const LALUnit lalExaUnit
 Exa [1e18]. More...
 
const LALUnit lalPetaUnit
 Peta [1e15]. More...
 
const LALUnit lalTeraUnit
 Tera [1e12]. More...
 
const LALUnit lalGigaUnit
 Giga [1e9]. More...
 
const LALUnit lalMegaUnit
 Mega [1e6]. More...
 
const LALUnit lalKiloUnit
 Kilo [1e3]. More...
 
const LALUnit lalHectoUnit
 Hecto [1e2]. More...
 
const LALUnit lalDekaUnit
 Deka [1e1]. More...
 
const LALUnit lalDeciUnit
 Deci [1e-1]. More...
 
const LALUnit lalCentiUnit
 Centi [1e-2]. More...
 
const LALUnit lalMilliUnit
 Milli [1e-3]. More...
 
const LALUnit lalMicroUnit
 Micro [1e-6]. More...
 
const LALUnit lalNanoUnit
 Nano [1e-9]. More...
 
const LALUnit lalPicoUnit
 Pico [1e-12]. More...
 
const LALUnit lalFemtoUnit
 Femto [1e-15]. More...
 
const LALUnit lalAttoUnit
 Atto [1e-18]. More...
 
const LALUnit lalZeptoUnit
 Zepto [1e-21]. More...
 
const LALUnit lalYoctoUnit
 Yocto [1e-24]. More...
 
const LALUnit lalGramUnit
 Gram [1e-3]. More...
 
const LALUnit lalAttoStrainUnit
 AttoStrain [1e-18]. More...
 
const LALUnit lalPicoFaradUnit
 PicoFarad [1e-12 F]. More...