RVData¶

class
thejoker.
RVData
(**func_kwargs)[source]¶ Bases:
object
Timedomain radial velocity measurements for a single target.
 Parameters
 t
Time
, array_like Array of measurement times. Either as an astropy
Time
object, or as a numpy array of Barycentric MJD (BMJD) values. rv
Quantity
[speed] Radial velocity (RV) measurements.
 rv_err
Quantity
[speed] (optional) If 1D, assumed to be the standard deviation for each RV measurement. If this input is 2dimensional, this is assumed to be a covariance matrix for all data points.
 t0numeric (optional) [day]
A reference time. Default is to use the minimum time in barycentric MJD (days). Set to
False
to disable subtracting the reference time. cleanbool (optional)
Filter out any NaN or Inf data points.
 t
Attributes Summary
Covariance matrix
Inversevariance.
The times of each observation.
Methods Summary
copy
()guess_from_table
(tbl[, time_kwargs, …])Try to construct an
RVData
instance by guessing column names from the input table.phase
(P[, t0])Convert time to a phase.
plot
([ax, rv_unit, time_format, phase_fold, …])Plot the data points.
Convert this object into an
astropy.timeseries.TimeSeries
instance.Attributes Documentation

cov
¶ Covariance matrix

ivar
¶ Inversevariance.
Methods Documentation

classmethod
guess_from_table
(tbl, time_kwargs=None, rv_unit=None, fuzzy=False, t0=None)[source]¶ Try to construct an
RVData
instance by guessing column names from the input table.Note
This is an experimental feature! Use at your own risk.
 Parameters
 tbl
Table
The source data table.
 time_kwargsdict (optional)
Additional keyword arguments to pass to the
Time
initializer when passing in the inferred time data column. For example, if you know the time data are in Julian days, you can pass intime_kwargs=dict(format='jd')
to improve the guessing. rv_unit
astropy.units.Unit
(optional) If not specified via the relevant table column, this specifies the velocity units.
 fuzzybool (optional)
Use fuzzy string matching to guess data column names. This requires the
fuzzywuzzy
package.
 tbl

phase
(P, t0=None)[source]¶ Convert time to a phase.
By default, the phase is relative to the internal reference epoch,
t0
, but a new epoch can also be specified to this method.

plot
(ax=None, rv_unit=None, time_format='mjd', phase_fold=None, relative_to_t0=False, add_labels=True, color_by=None, **kwargs)[source]¶ Plot the data points.
 Parameters
 ax
Axes
(optional) The matplotlib axes object to draw on (default is to grab the current axes object using
gca
). rv_unit
UnitBase
(optional) Display the radial velocities with a different unit (default uses whatever unit was passed on creation).
 time_formatstr, callable (optional)
The time format to use for the xaxis. This can either be a string, in which case it is assumed to be an attribute of the
Time
object, or it can be a callable (e.g., function) that does more complex things (for example:time_format=lambda t: t.datetime.day
). phase_foldquantity_like (optional)
Plot the phase instead of the time by folding on a period value passed in to this argument as an Astropy
Quantity
. relative_to_t0bool (optional)
Plot the time relative to the reference epoch,
t0
. add_labelsbool (optional)
Add labels to the figure.
 **kwargs
All other keyword arguments are passed to the
errorbar
(if errors were provided) orplot
(if no errors provided) call.
 ax

to_timeseries
()[source]¶ Convert this object into an
astropy.timeseries.TimeSeries
instance.