keteutils.propagate.nongrav_parameters

keteutils.propagate.nongrav_parameters(
    orb,
    m_ng=None,
    c_a1='A1',
    c_a2='A2',
    c_a3='A3',
    c_dt='DT',
    alpha=SBDB_DEFAULT_RADIAL_LAW['alpha'],
    r_0=SBDB_DEFAULT_RADIAL_LAW['r_0'],
    m=SBDB_DEFAULT_RADIAL_LAW['m'],
    n=SBDB_DEFAULT_RADIAL_LAW['n'],
    k=SBDB_DEFAULT_RADIAL_LAW['k'],
    c_alpha='alpha',
    c_r0='r_0',
    c_m='m',
    c_n='n',
    c_k='k',
    c_is_comet='is_comet',
    c_kind='kind',
    c_prefix='prefix',
    c_desig='desig',
)

Normalize the non-gravitational parameters used to construct Kete models.

Parameters

orb : pandas.DataFrame

Source orbit table. Row order is preserved and the input is unchanged.

m_ng : bool or array-like of bool, default = None

Rows that use a model. If absent, a nonzero normalized A1, A2, A3, or DT selects the row. Absent columns, missing values, and nonnumeric values count as zero.

c_a1 : str, default = 'A1'

Source column names. A1/A2/A3 are in AU/day²; DT is in days.

c_a2 : str, default = 'A2'

Source column names. A1/A2/A3 are in AU/day²; DT is in days.

c_a3 : str, default = 'A3'

Source column names. A1/A2/A3 are in AU/day²; DT is in days.

c_dt : str, default = 'DT'

Source column names. A1/A2/A3 are in AU/day²; DT is in days.

alpha : float or array-like, default = SBDB_DEFAULT_RADIAL_LAW['alpha']

Radial-law defaults for comets, by default the SBDB default law (configs.SBDB_DEFAULT_RADIAL_LAW). r_0 is in AU; the other values are dimensionless. A scalar fills missing entries of comet rows. An array replaces the column for all rows and must align with the full input table.

r_0 : float or array-like, default = SBDB_DEFAULT_RADIAL_LAW['r_0']

Radial-law defaults for comets, by default the SBDB default law (configs.SBDB_DEFAULT_RADIAL_LAW). r_0 is in AU; the other values are dimensionless. A scalar fills missing entries of comet rows. An array replaces the column for all rows and must align with the full input table.

m : float or array-like, default = SBDB_DEFAULT_RADIAL_LAW['m']

Radial-law defaults for comets, by default the SBDB default law (configs.SBDB_DEFAULT_RADIAL_LAW). r_0 is in AU; the other values are dimensionless. A scalar fills missing entries of comet rows. An array replaces the column for all rows and must align with the full input table.

n : float or array-like, default = SBDB_DEFAULT_RADIAL_LAW['n']

Radial-law defaults for comets, by default the SBDB default law (configs.SBDB_DEFAULT_RADIAL_LAW). r_0 is in AU; the other values are dimensionless. A scalar fills missing entries of comet rows. An array replaces the column for all rows and must align with the full input table.

k : float or array-like, default = SBDB_DEFAULT_RADIAL_LAW['k']

Radial-law defaults for comets, by default the SBDB default law (configs.SBDB_DEFAULT_RADIAL_LAW). r_0 is in AU; the other values are dimensionless. A scalar fills missing entries of comet rows. An array replaces the column for all rows and must align with the full input table.

c_alpha : str, default = 'alpha'

Source column names for the radial-law parameters. The columns read from orb (those with a scalar default) must be all present or all absent.

c_r0 : str, default = 'r_0'

Source column names for the radial-law parameters. The columns read from orb (those with a scalar default) must be all present or all absent.

c_m : str, default = 'm'

Source column names for the radial-law parameters. The columns read from orb (those with a scalar default) must be all present or all absent.

c_n : str, default = 'n'

Source column names for the radial-law parameters. The columns read from orb (those with a scalar default) must be all present or all absent.

c_k : str, default = 'k'

Source column names for the radial-law parameters. The columns read from orb (those with a scalar default) must be all present or all absent.

c_is_comet : str, default = 'is_comet'

