stglib.indexvel.parse_qrev_xml

stglib.indexvel.parse_qrev_xml(doc, negateq=False, xarray=False)[source]

Parse XML output from QRev and return as a Pandas DataFrame

Parameters
  • doc (dict) – XML document as generated by xmltodict.parse() of the QRev XML file.

  • negateq (bool or list of bools, optional, default False) –

    Negate q (discharge) values. Useful for changing the upstream/ downstream convention. Default False

    If negateq is a single bool, negate all transects.

    If negateq is a a list of bools, only negate those whose value is True

  • xarray (bool, optional, default False) – If True, return an xarray Dataset

Returns

pandas DataFrame of relevant values extracted from the QRev XML tree.

if xarray is True, returns an xarray Dataset

Return type

pandas.DataFrame