Skip to main content

Project Structure

The code lives in the PhD-Brown/AstroVision repository (read-only for this documentation). The Python package is src/astrovision/; analyses are notebooks that import it.

AstroVision/
├── src/astrovision/
│ ├── data_loader.py Galaxy10 HDF5 → DataLoaders (seed-42 split)
│ ├── models.py SimpleCNN, EfficientNetGalaxy, build_model
│ ├── trainer.py Training loop (AdamW, cosine schedule, W&B)
│ ├── gradcam.py Grad-CAM and overlay grids
│ ├── crossmatcher.py CDS XMatch with SDSS DR16 and NSA
│ ├── morphometry.py CAS, Gini, M20, Petrosian radius, Sérsic proxy
│ ├── segmenter.py Otsu, DINOv2 patch clustering, optional SAM
│ ├── unet.py U-Net, Dice + CE loss, training loop
│ ├── fusion.py Late-fusion classifier and ablation
│ ├── uncertainty.py MC Dropout, temperature scaling, conformal
│ ├── attention_morphometry.py Morphometry on DINOv2 attention masks
│ ├── spectral_viz.py Morphology × photometry plots
│ └── synthesis.py Master table and synthesis figures
├── notebooks/ 00 … 10 (see below)
├── data/ (not versioned) Galaxy10 HDF5, caches, features
├── checkpoints/ (not versioned) trained weights (.pt)
└── figures/ exported figures

Notebooks​

#NotebookContentDocumented in
0000_eda_galaxy10Distributions, galleries, pixel PCAGalaxy10 DECaLS
0101_galaxy10_cnnSimpleCNN, EfficientNet-B0, Grad-CAMBaseline CNN, EfficientNet
0202_results_analysisConfusion matrices, per-class metrics, errorsBenchmarking
0303_dinov2_featuresZero-shot features, UMAP, neighbours, probeLinear Probe
0404_dinov2_finetuneDINOv2 fine-tuning, attention before/afterFine-tuned
0505_crossmatch_analysisSDSS DR16, colours, populationsSDSS Cross-match
0606_segmentationCAS/Gini/M20, Otsu, DINOv2 clusters, U-NetMorphometry, U-Net
0707_synthesisMaster table, bulge fraction × colourPhysical Interpretation
0808_multimodal_fusionLate fusion and ablationLate-Fusion
0909_uncertainty_calibrationMC Dropout, temperature, conformalUncertainty
1010_attention_morphometryAttention-mask morphometryAttention & Grad-CAM
Repository README

The upstream README describes eight notebooks and a shorter module list; notebooks 08–10 and the modules fusion.py, uncertainty.py, attention_morphometry.py and spectral_viz.py were added later and are not in its tree. Its build_model('dinov2') example does not match models.py, which registers only simplecnn and efficientnet; the DINOv2 classifier is defined inside notebook 04.