Data Generators
This guide documents the scripts in data_generators/, their inputs and outputs, and the recommended execution order.
Recommended order
data_generators/load_harpsn_data.pydata_generators/temp_and_kitcat_gen.pydata_generators/ccf_data_generator.py(optional)data_generators/test_shell_gen_fixed.py
Run all commands from the repository root.
load_harpsn_data.py
Purpose:
Load HARPS-N products and create baseline flux arrays plus observation-time metadata.
Main required inputs:
HARPS-N workspace folder defined in the script.
WORKSPACE/Analyse_summary.csvWORKSPACE/Analyse_material.pWORKSPACE/CONTINUUM/Continuum_matching_mad.npyCORRECTION_MAP/map_matching_activity.npyPer-observation
RASSINE_Stacked_spectrum_*.pfiles referenced in the catalog.
Outputs written to data/:
spectra_orig.npyspectra_active.npytime_df.csv
temp_and_kitcat_gen.py
Purpose:
Convert flux spectra to temperature-space spectra.
Apply KITCAT mask filtering to produce reduced flux and temperature arrays used by shell generation.
Main required inputs:
data/spectra_orig.npydata/spectra_active.npydata/time_df.csvdata/wavelengths.txtdata/spectra_orig_err.npydata/T1o2_spec.csvdata/mask_kitcat_NEW_kitcat_CCF_mask_Sun.npz
Outputs written to data/:
temp_or.npytemp_act.npywaves_kitcat.txt
Outputs written to large_data/:
spectra_kitcat_or.npyspectra_kitcat_act.npytemp_kitcat_or.npytemp_kitcat_act.npy
ccf_data_generator.py
Purpose:
Compute CCF-derived observables such as
rv,rv_err,fwhm,fwhm_err, andbis.
Main required inputs:
data/time_df.csvdata/wavelengths.txtdata/spectra_orig.npydata/spectra_active.npy
Outputs written to data/:
astro_data_orig.csvastro_data_active.csv
test_shell_gen_fixed.py
Purpose:
Generate shell datasets with controlled planetary injections over a grid of periods and amplitudes.
Save one shell directory per array index in
data/shells/<idx>/.
Main required inputs:
data/time_df.csvdata/waves_kitcat.txtlarge_data/spectra_kitcat_or_err.npylarge_data/temp_kitcat_or_err.npylarge_data/spectra_kitcat_act.npylarge_data/temp_kitcat_act.npy
Outputs written to data/shells/<idx>/:
flux_PI*_P*_act.h5temp_PI*_P*_act.h5injection_phases.txt