openworld_radio_twin.batch#

Functions

build_batch_plan(payload)

completed_radio_map_records(...)

Each planned scene with the records of its complete radio maps, in plan order.

exclusive_dataset_lock(dataset_directory)

Hold the dataset lock exclusively, refusing while anyone else holds it.

generate_batch_dataset(payload, plan, ...[, ...])

registered_radio_map(radio_map, antennas, ...)

The radio map's request: its channel, and the scene's antennas that transmit on it, placed under the radio map's defaults.

scene_channels(selection, antennas, engine)

The channels a scene's radio maps draw from: the listed ones, each with at least one antenna on it, else every downlink channel of the scene's antennas that the engine supports.

slugify(value, fallback)

write_dataset_index(dataset_directory, plan, ...)

Rebuild index.parquet of a dataset for the manifest's index_revision.

Classes

BatchAntennaSelection(**data)

Transmitters taken from an antenna source instead of sampled positions.

BatchDatasetRequest(**data)

BatchOutputSpec(**data)

What each radio map writes besides its record and its packed path gain.

BatchPlan(**data)

BatchRadioMapSpace(**data)

BatchSceneSpec(**data)

ExpandedRadioMap(**data)

A planned radio map.

FloatRange(**data)

IntegerRange(**data)

PlannedScene(**data)

RegisteredDraw(**data)

A radio map's draws for transmitters taken from the scene's antennas.

class openworld_radio_twin.batch.FloatRange(**data)[source]#

Bases: BaseModel

model_config: ClassVar[ConfigDict] = {'extra': 'forbid'}#

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

minimum: float#
maximum: float#
ordered()[source]#
Return type:

FloatRange

class openworld_radio_twin.batch.IntegerRange(**data)[source]#

Bases: BaseModel

model_config: ClassVar[ConfigDict] = {'extra': 'forbid'}#

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

minimum: int#
maximum: int#
ordered()[source]#
Return type:

IntegerRange

class openworld_radio_twin.batch.BatchOutputSpec(**data)[source]#

Bases: BaseModel

What each radio map writes besides its record and its packed path gain.

previews adds the PNG previews, rendered from the solver’s in-memory arrays, for inspection; packages leave them out.

model_config: ClassVar[ConfigDict] = {'extra': 'forbid'}#

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

previews: bool#
class openworld_radio_twin.batch.BatchRadioMapSpace(**data)[source]#

Bases: BaseModel

model_config: ClassVar[ConfigDict] = {'extra': 'forbid'}#

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

strategy: Literal['fixed', 'random']#
count: int#
engine: EngineName#
engine_config: dict[str, str | int | float | bool]#
transmitter_count: IntegerRange#
frequency_ghz: FloatRange#
power_dbm: FloatRange#
altitude_m: FloatRange#
offset_radius_m: FloatRange#
azimuth_deg: FloatRange#
downtilt_deg: FloatRange#
antenna_patterns: list[Literal['sector', 'isotropic']]#
resolutions_m: list[int]#
max_depths: list[int]#
samples_per_tx: list[int]#
association_metrics: list[Literal['path_gain', 'rss', 'sinr']]#
validate_space()[source]#
Return type:

BatchRadioMapSpace

class openworld_radio_twin.batch.BatchAntennaSelection(**data)[source]#

Bases: BaseModel

Transmitters taken from an antenna source instead of sampled positions.

Each radio map simulates one downlink channel with every selected antenna inside the scene that transmits on it. channels lists the channels radio maps draw from; empty means every downlink channel the scene’s antennas register that the engine supports. A source without frequencies, such as OpenCelliD, needs the channels listed. Values the source records (position, and height or azimuth where given) are kept; the radio map samples the others from its ranges: height, azimuth, downtilt and power, as well as the pattern. The carrier frequency and noise bandwidth come from the channel; each antenna keeps its own power.

model_config: ClassVar[ConfigDict] = {'extra': 'forbid'}#

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

source: str#
operator: str | None#
radio: Optional[Literal['GSM', 'UMTS', 'LTE', 'NR', 'NBIOT', 'CDMA']]#
channels: list[ChannelRange]#
class openworld_radio_twin.batch.BatchSceneSpec(**data)[source]#

Bases: BaseModel

model_config: ClassVar[ConfigDict] = {'extra': 'forbid'}#

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

