StreamTrack

class trackstream.core.StreamTrack(path: trackstream.utils.path.Path, stream_data: Optional[Union[astropy.table.Table, trackstream._type_hints.FrameType, astropy.coordinates.SkyCoord]], origin: Union[trackstream._type_hints.FrameType, astropy.coordinates.SkyCoord], **meta)[source]

Bases: object

A stream track interpolation as function of arc length.

The track is Callable, returning a Frame.

Parameters
pathPath
stream_data

Original stream data

origin

of the coordinate system (often the progenitor)

Attributes Summary

affine

frame

frame_fit

Descriptor to define custom attribute which gets stored in the object meta dict and can have a defined default.

kalman

Descriptor to define custom attribute which gets stored in the object meta dict and can have a defined default.

meta

origin

path

som

Descriptor to define custom attribute which gets stored in the object meta dict and can have a defined default.

stream_data

track

The path's central track.

visit_order

Descriptor to define custom attribute which gets stored in the object meta dict and can have a defined default.

Methods Summary

__call__([affine, angular])

Get discrete points along interpolated stream track.

probability(point[, background_model, ...])

Probability point is part of the stream.

Attributes Documentation

affine
frame
frame_fit

Descriptor to define custom attribute which gets stored in the object meta dict and can have a defined default.

This descriptor is intended to provide a convenient way to add attributes to a subclass of a complex class such as Table or NDData.

This requires that the object has an attribute meta which is a dict-like object. The value of the MetaAttribute will be stored in a new dict meta[‘__attributes__’] that is created when required.

Classes that define MetaAttributes are encouraged to support initializing the attributes via the class __init__. For example:

for attr in list(kwargs):
    descr = getattr(self.__class__, attr, None)
    if isinstance(descr, MetaAttribute):
        setattr(self, attr, kwargs.pop(attr))

The name of a MetaAttribute cannot be the same as any of the following:

  • Keyword argument in the owner class __init__

  • Method or attribute of the “parent class”, where the parent class is taken to be owner.__mro__[1].

Parameters

default – default value

kalman

Descriptor to define custom attribute which gets stored in the object meta dict and can have a defined default.

This descriptor is intended to provide a convenient way to add attributes to a subclass of a complex class such as Table or NDData.

This requires that the object has an attribute meta which is a dict-like object. The value of the MetaAttribute will be stored in a new dict meta[‘__attributes__’] that is created when required.

Classes that define MetaAttributes are encouraged to support initializing the attributes via the class __init__. For example:

for attr in list(kwargs):
    descr = getattr(self.__class__, attr, None)
    if isinstance(descr, MetaAttribute):
        setattr(self, attr, kwargs.pop(attr))

The name of a MetaAttribute cannot be the same as any of the following:

  • Keyword argument in the owner class __init__

  • Method or attribute of the “parent class”, where the parent class is taken to be owner.__mro__[1].

Parameters

default – default value

meta
origin
path
som

Descriptor to define custom attribute which gets stored in the object meta dict and can have a defined default.

This descriptor is intended to provide a convenient way to add attributes to a subclass of a complex class such as Table or NDData.

This requires that the object has an attribute meta which is a dict-like object. The value of the MetaAttribute will be stored in a new dict meta[‘__attributes__’] that is created when required.

Classes that define MetaAttributes are encouraged to support initializing the attributes via the class __init__. For example:

for attr in list(kwargs):
    descr = getattr(self.__class__, attr, None)
    if isinstance(descr, MetaAttribute):
        setattr(self, attr, kwargs.pop(attr))

The name of a MetaAttribute cannot be the same as any of the following:

  • Keyword argument in the owner class __init__

  • Method or attribute of the “parent class”, where the parent class is taken to be owner.__mro__[1].

Parameters

default – default value

stream_data
track

The path’s central track.

visit_order

Descriptor to define custom attribute which gets stored in the object meta dict and can have a defined default.

This descriptor is intended to provide a convenient way to add attributes to a subclass of a complex class such as Table or NDData.

This requires that the object has an attribute meta which is a dict-like object. The value of the MetaAttribute will be stored in a new dict meta[‘__attributes__’] that is created when required.

Classes that define MetaAttributes are encouraged to support initializing the attributes via the class __init__. For example:

for attr in list(kwargs):
    descr = getattr(self.__class__, attr, None)
    if isinstance(descr, MetaAttribute):
        setattr(self, attr, kwargs.pop(attr))

The name of a MetaAttribute cannot be the same as any of the following:

  • Keyword argument in the owner class __init__

  • Method or attribute of the “parent class”, where the parent class is taken to be owner.__mro__[1].

Parameters

default – default value

Methods Documentation

__call__(affine: Optional[astropy.units.quantity.Quantity] = None, *, angular: bool = False) trackstream.utils.path.path_moments[source]

Get discrete points along interpolated stream track.

Parameters
affineQuantity array-like or None, optional

The affine interpolation parameter. If None (default), return path moments evaluated at all “tick” interpolation points.

angularbool, optional keyword-only

Whether to compute on-sky or real-space.

Returns
trackstream.utils.path.path_moments

Realized from the .path attribute.

probability(point: astropy.coordinates.SkyCoord, background_model=None, *, angular: bool = False, affine: Optional[astropy.units.quantity.Quantity] = None)[source]

Probability point is part of the stream.

Todo

angular probability