aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* utils/grid.py: Use own-implemented JIT-optimized "rotate_center()"Aaron LI2016-10-263-5/+3
| | | | Also remove the dependence on "scipy".
* Add utils/rotate.py: Implement basic image rotationAaron LI2016-10-261-0/+131
| | | | | | | | | The "rotate_center()" function rotates a gray-scale image by a given angle about its center, using the area mapping method or simple nearest neighbor. This function is `numba` JIT-optimized, and can replace the `scipy.ndimage.rotate()` function.
* draw.py: Remove the unused "circle()" functionAaron LI2016-10-251-42/+0
|
* draw.py: Optimize "ellipse()" using numba JITAaron LI2016-10-251-17/+27
| | | | | | | | | | NOTE: However, there are two significant problems: * Cannot figure out why ``nb.optional(nb.types.UniTuple(nb.int64, 2))`` does NOT work. Therefore, make ``shape`` as mandatory parameter instead of optional. * Cannot figure out multi-dispatch that allows both int and float types for ``r``, ``c``, ``r_radius`` and ``c_radius``. Thus only support the int type for the moment.
* draw.py: Optimize "_ellipse_in_shape()" using JITAaron LI2016-10-251-3/+20
|
* grid.py: Override "make_coordinate_grid()" using JIT-optimized versionAaron LI2016-10-251-46/+2
| | | | | Remove the original "make_coordinate_grid()" function, and rename the "make_coordinate_grid_fast()" to override the former one.
* grid.py: Change "make_coordinate_grid_fast()" parametersAaron LI2016-10-251-11/+16
| | | | | Change the parameters of "make_coordinate_grid_fast()", make it share the same parameter list as "make_coordinate_grid()".
* grid.py: Optimize "map_grid_to_healpix()" using "numba.jit"Aaron LI2016-10-251-11/+19
| | | | | There are some limitations with the numba JIT, which are commented in the code.
* healpix.py: Change all "indices" to "indexes"Aaron LI2016-10-252-19/+19
| | | | Also fix a wrong notation in "random.py"
* healpix.py: Implement "ang2pix_ring" and "pix2ang_ring" with JITAaron LI2016-10-251-0/+213
| | | | | | | | | | To optimize "map_grid_to_healpix()" in `grid.py` which uses "healpy.ang2pix()" using `numba.jit`, implement the latter's functionality explicitly with `numba.jit` support. The implementation simply mimic the corresponding functions "ang2pix_ring_z_phi()" and "pix2ang_ring_z_phi()" in HEALPix's "src/C/subs/chealpix.c". Thanks!
* healpix.py: Optimize "_calc_hpx_indicies()" and "_calc_hpx_row_idx()"_Aaron LI2016-10-251-60/+68
| | | | | Also place "_calc_hpx_row_idx()" before "_calc_hpx_indicies()", which is required by `numba`.
* extragalactic/clusters.py: Speed up "calc_Tb()" significantlyAaron LI2016-10-251-10/+16
| | | | | | | | | Avoid using "astropy.units" in "calc_Tb()", which significantly speeds up this method. NOTE: whether the distance given by the simulation needs additional conversion to derive the *luminosity distance* ??
* utils/grid.py: Add optimized "make_coordinate_grid_fast()"Aaron LI2016-10-251-4/+56
| | | | | | | | Optimize "make_coordinate_grid()" using "numba.jit", which improves the speed a bit, since the other two functions (i.e., "make_grid_ellipse()", and "map_grid_to_healpix()") are much slow and time-consuming. TODO: optimize "make_grid_ellipse()" and "map_grid_to_healpix()"
* extragalactic/clusters.py: Use "Fnu_to_Tb_fast()"Aaron LI2016-10-241-13/+15
|
* convert.py: Optimize "Fnu_to_Tb()" and "Sb_to_Tb()"Aaron LI2016-10-243-0/+67
| | | | | | | | | * Optimize the "Fnu_to_Tb()" and "Sb_to_Tb()" functions by explicitly calculating the conversions, avoiding the slow `astropy.unit` conversions (which is rather slow). The new fast functions are named as "Fnu_to_Tb_fast()" and "Sb_to_Tb_fast()". * Optimize the new functions using `numba.jit` further. * Add `numba` to the dependencies.
* extragalactic/clusters.py: Fix multiple bugs (Test OK)Aaron LI2016-10-221-10/+45
| | | | | | * Fix several bugs, e.g., typo, wrong quantity operation, etc. * Add new method "_calc_specindex()", also allow further improvement * Improve docstrings, comments, and log messages.
* foregrounds.py: Add new component extragalactic/clustersAaron LI2016-10-221-3/+5
|
* Support new simulation component: extragalactic/clustersAaron LI2016-10-223-0/+695
| | | | | | | | | | | Support simulate the radio emission from clusters of galaxies. Currently only the radio halos is considered, while the radio relics need more investigations. Also, this simulation requires a cluster catalog derived from the Hubble Volume Project simulation. NOTE: not tested at the moment
* Add utils/random.py: Custom random utilitiesAaron LI2016-10-221-0/+51
| | | | | Currently implement "spherical_uniform()" to generate random points uniformly distributed on the spherical surface.
* galactic/snr.py: Fix wrong astropy quantity operationAaron LI2016-10-221-1/+1
| | | | | | | When two quantities of same unit class divides, to get the correct numerical value, whether use `.decompose().value`, or just convert to plain Python object, e.g., `float(...)`, which will fail if the input quantity is not dimensionless.
* galactic/snr.py: Add one reference and update docstringAaron LI2016-10-221-5/+12
|
* configs/10-galactic.conf.spec: Fix/update the descriptionAaron LI2016-10-221-4/+12
|
* bin/fg21sim-download-cluster-data: Add catalog descriptionAaron LI2016-10-211-0/+37
|
* Install the new bin/fg21sim-download-cluster-dataAaron LI2016-10-201-0/+1
|
* Add bin/fg21sim-download-cluster-dataAaron LI2016-10-201-0/+131
| | | | | This script retrieves the galaxy cluster catalog data simulated by the Hubble Volume Project, and organizes the data to a CSV file.
* configs/manager.py: Update docstring and commentAaron LI2016-10-191-3/+9
|
* foregrounds.py: Fix the too-long FITS keyword with commentAaron LI2016-10-181-2/+3
|
* configs: Remove the unused config "ordering"Aaron LI2016-10-181-3/+1
| | | | All HEALPix maps used are in *RING* ordering.
* galactic/{freefree,synchrotron}.py: Fix small bugsAaron LI2016-10-182-2/+2
| | | | | * freefree.py: Add the missing "/" to the config "halphamap" * synchrotron.py: Fix "comp" to have the correct value
* foregrounds.py: Fix two small bugs and test is OKAaron LI2016-10-181-4/+5
| | | | | | * Fix the wrong import path * Add the missing "output_dir" property * Tweak the comments/messages a bit
* bin/fg21sim: Rewrite to use the interface from foreground.pyAaron LI2016-10-181-44/+5
| | | | | This greatly simplifies the "bin/fg21sim" script, and also makes the script more generic.
* Add "foregrounds.py" as the interface to foregrounds simulationAaron LI2016-10-182-3/+205
| | | | | This module provides a simple/easy-to-use interface to the simulation of various supported foreground components.
* galactic/synchrotron.py: Add preocess(), postprocess, _make_filepath()Aaron LI2016-10-181-41/+75
| | | | | | * Add the "preprocess()" and "postprocess()" for a better interface; * Add "_make_filepath()" to compose the output filename; * Reorder some methods for consistency.
* galactic/freefree.py: Add preocess(), postprocess, _make_filepath()Aaron LI2016-10-181-52/+90
| | | | | | | * Add the "preprocess()" and "postprocess()" for a better interface; * Add "_make_filepath()" to compose the output filename; * Reorder some methods for consistency; * Some refactorings and cleanups.
* galctic/snr.py: Add "preprocess()" and "postprocess()" methodsAaron LI2016-10-181-70/+86
| | | | | | | * Add "preprocess()" and "postprocess()" methods * Add the "name" property * Tweak the places of preparation procedures been invoked * Reorder some methods
* galactic/snr.py: Fix the existence check of dir of catalog ouputAaron LI2016-10-171-1/+1
|
* galactic: Move the "simulate()" method; Add "UNIT" keywordAaron LI2016-10-172-26/+28
|
* galactic/snr.py: Create dir if necessary and adhere clobber configAaron LI2016-10-171-0/+11
|
* galactic/snr.py: Fix various issues, and works almost OK.Aaron LI2016-10-171-7/+22
| | | | Barely test and seems OK.
* bin/fg21sim: Add one debug before logging availableAaron LI2016-10-171-0/+3
|
* configs/manager.py: Fix the bug that breaks specifications loadingAaron LI2016-10-171-1/+4
| | | | | | | The "filter()" returns an iterator, that is consumed after the use, therefore, the "specfiles" is used by the print under "DEBUG_FG21SIM". Then "specfiles" is empty and thus prevents the reading of the specification files.
* configs/validate.py: Add "check_galactic_snr()" for "galactic/snr"Aaron LI2016-10-171-0/+16
|
* bin/fg21sim: Support new component "galactic/snr"Aaron LI2016-10-172-1/+15
| | | | Also update the general config for the new "galactic/snr" component.
* galactic/snr.py: Implemented missing but necessary functionalitiesAaron LI2016-10-172-26/+165
| | | | | | | | The necessary but missing functionalities to simulate the Galactic SNRs emission maps are implemented, and this new emission component is ready for testing. Also fix a typo in "utils/grid.py".
* utils/grid.py: Implement "map_grid_to_healpix()"Aaron LI2016-10-171-9/+29
| | | | | | | | The "map_grid_to_healpix()" maps the generated coordinate grid to a HEALPix map. Note that only effective HEALPix pixels are returned instead of a full HEALPix map. TODO: Try to avoid the explicit for loop to optimize the speed.
* Add utils/grid.py: Make coordinate grids for SNRsAaron LI2016-10-171-0/+157
| | | | | | | * make_coordinate_grid(): Make a Cartesian coordinate grid according to the specified center coordinate, size and grid resolution. * make_grid_ellipse(): Also generate an (rotated) ellipse and place into the coordinate grid.
* galactic: Add new component "galactic/snr": supernova remnantsAaron LI2016-10-172-0/+256
| | | | NOTE: very preliminary, and missing many necessary functions!
* configs: Add new section "[galactic][snr]" for SNRs simulationAaron LI2016-10-171-1/+19
| | | | NOTE: very preliminary and may change at any time!
* Force "DEBUG" log level if env variable "DEBUG_FG21SIM" setAaron LI2016-10-172-2/+10
|
* utils/logging.py: Small updates to the docstrings and commentsAaron LI2016-10-171-14/+16
|