open result files
Logical result collections spanning one or more recorder files.
Functions:
open_results
open_results(source: Union[PathInput, Iterable[PathInput]], *, format: Optional[str] = None, registry: ResultReaderRegistry = reader_registry, **reader_options: Any) -> ResultSet
Open one recorder's output without loading every response history.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
source
|
Union[PathInput, Iterable[PathInput]]
|
File path, glob string, or iterable of paths. Globs are sorted lexicographically. Select only partitions from the same recorder/run. |
required |
format
|
Optional[str]
|
Explicit registered format name, for example |
None
|
registry
|
ResultReaderRegistry
|
Reader registry. Usually leave the shared default unchanged. |
reader_registry
|
**reader_options
|
Any
|
Additional options forwarded to each reader factory. The built-in VTKHDF reader currently accepts only a path. |
{}
|
Returns:
| Name | Type | Description |
|---|---|---|
ResultSet |
ResultSet
|
Collection owning the readers. Close it or use a with block. |
Raises:
| Type | Description |
|---|---|
FileNotFoundError
|
No files match, or a supplied path does not exist. |
ResultFormatError
|
The file format is unregistered or a reader rejects the file. Timestamp consistency is checked when results.times is read. |
Examples:
Open a serial file:
from femora.results import open_results
with open_results("results/response0.vtkhdf") as results:
print(results.available_point_responses)
Read one point from partitioned output:
with open_results("results/response*.vtkhdf") as results:
point = results.nearest_point((0, 0, 0), tolerance=0.01)
ax = results.point_history("acceleration", point, component="x")
time = results.times
Note
This reads existing output, not a live analysis. It does not create recorders, run OpenSees, merge partition meshes, convert units, or add ground acceleration. A finite history alone does not prove stability.