├── .github └── workflows │ └── svo_filters_workflow.yml ├── .gitignore ├── .rtd-environment.yml ├── LICENSE ├── MANIFEST.in ├── README.md ├── ci ├── install_conda.sh └── setup_conda_env.sh ├── docs ├── Makefile ├── _build │ ├── doctrees │ │ ├── README.doctree │ │ ├── environment.pickle │ │ ├── index.doctree │ │ └── svo.doctree │ └── html │ │ ├── .buildinfo │ │ ├── .nojekyll │ │ ├── _images │ │ ├── G141.png │ │ ├── H.png │ │ └── filtered.png │ │ ├── _modules │ │ ├── index.html │ │ ├── svo.html │ │ └── svo_filters │ │ │ └── svo.html │ │ ├── _sources │ │ ├── README.rst.txt │ │ ├── index.rst.txt │ │ └── svo.rst.txt │ │ ├── _static │ │ ├── ajax-loader.gif │ │ ├── alabaster.css │ │ ├── basic.css │ │ ├── comment-bright.png │ │ ├── comment-close.png │ │ ├── comment.png │ │ ├── css │ │ │ ├── badge_only.css │ │ │ └── theme.css │ │ ├── custom.css │ │ ├── doctools.js │ │ ├── documentation_options.js │ │ ├── down-pressed.png │ │ ├── down.png │ │ ├── file.png │ │ ├── fonts │ │ │ ├── Inconsolata-Bold.ttf │ │ │ ├── Inconsolata-Regular.ttf │ │ │ ├── Inconsolata.ttf │ │ │ ├── Lato-Bold.ttf │ │ │ ├── Lato-Regular.ttf │ │ │ ├── Lato │ │ │ │ ├── lato-bold.eot │ │ │ │ ├── lato-bold.ttf │ │ │ │ ├── lato-bold.woff │ │ │ │ ├── lato-bold.woff2 │ │ │ │ ├── lato-bolditalic.eot │ │ │ │ ├── lato-bolditalic.ttf │ │ │ │ ├── lato-bolditalic.woff │ │ │ │ ├── lato-bolditalic.woff2 │ │ │ │ ├── lato-italic.eot │ │ │ │ ├── lato-italic.ttf │ │ │ │ ├── lato-italic.woff │ │ │ │ ├── lato-italic.woff2 │ │ │ │ ├── lato-regular.eot │ │ │ │ ├── lato-regular.ttf │ │ │ │ ├── lato-regular.woff │ │ │ │ └── lato-regular.woff2 │ │ │ ├── RobotoSlab-Bold.ttf │ │ │ ├── RobotoSlab-Regular.ttf │ │ │ ├── RobotoSlab │ │ │ │ ├── roboto-slab-v7-bold.eot │ │ │ │ ├── roboto-slab-v7-bold.ttf │ │ │ │ ├── roboto-slab-v7-bold.woff │ │ │ │ ├── roboto-slab-v7-bold.woff2 │ │ │ │ ├── roboto-slab-v7-regular.eot │ │ │ │ ├── roboto-slab-v7-regular.ttf │ │ │ │ ├── roboto-slab-v7-regular.woff │ │ │ │ └── roboto-slab-v7-regular.woff2 │ │ │ ├── fontawesome-webfont.eot │ │ │ ├── fontawesome-webfont.svg │ │ │ ├── fontawesome-webfont.ttf │ │ │ ├── fontawesome-webfont.woff │ │ │ └── fontawesome-webfont.woff2 │ │ ├── jquery-3.2.1.js │ │ ├── jquery.js │ │ ├── js │ │ │ ├── modernizr.min.js │ │ │ └── theme.js │ │ ├── minus.png │ │ ├── plus.png │ │ ├── pygments.css │ │ ├── searchtools.js │ │ ├── underscore-1.3.1.js │ │ ├── underscore.js │ │ ├── up-pressed.png │ │ ├── up.png │ │ └── websupport.js │ │ ├── genindex.html │ │ ├── index.html │ │ ├── objects.inv │ │ ├── py-modindex.html │ │ ├── search.html │ │ ├── searchindex.js │ │ └── svo.html ├── conf.py ├── index.rst ├── make.bat └── svo.rst ├── env ├── environment-3.10.yml └── environment-3.11.yml ├── setup.py ├── svo_demo.ipynb └── svo_filters ├── __init__.py ├── data ├── filters │ ├── .gitkeep │ ├── 2MASS.H │ ├── 2MASS.J │ ├── 2MASS.Ks │ ├── ACS_HRC.F435W │ ├── ACS_HRC.F555W │ ├── ACS_HRC.F658N │ ├── ACS_HRC.F775W │ ├── ACS_HRC.F850LP │ ├── Cousins.I │ ├── Cousins.R │ ├── FourStar.J │ ├── FourStar.J1 │ ├── FourStar.J2 │ ├── FourStar.J3 │ ├── GALEX.FUV │ ├── GALEX.NUV │ ├── Gaia.G │ ├── Gaia.bp │ ├── Gaia.rp │ ├── HAWK_I.H.txt │ ├── HAWK_I.J.txt │ ├── HAWK_I.Ks.txt │ ├── IRAC.I1 │ ├── IRAC.I2 │ ├── IRAC.I3 │ ├── IRAC.I4 │ ├── Johnson.V │ ├── Kepler.K │ ├── MIRI.F1000W │ ├── MIRI.F1130W │ ├── MIRI.F1280W │ ├── MIRI.F1500W │ ├── MIRI.F1800W │ ├── MIRI.F2100W │ ├── MIRI.F2550W │ ├── MIRI.F560W │ ├── MIRI.F770W │ ├── NICMOS3.F110W │ ├── NICMOS3.F160W │ ├── NIRCam.F070W │ ├── NIRCam.F090W │ ├── NIRCam.F115W │ ├── NIRCam.F140M │ ├── NIRCam.F150W │ ├── NIRCam.F150W2 │ ├── NIRCam.F162M │ ├── NIRCam.F164N │ ├── NIRCam.F182M │ ├── NIRCam.F187N │ ├── NIRCam.F200W │ ├── NIRCam.F210M │ ├── NIRCam.F212N │ ├── NIRCam.F250M │ ├── NIRCam.F277W │ ├── NIRCam.F300M │ ├── NIRCam.F322W2 │ ├── NIRCam.F323N │ ├── NIRCam.F335M │ ├── NIRCam.F356W │ ├── NIRCam.F360M │ ├── NIRCam.F405N │ ├── NIRCam.F410M │ ├── NIRCam.F430M │ ├── NIRCam.F444W │ ├── NIRCam.F460M │ ├── NIRCam.F466N │ ├── NIRCam.F470N │ ├── NIRCam.F480M │ ├── NIRISS.F090W │ ├── NIRISS.F115W │ ├── NIRISS.F140M │ ├── NIRISS.F150W │ ├── NIRISS.F158M │ ├── NIRISS.F200W │ ├── NIRISS.F277W │ ├── NIRISS.F356W │ ├── NIRISS.F380M │ ├── NIRISS.F430M │ ├── NIRISS.F444W │ ├── NIRISS.F480M │ ├── NIRISS.GR700XD.1.txt │ ├── NIRISS.GR700XD.2.txt │ ├── NIRISS.GR700XD.3.txt │ ├── NSFCam.H │ ├── NSFCam.J │ ├── NSFCam.K │ ├── NSFCam.Lp │ ├── NSFCam.Mp │ ├── PS1.g │ ├── PS1.i │ ├── PS1.r │ ├── PS1.y │ ├── PS1.z │ ├── SDSS.g │ ├── SDSS.i │ ├── SDSS.r │ ├── SDSS.u │ ├── SDSS.z │ ├── STIS.G430L.txt │ ├── STIS.G750L.txt │ ├── WFC3_IR.F125W │ ├── WFC3_IR.G102 │ ├── WFC3_IR.G141 │ ├── WFC3_UVIS2.F814W │ ├── WFC3_UVIS2.F850LP │ ├── WFPC2.f336w │ ├── WFPC2.f439w │ ├── WFPC2.f656n │ ├── WFPC2.f814w │ ├── WISE.W1 │ ├── WISE.W2 │ ├── WISE.W3 │ ├── WISE.W4 │ └── Wircam.Y ├── plots │ ├── G141.png │ ├── H.png │ └── filtered.png └── spectra │ └── vega.txt ├── setup_package.py ├── svo.py ├── test_svo.py └── utils.py /.github/workflows/svo_filters_workflow.yml: -------------------------------------------------------------------------------- 1 | name: svo_filters Workflow 2 | 3 | on: [push] 4 | 5 | jobs: 6 | build-linux: 7 | name: Python - ${{ matrix.python-version }} 8 | runs-on: ${{ matrix.os }} 9 | strategy: 10 | max-parallel: 5 11 | matrix: 12 | os: [ubuntu-latest] 13 | python-version: ['3.10', '3.11'] 14 | steps: 15 | - uses: actions/checkout@v2 16 | - name: Set up Python 17 | uses: actions/setup-python@v2 18 | with: 19 | python-version: ${{ matrix.python-version }} 20 | - name: Add conda to system path 21 | run: | 22 | # $CONDA is an environment variable pointing to the root of the miniconda directory 23 | echo $CONDA/bin >> $GITHUB_PATH 24 | - name: Install dependencies 25 | run: | 26 | conda env update --file env/environment-${{ matrix.python-version }}.yml --name svo_filters-${{ matrix.python-version }} 27 | env: 28 | PYTHONVERSION: ${{ matrix.python-version }} 29 | - name: Test with pytest 30 | run: | 31 | conda run -n svo_filters-${{ matrix.python-version }} pytest 32 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Compiled files 2 | *.py[cod] 3 | __pycache__ 4 | .DS_Store 5 | 6 | # Other generated files 7 | htmlcov 8 | .coverage 9 | MANIFEST 10 | .ipynb_checkpoints 11 | 12 | build 13 | dist/* 14 | *.egg-info* 15 | .idea 16 | -------------------------------------------------------------------------------- /.rtd-environment.yml: -------------------------------------------------------------------------------- 1 | name: svo_filters 2 | 3 | channels: 4 | - astropy 5 | 6 | dependencies: 7 | - astropy 8 | - bokeh 9 | - numpy 10 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2017 Joe Filippazzo 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /MANIFEST.in: -------------------------------------------------------------------------------- 1 | include README.md 2 | 3 | graft svo_filters/data/filters * 4 | graft svo_filters/data/plots * 5 | graft svo_filters/data/spectra * 6 | 7 | global-exclude *.pyc 8 | global-exclude *.idea 9 | -------------------------------------------------------------------------------- /ci/install_conda.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | if [ -d "$HOME/miniconda3" ] && [ -e "$HOME/miniconda3/bin/conda" ]; then 4 | echo "Miniconda install already present from cache: $HOME/miniconda3" 5 | rm -rf $HOME/miniconda3/envs/hosts # Just in case... 6 | else 7 | echo "Installing Miniconda..." 8 | rm -rf $HOME/miniconda3 # Just in case... 9 | 10 | if [ "${TRAVIS_OS_NAME}" == "osx" ]; then 11 | wget http://repo.continuum.io/miniconda/Miniconda3-latest-MacOSX-x86_64.sh -O miniconda.sh || exit 1 12 | else 13 | wget http://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh -O miniconda.sh || exit 1 14 | fi 15 | 16 | bash miniconda.sh -b -p "$HOME/miniconda3" || exit 1 17 | fi 18 | 19 | echo "Configuring Miniconda..." 20 | conda config --set ssl_verify false || exit 1 21 | conda config --set always_yes true --set changeps1 false || exit 1 22 | 23 | echo "Updating Miniconda" 24 | conda update conda 25 | conda update --all 26 | conda info -a || exit 1 27 | 28 | echo "Installing numpy" 29 | conda install numpy -------------------------------------------------------------------------------- /ci/setup_conda_env.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | echo "Creating conda environment for Python $PYTHON_VERSION" 3 | conda env create -f "env/environment-${PYTHON_VERSION}.yml" || exit 1 4 | export CONDA_ENV=svo-filters-$PYTHON_VERSION 5 | source activate $CONDA_ENV 6 | pip install pytest pytest-cov coveralls 7 | -------------------------------------------------------------------------------- /docs/Makefile: -------------------------------------------------------------------------------- 1 | # Minimal makefile for Sphinx documentation 2 | # 3 | 4 | # You can set these variables from the command line. 5 | SPHINXOPTS = 6 | SPHINXBUILD = sphinx-build 7 | SOURCEDIR = . 8 | BUILDDIR = _build 9 | 10 | # Put it first so that "make" without argument is like "make help". 11 | help: 12 | @$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) 13 | 14 | .PHONY: help Makefile 15 | 16 | # Catch-all target: route all unknown targets to Sphinx using the new 17 | # "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS). 18 | %: Makefile 19 | @$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) -------------------------------------------------------------------------------- /docs/_build/doctrees/README.doctree: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hover2pi/svo_filters/ac7fe3a7c405627810ae4d35dc29c118d1b6def8/docs/_build/doctrees/README.doctree -------------------------------------------------------------------------------- /docs/_build/doctrees/environment.pickle: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hover2pi/svo_filters/ac7fe3a7c405627810ae4d35dc29c118d1b6def8/docs/_build/doctrees/environment.pickle -------------------------------------------------------------------------------- /docs/_build/doctrees/index.doctree: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hover2pi/svo_filters/ac7fe3a7c405627810ae4d35dc29c118d1b6def8/docs/_build/doctrees/index.doctree -------------------------------------------------------------------------------- /docs/_build/doctrees/svo.doctree: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hover2pi/svo_filters/ac7fe3a7c405627810ae4d35dc29c118d1b6def8/docs/_build/doctrees/svo.doctree -------------------------------------------------------------------------------- /docs/_build/html/.buildinfo: -------------------------------------------------------------------------------- 1 | # Sphinx build info version 1 2 | # This file hashes the configuration used when building these files. When it is not found, a full rebuild will be done. 3 | config: a9e059dd25c81971882544951fc685dc 4 | tags: 645f666f9bcd5a90fca523b33c5a78b7 5 | -------------------------------------------------------------------------------- /docs/_build/html/.nojekyll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hover2pi/svo_filters/ac7fe3a7c405627810ae4d35dc29c118d1b6def8/docs/_build/html/.nojekyll -------------------------------------------------------------------------------- /docs/_build/html/_images/G141.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hover2pi/svo_filters/ac7fe3a7c405627810ae4d35dc29c118d1b6def8/docs/_build/html/_images/G141.png -------------------------------------------------------------------------------- /docs/_build/html/_images/H.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hover2pi/svo_filters/ac7fe3a7c405627810ae4d35dc29c118d1b6def8/docs/_build/html/_images/H.png -------------------------------------------------------------------------------- /docs/_build/html/_images/filtered.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hover2pi/svo_filters/ac7fe3a7c405627810ae4d35dc29c118d1b6def8/docs/_build/html/_images/filtered.png -------------------------------------------------------------------------------- /docs/_build/html/_modules/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | Overview: module code — svo_filters 0.2.16 documentation 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 |
41 | 42 | 43 | 92 | 93 |
94 | 95 | 96 | 102 | 103 | 104 |
105 | 106 |
107 | 108 | 109 | 110 | 111 | 112 | 113 | 114 | 115 | 116 | 117 | 118 | 119 | 120 | 121 | 122 | 123 | 124 |
125 | 126 |
    127 | 128 |
  • Docs »
  • 129 | 130 |
  • Overview: module code
  • 131 | 132 | 133 |
  • 134 | 135 |
  • 136 | 137 |
138 | 139 | 140 |
141 |
142 |
143 |
144 | 145 |

All modules for which code is available

