| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
|
| |
Remove the original "make_coordinate_grid()" function, and rename the
"make_coordinate_grid_fast()" to override the former one.
|
|
|
|
|
| |
Change the parameters of "make_coordinate_grid_fast()", make it share
the same parameter list as "make_coordinate_grid()".
|
|
|
|
|
| |
There are some limitations with the numba JIT, which are commented in
the code.
|
|
|
|
| |
Also fix a wrong notation in "random.py"
|
|
|
|
|
|
|
|
|
|
| |
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!
|
|
|
|
|
| |
Also place "_calc_hpx_row_idx()" before "_calc_hpx_indicies()", which is
required by `numba`.
|
|
|
|
|
|
|
|
|
| |
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* ??
|
|
|
|
|
|
|
|
| |
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()"
|
| |
|
|
|
|
|
|
|
|
|
| |
* 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.
|
|
|
|
|
|
| |
* 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.
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
| |
Currently implement "spherical_uniform()" to generate random points
uniformly distributed on the spherical surface.
|
|
|
|
|
|
|
| |
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.
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
All HEALPix maps used are in *RING* ordering.
|
|
|
|
|
| |
* freefree.py: Add the missing "/" to the config "halphamap"
* synchrotron.py: Fix "comp" to have the correct value
|
|
|
|
|
|
| |
* Fix the wrong import path
* Add the missing "output_dir" property
* Tweak the comments/messages a bit
|
|
|
|
|
| |
This module provides a simple/easy-to-use interface to the simulation of
various supported foreground components.
|
|
|
|
|
|
| |
* Add the "preprocess()" and "postprocess()" for a better interface;
* Add "_make_filepath()" to compose the output filename;
* Reorder some methods for consistency.
|
|
|
|
|
|
|
| |
* 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.
|
|
|
|
|
|
|
| |
* Add "preprocess()" and "postprocess()" methods
* Add the "name" property
* Tweak the places of preparation procedures been invoked
* Reorder some methods
|
| |
|
| |
|
| |
|
|
|
|
| |
Barely test and seems OK.
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
| |
Also update the general config for the new "galactic/snr" component.
|
|
|
|
|
|
|
|
| |
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".
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
| |
* 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.
|
|
|
|
| |
NOTE: very preliminary, and missing many necessary functions!
|
|
|
|
| |
NOTE: very preliminary and may change at any time!
|
| |
|
| |
|
|
|
|
|
|
|
|
| |
Change the "__init__()" method to load the user configurations (i.e., by
invoke the "read_userconfig()" method) instead of loading extra general
configurations.
Method "getn()": also check the validity for the parameter "sep".
|
|
|
|
| |
No functional changes.
|
| |
|
| |
|
| |
|
|
|
|
|
|
| |
* Return None if specified config is None or not exist
* Raise ValueError if specified config is non-string
* Update comments
|
| |
|
|
|
|
|
|
|
|
|
| |
These functions will be used to draw the image of a SNR or a radio halo.
These functions are copied from the `scikit-image` project.
Thanks!
scikit-image: http://scikit-image.org/docs/dev/api/skimage.draw.html
|
|
|
|
|
|
|
|
|
| |
After this switch to `pkg_resources`, this package can also be installed
as an EGG (a zip archive), which is more generic.
References:
* http://setuptools.readthedocs.io/en/latest/pkg_resources.html#basic-resource-access
* http://setuptools.readthedocs.io/en/latest/setuptools.html#including-data-files
|
|
|
|
|
|
| |
Thanks D. A. Green for the Galactic SNRs catalog (294 objects)!
http://www.mrao.cam.ac.uk/surveys/snrs/
|