rfrenchseti-cspyce


Namerfrenchseti-cspyce JSON
Version 2.0.14 PyPI version JSON
download
home_pagehttps://github.com/SETI/pds-cspyce
SummaryHigh-performance Python interface to the NAIF CSPICE library
upload_time2023-05-04 21:01:07
maintainerRobert S. French
docs_urlNone
authorMark R. Showalter
requires_python>=3.8
licenseApache-2.0
keywords cspyce spice cspice naif jpl space geometry ephemeris
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            [![PyPI version](https://badge.fury.io/py/cspyce.svg)](https://badge.fury.io/py/cspyce)

# `cspyce` MODULE OVERVIEW
Version 2.0

March, 2022

Mark Showalter, PDS Ring-Moon Systems Node, SETI Institute

`cspyce` is a Python module that provides an interface to the C-language CSPICE
library produced by the Navigation and Ancillary Information Facility
([NAIF](https://naif.jpl.nasa.gov/naif/)) of NASA's Planetary Data System (PDS).
It implements most functions of CSPICE in a Python-like way, while also
supporting numerous enhancements, including support for Python exceptions,
array inputs, and aliases.

`cspyce` may be installed by running `pip install cspyce`.

Python versions 3.8 thru 3.11 are currently supported, with pre-built wheels
available for Linux, MacOS, and Windows.

If you are looking for information on running or distributing this code from
the GitHub sources, look at the file `README-developers.md` in this directory.

## PYTHONIZATION

`cspyce` has been designed to replicate the core features of CSPICE for
users who wish to translate a program that already exists. Function names in
`cspyce` match their CSPICE names.

However, it is also designed to behave as much as possible like a normal
Python module. To that end, it has the following features.

- The C language requires buffers to be allocated for output and it requires
  array sizes to be included for both input and output. The `cspyce` module,
  instead, eliminates all extraneous inputs, and all output arguments are
  returned as a list (or as a single object if the function only returns one
  item).

- `cspyce` has been fully integrated with Python's exception handling;
  programmers can still opt to use CSPICE's error handling mechanism if they
  wish to.

- All `cspyce` functions can handle positional arguments as well as arguments
  passed by name.

- All `cspyce` functions have informative docstrings, so typing
  `help(function)` provides useful information.

- Many `cspyce` functions take sensible default values if input arguments are
  omitted.

- The CSPICE concepts of "windows" and "cells" are not needed in Python. In
  CSPICE, these allow a function to return a variable amount of information,
  which the program can then iterate through. The `cspyce` counterpart of each of
  these functions simply returns a complete list of the results.

## ENHANCEMENTS

In addition, the `cspyce` module takes advantage of features of the Python
language to provide numerous options about how the functions perform their work.
These options include:

- Whether to return a CSPICE-style error condition or to raise a Python
  exception.

- How to handle CSPICE functions that return a status flag, e.g., "found" or
  "ok", instead of using the CSPICE toolkit's error handling mechanism.

- Whether to allow `cspyce` functions to accept arrays of inputs all at once,
  rather than looping through inputs in Python.

- Whether to automate the translation between SPICE body and frame IDs and their
  associated names.

- Whether to allow `cspyce` to support aliases, in which the same body or frame
  is associated with alternative names or IDs.

---
## EXCEPTION HANDLING

In CSPICE, the user can designate what to do in the event of an error condition
using the function `erract()`. In CSPICE, the available options are "RETURN",
"REPORT", "IGNORE", "ABORT", and "DEFAULT". The `cspyce` version of this
function adds new options "EXCEPTION" and "RUNTIME" to the suite of error
handling options supported by CSPICE.

- As usual, the user can select the exception handling mechanism to use by
  calling the function erract(). In `cspyce`, the default is "EXCEPTION".

- When using the "EXCEPTION" option, each CSPICE error condition raises a
  Python exception rather than setting the `failed()` flag. The exception
  contains the text of the CSPICE error, in the form (short message + " -- " +
  long message). The CSPICE error conditions are mapped to standard Python
  exception types in a sensible way:
  - `KeyError` indicates that a SPICE ID or name is unrecognized.
  - `ValueError` indicates that one of the inputs to a function had an invalid
    value.
  - `TypeError` indicates that one of the inputs to a function had an invalid
    type.
  - `IndexError` indicates that an integer index is out of range.
  - `IOError` indicates errors with reading and writing files, including SPICE
    kernels. IOError can also indicate that needed information was not in one
    of the furnished kernels.
  - `MemoryError` indicates that adequate memory could not be allocated, or
    that the defined size of a memory buffer in C is too small.
  - `ZeroDivisionError` indicates that a divide-by-zero has occurred.
  - `RuntimeError` indicates that an action is incompatible with some aspect
    of the CSPICE module's internal configuration.

- When using one of CSPICE's intrinsic error handling methods, no exception
  will be raised, but a call to `failed()` will reveal whether an error has
  occurred. A call to `reset()` is needed to clear the error.

- Care has been taken to reduce the chances that the "dangerous" options
  "IGNORE" and "REPORT" will cause a segmentation fault. However, this
  possibility cannot be entirely ruled out, so caution is advised.

- Because it would be a highly questionable thing to do, the "ABORT" and
  "DEFAULT" options are overridden by "EXCEPTION" when the user is running
  `cspyce` from an interactive shell. However, they resume their standard
  effects during non-interactive runs.

- When using the "RUNTIME" option, each CSPICE error condition raises a
  Python `RuntimeError` exception rather than setting the `failed()` flag. This
  is similar to the "EXCEPTION" option except the type of exception is always
  the same.

- Certain out-of-memory conditions are beyond the control of the CSPICE
  library. These will always raise a MemoryError exception, regardless of the
  exception handling method chosen.

### HANDLING OF ERROR FLAGS

Many CSPICE functions bypass the library's own error handling mechanism; instead
they return a status flag, sometimes called "found" or "ok", or perhaps an empty
response to indicate failure. The `cspyce` module provides alternative options
for these functions.

Within `cspyce`, functions that return error flags have an alternative
implementation with a suffix of "_error", which uses the CSPICE/`cspyce` error
handling mechanism detailed above instead.

Note that most `_error` versions of functions have fewer return values than the
associated non-error versions. The user should be certain which version is being
used before interpreting the returned value(s).

The `cspyce` module provides several ways to control which version of the
function to use:

- The function `use_flags()` takes a function name or list of names and
  designates the original version of each function as the default. If the input
  argument is missing, original versions are selected universally.

- The function `use_errors()` takes a function name or list of names and
  designates the `_error` version of each function as the default. If the input
  argument is missing, `_error` versions are selected universally.

To provide a more consistent Python interface, the `_error` versions of all
`cspyce` functions are selected by default. You can also choose between the
"flag" and "error" versions of a function using `cspyce` function attributes,
as discussed below.

---
## VECTORS AND ARRAYS

### VECTORIZATION
Nearly every function that takes floating-point input (be it a
scalar, 1-D array, or 2-D array) has a vectorized version that allows you to
pass a vector of these items in place of a single value. The CSPICE function is
called for each of the provided inputs, the results are collected, and the
`cspyce` function returns a vector of results.

- Vectorized versions have the same name but with `_vector` appended.

- In a vectorized function, you can replace any or all floating-point input
  parameters with an array having one extra leading dimension. Integer, boolean,
  and string inputs cannot be replaced by arrays.

- If no inputs have an extra dimension, then the result is the same as
  calling the original, un-vectorized function.

- Otherwise, all returned quantities are replaced by arrays having the size of
  the largest leading axis.

- Note that it is permissible to pass arrays with different leading axis sizes
  to the function. The vectorized function cycles through the elements of each
  array repeatedly if necessary. It may make sense to do this if each leading
  axis is an integer fraction of the largest axis size. For example, if the
  first input array has size 100 and the second has size 25, then the returned
  arrays(s) will have 100 elements and the values of the second will each be
  used four times. However, caution is advised when using this capability.

- Some functions are not vectorized. These include:
  - Functions that have no floating-point inputs.
  - Functions that include strings among the returned quantities.
  - Functions that already return arrays where the leading axis could be
    variable in size.

- In the two cases (`ckgp` and `ckgpav`) where a function can be both vectorized
  and either raise an error or return a flag, the `_vector` suffix comes
  before `_error`.

### ARRAYS
An optional import allows the `cspyce` module to support multidimensional
arrays:

```python
import cspyce
import cspyce.arrays
```

The latter import creates a new function in which the suffix `_array` replaces
`_vector` for every vectorized function. Whereas `_vector` functions support
only a single extra dimension, `_array` functions follow all the standard rules
of shape broadcasting as defined in NumPy. For example, if one input has leading
dimension (10,4) and another has dimension (4,), then the two shapes will be
broadcasted together and returned quantities will be arrays with shape (10,4).

You can choose between the scalar, vector, and array versions of a function by
using their explicit names, or by using `cspyce` function attributes, as discussed
below.

---
## ALIASES

Aliases allow the user to associate multiple names or SPICE codes with the same
CSPICE body or frame. Aliases can be used for a variety of purposes.

- You can use names and codes interchangeably as input arguments to any `cspyce`
  function.
- You can use a body name or code in place of a frame name or code, and the
  primary frame associated with that identified body will be used.
- Strings that represent integers are equivalent to the integers themselves.

Most importantly, you can allow multiple names or codes to refer to the same
CSPICE body or frame. For bodies and frames that have multiple names or codes,
calls to a `cspyce` function will try each option in sequence until it finds one
that works. Options are always tried in the order in which they were defined, so
higher-priority names and codes are tried first.

Example 1: Jupiter's moon Dia uses code 553, but it previously used code
55076. With 55076 defined as an alias for 553, a `cspyce` call will return
information about Dia under either of its codes.

Example 2: The Earth's rotation is, by default, modeled by frame "IAU_EARTH".
However, "ITRF93" is the name of a much more precise description of Earth's
rotation. If you define "IAU_EARTH" as an alias for "ITRF93", then the `cspyce`
toolkit will use ITRF93 if it is available, and otherwise IAU_EARTH.

Immediately after a `cspyce` call involving aliases, you can find out what value
or values were actually used by looking at attributes of the function. For
example, the first input to the `cspyce` function `spkez` is called `targ` and
it identifies the code of a target being observed. After a call to

```python
cspyce.spkez(553, ...
```
the value of `cspyce.spkez.targ` will be the code actually used, in this case
either 553 or 55076.

To enable aliases, you must import an additional module

```python
import cspyce
import cspyce.aliases
```

(Note that `cspyce.aliases` and `cspyce.arrays` can both be imported, and in
either order. Note also that these are unconventional modules, in that they
introduce new functionality into the `cspyce` namespace rather than creating
new namespaces called `cspyce.aliases` and `cspyce.arrays`.)

With this import, a new function is defined for every `cspyce` function that takes
a frame or body as input. The new function has the same name as the pre-existing
`cspyce` function, but with `_alias` inserted immediately after the original
`cspyce` name (and before any other suffix such as `_vector` or `_error`).

You can make alias support the default for individual `cspyce` functions or for
the entire `cspyce` module by calling `cspyce.use_aliases()`. These versions
can subsequently be disabled as the default by calling `cspyce.use_noaliases()`
(see more detailed discussion below).

To define a body alias or frame alias, call

    cspyce.define_body_aliases(name_or_code, name_or_code, ...)
    cspyce.define_frame_aliases(name_or_code, name_or_code, ...)

where the arguments are an arbitrary list of codes and names.

To determine the aliases associated with a name or code, call

    cspyce.get_body_aliases(name_or_code)
    cspyce.get_frame_aliases(name_or_code)

where the argument is either a name or a code.

You can also select between the alias-supporting and alias-nonsupporting
versions of a function using function attributes as discussed below.

---
## FUNCTION NAMES, VERSIONS AND SELECTION METHODS

A `cspyce` function can accumulate several suffixes, based on the particular
behavior, as so:
```python
basename[_alias][_vector|_array][_error]
```
Only functions that are truly distinct are defined. For example, if a function
does not have a vector option, then no function will exist containing the
`_vector` suffix.

You can use these functions to set defaults:

    cspyce.use_flags()
    cspyce.use_errors()
    cspyce.use_scalars()
    cspyce.use_vectors()
    cspyce.use_arrays()
    cspyce.use_aliases()
    cspyce.use_noaliases()

Each function can take one or more arguments referencing specific `cspyce`
functions, in which case the defaults only apply to those functions. If no
arguments are specified, the default applies to all functions. For example,
to use "flags" as the default for all functions except `ckgp`, you could use:

    cspyce.use_flags()
    cspyce.use_errors(cspyce.ckgp)

### FUNCTION ATTRIBUTES

Function attributes provide a simpler mechanism for choosing the needed
version of a function, without needing to remember the suffix rules. Every
`cspyce` function has these attributes, each of which identifies another
(or possibly the same) `cspyce` function:

| Attribute      | Meaning                                                    |
|----------------|------------------------------------------------------------|
| `func.flag`    | the equivalent function without the _error suffix, if any. |
| `func.error`   | the equivalent function with the _error suffix, if any.    |
| `func.scalar`  | the equivalent function without _array or _vector suffixes.|
| `func.vector`  | the equivalent function with the _vector suffix, if any.   |
| `func.array`   | the equivalent function with the _array suffix, if any.    |
| `func.alias`   | the equivalent function with the _alias suffix, if any.    |
| `func.noalias` | the equivalent function without the _alias suffix, if any. |

These attributes are always defined, even if the particular option is not
supported by that function. This saves the programmer the effort of remembering,
for example, which functions support aliases or which functions support flags.

Thus, if the programmer wishes to be sure they are using the error version of
function `bodn2c`, and wants the vector version if it exists (but it doesn't!),
they can call

```python
cspyce.bodn2c.error.vector(args...)
```

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/SETI/pds-cspyce",
    "name": "rfrenchseti-cspyce",
    "maintainer": "Robert S. French",
    "docs_url": null,
    "requires_python": ">=3.8",
    "maintainer_email": "\"Robert S. French\" <rfrench@seti.org>",
    "keywords": "cspyce,spice,cspice,naif,jpl,space,geometry,ephemeris",
    "author": "Mark R. Showalter",
    "author_email": "\"Mark R. Showalter\" <mshowalter@seti.org>",
    "download_url": "https://files.pythonhosted.org/packages/c4/87/cf7981e4b6785a0b7b4fc1d93b452dd01a1d51f9d000b239d2ce83ed9fb5/rfrenchseti_cspyce-2.0.14.tar.gz",
    "platform": null,
    "description": "[![PyPI version](https://badge.fury.io/py/cspyce.svg)](https://badge.fury.io/py/cspyce)\n\n# `cspyce` MODULE OVERVIEW\nVersion 2.0\n\nMarch, 2022\n\nMark Showalter, PDS Ring-Moon Systems Node, SETI Institute\n\n`cspyce` is a Python module that provides an interface to the C-language CSPICE\nlibrary produced by the Navigation and Ancillary Information Facility\n([NAIF](https://naif.jpl.nasa.gov/naif/)) of NASA's Planetary Data System (PDS).\nIt implements most functions of CSPICE in a Python-like way, while also\nsupporting numerous enhancements, including support for Python exceptions,\narray inputs, and aliases.\n\n`cspyce` may be installed by running `pip install cspyce`.\n\nPython versions 3.8 thru 3.11 are currently supported, with pre-built wheels\navailable for Linux, MacOS, and Windows.\n\nIf you are looking for information on running or distributing this code from\nthe GitHub sources, look at the file `README-developers.md` in this directory.\n\n## PYTHONIZATION\n\n`cspyce` has been designed to replicate the core features of CSPICE for\nusers who wish to translate a program that already exists. Function names in\n`cspyce` match their CSPICE names.\n\nHowever, it is also designed to behave as much as possible like a normal\nPython module. To that end, it has the following features.\n\n- The C language requires buffers to be allocated for output and it requires\n  array sizes to be included for both input and output. The `cspyce` module,\n  instead, eliminates all extraneous inputs, and all output arguments are\n  returned as a list (or as a single object if the function only returns one\n  item).\n\n- `cspyce` has been fully integrated with Python's exception handling;\n  programmers can still opt to use CSPICE's error handling mechanism if they\n  wish to.\n\n- All `cspyce` functions can handle positional arguments as well as arguments\n  passed by name.\n\n- All `cspyce` functions have informative docstrings, so typing\n  `help(function)` provides useful information.\n\n- Many `cspyce` functions take sensible default values if input arguments are\n  omitted.\n\n- The CSPICE concepts of \"windows\" and \"cells\" are not needed in Python. In\n  CSPICE, these allow a function to return a variable amount of information,\n  which the program can then iterate through. The `cspyce` counterpart of each of\n  these functions simply returns a complete list of the results.\n\n## ENHANCEMENTS\n\nIn addition, the `cspyce` module takes advantage of features of the Python\nlanguage to provide numerous options about how the functions perform their work.\nThese options include:\n\n- Whether to return a CSPICE-style error condition or to raise a Python\n  exception.\n\n- How to handle CSPICE functions that return a status flag, e.g., \"found\" or\n  \"ok\", instead of using the CSPICE toolkit's error handling mechanism.\n\n- Whether to allow `cspyce` functions to accept arrays of inputs all at once,\n  rather than looping through inputs in Python.\n\n- Whether to automate the translation between SPICE body and frame IDs and their\n  associated names.\n\n- Whether to allow `cspyce` to support aliases, in which the same body or frame\n  is associated with alternative names or IDs.\n\n---\n## EXCEPTION HANDLING\n\nIn CSPICE, the user can designate what to do in the event of an error condition\nusing the function `erract()`. In CSPICE, the available options are \"RETURN\",\n\"REPORT\", \"IGNORE\", \"ABORT\", and \"DEFAULT\". The `cspyce` version of this\nfunction adds new options \"EXCEPTION\" and \"RUNTIME\" to the suite of error\nhandling options supported by CSPICE.\n\n- As usual, the user can select the exception handling mechanism to use by\n  calling the function erract(). In `cspyce`, the default is \"EXCEPTION\".\n\n- When using the \"EXCEPTION\" option, each CSPICE error condition raises a\n  Python exception rather than setting the `failed()` flag. The exception\n  contains the text of the CSPICE error, in the form (short message + \" -- \" +\n  long message). The CSPICE error conditions are mapped to standard Python\n  exception types in a sensible way:\n  - `KeyError` indicates that a SPICE ID or name is unrecognized.\n  - `ValueError` indicates that one of the inputs to a function had an invalid\n    value.\n  - `TypeError` indicates that one of the inputs to a function had an invalid\n    type.\n  - `IndexError` indicates that an integer index is out of range.\n  - `IOError` indicates errors with reading and writing files, including SPICE\n    kernels. IOError can also indicate that needed information was not in one\n    of the furnished kernels.\n  - `MemoryError` indicates that adequate memory could not be allocated, or\n    that the defined size of a memory buffer in C is too small.\n  - `ZeroDivisionError` indicates that a divide-by-zero has occurred.\n  - `RuntimeError` indicates that an action is incompatible with some aspect\n    of the CSPICE module's internal configuration.\n\n- When using one of CSPICE's intrinsic error handling methods, no exception\n  will be raised, but a call to `failed()` will reveal whether an error has\n  occurred. A call to `reset()` is needed to clear the error.\n\n- Care has been taken to reduce the chances that the \"dangerous\" options\n  \"IGNORE\" and \"REPORT\" will cause a segmentation fault. However, this\n  possibility cannot be entirely ruled out, so caution is advised.\n\n- Because it would be a highly questionable thing to do, the \"ABORT\" and\n  \"DEFAULT\" options are overridden by \"EXCEPTION\" when the user is running\n  `cspyce` from an interactive shell. However, they resume their standard\n  effects during non-interactive runs.\n\n- When using the \"RUNTIME\" option, each CSPICE error condition raises a\n  Python `RuntimeError` exception rather than setting the `failed()` flag. This\n  is similar to the \"EXCEPTION\" option except the type of exception is always\n  the same.\n\n- Certain out-of-memory conditions are beyond the control of the CSPICE\n  library. These will always raise a MemoryError exception, regardless of the\n  exception handling method chosen.\n\n### HANDLING OF ERROR FLAGS\n\nMany CSPICE functions bypass the library's own error handling mechanism; instead\nthey return a status flag, sometimes called \"found\" or \"ok\", or perhaps an empty\nresponse to indicate failure. The `cspyce` module provides alternative options\nfor these functions.\n\nWithin `cspyce`, functions that return error flags have an alternative\nimplementation with a suffix of \"_error\", which uses the CSPICE/`cspyce` error\nhandling mechanism detailed above instead.\n\nNote that most `_error` versions of functions have fewer return values than the\nassociated non-error versions. The user should be certain which version is being\nused before interpreting the returned value(s).\n\nThe `cspyce` module provides several ways to control which version of the\nfunction to use:\n\n- The function `use_flags()` takes a function name or list of names and\n  designates the original version of each function as the default. If the input\n  argument is missing, original versions are selected universally.\n\n- The function `use_errors()` takes a function name or list of names and\n  designates the `_error` version of each function as the default. If the input\n  argument is missing, `_error` versions are selected universally.\n\nTo provide a more consistent Python interface, the `_error` versions of all\n`cspyce` functions are selected by default. You can also choose between the\n\"flag\" and \"error\" versions of a function using `cspyce` function attributes,\nas discussed below.\n\n---\n## VECTORS AND ARRAYS\n\n### VECTORIZATION\nNearly every function that takes floating-point input (be it a\nscalar, 1-D array, or 2-D array) has a vectorized version that allows you to\npass a vector of these items in place of a single value. The CSPICE function is\ncalled for each of the provided inputs, the results are collected, and the\n`cspyce` function returns a vector of results.\n\n- Vectorized versions have the same name but with `_vector` appended.\n\n- In a vectorized function, you can replace any or all floating-point input\n  parameters with an array having one extra leading dimension. Integer, boolean,\n  and string inputs cannot be replaced by arrays.\n\n- If no inputs have an extra dimension, then the result is the same as\n  calling the original, un-vectorized function.\n\n- Otherwise, all returned quantities are replaced by arrays having the size of\n  the largest leading axis.\n\n- Note that it is permissible to pass arrays with different leading axis sizes\n  to the function. The vectorized function cycles through the elements of each\n  array repeatedly if necessary. It may make sense to do this if each leading\n  axis is an integer fraction of the largest axis size. For example, if the\n  first input array has size 100 and the second has size 25, then the returned\n  arrays(s) will have 100 elements and the values of the second will each be\n  used four times. However, caution is advised when using this capability.\n\n- Some functions are not vectorized. These include:\n  - Functions that have no floating-point inputs.\n  - Functions that include strings among the returned quantities.\n  - Functions that already return arrays where the leading axis could be\n    variable in size.\n\n- In the two cases (`ckgp` and `ckgpav`) where a function can be both vectorized\n  and either raise an error or return a flag, the `_vector` suffix comes\n  before `_error`.\n\n### ARRAYS\nAn optional import allows the `cspyce` module to support multidimensional\narrays:\n\n```python\nimport cspyce\nimport cspyce.arrays\n```\n\nThe latter import creates a new function in which the suffix `_array` replaces\n`_vector` for every vectorized function. Whereas `_vector` functions support\nonly a single extra dimension, `_array` functions follow all the standard rules\nof shape broadcasting as defined in NumPy. For example, if one input has leading\ndimension (10,4) and another has dimension (4,), then the two shapes will be\nbroadcasted together and returned quantities will be arrays with shape (10,4).\n\nYou can choose between the scalar, vector, and array versions of a function by\nusing their explicit names, or by using `cspyce` function attributes, as discussed\nbelow.\n\n---\n## ALIASES\n\nAliases allow the user to associate multiple names or SPICE codes with the same\nCSPICE body or frame. Aliases can be used for a variety of purposes.\n\n- You can use names and codes interchangeably as input arguments to any `cspyce`\n  function.\n- You can use a body name or code in place of a frame name or code, and the\n  primary frame associated with that identified body will be used.\n- Strings that represent integers are equivalent to the integers themselves.\n\nMost importantly, you can allow multiple names or codes to refer to the same\nCSPICE body or frame. For bodies and frames that have multiple names or codes,\ncalls to a `cspyce` function will try each option in sequence until it finds one\nthat works. Options are always tried in the order in which they were defined, so\nhigher-priority names and codes are tried first.\n\nExample 1: Jupiter's moon Dia uses code 553, but it previously used code\n55076. With 55076 defined as an alias for 553, a `cspyce` call will return\ninformation about Dia under either of its codes.\n\nExample 2: The Earth's rotation is, by default, modeled by frame \"IAU_EARTH\".\nHowever, \"ITRF93\" is the name of a much more precise description of Earth's\nrotation. If you define \"IAU_EARTH\" as an alias for \"ITRF93\", then the `cspyce`\ntoolkit will use ITRF93 if it is available, and otherwise IAU_EARTH.\n\nImmediately after a `cspyce` call involving aliases, you can find out what value\nor values were actually used by looking at attributes of the function. For\nexample, the first input to the `cspyce` function `spkez` is called `targ` and\nit identifies the code of a target being observed. After a call to\n\n```python\ncspyce.spkez(553, ...\n```\nthe value of `cspyce.spkez.targ` will be the code actually used, in this case\neither 553 or 55076.\n\nTo enable aliases, you must import an additional module\n\n```python\nimport cspyce\nimport cspyce.aliases\n```\n\n(Note that `cspyce.aliases` and `cspyce.arrays` can both be imported, and in\neither order. Note also that these are unconventional modules, in that they\nintroduce new functionality into the `cspyce` namespace rather than creating\nnew namespaces called `cspyce.aliases` and `cspyce.arrays`.)\n\nWith this import, a new function is defined for every `cspyce` function that takes\na frame or body as input. The new function has the same name as the pre-existing\n`cspyce` function, but with `_alias` inserted immediately after the original\n`cspyce` name (and before any other suffix such as `_vector` or `_error`).\n\nYou can make alias support the default for individual `cspyce` functions or for\nthe entire `cspyce` module by calling `cspyce.use_aliases()`. These versions\ncan subsequently be disabled as the default by calling `cspyce.use_noaliases()`\n(see more detailed discussion below).\n\nTo define a body alias or frame alias, call\n\n    cspyce.define_body_aliases(name_or_code, name_or_code, ...)\n    cspyce.define_frame_aliases(name_or_code, name_or_code, ...)\n\nwhere the arguments are an arbitrary list of codes and names.\n\nTo determine the aliases associated with a name or code, call\n\n    cspyce.get_body_aliases(name_or_code)\n    cspyce.get_frame_aliases(name_or_code)\n\nwhere the argument is either a name or a code.\n\nYou can also select between the alias-supporting and alias-nonsupporting\nversions of a function using function attributes as discussed below.\n\n---\n## FUNCTION NAMES, VERSIONS AND SELECTION METHODS\n\nA `cspyce` function can accumulate several suffixes, based on the particular\nbehavior, as so:\n```python\nbasename[_alias][_vector|_array][_error]\n```\nOnly functions that are truly distinct are defined. For example, if a function\ndoes not have a vector option, then no function will exist containing the\n`_vector` suffix.\n\nYou can use these functions to set defaults:\n\n    cspyce.use_flags()\n    cspyce.use_errors()\n    cspyce.use_scalars()\n    cspyce.use_vectors()\n    cspyce.use_arrays()\n    cspyce.use_aliases()\n    cspyce.use_noaliases()\n\nEach function can take one or more arguments referencing specific `cspyce`\nfunctions, in which case the defaults only apply to those functions. If no\narguments are specified, the default applies to all functions. For example,\nto use \"flags\" as the default for all functions except `ckgp`, you could use:\n\n    cspyce.use_flags()\n    cspyce.use_errors(cspyce.ckgp)\n\n### FUNCTION ATTRIBUTES\n\nFunction attributes provide a simpler mechanism for choosing the needed\nversion of a function, without needing to remember the suffix rules. Every\n`cspyce` function has these attributes, each of which identifies another\n(or possibly the same) `cspyce` function:\n\n| Attribute      | Meaning                                                    |\n|----------------|------------------------------------------------------------|\n| `func.flag`    | the equivalent function without the _error suffix, if any. |\n| `func.error`   | the equivalent function with the _error suffix, if any.    |\n| `func.scalar`  | the equivalent function without _array or _vector suffixes.|\n| `func.vector`  | the equivalent function with the _vector suffix, if any.   |\n| `func.array`   | the equivalent function with the _array suffix, if any.    |\n| `func.alias`   | the equivalent function with the _alias suffix, if any.    |\n| `func.noalias` | the equivalent function without the _alias suffix, if any. |\n\nThese attributes are always defined, even if the particular option is not\nsupported by that function. This saves the programmer the effort of remembering,\nfor example, which functions support aliases or which functions support flags.\n\nThus, if the programmer wishes to be sure they are using the error version of\nfunction `bodn2c`, and wants the vector version if it exists (but it doesn't!),\nthey can call\n\n```python\ncspyce.bodn2c.error.vector(args...)\n```\n",
    "bugtrack_url": null,
    "license": "Apache-2.0",
    "summary": "High-performance Python interface to the NAIF CSPICE library",
    "version": "2.0.14",
    "project_urls": {
        "Homepage": "https://github.com/SETI/pds-cspyce",
        "Issues": "https://github.com/SETI/pds-cspyce/issues",
        "Repository": "https://github.com/SETI/pds-cspyce",
        "Source": "https://github.com/SETI/pds-cspyce"
    },
    "split_keywords": [
        "cspyce",
        "spice",
        "cspice",
        "naif",
        "jpl",
        "space",
        "geometry",
        "ephemeris"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "f182634a9ac5f633776160c6d19e02dbd61c73d2d1c564cca94b63b04948b937",
                "md5": "8410434a4f273460339bdd53d81f242f",
                "sha256": "da1b695057a881bd76cb36de084a053b37c75e0e81f49943778a0ebd59e6c866"
            },
            "downloads": -1,
            "filename": "rfrenchseti_cspyce-2.0.14-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl",
            "has_sig": false,
            "md5_digest": "8410434a4f273460339bdd53d81f242f",
            "packagetype": "bdist_wheel",
            "python_version": "cp310",
            "requires_python": ">=3.8",
            "size": 6386354,
            "upload_time": "2023-05-04T21:00:56",
            "upload_time_iso_8601": "2023-05-04T21:00:56.571466Z",
            "url": "https://files.pythonhosted.org/packages/f1/82/634a9ac5f633776160c6d19e02dbd61c73d2d1c564cca94b63b04948b937/rfrenchseti_cspyce-2.0.14-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "fb560980d8e0f3a75718274c59626e38ed666b95c67ada3cf2241733dd0b4ad5",
                "md5": "7caa10cc6fb5e0e9c9f5260ae1ec53bd",
                "sha256": "011e366996c9386ea3b7d63e4bc1d9385e36cfbb594718e1f31146f353d311a1"
            },
            "downloads": -1,
            "filename": "rfrenchseti_cspyce-2.0.14-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl",
            "has_sig": false,
            "md5_digest": "7caa10cc6fb5e0e9c9f5260ae1ec53bd",
            "packagetype": "bdist_wheel",
            "python_version": "cp311",
            "requires_python": ">=3.8",
            "size": 6481622,
            "upload_time": "2023-05-04T21:00:59",
            "upload_time_iso_8601": "2023-05-04T21:00:59.558236Z",
            "url": "https://files.pythonhosted.org/packages/fb/56/0980d8e0f3a75718274c59626e38ed666b95c67ada3cf2241733dd0b4ad5/rfrenchseti_cspyce-2.0.14-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "6c7e92464c8c47b9c8a6b3a96f8e56195c59c3f9bfd4875e75b2e4f988254cf1",
                "md5": "5062afc2d44476eae4f96c3359f3a737",
                "sha256": "5cec25ccaad7d3d4037a6f2b8cbbafb978a594507c053e5f619a7cb15fa33358"
            },
            "downloads": -1,
            "filename": "rfrenchseti_cspyce-2.0.14-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl",
            "has_sig": false,
            "md5_digest": "5062afc2d44476eae4f96c3359f3a737",
            "packagetype": "bdist_wheel",
            "python_version": "cp38",
            "requires_python": ">=3.8",
            "size": 6396172,
            "upload_time": "2023-05-04T21:01:01",
            "upload_time_iso_8601": "2023-05-04T21:01:01.506844Z",
            "url": "https://files.pythonhosted.org/packages/6c/7e/92464c8c47b9c8a6b3a96f8e56195c59c3f9bfd4875e75b2e4f988254cf1/rfrenchseti_cspyce-2.0.14-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "41ab25b7db3a8a7eddd6deb82ffd889be353c6de19c2c89d4e0fc06ca1c9d580",
                "md5": "7396afa3d790aac53f150774fd00471e",
                "sha256": "6d4b27de501952ec463f08dc06ad780dd44a86b8ac15760a8caaf14720178f76"
            },
            "downloads": -1,
            "filename": "rfrenchseti_cspyce-2.0.14-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl",
            "has_sig": false,
            "md5_digest": "7396afa3d790aac53f150774fd00471e",
            "packagetype": "bdist_wheel",
            "python_version": "cp39",
            "requires_python": ">=3.8",
            "size": 6385627,
            "upload_time": "2023-05-04T21:01:04",
            "upload_time_iso_8601": "2023-05-04T21:01:04.014112Z",
            "url": "https://files.pythonhosted.org/packages/41/ab/25b7db3a8a7eddd6deb82ffd889be353c6de19c2c89d4e0fc06ca1c9d580/rfrenchseti_cspyce-2.0.14-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "c487cf7981e4b6785a0b7b4fc1d93b452dd01a1d51f9d000b239d2ce83ed9fb5",
                "md5": "e00c637addf96d83ec34ed701e2c1d25",
                "sha256": "83c6f11b576357cc1fb42baeefe0c2f26b3bee25f17623de471b2e56c10af0e6"
            },
            "downloads": -1,
            "filename": "rfrenchseti_cspyce-2.0.14.tar.gz",
            "has_sig": false,
            "md5_digest": "e00c637addf96d83ec34ed701e2c1d25",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.8",
            "size": 59268799,
            "upload_time": "2023-05-04T21:01:07",
            "upload_time_iso_8601": "2023-05-04T21:01:07.937440Z",
            "url": "https://files.pythonhosted.org/packages/c4/87/cf7981e4b6785a0b7b4fc1d93b452dd01a1d51f9d000b239d2ce83ed9fb5/rfrenchseti_cspyce-2.0.14.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-05-04 21:01:07",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "SETI",
    "github_project": "pds-cspyce",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "requirements": [],
    "lcname": "rfrenchseti-cspyce"
}
        
Elapsed time: 0.08650s