Method summary
- __init__(self)
- parse_unit(self, label, suppress_warnings = True, suppress_unknown = True)
- remove_dots(self, label)
- standardize(self, label)
Methods
- __init__(self)
- parse_unit(self, label, suppress_warnings = True, suppress_unknown = True)
Parses a string description of a unit e.g., 'g/cc'. if suppress_unkown is True and the label cannot be parsed, the returned unit is dimensionless otherwise UnableToParseUnits is raised.
- remove_dots(self, label)
Some LAS files contain units written like 'ohm.m', which this class cannot parse, so this function changes them from 'ohm.m' to 'ohm*m'.
- standardize(self, label)
returns a standard parseable string from a given label i.e. 'G/CC' -> 'g/cc' Throws an exception if it can't parse it.