empyrean.CartesianCovariance

class CartesianCovariance(table, **kwargs)

Bases: Table

Covariance matrix for Cartesian state [x, y, z, vx, vy, vz].

Methods

__init__(table, **kwargs)

apply_mask(mask)

Return a new table with rows filtered to match a boolean mask.

as_column([nullable, metadata])

Embed the Table as a column in another Table.

attributes()

Return a dictionary of the table's attributes.

chunk_counts()

Returns the number of discrete memory chunks that make up each of the Table's underlying arrays.

column(column_name)

Returns the column with the given name as a raw pyarrow ChunkedArray.

drop_duplicates([subset, keep])

Drop duplicate rows from a ~quivr.Table.

empty(**kwargs)

Create an empty instance of the table.

flattened_table()

Completely flatten the Table's underlying Arrow table, taking into account any nested structure, and return the data table itself.

fragmented()

Returns true if the Table has any fragmented arrays.

from_csv(input_file[, validate])

Read a table from a CSV file.

from_dataframe(df[, validate])

Load a DataFrame into the Table.

from_feather(path[, validate])

Read a table from a Feather file.

from_flat_dataframe(df[, validate])

Load a flattened DataFrame into the Table.

from_kwargs([validate, permit_nulls])

Create a Table instance from keyword arguments.

from_matrix(matrix)

Create from covariance matrices.

from_parquet(path[, memory_map, ...])

Read a table from a Parquet file.

from_pyarrow(table[, validate, permit_nulls])

Create a new table from a pyarrow Table.

from_sigmas(sigmas)

Create diagonal-only covariances from sigma values.

invalid_mask()

Return a boolean mask indicating which rows are invalid.

is_valid()

Validate the table against the schema.

null_mask()

Return a boolean mask indicating which rows of the entire table are null.

nulls(size, **kwargs)

Create a table with nulls.

select(column_name, value)

Select from the table by exact match, returning a new Table which only contains rows for which the value in column_name equals value.

separate_invalid()

Separates rows that have invalid data from those that have valid data.

set_column(name, data)

Return a copy of the table with a particular column replaced with new data.

sort_by(by)

Sorts the Table by the given column name (or multiple columns).

take(row_indices)

Return a new Table with only the rows at the given indices.

to_csv(path[, attribute_columns])

Write the table to a CSV file.

to_dataframe([flatten, attr_handling])

Returns self as a pandas DataFrame.

to_feather(path, **kwargs)

Write the table to a Feather file.

to_matrix()

Return (N, 6, 6) numpy array.

to_parquet(path, **kwargs)

Write the table to a Parquet file.

to_structarray()

Returns self as a StructArray.

unique_indices([subset, keep])

Get the indices of the first or last occurrence of each unique row in the table.

validate()

Validate the table against the schema, raising an exception if invalid.

where(expr)

Return a new table with rows filtered to match an expression.

with_table(table)

Attributes

cov_vx_vx

A column for storing 64-bit floating point numbers.

cov_vx_vy

A column for storing 64-bit floating point numbers.

cov_vx_vz

A column for storing 64-bit floating point numbers.

cov_vy_vy

A column for storing 64-bit floating point numbers.

cov_vy_vz

A column for storing 64-bit floating point numbers.

cov_vz_vz

A column for storing 64-bit floating point numbers.

cov_x_vx

A column for storing 64-bit floating point numbers.

cov_x_vy

A column for storing 64-bit floating point numbers.

cov_x_vz

A column for storing 64-bit floating point numbers.

cov_x_x

A column for storing 64-bit floating point numbers.

cov_x_y

A column for storing 64-bit floating point numbers.

cov_x_z

A column for storing 64-bit floating point numbers.

cov_y_vx

A column for storing 64-bit floating point numbers.

cov_y_vy

A column for storing 64-bit floating point numbers.

cov_y_vz

A column for storing 64-bit floating point numbers.

cov_y_y

A column for storing 64-bit floating point numbers.

cov_y_z

A column for storing 64-bit floating point numbers.

cov_z_vx

A column for storing 64-bit floating point numbers.

cov_z_vy

A column for storing 64-bit floating point numbers.

cov_z_vz

A column for storing 64-bit floating point numbers.

cov_z_z

A column for storing 64-bit floating point numbers.

schema

sigmas

Return (N, 6) array of 1-sigma uncertainties (sqrt of diagonal).

table

Parameters:
  • table (Table)

  • kwargs (AttributeValueType)

cov_vx_vx

A column for storing 64-bit floating point numbers.

cov_vx_vy

A column for storing 64-bit floating point numbers.

cov_vx_vz

A column for storing 64-bit floating point numbers.

cov_vy_vy

A column for storing 64-bit floating point numbers.

cov_vy_vz

A column for storing 64-bit floating point numbers.

cov_vz_vz

A column for storing 64-bit floating point numbers.

cov_x_vx

A column for storing 64-bit floating point numbers.

cov_x_vy

A column for storing 64-bit floating point numbers.

cov_x_vz

A column for storing 64-bit floating point numbers.

cov_x_x

A column for storing 64-bit floating point numbers.

cov_x_y

A column for storing 64-bit floating point numbers.

cov_x_z

A column for storing 64-bit floating point numbers.

cov_y_vx

A column for storing 64-bit floating point numbers.

cov_y_vy

A column for storing 64-bit floating point numbers.

cov_y_vz

A column for storing 64-bit floating point numbers.

cov_y_y

A column for storing 64-bit floating point numbers.

cov_y_z

A column for storing 64-bit floating point numbers.

cov_z_vx

A column for storing 64-bit floating point numbers.

cov_z_vy

A column for storing 64-bit floating point numbers.

cov_z_vz

A column for storing 64-bit floating point numbers.

cov_z_z

A column for storing 64-bit floating point numbers.

classmethod from_matrix(matrix)

Create from covariance matrices.

Parameters:

matrix (ndarray[Any, dtype[double]]) – Covariance matrices with shape (N, 6, 6) or (6, 6).

Return type:

_CovarianceTable

classmethod from_sigmas(sigmas)

Create diagonal-only covariances from sigma values.

Parameters:

sigmas (ndarray[Any, dtype[double]]) – Standard deviations with shape (N, 6) or (6,).

Return type:

_CovarianceTable

schema: ClassVar[Schema] = cov_x_x: double cov_x_y: double cov_y_y: double cov_x_z: double cov_y_z: double cov_z_z: double cov_x_vx: double cov_y_vx: double cov_z_vx: double cov_vx_vx: double cov_x_vy: double cov_y_vy: double cov_z_vy: double cov_vx_vy: double cov_vy_vy: double cov_x_vz: double cov_y_vz: double cov_z_vz: double cov_vx_vz: double cov_vy_vz: double cov_vz_vz: double
property sigmas: ndarray[Any, dtype[float64]]

Return (N, 6) array of 1-sigma uncertainties (sqrt of diagonal).

to_matrix()

Return (N, 6, 6) numpy array.

Return type:

ndarray[Any, dtype[double]]

Parameters:

self (_CovarianceTable)