146 | 149 | 150 |
151 | 152 |
153 | 167 | 168 |
169 |
170 | 171 |
172 | 173 |
174 | 175 | 176 | 177 | 178 | 179 | 180 | 181 | 182 | 183 | 184 | 185 | 186 | 187 | 188 | 189 | 190 | 191 | 196 | 197 | 198 | -------------------------------------------------------------------------------- /docs/_build/html/_sources/README.rst.txt: -------------------------------------------------------------------------------- 1 | svo_filters 2 | =========== 3 | 4 | The `Spanish Virtual Observatory (SVO) Filter Profile Service `_ is a great resource for homogenized photometric filter curves and metadata. With `svo_filters`, I tried to create a lightweight and flexible package to incorporate these filters into Python applications. 5 | 6 | Installation 7 | ------------ 8 | 9 | To install **svo_filters**, do:: 10 | 11 | pip install svo_filters 12 | 13 | Alternatively, you can clone from Github with:: 14 | 15 | git clone https://github.com/hover2pi/svo_filters.git 16 | python svo_filters/setup.py install 17 | 18 | Load a Photometric Filter 19 | ---------------------------- 20 | 21 | The actual filters are stored locally as XML files and can be viewed with:: 22 | 23 | from svo_filters import svo 24 | svo.filters() 25 | 26 | To create a filter object, pass a bandpass name to the :py:class:`svo.Filter()` class:: 27 | 28 | H_band = svo.Filter('2MASS.H') 29 | 30 | You can see someinformation about the filter with:: 31 | 32 | H_band.info() 33 | 34 | And you can plot the bandpass like so:: 35 | 36 | H_band.plot() 37 | 38 | .. image:: ../svo_filters/data/plots/H.png 39 | :align: center 40 | :height: 300px 41 | :alt: Filter bandpass 42 | 43 | Load a Grism 44 | ------------ 45 | 46 | Filters can also be binned arbitrarily, for use with grisms. We can pass integers to the ``n_bins`` or ``pixels_per_bin`` arguments to specify the number of wavelength bins or pixels per bin, respectively:: 47 | 48 | G141 = svo.Filter('WFC3_IR.G141', n_bins=15) 49 | 50 | .. image:: ../svo_filters/data/plots/G141.png 51 | :align: center 52 | :height: 300px 53 | :alt: Filter bandpass 54 | 55 | Apply a Filter to a Spectrum 56 | ---------------------------- 57 | 58 | Filters can be applied to a spectrum by passing a sequence of [W, F] or [W, F, E] with astropy units to the :py:meth:`~svo.Filter.apply` method:: 59 | 60 | filtered = G141.apply(spec, plot=True) 61 | 62 | .. image:: ../svo_filters/data/plots/filtered.png 63 | :align: center 64 | :height: 300px 65 | :alt: Filter bandpass 66 | 67 | Contents 68 | ======== 69 | 70 | .. toctree:: 71 | :maxdepth: 2 72 | 73 | svo 74 | 75 | -------------------------------------------------------------------------------- /docs/_build/html/_sources/index.rst.txt: -------------------------------------------------------------------------------- 1 | svo_filters 2 | =========== 3 | 4 | The `Spanish Virtual Observatory (SVO) Filter Profile Service `_ is a great resource for homogenized photometric filter curves and metadata. With `svo_filters`, I tried to create a lightweight and flexible package to incorporate these filters into Python applications. 5 | 6 | Installation 7 | ------------ 8 | 9 | To install **svo_filters**, do:: 10 | 11 | pip install svo_filters 12 | 13 | Alternatively, you can clone from Github with:: 14 | 15 | git clone https://github.com/hover2pi/svo_filters.git 16 | python svo_filters/setup.py install 17 | 18 | Load a Photometric Filter 19 | ---------------------------- 20 | 21 | The actual filters are stored locally as XML files and can be viewed with:: 22 | 23 | from svo_filters import svo 24 | svo.filters() 25 | 26 | To create a filter object, pass a bandpass name to the :py:class:`svo.Filter()` class:: 27 | 28 | H_band = svo.Filter('2MASS.H') 29 | 30 | You can see some information about the filter with:: 31 | 32 | H_band.info() 33 | 34 | And you can plot the bandpass like so:: 35 | 36 | H_band.plot() 37 | 38 | .. image:: ../svo_filters/data/plots/H.png 39 | :align: center 40 | :height: 300px 41 | :alt: Filter bandpass 42 | 43 | Load a Grism 44 | ------------ 45 | 46 | Filters can also be binned arbitrarily, for use with grisms. We can pass integers to the ``n_bins`` or ``pixels_per_bin`` arguments to specify the number of wavelength bins or pixels per bin, respectively:: 47 | 48 | G141 = svo.Filter('WFC3_IR.G141', n_bins=15) 49 | 50 | .. image:: ../svo_filters/data/plots/G141.png 51 | :align: center 52 | :height: 300px 53 | :alt: Filter bandpass 54 | 55 | Apply a Filter to a Spectrum 56 | ---------------------------- 57 | 58 | Filters can be applied to a spectrum by passing a sequence of [W, F] or [W, F, E] with astropy units to the :py:meth:`~svo.Filter.apply` method:: 59 | 60 | filtered = G141.apply(spec, plot=True) 61 | 62 | .. image:: ../svo_filters/data/plots/filtered.png 63 | :align: center 64 | :height: 300px 65 | :alt: Filter bandpass 66 | 67 | Contents 68 | ======== 69 | 70 | .. toctree:: 71 | :maxdepth: 2 72 | 73 | svo 74 | 75 | .. automodule:: svo 76 | -------------------------------------------------------------------------------- /docs/_build/html/_sources/svo.rst.txt: -------------------------------------------------------------------------------- 1 | svo module 2 | ========== 3 | 4 | This is the main module for `svo_filters`. 5 | 6 | .. automodule:: svo 7 | :members: 8 | :undoc-members: 9 | :show-inheritance: -------------------------------------------------------------------------------- /docs/_build/html/_static/ajax-loader.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hover2pi/svo_filters/ac7fe3a7c405627810ae4d35dc29c118d1b6def8/docs/_build/html/_static/ajax-loader.gif -------------------------------------------------------------------------------- /docs/_build/html/_static/comment-bright.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hover2pi/svo_filters/ac7fe3a7c405627810ae4d35dc29c118d1b6def8/docs/_build/html/_static/comment-bright.png -------------------------------------------------------------------------------- /docs/_build/html/_static/comment-close.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hover2pi/svo_filters/ac7fe3a7c405627810ae4d35dc29c118d1b6def8/docs/_build/html/_static/comment-close.png -------------------------------------------------------------------------------- /docs/_build/html/_static/comment.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hover2pi/svo_filters/ac7fe3a7c405627810ae4d35dc29c118d1b6def8/docs/_build/html/_static/comment.png -------------------------------------------------------------------------------- /docs/_build/html/_static/css/badge_only.css: -------------------------------------------------------------------------------- 1 | .fa:before{-webkit-font-smoothing:antialiased}.clearfix{*zoom:1}.clearfix:before,.clearfix:after{display:table;content:""}.clearfix:after{clear:both}@font-face{font-family:FontAwesome;font-weight:normal;font-style:normal;src:url("../fonts/fontawesome-webfont.eot");src:url("../fonts/fontawesome-webfont.eot?#iefix") format("embedded-opentype"),url("../fonts/fontawesome-webfont.woff") format("woff"),url("../fonts/fontawesome-webfont.ttf") format("truetype"),url("../fonts/fontawesome-webfont.svg#FontAwesome") format("svg")}.fa:before{display:inline-block;font-family:FontAwesome;font-style:normal;font-weight:normal;line-height:1;text-decoration:inherit}a .fa{display:inline-block;text-decoration:inherit}li .fa{display:inline-block}li .fa-large:before,li .fa-large:before{width:1.875em}ul.fas{list-style-type:none;margin-left:2em;text-indent:-0.8em}ul.fas li .fa{width:.8em}ul.fas li .fa-large:before,ul.fas li .fa-large:before{vertical-align:baseline}.fa-book:before{content:""}.icon-book:before{content:""}.fa-caret-down:before{content:""}.icon-caret-down:before{content:""}.fa-caret-up:before{content:""}.icon-caret-up:before{content:""}.fa-caret-left:before{content:""}.icon-caret-left:before{content:""}.fa-caret-right:before{content:""}.icon-caret-right:before{content:""}.rst-versions{position:fixed;bottom:0;left:0;width:300px;color:#fcfcfc;background:#1f1d1d;font-family:"Lato","proxima-nova","Helvetica Neue",Arial,sans-serif;z-index:400}.rst-versions a{color:#2980B9;text-decoration:none}.rst-versions .rst-badge-small{display:none}.rst-versions .rst-current-version{padding:12px;background-color:#272525;display:block;text-align:right;font-size:90%;cursor:pointer;color:#27AE60;*zoom:1}.rst-versions .rst-current-version:before,.rst-versions .rst-current-version:after{display:table;content:""}.rst-versions .rst-current-version:after{clear:both}.rst-versions .rst-current-version .fa{color:#fcfcfc}.rst-versions .rst-current-version .fa-book{float:left}.rst-versions .rst-current-version .icon-book{float:left}.rst-versions .rst-current-version.rst-out-of-date{background-color:#E74C3C;color:#fff}.rst-versions .rst-current-version.rst-active-old-version{background-color:#F1C40F;color:#000}.rst-versions.shift-up{height:auto;max-height:100%}.rst-versions.shift-up .rst-other-versions{display:block}.rst-versions .rst-other-versions{font-size:90%;padding:12px;color:gray;display:none}.rst-versions .rst-other-versions hr{display:block;height:1px;border:0;margin:20px 0;padding:0;border-top:solid 1px #413d3d}.rst-versions .rst-other-versions dd{display:inline-block;margin:0}.rst-versions .rst-other-versions dd a{display:inline-block;padding:6px;color:#fcfcfc}.rst-versions.rst-badge{width:auto;bottom:20px;right:20px;left:auto;border:none;max-width:300px}.rst-versions.rst-badge .icon-book{float:none}.rst-versions.rst-badge .fa-book{float:none}.rst-versions.rst-badge.shift-up .rst-current-version{text-align:right}.rst-versions.rst-badge.shift-up .rst-current-version .fa-book{float:left}.rst-versions.rst-badge.shift-up .rst-current-version .icon-book{float:left}.rst-versions.rst-badge .rst-current-version{width:auto;height:30px;line-height:30px;padding:0 6px;display:block;text-align:center}@media screen and (max-width: 768px){.rst-versions{width:85%;display:none}.rst-versions.shift{display:block}} 2 | -------------------------------------------------------------------------------- /docs/_build/html/_static/custom.css: -------------------------------------------------------------------------------- 1 | /* This file intentionally left blank. */ 2 | -------------------------------------------------------------------------------- /docs/_build/html/_static/doctools.js: -------------------------------------------------------------------------------- 1 | /* 2 | * doctools.js 3 | * ~~~~~~~~~~~ 4 | * 5 | * Sphinx JavaScript utilities for all documentation. 6 | * 7 | * :copyright: Copyright 2007-2018 by the Sphinx team, see AUTHORS. 8 | * :license: BSD, see LICENSE for details. 9 | * 10 | */ 11 | 12 | /** 13 | * select a different prefix for underscore 14 | */ 15 | $u = _.noConflict(); 16 | 17 | /** 18 | * make the code below compatible with browsers without 19 | * an installed firebug like debugger 20 | if (!window.console || !console.firebug) { 21 | var names = ["log", "debug", "info", "warn", "error", "assert", "dir", 22 | "dirxml", "group", "groupEnd", "time", "timeEnd", "count", "trace", 23 | "profile", "profileEnd"]; 24 | window.console = {}; 25 | for (var i = 0; i < names.length; ++i) 26 | window.console[names[i]] = function() {}; 27 | } 28 | */ 29 | 30 | /** 31 | * small helper function to urldecode strings 32 | */ 33 | jQuery.urldecode = function(x) { 34 | return decodeURIComponent(x).replace(/\+/g, ' '); 35 | }; 36 | 37 | /** 38 | * small helper function to urlencode strings 39 | */ 40 | jQuery.urlencode = encodeURIComponent; 41 | 42 | /** 43 | * This function returns the parsed url parameters of the 44 | * current request. Multiple values per key are supported, 45 | * it will always return arrays of strings for the value parts. 46 | */ 47 | jQuery.getQueryParameters = function(s) { 48 | if (typeof s === 'undefined') 49 | s = document.location.search; 50 | var parts = s.substr(s.indexOf('?') + 1).split('&'); 51 | var result = {}; 52 | for (var i = 0; i < parts.length; i++) { 53 | var tmp = parts[i].split('=', 2); 54 | var key = jQuery.urldecode(tmp[0]); 55 | var value = jQuery.urldecode(tmp[1]); 56 | if (key in result) 57 | result[key].push(value); 58 | else 59 | result[key] = [value]; 60 | } 61 | return result; 62 | }; 63 | 64 | /** 65 | * highlight a given string on a jquery object by wrapping it in 66 | * span elements with the given class name. 67 | */ 68 | jQuery.fn.highlightText = function(text, className) { 69 | function highlight(node, addItems) { 70 | if (node.nodeType === 3) { 71 | var val = node.nodeValue; 72 | var pos = val.toLowerCase().indexOf(text); 73 | if (pos >= 0 && 74 | !jQuery(node.parentNode).hasClass(className) && 75 | !jQuery(node.parentNode).hasClass("nohighlight")) { 76 | var span; 77 | var isInSVG = jQuery(node).closest("body, svg, foreignObject").is("svg"); 78 | if (isInSVG) { 79 | span = document.createElementNS("http://www.w3.org/2000/svg", "tspan"); 80 | } else { 81 | span = document.createElement("span"); 82 | span.className = className; 83 | } 84 | span.appendChild(document.createTextNode(val.substr(pos, text.length))); 85 | node.parentNode.insertBefore(span, node.parentNode.insertBefore( 86 | document.createTextNode(val.substr(pos + text.length)), 87 | node.nextSibling)); 88 | node.nodeValue = val.substr(0, pos); 89 | if (isInSVG) { 90 | var bbox = span.getBBox(); 91 | var rect = document.createElementNS("http://www.w3.org/2000/svg", "rect"); 92 | rect.x.baseVal.value = bbox.x; 93 | rect.y.baseVal.value = bbox.y; 94 | rect.width.baseVal.value = bbox.width; 95 | rect.height.baseVal.value = bbox.height; 96 | rect.setAttribute('class', className); 97 | var parentOfText = node.parentNode.parentNode; 98 | addItems.push({ 99 | "parent": node.parentNode, 100 | "target": rect}); 101 | } 102 | } 103 | } 104 | else if (!jQuery(node).is("button, select, textarea")) { 105 | jQuery.each(node.childNodes, function() { 106 | highlight(this, addItems); 107 | }); 108 | } 109 | } 110 | var addItems = []; 111 | var result = this.each(function() { 112 | highlight(this, addItems); 113 | }); 114 | for (var i = 0; i < addItems.length; ++i) { 115 | jQuery(addItems[i].parent).before(addItems[i].target); 116 | } 117 | return result; 118 | }; 119 | 120 | /* 121 | * backward compatibility for jQuery.browser 122 | * This will be supported until firefox bug is fixed. 123 | */ 124 | if (!jQuery.browser) { 125 | jQuery.uaMatch = function(ua) { 126 | ua = ua.toLowerCase(); 127 | 128 | var match = /(chrome)[ \/]([\w.]+)/.exec(ua) || 129 | /(webkit)[ \/]([\w.]+)/.exec(ua) || 130 | /(opera)(?:.*version|)[ \/]([\w.]+)/.exec(ua) || 131 | /(msie) ([\w.]+)/.exec(ua) || 132 | ua.indexOf("compatible") < 0 && /(mozilla)(?:.*? rv:([\w.]+)|)/.exec(ua) || 133 | []; 134 | 135 | return { 136 | browser: match[ 1 ] || "", 137 | version: match[ 2 ] || "0" 138 | }; 139 | }; 140 | jQuery.browser = {}; 141 | jQuery.browser[jQuery.uaMatch(navigator.userAgent).browser] = true; 142 | } 143 | 144 | /** 145 | * Small JavaScript module for the documentation. 146 | */ 147 | var Documentation = { 148 | 149 | init : function() { 150 | this.fixFirefoxAnchorBug(); 151 | this.highlightSearchWords(); 152 | this.initIndexTable(); 153 | if (DOCUMENTATION_OPTIONS.NAVIGATION_WITH_KEYS) { 154 | this.initOnKeyListeners(); 155 | } 156 | }, 157 | 158 | /** 159 | * i18n support 160 | */ 161 | TRANSLATIONS : {}, 162 | PLURAL_EXPR : function(n) { return n === 1 ? 0 : 1; }, 163 | LOCALE : 'unknown', 164 | 165 | // gettext and ngettext don't access this so that the functions 166 | // can safely bound to a different name (_ = Documentation.gettext) 167 | gettext : function(string) { 168 | var translated = Documentation.TRANSLATIONS[string]; 169 | if (typeof translated === 'undefined') 170 | return string; 171 | return (typeof translated === 'string') ? translated : translated[0]; 172 | }, 173 | 174 | ngettext : function(singular, plural, n) { 175 | var translated = Documentation.TRANSLATIONS[singular]; 176 | if (typeof translated === 'undefined') 177 | return (n == 1) ? singular : plural; 178 | return translated[Documentation.PLURALEXPR(n)]; 179 | }, 180 | 181 | addTranslations : function(catalog) { 182 | for (var key in catalog.messages) 183 | this.TRANSLATIONS[key] = catalog.messages[key]; 184 | this.PLURAL_EXPR = new Function('n', 'return +(' + catalog.plural_expr + ')'); 185 | this.LOCALE = catalog.locale; 186 | }, 187 | 188 | /** 189 | * add context elements like header anchor links 190 | */ 191 | addContextElements : function() { 192 | $('div[id] > :header:first').each(function() { 193 | $('\u00B6'). 194 | attr('href', '#' + this.id). 195 | attr('title', _('Permalink to this headline')). 196 | appendTo(this); 197 | }); 198 | $('dt[id]').each(function() { 199 | $('\u00B6'). 200 | attr('href', '#' + this.id). 201 | attr('title', _('Permalink to this definition')). 202 | appendTo(this); 203 | }); 204 | }, 205 | 206 | /** 207 | * workaround a firefox stupidity 208 | * see: https://bugzilla.mozilla.org/show_bug.cgi?id=645075 209 | */ 210 | fixFirefoxAnchorBug : function() { 211 | if (document.location.hash && $.browser.mozilla) 212 | window.setTimeout(function() { 213 | document.location.href += ''; 214 | }, 10); 215 | }, 216 | 217 | /** 218 | * highlight the search words provided in the url in the text 219 | */ 220 | highlightSearchWords : function() { 221 | var params = $.getQueryParameters(); 222 | var terms = (params.highlight) ? params.highlight[0].split(/\s+/) : []; 223 | if (terms.length) { 224 | var body = $('div.body'); 225 | if (!body.length) { 226 | body = $('body'); 227 | } 228 | window.setTimeout(function() { 229 | $.each(terms, function() { 230 | body.highlightText(this.toLowerCase(), 'highlighted'); 231 | }); 232 | }, 10); 233 | $('') 235 | .appendTo($('#searchbox')); 236 | } 237 | }, 238 | 239 | /** 240 | * init the domain index toggle buttons 241 | */ 242 | initIndexTable : function() { 243 | var togglers = $('img.toggler').click(function() { 244 | var src = $(this).attr('src'); 245 | var idnum = $(this).attr('id').substr(7); 246 | $('tr.cg-' + idnum).toggle(); 247 | if (src.substr(-9) === 'minus.png') 248 | $(this).attr('src', src.substr(0, src.length-9) + 'plus.png'); 249 | else 250 | $(this).attr('src', src.substr(0, src.length-8) + 'minus.png'); 251 | }).css('display', ''); 252 | if (DOCUMENTATION_OPTIONS.COLLAPSE_INDEX) { 253 | togglers.click(); 254 | } 255 | }, 256 | 257 | /** 258 | * helper function to hide the search marks again 259 | */ 260 | hideSearchWords : function() { 261 | $('#searchbox .highlight-link').fadeOut(300); 262 | $('span.highlighted').removeClass('highlighted'); 263 | }, 264 | 265 | /** 266 | * make the url absolute 267 | */ 268 | makeURL : function(relativeURL) { 269 | return DOCUMENTATION_OPTIONS.URL_ROOT + '/' + relativeURL; 270 | }, 271 | 272 | /** 273 | * get the current relative url 274 | */ 275 | getCurrentURL : function() { 276 | var path = document.location.pathname; 277 | var parts = path.split(/\//); 278 | $.each(DOCUMENTATION_OPTIONS.URL_ROOT.split(/\//), function() { 279 | if (this === '..') 280 | parts.pop(); 281 | }); 282 | var url = parts.join('/'); 283 | return path.substring(url.lastIndexOf('/') + 1, path.length - 1); 284 | }, 285 | 286 | initOnKeyListeners: function() { 287 | $(document).keyup(function(event) { 288 | var activeElementType = document.activeElement.tagName; 289 | // don't navigate when in search box or textarea 290 | if (activeElementType !== 'TEXTAREA' && activeElementType !== 'INPUT' && activeElementType !== 'SELECT') { 291 | switch (event.keyCode) { 292 | case 37: // left 293 | var prevHref = $('link[rel="prev"]').prop('href'); 294 | if (prevHref) { 295 | window.location.href = prevHref; 296 | return false; 297 | } 298 | case 39: // right 299 | var nextHref = $('link[rel="next"]').prop('href'); 300 | if (nextHref) { 301 | window.location.href = nextHref; 302 | return false; 303 | } 304 | } 305 | } 306 | }); 307 | } 308 | }; 309 | 310 | // quick alias for translations 311 | _ = Documentation.gettext; 312 | 313 | $(document).ready(function() { 314 | Documentation.init(); 315 | }); 316 | -------------------------------------------------------------------------------- /docs/_build/html/_static/documentation_options.js: -------------------------------------------------------------------------------- 1 | var DOCUMENTATION_OPTIONS = { 2 | URL_ROOT: document.getElementById("documentation_options").getAttribute('data-url_root'), 3 | VERSION: '0.2.16', 4 | LANGUAGE: 'None', 5 | COLLAPSE_INDEX: false, 6 | FILE_SUFFIX: '.html', 7 | HAS_SOURCE: true, 8 | SOURCELINK_SUFFIX: '.txt', 9 | NAVIGATION_WITH_KEYS: false, 10 | SEARCH_LANGUAGE_STOP_WORDS: ["a","and","are","as","at","be","but","by","for","if","in","into","is","it","near","no","not","of","on","or","such","that","the","their","then","there","these","they","this","to","was","will","with"] 11 | }; 12 | 13 | 14 | 15 | /* Non-minified version JS is _stemmer.js if file is provided */ 16 | /** 17 | * Porter Stemmer 18 | */ 19 | var Stemmer = function() { 20 | 21 | var step2list = { 22 | ational: 'ate', 23 | tional: 'tion', 24 | enci: 'ence', 25 | anci: 'ance', 26 | izer: 'ize', 27 | bli: 'ble', 28 | alli: 'al', 29 | entli: 'ent', 30 | eli: 'e', 31 | ousli: 'ous', 32 | ization: 'ize', 33 | ation: 'ate', 34 | ator: 'ate', 35 | alism: 'al', 36 | iveness: 'ive', 37 | fulness: 'ful', 38 | ousness: 'ous', 39 | aliti: 'al', 40 | iviti: 'ive', 41 | biliti: 'ble', 42 | logi: 'log' 43 | }; 44 | 45 | var step3list = { 46 | icate: 'ic', 47 | ative: '', 48 | alize: 'al', 49 | iciti: 'ic', 50 | ical: 'ic', 51 | ful: '', 52 | ness: '' 53 | }; 54 | 55 | var c = "[^aeiou]"; // consonant 56 | var v = "[aeiouy]"; // vowel 57 | var C = c + "[^aeiouy]*"; // consonant sequence 58 | var V = v + "[aeiou]*"; // vowel sequence 59 | 60 | var mgr0 = "^(" + C + ")?" + V + C; // [C]VC... is m>0 61 | var meq1 = "^(" + C + ")?" + V + C + "(" + V + ")?$"; // [C]VC[V] is m=1 62 | var mgr1 = "^(" + C + ")?" + V + C + V + C; // [C]VCVC... is m>1 63 | var s_v = "^(" + C + ")?" + v; // vowel in stem 64 | 65 | this.stemWord = function (w) { 66 | var stem; 67 | var suffix; 68 | var firstch; 69 | var origword = w; 70 | 71 | if (w.length < 3) 72 | return w; 73 | 74 | var re; 75 | var re2; 76 | var re3; 77 | var re4; 78 | 79 | firstch = w.substr(0,1); 80 | if (firstch == "y") 81 | w = firstch.toUpperCase() + w.substr(1); 82 | 83 | // Step 1a 84 | re = /^(.+?)(ss|i)es$/; 85 | re2 = /^(.+?)([^s])s$/; 86 | 87 | if (re.test(w)) 88 | w = w.replace(re,"$1$2"); 89 | else if (re2.test(w)) 90 | w = w.replace(re2,"$1$2"); 91 | 92 | // Step 1b 93 | re = /^(.+?)eed$/; 94 | re2 = /^(.+?)(ed|ing)$/; 95 | if (re.test(w)) { 96 | var fp = re.exec(w); 97 | re = new RegExp(mgr0); 98 | if (re.test(fp[1])) { 99 | re = /.$/; 100 | w = w.replace(re,""); 101 | } 102 | } 103 | else if (re2.test(w)) { 104 | var fp = re2.exec(w); 105 | stem = fp[1]; 106 | re2 = new RegExp(s_v); 107 | if (re2.test(stem)) { 108 | w = stem; 109 | re2 = /(at|bl|iz)$/; 110 | re3 = new RegExp("([^aeiouylsz])\\1$"); 111 | re4 = new RegExp("^" + C + v + "[^aeiouwxy]$"); 112 | if (re2.test(w)) 113 | w = w + "e"; 114 | else if (re3.test(w)) { 115 | re = /.$/; 116 | w = w.replace(re,""); 117 | } 118 | else if (re4.test(w)) 119 | w = w + "e"; 120 | } 121 | } 122 | 123 | // Step 1c 124 | re = /^(.+?)y$/; 125 | if (re.test(w)) { 126 | var fp = re.exec(w); 127 | stem = fp[1]; 128 | re = new RegExp(s_v); 129 | if (re.test(stem)) 130 | w = stem + "i"; 131 | } 132 | 133 | // Step 2 134 | re = /^(.+?)(ational|tional|enci|anci|izer|bli|alli|entli|eli|ousli|ization|ation|ator|alism|iveness|fulness|ousness|aliti|iviti|biliti|logi)$/; 135 | if (re.test(w)) { 136 | var fp = re.exec(w); 137 | stem = fp[1]; 138 | suffix = fp[2]; 139 | re = new RegExp(mgr0); 140 | if (re.test(stem)) 141 | w = stem + step2list[suffix]; 142 | } 143 | 144 | // Step 3 145 | re = /^(.+?)(icate|ative|alize|iciti|ical|ful|ness)$/; 146 | if (re.test(w)) { 147 | var fp = re.exec(w); 148 | stem = fp[1]; 149 | suffix = fp[2]; 150 | re = new RegExp(mgr0); 151 | if (re.test(stem)) 152 | w = stem + step3list[suffix]; 153 | } 154 | 155 | // Step 4 156 | re = /^(.+?)(al|ance|ence|er|ic|able|ible|ant|ement|ment|ent|ou|ism|ate|iti|ous|ive|ize)$/; 157 | re2 = /^(.+?)(s|t)(ion)$/; 158 | if (re.test(w)) { 159 | var fp = re.exec(w); 160 | stem = fp[1]; 161 | re = new RegExp(mgr1); 162 | if (re.test(stem)) 163 | w = stem; 164 | } 165 | else if (re2.test(w)) { 166 | var fp = re2.exec(w); 167 | stem = fp[1] + fp[2]; 168 | re2 = new RegExp(mgr1); 169 | if (re2.test(stem)) 170 | w = stem; 171 | } 172 | 173 | // Step 5 174 | re = /^(.+?)e$/; 175 | if (re.test(w)) { 176 | var fp = re.exec(w); 177 | stem = fp[1]; 178 | re = new RegExp(mgr1); 179 | re2 = new RegExp(meq1); 180 | re3 = new RegExp("^" + C + v + "[^aeiouwxy]$"); 181 | if (re.test(stem) || (re2.test(stem) && !(re3.test(stem)))) 182 | w = stem; 183 | } 184 | re = /ll$/; 185 | re2 = new RegExp(mgr1); 186 | if (re.test(w) && re2.test(w)) { 187 | re = /.$/; 188 | w = w.replace(re,""); 189 | } 190 | 191 | // and turn initial Y back to y 192 | if (firstch == "y") 193 | w = firstch.toLowerCase() + w.substr(1); 194 | return w; 195 | } 196 | } 197 | 198 | 199 | 200 | 201 | 202 | var splitChars = (function() { 203 | var result = {}; 204 | var singles = [96, 180, 187, 191, 215, 247, 749, 885, 903, 907, 909, 930, 1014, 1648, 205 | 1748, 1809, 2416, 2473, 2481, 2526, 2601, 2609, 2612, 2615, 2653, 2702, 206 | 2706, 2729, 2737, 2740, 2857, 2865, 2868, 2910, 2928, 2948, 2961, 2971, 207 | 2973, 3085, 3089, 3113, 3124, 3213, 3217, 3241, 3252, 3295, 3341, 3345, 208 | 3369, 3506, 3516, 3633, 3715, 3721, 3736, 3744, 3748, 3750, 3756, 3761, 209 | 3781, 3912, 4239, 4347, 4681, 4695, 4697, 4745, 4785, 4799, 4801, 4823, 210 | 4881, 5760, 5901, 5997, 6313, 7405, 8024, 8026, 8028, 8030, 8117, 8125, 211 | 8133, 8181, 8468, 8485, 8487, 8489, 8494, 8527, 11311, 11359, 11687, 11695, 212 | 11703, 11711, 11719, 11727, 11735, 12448, 12539, 43010, 43014, 43019, 43587, 213 | 43696, 43713, 64286, 64297, 64311, 64317, 64319, 64322, 64325, 65141]; 214 | var i, j, start, end; 215 | for (i = 0; i < singles.length; i++) { 216 | result[singles[i]] = true; 217 | } 218 | var ranges = [[0, 47], [58, 64], [91, 94], [123, 169], [171, 177], [182, 184], [706, 709], 219 | [722, 735], [741, 747], [751, 879], [888, 889], [894, 901], [1154, 1161], 220 | [1318, 1328], [1367, 1368], [1370, 1376], [1416, 1487], [1515, 1519], [1523, 1568], 221 | [1611, 1631], [1642, 1645], [1750, 1764], [1767, 1773], [1789, 1790], [1792, 1807], 222 | [1840, 1868], [1958, 1968], [1970, 1983], [2027, 2035], [2038, 2041], [2043, 2047], 223 | [2070, 2073], [2075, 2083], [2085, 2087], [2089, 2307], [2362, 2364], [2366, 2383], 224 | [2385, 2391], [2402, 2405], [2419, 2424], [2432, 2436], [2445, 2446], [2449, 2450], 225 | [2483, 2485], [2490, 2492], [2494, 2509], [2511, 2523], [2530, 2533], [2546, 2547], 226 | [2554, 2564], [2571, 2574], [2577, 2578], [2618, 2648], [2655, 2661], [2672, 2673], 227 | [2677, 2692], [2746, 2748], [2750, 2767], [2769, 2783], [2786, 2789], [2800, 2820], 228 | [2829, 2830], [2833, 2834], [2874, 2876], [2878, 2907], [2914, 2917], [2930, 2946], 229 | [2955, 2957], [2966, 2968], [2976, 2978], [2981, 2983], [2987, 2989], [3002, 3023], 230 | [3025, 3045], [3059, 3076], [3130, 3132], [3134, 3159], [3162, 3167], [3170, 3173], 231 | [3184, 3191], [3199, 3204], [3258, 3260], [3262, 3293], [3298, 3301], [3312, 3332], 232 | [3386, 3388], [3390, 3423], [3426, 3429], [3446, 3449], [3456, 3460], [3479, 3481], 233 | [3518, 3519], [3527, 3584], [3636, 3647], [3655, 3663], [3674, 3712], [3717, 3718], 234 | [3723, 3724], [3726, 3731], [3752, 3753], [3764, 3772], [3774, 3775], [3783, 3791], 235 | [3802, 3803], [3806, 3839], [3841, 3871], [3892, 3903], [3949, 3975], [3980, 4095], 236 | [4139, 4158], [4170, 4175], [4182, 4185], [4190, 4192], [4194, 4196], [4199, 4205], 237 | [4209, 4212], [4226, 4237], [4250, 4255], [4294, 4303], [4349, 4351], [4686, 4687], 238 | [4702, 4703], [4750, 4751], [4790, 4791], [4806, 4807], [4886, 4887], [4955, 4968], 239 | [4989, 4991], [5008, 5023], [5109, 5120], [5741, 5742], [5787, 5791], [5867, 5869], 240 | [5873, 5887], [5906, 5919], [5938, 5951], [5970, 5983], [6001, 6015], [6068, 6102], 241 | [6104, 6107], [6109, 6111], [6122, 6127], [6138, 6159], [6170, 6175], [6264, 6271], 242 | [6315, 6319], [6390, 6399], [6429, 6469], [6510, 6511], [6517, 6527], [6572, 6592], 243 | [6600, 6607], [6619, 6655], [6679, 6687], [6741, 6783], [6794, 6799], [6810, 6822], 244 | [6824, 6916], [6964, 6980], [6988, 6991], [7002, 7042], [7073, 7085], [7098, 7167], 245 | [7204, 7231], [7242, 7244], [7294, 7400], [7410, 7423], [7616, 7679], [7958, 7959], 246 | [7966, 7967], [8006, 8007], [8014, 8015], [8062, 8063], [8127, 8129], [8141, 8143], 247 | [8148, 8149], [8156, 8159], [8173, 8177], [8189, 8303], [8306, 8307], [8314, 8318], 248 | [8330, 8335], [8341, 8449], [8451, 8454], [8456, 8457], [8470, 8472], [8478, 8483], 249 | [8506, 8507], [8512, 8516], [8522, 8525], [8586, 9311], [9372, 9449], [9472, 10101], 250 | [10132, 11263], [11493, 11498], [11503, 11516], [11518, 11519], [11558, 11567], 251 | [11622, 11630], [11632, 11647], [11671, 11679], [11743, 11822], [11824, 12292], 252 | [12296, 12320], [12330, 12336], [12342, 12343], [12349, 12352], [12439, 12444], 253 | [12544, 12548], [12590, 12592], [12687, 12689], [12694, 12703], [12728, 12783], 254 | [12800, 12831], [12842, 12880], [12896, 12927], [12938, 12976], [12992, 13311], 255 | [19894, 19967], [40908, 40959], [42125, 42191], [42238, 42239], [42509, 42511], 256 | [42540, 42559], [42592, 42593], [42607, 42622], [42648, 42655], [42736, 42774], 257 | [42784, 42785], [42889, 42890], [42893, 43002], [43043, 43055], [43062, 43071], 258 | [43124, 43137], [43188, 43215], [43226, 43249], [43256, 43258], [43260, 43263], 259 | [43302, 43311], [43335, 43359], [43389, 43395], [43443, 43470], [43482, 43519], 260 | [43561, 43583], [43596, 43599], [43610, 43615], [43639, 43641], [43643, 43647], 261 | [43698, 43700], [43703, 43704], [43710, 43711], [43715, 43738], [43742, 43967], 262 | [44003, 44015], [44026, 44031], [55204, 55215], [55239, 55242], [55292, 55295], 263 | [57344, 63743], [64046, 64047], [64110, 64111], [64218, 64255], [64263, 64274], 264 | [64280, 64284], [64434, 64466], [64830, 64847], [64912, 64913], [64968, 65007], 265 | [65020, 65135], [65277, 65295], [65306, 65312], [65339, 65344], [65371, 65381], 266 | [65471, 65473], [65480, 65481], [65488, 65489], [65496, 65497]]; 267 | for (i = 0; i < ranges.length; i++) { 268 | start = ranges[i][0]; 269 | end = ranges[i][1]; 270 | for (j = start; j <= end; j++) { 271 | result[j] = true; 272 | } 273 | } 274 | return result; 275 | })(); 276 | 277 | function splitQuery(query) { 278 | var result = []; 279 | var start = -1; 280 | for (var i = 0; i < query.length; i++) { 281 | if (splitChars[query.charCodeAt(i)]) { 282 | if (start !== -1) { 283 | result.push(query.slice(start, i)); 284 | start = -1; 285 | } 286 | } else if (start === -1) { 287 | start = i; 288 | } 289 | } 290 | if (start !== -1) { 291 | result.push(query.slice(start)); 292 | } 293 | return result; 294 | } 295 | 296 | 297 | -------------------------------------------------------------------------------- /docs/_build/html/_static/down-pressed.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hover2pi/svo_filters/ac7fe3a7c405627810ae4d35dc29c118d1b6def8/docs/_build/html/_static/down-pressed.png -------------------------------------------------------------------------------- /docs/_build/html/_static/down.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hover2pi/svo_filters/ac7fe3a7c405627810ae4d35dc29c118d1b6def8/docs/_build/html/_static/down.png -------------------------------------------------------------------------------- /docs/_build/html/_static/file.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hover2pi/svo_filters/ac7fe3a7c405627810ae4d35dc29c118d1b6def8/docs/_build/html/_static/file.png -------------------------------------------------------------------------------- /docs/_build/html/_static/fonts/Inconsolata-Bold.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hover2pi/svo_filters/ac7fe3a7c405627810ae4d35dc29c118d1b6def8/docs/_build/html/_static/fonts/Inconsolata-Bold.ttf -------------------------------------------------------------------------------- /docs/_build/html/_static/fonts/Inconsolata-Regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hover2pi/svo_filters/ac7fe3a7c405627810ae4d35dc29c118d1b6def8/docs/_build/html/_static/fonts/Inconsolata-Regular.ttf -------------------------------------------------------------------------------- /docs/_build/html/_static/fonts/Inconsolata.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hover2pi/svo_filters/ac7fe3a7c405627810ae4d35dc29c118d1b6def8/docs/_build/html/_static/fonts/Inconsolata.ttf -------------------------------------------------------------------------------- /docs/_build/html/_static/fonts/Lato-Bold.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hover2pi/svo_filters/ac7fe3a7c405627810ae4d35dc29c118d1b6def8/docs/_build/html/_static/fonts/Lato-Bold.ttf -------------------------------------------------------------------------------- /docs/_build/html/_static/fonts/Lato-Regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hover2pi/svo_filters/ac7fe3a7c405627810ae4d35dc29c118d1b6def8/docs/_build/html/_static/fonts/Lato-Regular.ttf -------------------------------------------------------------------------------- /docs/_build/html/_static/fonts/Lato/lato-bold.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hover2pi/svo_filters/ac7fe3a7c405627810ae4d35dc29c118d1b6def8/docs/_build/html/_static/fonts/Lato/lato-bold.eot -------------------------------------------------------------------------------- /docs/_build/html/_static/fonts/Lato/lato-bold.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hover2pi/svo_filters/ac7fe3a7c405627810ae4d35dc29c118d1b6def8/docs/_build/html/_static/fonts/Lato/lato-bold.ttf -------------------------------------------------------------------------------- /docs/_build/html/_static/fonts/Lato/lato-bold.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hover2pi/svo_filters/ac7fe3a7c405627810ae4d35dc29c118d1b6def8/docs/_build/html/_static/fonts/Lato/lato-bold.woff -------------------------------------------------------------------------------- /docs/_build/html/_static/fonts/Lato/lato-bold.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hover2pi/svo_filters/ac7fe3a7c405627810ae4d35dc29c118d1b6def8/docs/_build/html/_static/fonts/Lato/lato-bold.woff2 -------------------------------------------------------------------------------- /docs/_build/html/_static/fonts/Lato/lato-bolditalic.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hover2pi/svo_filters/ac7fe3a7c405627810ae4d35dc29c118d1b6def8/docs/_build/html/_static/fonts/Lato/lato-bolditalic.eot -------------------------------------------------------------------------------- /docs/_build/html/_static/fonts/Lato/lato-bolditalic.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hover2pi/svo_filters/ac7fe3a7c405627810ae4d35dc29c118d1b6def8/docs/_build/html/_static/fonts/Lato/lato-bolditalic.ttf -------------------------------------------------------------------------------- /docs/_build/html/_static/fonts/Lato/lato-bolditalic.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hover2pi/svo_filters/ac7fe3a7c405627810ae4d35dc29c118d1b6def8/docs/_build/html/_static/fonts/Lato/lato-bolditalic.woff -------------------------------------------------------------------------------- /docs/_build/html/_static/fonts/Lato/lato-bolditalic.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hover2pi/svo_filters/ac7fe3a7c405627810ae4d35dc29c118d1b6def8/docs/_build/html/_static/fonts/Lato/lato-bolditalic.woff2 -------------------------------------------------------------------------------- /docs/_build/html/_static/fonts/Lato/lato-italic.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hover2pi/svo_filters/ac7fe3a7c405627810ae4d35dc29c118d1b6def8/docs/_build/html/_static/fonts/Lato/lato-italic.eot -------------------------------------------------------------------------------- /docs/_build/html/_static/fonts/Lato/lato-italic.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hover2pi/svo_filters/ac7fe3a7c405627810ae4d35dc29c118d1b6def8/docs/_build/html/_static/fonts/Lato/lato-italic.ttf -------------------------------------------------------------------------------- /docs/_build/html/_static/fonts/Lato/lato-italic.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hover2pi/svo_filters/ac7fe3a7c405627810ae4d35dc29c118d1b6def8/docs/_build/html/_static/fonts/Lato/lato-italic.woff -------------------------------------------------------------------------------- /docs/_build/html/_static/fonts/Lato/lato-italic.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hover2pi/svo_filters/ac7fe3a7c405627810ae4d35dc29c118d1b6def8/docs/_build/html/_static/fonts/Lato/lato-italic.woff2 -------------------------------------------------------------------------------- /docs/_build/html/_static/fonts/Lato/lato-regular.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hover2pi/svo_filters/ac7fe3a7c405627810ae4d35dc29c118d1b6def8/docs/_build/html/_static/fonts/Lato/lato-regular.eot -------------------------------------------------------------------------------- /docs/_build/html/_static/fonts/Lato/lato-regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hover2pi/svo_filters/ac7fe3a7c405627810ae4d35dc29c118d1b6def8/docs/_build/html/_static/fonts/Lato/lato-regular.ttf -------------------------------------------------------------------------------- /docs/_build/html/_static/fonts/Lato/lato-regular.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hover2pi/svo_filters/ac7fe3a7c405627810ae4d35dc29c118d1b6def8/docs/_build/html/_static/fonts/Lato/lato-regular.woff -------------------------------------------------------------------------------- /docs/_build/html/_static/fonts/Lato/lato-regular.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hover2pi/svo_filters/ac7fe3a7c405627810ae4d35dc29c118d1b6def8/docs/_build/html/_static/fonts/Lato/lato-regular.woff2 -------------------------------------------------------------------------------- /docs/_build/html/_static/fonts/RobotoSlab-Bold.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hover2pi/svo_filters/ac7fe3a7c405627810ae4d35dc29c118d1b6def8/docs/_build/html/_static/fonts/RobotoSlab-Bold.ttf -------------------------------------------------------------------------------- /docs/_build/html/_static/fonts/RobotoSlab-Regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hover2pi/svo_filters/ac7fe3a7c405627810ae4d35dc29c118d1b6def8/docs/_build/html/_static/fonts/RobotoSlab-Regular.ttf -------------------------------------------------------------------------------- /docs/_build/html/_static/fonts/RobotoSlab/roboto-slab-v7-bold.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hover2pi/svo_filters/ac7fe3a7c405627810ae4d35dc29c118d1b6def8/docs/_build/html/_static/fonts/RobotoSlab/roboto-slab-v7-bold.eot -------------------------------------------------------------------------------- /docs/_build/html/_static/fonts/RobotoSlab/roboto-slab-v7-bold.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hover2pi/svo_filters/ac7fe3a7c405627810ae4d35dc29c118d1b6def8/docs/_build/html/_static/fonts/RobotoSlab/roboto-slab-v7-bold.ttf -------------------------------------------------------------------------------- /docs/_build/html/_static/fonts/RobotoSlab/roboto-slab-v7-bold.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hover2pi/svo_filters/ac7fe3a7c405627810ae4d35dc29c118d1b6def8/docs/_build/html/_static/fonts/RobotoSlab/roboto-slab-v7-bold.woff -------------------------------------------------------------------------------- /docs/_build/html/_static/fonts/RobotoSlab/roboto-slab-v7-bold.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hover2pi/svo_filters/ac7fe3a7c405627810ae4d35dc29c118d1b6def8/docs/_build/html/_static/fonts/RobotoSlab/roboto-slab-v7-bold.woff2 -------------------------------------------------------------------------------- /docs/_build/html/_static/fonts/RobotoSlab/roboto-slab-v7-regular.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hover2pi/svo_filters/ac7fe3a7c405627810ae4d35dc29c118d1b6def8/docs/_build/html/_static/fonts/RobotoSlab/roboto-slab-v7-regular.eot -------------------------------------------------------------------------------- /docs/_build/html/_static/fonts/RobotoSlab/roboto-slab-v7-regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hover2pi/svo_filters/ac7fe3a7c405627810ae4d35dc29c118d1b6def8/docs/_build/html/_static/fonts/RobotoSlab/roboto-slab-v7-regular.ttf -------------------------------------------------------------------------------- /docs/_build/html/_static/fonts/RobotoSlab/roboto-slab-v7-regular.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hover2pi/svo_filters/ac7fe3a7c405627810ae4d35dc29c118d1b6def8/docs/_build/html/_static/fonts/RobotoSlab/roboto-slab-v7-regular.woff -------------------------------------------------------------------------------- /docs/_build/html/_static/fonts/RobotoSlab/roboto-slab-v7-regular.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hover2pi/svo_filters/ac7fe3a7c405627810ae4d35dc29c118d1b6def8/docs/_build/html/_static/fonts/RobotoSlab/roboto-slab-v7-regular.woff2 -------------------------------------------------------------------------------- /docs/_build/html/_static/fonts/fontawesome-webfont.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hover2pi/svo_filters/ac7fe3a7c405627810ae4d35dc29c118d1b6def8/docs/_build/html/_static/fonts/fontawesome-webfont.eot -------------------------------------------------------------------------------- /docs/_build/html/_static/fonts/fontawesome-webfont.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hover2pi/svo_filters/ac7fe3a7c405627810ae4d35dc29c118d1b6def8/docs/_build/html/_static/fonts/fontawesome-webfont.ttf -------------------------------------------------------------------------------- /docs/_build/html/_static/fonts/fontawesome-webfont.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hover2pi/svo_filters/ac7fe3a7c405627810ae4d35dc29c118d1b6def8/docs/_build/html/_static/fonts/fontawesome-webfont.woff -------------------------------------------------------------------------------- /docs/_build/html/_static/fonts/fontawesome-webfont.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hover2pi/svo_filters/ac7fe3a7c405627810ae4d35dc29c118d1b6def8/docs/_build/html/_static/fonts/fontawesome-webfont.woff2 -------------------------------------------------------------------------------- /docs/_build/html/_static/js/theme.js: -------------------------------------------------------------------------------- 1 | /* sphinx_rtd_theme version 0.4.2 | MIT license */ 2 | /* Built 20181005 13:10 */ 3 | require=function r(s,a,l){function c(e,n){if(!a[e]){if(!s[e]){var i="function"==typeof require&&require;if(!n&&i)return i(e,!0);if(u)return u(e,!0);var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}var o=a[e]={exports:{}};s[e][0].call(o.exports,function(n){return c(s[e][1][n]||n)},o,o.exports,r,s,a,l)}return a[e].exports}for(var u="function"==typeof require&&require,n=0;n"),i("table.docutils.footnote").wrap("
"),i("table.docutils.citation").wrap("
"),i(".wy-menu-vertical ul").not(".simple").siblings("a").each(function(){var e=i(this);expand=i(''),expand.on("click",function(n){return t.toggleCurrent(e),n.stopPropagation(),!1}),e.prepend(expand)})},reset:function(){var n=encodeURI(window.location.hash)||"#";try{var e=$(".wy-menu-vertical"),i=e.find('[href="'+n+'"]');if(0===i.length){var t=$('.document [id="'+n.substring(1)+'"]').closest("div.section");0===(i=e.find('[href="#'+t.attr("id")+'"]')).length&&(i=e.find('[href="#"]'))}0this.docHeight||(this.navBar.scrollTop(i),this.winPosition=n)},onResize:function(){this.winResize=!1,this.winHeight=this.win.height(),this.docHeight=$(document).height()},hashChange:function(){this.linkScroll=!0,this.win.one("hashchange",function(){this.linkScroll=!1})},toggleCurrent:function(n){var e=n.closest("li");e.siblings("li.current").removeClass("current"),e.siblings().find("li.current").removeClass("current"),e.find("> ul li.current").removeClass("current"),e.toggleClass("current")}},"undefined"!=typeof window&&(window.SphinxRtdTheme={Navigation:e.exports.ThemeNav,StickyNav:e.exports.ThemeNav}),function(){for(var r=0,n=["ms","moz","webkit","o"],e=0;e2;a== 12 | null&&(a=[]);if(y&&a.reduce===y)return e&&(c=b.bind(c,e)),f?a.reduce(c,d):a.reduce(c);j(a,function(a,b,i){f?d=c.call(e,d,a,b,i):(d=a,f=true)});if(!f)throw new TypeError("Reduce of empty array with no initial value");return d};b.reduceRight=b.foldr=function(a,c,d,e){var f=arguments.length>2;a==null&&(a=[]);if(z&&a.reduceRight===z)return e&&(c=b.bind(c,e)),f?a.reduceRight(c,d):a.reduceRight(c);var g=b.toArray(a).reverse();e&&!f&&(c=b.bind(c,e));return f?b.reduce(g,c,d,e):b.reduce(g,c)};b.find=b.detect= 13 | function(a,c,b){var e;E(a,function(a,g,h){if(c.call(b,a,g,h))return e=a,true});return e};b.filter=b.select=function(a,c,b){var e=[];if(a==null)return e;if(A&&a.filter===A)return a.filter(c,b);j(a,function(a,g,h){c.call(b,a,g,h)&&(e[e.length]=a)});return e};b.reject=function(a,c,b){var e=[];if(a==null)return e;j(a,function(a,g,h){c.call(b,a,g,h)||(e[e.length]=a)});return e};b.every=b.all=function(a,c,b){var e=true;if(a==null)return e;if(B&&a.every===B)return a.every(c,b);j(a,function(a,g,h){if(!(e= 14 | e&&c.call(b,a,g,h)))return n});return e};var E=b.some=b.any=function(a,c,d){c||(c=b.identity);var e=false;if(a==null)return e;if(C&&a.some===C)return a.some(c,d);j(a,function(a,b,h){if(e||(e=c.call(d,a,b,h)))return n});return!!e};b.include=b.contains=function(a,c){var b=false;if(a==null)return b;return p&&a.indexOf===p?a.indexOf(c)!=-1:b=E(a,function(a){return a===c})};b.invoke=function(a,c){var d=i.call(arguments,2);return b.map(a,function(a){return(b.isFunction(c)?c||a:a[c]).apply(a,d)})};b.pluck= 15 | function(a,c){return b.map(a,function(a){return a[c]})};b.max=function(a,c,d){if(!c&&b.isArray(a))return Math.max.apply(Math,a);if(!c&&b.isEmpty(a))return-Infinity;var e={computed:-Infinity};j(a,function(a,b,h){b=c?c.call(d,a,b,h):a;b>=e.computed&&(e={value:a,computed:b})});return e.value};b.min=function(a,c,d){if(!c&&b.isArray(a))return Math.min.apply(Math,a);if(!c&&b.isEmpty(a))return Infinity;var e={computed:Infinity};j(a,function(a,b,h){b=c?c.call(d,a,b,h):a;bd?1:0}),"value")};b.groupBy=function(a,c){var d={},e=b.isFunction(c)?c:function(a){return a[c]};j(a,function(a,b){var c=e(a,b);(d[c]||(d[c]=[])).push(a)});return d};b.sortedIndex=function(a, 17 | c,d){d||(d=b.identity);for(var e=0,f=a.length;e>1;d(a[g])=0})})};b.difference=function(a){var c=b.flatten(i.call(arguments,1));return b.filter(a,function(a){return!b.include(c,a)})};b.zip=function(){for(var a=i.call(arguments),c=b.max(b.pluck(a,"length")),d=Array(c),e=0;e=0;d--)b=[a[d].apply(this,b)];return b[0]}}; 24 | b.after=function(a,b){return a<=0?b():function(){if(--a<1)return b.apply(this,arguments)}};b.keys=J||function(a){if(a!==Object(a))throw new TypeError("Invalid object");var c=[],d;for(d in a)b.has(a,d)&&(c[c.length]=d);return c};b.values=function(a){return b.map(a,b.identity)};b.functions=b.methods=function(a){var c=[],d;for(d in a)b.isFunction(a[d])&&c.push(d);return c.sort()};b.extend=function(a){j(i.call(arguments,1),function(b){for(var d in b)a[d]=b[d]});return a};b.defaults=function(a){j(i.call(arguments, 25 | 1),function(b){for(var d in b)a[d]==null&&(a[d]=b[d])});return a};b.clone=function(a){return!b.isObject(a)?a:b.isArray(a)?a.slice():b.extend({},a)};b.tap=function(a,b){b(a);return a};b.isEqual=function(a,b){return q(a,b,[])};b.isEmpty=function(a){if(b.isArray(a)||b.isString(a))return a.length===0;for(var c in a)if(b.has(a,c))return false;return true};b.isElement=function(a){return!!(a&&a.nodeType==1)};b.isArray=o||function(a){return l.call(a)=="[object Array]"};b.isObject=function(a){return a===Object(a)}; 26 | b.isArguments=function(a){return l.call(a)=="[object Arguments]"};if(!b.isArguments(arguments))b.isArguments=function(a){return!(!a||!b.has(a,"callee"))};b.isFunction=function(a){return l.call(a)=="[object Function]"};b.isString=function(a){return l.call(a)=="[object String]"};b.isNumber=function(a){return l.call(a)=="[object Number]"};b.isNaN=function(a){return a!==a};b.isBoolean=function(a){return a===true||a===false||l.call(a)=="[object Boolean]"};b.isDate=function(a){return l.call(a)=="[object Date]"}; 27 | b.isRegExp=function(a){return l.call(a)=="[object RegExp]"};b.isNull=function(a){return a===null};b.isUndefined=function(a){return a===void 0};b.has=function(a,b){return I.call(a,b)};b.noConflict=function(){r._=G;return this};b.identity=function(a){return a};b.times=function(a,b,d){for(var e=0;e/g,">").replace(/"/g,""").replace(/'/g,"'").replace(/\//g,"/")};b.mixin=function(a){j(b.functions(a), 28 | function(c){K(c,b[c]=a[c])})};var L=0;b.uniqueId=function(a){var b=L++;return a?a+b:b};b.templateSettings={evaluate:/<%([\s\S]+?)%>/g,interpolate:/<%=([\s\S]+?)%>/g,escape:/<%-([\s\S]+?)%>/g};var t=/.^/,u=function(a){return a.replace(/\\\\/g,"\\").replace(/\\'/g,"'")};b.template=function(a,c){var d=b.templateSettings,d="var __p=[],print=function(){__p.push.apply(__p,arguments);};with(obj||{}){__p.push('"+a.replace(/\\/g,"\\\\").replace(/'/g,"\\'").replace(d.escape||t,function(a,b){return"',_.escape("+ 29 | u(b)+"),'"}).replace(d.interpolate||t,function(a,b){return"',"+u(b)+",'"}).replace(d.evaluate||t,function(a,b){return"');"+u(b).replace(/[\r\n\t]/g," ")+";__p.push('"}).replace(/\r/g,"\\r").replace(/\n/g,"\\n").replace(/\t/g,"\\t")+"');}return __p.join('');",e=new Function("obj","_",d);return c?e(c,b):function(a){return e.call(this,a,b)}};b.chain=function(a){return b(a).chain()};var m=function(a){this._wrapped=a};b.prototype=m.prototype;var v=function(a,c){return c?b(a).chain():a},K=function(a,c){m.prototype[a]= 30 | function(){var a=i.call(arguments);H.call(a,this._wrapped);return v(c.apply(b,a),this._chain)}};b.mixin(b);j("pop,push,reverse,shift,sort,splice,unshift".split(","),function(a){var b=k[a];m.prototype[a]=function(){var d=this._wrapped;b.apply(d,arguments);var e=d.length;(a=="shift"||a=="splice")&&e===0&&delete d[0];return v(d,this._chain)}});j(["concat","join","slice"],function(a){var b=k[a];m.prototype[a]=function(){return v(b.apply(this._wrapped,arguments),this._chain)}});m.prototype.chain=function(){this._chain= 31 | true;return this};m.prototype.value=function(){return this._wrapped}}).call(this); 32 | -------------------------------------------------------------------------------- /docs/_build/html/_static/up-pressed.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hover2pi/svo_filters/ac7fe3a7c405627810ae4d35dc29c118d1b6def8/docs/_build/html/_static/up-pressed.png -------------------------------------------------------------------------------- /docs/_build/html/_static/up.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hover2pi/svo_filters/ac7fe3a7c405627810ae4d35dc29c118d1b6def8/docs/_build/html/_static/up.png -------------------------------------------------------------------------------- /docs/_build/html/genindex.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | Index — svo_filters 0.2.16 documentation 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 |
42 | 43 | 44 | 93 | 94 |
95 | 96 | 97 | 103 | 104 | 105 |
106 | 107 |
108 | 109 | 110 | 111 | 112 | 113 | 114 | 115 | 116 | 117 | 118 | 119 | 120 | 121 | 122 | 123 | 124 | 125 |
126 | 127 |
    128 | 129 |
  • Docs »
  • 130 | 131 |
  • Index
  • 132 | 133 | 134 |
  • 135 | 136 | 137 | 138 |
  • 139 | 140 |
