aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* galactic/freefree: Mask regions where absorption is uncertainAaron LI2016-10-111-4/+25
| | | | | | | | | | | | | | * Mask the regions where the dust absorption is too high to well determine the true Halpha absorption. There are regions (e.g., Galactic plane) have too large dust absorption which cause float overflow when applying absorption correction to the Halpha map. * Fix a bug on the wrong parameter passed to "_calc_ratio_a()" method in "_simulate_frequency()" * Move "_correct_dust_absorption()" invokation from "simulate()" to "_simulate_frequency()" Already tested and OK!
* utils: healpix2hpx & hpx2healpix: Remove "header" parameterAaron LI2016-10-111-35/+20
| | | | | | | | * healpix2hpx(), hpx2healpix(): Remove the "header" parameter, thus the "data" parameter can only be either the filename or a HDU; * healpix2hpx(): Remove the check on "ORDERING", since "read_fits_healpix()" always return the HEALPix data in RING ordering; * Small updates to the log messages and comments.
* utils: Update documentations, also fix stylesAaron LI2016-10-112-35/+53
|
* Update bin/fg21sim to support Galactic free-free componentAaron LI2016-10-112-4/+28
| | | | | | | | | * bin/fg21sim: check the "common/components" config to simulate the enabled components; * bin/fg21sim: add Galactic free-free component support; * galactic/freefree.py: fix missing attributes. NOTE: simulated free-free maps are WRONG!! Need check/debug!
* galactic: Add free-free component simulationAaron LI2016-10-113-0/+247
| | | | | | | * New class "galactic.FreeFree" to simulate free-free emission * Add new config section "galactic/freefree" NOTE: current untested
* galactic/synchrotron: Merge up/downgrade Nside to load methodAaron LI2016-10-111-45/+29
| | | | | | | * Merge the upgrade/downgrade resolution w.r.t Nside to the map loading methods; * Update the variable names; * Check the status of smallscales addition.
* configs: Note that input templates should be HEALPix full-sky mapsAaron LI2016-10-101-0/+4
|
* configs: Change default Nside to 1024Aaron LI2016-10-101-2/+2
|
* utils/healpix.py: log that HPX indices calculation may take a while.Aaron LI2016-10-101-0/+1
|
* utils: zea2heapix(): Set value NaN for missing pixelsAaron LI2016-10-101-5/+9
|
* utils: zea2healpix(): Implement inpainting missing pixelsAaron LI2016-10-102-3/+54
| | | | | | | The missing pixels in the reprojected HEALPix map are filled with the averages of their 8 neighboring pixels (excluding the NaN's if any). Also add the "--inpaint" argument to the executable script.
* utils: zea2healpix(): Average the duplicate pixelsAaron LI2016-10-101-2/+4
| | | | Also fix typos
* utils: zea2healpix() also return the mask arrayAaron LI2016-10-102-10/+18
| | | | | | | The mask array has values 0, 1, and 2, which indicate the different statuses of the reprojected HEALPix pixels. Also update the executable script to use the new return results.
* utils/reproject.py: Add more logging and some minor changesAaron LI2016-10-101-1/+22
|
* Add excutable script "bin/zea2healpix"Aaron LI2016-10-102-0/+89
| | | | | | | | The script takes the two ZEA-projected FITS images, reproject them to the full-sky HEALPix map in Galactic frame with RING ordering. TODO: * Add argument "--inpaint" after implement the inpainting function.
* utils/reproject.py: Implement zea2healpix()Aaron LI2016-10-102-0/+241
| | | | | | | | | | | | | | | | The "zea2healpix()" function reprojects the maps in ZEA (zenithal/azithumal equal area) projection to HEALPix data in Galactic frame with RING ordering. The other two helper functions "_image_to_healpix()" and "_convert_wcs()" are almost copied from the "reproject" project [1]. Thanks! TODO: * Add some more logging * Implement the "inpaint" argument to inpaint the HEALPix map if exists missing pixels [1] reproject: https://github.com/astrofrog/reproject
* utils: Preseve the dtype when read/write FITS filesAaron LI2016-10-104-24/+17
| | | | | | | | * utils/fits.py: hack the dtype to ignore the byteorder (FITS data use big endianness, e.g., dtype(">f4")) * utils/healpix.py: explicit convert the dtype and log the dtype * bin/healpix2hpx, bin/hpx2healpix: remove the --float argument * other minor fixes/updates
* Use newly added "read_fits_healpix()"Aaron LI2016-10-092-15/+8
| | | | Also remove a unused variable in "galactic/synchrotron.py"
* utils/fits.py: read_fits_healpix() also accept HDUAaron LI2016-10-091-4/+9
|
* utils: Add function "read_fits_healpix()"Aaron LI2016-10-092-1/+30
| | | | | | This function wraps on the `healpy.read_map()`, but reset the data array to its original dtype in FITS file, as well as return the FITS header in `astropy.io.fits.Header` object.
* utils/healpix.py: fix logging import; minor style fixesAaron LI2016-10-091-10/+5
|
* Update to use the "write_fits_healpix()" functionAaron LI2016-10-052-22/+7
|
* utils: Add "write_fits_healpix()" to replace "healpy.write_map()"Aaron LI2016-10-052-0/+101
| | | | | | NOTE: This "write_fits_healpix()" function only implements the most common case of the HEALPix FITS style.
* Integrate pytest for test support.Aaron LI2016-10-043-3/+29
| | | | | | Credits: * http://doc.pytest.org/en/latest/goodpractices.html * https://github.com/kennethreitz/requests/blob/master/setup.py
* Add bin/fg21sim and some updates to galactic/synchrotronAaron LI2016-10-044-4/+102
| | | | | | | | | | | | * Add new executable "bin/fg21sim" * galactic/synchrotron: update to use "configs.get_path()" * galactic/synchrotron: create output dir if not exists * galactic/synchrotron: add logging support * galactic/synchrotron: append FITS extension to filename * galactic/synchrotron: pass the basic test TODO: * "output()" needs fixes with the FITS header
* Makefile: Add --upgrade to pip3 and add a creditAaron LI2016-10-041-1/+3
|
* Sync requirements.txt with setup.pyAaron LI2016-10-041-2/+1
|
* Rewrite configs/validate.py to check whole config without breakAaron LI2016-10-041-23/+52
|
* Remove the "common/data_dir" config itemAaron LI2016-10-043-10/+4
|
* Fix wrong config syntax and minor changes to ConfigManagerAaron LI2016-10-042-12/+18
|
* configs/manager.py: Add logging supportAaron LI2016-10-041-2/+6
|
* configs/manager.py: Add method "get_path()"Aaron LI2016-10-041-0/+21
|
* configs/manager.py: Add method "read_userconfig()"Aaron LI2016-10-041-3/+35
| | | | | | | | This "read_userconfig()" method is specifically used to load the user configuration file, and record the absolute path of the configuration file, which allows the use of relative path to specify the input files (e.g., galactic/synchrotron/template) for simulation within the configurations.
* configs/validate.py: Explain these checkers differ to Validator'sAaron LI2016-10-041-1/+7
| | | | | | NOTE: these checker functions check on the whole configuration, and have no relation to the checker functions of the `Validator` class.
* configs/manager.py: Fix a bug that "_validate()" not workingAaron LI2016-10-041-1/+1
|
* configs/manager.py: Add "frequencies" propertyAaron LI2016-10-041-0/+16
| | | | | The "frequencies" property will return or calculate the frequency values of the simulation.
* Makefile: Add variable "VENV" to control virtualenvAaron LI2016-10-031-8/+18
| | | | | | | * The variable "VENV" (default: "venv") defines the virtualenv name and can be override by the environment. * Add "devbuild" target to menu. * Remove the "--user" argument to fix the pip install problem.
* bin/{healpix2hpx,hpx2healpix}: Use argparse choicesAaron LI2016-10-032-4/+6
|
* README.rst: Minor update to the descriptionAaron LI2016-10-031-2/+2
|
* Update the default config specifications.Aaron LI2016-10-032-6/+14
| | | | | | * Add new configs for the [frequency] section * Use "None" as the default value for some configs * Fix the syntax of "cosmology/OmegaM0"
* Add custom configuration checkers.Aaron LI2016-10-032-0/+95
| | | | | These additional checker functions validate the required configs whether provided by the user config file, as well as against necessary contexts.
* Arrange customs errors/exceptions in a moduleAaron LI2016-10-032-4/+12
|
* Update general configurations and synchrotron configsAaron LI2016-10-032-1/+12
|
* Add preliminary Galactic synchrotron simulation support.Aaron LI2016-10-031-0/+204
| | | | NOTE: untested
* utils/logging.py: Close handler before removingAaron LI2016-10-021-0/+3
|
* configs: Add sample config spec for galactic componentsAaron LI2016-10-021-0/+30
|
* configs: Add new sections to "00-general.conf.spec"Aaron LI2016-10-021-0/+66
| | | | | | | | These new sections added: * common * frequency * output * cosmology
* configs/manager.py: Add "getn()" method to get multi-level config valueAaron LI2016-10-021-0/+25
|
* configs/manager.py: Refactor "get()" method and remove "set()"Aaron LI2016-10-021-8/+1
|
* configs: Update comments for the logging configsAaron LI2016-10-021-2/+6
|