Skip to content

spectrum_browser

Dominic Ford edited this page Mar 8, 2019 · 6 revisions

The 4GP spectrum browser

4GP comes with a simple web-based tool for browsing the contents of spectrum libraries.

This is very handy as it lets you very quickly search for spectra, view graphs of their flux vs wavelength, and also export spectra as text files for use in other tools.

Installation

The tool is based on python / flask, which is a simple framework for hosting websites from within a short python script.

It requires some additional Javascript dependencies, which for simplicity we supply in a .tar.gz file. You can extract this as follows:

cd 4most-4gp/src/spectrumBrowser/static
tar xvfz vendor_code.tar.gz

Running the browser

Once you have all the dependencies installed, you can start the browser as follows:

python spectrumBrowser.py --library-path ../../../4most-4gp-scripts/workspace

Once you start the python script, Flask will then tell you what web address to point your web browser: the address is usually http://127.0.0.1:5000.

Clone this wiki locally