141 | 142 | 143 |
144 |
145 |
146 |
147 | 148 | 149 |

Index

150 | 151 |
152 | A 153 | | B 154 | | C 155 | | F 156 | | I 157 | | L 158 | | M 159 | | O 160 | | P 161 | | R 162 | | S 163 | | T 164 | | W 165 | | Z 166 | 167 |
168 |

A

169 | 170 | 174 |
175 | 176 |

B

177 | 178 | 182 | 186 |
187 | 188 |

C

189 | 190 | 194 | 200 |
201 | 202 |

F

203 | 204 | 212 | 222 |
223 | 224 |

I

225 | 226 | 230 |
231 | 232 |

L

233 | 234 | 238 | 244 |
245 | 246 |

M

247 | 248 | 252 |
253 | 254 |

O

255 | 256 | 260 |
261 | 262 |

P

263 | 264 | 270 | 278 |
279 | 280 |

R

281 | 282 | 286 | 292 |
293 | 294 |

S

295 | 296 | 300 |
301 | 302 |

T

303 | 304 | 308 |
309 | 310 |

W

311 | 312 | 326 | 342 |
343 | 344 |

Z

345 | 346 | 350 | 356 |
357 | 358 | 359 | 360 |
361 | 362 |
363 |
364 | 365 | 366 |
367 | 368 |
369 |

