aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* webui: websocket.py: Fix wrong exception handlingAaron LI2016-11-041-19/+17
|
* bin: Update "log_stream" and "loglevel" handlingAaron LI2016-11-042-8/+5
| | | | | | * bin/fg21sim: Simplify the "log_stream" assignment * bin/fg21sim-webui: Also enable debug logging when turning on debug flag for the tornado; also update the docstring a little.
* webui: Update server & client sides WebSocket handlersAaron LI2016-11-042-24/+104
| | | | | | | | | | | | * Server side: + Update the "on_message()" method to support 3 types of message requests (i.e., "configs", "console", and "results"); + Add messages stub handlers: "_handle_{configs,console,results}()"; + Reorder the methods + Client side: + Change timeout before reconnection to 3000 ms; + Parse the received JSON message to JS object;
* configs/manager.py: Add method "check_all()" using "check_configs()"Aaron LI2016-11-041-0/+31
|
* Update to use renamed "check_configs()" instead of "validate_configs()"Aaron LI2016-11-042-3/+3
|
* configs: Rename "validate.py" and update "validate_configs()"Aaron LI2016-11-041-24/+36
| | | | | | | | * Rename "validate.py" to "checkers.py", to avoid the confusion with the "validate" module from "configobj"; * Rename function "validate_configs()" to "check_configs()"; * "check_configs()": add optional parameter "raise_exception"; * "check_configs()": update to return both the result and errors dict.
* configs/manager.py: Implement "setn()" to set an option valueAaron LI2016-11-041-6/+86
| | | | | | | | | | | The "setn()" method is a corresponding operation with the "getn()", which set the value of a config option to the given value. This function will be used in the Web UI to interact with the WebSocket communications. Also add the "merge()" method which simply merge the input configurations without any validation.
* configs/manager.py: getn(): remove par. "sep"; handle exceptionAaron LI2016-11-031-12/+16
| | | | | | | | * Remove the optional parameter "sep", therefore the key must be "/"-separated or a list of keys. * Add exception handling and raise "KeyError" if the input key is invalid (i.e., specifies a non-exist option). * Update comments and docstring.
* configs/manager.py: Reset before loading user config file againAaron LI2016-11-031-12/+10
| | | | | | | | Originally, the user configuration file is only allowed to load once, and prevent any future loading of user configuration file. This change allows load user configuration file again by resetting the current configurations to defaults before loading.
* webui: Add a manual reconnection button to the header bannerAaron LI2016-11-033-6/+60
| | | | | Also add a global variable "ws_reconnect" to control the timeout between reconnection and the maximum reconnection times (default: 100).
* webui: Add "utils.py" to get the IP addressAaron LI2016-11-032-11/+85
| | | | | | | FIXME/TODO: How to determine the WebSocket origin is in the same subnet as the server? An additional network mask required to determine this. How does this additional mask passed?
* configs/manager.py: Add method "reset()" and attribute "userconfig"Aaron LI2016-11-031-1/+16
|
* webui: Rewrite "websocket.py" with "FG21simWSHandler"Aaron LI2016-11-022-12/+88
| | | | | | NOTE: This "FG21simWSHandler" is still very preliminary, and there are a lot of necessary functions need to be implemented.
* configs/manager.py: Keep a copy of default configs; Add "dump()"Aaron LI2016-11-021-5/+42
| | | | | | | | * Keep a copy of the default configurations from the specifications * Add "dump()" method to dump the configurations (as well as the default configurations) as plain Python dictionary * Add new parameter "from_default" to methods "get()" and "getn()" to allow get the config value from the default configurations
* webui: Rewrite and reconnect to WebSocket when closedAaron LI2016-11-021-32/+97
|
* webui: Add preliminary WebSocket support to front-end UIAaron LI2016-11-024-0/+65
| | | | | Add a label to the header banner to show the WebSocket support status and connection status.
* webui: Add FA icons for sections/headers; Adjust header stylesAaron LI2016-11-025-24/+22
|
* webui: fonts.css: Avoid space in font-family name; Some cleanupAaron LI2016-11-011-10/+11
|
* webui: font-awesome: Only keep the WOFF formatAaron LI2016-11-012-2/+1
|
* webui: milligram.css: Fix font-weight to use "bold" and "normal"Aaron LI2016-11-011-5/+5
|
* webui: fonts.css: Use semibold instead of bold for Source Sans ProAaron LI2016-11-011-8/+8
|
* webui: Update header and configs templatesAaron LI2016-11-012-6/+6
|
* webui: Update index template; Add console and results templatesAaron LI2016-11-013-10/+43
|
* webui: Add new style rules (Thanks Bootstrap!)Aaron LI2016-11-011-5/+125
|
* webui: Add the main CSS and JavaScriptAaron LI2016-11-012-0/+287
| | | | The js code still misses many necessary functions.
* webui: Add the index and configs templatesAaron LI2016-11-012-0/+489
|
* webui: Add header and footer templatesAaron LI2016-11-012-0/+42
|
* webui: Add favicon and logo (nyan ~~~)Aaron LI2016-11-013-0/+151
|
* webui: Add fonts.css (Source Sans Pro & Source Code Pro)Aaron LI2016-11-011-0/+63
|
* Serve jQuery locally (use jqyeru-3.1.1.js)Aaron LI2016-11-012-1/+10222
|
* webui: Rearrange structures of the base templateAaron LI2016-10-311-4/+14
|
* webui: Add the base templateAaron LI2016-10-301-0/+37
| | | | Tornado template: http://www.tornadoweb.org/en/stable/guide/templates.html
* webui: Import Milligram v1.1.0Aaron LI2016-10-301-0/+628
| | | | | Milligram is a minimalist CSS framework (only CSS). https://milligram.github.io/
* webui: Import normalize.css v5.0.0Aaron LI2016-10-301-0/+461
| | | | normalize.css: https://github.com/necolas/normalize.css
* webui: Import FontAwesome v4.7.0Aaron LI2016-10-303-0/+2337
| | | | FontAwesome: http://fontawesome.io/
* webui: Add "bin/fg21sim-webui" to start the UI serverAaron LI2016-10-302-0/+52
|
* webui: Build the Web UI using Tornado with WebSocketAaron LI2016-10-305-0/+70
| | | | Tornado: http://www.tornadoweb.org/
* utils/__init__.py: Only import "setup_logging" from "logging.py"Aaron LI2016-10-299-11/+13
| | | | | | | | | | Since some modules (e.g., healpix.py) under "utils" involves Numba JIT optimization, which significantly slows the start-up speed, even some consumers (e.g., bin/fg21sim-webui) do not need them at all. Fix various import statements of other modules. NOTE: not test at the moment!
* Makefile: Use the built-in "venv" module available at Python >=3.3Aaron LI2016-10-291-1/+1
|
* setup.py: Add "zip_safe=False" to avoid installing as a zipped eggAaron LI2016-10-291-0/+5
| | | | | | | | The upcoming Web UI based on Tornado needs direct access to the templates/pages and static files, therefore avoid installing the package as a zipped egg. Also add a reference on "steuptools".
* utils/random.py: Add a note on conversion to (longitude, latitude)Aaron LI2016-10-281-0/+5
|
* utils/rotate.py: Add a new ref. which may help further vectorizationAaron LI2016-10-281-0/+2
| | | | Investigate whether the vectorization will improve the speed.
* Add back "scipy" to dependencies as utils/reproject.py requiresAaron LI2016-10-282-0/+2
|
* extragalactic/pointsource (#3)Jason Ma2016-10-2712-0/+1881
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Merge PR#3: Add new simulation component "extragalactic/pointsources", including SF, SB, RQ, FRI and FRII. * extragalactic/pointsource: add point source simulation module * extracgalactic/pointsource: add point source simulation module * Add configurating spec to extragalgactic point sources. * Modified some variables * base.py: modified * flux.py: modified * fr1.py: modified * fr2.py: modified * pointsources.py: modified * psparams.py: modified * radioquiet.py: modified * starforming.py: modified * starbursting.py: modified * Rewritten the comments. * base.py: modified * flux.py: modified * fr1.py: modified * fr2.py: modified * Modified * psparams.py: modified * radioquiet.py: modified * starforming.py: modified * starbursting.py: modified * Modified * Modified * Modified * Modified * Modified * MOdified * Modified * Modified * Modified * Modified * Modified * Modified * Modified * Modified * Modified * Changed pointsource to pointsources * Fixed some config keywords * Fixed some config keywords * Fixed some config keywords * Fixed some config keywords * Fixed some config keywords * Fixed some config keywords * Fixed some config keywords * base.py:rewrited * fr1.py:rewritten * pointsources.py: rewritten * radioquiet.py: rewritten * Rewritten * Rewritten * base.py: modified * fr1.py: modified * fr2.py: modified * radioquiet.py: modified * starbursting.py: modified * starforming.py: modified * Fix conflicts * fg21sim: fixed conflicts * base.py: modified frequencies loading in _get_configs() * Rewritten as forground.py * fg21sim: fixed conflicts * base.py: deteled loading for frequencies configurations. * fr1.py: modified * fr2.py: modified * pointsources.py: modified * radioquiet.py: modified * starbursting.py: modified * starforming.py: modified * Add new methods to calculate Tb. * Add new methods to calculate Tb. * Add new methods to calculate Tb. * Add new methods to calculate Tb. * Add new methods to calculate Tb. * Add new methods to calculate Tb. * Deleted useless comments. * Add pscomps to deal with multi-type PS problem. * Add a new key. * Fixed permission to 755. * Rejusted PS subsections. * Add methods to calcualte luminosity function and redshift distribution. * Rejusted generation of samples redshift and luminosity. * Fixed mistakes on FRII structure, added hotspots and offsets. * Reajusted generation of samples redshift and luminosity. * Readujsted generation of samples radii, redshifts and luminosity. * Readujsted generation of samples radii, redshifts and luminosity. * Fixed conflicts. * Fixed conficts. * Combined configurations of pointsources. * Removed the older extragalactic configuration file. * Fixed some mistakes. * Fixed mistakes of drawing PS. * Fixed mistakes of drawing PS. * Fixed code style by pep8 checking. * Fixed code style by pep8 checking. * Fixed code style by pep8 checking. * Fixed some coding style. * Reconfigured default redshift interval. * Reconfigured default redshift interval. * Reconfigured default redshift interval. * Fixed mistakes in method calc_single_Tb and changed resolution of grid. * Fixed mistakes in method calc_single_Tb and changed resolution of grid. * Deleted astropy.units style code to accelerate. * Deleted astropy.units style code to accelerate. * Deleted astropy.units style code to accelerate. * Deleted astropy.units style code to accelerate. * Deleted astropy.units style code to accelerate. * Deleted astropy.units style code to accelerate. * Deleted astropy.units style code to accelerate. * Fixed some mistakes. * Fixed some mistakes. * Changed dA from au.Mpc to float64. * Fixed some mistakes. * Fixed some mistakes. * Fixed some mistakes. * Reajusted grid resolution to generate discs. * Reajusted grid resolution to generate discs. * Reajusted loading strategy of parameter resolution. * Reajusted code style of configuration loading. * Reajusted code style of configuration loading. * Reajusted code style of configuration loading. * Reajusted code style of configuration loading. * Reajusted code style of configuration loading.
* bin/fg21sim: Update the import pathAaron LI2016-10-271-1/+1
|
* fg21sim/__init__.py: Do not import from ".foregrounds"Aaron LI2016-10-271-2/+0
| | | | | | | Import from ".foregrounds" involves a lot of imports of other components, which cause a lot of numba JIT compilations. Therefore, the simple "import fg21sim" causes a long lag for running the scripts, e.g., bin/healpix2hpx.
* Update to use the new "checksum" config optionAaron LI2016-10-274-4/+12
| | | | | Also add a warning log message for "galactic/snr.py" and "extragalactic/clusters.py".
* utils/fits.py: Add parameter "checksum" for write_fits_healpix()Aaron LI2016-10-271-8/+13
| | | | Also update the docstring and one comment.
* configs/00-general.conf.spec: Add new option "checksum"Aaron LI2016-10-271-0/+6
|
* Check the output file existence firstAaron LI2016-10-273-5/+24
|