> ## Documentation Index
> Fetch the complete documentation index at: https://docs.encord.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Beta.scene.reader

Public SDK scene read types.

These are stable SDK types that insulate users from the internal wire format.
They are constructed from the internal types in `beta/scene/internal/scene.py`.

## SceneEvent Objects

```python theme={"dark"}
@dataclass
class SceneEvent()
```

A single event in a stream, with its signed download URL and timestamp.

#### timestamp

Timestamp of the event.

#### url

Raw unsigned URI as stored in the scene definition.

#### signed\_url

Time-limited signed URL for downloading the file.

## PointCloudStream Objects

```python theme={"dark"}
@dataclass
class PointCloudStream()
```

A stream of lidar point cloud events.

#### frame\_of\_reference\_id

Frame of reference in which this stream's point clouds are expressed.

#### find\_event

```python theme={"dark"}
def find_event(timestamp: float) -> SceneEvent | None
```

Return the event with the given timestamp, or `None` if not present.

#### get\_event

```python theme={"dark"}
def get_event(timestamp: float) -> SceneEvent
```

Return the event with the given timestamp.

**Raises**:

* `KeyError` - If no event with that timestamp exists.

## ImageStream Objects

```python theme={"dark"}
@dataclass
class ImageStream()
```

A stream of camera image events.

#### frame\_of\_reference\_id

Frame of reference associated with the image stream's camera.

#### find\_event

```python theme={"dark"}
def find_event(timestamp: float) -> SceneEvent | None
```

Return the event with the given timestamp, or `None` if not present.

#### get\_event

```python theme={"dark"}
def get_event(timestamp: float) -> SceneEvent
```

Return the event with the given timestamp.

**Raises**:

* `KeyError` - If no event with that timestamp exists.

## TimeSeriesStream Objects

```python theme={"dark"}
@dataclass
class TimeSeriesStream()
```

A self-contained CSV time-series stream.

#### url

Raw unsigned URI as stored in the scene definition.

#### signed\_url

Time-limited signed URL for downloading the CSV file.

## FrameOfReferenceEvent Objects

```python theme={"dark"}
@dataclass
class FrameOfReferenceEvent()
```

A pose of a frame of reference relative to its parent frame.

#### timestamp

Timestamp of the pose.

#### frame\_id

ID of the frame represented by this event.

#### parent\_frame\_id

ID of the parent frame, or `None` when no parent is declared.

#### rotation

3x3 column-major rotation matrix from this frame to its parent frame.

#### position

Translation from this frame to its parent frame.

## FrameOfReferenceStream Objects

```python theme={"dark"}
@dataclass
class FrameOfReferenceStream()
```

A stream describing a named frame of reference over time.

#### find\_event

```python theme={"dark"}
def find_event(timestamp: float) -> FrameOfReferenceEvent | None
```

Return the event with the given timestamp, or `None` if not present.

#### get\_event

```python theme={"dark"}
def get_event(timestamp: float) -> FrameOfReferenceEvent
```

Return the event with the given timestamp.

**Raises**:

* `KeyError` - If no event with that timestamp exists.

## CompositeScene Objects

```python theme={"dark"}
@dataclass
class CompositeScene()
```

A scene composed of multiple named streams.

#### find\_stream

```python theme={"dark"}
def find_stream(
    stream_id: str, *, kind: Literal["point_cloud", "image", "time_series",
                                     "frame_of_reference"]
) -> PointCloudStream | ImageStream | TimeSeriesStream | FrameOfReferenceStream | None
```

Return the stream with the given ID and kind, or `None` if not present.

#### get\_stream

```python theme={"dark"}
def get_stream(
    stream_id: str, *, kind: Literal["point_cloud", "image", "time_series",
                                     "frame_of_reference"]
) -> PointCloudStream | ImageStream | TimeSeriesStream | FrameOfReferenceStream
```

Return the stream with the given ID and kind.

**Raises**:

* `KeyError` - If no stream with that ID and kind exists.

#### get\_images\_at\_timestamp

```python theme={"dark"}
def get_images_at_timestamp(timestamp: float) -> list[tuple[str, SceneEvent]]
```

Return camera image events at the given timestamp across image streams.

Streams without a matching event are skipped.

## SceneReader Objects

```python theme={"dark"}
class SceneReader()
```

Read scene structure and signed URLs from a scene storage item.

#### read

```python theme={"dark"}
def read() -> Scene
```

Fetch the scene structure with signed download URLs for all constituent files.

#### to\_upload\_payload

```python theme={"dark"}
def to_upload_payload(
    title: str | None = None,
    *,
    client_metadata: dict[str, Any] | None = None,
    uri_mapper: Callable[[str], str] | Mapping[str, str] | None = None
) -> orm_storage.DataUploadScene
```

Fetch this scene and convert it to a `DataUploadScene` for re-upload.

**Arguments**:

* `title` - Title to use for the uploaded scene. Defaults to the source storage item name.
* `client_metadata` - Metadata for the uploaded scene. Defaults to the source item metadata.
* `uri_mapper` - Optional callable or mapping used to rewrite each stored URI before upload.

**Returns**:

A scene upload payload suitable for `DataUploadItems(scenes=[...])`.

## SceneRead Objects

```python theme={"dark"}
@deprecated(version="0.1.198", alternative="SceneReader")
class SceneRead(SceneReader)
```

Deprecated alias for [SceneReader](https://docs.encord.com/sdk-documentation/sdk-references/beta.scene.reader.md#scenereader-objects).


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.