visualdynamics.io.escdf_objects¶
escdf_objects
¶
A project to and from an ESCDF file: the objects as the standard's own types, and whole as Visual Dynamics keeps them.
The standard has a type for the things a test produces — geometry,
channel_table, data and response_spectrum, mode — and every one
of them is written here as that type, so any reader of the format gets
nodes, channels, curves and modes with nothing of ours in the way. It
has no field for much of what a project holds: element blocks and what
they are made of, coordinate systems, the processing record and the
provenance, reports, matched modes, sine and random specifications, a
geometry's view. Those ride in the attachments every group inherits
(Brandon, 2026-09-30: nothing that would make their reader fail), one
attachment per object, holding the object in its own .vdyn layout —
the one schema owner, io.native, run into memory — so a file written
here reads back whole, and a foreign reader sees an attachment it can
ignore. A report rides twice: rendered to its self-contained HTML, for
anyone with the file, and as its definition, so it reopens editable.
An activity is an object group (Brandon: an Activity should perhaps be equal to a linked group of objects): the group's results are the activity's data, and the geometry and channel tables it reads against are metadata at the root, linked. A named group is an activity with that name; an unnamed one takes its basis object's name. Objects linked to nothing form one activity of their own. Photos, reports, matched modes and sine specifications are metadata too — parameter sets, linked to the activity whose group holds them — because the standard puts anything that is not a result at the root.
Reading a file this program did not write builds each object from the standard fields: a geometry's nodes, lines, elements and per-node directions (a node whose axes are not the global ones gets a coordinate system of its own), a data type's records and units, a mode set's frequencies and shapes. The unit strings travel as the format spells them; both spellings parse here.
Functions:
| Name | Description |
|---|---|
handles |
A whole project, or any one object of it. |
to_file |
A project as an ESCDF |
save |
Write a project, or one object as a project of one, as an ESCDF |
from_file |
A project from an ESCDF |
load |
Read an ESCDF file as a project. |
Classes¶
Functions:¶
handles
¶
A whole project, or any one object of it.
to_file
¶
A project as an ESCDF File: the objects as the standard's
types, each whole in an attachment, an activity per object group.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
project
|
Project
|
What to write. |
required |
created_by
|
str
|
The file's creator; the login name when left out. |
None
|
unit_system
|
UnitSystem
|
The system the reports are rendered in; SI when left out. |
None
|
Returns:
| Type | Description |
|---|---|
File
|
|
Source code in src/visualdynamics/io/escdf_objects.py
378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 | |
save
¶
save(obj: Any, path: str | PathLike, unit_system: Any = None, created_by: str | None = None, **_ignored: Any) -> None
Write a project, or one object as a project of one, as an ESCDF file.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
obj
|
Project or object
|
What to write. |
required |
path
|
path - like
|
Where; |
required |
unit_system
|
UnitSystem
|
The system reports are rendered in. |
None
|
created_by
|
str
|
The creator recorded in the file. |
None
|
Source code in src/visualdynamics/io/escdf_objects.py
from_file
¶
A project from an ESCDF File: every dataset an object, each
activity an object group named for it, and the project's own record
when the file carries one.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
file
|
File
|
As |
required |
Returns:
| Type | Description |
|---|---|
Project
|
|