PatchAttrs
PatchAttrs(
data_type: Literal[’‘, ’velocity’, ‘strain_rate’, ‘phase’, ‘strain’, ‘temperature’, ‘temperature_gradient’] = ““,
data_category: Literal[’‘, ’DAS’, ‘DTS’, ‘DSS’] =”“,
data_units: None | str | Quantity = None,
instrument_id: str =”“,
cable_id: str =”“,
tag: str =”“,
station: str =”“,
network: str =”“,
history: str | collections.abc.Sequence[str, collections.abc.Sequence[str]] = None,
dims: str =”“,
coords: dascore.utils.mapping.FrozenDict[str, CoordSummary] = None,
**extra_data ,
)-> None
The expected attributes for a Patch.
Parameter
Parameter | Description |
---|---|
data_type | The type of data collected (the meaning of the data). Valid values are (’‘, ’velocity’, ‘strain_rate’, ‘phase’, ‘strain’, ‘temperature’, ‘temperature_gradient’). |
data_category | The category of instrument which recorded the data. Valid values are (’‘, ’DAS’, ‘DTS’, ‘DSS’). |
data_units | The units in which the data are recorded (e.g., strain_rate). |
time_step |
The temporal sample spacing. If the patch is not evenly sampled this should be set to np.timedelta64('NaT')
|
time_min | The time represented by the first sample in the patch. |
time_max | The time represented by the last sample in the patch. |
time_units | The units of the time axis (in most cases should be seconds) or specified by datetime64 arrays in time coordinate. |
distance_step | The spatial sampling rate, set to NaN if the patch is not evenly sampled in space. |
distance_min | The along-fiber distance of the first channel in the patch. |
distance_max | The along-fiber distance of the last channel in the patch. |
d_distance | The spatial sampling rate, set to NaN if the patch is not evenly sampled in space. |
distance_units | The units of the distance axis. In most cases should be ‘m’. |
instrument_id | A unique identifier of the instrument. |
cable_id | A Unique identifier of the cable, or composition of cables. |
distance_units | The units of distance, defaults to m. |
network | The network code an ascii-compatible string up to 2 characters. |
station | The station code an ascii-compatible string up to 5 characters |
instrument_id | The identifier of the instrument. |
dims | A tuple of dimension names in the same order as the data dimensions. |
tag | A custom string up to 100 chars. |
station | A network code (up to 8 chars). |
network | A network code (up to 8 chars). |
history | A list of strings indicating what processing has occurred on the patch. |
These attributes go into the HDF5 index used by dascore. Therefore, when they are changed the index version needs to be incremented so previous indices are invalidated.
Methods
Name | Description |
---|---|
coords_from_dims | Return coordinates from dimensions assuming evenly sampled. |
drop_private | Drop all private attributes. |
flat_dump | Flatten the coordinates and dump to dict. |
get | dict-like get method. |
items | Yield (attribute, values) just like dict.items(). |
new | Create new instance with some attributed updated. |
rename_dimension | Rename one or more dimensions if in kwargs. Return new PatchAttrs. |
update | Update an attribute in the model, return new model. |