aboutsummaryrefslogtreecommitdiffstats
path: root/fg21sim
Commit message (Collapse)AuthorAgeFilesLines
...
* clusters/halo.py: Add property "volume" (unit: [cm^3])Aaron LI2017-07-291-0/+9
| | | | Signed-off-by: Aaron LI <aly@aaronly.me>
* utils/units.py: Add several units conversionsAaron LI2017-07-291-0/+4
| | | | Signed-off-by: Aaron LI <aly@aaronly.me>
* clusters/emission.py: support calc emissivity at multiple frequenciesAaron LI2017-07-291-17/+27
| | | | Signed-off-by: Aaron LI <aly@aaronly.me>
* clusters/emission.py: Add property "B_gauss"Aaron LI2017-07-291-7/+11
| | | | Signed-off-by: Aaron LI <aly@aaronly.me>
* galactic/freefree: Add "dust_fraction" and "halpha_abs_th" configsAaron LI2017-07-292-10/+18
| | | | Signed-off-by: Aaron LI <aly@aaronly.me>
* galactic/freefree.py: Add method "_calc_halpha_to_freefree()"Aaron LI2017-07-291-14/+24
| | | | Signed-off-by: Aaron LI <aly@aaronly.me>
* galactic/freefree.py: Some cleanupsAaron LI2017-07-291-33/+33
| | | | Signed-off-by: Aaron LI <aly@aaronly.me>
* galactic/freefree: Add config "electron_temperature"Aaron LI2017-07-292-10/+28
| | | | | | Update method "_calc_ratio_a()" to "_calc_factor_a()" Signed-off-by: Aaron LI <aly@aaronly.me>
* clusters/emission.py: Cache kernel function interpolation resultsAaron LI2017-07-271-22/+22
| | | | Signed-off-by: Aaron LI <aly@aaronly.me>
* clusters/configs: Update "beta_turb" default to 1.0Aaron LI2017-07-271-1/+1
| | | | | | | This makes the simulation agree better with observations, e.g., <Jsyn> ~ 1e-42 [erg/s/cm^3/Hz] Signed-off-by: Aaron LI <aly@aaronly.me>
* utils/cosmology.py: age() and redshift() accepts numpy arraysAaron LI2017-07-271-7/+10
| | | | Signed-off-by: Aaron LI <aly@aaronly.me>
* utils/cosmology.py: Update references and commentsAaron LI2017-07-271-36/+66
| | | | Signed-off-by: Aaron LI <aly@aaronly.me>
* clusters/emission.py: Fix units/dimensions problemAaron LI2017-07-261-1/+2
| | | | | | | | | | | NOTE: Since we just substitute ``p`` (electron momentum) for ``γ`` (electron Lorentz factor), i.e., N = int_p n(p) dp = int_γ n(γ) dγ , therefore the coefficient ``sqrt(3) e^3 B / (m c^2)`` does NOT need modification (e.g., multiply an extra ``m c``)! Signed-off-by: Aaron LI <aly@aaronly.me>
* clusters/emission.py: explain more on Larmor frequencyAaron LI2017-07-261-4/+12
| | | | Signed-off-by: Aaron LI <aly@aaronly.me>
* clusters/emission.py: Fix the calling to F(x)Aaron LI2017-07-261-9/+6
| | | | Signed-off-by: Aaron LI <aly@aaronly.me>
* clusters/emission.py: Rewrite emissivity calculationAaron LI2017-07-261-15/+24
| | | | | | | | | | Use 2D grid of (discrete) samples to optimize integration speed, avoiding the more complicated integration w.r.t. functions. WARNING: Current calculation results seems wrong! Signed-off-by: Aaron LI <aly@aaronly.me>
* clusters/emission.py: Update argumentsAaron LI2017-07-261-28/+28
| | | | Signed-off-by: Aaron LI <aly@aaronly.me>
* clusters/emission.py: Rewrite Synchrotron kernel function calculationAaron LI2017-07-261-3/+41
| | | | | | | Use interpolation to optimize the speed as well as to vectorize the function to ease calling. Signed-off-by: Aaron LI <aly@aaronly.me>
* clusters/halo.py: Add property "magnetic_field"Aaron LI2017-07-261-0/+11
| | | | Signed-off-by: Aaron LI <aly@aaronly.me>
* clusters/solver.py: Use multiple data points to fit the power-lawAaron LI2017-07-251-17/+19
| | | | Signed-off-by: Aaron LI <aly@aaronly.me>
* configs: Update [[halos]] sections a bitAaron LI2017-07-251-5/+6
| | | | Signed-off-by: Aaron LI <aly@aaronly.me>
* clusters/halo: Change config "eta_turb" to "beta_turb"Aaron LI2017-07-252-6/+5
| | | | | | | | | | This configuration option "beta_turb" has different meaning as "eta_turb" in [Cassano & Brunetti 2005], though they can both be an indicator for the turbulence acceleration efficiency. Rename this configuration option to make the difference more clear. Signed-off-by: Aaron LI <aly@aaronly.me>
* clusters/helper.py: Fix and replace R_halo vs. R_vir relationAaron LI2017-07-231-11/+12
| | | | Signed-off-by: Aaron LI <aly@aaronly.me>
* clusters/helper.py: Fix a bug in "mass_to_kT()"Aaron LI2017-07-231-2/+2
| | | | Signed-off-by: Aaron LI <aly@aaronly.me>
* clusters/helper.py: Add "density_energy_electron()" functionAaron LI2017-07-231-2/+27
| | | | Signed-off-by: Aaron LI <aly@aaronly.me>
* clusters/main.py: Commit missing changes on CONFIGS and COSMOAaron LI2017-07-231-3/+3
| | | | Signed-off-by: Aaron LI <aly@aaronly.me>
* clusters: Accept 1D numpy array and calculate values for all gamma'sAaron LI2017-07-232-21/+27
| | | | Signed-off-by: Aaron LI <aly@aaronly.me>
* clusters/halo.py: Constrain tau_acc to avoid zero diffusionAaron LI2017-07-232-2/+22
| | | | | | | | | | Zero or negative diffusion coefficient leads to unstable or wrong results due to numerical algorithm/scheme adopted to solve the Fokker-Planck equation. Also add a NOTE to the FokkerPlanckSolver class. Signed-off-by: Aaron LI <aly@aaronly.me>
* clusters/helper.py: Disable scattering on scaling relationsAaron LI2017-07-231-4/+8
| | | | Signed-off-by: Aaron LI <aly@aaronly.me>
* Use all uppercase to identify the global CONFIGS and COSMOAaron LI2017-07-228-44/+40
| | | | | | Update to use the global CONFIGS and COSMO Signed-off-by: Aaron LI <aly@aaronly.me>
* clusters: Import global "configs" to simplify parametersAaron LI2017-07-222-72/+57
| | | | Signed-off-by: Aaron LI <aly@aaronly.me>
* clusters/halo.py: Implement "_injection_rate" propertyAaron LI2017-07-221-6/+56
| | | | Signed-off-by: Aaron LI <aly@aaronly.me>
* clusters: Move "magnetic_field()" function to helper.pyAaron LI2017-07-222-24/+40
| | | | | | Import the global "configs" in helper.py to make parameters lean. Signed-off-by: Aaron LI <aly@aaronly.me>
* configs/manager.py: Add formatter for handlersAaron LI2017-07-221-1/+8
| | | | Signed-off-by: Aaron LI <aly@aaronly.me>
* utils/units.py: Add "mec2" energy of a still electronAaron LI2017-07-221-1/+5
| | | | Signed-off-by: Aaron LI <aly@aaronly.me>
* clusters: Rename "last major merger" to "recent major merger"Aaron LI2017-07-222-26/+25
| | | | Signed-off-by: Aaron LI <aly@aaronly.me>
* clusters/halo.py: update parameters and methodsAaron LI2017-07-221-46/+119
| | | | | | Still WIP... Signed-off-by: Aaron LI <aly@aaronly.me>
* configs: Update cosmology parameters (Komatsu et al. 2011)Aaron LI2017-07-221-1/+2
| | | | | | References: Komatsu et al. 2011, ApJS, 192, 18; Tab.(1) Signed-off-by: Aaron LI <aly@aaronly.me>
* clusters/halo.py: More cleanups with minor updatesAaron LI2017-07-222-70/+98
| | | | Signed-off-by: Aaron LI <aly@aaronly.me>
* clusters/halo.py: Significant cleanupsAaron LI2017-07-221-551/+2
| | | | | | | Several methods/functions have been migrated into "helper.py", while other methods/functions are obsolete. Signed-off-by: Aaron LI <aly@aaronly.me>
* clusters/solver.py: Improve documents and clean upAaron LI2017-07-221-14/+49
| | | | | | | | TODO: adaptively determine the proper time step instead of using a constant one. Signed-off-by: Aaron LI <aly@aaronly.me>
* clusters: Use "GalaxyClusters" from main.pyAaron LI2017-07-221-2/+2
| | | | | | The "clusters.py" is deprecated and will be deleted later. Signed-off-by: Aaron LI <aly@aaronly.me>
* clusters/helper.py: Add "velocity_impact()" and "time_crossing()"Aaron LI2017-07-221-3/+71
| | | | Signed-off-by: Aaron LI <aly@aaronly.me>
* clusters/main.py: Add property "halo_configs"Aaron LI2017-07-222-28/+44
| | | | | | And update the config specification accordingly with some cleanups. Signed-off-by: Aaron LI <aly@aaronly.me>
* utils/cosmology.py: Add property "baryon_fraction"Aaron LI2017-07-211-0/+9
| | | | | | XXX: assumed to be independent of redshifts! Signed-off-by: Aaron LI <aly@aaronly.me>
* clusters/main.py: Add "_magnetic_field()" methodAaron LI2017-07-212-8/+40
| | | | | | Also update the configurations Signed-off-by: Aaron LI <aly@aaronly.me>
* Add clusters/helper.pyAaron LI2017-07-211-0/+158
| | | | Signed-off-by: Aaron LI <aly@aaronly.me>
* Use the global "cosmo" instance for simplificationAaron LI2017-07-214-53/+34
| | | | Signed-off-by: Aaron LI <aly@aaronly.me>
* Fix parameter names about cosmologyAaron LI2017-07-212-4/+4
| | | | Signed-off-by: Aaron LI <aly@aaronly.me>
* bin/fg21sim: Setup cosmology model at the beginningAaron LI2017-07-211-1/+1
| | | | | | | | * Update copyright * Add a help on "DEBUG_FG21SIM" * Also fix a bug in cosmology setup() Signed-off-by: Aaron LI <aly@aaronly.me>