370 | © Copyright 2018, Joe Filippazzo 371 | 372 |

373 |
374 | Built with Sphinx using a theme provided by Read the Docs. 375 | 376 |
377 | 378 |
379 |
380 | 381 |
382 | 383 |
384 | 385 | 386 | 387 | 388 | 389 | 390 | 391 | 392 | 393 | 394 | 395 | 396 | 397 | 398 | 399 | 400 | 401 | 406 | 407 | 408 | -------------------------------------------------------------------------------- /docs/_build/html/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | svo_filters — svo_filters 0.2.16 documentation 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 |
42 | 43 | 44 | 93 | 94 |
95 | 96 | 97 | 103 | 104 | 105 |
106 | 107 |
108 | 109 | 110 | 111 | 112 | 113 | 114 | 115 | 116 | 117 | 118 | 119 | 120 | 121 | 122 | 123 | 124 | 125 |
126 | 127 |
    128 | 129 |
  • Docs »
  • 130 | 131 |
  • svo_filters
  • 132 | 133 | 134 |
  • 135 | 136 | 137 | View page source 138 | 139 | 140 |
  • 141 | 142 |
143 | 144 | 145 |
146 |
147 |
148 |
149 | 150 |
151 |

svo_filters

152 |

The Spanish Virtual Observatory (SVO) Filter Profile Service is a great resource for homogenized photometric filter curves and metadata. With svo_filters, I tried to create a lightweight and flexible package to incorporate these filters into Python applications.

