aboutsummaryrefslogtreecommitdiffstats
path: root/fg21sim/utils
Commit message (Collapse)AuthorAgeFilesLines
* utils/healpix: Minor cleanupsAaron LI2019-01-291-22/+36
|
* Use UTC time instead of local timeAaron LI2019-01-292-18/+13
|
* utils/analyze: Add logfit()Aaron LI2019-01-281-2/+27
| | | | This function helps fit the index of a scaling relation.
* cosmology: Update virial overdensity calculationAaron LI2019-01-171-10/+16
| | | | | | References: * https://en.wikipedia.org/wiki/Virial_mass * http://adsabs.harvard.edu/abs/1998ApJ...495...80B
* PEP8 fixAaron LI2018-10-311-2/+2
|
* utils/units: Add J2erg and erg2JAaron LI2018-10-261-0/+2
|
* clusters: Fix cluster distribution calculation about massAaron LI2018-05-121-3/+2
|
* Numba: disable/restrict JIT usage -> TODO: CythonAaron LI2018-02-031-2/+4
|
* Numba: disable/restrict the Numba JIT usage; needs refactor -> Cython ...Aaron LI2018-02-022-24/+27
|
* utils/convert.py: Add flux_to_power() to calculate power from flux densityAaron LI2018-02-011-1/+34
|
* Deprecate np.int, np.floatAaron LI2017-11-031-3/+3
| | | | See: https://github.com/numpy/numpy/pull/6103
* utils/grid.py: Disable Numba JIT for make_ellipse() & make_grid_ellipse()Aaron LI2017-10-261-8/+0
|
* utils/transform/circle2ellipse: skip rotation if it's NoneAaron LI2017-10-231-4/+5
|
* clusters/halo: Add function "speed_sound()"Aaron LI2017-10-211-0/+3
| | | | Also add "gamma" the adiabatic index of ideal gas to utils/units.py
* utils/units.py: add "rad2arcmin" and some cleanup/simplificationsAaron LI2017-10-181-16/+20
|
* utils/analyze.py: countdist_integrated(): Add xmin and xmax param.Aaron LI2017-10-181-2/+15
|
* clusters: Use "hmf" to calculate halo mass functions/distributionsAaron LI2017-10-041-0/+46
| | | | | | | | | | | | * New dependency "hmf" (halo mass functions) module * Calculate halo mass distributions/functions (dndlnm) with respect to masses and redshifts, instead of use the previous data file ("ps_data") * New section "[extragalactic][psformalism]" in configurations * New functions to write and read the dndlnm data TODO: * update the method to sample (mass, redshift) for clusters from the dndlnm data
* utils/cosmology.py: Add parameter Tcmb0 [K]Aaron LI2017-10-041-4/+9
|
* utils/units.py: Add "K2eV" and "K2keV"Aaron LI2017-10-041-0/+2
|
* utils/cosmology: Add scalar spectral index "ns"Aaron LI2017-10-041-4/+6
|
* utils/cosmology.py: Add methods Dc() and Dc_to_redshift()Aaron LI2017-10-021-0/+48
| | | | | | * Dc(): simple wrapper on astropy cosmology's comoving_distance() * Dc_to_redshift(): determine the redshift w.r.t. the input comoving distances using interpolation.
* utils/units.py: Add eV and keV to temperature conversionsAaron LI2017-09-261-0/+3
|
* utils/io.py: Add function "csv_to_dataframe()" to support CSV commentsAaron LI2017-09-031-2/+35
|
* utils/convert.py: Remove the slow, astropy.units based functionsAaron LI2017-09-011-64/+24
|
* utils/draw.py: Replace "ellipse()" with the `skiimage' versionAaron LI2017-08-311-27/+96
| | | | | | | Also do not use Numba JIT here. Credit: scikit-image - skimage/draw/draw.py https://github.com/scikit-image/scikit-image/blob/master/skimage/draw/draw.py
* utils: Add analyze.py with function "countsdist_integrate()"Aaron LI2017-08-301-0/+66
|
* clusters/psformalism: Remove config "f_darkmatter"Aaron LI2017-08-291-0/+10
| | | | Use "1 - baryon_fraction = 1 - Ob0/Om0" to replace "f_darkmatter".
* convert.py: do not use Numba JITAaron LI2017-08-291-14/+8
|
* Fix the warning on scipy.ndimage.zoom output shape calculationAaron LI2017-08-141-1/+4
| | | | | | | | | scipy.ndimage.zoom calculate the output/zoomed image shape with round(), while the old versions use int() instead. When the two calculations are different, a warning is raised. This commit fixes the calculation mismatch. Signed-off-by: Aaron LI <aly@aaronly.me>
* utils/convert.py: Add function "JyPerPix_to_K()"Aaron LI2017-08-131-0/+17
| | | | Signed-off-by: Aaron LI <aly@aaronly.me>
* utils/io.py: Default float32=False to preserve the data typeAaron LI2017-08-131-4/+4
| | | | Signed-off-by: Aaron LI <aly@aaronly.me>
* utils/io.py: Add "float32" param and update "write_fits_healpix()"Aaron LI2017-08-131-15/+30
| | | | Signed-off-by: Aaron LI <aly@aaronly.me>
* utils/io.py: Fix a dtype bug; Improve comments and FITS headerAaron LI2017-08-131-3/+26
| | | | | | Fix the dtype bug in "write_fits_image()" function. Signed-off-by: Aaron LI <aly@aaronly.me>
* utils: Merge fits.py into io.pyAaron LI2017-08-133-155/+143
| | | | | | Functions "{read,write}_fits_healpix()" merged into io.py Signed-off-by: Aaron LI <aly@aaronly.me>
* utils/io.py: Implement new function "write_fits_image()"Aaron LI2017-08-131-0/+37
|
* utils/io.py: Improve documentationsAaron LI2017-08-131-1/+19
|
* utils/transform.py: Update comment and minor cleanupsAaron LI2017-08-121-5/+3
| | | | Signed-off-by: Aaron LI <aly@aaronly.me>
* Fix a bug in clusters/halo.py; Add a comment to utils/io/_create_dir()Aaron LI2017-08-061-0/+4
| | | | Signed-off-by: Aaron LI <aly@aaronly.me>
* utils/convert.py: omega unit default to [arcsec^2], other improvementsAaron LI2017-08-031-10/+11
| | | | Signed-off-by: Aaron LI <aly@aaronly.me>
* utils/convert.py: Improve various comments/descriptionsAaron LI2017-08-031-23/+33
| | | | Signed-off-by: Aaron LI <aly@aaronly.me>
* utils/convert.py: Improve unit check and conversionAaron LI2017-08-031-2/+2
| | | | Signed-off-by: Aaron LI <aly@aaronly.me>
* utils: Add ds.py with function "dictlist_to_dataframe()"Aaron LI2017-08-031-0/+82
| | | | | | | This function convert a list of dictionaries created by e.g., GalaxyClusters._simulate_halos() to be a Pandas DataFrame. Signed-off-by: Aaron LI <aly@aaronly.me>
* utils/io.py: Fix issue in "_create_dir()" with empty directory pathAaron LI2017-08-011-1/+3
| | | | Signed-off-by: Aaron LI <aly@aaronly.me>
* Improve logging messagesAaron LI2017-08-011-1/+5
| | | | Signed-off-by: Aaron LI <aly@aaronly.me>
* utils: Add profile.py to diagnose memory usageAaron LI2017-08-011-0/+97
| | | | Signed-off-by: Aaron LI <aly@aaronly.me>
* utils/io.py: Add functions "pickle_dump()" and "pickle_load()"Aaron LI2017-08-011-0/+31
|
* utils/io.py: Split out "_create_dir()" and "_check_existence()"Aaron LI2017-08-011-12/+31
|
* utils/cosmology.py: Add "dVc()": differential comoving volumeAaron LI2017-07-311-0/+8
| | | | Signed-off-by: Aaron LI <aly@aaronly.me>
* utils: Add interpolate.py with "bilinear()" functionAaron LI2017-07-311-0/+42
| | | | Signed-off-by: Aaron LI <aly@aaronly.me>
* cosmology: Avoid the circular importing issueAaron LI2017-07-312-7/+1
| | | | Signed-off-by: Aaron LI <aly@aaronly.me>