How dauvillc/motif works
MOTIF is a research framework for tropical-cyclone image interpolation from multiple geospatial sources. Its workflow prepares and splits satellite/weather data, loads flexible multi-source batches, and trains deterministic or flow-matching reconstructors that embed, mask, process, and reconstruct a source. Prediction and evaluation are separate user-facing stages. The README documents the end-to-end capabilities; source excerpts and the index substantiate selected implementation links, while some script internals and model wiring were not sampled.
Main entry points: dataset.py Multi-source dataset · eval.py Evaluation runner · train.py Training entrypoint · make_predictions.py Prediction runner
Components 26
Data preparation
- Dataset downloads
preproc - TC-PRIMED preparation
preproc/tc_primed - SAR preparation
preproc/sar/prepare_sar.py - ERA5 download
preproc/era5/dl_era5_64x32.py - Dataset splits
preproc/train_val_test_split.py - Normalization constants
preproc/compute_normalization_constants.py
Data loading
- Multi-source dataset
src/motif/data/dataset.py - Source definitions
src/motif/data/source.py - Grid operations
src/motif/data/grid_functions.py - Batch collation
src/motif/data/collate_fn.py - Batch data types
src/motif/datatypes.py
Model and training
- Training entrypoint
scripts/train.py - Reconstruction module
src/motif/lightning_module/base_reconstructor.py - Source embeddings
src/motif/models/embedding_layers.py - Multi-source backbone
src/motif/models/motif/backbone.py - Deterministic learner
src/motif/lightning_module/deterministic.py - Flow-matching learner
src/motif/lightning_module/flow_matching.py
Prediction and evaluation
- Prediction runner
scripts/make_predictions.py - Prediction writer
src/motif/data/writer.py - Evaluation runner
scripts/eval.py - Quantitative metrics
src/motif/eval/quantitative.py - Evaluation visualizations
src/motif/eval/footprint_visualization.py - Spectrum analysis
src/motif/eval/spectrum.py
Other components
- Researcher
- Raw datasets
- Prepared dataset
Connections 35
- Researcher → Dataset downloads: requests data
README.md - Raw datasets → Dataset downloads: provides files
README.md - Dataset downloads → Raw datasets: downloads sources
README.md - Researcher → TC-PRIMED preparation: prepares data
README.md - Raw datasets → TC-PRIMED preparation: provides TC-PRIMED
README.md - Raw datasets → SAR preparation: provides SAR
README.md - Raw datasets → ERA5 download: provides ERA5
README.md - TC-PRIMED preparation → Prepared dataset: writes prepared data
preproc/tc_primed/prepare_pmw_concat.py - SAR preparation → Prepared dataset: prepares SAR
README.md - ERA5 download → Raw datasets: downloads ERA5
README.md - Researcher → Dataset splits: creates splits
README.md - Prepared dataset → Dataset splits: splits samples
README.md - Researcher → Normalization constants: computes statistics
README.md - Prepared dataset → Normalization constants: reads samples
README.md - Prepared dataset → Multi-source dataset: loads sources
src/motif/data/dataset.py - Multi-source dataset → Source definitions: uses source metadata
src/motif/data/dataset.py - Multi-source dataset → Grid operations: uses grid operations
src/motif/data/dataset.py - Multi-source dataset → Batch collation: supplies samples
README.md - Batch collation → Batch data types: builds batches
src/motif/data/collate_fn.py - Researcher → Training entrypoint: starts training
README.md - Training entrypoint → Multi-source dataset: loads batches
README.md - Training entrypoint → Deterministic learner: configures learner
README.md - Training entrypoint → Flow-matching learner: configures learner
README.md - Deterministic learner → Reconstruction module: extends base
README.md - Flow-matching learner → Reconstruction module: extends base
src/motif/lightning_module/flow_matching.py - Reconstruction module → Source embeddings: embeds sources
src/motif/lightning_module/base_reconstructor.py - Flow-matching learner → Multi-source backbone: processes sequences
src/motif/lightning_module/flow_matching.py - Researcher → Prediction runner: requests predictions
README.md - Prepared dataset → Prediction runner: provides inference data
README.md - Prediction runner → Prediction writer: writes predictions
- Researcher → Evaluation runner: requests evaluation
README.md - Prediction runner → Evaluation runner: provides predictions
README.md - Evaluation runner → Quantitative metrics: computes metrics
README.md - Evaluation runner → Evaluation visualizations: generates visuals
README.md - Evaluation runner → Spectrum analysis: compares spectra
README.md