Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
664 commits
Select commit Hold shift + click to select a range
8048209
logic for is_biased_sfr and is_biased_mass attributes not quite right…
mirochaj Jul 30, 2024
6c3c776
cleaned up a few mistakes introduced while incorporating systematic e…
mirochaj Aug 1, 2024
e749d57
fixed use_tabs=True case in _get_lum_stellar_pop
mirochaj Aug 8, 2024
7a6b64b
fixed erroneous obs v. true correction when use_tabs=True
mirochaj Aug 9, 2024
5b120d5
minor edits
mirochaj Aug 14, 2024
b101c86
remove print statement
mirochaj Aug 14, 2024
90de0b1
fixed diabolical case where catalog is empty by chance on last chunk …
mirochaj Aug 14, 2024
a55c917
more care with emissivity still required re: band v window. fixed bug…
mirochaj Aug 20, 2024
7ae4840
hadn't applied Mmin and Mmax cuts to luminosities drawn from lookup t…
mirochaj Aug 20, 2024
06c346f
added dirbe throughputs, patched up issues in emissivity caused by us…
mirochaj Aug 27, 2024
67ea610
separated masking from Mmax, generalized approach for cases with scat…
mirochaj Aug 30, 2024
8694711
generalized new masking procedure to allow multiple masks with combin…
mirochaj Aug 30, 2024
65e9af5
moving around some of the grid setup for cRTE calculations
mirochaj Sep 4, 2024
97d79dc
more careful with emissivity interpolation, fixed issue with float32 …
mirochaj Sep 4, 2024
e3a5670
updated sed_modeling parameters and base parameters
mirochaj Sep 4, 2024
7764147
a few more fixes related to band-integration
mirochaj Sep 9, 2024
be07f68
added simple 2-pt beta estimator to GalaxyCohort 'get_beta_approx'
mirochaj Sep 11, 2024
9900fa9
fixed general masking routine, using trapz is insufficient for narrow…
mirochaj Sep 18, 2024
ea303a7
added option to modify dust template with parameterized multiplicativ…
mirochaj Sep 20, 2024
aaf0a34
a few updates to reflect changes in realizations submodule (mostly)
mirochaj Sep 26, 2024
0f5ae4a
Change the name of SciPy integration functions
plaplant Sep 30, 2024
3b4e270
keep integrand of limber integral as hidden attribute for post proces…
mirochaj Sep 30, 2024
35bbd2c
fixed IHL definition
mirochaj Oct 7, 2024
13d0016
quick update to p07-like ihl model
mirochaj Oct 7, 2024
201d8c1
added in preliminary get_ihl_suppression function
mirochaj Oct 8, 2024
204d50a
added exception to avoid doing dust correction twice. need more perma…
mirochaj Oct 8, 2024
029b1fb
edit to ihl models
mirochaj Oct 10, 2024
ee89898
added notes to README about pre-processing, HOME quota issues, and BC03
mirochaj Oct 10, 2024
e37d2ec
got rid of a few pages that are no longer applicable
mirochaj Oct 11, 2024
c170b2f
removed redundant info from install.rst
mirochaj Oct 11, 2024
4204184
added cleaner handling of include_dust_transmission issue in GalaxyEn…
mirochaj Oct 11, 2024
ee30524
scrapped get_dropout_filter function and associated test, not used an…
mirochaj Oct 11, 2024
26ad30e
Merge pull request #64 from plaplant/fix_scipy_api
mirochaj Oct 11, 2024
7437ed2
a few instances of 'base' needed updating to 'setup' in tests
mirochaj Oct 11, 2024
3b3c663
removed a bunch of old deprecated docs
mirochaj Oct 11, 2024
b40e1a1
removed another long-lost example
mirochaj Oct 11, 2024
38eaef5
added 'lmxl' to docs/requirements.txt
mirochaj Oct 11, 2024
2965e50
added lxml to conf.py's extensions
mirochaj Oct 11, 2024
2d602b5
trying lxml_html_clean too
mirochaj Oct 11, 2024
faad009
starting new class to handle realizations based on halo catalogs alre…
mirochaj Oct 16, 2024
7e97259
fixed error in get_bias (missing call to get_mags)
mirochaj Oct 18, 2024
8ef30f3
Remove no-longer-needed files
plaplant Oct 18, 2024
335b045
Set up pyproject.toml to handle package installation
plaplant Oct 18, 2024
f40b155
Change file mode
plaplant Oct 18, 2024
9721ccb
Start using tmp_path fixture for temporary test files
plaplant Oct 18, 2024
f7dd9b5
removed an assert in GalaxyEnsemble.get_lf that may be erroneous.
mirochaj Oct 18, 2024
1e036ea
renamed some MAR stuff to follow newer conventions
mirochaj Oct 18, 2024
052e51b
started working on 'ares init' option in CLI to ease download/install…
mirochaj Oct 18, 2024
a895669
a few more updates to init_ares method
mirochaj Oct 20, 2024
647e91f
paring down README to include only essential info, adding more instal…
mirochaj Oct 20, 2024
c25fb89
added support to supply pop_stellar_lib parameter to access low res s…
mirochaj Oct 21, 2024
6710a98
updates in ares.realizations to seamlessly (hopefully) handle catalog…
mirochaj Oct 22, 2024
c347f5c
added probabilistic occupation to NbodyLC in realizations
mirochaj Oct 23, 2024
11b0efe
added function to check for corrupted files as pre-processing step
mirochaj Oct 23, 2024
0ce48bb
_check_for_corrupted_files has to go after build_directory_structure
mirochaj Oct 23, 2024
0c05e7b
self
mirochaj Oct 23, 2024
fafa7b8
needed to move field shift down a few lines to avoid error
mirochaj Oct 23, 2024
8ece5bc
fixed little h factor for sims, added load_if_found kwarg to limit I/…
mirochaj Oct 23, 2024
e2df6bf
fix popid indexing, remove caching from SPS
mirochaj Oct 24, 2024
fb46ba8
Merge branch 'lc2map' into v1
mirochaj Oct 24, 2024
62bae5d
added get_catalog_subhalos method, seems to be working
mirochaj Oct 24, 2024
b8116e1
added sub-sampling over z when generating maps and catalogs, importan…
mirochaj Oct 25, 2024
c7b2ec7
use slab midpoint as z
mirochaj Oct 26, 2024
fd81dcb
missed an update to the mean redshift of individual redshift slabs in…
mirochaj Oct 29, 2024
849e5ea
forgot to add correction for field position
mirochaj Oct 30, 2024
62c4729
caught one more instance where zsub needed
mirochaj Oct 30, 2024
29915f7
new default is to return totaled PS and another array with all indivi…
mirochaj Nov 1, 2024
181f96d
moved get_seed_kwargs call to avoid error when unused
mirochaj Nov 4, 2024
410511a
finally admitting this stuff won't be published in 2023
mirochaj Nov 4, 2024
fcb723d
careful using element_hard in CompositePopulation
mirochaj Nov 5, 2024
0085832
generalized a mkdir to path.mkdir
mirochaj Dec 18, 2024
1ffc1c8
off-by-one indexing issue fixed in Nbody get_catalog method
mirochaj Dec 20, 2024
3244534
edge case for lightcone fixed
mirochaj Jan 22, 2025
243225e
fixed off-by-one indexing errin get_zindex
mirochaj Feb 4, 2025
0f3967b
minor change in final_redshift to avoid issue with halo table
mirochaj Feb 13, 2025
9ed7a3d
Merge branch 'v1' into ihl_mask
mirochaj Feb 13, 2025
a10803a
pop_ihl_suppression in place
mirochaj Feb 14, 2025
bc6cd60
local ihl masking implemented
mirochaj Feb 18, 2025
b086978
updated PB to have two smhms by default
mirochaj Feb 18, 2025
fb51a27
added lin-log ParameterizedQuantity option, Av(Mstell) use case
mirochaj Feb 22, 2025
c07274c
added basic support for custom redshift slices
mirochaj Feb 26, 2025
18840c2
updating some docstrings, changing default precision of channel edges…
mirochaj Feb 26, 2025
df8039a
removed modeling systematics from get_lum
mirochaj Feb 27, 2025
2c9d61c
Av should be using mstell not mstell_obs as well
mirochaj Feb 28, 2025
97cb4fa
removing check for dust_ext in is_template -- check occurs elsehwere
mirochaj Mar 3, 2025
f6d429f
bugfix: satellite positions are generated relative to central, so nee…
mirochaj Mar 4, 2025
c1842c6
Merge branch 'custom_zslc' into v1
mirochaj Mar 4, 2025
594dfbd
can handle non-integer pop ids now to deal with satellites, need to b…
mirochaj Mar 6, 2025
a60938a
added random seed for satellites, re-organized a bit to do sats on ea…
mirochaj Mar 7, 2025
f2850c1
added option to parameterize Av in terms of SFR instead of Mstell
mirochaj Mar 7, 2025
3f036ab
a bit more random seed tidying up, fixed bug with pop id indexing fol…
mirochaj Mar 17, 2025
6277820
added option to have separate scatter in sfr(mh) and smhm relations
mirochaj Mar 18, 2025
43ec759
a few docstring additions
mirochaj Mar 19, 2025
195d6df
nomenclature update: chunks -> layers, reserving 'chunk' to refer to …
mirochaj Mar 19, 2025
2b2c7ad
added _check_chunks to do some pre-processing on user-supplied chunks
mirochaj Mar 19, 2025
9a6875d
implemented option to save sums over layers ('chunks') using kwarg
mirochaj Mar 20, 2025
b2adea2
added profile_info for using empirical b/a and sersic index distribut…
mirochaj Mar 24, 2025
7304ea1
make sure get_Av can take halo mass if user wants
mirochaj Mar 26, 2025
6073b3e
added dpl+gaussian option in ParameterizedQuantity module
mirochaj Apr 1, 2025
e4f5db7
initial shift of convention to having only one field per file for cat…
mirochaj Apr 3, 2025
9574242
continuing refactor to enable catalogs output in same channels as maps
mirochaj Apr 3, 2025
9f42570
forgot a dnu factor for catalogs in spectral channels, agreement now …
mirochaj Apr 4, 2025
61c3feb
can now save catalogs of nsers, half-light radii, position angle for …
mirochaj Apr 5, 2025
aabd7a6
fixed bug in drawing sersic indices
mirochaj Apr 8, 2025
c0777ed
need to use indexing='ij' in np.meshgrid
mirochaj Apr 8, 2025
0363fd1
new option for adding resolved line profiles (must be Gaussian)
mirochaj Apr 9, 2025
d59347e
adding more careful main sequence calculation
mirochaj Apr 19, 2025
3e72a76
now using tabulated projected NFW profile for satellites
mirochaj Apr 20, 2025
02cfd4f
adjusted max seed for satellite properties to avoid exceeding max value
mirochaj Apr 20, 2025
ff7e92c
setting default size_cut=0.5 to avoid calling expensive Sersic integr…
mirochaj Apr 22, 2025
f7d47b9
Merge branch 'v1' into scatter_ms
mirochaj Apr 24, 2025
a733d19
slightly more careful with popid
mirochaj Apr 24, 2025
2ad9335
minor update to popid handling
mirochaj Apr 25, 2025
c272948
added caching for domain info and get_zlayers
mirochaj Apr 25, 2025
1cbd244
can eliminate for loop in _get_size_catalog thanks to new cache
mirochaj Apr 25, 2025
eaf5737
fixed off-by-one indexing problem for sersic profiles
mirochaj Apr 25, 2025
c7c6908
augmented projected NFW tabulation to include CDF(r) [used for genera…
mirochaj Apr 26, 2025
384587c
get_catalog_subhalos now pulls radial CDF from lookup table rather th…
mirochaj Apr 26, 2025
04bbe25
now tabulating projected NFW CDF to accelerate random placement of sa…
mirochaj Apr 28, 2025
3aba52e
stripped out attempt at openmp stuff
mirochaj Apr 29, 2025
a677a54
added option to generate sersic profiles on small postage stamp, then…
mirochaj Apr 30, 2025
6ffa64f
defaulting to postage_stamp=10
mirochaj Apr 30, 2025
79fd3aa
got rid of hard-coded array of radii for projected NFW profile genera…
mirochaj Apr 30, 2025
81612dc
added postage_stamp option for IHL too, reorganized a bit
mirochaj May 1, 2025
d6c0b42
added null_beyond_size option to introduce limiting radius for IHL an…
mirochaj May 1, 2025
405bed9
tidied up get_main_sequence some more
mirochaj May 2, 2025
18fa4c8
resolved conflicts with scatter_ms branch
mirochaj May 2, 2025
f2851e8
merged with v1
mirochaj May 2, 2025
20be5c3
synced up remote and local v1 branches
mirochaj May 2, 2025
27aa82e
speed up main sequence integral by restricting to within 3 * sigma_m
mirochaj May 3, 2025
c48dd21
caching mstell pdf for minor speedup
mirochaj May 5, 2025
3c35f5d
a few updates to NbodySimLC to get with the times
mirochaj May 6, 2025
6f8441b
correction for P(k) along line of sight
mirochaj May 7, 2025
9cff00c
hmf lightcone correction in place
mirochaj May 8, 2025
d03cf3c
clarified a few things in comments
mirochaj May 8, 2025
f587296
need to avoid divide by zero in fringe cases in get_main_sequence
mirochaj May 12, 2025
ddefad3
caching cdf for get_halo_masses provides small speed-up
mirochaj May 12, 2025
36b3562
have to check for popid 4, int or str
mirochaj May 12, 2025
51ef60b
added caching system for ihl interpolant
mirochaj May 14, 2025
40d5f34
added some caching for satellite mass sampling
mirochaj May 15, 2025
6108c39
added dust_dplx option
mirochaj May 16, 2025
04730a4
a few more caching tricks to speedup subhalo generation
mirochaj May 16, 2025
80e7908
no longer supplying new satellite seeds for each central
mirochaj May 16, 2025
d4ad64b
track parent ID for satellites
mirochaj May 17, 2025
56414a6
Merge branch 'sat_opt' into v1
mirochaj May 17, 2025
d298760
added option to save parent halo IDs for satellites
mirochaj May 19, 2025
25e8371
finished up satellite accounting and parent ID matching
mirochaj May 22, 2025
c654dcd
moved focc sampling to its own subroutine
mirochaj May 27, 2025
bbe84dc
added check on include_igm_transmission parameter for ionizing photons
mirochaj May 27, 2025
b0a027b
temporary state -- some random seed / lightcone debugging going on
mirochaj Jun 4, 2025
da456d4
a bit of generalization to handle non-ir lines
mirochaj Jun 7, 2025
5845d96
minor docstring clarification
mirochaj Jun 9, 2025
6aa2987
added wave_units to generate_cats
mirochaj Jun 10, 2025
7355b4f
get_main_sequence can handle pop_scatter_sfh option
mirochaj Jun 13, 2025
ee0e74d
added histogram2d shortcut for maps composed only of pt srcs
mirochaj Jun 17, 2025
a537eb3
resolved conflicts with lightcone_effects branch
mirochaj Jun 18, 2025
7d86c21
mpc_per_arcmin correction
mirochaj Jun 18, 2025
442f3b9
fixed merge error
mirochaj Jun 24, 2025
43bf4a7
Merge branch 'v1_docs' into v1
mirochaj Jun 24, 2025
ca8f8a1
added Page+ 2025 z=0.5 LF data to ares.data
mirochaj Jun 26, 2025
87da63d
added pop_lum_per_mass parameter
mirochaj Jul 2, 2025
ffaf8a0
using Lbol for now for pop_lum_per_mass
mirochaj Jul 3, 2025
b2f3ee6
more careful with lf interpolation
mirochaj Jul 3, 2025
86a280c
fixed argument ordering issue in _get_ps_integrals
mirochaj Jul 15, 2025
61e917b
ran through all instances of lognormal PDF use to iron out convention…
mirochaj Jul 18, 2025
f1b97bc
sorted out ln10 factors, got it wrong in previous commit
mirochaj Jul 21, 2025
5467eef
added no_sed_modeling parameter bundle, rest is just verbosity adjust…
mirochaj Jul 28, 2025
8ac7557
added option pop_lum_func to prescribe emission by hand
mirochaj Jul 28, 2025
67421da
accidentally removed satellite contributions to number counts in Simu…
mirochaj Jul 29, 2025
31b5a42
added Weibel+ 2024 SMFs
mirochaj Jul 30, 2025
c988980
fixed indexing bug that effectively forced us to use very high time r…
mirochaj Jul 31, 2025
fa25e20
more verbosity for SED optimization
mirochaj Aug 4, 2025
5f52f00
added pf passthrough for pop_lum_func
mirochaj Aug 4, 2025
db194c9
side-step discrete integration for const SFH
mirochaj Aug 11, 2025
0cf75df
fixed factor of 1e6 in constant SFH solver
mirochaj Aug 12, 2025
46f04f8
Galaxy.get_kwargs is a mess. About to remove discrete integrals as th…
mirochaj Aug 13, 2025
bc6f880
finished cleaning up Galaxy.get_kwargs
mirochaj Aug 14, 2025
fa3458b
added single_z option for get_smd for speed-up
mirochaj Aug 20, 2025
fc15cf0
tobs passthrough needed for general case (only had zobs option availa…
mirochaj Aug 27, 2025
09f7611
added exp_decl_quench option to Galaxy class
mirochaj Aug 28, 2025
92393ae
added cache_ipop_mtx option. need to be careful with units
mirochaj Sep 2, 2025
6bda3ad
added Wyder+ 2005 UVLFs from z~0
mirochaj Sep 3, 2025
31d6d70
save ps and px in native units for caching purposes
mirochaj Sep 4, 2025
10636fa
removed some verbsosity
mirochaj Sep 8, 2025
010a2ab
a few additions to docs/requirements.txt that got local build working…
Sep 9, 2025
e463039
fixing issue with deprecated scipy.misc.derivative, cumtrapz, simps
Sep 9, 2025
f145424
added default values to a few subparsers
Sep 9, 2025
fa64b8d
removed warning about HMF parameter checking, added extrapolate_with_…
Sep 9, 2025
0a1ad07
better error handling for dust_extinction and secondary_electron_data
Sep 9, 2025
3a27354
replaced a few more np.trapz instances in favor of trapezoid
Sep 9, 2025
1413f34
fixes to avoid docstring formatting warnings, auto-move bpass_v1 file…
Sep 9, 2025
1bf9778
remove bpass+cloudy case from nebular test problem
Sep 10, 2025
e6e97f3
minimalist set of bpass v1 files needed for tests now hosted on Drive…
Sep 10, 2025
f4a03cd
shifted a few more datasets over to Drive
Sep 10, 2025
e923d65
reworked bpass_v1 unpack
Sep 10, 2025
c1518ae
made halos_tests a cli download option
Sep 10, 2025
9858dc3
now pulling WFC throughputs from SVO website
Sep 10, 2025
47a216c
updated halos.tar.gz link in cli.
Sep 12, 2025
dbefbd1
updated 'datasets' listing in cli, changed name to 'dataset_groups'
Sep 12, 2025
993ae81
resolved conflicts with tip of v1 branch, should now be in sync
Sep 12, 2025
3eb8db0
Revert "resolved conflicts with tip of v1 branch, should now be in sync"
Sep 12, 2025
0ab54d7
verbosity updates in Galaxy.get_kwargs
mirochaj Sep 18, 2025
7c3f77f
wave_units wasn't correctly propagated through generate_cats
mirochaj Sep 19, 2025
7f681de
updated 2025 pars, corrected missing link for scatter in satellites (SF)
mirochaj Sep 19, 2025
532ea96
added halo_mf_interp option, had been re-initializing interpolator in…
mirochaj Sep 24, 2025
5ee3dfd
removed some try/except verbosity, issue understood
mirochaj Sep 26, 2025
d92fa2f
working on ParameterFile overhaul
Oct 1, 2025
94d2ad4
added check for metadata, auto-save parameters and sed tables
mirochaj Oct 1, 2025
20dd8be
ParameterFile overhaul. Added test problem. Still needs more checking
Oct 3, 2025
d5e621e
merge conflicts resolved
Oct 7, 2025
d3d9e94
renamed m25 ares.data module, seems to have not survived the merge
mirochaj Oct 8, 2025
d792840
updated m25 with what v1 branch had before merge
mirochaj Oct 8, 2025
7300a9d
cleaning up a few bugs that emerged after the recent merge
mirochaj Oct 8, 2025
c736f0c
added test problem for population linking
mirochaj Oct 8, 2025
d3e1902
removed some print statements left over from debugging
mirochaj Oct 9, 2025
c07d72e
merged in pf_woes branch
mirochaj Oct 9, 2025
336a765
updated np.trapz calls to np.trapezoid
mirochaj Oct 9, 2025
dfcd42f
Merge pull request #66 from plaplant/pypi
mirochaj Oct 9, 2025
17c3132
a few missing ares/data files and functions since merge
mirochaj Oct 9, 2025
416bb00
updated get_ebl_ps return, progressbar.Progressbar call sequence
mirochaj Oct 9, 2025
f5911b6
separate functions for u(k|m) and projected surface brightness profil…
mirochaj Oct 9, 2025
c7bdbd3
grabbed some stuff from v1 ares.realizations that somehow didn't surv…
mirochaj Oct 10, 2025
66afa2f
missed default None set for pop_lum_tab_prefix
mirochaj Oct 12, 2025
ab735b2
started 'ares initialize ebl' option
mirochaj Oct 12, 2025
aa14cd4
pulled Galaxy.py back over from old v1
mirochaj Oct 13, 2025
13521e2
Merge branch 'pypi_fallout' into v1
mirochaj Oct 13, 2025
67f42af
reimplemented the cache_ipop_mtx option, fixed get_mass_accretion_rat…
mirochaj Oct 13, 2025
5c60331
got rid of a few more np.trapz calls
mirochaj Oct 13, 2025
3ea9154
Merge branch 'pypi_fallout' into v1
mirochaj Oct 13, 2025
1807e79
improper vectorization fixed, more care handling field_names in Light…
mirochaj Oct 17, 2025
b0c6485
Merge branch 'pypi_fallout' into v1
mirochaj Oct 17, 2025
62eb8b2
pixel scale no longer included in directory structure of mocks, many …
mirochaj Oct 17, 2025
46b0142
Merge branch 'pypi_fallout' into v1
mirochaj Oct 17, 2025
b6e6df7
added little ssl trick to avoid certificate verification error for so…
mirochaj Oct 19, 2025
5874b30
Merge branch 'pypi_fallout' into v1
mirochaj Oct 19, 2025
2e3b88c
more patches to handle satellites in mocks, having to do with project…
mirochaj Oct 21, 2025
3e9f8e3
Merge branch 'pypi_fallout' into v1
mirochaj Oct 21, 2025
267fc72
a few kwargs for IHL lost in merge
mirochaj Oct 21, 2025
46d76b2
renamed get_ebl to get_ebl_intensity
mirochaj Oct 21, 2025
22299ae
added sedtabs to download options and 'ares initialize ebl'
mirochaj Oct 21, 2025
ad8efda
added halo surface brightness profile tabs to ares download options
mirochaj Oct 21, 2025
a79e5eb
fixed a few issues that came up in build on new machine
Oct 22, 2025
c3c248f
not using ares_ebl_data for sed tabs in HOME. folder should be called…
Oct 22, 2025
728b61c
not using ares_ebl_data for sed tabs in HOME. folder should be called…
mirochaj Oct 22, 2025
1a85edb
edit to _mv_halosurf
mirochaj Oct 23, 2025
8cb52d3
Merge branch 'v1' of https://github.com/mirochaj/ares into v1
mirochaj Oct 23, 2025
c3f5f6a
fixes needed to accommodate ares initialize with path argument.
mirochaj Oct 23, 2025
a700981
minor text cleanup in cli
mirochaj Oct 23, 2025
1c43e91
fixed lnM v log10(M) issue for satellites, added inference and mocks …
mirochaj Oct 23, 2025
6a4c007
changed default total_sat=False
mirochaj Oct 24, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
3 changes: 2 additions & 1 deletion .coveragerc
Original file line number Diff line number Diff line change
Expand Up @@ -39,12 +39,13 @@ exclude_lines =

omit =
ares/util/Aesthetics.py
ares/util/BlobBundles.py
ares/util/cli.py
ares/util/MPIPool.py
ares/util/PrintInfo.py
ares/util/Warnings.py
ares/analysis/*.py
ares/inference/*.py
ares/data/*.py

ignore_errors = True

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test_suite.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ jobs:
- name: Build
run: |
pip install .
python remote.py minimal
ares download tests
- name: Test with pytest
run: |
pytest --cov-config=.coveragerc --cov=ares --cov-report=xml -v tests/*.py
Expand Down
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
ares.egg-info
*.png
*.tar.gz
build
input/*
docs/_build
docs/*.py
docs/*.txt
Expand All @@ -28,6 +30,9 @@ input/bpass_v1_stars/*
input/bpass_v2
input/inits/*.txt
input/nircam
input/rubin
input/spherex
input/wise
tests/.coverage
.coverage
coverage.xml
Expand Down
14 changes: 7 additions & 7 deletions .readthedocs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,16 @@
# Required
version: 2

build:
os: ubuntu-22.04
tools:
python: "3.10"

# Build documentation in the docs/ directory with Sphinx
sphinx:
configuration: docs/conf.py

# Optionally build your docs in additional formats such as PDF
#formats:
# - pdf

# Optionally set the version of Python and requirements required to build your docs
python:
version: "3.7"
install:
- requirements: docs/requirements.txt
install:
- requirements: docs/requirements.txt
94 changes: 94 additions & 0 deletions INSTALL.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,94 @@
Installation
++++++++++++

Dependencies
------------
If installed via pip, ARES' dependencies will be built automatically.

But, in case you're curious, the core dependencies are:

- [numpy](http://www.numpy.org/)
- [scipy](http://www.scipy.org/)
- [matplotlib](http://matplotlib.org/)
- [h5py](http://www.h5py.org/)

and the optional dependencies are:

- [camb](https://camb.readthedocs.io/en/latest/)
- [hmf](https://github.com/steven-murray/hmf)
- [astropy](https://www.astropy.org/)
- [dust_extinction](https://dust-extinction.readthedocs.io/en/stable/index.html)
- [dust_attenuation](https://dust-extinction.readthedocs.io/en/stable/index.html)
- [mpi4py](http://mpi4py.scipy.org)
- [pymp](https://github.com/classner/pymp)
- [progressbar2](http://progressbar-2.readthedocs.io/en/latest/)
- [setuptools](https://pypi.python.org/pypi/setuptools)
- [mpmath](http://mpmath.googlecode.com/svn-history/r1229/trunk/doc/build/setup.html)
- [shapely](https://pypi.python.org/pypi/Shapely)
- [descartes](https://pypi.python.org/pypi/descartes)

If you'd like to build the documentation locally, you'll need:

- [numpydoc](https://numpydoc.readthedocs.io/en/latest/)
- [nbsphinx](https://nbsphinx.readthedocs.io/en/0.8.8/)

and if you'd like to run the test suite locally, you'll want:

- [pytest](https://docs.pytest.org/en/7.1.x/)
- [pytest-cov](https://pytest-cov.readthedocs.io/en/latest/)

which are all pip-installable.

Note: ARES has been tested only with Python 2.7.x and Python 3.7.x.

External datasets: stellar population synthesis (SPS) models
------------------------------------------------------------
As discussed in the `README </README.rst>`_, ARES relies on many external datasets. The `ares init` command builds a minimal install, including some cosmological initial conditions, a single metallicity, :math:`Z=0.004`, constant star formation rate, single-star stellar population synthesis model from BPASS version 1.0, and a high redshift lookup table for the Tinker et al. 2010 halo mass function generated with `hmf <https://github.com/steven-murray/hmf>`.

There are many more external datasets that can be downloaded easily using the ARES CLI. For example, to fetch the complete set of BPASS v1 models (all metallicities, constant star formation and simple stellar populations, single star and binaries), you can do

```
ares download bpass_v1
```

There are now newer versions of BPASS, which must be downloaded by hand. To download BPASS v2 models, navigate to `this page <https://bpass.auckland.ac.nz/9.html>`_ and download the desired models in the ``$HOME/.ares/bpass_v2`` directory. If you initialized ARES with a different path (via the `--path` flag; see `README </README.md`_), make sure you instead move files there.

ARES is also setup to handle the starburst99 or Bruzual \& Charlot models, which can be downloaded via

```
ares download starburst99
ares download bc03
ares download bc03_2013 # for the 2013 update to the BC03 models
```

Pre-processing
~~~~~~~~~~~~~~
The spectral resolution of the BPASS models (and some other SPS models) is 1 Angstrom, which is much better than we need for most ARES modeling. So, many examples use "degraded" BPASS models, which just smooth the standard BPASS SEDs with a tophat of some width, generally 10 Angstroms. To do this SED degradation, we use the ARES CLI:

```python
import os
from ares.util import cli as ares_cli

ares_cli.generate_lowres_sps(f"{os.environ.get('HOME')}/.ares/bpass_v2/BPASSv2_imf135_300/OUTPUT_CONT", degrade_to=10)
ares_cli.generate_lowres_sps(f"{os.environ.get('HOME')}/.ares/bpass_v2/BPASSv2_imf135_300/OUTPUT_POP", degrade_to=10)
```

Whether or not these files are required should be discussed in the various examples in the documentation, so please be sure to check there first for instructions if you get errors indicative of missing files.


External datasets: filter transmission curves
---------------------------------------------
For generating mock photometry, we must convolve modeled SEDs with the transmission curves of a given telescope's photometric filters. We've got many common filters available, which you can download via, e.g., ::


for telescope in roman euclid rubin wise 2mass spherex wise dirbe irac sdss
ares download $telescope


Again, be sure to supply the ``--path`` flag if your `$HOME` directory has a small quota.

External datasets: posteriors for cosmological parameters from Planck
---------------------------------------------------------------------
Instead of supplying cosmological parameters by hand, you can also draw from published Planck chains directly via the `cosmology_name`, `cosmology_id`, and `cosmology_number` parameters. But first, you need the chains themselves. As per usual, you can do: ::

ares download planck
162 changes: 45 additions & 117 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,173 +1,101 @@

# **ARES**
[![Documentation Status](https://readthedocs.org/projects/ares/badge/?version=latest)](http://ares.readthedocs.io/en/latest/?badge=latest) ![Tests](https://github.com/mirochaj/ares/actions/workflows/test_suite.yaml/badge.svg) [![codecov](https://codecov.io/gh/mirochaj/ares/branch/main/graph/badge.svg?token=Q3CCKIMQJF)](https://codecov.io/gh/mirochaj/ares) [![Last Commit](https://img.shields.io/github/last-commit/mirochaj/ares)](https://img.shields.io/github/last-commit/mirochaj/ares)

The Accelerated Reionization Era Simulations (ARES) code was designed to
rapidly generate models for the global 21-cm signal. It can also be used as a
The Accelerated Reionization Era Simulations (ARES) code was originally designed to
rapidly generate models for the global 21-cm signal. However, it can also be used as a
1-D radiative transfer code, stand-alone non-equilibrium chemistry solver,
global radiation background calculator, or semi-analytic galaxy formation model.
global radiation background calculator, or semi-empirical galaxy formation model.

The documentation is [here](https://ares.readthedocs.io/en/latest/index.html).

## Technical Details

The main papers that describe how ARES works include:

- 1-D radiative transfer: [Mirocha et al. (2012)](http://adsabs.harvard.edu/abs/2012ApJ...756...94M)
- Uniform backgrounds \& global 21-cm signal: [Mirocha (2014)](http://adsabs.harvard.edu/abs/2014MNRAS.443.1211M)
- Galaxy luminosity functions: [Mirocha, Furlanetto, & Sun (2017)](https://ui.adsabs.harvard.edu/abs/2017MNRAS.464.1365M/abstract)
- Population III star formation: [Mirocha et al. (2018)](http://adsabs.harvard.edu/abs/2018MNRAS.478.5591M)
- Rest-ultraviolet colours at high-z: [Mirocha, Mason, & Stark (2020)](https://ui.adsabs.harvard.edu/abs/2020arXiv200507208M/abstract)
- Galaxy luminosity functions (LFs): [Mirocha, Furlanetto, & Sun (2017)](https://ui.adsabs.harvard.edu/abs/2017MNRAS.464.1365M/abstract)
- Self-consistent LFs and rest-ultraviolet colours: [Mirocha, Mason, & Stark (2020)](https://ui.adsabs.harvard.edu/abs/2020arXiv200507208M/abstract)
- Near-infrared background and nebular emission: [Sun et al. (2021)](https://ui.adsabs.harvard.edu/abs/2021MNRAS.508.1954S/abstract)

Plus some more applications:

- [Mirocha & Furlanetto (2019)](http://adsabs.harvard.edu/abs/2018arXiv180303272M)
- [Schneider (2018)](http://adsabs.harvard.edu/abs/2018PhRvD..98f3021S)
- [Tauscher et al. (2017)](http://adsabs.harvard.edu/abs/2018ApJ...853..187T)
- [Mirocha, Harker, & Burns (2015)](http://adsabs.harvard.edu/abs/2015ApJ...813...11M)
- High-z UV and X-ray background \& global 21-cm signal: [Mirocha (2014)](http://adsabs.harvard.edu/abs/2014MNRAS.443.1211M)
- Population III star formation: [Mirocha et al. (2018)](http://adsabs.harvard.edu/abs/2018MNRAS.478.5591M)
- 1-D radiative transfer: [Mirocha et al. (2012)](http://adsabs.harvard.edu/abs/2012ApJ...756...94M)

Be warned: this code is still under active development -- use at your own
risk! Correctness of results is not guaranteed.

## Citation

If you use ARES in paper please reference [Mirocha (2014)](http://adsabs.harvard.edu/abs/2014MNRAS.443.1211M) if it's an application of the global 21-cm modeling machinery and [Mirocha et al. (2012)](http://adsabs.harvard.edu/abs/2012ApJ...756...94M) if you use the 1-D radiative transfer and/or SED optimization. For galaxy semi-analytic modeling, please have a look at [Mirocha, Furlanetto, & Sun (2017)](http://adsabs.harvard.edu/abs/2016arXiv160700386M), [Mirocha, Mason, & Stark (2020)](https://ui.adsabs.harvard.edu/abs/2020arXiv200507208M/abstract), and [Mirocha (2020)](https://ui.adsabs.harvard.edu/abs/2020MNRAS.499.4534M/abstract), and for PopIII star modeling, see [Mirocha et al. (2018)](http://adsabs.harvard.edu/abs/2018MNRAS.478.5591M).
If you use ARES, please be sure to cite the relevant papers above depending on your use case (see [here](CITATION.rst) for bibtex entries). Please also provide a link to [this page](https://github.com/mirochaj/ares) as a footnote.

Please also provide a link to [this page](https://github.com/mirochaj/ares) as a footnote.

Note that for some applications, ARES relies heavily on lookup tables and publicly-available software packages that should be referenced as well. These include:
**Note that for some applications, ARES relies heavily on lookup tables and publicly-available software packages that should be referenced as well.** These include:

- Code for Anisotropies in the Microwave Background ([CAMB](https://camb.readthedocs.io/en/latest/)).
- The Halo Mass Function ([hmf](https://hmf.readthedocs.io/en/latest/)) package (see [Murray et al.(2013)](https://arxiv.org/abs/1306.6721)).
- Lookup tables and fitting formulae for the fraction of photo-electron energy deposited in heat, ionization, excitation from [Shull \& van Steenberg (1985)](https://ui.adsabs.harvard.edu/abs/1985ApJ...298..268S/abstract), [Ricotti, Gnedin, \& Shull (2002)](https://ui.adsabs.harvard.edu/abs/2002ApJ...575...33R/abstract), and [Furlanetto \& Stoever (2010)](https://ui.adsabs.harvard.edu/abs/2010MNRAS.404.1869F/abstract) (see `secondary_ionization` parameter, values of 2, 3, and 4, respectively).
- Collisional coupling coefficients for the 21-cm line from [Zygelman (2005)](https://ui.adsabs.harvard.edu/abs/2005ApJ...622.1356Z/abstract).
- Wouthuysen-Field coupling coefficients for the 21-cm line from [Chuzhoy, Alvarez, & Shapiro (2006)](https://ui.adsabs.harvard.edu/abs/2006ApJ...651....1C/abstract), [Furlanetto \& Pritchard (2006)](https://ui.adsabs.harvard.edu/abs/2006MNRAS.372.1093F/abstract), [Hirata (2006)](https://ui.adsabs.harvard.edu/abs/2006MNRAS.367..259H/abstract), and [Mittal & Kulkarni (2021)](https://ui.adsabs.harvard.edu/abs/2021MNRAS.503.4264M/abstract) (see `approx_Salpha` parameter, values of 2, 3, 4, and 5, respectively).
- Wouthuysen-Field coupling coefficients for the 21-cm line from [Chuzhoy & Shapiro (2006)](https://ui.adsabs.harvard.edu/abs/2006ApJ...651....1C/abstract), [Furlanetto \& Pritchard (2006)](https://ui.adsabs.harvard.edu/abs/2006MNRAS.372.1093F/abstract), [Hirata (2006)](https://ui.adsabs.harvard.edu/abs/2006MNRAS.367..259H/abstract), and [Mittal & Kulkarni (2021)](https://ui.adsabs.harvard.edu/abs/2021MNRAS.503.4264M/abstract) (see `approx_Salpha` parameter, values of 2, 3, 4, and 5, respectively).
- Lyman-alpha transition probabilities from [Pritchard \& Furlanetto (2006)](https://ui.adsabs.harvard.edu/abs/2006MNRAS.367.1057P/abstract).
- Stellar population synthesis model options include starburst99 ([Leitherer et al. (1999)](https://ui.adsabs.harvard.edu/abs/1999ApJS..123....3L/abstract)) and BPASS versions 1 ([Eldridge \& Stanway (2009)](https://ui.adsabs.harvard.edu/abs/2009MNRAS.400.1019E/abstract)) and 2 ([Eldridge et al. (2017)](https://ui.adsabs.harvard.edu/abs/2017PASA...34...58E/abstract),[Stanway \& Eldridge (2018)](https://ui.adsabs.harvard.edu/abs/2018MNRAS.479...75S/abstract)) (via `pop_sed` parameter, values `'starburst99'`, `'bpass_v1'`, and `'bpass_v2'`, respectively).
- Stellar population synthesis model options include starburst99 ([Leitherer et al. (1999)](https://ui.adsabs.harvard.edu/abs/1999ApJS..123....3L/abstract)), BPASS versions 1 ([Eldridge \& Stanway (2009)](https://ui.adsabs.harvard.edu/abs/2009MNRAS.400.1019E/abstract)) and 2 ([Eldridge et al. (2017)](https://ui.adsabs.harvard.edu/abs/2017PASA...34...58E/abstract),[Stanway \& Eldridge (2018)](https://ui.adsabs.harvard.edu/abs/2018MNRAS.479...75S/abstract)), and the [Bruzual \& Charlot (2003)](https://www.bruzual.org/bc03/) models. Which model is used is controlled by the `pop_sed` parameter, values `'starburst99'`, `'bpass_v1'`, `'bpass_v2'`, and `'bc03'` respectively. Note that each of these models is essentially a big lookup table; some can be downloaded automatically (see below).

Feel free to get in touch if you are unsure of whether any of these tools are being used under the hood for your application.

## Dependencies

You will need:

- [numpy](http://www.numpy.org/)
- [scipy](http://www.scipy.org/)
- [matplotlib](http://matplotlib.org/)
- [h5py](http://www.h5py.org/)
## Installation

and optionally,
To install ARES, we recommend using pip:

- [camb](https://camb.readthedocs.io/en/latest/)
- [hmf](https://github.com/steven-murray/hmf)
- [mpi4py](http://mpi4py.scipy.org)
- [pymp](https://github.com/classner/pymp)
- [emcee](http://dan.iel.fm/emcee/current/)
- [distpy](https://bitbucket.org/ktausch/distpy)
- [progressbar2](http://progressbar-2.readthedocs.io/en/latest/)
- [setuptools](https://pypi.python.org/pypi/setuptools)
- [mpmath](http://mpmath.googlecode.com/svn-history/r1229/trunk/doc/build/setup.html)
- [shapely](https://pypi.python.org/pypi/Shapely)
- [descartes](https://pypi.python.org/pypi/descartes)
```
pip install ares-astro # actual name TBD
```

If you'd like to build the documentation locally, you'll need:
ARES often relies on external datasets.

- [numpydoc](https://numpydoc.readthedocs.io/en/latest/)
- [nbsphinx](https://nbsphinx.readthedocs.io/en/0.8.8/)
To download the core set of lookup tables needed for the most common use-cases, and perform some pre-processing, we can use the ARES command-line interface (CLI):

and if you'd like to run the test suite locally, you'll want:
```
ares init
```

- [pytest](https://docs.pytest.org/en/7.1.x/)
- [pytest-cov](https://pytest-cov.readthedocs.io/en/latest/)
By default, ARES will download files to ``$HOME/.ares``. However, if your ``$HOME`` quota is small, do provide the flag ``--path=<someplace-with-plenty-of-disk-space>`` to ``ares init``, and setup a symbolic link that points from ``$HOME/.ares`` to this new location.

which are pip-installable.
Note that ``ares init`` sets up a minimal ARES installation with only the most oft-used external datasets. For more information about what is needed for broader applications, see [this page](INSTALL.rst).

Note: **ares** has been tested only with Python 2.7.x and Python 3.7.x.
## Quick Examples

## Getting started
To generate a math:`z=6` luminosity function, you can do

To clone a copy and install:
```python
import ares
import numpy as np
import matplotlib.pyplot as plt

```
git clone https://github.org/mirochaj/ares.git
cd ares
python setup.py install
```
pars = ares.util.ParameterBundle('mirocha2020:legacy')
pop = ares.populations.GalaxyPopulation(**pars)

**ares** will look in ``ares/input`` for lookup tables of various kinds. To download said lookup tables, run:
bins, phi = pop.get_uvlf(z=6, bins=np.arange(-25, -10, 0.1))

```
python remote.py
plt.semilogy(bins, phi)
```

This might take a few minutes. If something goes wrong with the download, you can run
Note: if the plot doesn't appear automatically, set ``interactive: True`` in your matplotlibrc file or type:

```python
plt.show()
```
python remote.py fresh
```

to get fresh copies of everything.

## Quick Example

To generate a model for the global 21-cm signal, simply type:

```python
import ares

sim = ares.simulations.Global21cm() # Initialize a simulation object
sim.run()
pars = ares.util.ParameterBundle('global_signal:basic')
sim = ares.simulations.Simulation(**pars)
gs = sim.get_21cm_gs()
```

You can examine the contents of ``sim.history``, a dictionary which contains
the redshift evolution of all IGM physical quantities, or use some built-in
analysis routines:
You can examine the contents of ``gs.history``, a dictionary which contains
the redshift evolution of all properties of the intergalactic medium, or use some built-in analysis routines:

```python
sim.GlobalSignature()
gs.Plot21cmGlobalSignal()
```

If the plot doesn't appear automatically, set ``interactive: True`` in your matplotlibrc file or type:

```python
import matplotlib.pyplot as pl
pl.show()
```

## Help

If you encounter problems with installation or running simple scripts, first check the Troubleshooting page in the documentation to see if you're dealing with a common problem. If you don't find your problem listed there, please let me know!

## Contributors

Primary author: [Jordan Mirocha](https://sites.google.com/site/jordanmirocha/home) (McGill)

Additional contributions / corrections / suggestions from:

- Geraint Harker
- Jason Sun
- Keith Tauscher
- Jacob Jost
- Greg Salvesen
- Adrian Liu
- Saurabh Singh
- Rick Mebane
- Krishma Singal
- Donald Trinh
- Omar Ruiz Macias
- Arnab Chakraborty
- Madhurima Choudhury
- Saul Kohn
- Aurel Schneider
- Kristy Fu
- Garett Lopez
- Ranita Jana
- Daniel Meinert
- Henri Lamarre
- Matteo Leo
- Emma Klemets
- Felix Bilodeau-Chagnon
- Venno Vipp
- Oscar Hernandez
- Joshua Hibbard
- Trey Driskell
If you're a pre-version-1.0 ARES user, most of this will look familiar, except these days we're running all models (21-cm, near-infrared background, etc.) through the `ares.simulations.Simulation` interface rather than specific classes. There's also a lot more consistency in call sequences, e.g., we adopt the convention of naming commonly-used functions and attributes as `get_<something>` and `tab_<something>`. A much longer list of v1 convention changes can be found in [Pull Request 61](https://github.com/mirochaj/ares/pull/61).
Loading