# RVData¶

class thejoker.data.RVData(t, rv, ivar=None, stddev=None, metadata=None, t0=None)[source]

Bases: object

Time-domain radial velocity measurements for a single target.

Parameters: t : Time, array_like Array of measurement times. Either as an array of BMJD values or as an Astropy time object. rv : Quantity [speed] Radial velocity (RV) measurements. stddev : Quantity [speed] (optional) Standard deviation for each RV measurement. Specify this or ivar. ivar : Quantity [1/speed^2] (optional) Inverse variance for each RV measurement. Specify this or stddev. metadata : any (optional) Any metadata associated with the object. t0 : numeric (optional) [day] A reference time. Default is to use the minimum time in barycentric MJD (days).

Attributes Summary

 stddev The Gaussian error for each radial velocity measurement. t The times of each observation.

Methods Summary

 copy() from_hdf5(file_or_path) Read data to an HDF5 file. phase(P[, t0]) Convert time to a phase. plot([ax, rv_unit, time_format, phase_fold, …]) Plot the data points. to_hdf5(file_or_path) Write data to an HDF5 file.

Attributes Documentation

stddev

The Gaussian error for each radial velocity measurement.

Returns: stddev : Quantity [speed] An Astropy Quantity with velocity (speed) units.
t

The times of each observation.

Returns: An Astropy Time object for all times.

Methods Documentation

copy()[source]
classmethod from_hdf5(file_or_path)[source]

Read data to an HDF5 file.

Parameters: file_or_path : str, h5py.File, h5py.Group
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.

Parameters: P : Quantity [time] The period. t0 : Time (optional) Default uses the internal reference epoch. Use this to compute the phase relative to some other epoch phase : ndarray The dimensionless phase of each observation.
plot(ax=None, rv_unit=None, time_format='mjd', phase_fold=None, relative_to_t0=False, **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_format : str, callable (optional) The time format to use for the x-axis. 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_fold : bool (optional) Plot the phase instead of the time by folding on the specified period. relative_to_t0 : bool (optional) Plot the time relative to the reference epoch, t0. **kwargs All other keyword arguments are passed to the errorbar (if errors were provided) or plot (if no errors provided) call.
to_hdf5(file_or_path)[source]

Write data to an HDF5 file.

Parameters: file_or_path : str, h5py.File, h5py.Group