label: str#
scene_mode: Literal['geospatial', 'empty']#
latitude: float#
longitude: float#
radius_m: int#
receiver_height_m: float#
voxel_pitch_m: float#
include_buildings: bool#
building_source: str#
include_terrain: bool#
material_profile: Literal['itu', 'uniform']#
terrain_resolution_m: float#
antennas: BatchAntennaSelection | None#
site: str | None#
radio_maps: BatchRadioMapSpace#
fit_transmitters_in_scene()[source]#
Return type:

BatchSceneSpec

property include_surface_materials: bool#

Return whether semantic surface classes are required by this scene.

property include_environment_grid: bool#

Return whether a gridded ground (DEM or flat) is compiled for this scene.

class openworld_radio_twin.batch.BatchDatasetRequest(**data)[source]#

Bases: BaseModel

model_config: ClassVar[ConfigDict] = {'extra': 'forbid'}#

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

dataset_name: str#
random_seed: int#
continue_on_error: bool#
output: BatchOutputSpec#
scenes: list[BatchSceneSpec]#
class openworld_radio_twin.batch.RegisteredDraw(**data)[source]#

Bases: BaseModel

A radio map’s draws for transmitters taken from the scene’s antennas.

The scene’s channels, and so their number, are known only once its antennas are acquired, after planning. A random radio map therefore stores channel_draw, a uniform number in [0, 1) that picks one; a fixed radio map stores channel_index and takes them in turn. defaults holds the sampled values for what the source does not record; request holds the radio map’s request fields other than the transmitters, carrier and bandwidth.

channel_draw: float | None#
channel_index: int | None#
antenna_pattern: Literal['sector', 'isotropic']#
defaults: AntennaDefaults#
request: dict[str, object]#
model_config: ClassVar[ConfigDict] = {}#

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class openworld_radio_twin.batch.ExpandedRadioMap(**data)[source]#

Bases: BaseModel

A planned radio map. One taking its transmitters from antennas starts with only its draws; generation adds the request once the scene’s antennas are placed.

name: str#
seed: int#
request: SimulationRequest | None#
registered: RegisteredDraw | None#
warnings: list[str]#
described()[source]#
Return type:

ExpandedRadioMap

property engine: str#
model_config: ClassVar[ConfigDict] = {}#

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class openworld_radio_twin.batch.PlannedScene(**data)[source]#

Bases: BaseModel

name: str#
label: str#
specification: BatchSceneSpec#
radio_maps: list[ExpandedRadioMap]#
model_config: ClassVar[ConfigDict] = {}#

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class openworld_radio_twin.batch.BatchPlan(**data)[source]#

Bases: BaseModel

schema_version: int#
dataset_name: str#
dataset_slug: str#
random_seed: int#
generator: str#
total_scenes: int#
total_radio_maps: int#
total_receiver_cells: int#
total_initial_ray_samples: int#
registered_radio_maps: int#
scenes: list[PlannedScene]#
model_config: ClassVar[ConfigDict] = {}#

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

openworld_radio_twin.batch.slugify(value, fallback)[source]#
Return type:

str

openworld_radio_twin.batch.scene_channels(selection, antennas, engine)[source]#

The channels a scene’s radio maps draw from: the listed ones, each with at least one antenna on it, else every downlink channel of the scene’s antennas that the engine supports.

Return type:

list[ChannelRange]

openworld_radio_twin.batch.registered_radio_map(radio_map, antennas, assets, channels)[source]#

The radio map’s request: its channel, and the scene’s antennas that transmit on it, placed under the radio map’s defaults.

Return type:

ExpandedRadioMap

openworld_radio_twin.batch.build_batch_plan(payload)[source]#
Return type:

BatchPlan

openworld_radio_twin.batch.completed_radio_map_records(dataset_directory, plan, output)[source]#

Each planned scene with the records of its complete radio maps, in plan order.

A radio map is complete by the check resume uses; a record generated from another request than the plan’s raises.

Return type:

list[tuple[PlannedScene, list[dict]]]

openworld_radio_twin.batch.write_dataset_index(dataset_directory, plan, output, revision)[source]#

Rebuild index.parquet of a dataset for the manifest’s index_revision.

Return type:

Path

openworld_radio_twin.batch.exclusive_dataset_lock(dataset_directory)[source]#

Hold the dataset lock exclusively, refusing while anyone else holds it.

async openworld_radio_twin.batch.generate_batch_dataset(payload, plan, output_root, provider, building_limit, sionna_lock, worker, progress, resume=False)[source]#
Return type:

Path