How iabhiroop/galaxy_gen works
galaxy_gen is a Python library for generating and reconstructing galaxy data with several model families. Its main user workflow is to load a selected model and generate samples; the public sampler dispatches among VAE/flow models and the LOFAR diffusion model. Model-specific components implement the neural architectures, while LOFAR adds configuration, model construction, diffusion sampling, and sample-file output. The map follows documented capabilities and indexed references; some source excerpts are partial, so unsampled internal calls are not inferred.
Main entry points: galaxy_gen/sampler.py Model loading and sampling · model_utils.py LOFAR model loader · lofarModel/sampler.py LOFAR sample generation · unet.py UNet and EDM model
Components 17
Public sampling API
- Model loading and sampling
galaxy_gen/sampler.py
VAE and flow models
- VAEFlow architecture
galaxy_gen/genmodels/samplemodel.py - Formation-time model
galaxy_gen/genmodels/foramtiontimeModel.py - Gamma-flow model
galaxy_gen/genmodels/gammaflowModel.py - Mass model
galaxy_gen/genmodels/massesModel.py - Metallicity model
galaxy_gen/genmodels/metallicityModel.py - Metallicity diffusion model
galaxy_gen/genmodels/metallicitydModel.py
LOFAR diffusion
- LOFAR sample generation
galaxy_gen/genmodels/lofarModel/sampler.py - Sample HDF5 files
LOFAR model internals
- LOFAR model loader
galaxy_gen/genmodels/lofarModel/model_utils.py - UNet and EDM model
galaxy_gen/genmodels/lofarModel/unet.py - Network layers
galaxy_gen/genmodels/lofarModel/layers.py - Model configuration
galaxy_gen/genmodels/lofarModel/config.py - Model and data paths
galaxy_gen/genmodels/lofarModel/paths.py - Diffusion sampler
galaxy_gen/genmodels/lofarModel/diffusion.py - Device utilities
galaxy_gen/genmodels/lofarModel/device_utils.py
Other components
- Library user
Connections 18
- Library user → Model loading and sampling: loads and samples
README.md - Model loading and sampling → VAEFlow architecture: dispatches to
galaxy_gen/sampler.py - Model loading and sampling → Formation-time model: dispatches to
galaxy_gen/sampler.py - Model loading and sampling → Gamma-flow model: dispatches to
galaxy_gen/sampler.py - Model loading and sampling → Mass model: dispatches to
galaxy_gen/sampler.py - Model loading and sampling → Metallicity model: dispatches to
galaxy_gen/sampler.py - Model loading and sampling → Metallicity diffusion model: dispatches to
galaxy_gen/sampler.py - Model loading and sampling → LOFAR model loader: loads via
galaxy_gen/sampler.py - Model loading and sampling → LOFAR sample generation: uses for sampling
galaxy_gen/sampler.py - LOFAR sample generation → Diffusion sampler: samples with
galaxy_gen/genmodels/lofarModel/sampler.py - LOFAR sample generation → LOFAR model loader: loads model via
galaxy_gen/genmodels/lofarModel/sampler.py - LOFAR sample generation → Sample HDF5 files: writes samples
galaxy_gen/genmodels/lofarModel/sampler.py - LOFAR model loader → Model configuration: loads configuration
galaxy_gen/genmodels/lofarModel/model_utils.py - LOFAR model loader → UNet and EDM model: constructs model
galaxy_gen/genmodels/lofarModel/model_utils.py - LOFAR model loader → Model and data paths: uses model paths
galaxy_gen/genmodels/lofarModel/model_utils.py - Model configuration → Model and data paths: references paths
galaxy_gen/genmodels/lofarModel/config.py - UNet and EDM model → Model configuration: constructs from
galaxy_gen/genmodels/lofarModel/unet.py - UNet and EDM model → Network layers: uses layers
galaxy_gen/genmodels/lofarModel/unet.py