Read curves in Python
This recipe reads one curve of a well log into pandas. client is an ophiolite.Client for your project — see Build on Ophiolite for a key and the SDK.
log = next(a for a in client.assets() if a["name"] == "Gamma ray log")data = client.read(log["asset_id"], log["revision"], ["GR"])frame, meta = data.to_frame() # one column per curve, indexed by depthprint(meta.axis.unit, frame.head())The read is of that exact version: log["revision"] names it, and a newer version of the log does not change
what you read here. Missing samples stay missing (NaN), never zero; the depth unit (meta.axis.unit), curve
units and the depth reference are the source’s own declarations (data.descriptors[0]). To read a later version, list the
assets again and read its new revision.
A refusal says what to do: PermissionRefused (ask the owner to share the log with you), Unavailable (the
log or that version is not readable to you), VerificationFailed (the bytes did not match their digest; read
again). Each error carries the server’s remedy and request_id.
