gedidb.L4CGranule#

class gedidb.L4CGranule(file_path: str, field_mapping: Dict[str, str])[source]#

Represents a GEDI Level 4C granule, providing access to its beams and related data.

This class extends the base Granule class and initializes with a specific file path and a field mapping that maps product variables to the corresponding data fields in the granule.

field_mapping#

A dictionary mapping product variables to HDF5 field names.

Type:

Dict[str, str]

__init__(file_path: str, field_mapping: Dict[str, str])[source]#

Initialize an L4CGranule object.

Parameters:
  • file_path (str) – Path to the GEDI Level 4C granule file (HDF5 format).

  • field_mapping (Dict[str, str]) – Dictionary containing the mapping of product variables to data fields.

Methods

__init__(file_path, field_mapping)

Initialize an L4CGranule object.

beam(identifier)

Get a Beam object by its name or index.

build_virtual_dataset(name, shape, dtype[, ...])

Assemble a virtual dataset in this group.

clear()

close()

Close the granule file safely.

copy(source, dest[, name, shallow, ...])

Copy an object or group.

create_dataset(name[, shape, dtype, data])

Create a new HDF5 dataset

create_dataset_like(name, other, **kwupdate)

Create a dataset similar to other.

create_group(name[, track_order, track_times])

Create and return a new subgroup.

create_virtual_dataset(name, layout[, fillvalue])

Create a new virtual dataset in this group.

flush()

Tell the HDF5 library to flush its buffers.

get(name[, default, getclass, getlink, ...])

Retrieve an item or other information.

in_memory([file_image])

Create an HDF5 file in memory, without an underlying file

items()

Get a view object on member items

iter_beams()

Iterate over all beams in the granule.

keys()

Get a view object on member names

list_beams()

Get a list of all beams in the granule.

move(source, dest)

Move a link to a new location in the file.

pop(k[,d])

If key is not found, d is returned if given, otherwise KeyError is raised.

popitem()

as a 2-tuple; but raise KeyError if D is empty.

require_dataset(name, shape, dtype[, exact])

Open a dataset, creating it if it doesn't exist.

require_group(name)

Return a group, creating it if it doesn't exist.

setdefault(k[,d])

update([E, ]**F)

If E present and has a .keys() method, does: for k in E.keys(): D[k] = E[k] If E present and lacks .keys() method, does: for (k, v) in E: D[k] = v In either case, this is followed by: for k, v in F.items(): D[k] = v

validate_beam_name(beam)

Validate that the provided beam name exists in the granule.

values()

Get a view object on member objects

visit(func)

Recursively visit all names in this group and subgroups.

visit_links(func)

Recursively visit all names in this group and subgroups.

visititems(func)

Recursively visit names and objects in this group.

visititems_links(func)

Recursively visit links in this group.

Attributes

abstract

Get the abstract description of the granule.

attrs

Attributes attached to this object

driver

Low-level HDF5 file driver used to open file

file

Return a File instance associated with this object

filename

Get the file name of the granule.

filename_metadata

Lazily load and cache the parsed metadata from the granule's filename.

id

Low-level identifier appropriate for this object

libver

low, high)

meta_block_size

Meta block size (in bytes)

mode

Python mode used to open file

n_beams

Get the number of beams in the granule.

name

Return the full name of this object.

parent

Return the parent group of this object.

product

Get the product name from the granule metadata.

ref

An (opaque) HDF5 reference to this object

regionref

Create a region reference (Datasets only).

start_datetime

Get the start datetime from the parsed filename metadata.

swmr_mode

Controls single-writer multiple-reader mode

userblock_size

User block size (in bytes)

uuid

Get the UUID of the granule.

version_granule

Get the granule version from the granule metadata.

version_product

Get the product version from the granule metadata.