astro py:docs

- Index
- Modules

### Navigation

- next »
- « previous |
- Astropy v1.1.1 »
- VOTable XML handling (`astropy.io.votable`) »
- coerce_range_list_param

# coerce_range_list_param

`astropy.io.votable.util.``coerce_range_list_param`(p, frames=None, numeric=True)

  Coerces and/or verifies the object p into a valid range-list-format parameter.

  As defined in Section 8.7.2 of Simple Spectral Access Protocol.

  Parameters:

  p : str or sequence

  > May be a string as passed verbatim to the service expecting a range-list, or a sequence. If a sequence, each item must be either:

  > > - a numeric value
  > > - a named value, such as, for example, ‘J’ for named spectrum (if the numeric kwarg is False)
  > > - a 2-tuple indicating a range
  > > - the last item my be a string indicating the frame of reference

  frames : sequence of str, optional

  > A sequence of acceptable frame of reference keywords. If not provided, the default set in `set_reference_frames` will be used.

  numeric : bool, optional

  > TODO

  Returns:

  parts : tuple

  > The result is a tuple:
  >   - a string suitable for passing to a service as a range-list argument
  >   - an integer counting the number of elements