{
 "library": "tidalcore",
 "version": "0.9.3",
 "licence": "MIT",
 "python_requires": ">=3.10",
 "conventions": [
  "Levels keep the units of the input file and are never converted.",
  "Times are numpy.datetime64 in UTC; a file without a zone is an error.",
  "Phase is a lag in degrees at the solution reference time.",
  "Durations are strings with a unit suffix such as 3h, 25h, 72h, 18.6y.",
  "Nothing mutates in place."
 ],
 "objects": [
  {
   "name": "Record",
   "built_by": "readers",
   "attributes": [
    "time",
    "level",
    "flags",
    "station",
    "units",
    "reference",
    "n",
    "missing",
    "step",
    "span"
   ],
   "methods": [
    "subset(start, end)",
    "to_frame()"
   ]
  },
  {
   "name": "Solution",
   "built_by": "analyse",
   "attributes": [
    "names",
    "amplitudes",
    "phases",
    "errors",
    "snr",
    "ref_time",
    "nodal",
    "weights_used"
   ],
   "methods": [
    "table(top=None)",
    "to_json(path, include=...)",
    "to_frame()"
   ]
  }
 ],
 "functions": [
  {
   "name": "read_gauge",
   "signature": "read_gauge(path, format=\"auto\", tz=None)",
   "returns": "Record",
   "raises": [
    "FormatError",
    "TimeZoneUnknownError"
   ],
   "since": "0.1.0"
  },
  {
   "name": "analyse",
   "signature": "analyse(record, constituents=\"auto\", nodal=True, ref_time=None, min_coverage=0.75)",
   "returns": "Solution",
   "raises": [
    "ShortRecordError",
    "CoverageError",
    "UnknownConstituentError"
   ],
   "since": "0.7.0"
  },
  {
   "name": "reconstruct",
   "signature": "reconstruct(solution, time)",
   "returns": "ndarray",
   "raises": [],
   "since": "0.1.0"
  },
  {
   "name": "residual",
   "signature": "residual(record, solution)",
   "returns": "ndarray",
   "raises": [],
   "since": "0.2.0"
  },
  {
   "name": "resolvable",
   "signature": "resolvable(span, catalogue=\"default\")",
   "returns": "tuple[str]",
   "raises": [],
   "since": "0.3.0"
  },
  {
   "name": "catalogue",
   "signature": "catalogue(name=\"default\")",
   "returns": "dict",
   "raises": [
    "UnknownConstituentError"
   ],
   "since": "0.1.0"
  },
  {
   "name": "infer",
   "signature": "infer(solution, pairs=DEFAULT_PAIRS)",
   "returns": "Solution",
   "raises": [],
   "since": "0.8.0"
  },
  {
   "name": "fill_gaps",
   "signature": "fill_gaps(record, solution, max_gap=\"72h\")",
   "returns": "Record",
   "raises": [],
   "since": "0.9.0"
  },
  {
   "name": "levels",
   "signature": "levels(solution, window=\"18.6y\")",
   "returns": "dict",
   "raises": [],
   "since": "0.6.0"
  },
  {
   "name": "rms",
   "signature": "rms(x)",
   "returns": "float",
   "raises": [],
   "since": "0.2.0"
  },
  {
   "name": "qc.flag_gaps",
   "signature": "qc.flag_gaps(record, max_gap=\"3h\")",
   "returns": "Record",
   "raises": [],
   "since": "0.6.0"
  },
  {
   "name": "qc.flag_spikes",
   "signature": "qc.flag_spikes(record, window=\"25h\", k=6)",
   "returns": "Record",
   "raises": [],
   "since": "0.6.0"
  },
  {
   "name": "qc.flag_flat",
   "signature": "qc.flag_flat(record, window=\"2h\")",
   "returns": "Record",
   "raises": [],
   "since": "0.6.0"
  },
  {
   "name": "qc.summary",
   "signature": "qc.summary(record)",
   "returns": "str",
   "raises": [],
   "since": "0.6.0"
  },
  {
   "name": "plots.decomposition",
   "signature": "plots.decomposition(record, solution, start=None, days=7)",
   "returns": "Figure",
   "raises": [],
   "since": "0.6.0"
  }
 ],
 "exceptions": [
  {
   "name": "TidalcoreError",
   "note": "base class for everything raised deliberately"
  },
  {
   "name": "ShortRecordError",
   "note": "constituents not separable over the span"
  },
  {
   "name": "CoverageError",
   "note": "usable samples below min_coverage after flags"
  },
  {
   "name": "UnknownConstituentError",
   "note": "name absent from the catalogue"
  },
  {
   "name": "FormatError",
   "note": "file does not match declared format"
  },
  {
   "name": "TimeZoneUnknownError",
   "note": "timestamps carry no zone and tz not supplied"
  }
 ],
 "exit_codes": {
  "0": "success",
  "2": "bad usage",
  "3": "record too short or sparse",
  "4": "input could not be read"
 }
}