This repository contains the research code for generating synthetic transit light curves from arbitrary occulting shapes and training a neural network to reconstruct a 2D shadow image from a 1D light curve.
The project is organized as a pipeline:
- Generate 2D shapes that represent transiting objects.
- Simulate light curves for those shapes with
EightBitTransit. - Convert raw images and CSV light curves into
.npydatasets. - Train a TensorFlow model that maps a processed light curve to a reconstructed shape.
- Run inference on synthetic and real-world-inspired examples such as BATMAN, Kepler, and exocomet light curves.
Datasets and trained model artifacts referenced by the original experiments are stored externally:
- Documentation hub: docs/README.md
- Data generation pipeline: docs/data-generation.md
- Model architecture: docs/model.md
- Training workflow: docs/training.md
- Inference workflow: docs/inference.md
lightcurve_simulation/: shape generation, raw light-curve simulation, and conversion utilities.ml_training/: training and inference scripts, Colab notebooks, and archived experiments.data/: dataset metadata and experiment notes used by the project.lc_fitting/: notebook-based fitting experiments.
This is a research codebase rather than a packaged library. Many scripts:
- use hard-coded absolute paths such as
/scratch/..., - prompt for confirmation with
input("Do you want to run the code?"), - expect datasets to already exist on local disk,
- were written as one-off experiment runners instead of reusable CLIs.
The new docs/ folder explains how those pieces fit together and points to the main scripts to use first.
- Shape generation:
lightcurve_simulation/data_raw/create_shapes.py - Light-curve simulation for one
.npyshape file:lightcurve_simulation/data_raw/pll_create_8bit_lc.py - Light-curve simulation for batched training shapes:
lightcurve_simulation/data_raw/frontend_rand_param_batch_lc_gen.py - Convert raw light curves to
.npy:lightcurve_simulation/data_npy/cnvt_lcFlux_to_npy.py - Training script:
ml_training/ml_train_lightcurve_unf_dist_LDC_size.py - Python inference script:
ml_training/ml_inference_lc2shape.py - Final notebook workflow:
ml_training/Google_Colab_Codes/megastructure_ml_model_training.ipynb
- Read docs/README.md for the big picture.
- Read docs/data-generation.md to understand the dataset.
- Read docs/model.md and docs/training.md.
- Use docs/inference.md to interpret the inference notebooks and script outputs.