SAO XML datatypes¶
C
pynasonde.digisonde.datatypes.saoxmldatatypes — SAORecord, Trace, Profile, SystemInfo, and related dataclasses.
Dataclasses for SAO/XML-format records and frequency groups.
pynasonde.digisonde.datatypes.saoxmldatatypes
¶
Datatypes and XML-to-dataclass mapping helpers for SAO XML.
This module defines dataclasses that mirror the SAO XML structure used by
Digisonde SAO exports. It includes utility parsing functions in
SAORecordList.load_from_xml that validate against the DTD and map XML
elements into rich Python dataclasses.
These dataclasses are intentionally lightweight and closely mirror the XML element attributes so mkdocstrings can render field-level API docs for consumers and examples.
URSI
dataclass
¶
Represents a single URSI characteristic entry.
Attributes:
| Name | Type | Description |
|---|---|---|
ID |
Any
|
Any Identifier of the URSI parameter (as read from XML). |
Val |
Any
|
float
Numeric value; coerced to a float in |
Name |
Optional[str]
|
Optional[str] Optional human-readable name for the parameter. |
Units |
Optional[str]
|
Optional[str] Units string for the value where provided. |
QL |
Optional[str]
|
Optional[str] Quality level metadata (parser-specific). |
DL |
Optional[str]
|
Optional[str] Detection level metadata (parser-specific). |
SigFig |
Optional[str]
|
Optional[str] Significant-figures metadata. |
UpperBound |
Optional[str]
|
Optional[str] Upper bound metadata from XML. |
LowerBound |
Optional[str]
|
Optional[str] Lower bound metadata from XML. |
Bound |
Optional[str]
|
Optional[str] Bound metadata. |
BoundaryType |
Optional[str]
|
Optional[str] Boundary type metadata. |
Flag |
Optional[str]
|
Optional[str] Optional flag or marker from the XML. |
Source code in pynasonde/digisonde/datatypes/saoxmldatatypes.py
Modeled
dataclass
¶
Represents a modeled parameter entry in the SAO XML.
Attributes:
| Name | Type | Description |
|---|---|---|
Name |
str
|
str Parameter name. |
Val |
str
|
str Parameter value (string as represented in XML). |
Units |
str
|
str Units string for the value. |
ModelName |
Optional[str]
|
Optional[str] Optional model name used to derive the value. |
ModelOptions |
Optional[str]
|
Optional[str] Optional model options string. |
Source code in pynasonde/digisonde/datatypes/saoxmldatatypes.py
Custom
dataclass
¶
Represents a custom parameter entry included in SAO XML.
Attributes:
| Name | Type | Description |
|---|---|---|
Name |
str
|
str Parameter name. |
Val |
str
|
str Parameter value. |
Units |
str
|
str Units string for the value. |
Description |
str
|
str Human-readable description of the parameter. |
SigFig |
Optional[str]
|
Optional[str] Significant figures metadata. |
UpperBound |
Optional[str]
|
Optional[str] Upper bound metadata. |
LowerBound |
Optional[str]
|
Optional[str] Lower bound metadata. |
Bound |
Optional[str]
|
Optional[str] Bound metadata. |
BoundaryType |
Optional[str]
|
Optional[str] Boundary type metadata. |
Flag |
Optional[str]
|
Optional[str] Optional flag or marker. |
Source code in pynasonde/digisonde/datatypes/saoxmldatatypes.py
CharacteristicList
dataclass
¶
Container for URSI/Modeled/Custom characteristic sub-elements.
Attributes:
| Name | Type | Description |
|---|---|---|
URSI |
List[URSI]
|
List[URSI]
List of |
Modeled |
List[Modeled]
|
List[Modeled]
List of |
Custom |
List[Custom]
|
List[Custom] List of `Custom parameter entries. |
Num |
Optional[Any]
|
Optional[int]
Optional count attribute from the XML (coerced to int in
|
Source code in pynasonde/digisonde/datatypes/saoxmldatatypes.py
TraceValueList
dataclass
¶
Represents a list of trace values for a Trace element.
Attributes:
| Name | Type | Description |
|---|---|---|
Name |
str
|
str Name of the trace value list. |
Type |
Optional[str]
|
Optional[str] Optional type attribute. |
SigFig |
Optional[str]
|
Optional[str] Significant-figures metadata. |
Units |
Optional[str]
|
Optional[str] Units for the values. |
NoValue |
Optional[str]
|
Optional[str] Marker used for missing values. |
Description |
Optional[str]
|
Optional[str] Optional description string. |
values |
List[str]
|
List[str] List of string values (converted to floats by the parser functions when appropriate). |
Source code in pynasonde/digisonde/datatypes/saoxmldatatypes.py
Trace
dataclass
¶
Represents a single Trace element with frequency/range axes and associated TraceValueList entries.
Attributes:
| Name | Type | Description |
|---|---|---|
FrequencyList |
List[float]
|
List[float] Frequency axis values for the trace. |
RangeList |
List[float]
|
List[float] Range/height axis values for the trace. |
TraceValueList |
List[TraceValueList]
|
List[TraceValueList]
List of |
Type |
Optional[str]
|
Optional[str] Trace type (defaults to "standard"). |
Layer |
str
|
str Layer name or identifier. |
Multiple |
Optional[str]
|
Optional[str] Multiplexing indicator when present. |
Polarization |
str
|
str Polarization string for the trace. |
Num |
str
|
str Optional numeric identifier string. |
Source code in pynasonde/digisonde/datatypes/saoxmldatatypes.py
TraceList
dataclass
¶
Container for a list of Trace objects.
Attributes:
| Name | Type | Description |
|---|---|---|
Trace |
List[Trace]
|
List[Trace]
List of |
Num |
Optional[str]
|
Optional[str] Optional count attribute from XML. |
Source code in pynasonde/digisonde/datatypes/saoxmldatatypes.py
ProfileValueList
dataclass
¶
Represents a named list of profile values used inside Tabulated profile data.
Attributes:
| Name | Type | Description |
|---|---|---|
Name |
str
|
str Name of the profile value list. |
Type |
Optional[str]
|
Optional[str] Optional type attribute. |
SigFig |
Optional[str]
|
Optional[str] Significant-figures metadata. |
Units |
Optional[str]
|
Optional[str] Units for the values. |
NoValue |
Optional[str]
|
Optional[str] Missing-value marker. |
Description |
Optional[str]
|
Optional[str] Description string. |
values |
List[str]
|
List[str] Numeric values (parser converts to floats when appropriate). |
Source code in pynasonde/digisonde/datatypes/saoxmldatatypes.py
Tabulated
dataclass
¶
Holds tabulated profile data with altitude axis and named value lists.
Attributes:
| Name | Type | Description |
|---|---|---|
Num |
str
|
str Optional count or identifier. |
AltitudeList |
List[float]
|
List[float] Altitude (height) axis values. |
ProfileValueList |
List[ProfileValueList]
|
List[ProfileValueList]
List of profile |
Source code in pynasonde/digisonde/datatypes/saoxmldatatypes.py
Profile
dataclass
¶
Represents a computed or tabulated electron density profile included in the SAO output.
Attributes:
| Name | Type | Description |
|---|---|---|
Algorithm |
str
|
str Name of the profile algorithm used. |
AlgorithmVersion |
str
|
str Version string for the algorithm. |
Type |
Optional[str]
|
Optional[str] Profile type (defaults to "vertical"). |
Description |
Optional[str]
|
Optional[str] Optional description text. |
Tabulated |
Optional[Tabulated]
|
Optional[Tabulated]
Tabulated data for the profile when present ( |
Source code in pynasonde/digisonde/datatypes/saoxmldatatypes.py
ProfileList
dataclass
¶
Container for Profile entries.
Attributes:
| Name | Type | Description |
|---|---|---|
Profile |
List[Profile]
|
List[Profile]
List of |
Num |
Optional[str]
|
Optional[str] Optional count attribute from XML. |
Source code in pynasonde/digisonde/datatypes/saoxmldatatypes.py
SystemInfo
dataclass
¶
Partial mapping of system-level metadata reported in SAO XML.
Attributes:
| Name | Type | Description |
|---|---|---|
UMLStationID |
Optional[str]
|
Optional[str] UML station identifier when present. |
IUWDSCode |
Optional[str]
|
Optional[str] IUWDS code when present. |
Source code in pynasonde/digisonde/datatypes/saoxmldatatypes.py
SAORecord
dataclass
¶
Top-level representation of an SAO record exported as XML.
Attributes:
| Name | Type | Description |
|---|---|---|
SystemInfo |
Optional[SystemInfo]
|
Optional[SystemInfo] System-level metadata object when present. |
CharacteristicList |
CharacteristicList
|
CharacteristicList Characteristic lists (URSI/Modeled/Custom) describing the record. |
TraceList |
Optional[TraceList]
|
Optional[TraceList] Optional list of Trace elements providing ionogram traces. |
ProfileList |
Optional[ProfileList]
|
Optional[ProfileList] Optional profiles included in the record. |
FormatVersion |
str
|
str SAO format version (defaults to "5.0"). |
StartTimeUTC |
str
|
str Start time string in UTC as provided by the XML. |
URSICode |
str
|
str URSI code associated with the record. |
StationName |
str
|
str Station name string. |
GeoLatitude |
str
|
str Latitude string representation. |
GeoLongitude |
str
|
str Longitude string representation. |
Source |
str
|
str Source identifier (defaults to "Ionosonde"). |
SourceType |
str
|
str Source type string. |
ScalerType |
str
|
str Scaler type string. |
Source code in pynasonde/digisonde/datatypes/saoxmldatatypes.py
SAORecordList
dataclass
¶
Top-level container for a list of SAORecord instances parsed from an SAO XML file.
Attributes:
| Name | Type | Description |
|---|---|---|
SAORecord |
List[SAORecord]
|
List[SAORecord]
List of parsed |
Source code in pynasonde/digisonde/datatypes/saoxmldatatypes.py
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 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 | |
load_from_xml(xml_path, dtd_path=None)
staticmethod
¶
Parse an SAO XML file and return a populated SAORecordList.
The method validates the XML against the SAO DTD (if available via
dtd_path or the packaged resource), then recursively maps XML
elements to the dataclass hierarchy defined in this module.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
xml_path |
str
|
Path to the SAO XML file to parse. |
required |
dtd_path |
str
|
Optional path to a DTD file for validation. |
None
|
Returns:
| Type | Description |
|---|---|
SAORecordList
|
SAORecordList populated with parsed SAORecord instances. |
Source code in pynasonde/digisonde/datatypes/saoxmldatatypes.py
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 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 | |