astro py:docs

- Index
- Modules

### Navigation

- next »
- « previous |
- Astropy v1.1.1 »
- Models and Fitting (`astropy.modeling`) »
- LabeledInput

# LabeledInput

class `astropy.modeling.``LabeledInput`(*args, **kwargs)

  Bases: `collections.OrderedDict`

  Deprecated since version 1.0: The LabeledInput class is deprecated and may be removed in a future version. Use Compound Models as described in the Astropy documentation instead.

  Used by `SerialCompositeModel` and `SummedCompositeModel` to choose input data using labels.

  This is a container assigning labels (names) to all input data arrays to a composite model.

  Parameters:

  data : list

  > List of all input data

  labels : list of strings

  > names matching each coordinate in data

  Examples

      >>> y, x = np.mgrid[:5, :5]
      >>> l = np.arange(10)
      >>> labeled_input = LabeledInput([x, y, l], ['x', 'y', 'pixel'])
      >>> labeled_input.x
      array([[0, 1, 2, 3, 4],
             [0, 1, 2, 3, 4],
             [0, 1, 2, 3, 4],
             [0, 1, 2, 3, 4],
             [0, 1, 2, 3, 4]])
      >>> labeled_input['x']
      array([[0, 1, 2, 3, 4],
             [0, 1, 2, 3, 4],
             [0, 1, 2, 3, 4],
             [0, 1, 2, 3, 4],
             [0, 1, 2, 3, 4]])

  Deprecated since version 1.0: The LabeledInput class is deprecated and may be removed in a future version. Use Compound Models as described in the Astropy documentation instead.

  Attributes Summary

  `labels` |

  Methods Summary

  `add`([label, value]) | Add input data to a LabeledInput object
  `copy`() |

  Attributes Documentation

  `labels`

  Methods Documentation

  `add`(label=None, value=None, **kw)

    Add input data to a LabeledInput object

    Parameters:

    label : str

    > coordinate label

    value : numerical type

    > coordinate value

    kw : dictionary

    > if given this is a dictionary of `{label: value}` pairs

  `copy`()