153 |
154 |

Installation

155 |

To install svo_filters, do:

156 |
pip install svo_filters
157 | 
158 |
159 |

Alternatively, you can clone from Github with:

160 |
git clone https://github.com/hover2pi/svo_filters.git
161 | python svo_filters/setup.py install
162 | 
163 |
164 |
165 |
166 |

Load a Photometric Filter

167 |

The actual filters are stored locally as XML files and can be viewed with:

168 |
from svo_filters import svo
169 | svo.filters()
170 | 
171 |
172 |

To create a filter object, pass a bandpass name to the svo.Filter() class:

173 |
H_band = svo.Filter('2MASS.H')
174 | 
175 |
176 |

You can see some information about the filter with:

177 |
H_band.info()
178 | 
179 |
180 |

And you can plot the bandpass like so:

181 |
H_band.plot()
182 | 
183 |
184 | Filter bandpass 185 |
186 |
187 |

Load a Grism

188 |

Filters can also be binned arbitrarily, for use with grisms. We can pass integers to the n_bins or pixels_per_bin arguments to specify the number of wavelength bins or pixels per bin, respectively:

189 |
G141 = svo.Filter('WFC3_IR.G141', n_bins=15)
190 | 
191 |
192 | Filter bandpass 193 |
194 |
195 |

Apply a Filter to a Spectrum

196 |

Filters can be applied to a spectrum by passing a sequence of [W, F] or [W, F, E] with astropy units to the apply() method:

197 |
filtered = G141.apply(spec, plot=True)
198 | 
199 |
200 | Filter bandpass 201 |
202 |
203 |
204 |

Contents

205 |
206 | 209 |
210 |

A Python wrapper for the SVO Filter Profile Service

211 |
212 | 213 | 214 |
215 | 216 |
217 |
218 | 219 | 225 | 226 | 227 |
228 | 229 |
230 |

231 | © Copyright 2018, Joe Filippazzo 232 | 233 |

234 |
235 | Built with Sphinx using a theme provided by Read the Docs. 236 | 237 |
238 | 239 |
240 |
241 | 242 |
243 | 244 |
245 | 246 | 247 | 248 | 249 | 250 | 251 | 252 | 253 | 254 | 255 | 256 | 257 | 258 | 259 | 260 | 261 | 262 | 267 | 268 | 269 | -------------------------------------------------------------------------------- /docs/_build/html/objects.inv: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hover2pi/svo_filters/ac7fe3a7c405627810ae4d35dc29c118d1b6def8/docs/_build/html/objects.inv -------------------------------------------------------------------------------- /docs/_build/html/py-modindex.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | Python Module Index — svo_filters 0.2.16 documentation 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 |
48 | 49 | 50 | 99 | 100 |
101 | 102 | 103 | 109 | 110 | 111 |
112 | 113 |
114 | 115 | 116 | 117 | 118 | 119 | 120 | 121 | 122 | 123 | 124 | 125 | 126 | 127 | 128 | 129 | 130 | 131 |
132 | 133 |
    134 | 135 |
  • Docs »
  • 136 | 137 |
  • Python Module Index
  • 138 | 139 | 140 |
  • 141 | 142 |
  • 143 | 144 |
145 | 146 | 147 |
148 |
149 |
150 |
151 | 152 | 153 |

Python Module Index

154 | 155 |
156 | s 157 |
158 | 159 | 160 | 161 | 163 | 164 | 165 | 168 |
 
162 | s
166 | svo 167 |
169 | 170 | 171 |
172 | 173 |
174 |
175 | 176 | 177 |
178 | 179 |
180 |

181 | © Copyright 2018, Joe Filippazzo 182 | 183 |

184 |
185 | Built with Sphinx using a theme provided by Read the Docs. 186 | 187 |
188 | 189 |
190 |
191 | 192 |
193 | 194 |
195 | 196 | 197 | 198 | 199 | 200 | 201 | 202 | 203 | 204 | 205 | 206 | 207 | 208 | 209 | 210 | 211 | 212 | 217 | 218 | 219 | -------------------------------------------------------------------------------- /docs/_build/html/search.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | Search — svo_filters 0.2.16 documentation 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 |
41 | 42 | 43 | 92 | 93 |
94 | 95 | 96 | 102 | 103 | 104 |
105 | 106 |
107 | 108 | 109 | 110 | 111 | 112 | 113 | 114 | 115 | 116 | 117 | 118 | 119 | 120 | 121 | 122 | 123 | 124 |
125 | 126 |
    127 | 128 |
  • Docs »
  • 129 | 130 |
  • Search
  • 131 | 132 | 133 |
  • 134 | 135 | 136 | 137 |
  • 138 | 139 |
140 | 141 | 142 |
143 |
144 |
145 |
146 | 147 | 155 | 156 | 157 |
158 | 159 |
160 | 161 |
162 | 163 |
164 |
165 | 166 | 167 |
168 | 169 |
170 |

171 | © Copyright 2018, Joe Filippazzo 172 | 173 |

