REVIEW 5 major objections 5 minor 19 references
PyMGal: A Python Package for Generating Optical Mock Observations from Hydrodynamical Simulations
T0 review · 5 major / 5 minor · reviewed 2026-08-06 · deepseek-v4-flash
Pith's one-line read PyMGal turns simulated galaxies into telescope images that match a full radiative-transfer benchmark.
desk verdict Useful, well-documented mock-observation tool; validation is under-quantified and the efficiency claim is unmeasured, but neither flaw sinks the package. read the letter →
The pith
A machine-rendered reading of the paper's core claim, the machinery that carries it, and where it could break.
The reading
What carries the argument
The machinery is a three-stage forward-modelling pipeline. Stellar particles are read from a snapshot, and each particle's age and metallicity are interpolated onto a two-dimensional SED grid from an SPS library, such as the EzGal-format BC03, M05, CB07, C09, P09, and P2 models or user-supplied custom files, with the SED scaled by particle mass. Magnitudes are then computed in the observer's frame by projecting the redshifted SED through a filter response curve against an AB zero-point, with Vega and solar magnitude systems and flux or luminosity units as alternatives. Finally, particle brightnesses are binned into a 2D histogram to form an image, with optional Gaussian kNN smoothing, PSF convolution, line-of-sight dust attenuation from gas particles, thickness cuts, noise injection, and associated mass, age, and metallicity maps.
What would settle it
Compute PyMGal and powderday images of many halos in a wavelength band dominated by dust, such as the far-UV or the 24 micron band, without matching their dust parameters, and compare pixel or aperture flux distributions; systematic differences beyond the minor variations seen in the paper's r-band comparison would falsify the claim of reliable reproduction.
Extended reading notes
Core claim
On its own terms, the paper reports that PyMGal produces synthetic observations consistent with powderday, an established full radiative-transfer pipeline, across four hydrodynamical simulations of different box sizes and resolutions. For the most massive halo in each simulation, both codes generate 256x256-pixel SDSS r-band images with the same custom FSPS stellar population model and a Chabrier IMF; PyMGal applies a Charlot and Fall dust function and a constant-opacity line-of-sight attenuation matched to powderday's dust-to-metals ratio of 0.3. The images and pixel luminosity distributions agree to the eye, and the paper concludes that PyMGal can reliably reproduce synthetic observations while offering significant computational efficiency relative to full radiative-transfer methods.
Load-bearing premise
The whole demonstration rests on the assumption that powderday's radiative-transfer output is the right benchmark and that matching PyMGal's stellar population and dust attenuation to it is a sufficient test of reliability; if that matching is what produced the agreement, the comparison would not establish independent accuracy.
Editorial extensions
If this is right
- A user can change the stellar population model, IMF, dust prescription, filter, projection axis, angular resolution, and field of view, making model-dependence tests among simulation predictions straightforward.
- The same snapshot can be rendered through filters from SDSS, LSST, Euclid, JWST, HST, and dozens of other instruments, so mock images can be tailored to a specific survey's passbands.
- Because it avoids radiative transfer, the package can process large simulated volumes quickly enough for full-box mock catalogues and survey-like image generation.
- Output mass, age, and metallicity maps are spatially matched to the optical images, allowing property-light comparisons on the same pixel grid.
- Spectral data cubes give the intrinsic spectrum of each pixel, so users can inspect how the object's SED varies with viewing angle.
Reading between the lines
- Inference: a natural next test is to run the same halos through PyMGal and a radiative-transfer code in a dust-dominated band, such as rest-frame UV or mid-IR, without matching dust parameters; agreement there would go beyond the paper's single-band validation.
- Inference: the comparison uses only the most massive halo in each of four simulations, so a statistical check on many halos spanning the stellar-mass function would show whether the r-band agreement holds beyond the brightest central galaxies.
- Inference: since PyMGal accepts arbitrary SPS libraries, it could serve as a rapid engine for generating training images for machine-learning tools that infer galaxy properties from surveys, a use the authors do not develop.
Editorial analysis
A structured set of objections, weighed in public.
Referee Report
Summary. The paper introduces PyMGal, a Python package that forward-models optical mock observations from hydrodynamical simulation snapshots. It assigns SEDs to stellar particles using EzGal/FSPS-type stellar population libraries, computes magnitudes in many filters and output units, and projects the particles onto a 2D grid, with optional Gaussian or PSF smoothing, dust attenuation (Charlot & Fall, Calzetti, or a line-of-sight constant-opacity model), thickness cuts, noise, spectral data cubes, and mass/age/metallicity maps. The validation compares SDSS r-band mock images of four simulated halos (one each from EAGLE, IllustrisTNG, The Three Hundred, and SIMBA) with images produced by powderday, using a custom FSPS SSP model and a dust prescription 'matched to the level of powderday.' The authors conclude that PyMGal reliably reproduces synthetic observations with significant computational efficiency.
Significance. PyMGal is a useful, publicly available alternative to radiative-transfer-based mocks such as powderday and GRASIL-3D, and its flexibility in SPS models, filters, and output units addresses a real need in the simulation-observation comparison community. The equations for SED scaling, magnitudes, smoothing, and noise are standard and clearly presented, and the package's modular design is sensible. However, the validation in Section 5 is too narrow to carry the paper's headline claims: it uses a single passband, a matched dust prescription that is not quantitatively specified, and no runtime measurements. The paper is best read as a software description with a preliminary consistency check; the central reliability and efficiency claims need strengthening or qualification before publication.
major comments (5)
- [Section 5, Eq. (3)] The dust attenuation in the PyMGal validation is described only as 'a Charlot & Fall dust function and a constant-opacity line-of-sight attenuation model matched to the level of powderday,' without giving the parameter values, the combination rule for the two prescriptions, or the matching procedure. If the dust normalization or slope was adjusted to make the images agree, the agreement in Figure 9 is partially enforced by construction. Please report the exact values used (e.g., tau_break, n, kappa0, gamma, dust-to-metals ratio), explain how the Charlot & Fall and line-of-sight terms are combined, and show how the comparison changes under reasonable variations of these parameters.
- [Section 5, Figure 9] The validation is limited to the SDSS r-band, where dust attenuation is weak, and to one halo per simulation. No quantitative residual, uncertainty, or statistical measure is reported for the pixel luminosity histograms, so 'minor variations' remains a visual assertion. The paper's own limitation paragraph recommends tests at wavelengths 'more affected by dust' and statistical analyses on larger samples. To support the reliability claim, please add at least one dust-sensitive band (e.g., u or g) and report quantitative agreement metrics (e.g., percentiles of pixel residuals, symmetric scatter, or a two-sample test) for the images.
- [Section 5, Figure 9] The comparison does not describe how the two codes' image grids were matched. Please state whether powderday images were re-binned or convolved to the same 256x256 pixel grid, whether the same projection axis, centre, and thickness were used, whether any PSF was applied to either code, and how the image stretch/color scale in Figure 9 was chosen. Without these details, the visual agreement cannot be interpreted. In addition, please report the FSPS version and the age and metallicity grids used in the custom SSP model, since version differences could produce small SED discrepancies.
- [Section 5 / Section 6] The conclusion states that PyMGal offers 'significant computational efficiency compared to full radiative transfer methods,' but no wall-clock timings, system specifications, or input sizes are reported anywhere in the paper. Please add a benchmark table with runtimes for both PyMGal and powderday on the same hardware, or explicitly qualify the efficiency statement as an expected advantage until such measurements are available.
- [Section 4.4-4.5 / Section 5] The advertised capabilities of spectral data cubes and mass/age/metallicity maps are not exercised in the validation. If the reliability claim in the conclusion is meant to cover these products, the paper should either benchmark them or explicitly state that the validation addresses only the 2D flux-projection path.
minor comments (5)
- [Section 4, first paragraph] The sentence 'In this section, we will perform a variety of different tests to demonstrate the capabilities and features of this software' is inaccurate: the section presents demonstrations with fixed parameters rather than quantitative tests. Please rephrase.
- [Section 4.8, Eq. (13)] Please clarify what g(m_lim) denotes in Equation 13 (per-pixel flux, aperture flux, or surface brightness) and how the aperture area enters the scaling; as written, the dependence of sigma on r_ap is easy to misread.
- [Figure 9] The third row is described as 'luminosity distribution in pixel counts'; the axes and normalisation of these histograms are not defined in the caption, making the agreement difficult to evaluate. Please specify the plotted quantity and the binning.
- [Data Availability] For reproducible benchmarking, please include a versioned release (e.g., a DOI or a tagged commit) in addition to the PyPI and documentation links, and make the exact configuration files for the Section 5 comparison available.
- [Section 2.2, Table 1] Table 1 lists six EzGal libraries, but the text says PyMGal is compatible with 'all EzGal SSP and CSP models.' Please clarify that any EzGal-format file can be read in principle, while only these libraries are pre-installed and tested.
Circularity Check
Section 5 matches PyMGal's dust attenuation to 'the level of powderday' without parameters, so the dust-sensitive agreement is enforced by construction; the central reliability claim is only partially independent.
-
fitted input called prediction
[Section 5 (Validation), setup for Figure 9, paragraph beginning 'We then run both PyMGal and powderday...']
"We generate powderday observations using a dust-to-metals ratio of 0.3, and we generate corresponding PyMGal observations using a Charlot & Fall dust function and a constant-opacity line-of-sight attenuation model matched to the level of powderday."
The paper's validation conclusion ('These results demonstrate that PyMGal can reliably reproduce synthetic observations') rests on agreement between PyMGal and powderday in Figure 9. For the dust component, the PyMGal attenuation is not independently specified: it is 'matched to the level of powderday' with no parameter values or fitting procedure given. The subsequent pixel-histogram agreement in dust-affected regions is therefore partly set by construction rather than independently predicted. The paper's own limitation, recommending tests at wavelengths 'more affected by dust', concedes that the r-band comparison does not strongly test the dust treatment.
full rationale
PyMGal is a forward-modelling software package, and most of its pipeline (SPS interpolation, filter magnitudes, projection, smoothing, noise) is derived from standard definitions and is not circular. The Section 5 comparison to powderday is a code-to-code validation rather than a derivation. The stellar-population matching via FSPS is a legitimate controlled comparison and does not constitute circularity. However, the dust attenuation is 'matched to the level of powderday' with no specification of how, which means the dust-sensitive part of the demonstrated agreement is enforced by construction. Because the central reliability claim is supported by this comparison, the validation is partially circular. No load-bearing self-citation was found: the citations of The Three Hundred (Cui et al. 2018, 2022) are data sources, not justifications of the package's validity. The computational-efficiency claim is unsupported by any runtime measurement, but that is a completeness/correctness issue, not a circularity issue.
Assumptions & free parameters
free parameters (1)
- Dust attenuation matching level =
unspecified
assumptions (3)
- domain assumption SPS models (BC03, M05, CB07, C09, P2, FSPS) accurately represent stellar population SEDs.
- domain assumption powderday is a valid benchmark for mock observations.
- domain assumption Simulation snapshots from EAGLE, SIMBA, IllustrisTNG, and The Three Hundred are representative.
Cite this review
Pith. "Pith review of PyMGal: A Python Package for Generating Optical Mock Observations from Hydrodynamical Simulations." pith.science (2026). https://pith.science/paper/CFQRYTXU
@misc{pith2026250700123,
author = {Pith},
title = {Pith review of: PyMGal: A Python Package for Generating Optical Mock Observations from Hydrodynamical Simulations},
year = {2026},
howpublished = {\url{https://pith.science/paper/CFQRYTXU}},
note = {Machine review of arXiv:2507.00123}
}
read the original abstract
We introduce PyMGal, a Python package for generating optical mock observations of galaxies from hydrodynamical simulations. PyMGal reads the properties of stellar particles from these simulations and generates spectral energy distributions (SEDs) based on a variety of stellar population models that can be customised to fit the user's choice of applications. Given these SEDs, the program can calculate the brightness of particles in different output units for hundreds of unique filters. These quantities can then be projected to a 2D plane mimicking a telescope observation. The software is compatible with different snapshot formats and allows a flexible selection of models, filters, output units, axes of projection, angular resolutions, fields of view, and more. It also supports additional features including dust attenuation, particle smoothing, and the option to output spectral data cubes and maps of mass, age, and metallicity. These synthetic observations can be used to directly compare the simulated objects to reality in order to model galaxy evolution, study different theoretical models, and investigate different observational effects. This package allows the user to perform fast and consistent comparisons between simulation and observation, leading to a better and more precise understanding of what we see in our Universe.
Figures
Figures from the paper (6 more)
Reference graph
Works this paper leans on
-
[5]
4008 ofSociety of Photo-Optical Instrumentation Engineers (SPIE) Conference Series, pp
Performance of the CFH12K: a 12K by 8K CCD mosaic camera for the CFHT prime focus, inOptical and IR Telescope Instrumentation and Detectors, vol. 4008 ofSociety of Photo-Optical Instrumentation Engineers (SPIE) Conference Series, pp. 1010–1021. Davé,R.,Anglés-Alcázar,D.,Narayanan,D.etal.,2019.SIMBA:Cosmolog- ical simulations with black hole growth and fee...
work page 2019
-
[14]
The EAGLE project: simulatingtheevolutionandassemblyofgalaxiesandtheirenvironments, MNRAS,446(1), 521–554. Sirianni,M.,Jee,M.J.,Benítez,N.etal.,2005.ThePhotometricPerformance and Calibration of the Hubble Space Telescope Advanced Camera for Surveys,PASP,117(836), 1049–1112. Skrutskie, M. F., Cutri, R. M., Stiening, R. et al.,
work page 2005
-
[15]
E pur si muove: Galilean-invariant cosmological hydro- RASTI000, 1–13 (2025) PyMGal 13 dynamical simulations on a moving mesh,MNRAS,401(2), 791–851. Springel, V., Yoshida, N. & White, S. D. M.,
work page 2025
-
[16]
Sutherland,W.,Emerson,J.,Dalton,G.etal.,2015
Lyman Break Galaxies at Redshift z~3: Survey Description and Full Data Set,ApJ, 592(2), 728–754. Sutherland,W.,Emerson,J.,Dalton,G.etal.,2015. TheVisibleandInfrared Survey Telescope for Astronomy (VISTA): Design, technical overview, and performance,A&A,575, A25. Teyssier, R.,
work page 2015
-
[17]
The Dark Energy Survey, arXiv e-prints, pp. astro–ph/0510346. Thompson, R. I.,
-
[1134]
Boulade,O.,Charlot,X.,Abbon,P.etal.,2003. MegaCam:thenewCanada- France-Hawaii Telescope wide-field imaging camera, inInstrument De- sign and Performance for Optical/Infrared Ground-based Telescopes, vol. 4841 of Society of Photo-Optical Instrumentation Engineers (SPIE) Conference Series, pp. 72–81. Bruzual, A. G.,
work page 2003
-
[1984]
Percival,S.M.,Salaris,M.,Cassisi,S.etal.,2009
The Infrared Astronomical Satellite (IRAS) mission.,ApJ,278, L1–L6. Percival,S.M.,Salaris,M.,Cassisi,S.etal.,2009. ALargeStellarEvolution Database for Population Synthesis Studies. IV. Integrated Properties and Spectra,ApJ,690(1), 427–439. Poglitsch, A., Waelkens, C., Geis, N. et al.,
work page 2009
-
[1994]
Near infrared camera and multiobject spectrometer (NICMOS): the near infrared space mission on HST, inSpace Optics 1994:EarthObservationandAstronomy ,vol.2209of SocietyofPhoto- Optical Instrumentation Engineers (SPIE) Conference Series, pp. 319–330. Vogelsberger,M.,Genel,S.,Springel,V.etal.,2014. IntroducingtheIllustris Project: simulating the coevolution...
work page 1994
Show all 19 references
-
[2000]
Cheng,E.S.&WFC3Team,1999.TheWide-FieldCamera3ForTheHubble Space Telescope, inAmerican Astronomical Society Meeting Abstracts, vol
A Simple Model for the Absorption of Starlight by Dust in Galaxies,ApJ,539(2), 718–731. Cheng,E.S.&WFC3Team,1999.TheWide-FieldCamera3ForTheHubble Space Telescope, inAmerican Astronomical Society Meeting Abstracts, vol. 195 ofAmerican Astronomical Society Meeting Abstracts, p. ...
1999
-
[2003]
Chambers,K.C.,Magnier,E.A.,Metcalfe,N.etal.,2016.ThePan-STARRS1 Surveys,arXiv e-prints, p
Galactic Stellar and Substellar Initial Mass Function, PASP,115(809), 763–795. Chambers,K.C.,Magnier,E.A.,Metcalfe,N.etal.,2016.ThePan-STARRS1 Surveys,arXiv e-prints, p. arXiv:1612.05560. Charlot, S. & Fall, S. M.,
2016 arXiv
-
[2005]
Martin,D.C.,Fanson,J.,Schiminovich,D.etal.,2005.TheGalaxyEvolution Explorer: A Space Ultraviolet Survey Mission,ApJ,619(1), L1–L6
Evolutionary population synthesis: models, analysis of the ingredients and application to high-z galaxies,MNRAS, 362(3), 799–825. Martin,D.C.,Fanson,J.,Schiminovich,D.etal.,2005.TheGalaxyEvolution Explorer: A Space Ultraviolet Survey Mission,ApJ,619(1), L1–L6. Miyazaki,S.,Komi...
2005
-
[2007]
On TP-AGB stars and the mass of galaxies, inStellar PopulationsasBuildingBlocksofGalaxies ,vol.241of IAUSymposium, pp. 125–132. 1 https://www.the300-project.org RASTI000, 1–13 (2025) 12 Janulewicz & Cui Bruzual,G.&Charlot,S.,2003. Stellarpopulationsynthesisattheresolution of 2...
2025
-
[2010]
Gunn,J.E.,Carr,M.,Rockosi,C.etal.,1998
The Herschel-SPIRE instrument and its in-flight performance,A&A,518, L3. Gunn,J.E.,Carr,M.,Rockosi,C.etal.,1998. TheSloanDigitalSkySurvey Photometric Camera,AJ,116(6), 3040–3081. Gutkin, J., Charlot, S. & Bruzual, G.,
1998
-
[2011]
arXiv:1110.3193
Euclid Definition Study Report,arXiv e-prints, p. arXiv:1110.3193. Lawrence, A., Warren, S. J., Almaini, O. et al.,
-
[2015]
Ivezić,Ž.,Kahn,S.M.,Tyson,J.A.etal.,2019
A new class of accurate, mesh-free hydrodynamic simulation methods,Monthly Notices of the Royal Astronomical Society, 450(1), 53–110. Ivezić,Ž.,Kahn,S.M.,Tyson,J.A.etal.,2019. LSST:FromScienceDrivers to Reference Design and Anticipated Data Products,ApJ,873(2),
2019
-
[2016]
Hansen, C
Modelling the nebular emission from primeval to present-day star-forming galaxies,MNRAS, 462(2), 1757–1774. Hansen, C. J. & Kawaler, S. D., 1994.Stellar Interiors. Physical Principles, Structure, and Evolution.. Hildebrand, R. H.,
1994
-
[2018]
An Overview of the Chinese Space Station Optical Survey, in42nd COSPAR Scientific Assembly, vol. 42, pp. E1.16–4–18. APPENDIX A: TABLE OF AVAILABLE FILTERS We include a table of all filters included in the package upon down- load.Anup-to-dateversionofthislistcanbefoundonthedoc...
2025
-
[2021]
Fazio,G.G.,Hora,J.L.,Allen,L.E.etal.,2004
Cosmology with the Roman Space Telescope - multiprobe strategies,MNRAS,507(2), 1746–1761. Fazio,G.G.,Hora,J.L.,Allen,L.E.etal.,2004. TheInfraredArrayCamera (IRAC) for the Spitzer Space Telescope,ApJS,154(1), 10–17. Fioc,M.&Rocca-Volmerange,B.,1999. PEGASE.2,ametallicity-consis...
2004
-
[2024]
arXiv:2411.13960
Learning the Universe: Cosmological and Astrophysical Parameter Inference with Galaxy Lu- minosity Functions and Colours,arXiv e-prints, p. arXiv:2411.13960. Mancone, C. L. & Gonzalez, A. H.,
Reviewed August 6, 2026 · model on record in the stance chip above.
Discussion (0). Continue with ORCID to comment.