| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
|
|
|
| |
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.
|
|
|
|
| |
Also fix typos
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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/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
|
|
|
|
| |
Also remove a unused variable in "galactic/synchrotron.py"
|
| |
|
|
|
|
|
|
| |
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.
|
| |
|
| |
|
|
|
|
|
|
| |
NOTE:
This "write_fits_healpix()" function only implements the most common
case of the HEALPix FITS style.
|
|
|
|
|
|
|
|
|
|
|
|
| |
* 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
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
| |
NOTE:
these checker functions check on the whole configuration, and have no
relation to the checker functions of the `Validator` class.
|
| |
|
|
|
|
|
| |
The "frequencies" property will return or calculate the frequency
values of the simulation.
|
|
|
|
|
|
| |
* Add new configs for the [frequency] section
* Use "None" as the default value for some configs
* Fix the syntax of "cosmology/OmegaM0"
|
|
|
|
|
| |
These additional checker functions validate the required configs whether
provided by the user config file, as well as against necessary contexts.
|
| |
|
| |
|
|
|
|
| |
NOTE: untested
|
| |
|
| |
|
|
|
|
|
|
|
|
| |
These new sections added:
* common
* frequency
* output
* cosmology
|
| |
|
| |
|
| |
|
|
|
|
| |
Also unify the quote style.
|
|
|
|
| |
The NumPy docstring style is used.
|
| |
|
|
|
|
|
|
|
| |
By saving the existing formatter and setting for the new handlers, the
configured format styles are kept. Otherwise, the newly created
handlers does not have a formatter, thus the default format style gets
used.
|
|
|
|
| |
Also improve the comments.
|
|
|
|
|
| |
"logging.basicConfig()" does NOT accept parameter "filemode" if the
corresponding paramter "filename" NOT specified.
|
| |
|
|
|
|
| |
Also fix a bug about parameter "stream".
|
|
|
|
| |
Also fix a bug about "append_comment".
|
|
|
|
|
|
| |
This "setup_logging()" utility can setup the logging module with the
given configuration dict, and can also update the logging configs by
specify the additional parameters.
|
| |
|
| |
|
|
|
|
|
|
| |
Since we do not use string interpolation in configs, so disable this
feature, otherwise `MissingInterpolationOption` error happens due to the
"logging" configs which contains string formats.
|
| |
|
|
|
|
|
|
|
| |
This "logging" property get and perpare the configurations
for `logging.basicConfig()` use.
Needs testing.
|
|
|
|
|
|
|
|
| |
This is very basic at the moment, and needs many improvements.
Thanks: https://github.com/pazz/alot
TODO: Add config specifications with default values
|
| |
|