Input#
This module contains functions to import your radial velocity data for eurydice’s use and a split helper function to divide data into test and training set
- eurydice.input.read_data(file_name, inst, column_map=None, delimiter=None)#
Loads a radial velocity data file and returns a standardized DataFrame for eurydice’s pipeline.
- Args:å
file_name (str): Path to .csv or .txt files. inst(str): Name of instrument used to take data column_map (dict, optional): Optional mapping from custom column names to standard names. delimiter (str, optional): Custom delimiter
- Returns:
Standarized combined dataframe with [‘times’, ‘rv’, ‘err’, ‘inst’] columns.
- Return type:
pd.DataFrame
- Raises:
ValueError – If required columns are missing.
Note
Assumes the input file contains data from a single instrument.
- eurydice.input.split(data, train_split, random=False)#
Splits a DataFrame into training and test sets for cross-validation.
- Parameters:
data (pd.DataFrame) – a DataFrame organizing radial velocity data
train_split (float) – Fraction of data to use for training (0 to 1, inclusive)
random (bool) – If True, randomly selects training points. If False (default), takes first fraction of points.
- Returns:
training_data, test_data
- Return type:
(pd.DataFrame, pd.DataFrame)