GraphWeb_DESI builds a graph from DESI BGS galaxies and applies a pretrained GAT model (from TNG/Illustris) to infer cosmic web environments.
- Canonical:
workflows/graph_inference/graph_catalog.py - Compatibility wrapper:
graph_catalog.py
This script now has an explicit CLI and no longer runs large ad-hoc plotting blocks by default.
Run from repo root:
python graph_catalog.pyCanonical path form:
python workflows/graph_inference/graph_catalog.pyOther entrypoints follow the same pattern:
workflows/catalog/load_catalog.py(shim:load_catalog.py)workflows/utilities/galaxy_catalog.py(shim:galaxy_catalog.py)workflows/utilities/investigate_edges.py(shim:investigate_edges.py)
Default behavior:
- graph type:
alpha - cache mode:
rebuild - writes VAC to
GRAPHWEB_VAC_OUTPUT_PATH(from config) - shows a summary histogram plot
Use cache if available, otherwise build:
python graph_catalog.py --cache-mode prefer-cacheFail if cache files are missing:
python graph_catalog.py --cache-mode cache-onlyUse Delaunay graph instead of alpha-complex:
python graph_catalog.py --graph-type delaunayRun without summary plot:
python graph_catalog.py --no-summary-plotKey options:
--graph-type {alpha,delaunay}--cache-mode {rebuild,prefer-cache,cache-only}--first-moment-matching--cache-dir <path>--model-path <path>--scaler-path <path>--vac-output-path <path>--reference-catalog-path <path>--no-summary-plot
Defaults come from config_paths.py. Useful env vars include:
GRAPHWEB_CACHE_DIRGRAPHWEB_VAC_OUTPUT_PATHILLUSTRIS_REPO_ROOTILLUSTRIS_GAT_MODEL_PATHILLUSTRIS_SCALER_PATHTNG_REFERENCE_CATALOG_PATH
Example:
export GRAPHWEB_CACHE_DIR=/pscratch/sd/d/dkololgi/graphweb_desi/cache
export GRAPHWEB_VAC_OUTPUT_PATH=/pscratch/sd/d/dkololgi/graphweb_desi/outputs/DESI_BGS_PRERELEASE_VAC.pkl
python graph_catalog.py --cache-mode prefer-cachePrimary output:
- VAC pickle with predicted environment class and class probabilities.
Cached artifacts (in GRAPHWEB_CACHE_DIR):
- graph object (
*_graph.pt) - torch geometric data (
*_geom.pt) - scaled features (
*_features.pt) - zcat snapshot (
*_zcat.pt)