Data Module (sbpy.data)

Introduction

sbpy.data provides classes for dealing with all kinds of data that planetary astronomers encounter: orbital elements (Orbit), ephemerides (Ephem), observational data (Obs), and physical properties (Phys). These objects act as containers that bundle similar data and have to be used in sbpy to maintain a transparent and clean data flow between functions. Each of these classes is based on the DataClass base class, which internally uses an QTable object in combination with some other features. Hence, each of these objects can actually be thought of as a table with different fields (or columns) and rows.

However, in contrast to simple tables, data objects provide additional functionality that is detailed below.

Content

Reference/API

sbpy.data

author:

Michael Mommert (mommermiscience@gmail.com)

Conf contains metadata for sbpy DataClass field names.

Conf.fieldnames_info is a list of dictionaries, one per field, with the keys: 'description', 'fieldnames', 'provenance', 'dimension', and 'equivalencies':

  • description: text description of the field

  • provenance: list of DataClass objects which use the field

  • fieldnames: list of field names as strings, the first is considered the primary, the remaining strings, if any, are alternates

  • dimension: English description of the field’s dimension (e.g., length)

  • equivalencies: units list of equivalencies for unit conversion (optional)

Functions

quantity_to_dataclass(**kwargs)

Decorator that converts astropy quantities to sbpy data classes.

natural_sort_key(s)

List sort keys considering strings of numbers as integers.

dataclass_input([func])

Decorator that converts parameters to DataClass.

Classes

DataClass()

DataClass serves as the base class for all data container classes in sbpy in order to provide consistent functionality.

Ephem()

Class for querying, manipulating, and calculating ephemerides

Obs()

Class for querying, storing, and manipulating observations

Orbit()

Class for querying, manipulating, integrating, and fitting orbital elements

Phys()

Class for storing and querying physical properties

Names()

Class for parsing target identifiers.

Conf()

DataClassError

Will be raised in case of exceptions dealing with DataClass.

QueryError

Will be raised in case of query errors.

TimeScaleWarning

Will be raised in case time scales on Time objects have to be converted to comply with query requirements.

Class Inheritance Diagram

Inheritance diagram of sbpy.data.core.DataClass, sbpy.data.ephem.Ephem, sbpy.data.obs.Obs, sbpy.data.orbit.Orbit, sbpy.data.phys.Phys, sbpy.data.names.Names, sbpy.data.Conf, sbpy.data.core.DataClassError, sbpy.data.core.QueryError, sbpy.data.core.TimeScaleWarning