How ebupi/galaxies-and-cosmology works
Project type and purpose
• This is a research-oriented “Galaxies and Cosmology Class Notes” repository. It is not a user-facing application but a collection of Jupyter notebooks, Python scripts, and data assets used to explore topics like the Milky Way 3D mapping, isophote fitting, and dust extinction.
File structure
• Top-level notebooks (FRW.ipynb, Galaxy-3d-map.ipynb, izofot.ipynb, etc.) each implement an analysis or visualization.
• Python scripts (sfd.py, etkin-yaricap-galaxy.py) encapsulate reusable logic—e.g., loading FITS files or computing dust extinction.
• Data assets: raw FITS files (frame-g-003918-3-0213.fits, SFD_dust_4096_ngp.fits, etc.), plus a dustmap-master directory containing code and data for the SFD dustmap.
• README.md describes high-level topics and dependencies (e.g., pip-installable dustmap or local dustmap zip).
README for additional insights
• The sequence of notebooks corresponds to course modules: “Milkway 3d map,” “Isophote – effective radius,” “Lin-Shu.”
• The dustmap submodule is required to compute galactic extinction if the pip version fails.
a. Main components
• Data Layer: FITS files in root and dustmap-master subfolder
• Processing/Library Layer:
– sfd.py (SFD dust computations)
– dustmap-master/sfd.py (alternative implementation)
– Other helpers (etkin-yaricap-galaxy.py)
• Notebook Layer: FRW.ipynb, Galaxy-3d-map.ipynb, izofot.ipynb, plancks-for-sed.ipynb, sersic.ipynb, etc.
• External Services/Libraries: astropy, numpy, matplotlib, pip-installed dustmap package
• Outputs: Figures, computed parameters, inline notebook results
b. Relationships and interactions
1. Notebooks import the Processing/Library Layer
2. Processing scripts read raw FITS files from the Data Layer
3. Processing scripts optionally call the external dustmap library or the bundled dustmap-master code
4. Results flow back to the Notebook Layer for visualization and further analysis
c. Architectural patterns and principles
• Separation of concerns: data, core algorithms, and presentation are in distinct components.
• Modularity: swapping between pip-installed dustmap and the local dustmap-master directory.
• Reproducibility: all raw data and code are versioned together.
d. Technologies and libraries
• Python ecosystem: astropy for FITS I/O, numpy/pandas for data manipulation, matplotlib/seaborn for plotting
• dustmap (SFD) for extinction maps, either via pip or local code
• Jupyter Notebooks for literate programming
Detailed capture of architectural elements
• FITS file or group them under a “FITS Data” container
• Both dustmap code paths (pip and local zip)
• Sfd.py and dustmap-master/sfd.py to the notebooks that call them
• Configuration needs (e.g., unzip dustmap-master before running notebooks)