# RVData¶

class thejoker.data.RVData(t, rv, ivar=None, stddev=None, metadata=None, t_offset=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. t_offset : numeric (optional) [day] A time offset to apply before processing. Default is to subtract off the minimum time in BMJD 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(t0, P) Convert time to a phase relative to the input epoch t0 and period P. plot([ax, rv_unit, time_format]) 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(t0, P)[source]

Convert time to a phase relative to the input epoch t0 and period P.

Parameters: The reference epoch. P : Quantity [time] The period. phase : ndarray The dimensionless phase of each observation.
plot(ax=None, rv_unit=None, time_format='mjd', **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). **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