update_attrs

function of dascore.proc.basic source

update_attrs(
    self: Patch ,
    **attrs ,
)-> ‘PatchType’

Update patch attrs and return a new Patch.

Parameters

Parameter Description
**attrs Attrs to add/update. Nested coords payloads are not accepted here;
use patch.update_coords(...) for coordinate changes.

Examples

import dascore as dc
patch = dc.get_example_patch()

# Update existing attributes
updated = patch.update_attrs(instrument_type="DAS")

# Add new custom attributes
with_custom = patch.update_attrs(processing_date="2024-01-01")