174 |
175 | Built with Sphinx using a theme provided by Read the Docs. 176 | 177 |
178 | 179 |
180 |
181 | 182 |
183 | 184 |
185 | 186 | 187 | 188 | 189 | 190 | 191 | 192 | 193 | 194 | 195 | 196 | 197 | 198 | 199 | 200 | 201 | 202 | 203 | 208 | 211 | 212 | 213 | 214 | 215 | 216 | 217 | -------------------------------------------------------------------------------- /docs/_build/html/searchindex.js: -------------------------------------------------------------------------------- 1 | Search.setIndex({docnames:["index","svo"],envversion:{"sphinx.domains.c":1,"sphinx.domains.changeset":1,"sphinx.domains.cpp":1,"sphinx.domains.javascript":1,"sphinx.domains.math":2,"sphinx.domains.python":1,"sphinx.domains.rst":1,"sphinx.domains.std":1,"sphinx.ext.intersphinx":1,"sphinx.ext.todo":1,"sphinx.ext.viewcode":1,sphinx:55},filenames:["index.rst","svo.rst"],objects:{"":{svo:[1,0,0,"-"]},"svo.Filter":{Band:[1,2,1,""],CalibrationReference:[1,2,1,""],FWHM:[1,2,1,""],Facility:[1,2,1,""],FilterProfileService:[1,2,1,""],MagSys:[1,2,1,""],PhotCalID:[1,2,1,""],PhotSystem:[1,2,1,""],ProfileReference:[1,2,1,""],WavelengthCen:[1,2,1,""],WavelengthEff:[1,2,1,""],WavelengthMax:[1,2,1,""],WavelengthMean:[1,2,1,""],WavelengthMin:[1,2,1,""],WavelengthPeak:[1,2,1,""],WavelengthPhot:[1,2,1,""],WavelengthPivot:[1,2,1,""],WavelengthUCD:[1,2,1,""],WavelengthUnit:[1,2,1,""],WidthEff:[1,2,1,""],ZeroPoint:[1,2,1,""],ZeroPointType:[1,2,1,""],ZeroPointUnit:[1,2,1,""],apply:[1,3,1,""],bin:[1,3,1,""],centers:[1,2,1,""],filterID:[1,2,1,""],flux_units:[1,2,1,""],info:[1,3,1,""],load_TopHat:[1,3,1,""],load_txt:[1,3,1,""],load_xml:[1,3,1,""],overlap:[1,3,1,""],path:[1,2,1,""],plot:[1,3,1,""],refs:[1,2,1,""],rsr:[1,2,1,""],throughput:[1,2,1,""],wave:[1,2,1,""],wave_units:[1,2,1,""]},svo:{Filter:[1,1,1,""],color_gen:[1,4,1,""],filters:[1,4,1,""],rebin_spec:[1,4,1,""]}},objnames:{"0":["py","module","Python module"],"1":["py","class","Python class"],"2":["py","attribute","Python attribute"],"3":["py","method","Python method"],"4":["py","function","Python function"]},objtypes:{"0":"py:module","1":"py:class","2":"py:attribute","3":"py:method","4":"py:function"},terms:{"2mass":0,"break":1,"class":[0,1],"float":1,"import":0,"int":1,"new":1,"return":1,"true":0,"while":1,And:0,The:[0,1],With:0,about:[0,1],absolut:1,actual:0,also:0,altern:0,angstrom:1,ans:1,appli:1,applic:0,arbitrarili:0,argument:0,arrai:1,ascii:1,astropi:[0,1],avail:1,averag:1,band:1,bandpass:[0,1],base:1,bin:[0,1],bokeh:1,bool:1,calcul:1,calibr:1,calibrationrefer:1,can:0,center:1,channel:1,check:1,clone:0,cm2:1,color:1,color_gen:1,colormap:1,column:1,com:0,contain:1,creat:[0,1],current:1,curv:[0,1],data:1,detail:1,dice:1,directori:1,distribut:1,each:1,effect:1,erg:1,exampl:1,facil:1,fals:1,fetch:1,fig:1,file:[0,1],filepath:1,filter:1,filter_directori:1,filterid:1,filterprofileservic:1,flexibl:0,flux:1,flux_unit:1,fmt:1,format:1,from:[0,1],full:1,fwhm:1,g102:1,g141:[0,1],gener:1,get:1,getter:1,git:0,github:0,given:1,great:0,grism:1,h_band:0,hat:1,homogen:0,hover2pi:0,http:0,incorpor:0,index:[],info:[0,1],inform:0,integ:0,kei:1,kwarg:1,lightweight:0,like:[0,1],list:1,load:1,load_tophat:1,load_txt:1,load_xml:1,local:0,magnitud:1,magsi:1,main:1,map:1,max:1,maximum:1,mean:1,metadata:[0,1],method:0,min:1,minimum:1,modul:0,n_bin:[0,1],n_pixel:1,name:[0,1],ndarrai:1,none:1,number:[0,1],object:[0,1],observatori:0,option:1,origin:1,other:1,overlap:1,oversamp:1,packag:0,page:[],palett:1,paper:1,paramet:1,partial:1,pass:0,path:1,peak:1,per:[0,1],photcalid:1,photometr:1,photon:1,photsystem:1,pickl:1,pip:0,pivot:1,pixel:[0,1],pixels_per_bin:[0,1],plot:[0,1],point:1,preserv:1,print:1,profil:[0,1],profilerefer:1,python:[0,1],quantiti:1,rang:1,rebin:1,rebin_spec:1,ref:1,refer:1,rel:1,resourc:0,respect:0,respons:1,rsr:1,search:[],see:0,self:1,sequenc:[0,1],servic:[0,1],setup:0,some:0,someinform:[],sourc:1,spanish:0,spec:[0,1],specifi:0,spectral:1,spectrum:1,standard:1,statu:1,store:[0,1],str:1,svo:0,svo_filt:1,system:1,tabl:1,telescop:1,test:1,thi:1,throughput:1,top:1,total:1,tri:0,txt:1,type:1,unit:[0,1],updat:1,use:[0,1],used:1,useful:1,valu:1,view:0,viridi:1,virtual:0,wave:1,wave_max:1,wave_min:1,wave_unit:1,wavelength:[0,1],wavelengthcen:1,wavelengtheff:1,wavelengthmax:1,wavelengthmean:1,wavelengthmin:1,wavelengthpeak:1,wavelengthphot:1,wavelengthpivot:1,wavelengthucd:1,wavelengthunit:1,wavenew:1,wavnew:1,wfc3_ir:0,which:1,width:1,widtheff:1,wrapper:[0,1],xml:0,you:0,zero:1,zeropoint:1,zeropointtyp:1,zeropointunit:1},titles:["svo_filters","svo module"],titleterms:{appli:0,content:0,document:[],filter:0,grism:0,indic:[],instal:0,load:0,modul:1,photometr:0,spectrum:0,svo:1,svo_filt:0,tabl:[],welcom:[]}}) -------------------------------------------------------------------------------- /docs/conf.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # 3 | # Configuration file for the Sphinx documentation builder. 4 | # 5 | # This file does only contain a selection of the most common options. For a 6 | # full list see the documentation: 7 | # http://www.sphinx-doc.org/en/master/config 8 | 9 | # -- Path setup -------------------------------------------------------------- 10 | 11 | # If extensions (or modules to document with autodoc) are in another directory, 12 | # add these directories to sys.path here. If the directory is relative to the 13 | # documentation root, use os.path.abspath to make it absolute, like shown here. 14 | # 15 | import os 16 | import sys 17 | sys.path.insert(0, os.path.abspath('.')) 18 | sys.path.append(os.path.abspath('../svo_filters/')) 19 | 20 | # -- Project information ----------------------------------------------------- 21 | 22 | project = 'svo_filters' 23 | copyright = '2018, Joe Filippazzo' 24 | author = 'Joe Filippazzo' 25 | 26 | # The short X.Y version 27 | version = '0.2' 28 | # The full version, including alpha/beta/rc tags 29 | release = '0.2.16' 30 | 31 | 32 | # -- General configuration --------------------------------------------------- 33 | 34 | # If your documentation needs a minimal Sphinx version, state it here. 35 | # 36 | # needs_sphinx = '1.0' 37 | 38 | # Add any Sphinx extension module names here, as strings. They can be 39 | # extensions coming with Sphinx (named 'sphinx.ext.*') or your custom 40 | # ones. 41 | extensions = [ 42 | 'sphinx.ext.autodoc', 43 | 'sphinx.ext.doctest', 44 | 'sphinx.ext.napoleon', 45 | 'sphinx.ext.autosummary', 46 | 'sphinx.ext.intersphinx', 47 | 'sphinx.ext.todo', 48 | 'sphinx.ext.coverage', 49 | 'sphinx.ext.mathjax', 50 | 'sphinx.ext.ifconfig', 51 | 'sphinx.ext.viewcode', 52 | 'sphinx.ext.githubpages', 53 | ] 54 | 55 | # Add any paths that contain templates here, relative to this directory. 56 | templates_path = ['_templates'] 57 | 58 | # The suffix(es) of source filenames. 59 | # You can specify multiple suffix as a list of string: 60 | # 61 | # source_suffix = ['.rst', '.md'] 62 | source_suffix = '.rst' 63 | 64 | # The master toctree document. 65 | master_doc = 'index' 66 | 67 | # The language for content autogenerated by Sphinx. Refer to documentation 68 | # for a list of supported languages. 69 | # 70 | # This is also used if you do content translation via gettext catalogs. 71 | # Usually you set "language" from the command line for these cases. 72 | language = None 73 | 74 | # List of patterns, relative to source directory, that match files and 75 | # directories to ignore when looking for source files. 76 | # This pattern also affects html_static_path and html_extra_path. 77 | exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store'] 78 | 79 | # The name of the Pygments (syntax highlighting) style to use. 80 | pygments_style = None 81 | 82 | 83 | # -- Options for HTML output ------------------------------------------------- 84 | 85 | # The theme to use for HTML and HTML Help pages. See the documentation for 86 | # a list of builtin themes. 87 | # 88 | # html_theme = 'alabaster' 89 | # The theme to use for HTML and HTML Help pages. See the documentation for 90 | # a list of builtin themes. 91 | on_rtd = os.environ.get('READTHEDOCS', None) == 'True' 92 | if not on_rtd: # only import and set the theme if we're building docs locally 93 | import sphinx_rtd_theme 94 | html_theme = 'sphinx_rtd_theme' 95 | html_theme_path = [sphinx_rtd_theme.get_html_theme_path()] 96 | 97 | # Theme options are theme-specific and customize the look and feel of a theme 98 | # further. For a list of options available for each theme, see the 99 | # documentation. 100 | # 101 | # html_theme_options = {} 102 | 103 | # Add any paths that contain custom static files (such as style sheets) here, 104 | # relative to this directory. They are copied after the builtin static files, 105 | # so a file named "default.css" will overwrite the builtin "default.css". 106 | html_static_path = ['_static'] 107 | 108 | # Custom sidebar templates, must be a dictionary that maps document names 109 | # to template names. 110 | # 111 | # The default sidebars (for documents that don't match any pattern) are 112 | # defined by theme itself. Builtin themes are using these templates by 113 | # default: ``['localtoc.html', 'relations.html', 'sourcelink.html', 114 | # 'searchbox.html']``. 115 | # 116 | # html_sidebars = {} 117 | 118 | 119 | # -- Options for HTMLHelp output --------------------------------------------- 120 | 121 | # Output file base name for HTML help builder. 122 | htmlhelp_basename = 'svo_filtersdoc' 123 | 124 | 125 | # -- Options for LaTeX output ------------------------------------------------ 126 | 127 | latex_elements = { 128 | # The paper size ('letterpaper' or 'a4paper'). 129 | # 130 | # 'papersize': 'letterpaper', 131 | 132 | # The font size ('10pt', '11pt' or '12pt'). 133 | # 134 | # 'pointsize': '10pt', 135 | 136 | # Additional stuff for the LaTeX preamble. 137 | # 138 | # 'preamble': '', 139 | 140 | # Latex figure (float) alignment 141 | # 142 | # 'figure_align': 'htbp', 143 | } 144 | 145 | # Grouping the document tree into LaTeX files. List of tuples 146 | # (source start file, target name, title, 147 | # author, documentclass [howto, manual, or own class]). 148 | latex_documents = [ 149 | (master_doc, 'svo_filters.tex', 'svo\\_filters Documentation', 150 | 'Joe Filippazzo', 'manual'), 151 | ] 152 | 153 | 154 | # -- Options for manual page output ------------------------------------------ 155 | 156 | # One entry per manual page. List of tuples 157 | # (source start file, name, description, authors, manual section). 158 | man_pages = [ 159 | (master_doc, 'svo_filters', 'svo_filters Documentation', 160 | [author], 1) 161 | ] 162 | 163 | 164 | # -- Options for Texinfo output ---------------------------------------------- 165 | 166 | # Grouping the document tree into Texinfo files. List of tuples 167 | # (source start file, target name, title, author, 168 | # dir menu entry, description, category) 169 | texinfo_documents = [ 170 | (master_doc, 'svo_filters', 'svo_filters Documentation', 171 | author, 'svo_filters', 'A Python wrapper for the SVO Filter Profile Service', 172 | 'Miscellaneous'), 173 | ] 174 | 175 | 176 | # -- Options for Epub output ------------------------------------------------- 177 | 178 | # Bibliographic Dublin Core info. 179 | epub_title = project 180 | 181 | # The unique identifier of the text. This can be a ISBN number 182 | # or the project homepage. 183 | # 184 | # epub_identifier = '' 185 | 186 | # A unique identification for the text. 187 | # 188 | # epub_uid = '' 189 | 190 | # A list of files that should not be packed into the epub file. 191 | epub_exclude_files = ['search.html'] 192 | 193 | 194 | # -- Extension configuration ------------------------------------------------- 195 | 196 | # -- Options for intersphinx extension --------------------------------------- 197 | 198 | # Example configuration for intersphinx: refer to the Python standard library. 199 | intersphinx_mapping = {'https://docs.python.org/': None} 200 | 201 | # -- Options for todo extension ---------------------------------------------- 202 | 203 | # If true, `todo` and `todoList` produce output, else they produce nothing. 204 | todo_include_todos = True -------------------------------------------------------------------------------- /docs/index.rst: -------------------------------------------------------------------------------- 1 | svo_filters 2 | =========== 3 | 4 | The `Spanish Virtual Observatory (SVO) Filter Profile Service `_ is a great resource for homogenized photometric filter curves and metadata. With `svo_filters`, I tried to create a lightweight and flexible package to incorporate these filters into Python applications. 5 | 6 | Installation 7 | ------------ 8 | 9 | To install **svo_filters**, do:: 10 | 11 | pip install svo_filters 12 | 13 | Alternatively, you can clone from Github with:: 14 | 15 | git clone https://github.com/hover2pi/svo_filters.git 16 | python svo_filters/setup.py install 17 | 18 | Load a Photometric Filter 19 | ---------------------------- 20 | 21 | The actual filters are stored locally as XML files and can be viewed with:: 22 | 23 | from svo_filters import svo 24 | svo.filters() 25 | 26 | To create a filter object, pass a bandpass name to the :py:class:`svo.Filter()` class:: 27 | 28 | H_band = svo.Filter('2MASS.H') 29 | 30 | You can see some information about the filter with:: 31 | 32 | H_band.info() 33 | 34 | And you can plot the bandpass like so:: 35 | 36 | H_band.plot() 37 | 38 | .. image:: ../svo_filters/data/plots/H.png 39 | :align: center 40 | :height: 300px 41 | :alt: Filter bandpass 42 | 43 | Load a Grism 44 | ------------ 45 | 46 | Filters can also be binned arbitrarily, for use with grisms. We can pass integers to the ``n_bins`` or ``pixels_per_bin`` arguments to specify the number of wavelength bins or pixels per bin, respectively:: 47 | 48 | G141 = svo.Filter('WFC3_IR.G141', n_bins=15) 49 | 50 | .. image:: ../svo_filters/data/plots/G141.png 51 | :align: center 52 | :height: 300px 53 | :alt: Filter bandpass 54 | 55 | Apply a Filter to a Spectrum 56 | ---------------------------- 57 | 58 | Filters can be applied to a spectrum by passing a sequence of [W, F] or [W, F, E] with astropy units to the :py:meth:`~svo.Filter.apply` method:: 59 | 60 | filtered = G141.apply(spec, plot=True) 61 | 62 | .. image:: ../svo_filters/data/plots/filtered.png 63 | :align: center 64 | :height: 300px 65 | :alt: Filter bandpass 66 | 67 | Contents 68 | ======== 69 | 70 | .. toctree:: 71 | :maxdepth: 2 72 | 73 | svo 74 | 75 | .. automodule:: svo 76 | -------------------------------------------------------------------------------- /docs/make.bat: -------------------------------------------------------------------------------- 1 | @ECHO OFF 2 | 3 | pushd %~dp0 4 | 5 | REM Command file for Sphinx documentation 6 | 7 | if "%SPHINXBUILD%" == "" ( 8 | set SPHINXBUILD=sphinx-build 9 | ) 10 | set SOURCEDIR=. 11 | set BUILDDIR=_build 12 | 13 | if "%1" == "" goto help 14 | 15 | %SPHINXBUILD% >NUL 2>NUL 16 | if errorlevel 9009 ( 17 | echo. 18 | echo.The 'sphinx-build' command was not found. Make sure you have Sphinx 19 | echo.installed, then set the SPHINXBUILD environment variable to point 20 | echo.to the full path of the 'sphinx-build' executable. Alternatively you 21 | echo.may add the Sphinx directory to PATH. 22 | echo. 23 | echo.If you don't have Sphinx installed, grab it from 24 | echo.http://sphinx-doc.org/ 25 | exit /b 1 26 | ) 27 | 28 | %SPHINXBUILD% -M %1 %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% 29 | goto end 30 | 31 | :help 32 | %SPHINXBUILD% -M help %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% 33 | 34 | :end 35 | popd 36 | -------------------------------------------------------------------------------- /docs/svo.rst: -------------------------------------------------------------------------------- 1 | svo module 2 | ========== 3 | 4 | This is the main module for `svo_filters`. 5 | 6 | .. automodule:: svo 7 | :members: 8 | :undoc-members: 9 | :show-inheritance: -------------------------------------------------------------------------------- /env/environment-3.10.yml: -------------------------------------------------------------------------------- 1 | name: svo_filters-3.10 2 | channels: 3 | - defaults 4 | - http://ssb.stsci.edu/astroconda 5 | dependencies: 6 | - astropy>=5.3.1 7 | - bokeh>=3.2.1 8 | - matplotlib 9 | - numpy>=1.25.1 10 | - numpydoc=1.1.0 11 | - pytest>=7.4.0 12 | - python>=3.10 13 | - pip: 14 | - PyYAML>=5.4 15 | - sphinx_astropy==1.3 16 | - astroquery -------------------------------------------------------------------------------- /env/environment-3.11.yml: -------------------------------------------------------------------------------- 1 | name: svo_filters-3.11 2 | channels: 3 | - defaults 4 | - http://ssb.stsci.edu/astroconda 5 | dependencies: 6 | - astropy>=5.3.1 7 | - bokeh>=3.2.1 8 | - matplotlib 9 | - numpy>=1.25.1 10 | - numpydoc=1.1.0 11 | - pytest>=7.4.0 12 | - python>=3.9 13 | - pip: 14 | - PyYAML>=5.4 15 | - sphinx_astropy==1.3 16 | - astroquery -------------------------------------------------------------------------------- /setup.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | import os 3 | from setuptools import setup, find_packages 4 | 5 | REQUIRES = ['astropy', 6 | 'bokeh', 7 | 'ipython', 8 | 'matplotlib', 9 | 'numpy', 10 | 'numpydoc', 11 | 'pytest', 12 | 'pyyaml'] 13 | 14 | DEPENDENCY_LINKS = [ 15 | 'git+https://github.com/astropy/astroquery.git@ccc96185beeff86f3a12a31a00a801afcebe1dbe'] 16 | 17 | FILES = [] 18 | for root, _, files in os.walk("svo_filters"): 19 | FILES += [os.path.join(root.replace("svo_filters/", ""), fname) 20 | for fname in files if not fname.endswith(".py") and not fname.endswith(".pyc")] 21 | 22 | setup( 23 | name='svo_filters', 24 | version='0.5.2', 25 | description='A Python wrapper for the SVO Filter Profile Service', 26 | packages=find_packages( 27 | ".", 28 | exclude=["*.tests"]), 29 | package_data={ 30 | 'svo_filters': FILES}, 31 | install_requires=REQUIRES, 32 | dependency_links=DEPENDENCY_LINKS, 33 | author='Joe Filippazzo', 34 | author_email='jfilippazzo@stsci.edu', 35 | license='MIT', 36 | url='https://github.com/hover2pi/svo_filters', 37 | long_description='', 38 | zip_safe=True, 39 | use_2to3=False) 40 | -------------------------------------------------------------------------------- /svo_filters/__init__.py: -------------------------------------------------------------------------------- 1 | from .svo import Filter -------------------------------------------------------------------------------- /svo_filters/data/filters/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hover2pi/svo_filters/ac7fe3a7c405627810ae4d35dc29c118d1b6def8/svo_filters/data/filters/.gitkeep -------------------------------------------------------------------------------- /svo_filters/data/filters/2MASS.H: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | Photometric system 13 | 14 | 15 | 16 | Observational facility 17 | 18 | 19 | 20 | 21 | 22 | Manually specified. See reference 23 | 24 | 25 | Manually specified. See reference 26 | 27 | 28 | Minimum filter wavelength. Defined as the first lambda value with a transmission at least 1% of maximum transmission 29 | 30 | 31 | Maximum filter wavelength. Defined as the last lambda value with a transmission at least 1% of maximum transmission 32 | 33 | 34 | Effective width. Defined as integ[x*filter(x) dx].\nEquivalent to the horizontal size of a rectangle with height equal to maximum transmission and with the same area that the one covered by the filter transmission curve. 35 | 36 | 37 | Central wavelength. Defined as the central wavelength between the two points defining FWMH 38 | 39 | 40 | Peak wavelength. Defined as sqrt{integ[x*filter(x) dx]/integ[filter(x) dx/x]} 41 | 42 | 43 | Peak wavelength. Defined as the lambda value with larger transmission 44 | 45 | 46 | Photon distribution based effective wavelength. Defined as integ[x^2*filter(x)*vega(x) dx]/integ[x*filter(x)*vega(x) dx] 47 | 48 | 49 | Full width at half maximum. Defined as the difference between the two wavelengths for which filter transmission is half maximum 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | 110 | 111 | 112 | 113 | 114 | 115 | 116 | 117 | 118 | 119 | 120 | 121 | 122 | 123 | 124 | 125 | 126 | 127 | 128 | 129 | 130 | 131 | 132 | 133 | 134 | 135 | 136 | 137 | 138 | 139 | 140 | 141 | 142 | 143 | 144 | 145 | 146 | 147 | 148 | 149 | 150 | 151 | 152 | 153 | 154 | 155 | 156 | 157 | 158 | 159 | 160 | 161 | 162 | 163 | 164 | 165 | 166 | 167 | 168 | 169 | 170 | 171 | 172 | 173 | 174 | 175 | 176 | 177 | 178 | 179 | 180 | 181 | 182 | 183 | 184 | 185 | 186 | 187 | 188 | 189 | 190 | 191 | 192 | 193 | 194 | 195 | 196 | 197 | 198 | 199 | 200 | 201 | 202 | 203 | 204 | 205 | 206 | 207 | 208 | 209 | 210 | 211 | 212 | 213 | 214 | 215 | 216 | 217 | 218 | 219 | 220 | 221 | 222 | 223 | 224 | 225 | 226 | 227 | 228 | 229 | 230 | 231 | 232 | 233 | 234 | 235 | 236 | 237 | 238 | 239 | 240 | 241 | 242 | 243 | 244 | 245 | 246 | 247 | 248 | 249 | 250 | 251 | 252 | 253 | 254 | 255 | 256 | 257 | 258 | 259 | 260 | 261 | 262 | 263 | 264 | 265 | 266 | 267 | 268 | 269 | 270 | 271 | 272 | 273 | 274 | 275 | 276 | 277 | 278 | 279 | 280 | 281 | 282 | 283 | 284 | 285 | 286 | 287 | 288 | 289 | 290 | 291 | 292 | 293 | 294 |
12890.00.0000000000
13150.00.0000000000
13410.00.0000000000
13680.00.0000000000
13970.00.0000000000
14180.00.0000000000
14400.00.0005000000
14620.00.0027999999
14780.00.0081000002
14860.00.0286999997
14930.00.0870999992
15040.00.2013999969
15150.00.4381999969
15280.00.6863999963
15390.00.8180999756
15460.00.8820999861
15510.00.9118000269
15560.00.9269000292
15650.00.9293000102
15720.00.8726999760
15770.00.8565999866
15830.00.8826000094
15920.00.9180999994
15970.00.9266999960
16020.00.9075999856
16130.00.9259999990
16190.00.9204999804
16280.00.9241999984
16330.00.9235000014
16420.00.9417999983
16480.00.9491000175
16570.00.9807000160
16590.00.9937000275
16710.01.0000000000
16840.00.9560999870
17010.00.9240999818
17150.00.9821000099
17270.00.9915999770
17390.00.9886999726
17460.00.9792000055
17510.00.9682000279
17530.00.9369999766
17560.00.9190000296
17640.00.8422999978
17750.00.6671000123
17850.00.2694000006
17900.00.4515999854
17960.00.1730999947
18030.00.1076999977
18100.00.0706999972
18130.00.0051000002
18180.00.0199999996
18280.00.0004000000
18350.00.0000000000
18500.00.0001000000
18710.00.0000000000
18930.00.0000000000
19140.00.0000000000
295 |
296 |
297 | -------------------------------------------------------------------------------- /svo_filters/data/filters/Cousins.I: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | Photometric system 13 | 14 | 15 | 16 | 17 | 18 | Mean wavelength. Defined as integ[x*filter(x) dx]/integ[filter(x) dx] 19 | 20 | 21 | Effective wavelength. Defined as integ[x*filter(x)*vega(x) dx]/integ[filter(x)*vega(x) dx] 22 | 23 | 24 | Minimum filter wavelength. Defined as the first lambda value with a transmission at least 1% of maximum transmission 25 | 26 | 27 | Maximum filter wavelength. Defined as the last lambda value with a transmission at least 1% of maximum transmission 28 | 29 | 30 | Effective width. Defined as integ[x*filter(x) dx].\nEquivalent to the horizontal size of a rectangle with height equal to maximum transmission and with the same area that the one covered by the filter transmission curve. 31 | 32 | 33 | Central wavelength. Defined as the central wavelength between the two points defining FWMH 34 | 35 | 36 | Peak wavelength. Defined as sqrt{integ[x*filter(x) dx]/integ[filter(x) dx/x]} 37 | 38 | 39 | Peak wavelength. Defined as the lambda value with larger transmission 40 | 41 | 42 | Photon distribution based effective wavelength. Defined as integ[x^2*filter(x)*vega(x) dx]/integ[x*filter(x)*vega(x) dx] 43 | 44 | 45 | Full width at half maximum. Defined as the difference between the two wavelengths for which filter transmission is half maximum 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | 110 | 111 | 112 | 113 | 114 | 115 | 116 | 117 | 118 | 119 | 120 | 121 | 122 | 123 | 124 | 125 | 126 | 127 | 128 | 129 | 130 | 131 | 132 | 133 | 134 | 135 | 136 | 137 | 138 | 139 | 140 | 141 | 142 | 143 | 144 | 145 | 146 | 147 | 148 | 149 | 150 | 151 | 152 | 153 | 154 | 155 | 156 | 157 | 158 | 159 | 160 | 161 | 162 | 163 | 164 | 165 | 166 | 167 | 168 | 169 | 170 | 171 | 172 | 173 | 174 | 175 | 176 | 177 | 178 | 179 | 180 | 181 | 182 | 183 | 184 | 185 | 186 | 187 | 188 | 189 | 190 | 191 | 192 | 193 | 194 | 195 | 196 | 197 | 198 | 199 | 200 | 201 | 202 | 203 | 204 | 205 | 206 | 207 | 208 | 209 | 210 | 211 | 212 | 213 | 214 | 215 | 216 | 217 | 218 | 219 | 220 | 221 | 222 | 223 | 224 | 225 | 226 | 227 | 228 | 229 | 230 |
70000.000
70500.005
71000.020
71500.050
72000.100
72500.170
73000.330
73500.700
74000.820
74500.900
75000.950
75500.980
76000.990
76500.994
77000.980
77500.950
78000.913
78500.870
79000.830
79500.790
80000.750
80500.710
81000.673
81500.650
82000.630
82500.610
83000.580
83500.550
84000.510
84500.470
85000.405
85500.330
86000.250
86500.180
87000.140
87500.110
88000.080
88500.060
89000.035
89500.020
90000.010
90500.005
91000.000
231 |
232 |
233 | -------------------------------------------------------------------------------- /svo_filters/data/filters/Cousins.R: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | Photometric system 13 | 14 | 15 | 16 | 17 | 18 | Mean wavelength. Defined as integ[x*filter(x) dx]/integ[filter(x) dx] 19 | 20 | 21 | Effective wavelength. Defined as integ[x*filter(x)*vega(x) dx]/integ[filter(x)*vega(x) dx] 22 | 23 | 24 | Minimum filter wavelength. Defined as the first lambda value with a transmission at least 1% of maximum transmission 25 | 26 | 27 | Maximum filter wavelength. Defined as the last lambda value with a transmission at least 1% of maximum transmission 28 | 29 | 30 | Effective width. Defined as integ[x*filter(x) dx].\nEquivalent to the horizontal size of a rectangle with height equal to maximum transmission and with the same area that the one covered by the filter transmission curve. 31 | 32 | 33 | Central wavelength. Defined as the central wavelength between the two points defining FWMH 34 | 35 | 36 | Peak wavelength. Defined as sqrt{integ[x*filter(x) dx]/integ[filter(x) dx/x]} 37 | 38 | 39 | Peak wavelength. Defined as the lambda value with larger transmission 40 | 41 | 42 | Photon distribution based effective wavelength. Defined as integ[x^2*filter(x)*vega(x) dx]/integ[x*filter(x)*vega(x) dx] 43 | 44 | 45 | Full width at half maximum. Defined as the difference between the two wavelengths for which filter transmission is half maximum 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | 110 | 111 | 112 | 113 | 114 | 115 | 116 | 117 | 118 | 119 | 120 | 121 | 122 | 123 | 124 | 125 | 126 | 127 | 128 | 129 | 130 | 131 | 132 | 133 | 134 | 135 | 136 | 137 | 138 | 139 | 140 | 141 | 142 | 143 | 144 | 145 | 146 | 147 | 148 | 149 | 150 | 151 | 152 | 153 | 154 | 155 | 156 | 157 | 158 | 159 | 160 | 161 | 162 | 163 | 164 | 165 | 166 | 167 | 168 | 169 | 170 | 171 | 172 | 173 | 174 | 175 | 176 | 177 | 178 | 179 | 180 | 181 | 182 | 183 | 184 | 185 | 186 | 187 | 188 | 189 | 190 | 191 | 192 | 193 | 194 | 195 | 196 | 197 | 198 | 199 | 200 | 201 | 202 | 203 | 204 | 205 | 206 | 207 | 208 | 209 | 210 | 211 | 212 | 213 | 214 | 215 | 216 | 217 | 218 | 219 | 220 | 221 | 222 | 223 | 224 | 225 | 226 | 227 | 228 | 229 | 230 | 231 | 232 | 233 | 234 | 235 | 236 | 237 | 238 | 239 | 240 | 241 | 242 | 243 | 244 | 245 | 246 | 247 | 248 | 249 | 250 | 251 | 252 | 253 | 254 | 255 | 256 | 257 | 258 | 259 | 260 | 261 | 262 | 263 | 264 | 265 | 266 | 267 | 268 | 269 | 270 |
54000.000
54500.002
55000.010
55500.030
56000.070
56500.180
57000.400
57500.770
58000.890
58500.960
59000.990
59500.999
60001.000
60500.997
61000.990
61500.976
62000.960
62500.946
63000.930
63500.912
64000.895
64500.880
65000.860
65500.845
66000.825
66500.806
67000.788
67500.765
68000.742
68500.720
69000.700
69500.676
70000.650
70500.626
71000.600
71500.568
72000.530
72500.480
73000.395
73500.300
74000.215
74500.155
75000.120
75500.100
76000.085
76500.075
77000.060
77500.050
78000.040
78500.029
79000.020
79500.010
80000.000
271 |
272 |
273 | -------------------------------------------------------------------------------- /svo_filters/data/filters/Johnson.V: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | Photometric system 13 | 14 | 15 | 16 | 17 | Mean wavelength. Defined as integ[x*filter(x) dx]/integ[filter(x) dx] 18 | 19 | 20 | Effective wavelength. Defined as integ[x*filter(x)*vega(x) dx]/integ[filter(x)*vega(x) dx] 21 | 22 | 23 | Minimum filter wavelength. Defined as the first lambda value with a transmission at least 1% of maximum transmission 24 | 25 | 26 | Maximum filter wavelength. Defined as the last lambda value with a transmission at least 1% of maximum transmission 27 | 28 | 29 | Effective width. Defined as integ[x*filter(x) dx].\nEquivalent to the horizontal size of a rectangle with height equal to maximum transmission and with the same area that the one covered by the filter transmission curve. 30 | 31 | 32 | Central wavelength. Defined as the central wavelength between the two points defining FWMH 33 | 34 | 35 | Peak wavelength. Defined as sqrt{integ[x*filter(x) dx]/integ[filter(x) dx/x]} 36 | 37 | 38 | Peak wavelength. Defined as the lambda value with larger transmission 39 | 40 | 41 | Photon distribution based effective wavelength. Defined as integ[x^2*filter(x)*vega(x) dx]/integ[x*filter(x)*vega(x) dx] 42 | 43 | 44 | Full width at half maximum. Defined as the difference between the two wavelengths for which filter transmission is half maximum 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | 110 | 111 | 112 | 113 | 114 | 115 | 116 | 117 |
4600.00.0000000000
4800.00.0200000000
5000.00.3800000000
5200.00.9100000000
5400.00.9800000000
5600.00.7200000000
5800.00.6200000000
6000.00.4000000000
6200.00.2000000000
6400.00.0800000000
6600.00.0200000000
6800.00.0100000000
7000.00.0100000000
7200.00.0100000000
7400.00.0000000000
118 |
119 |
120 | -------------------------------------------------------------------------------- /svo_filters/data/filters/NIRCam.F164N: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | Photometric system 13 | 14 | 15 | Detector type 16 | 17 | 18 | Instrument 19 | 20 | 21 | Observational facility 22 | 23 | 24 | 25 | 26 | 27 | Mean wavelength. Defined as integ[x*filter(x) dx]/integ[filter(x) dx] 28 | 29 | 30 | Effective wavelength. Defined as integ[x*filter(x)*vega(x) dx]/integ[filter(x)*vega(x) dx] 31 | 32 | 33 | Minimum filter wavelength. Defined as the first lambda value with a transmission at least 1% of maximum transmission 34 | 35 | 36 | Maximum filter wavelength. Defined as the last lambda value with a transmission at least 1% of maximum transmission 37 | 38 | 39 | Effective width. Defined as integ[x*filter(x) dx].\nEquivalent to the horizontal size of a rectangle with height equal to maximum transmission and with the same area that the one covered by the filter transmission curve. 40 | 41 | 42 | Central wavelength. Defined as the central wavelength between the two points defining FWMH 43 | 44 | 45 | Peak wavelength. Defined as sqrt{integ[x*filter(x) dx]/integ[filter(x) dx/x]} 46 | 47 | 48 | Peak wavelength. Defined as the lambda value with larger transmission 49 | 50 | 51 | Photon distribution based effective wavelength. Defined as integ[x^2*filter(x)*vega(x) dx]/integ[x*filter(x)*vega(x) dx] 52 | 53 | 54 | Full width at half maximum. Defined as the difference between the two wavelengths for which filter transmission is half maximum 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | 110 | 111 | 112 | 113 | 114 | 115 | 116 | 117 | 118 | 119 | 120 | 121 | 122 | 123 | 124 | 125 | 126 | 127 | 128 | 129 | 130 | 131 | 132 | 133 | 134 | 135 | 136 | 137 | 138 | 139 | 140 | 141 | 142 | 143 | 144 | 145 | 146 | 147 | 148 | 149 | 150 | 151 | 152 | 153 | 154 | 155 | 156 | 157 | 158 | 159 | 160 | 161 | 162 | 163 | 164 | 165 | 166 | 167 | 168 | 169 | 170 | 171 | 172 | 173 | 174 | 175 | 176 | 177 | 178 | 179 | 180 | 181 | 182 | 183 | 184 | 185 | 186 | 187 | 188 | 189 | 190 | 191 | 192 | 193 | 194 | 195 | 196 | 197 | 198 | 199 | 200 | 201 | 202 | 203 | 204 | 205 | 206 | 207 | 208 | 209 | 210 | 211 | 212 | 213 | 214 | 215 | 216 | 217 | 218 | 219 | 220 | 221 | 222 | 223 | 224 | 225 | 226 | 227 | 228 | 229 | 230 | 231 | 232 | 233 | 234 | 235 | 236 | 237 | 238 | 239 | 240 | 241 | 242 | 243 | 244 | 245 | 246 | 247 | 248 | 249 | 250 | 251 | 252 | 253 | 254 | 255 | 256 | 257 | 258 | 259 | 260 | 261 | 262 | 263 | 264 | 265 | 266 | 267 | 268 | 269 | 270 | 271 | 272 | 273 | 274 | 275 | 276 | 277 | 278 | 279 | 280 | 281 | 282 | 283 | 284 | 285 | 286 | 287 | 288 | 289 | 290 | 291 | 292 | 293 | 294 | 295 | 296 | 297 | 298 | 299 | 300 | 301 | 302 | 303 | 304 | 305 | 306 | 307 | 308 | 309 | 310 | 311 | 312 | 313 | 314 | 315 | 316 | 317 | 318 | 319 | 320 | 321 | 322 | 323 | 324 | 325 | 326 | 327 | 328 | 329 | 330 | 331 | 332 | 333 | 334 | 335 | 336 | 337 | 338 | 339 | 340 | 341 | 342 | 343 | 344 | 345 | 346 | 347 | 348 | 349 | 350 | 351 | 352 | 353 | 354 | 355 |
160940.000131894
161040.000180643
161140.000282778
161240.000391389
161340.000634029
161440.00103662
161540.00181898
161640.00297595
161740.00487449
161840.00817524
161940.0107449
162040.0130522
162140.0152163
162240.0186037
162340.0208216
162440.0202447
162540.024827
162640.0285572
162740.0354254
162840.0371807
162940.0474915
163040.0600472
163140.071285
163240.0916878
163340.119545
163440.160767
163540.213657
163640.272929
163740.336978
163840.370779
163940.397567
164040.420973
164140.420406
164240.419744
164340.417256
164440.421542
164540.43078
164640.424106
164740.416873
164840.417405
164940.382757
165040.362442
165140.317987
165240.27084
165340.210229
165440.1666
165540.132709
165640.100947
165740.0825025
165840.0666722
165940.0567399
166040.0506122
166140.0435872
166240.0349235
166340.0296522
166440.0297128
166540.0249716
166640.0218161
166740.0181107
166840.0132569
166940.0106076
167040.00709955
167140.00499041
167240.00297306
167340.00183477
167440.00111767
167540.000633319
167640.000433937
167740.000283229
167840.000214783
167940.000149246
168040.00011478
356 |
357 |
358 | -------------------------------------------------------------------------------- /svo_filters/data/filters/SDSS.u: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | Photometric system 13 | 14 | 15 | Observational facility 16 | 17 | 18 | 19 | 20 | 21 | Mean wavelength. Defined as integ[x*filter(x) dx]/integ[filter(x) dx] 22 | 23 | 24 | Effective wavelength. Defined as integ[x*filter(x)*vega(x) dx]/integ[filter(x)*vega(x) dx] 25 | 26 | 27 | Minimum filter wavelength. Defined as the first lambda value with a transmission at least 1% of maximum transmission 28 | 29 | 30 | Maximum filter wavelength. Defined as the last lambda value with a transmission at least 1% of maximum transmission 31 | 32 | 33 | Effective width. Defined as integ[x*filter(x) dx].\nEquivalent to the horizontal size of a rectangle with height equal to maximum transmission and with the same area that the one covered by the filter transmission curve. 34 | 35 | 36 | Central wavelength. Defined as the central wavelength between the two points defining FWMH 37 | 38 | 39 | Peak wavelength. Defined as sqrt{integ[x*filter(x) dx]/integ[filter(x) dx/x]} 40 | 41 | 42 | Peak wavelength. Defined as the lambda value with larger transmission 43 | 44 | 45 | Photon distribution based effective wavelength. Defined as integ[x^2*filter(x)*vega(x) dx]/integ[x*filter(x)*vega(x) dx] 46 | 47 | 48 | Full width at half maximum. Defined as the difference between the two wavelengths for which filter transmission is half maximum 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | 110 | 111 | 112 | 113 | 114 | 115 | 116 | 117 | 118 | 119 | 120 | 121 | 122 | 123 | 124 | 125 | 126 | 127 | 128 | 129 | 130 | 131 | 132 | 133 | 134 | 135 | 136 | 137 | 138 | 139 | 140 | 141 | 142 | 143 | 144 | 145 | 146 | 147 | 148 | 149 | 150 | 151 | 152 | 153 | 154 | 155 | 156 | 157 | 158 | 159 | 160 | 161 | 162 | 163 | 164 | 165 | 166 | 167 | 168 | 169 | 170 | 171 | 172 | 173 | 174 | 175 | 176 | 177 | 178 | 179 | 180 | 181 | 182 | 183 | 184 | 185 | 186 | 187 | 188 | 189 | 190 | 191 | 192 | 193 | 194 | 195 | 196 | 197 | 198 | 199 | 200 | 201 | 202 | 203 | 204 | 205 | 206 | 207 | 208 | 209 | 210 | 211 | 212 | 213 | 214 | 215 | 216 | 217 | 218 | 219 | 220 | 221 | 222 | 223 | 224 | 225 | 226 | 227 | 228 | 229 | 230 | 231 | 232 | 233 | 234 | 235 | 236 | 237 | 238 | 239 | 240 | 241 | 242 | 243 | 244 | 245 | 246 | 247 | 248 | 249 |
2980.00.0000000000
3005.00.0001000000
3030.00.0005000000
3055.00.0013000000
3080.00.0026000000
3105.00.0052000000
3130.00.0093000000
3155.00.0161000000
3180.00.0240000000
3205.00.0323000000
3230.00.0405000000
3255.00.0485000000
3280.00.0561000000
3305.00.0634000000
3330.00.0700000000
3355.00.0756000000
3380.00.0803000000
3405.00.0848000000
3430.00.0883000000
3455.00.0917000000
3480.00.0959000000
3505.00.1001000000
3530.00.1029000000
3555.00.1044000000
3580.00.1053000000
3605.00.1063000000
3630.00.1075000000
3655.00.1085000000
3680.00.1084000000
3705.00.1064000000
3730.00.1024000000
3755.00.0966000000
3780.00.0887000000
3805.00.0787000000
3830.00.0672000000
3855.00.0549000000
3880.00.0413000000
3905.00.0268000000
3930.00.0145000000
3955.00.0075000000
3980.00.0042000000
4005.00.0022000000
4030.00.0010000000
4055.00.0006000000
4080.00.0004000000
4105.00.0002000000
4130.00.0000000000
250 |
251 |
252 | -------------------------------------------------------------------------------- /svo_filters/data/filters/WFPC2.f656n: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | Instrument 13 | 14 | 15 | Observational facility 16 | 17 | 18 | 19 | 20 | Mean wavelength. Defined as integ[x*filter(x) dx]/integ[filter(x) dx] 21 | 22 | 23 | Effective wavelength. Defined as integ[x*filter(x)*vega(x) dx]/integ[filter(x)*vega(x) dx] 24 | 25 | 26 | Minimum filter wavelength. Defined as the first lambda value with a transmission at least 1% of maximum transmission 27 | 28 | 29 | Maximum filter wavelength. Defined as the last lambda value with a transmission at least 1% of maximum transmission 30 | 31 | 32 | Effective width. Defined as integ[x*filter(x) dx].\nEquivalent to the horizontal size of a rectangle with height equal to maximum transmission and with the same area that the one covered by the filter transmission curve. 33 | 34 | 35 | Central wavelength. Defined as the central wavelength between the two points defining FWMH 36 | 37 | 38 | Peak wavelength. Defined as sqrt{integ[x*filter(x) dx]/integ[filter(x) dx/x]} 39 | 40 | 41 | Peak wavelength. Defined as the lambda value with larger transmission 42 | 43 | 44 | Photon distribution based effective wavelength. Defined as integ[x^2*filter(x)*vega(x) dx]/integ[x*filter(x)*vega(x) dx] 45 | 46 | 47 | Full width at half maximum. Defined as the difference between the two wavelengths for which filter transmission is half maximum 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | 110 | 111 | 112 | 113 | 114 | 115 | 116 | 117 | 118 | 119 | 120 | 121 | 122 | 123 | 124 | 125 | 126 | 127 | 128 | 129 | 130 | 131 | 132 | 133 | 134 | 135 | 136 | 137 | 138 | 139 | 140 | 141 | 142 | 143 | 144 | 145 | 146 | 147 | 148 | 149 | 150 | 151 | 152 | 153 | 154 | 155 | 156 | 157 | 158 | 159 | 160 | 161 | 162 | 163 | 164 |
6538.0000000.006486
6540.0000000.013323
6542.0000000.027278
6544.0000000.055361
6546.0000000.113072
6548.0000000.223523
6550.0000000.400950
6552.0000000.590489
6554.0000000.704917
6556.0000000.749567
6558.0000000.767464
6560.0000000.777044
6562.0000000.778400
6564.0000000.770989
6566.0000000.755081
6568.0000000.734563
6570.0000000.718113
6572.0000000.713865
6574.0000000.709888
6576.0000000.647160
6578.0000000.439003
6580.0000000.199933
6582.0000000.076105
6584.0000000.029448
6586.0000000.012509
6588.0000000.005741
165 |
166 |
167 | -------------------------------------------------------------------------------- /svo_filters/data/plots/G141.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hover2pi/svo_filters/ac7fe3a7c405627810ae4d35dc29c118d1b6def8/svo_filters/data/plots/G141.png -------------------------------------------------------------------------------- /svo_filters/data/plots/H.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hover2pi/svo_filters/ac7fe3a7c405627810ae4d35dc29c118d1b6def8/svo_filters/data/plots/H.png -------------------------------------------------------------------------------- /svo_filters/data/plots/filtered.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hover2pi/svo_filters/ac7fe3a7c405627810ae4d35dc29c118d1b6def8/svo_filters/data/plots/filtered.png -------------------------------------------------------------------------------- /svo_filters/setup_package.py: -------------------------------------------------------------------------------- 1 | from distutils.extension import Extension 2 | 3 | def get_package_data(): 4 | return {'svo_filters': ['data/*', 'data/filters/*', 'data/plots/*', 'data/spectra/*']} 5 | -------------------------------------------------------------------------------- /svo_filters/test_svo.py: -------------------------------------------------------------------------------- 1 | """Some tests to make sure the filters work as intended""" 2 | import unittest 3 | 4 | import astropy.units as q 5 | import astropy.table as at 6 | import numpy as np 7 | from bokeh.plotting import figure 8 | 9 | from svo_filters import svo 10 | 11 | 12 | class TestFilter(unittest.TestCase): 13 | """Tests for Filter class""" 14 | def setUp(self): 15 | pass 16 | 17 | def test_info(self): 18 | """Test that the info attr works""" 19 | filt = svo.Filter('2MASS.J') 20 | self.assertTrue(filt.info() == None) 21 | self.assertTrue(isinstance(filt.info(fetch=True), at.Table)) 22 | self.assertRaises(ValueError, setattr, filt, 'wave', np.arange(10)) 23 | self.assertRaises(ValueError, setattr, filt, 'throughput', np.arange(1)) 24 | 25 | def test_no_filter(self): 26 | """Test if exception is raised for bogus filter""" 27 | self.assertRaises(IndexError, svo.Filter, 'BAD_FILTER') 28 | 29 | def test_filter_web(self): 30 | """Test if Filter object is created from web query""" 31 | filt = svo.Filter('Generic/Johnson.B') 32 | 33 | self.assertTrue(isinstance(filt, svo.Filter)) 34 | 35 | def test_filter_xml(self): 36 | """Test if Filter object is created properly""" 37 | filt = svo.Filter('2MASS.J') 38 | 39 | self.assertTrue(isinstance(filt, svo.Filter)) 40 | 41 | def test_filter_txt(self): 42 | """Test if Filter object is created properly""" 43 | filt = svo.Filter('NIRISS.GR700XD.1') 44 | 45 | self.assertTrue(isinstance(filt, svo.Filter)) 46 | 47 | def test_filter_tophat(self): 48 | """Test if Filter object is created properly""" 49 | # Good tophat 50 | filt = svo.Filter('tophat', wave_min=0.8*q.um, wave_max=1.2*q.um) 51 | self.assertTrue(isinstance(filt, svo.Filter)) 52 | 53 | # Bad tophat 54 | self.assertRaises(ValueError, svo.Filter, 'tophat') 55 | 56 | def test_filter_bin(self): 57 | """Test that the binning works""" 58 | # Test n_bins 59 | filt = svo.Filter('WFC3_IR.G141', n_bins=10) 60 | self.assertTrue(filt.wave.shape[0] == 10) 61 | 62 | # Test pixels_per_bin 63 | filt = svo.Filter('WFC3_IR.G141', pixels_per_bin=50) 64 | self.assertTrue(filt.wave.shape[1] == 50) 65 | 66 | # Test neither throws an error 67 | self.assertRaises(ValueError, svo.Filter, 'WFC3_IR.G141', n_bins=None, 68 | pixels_per_bin=None) 69 | 70 | def test_filter_units_bad(self): 71 | """Test that changing the wave units to non-length raises exception""" 72 | filt = svo.Filter('WFC3_IR.G141') 73 | 74 | # Fun syntax to test attribute setting 75 | self.assertRaises(ValueError, setattr, filt, 'wave_units', q.second) 76 | self.assertRaises(ValueError, setattr, filt, 'flux_units', q.second) 77 | 78 | def test_spectrum(self): 79 | """Test that the filter gets applied to a spectrum properly""" 80 | filt = svo.Filter('2MASS.J') 81 | spec = [np.linspace(0.9, 2, 1000)*q.um, 82 | np.ones(1000)*q.erg/q.s/q.cm**2/q.AA] 83 | 84 | # Apply the filter to the spectrum 85 | filtered, err_filtered = filt.apply(spec) 86 | self.assertEqual(filtered.shape, filt.wave.squeeze().shape) 87 | 88 | # Check that the propagated errors are all nans since none were given 89 | self.assertTrue(np.all([np.isnan(i) for i in err_filtered])) 90 | 91 | # Check overlap 92 | self.assertEqual(svo.Filter('2MASS.J').overlap(spec), 'full') 93 | self.assertEqual(svo.Filter('2MASS.Ks').overlap(spec), 'partial') 94 | self.assertEqual(svo.Filter('WISE.W4').overlap(spec), 'none') 95 | 96 | def test_filter_apply_binned(self): 97 | """Test that the filter gets applied to a spectrum properly""" 98 | filt = svo.Filter('2MASS.J', n_bins=4) 99 | spec = [np.linspace(0.9, 2, 1000)*q.um, 100 | np.ones(1000)*q.erg/q.s/q.cm**2/q.AA] 101 | 102 | # Apply the filter to the spectrum 103 | filtered, err_filtered = filt.apply(spec, plot=True) 104 | self.assertEqual(filtered.shape, filt.wave.squeeze().shape) 105 | 106 | def test_filter_apply_binned_err(self): 107 | """Test that the filter gets applied to a spectrum with errors properly""" 108 | filt = svo.Filter('2MASS.J', n_bins=4) 109 | funit = q.erg/q.s/q.cm**2/q.AA 110 | spec = [np.linspace(0.9, 2, 1000)*q.um, 111 | np.ones(1000)*funit, 112 | np.ones(1000)*0.05*funit] 113 | 114 | # Apply the filter to the spectrum 115 | filtered, err_filtered = filt.apply(spec) 116 | 117 | # Check that the units are still there 118 | self.assertEqual(filtered.unit,funit) 119 | self.assertEqual(err_filtered.shape, filt.wave.squeeze().shape) 120 | 121 | def test_filter_apply_no_units(self): 122 | """Test that the apply method works with and without units""" 123 | filt = svo.Filter('2MASS.J') 124 | spec = [np.linspace(0.9, 2, 1000), 125 | np.ones(1000)] 126 | 127 | # Apply the filter to the spectrum 128 | filtered, err_filtered = filt.apply(spec) 129 | self.assertFalse(hasattr(filtered, 'unit')) 130 | self.assertTrue(np.all([np.isnan(i) for i in err_filtered])) 131 | 132 | def test_plot(self): 133 | """Test that the plots are produced properly""" 134 | filt = svo.Filter('2MASS.J') 135 | filt.plot(details=True) 136 | plt = filt.plot(draw=False) 137 | 138 | self.assertTrue(type(plt) == figure) 139 | 140 | def test_filter_monotonic(self): 141 | """Test that non-monotonic filters are treated correctly""" 142 | filt = svo.Filter('Palomar/ZTF.g') 143 | self.assertFalse(np.any(np.diff(filt.wave)<=0)) 144 | 145 | 146 | class TestFilterList(unittest.TestCase): 147 | """Tests for filter function""" 148 | def setUp(self): 149 | pass 150 | 151 | def test_default(self): 152 | """Test default directory""" 153 | filts = svo.filters() 154 | self.assertTrue(len(filts) > 0) 155 | -------------------------------------------------------------------------------- /svo_filters/utils.py: -------------------------------------------------------------------------------- 1 | import astropy.units as q 2 | import numpy as np 3 | 4 | 5 | def _padded_differences(arr, pad_val=1e20): 6 | """ 7 | 8 | Parameters 9 | ---------- 10 | arr: array-like 11 | pad_val: astropy.units.quantity, float, int 12 | value for padding the first element of the difference array by when calculating 13 | monotonically increasing (or not) differences. 14 | """ 15 | if isinstance(arr, q.Quantity): 16 | # Quantity units cannot be padded by non-quantity unless using this wrapper. 17 | diff = arr.ediff1d(to_begin=pad_val) 18 | else: 19 | diff = np.ediff1d(arr, to_begin=pad_val) 20 | return diff 21 | 22 | def incremented_monotonic(arr, increment=None, increment_step=1000): 23 | """Returns input if monotonically increasing. Otherwise 24 | increment repeated elements by `increment`, which will be set to 1/`increment_step` 25 | of the smallest difference in array if `None`, the default. 26 | If not monotonically increasing (ignoring repeated elements), raises `ValueError`. 27 | 28 | Parameters 29 | ---------- 30 | arr: array-like 31 | array to check for increment. Also handles astropy.units.quantity.Quantity arrays. 32 | increment: astropy.units.quantity, float, int (optional) 33 | value to increment repeated elements by. Set to 1/`increment_step` of the smallest difference 34 | in array if `None`, the default. Unit conversion will be attempted if array is an instance 35 | of astropy.units.quantity.Quantity. 36 | increment_step: float, int 37 | The relative size difference between repeated elements if automatically determining. Only 38 | used if `increment = None`. 39 | 40 | Returns 41 | ------- 42 | array-like 43 | Input array if monotonically increasing else input array where repeat values 44 | have been incremented by `increment`. 45 | """ 46 | diff = _padded_differences(arr) 47 | 48 | if np.any(diff<0): 49 | raise ValueError("Input array must be monotonically increasing except for repeated values.") 50 | non_monotonic_mask = diff<=0 51 | 52 | # Exit early if monotonic 53 | if np.all(~non_monotonic_mask): 54 | return arr 55 | 56 | if increment is None: 57 | # a thousanth of the minimimum non-zero increment. 58 | increment = np.nanmin(diff[~non_monotonic_mask])/increment_step 59 | # Try to help user with unit conversion, will fail if unconvertable. 60 | elif isinstance(arr, q.Quanity): 61 | increment = increment << arr.unit 62 | 63 | #non_monotonic_mask = non_monotonic_mask.reshape(arr.shape) 64 | repeats, multiples = get_multipliers(non_monotonic_mask) 65 | if isinstance(increment, q.Quantity): 66 | multiples = multiples << q.dimensionless_unscaled 67 | multiples *= increment 68 | 69 | flatarr = arr.flatten() 70 | flatarr[repeats] += multiples 71 | return flatarr.reshape(arr.shape) 72 | 73 | 74 | def breadth_first(repeats, state, row): 75 | """somewhat convoluted 1D breadth first search 76 | for getting multiples of repeated elements. 77 | """ 78 | queue = [repeats[row]] 79 | index = 1 80 | additions = [index] 81 | state.append(row) 82 | while len(queue) > 0: 83 | idx = queue.pop(0) 84 | 85 | #print(idx, idx+1, repeats) 86 | if idx+1 in repeats: 87 | neighbor = idx+1 88 | state.append(row+index) 89 | index += 1 90 | queue.append(neighbor) 91 | additions.append(index) 92 | 93 | return additions, state 94 | 95 | 96 | def get_multipliers(mask): 97 | """Get all repeats and their multiples using breadth first search 98 | 99 | Parameters 100 | ---------- 101 | mask: array_like 102 | array of booleans representing repeated elements. True for repeated. 103 | 104 | Returns 105 | ------- 106 | tuple 107 | tuple of array_like of repeated indexes and their multiples for use in 108 | shifting multiple repeated indexes. 109 | """ 110 | repeats = np.nonzero(mask.flatten())[0] 111 | if len(repeats)==0: 112 | raise ValueError("No repeats found. Input mask all False") 113 | groups = [] 114 | state = [] 115 | for j,val in enumerate(repeats): 116 | if j in state: 117 | continue 118 | additions, state = breadth_first(repeats, state, j) 119 | groups.append(additions) 120 | groups = np.array([element for sublist in groups for element in sublist]) 121 | 122 | return repeats, groups 123 | --------------------------------------------------------------------------------