Doore, KeithMonson, Erik B.Eufrasio, Rafael T.Lehmer, Bret D.Garofali, KristenBasu-Zych, Antara2023-05-182023-05-182023-04-13https://doi.org/10.48550/arXiv.2304.06753http://hdl.handle.net/11603/28007We present an updated version of Lightning, a galaxy spectral energy distribution (SED) fitting code that can model X-ray to submillimeter observations. The models in Lightning include the options to contain contributions from stellar populations, dust attenuation and emission, and active galactic nuclei (AGN). X-ray emission, when utilized, can be modeled as originating from stellar compact binary populations with the option to include emission from AGN. We have also included a variety of algorithms to fit the models to observations and sample parameter posteriors; these include an adaptive Markov-Chain Monte-Carlo (MCMC), affine-invariant MCMC, and Levenberg-Marquardt gradient decent (MPFIT) algorithms. To demonstrate some of the capabilities of Lightning, we present several examples using a variety of observational data. These examples include (1) deriving the spatially resolved stellar properties of the nearby galaxy M81, (2) demonstrating how X-ray emission can provide constrains on the properties of the supermassive black hole of a distant AGN, (3) exploring how to rectify the attenuation effects of inclination on the derived the star formation rate of the edge-on galaxy NGC 4631, (4) comparing the performance of Lightning to similar Bayesian SED fitting codes when deriving physical properties of the star-forming galaxy NGC 628, and (5) comparing the derived X-ray and UV-to-IR AGN properties from Lightning and CIGALE for a distant AGN. Lightning is an open-source application developed in the Interactive Data Language (IDL) and is available at https://github.com/rafaeleufrasio/lightning.34 pagesen-USThis work was written as part of one of the author's official duties as an Employee of the United States Government and is therefore a work of the United States Government. In accordance with 17 U.S.C. 105, no copyright protection is available for such works under U.S. Law.Public Domain Mark 1.0Lightning: An X-ray to Submillimeter Galaxy SED Fitting Code With Physically-Motivated Stellar, Dust, and AGN ModelsText