Columns that tell comets from asteroids, used in this order:

  1. c_is_comet, boolean (written by fetch_orb with kind2bools=True, the default).
  2. c_kind, the SBDB kind ("a..." asteroid, "c..." comet).
  3. c_prefix, the SBDB prefix (C, P, D, X, I comet; A or missing asteroid).
  4. c_desig, the MPC designation format, with a warning. Without the prefix this is not exact: a comet with an asteroid-style designation (C/2001 OG108 is stored as "2001 OG108") counts as an asteroid, and an A/ object ("2017 U1") as a comet.

Asteroid rows fill missing radial-law values from alpha=1, r_0=1, m=2, n=0, k=0 instead of the scalar defaults, so g(r) = (1 au / r)**2, the law of most JPL asteroid fits.

c_kind : str, default = 'kind'

Columns that tell comets from asteroids, used in this order:

  1. c_is_comet, boolean (written by fetch_orb with kind2bools=True, the default).
  2. c_kind, the SBDB kind ("a..." asteroid, "c..." comet).
  3. c_prefix, the SBDB prefix (C, P, D, X, I comet; A or missing asteroid).
  4. c_desig, the MPC designation format, with a warning. Without the prefix this is not exact: a comet with an asteroid-style designation (C/2001 OG108 is stored as "2001 OG108") counts as an asteroid, and an A/ object ("2017 U1") as a comet.

Asteroid rows fill missing radial-law values from alpha=1, r_0=1, m=2, n=0, k=0 instead of the scalar defaults, so g(r) = (1 au / r)**2, the law of most JPL asteroid fits.

c_prefix : str, default = 'prefix'

Columns that tell comets from asteroids, used in this order:

  1. c_is_comet, boolean (written by fetch_orb with kind2bools=True, the default).
  2. c_kind, the SBDB kind ("a..." asteroid, "c..." comet).
  3. c_prefix, the SBDB prefix (C, P, D, X, I comet; A or missing asteroid).
  4. c_desig, the MPC designation format, with a warning. Without the prefix this is not exact: a comet with an asteroid-style designation (C/2001 OG108 is stored as "2001 OG108") counts as an asteroid, and an A/ object ("2017 U1") as a comet.

Asteroid rows fill missing radial-law values from alpha=1, r_0=1, m=2, n=0, k=0 instead of the scalar defaults, so g(r) = (1 au / r)**2, the law of most JPL asteroid fits.

c_desig : str, default = 'desig'

Columns that tell comets from asteroids, used in this order:

  1. c_is_comet, boolean (written by fetch_orb with kind2bools=True, the default).
  2. c_kind, the SBDB kind ("a..." asteroid, "c..." comet).
  3. c_prefix, the SBDB prefix (C, P, D, X, I comet; A or missing asteroid).
  4. c_desig, the MPC designation format, with a warning. Without the prefix this is not exact: a comet with an asteroid-style designation (C/2001 OG108 is stored as "2001 OG108") counts as an asteroid, and an A/ object ("2017 U1") as a comet.

Asteroid rows fill missing radial-law values from alpha=1, r_0=1, m=2, n=0, k=0 instead of the scalar defaults, so g(r) = (1 au / r)**2, the law of most JPL asteroid fits.

Raises

: ValueError

If only some of the radial-law columns read from orb are present, a selected row needs a scalar default but none of the four type columns exists, or a selected row has a non-finite parameter.

Notes

The column n of a JPL SBDB query table is the mean motion (deg/day), not the exponent n of the radial law. fetch_orb renames it to mean_motion. A table saved by an older skyloc version still has it as n without the other radial-law columns, so it raises ValueError.

The defaults above are only a guess. JPL fits some objects with another law: CO-driven comets (e.g., 22P), 2I/Borisov and 3I/ATLAS with (1 au / r)**2, and a few asteroids with the SBDB default law. The bulk SBDB API does not give the law, so a table without the radial-law columns gets the wrong force for those objects. fetch_orb queries the law of each object with non-gravitational terms and writes the columns.

Returns

: list of dict or None

One constructor-argument dictionary per selected row, otherwise None. These exact values can be used for both model construction and caching.