pysilsub
A Python toolbox for performing the method of silent substitution
Science Score: 54.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
✓CITATION.cff file
Found CITATION.cff file -
✓codemeta.json file
Found codemeta.json file -
✓.zenodo.json file
Found .zenodo.json file -
○DOI references
-
✓Academic publication links
Links to: zenodo.org -
○Committers with academic emails
-
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (9.8%) to scientific vocabulary
Keywords from Contributors
Repository
A Python toolbox for performing the method of silent substitution
Basic Info
- Host: GitHub
- Owner: PySilentSubstitution
- License: mit
- Language: Jupyter Notebook
- Default Branch: main
- Size: 142 MB
Statistics
- Stars: 13
- Watchers: 2
- Forks: 2
- Open Issues: 0
- Releases: 4
Metadata Files
README.md
Welcome to PySilentSubstitution!

PySilSub is a Python toolbox for performing the method of silent substitution in vision and nonvisual photoreception research.
Note: See also, PyPlr, a sister project offering a Python framework for researching the pupillary light reflex with the Pupil Core eye tracking platform.
With PySilSub, observer- and device-specific solutions to silent substitution problems are found with linear algebra or numerical optimisation via a configurable, intuitive interface.
```Python
Example 1 - Target melanopsin with 100% contrast (no background
specified), whilst ignoring rods and minimizing cone contrast,
for a 42-year-old observer and field size of 10 degrees. Solved
with numerical optimization.
from pysilsub import observers, problems
ssp = problems.SilentSubstitutionProblem.frompackagedata('STLAB1York') # Load example data ssp.observer = observers.ColorimetricObserver(age=42, fieldsize=10) # Assign custom observer model ssp.ignore = ['rh'] # Ignore rod photoreceptors ssp.silence = ['sc', 'mc', 'lc'] # Minimise cone contrast ssp.target = ['mel'] # Target melanopsin ssp.targetcontrast = 1.0 # With 100% contrast solution = ssp.optimsolve() # Solve with optimisation fig = ssp.plotsolution(solution.x) # Plot the solution ```
Another example:
```Python
Example 2 - Target S-cones with 45% contrast against a specified
background spectrum (all primaries, half max) whilst ignoring rods
and minimizing contrast on L/M cones and melanopsin, assuming
32-year-old observer and 10-degree field size. Solved with linear
algebra.
from pysilsub import problems
ssp = problems.SilentSubstitutionProblem.frompackagedata('STLAB1York') # Load example data ssp.background = [.5] * ssp.nprimaries # Specify background spectrum ssp.ignore = ['rh'] # Ignore rod photoreceptors ssp.silence = ['mc', 'lc', 'mel'] # Silence L/M cones and melanopsin ssp.target = ['sc'] # Target S cones ssp.targetcontrast = .45 # With 45% contrast solution = ssp.linalgsolve() # Solve with linear algebra fig = ssp.plot_solution(solution) # Plot the solution ```
Some features may serve a broader purpose in vision and circadian research. For example, computing and saving a full set of CIEPO06- and CIES026-compliant action spectra for a given observer age and field size.
```python from pysilsub.observers import ColorimetricObserver
ColorimetricObserver(age=32, fieldsize=10).saveaction_spectra() ```
For more information, check out the code, read the docs, and run pip install pysilsub to try out the examples above.
Citation (CITATION.cff)
cff-version: 0.1.0 message: "If you use this software, please cite it as below." authors: - family-names: "Martin" given-names: "Joel, T." orcid: "https://orcid.org/0000-0002-4475-3835" - family-names: "Boynton" given-names: "Geoffrey, M." orcid: "https://orcid.org/0000-0001-6561-6920" - family-names: "Baker" given-names: "Daniel, H." orcid: "https://orcid.org/0000-0002-0161-443X" - family-names: "Wade" given-names: "Alex" orcid: "https://orcid.org/0000-0003-0656-2664" - family-names: "Spitschan" given-names: "Manuel" orcid: "https://orcid.org/0000-0002-8572-9268" title: "pysilsub" version: 0.1.0 doi: 10.5281/zenodo.7776769 date-released: 2023-03-31 url: "https://github.com/PySilentSubstitution/pysilsub"
GitHub Events
Total
- Watch event: 1
- Push event: 1
- Fork event: 1
Last Year
- Watch event: 1
- Push event: 1
- Fork event: 1
Committers
Last synced: about 2 years ago
Top Committers
| Name | Commits | |
|---|---|---|
| Joel Martin | 1****a | 78 |
| dependabot[bot] | 4****] | 1 |
Issues and Pull Requests
Last synced: 8 months ago
All Time
- Total issues: 0
- Total pull requests: 1
- Average time to close issues: N/A
- Average time to close pull requests: 1 minute
- Total issue authors: 0
- Total pull request authors: 1
- Average comments per issue: 0
- Average comments per pull request: 0.0
- Merged pull requests: 1
- Bot issues: 0
- Bot pull requests: 1
Past Year
- Issues: 0
- Pull requests: 0
- Average time to close issues: N/A
- Average time to close pull requests: N/A
- Issue authors: 0
- Pull request authors: 0
- Average comments per issue: 0
- Average comments per pull request: 0
- Merged pull requests: 0
- Bot issues: 0
- Bot pull requests: 0
Top Authors
Issue Authors
Pull Request Authors
- dependabot[bot] (1)
Top Labels
Issue Labels
Pull Request Labels
Packages
- Total packages: 1
-
Total downloads:
- pypi 10 last-month
- Total dependent packages: 0
- Total dependent repositories: 1
- Total versions: 10
- Total maintainers: 1
pypi.org: pysilsub
Software for performing silent substitution in Python.
- Homepage: https://github.com/PySilentSubstitution/pysilsub
- Documentation: https://pysilentsubstitution.github.io/pysilsub/index.html
- License: MIT
-
Latest release: 0.1.1
published over 2 years ago
Rankings
Maintainers (1)
Dependencies
- aiofiles =0.7.0=pyhd3eb1b0_0
- aiohttp =3.8.1=py310hca72f7f_1
- aiosignal =1.2.0=pyhd3eb1b0_0
- alabaster =0.7.12=pyhd3eb1b0_0
- anyio =3.6.1=pyhd8ed1ab_1
- applaunchservices =0.3.0=py310hecd8cb5_0
- appnope =0.1.2=py310hecd8cb5_1001
- argon2-cffi =21.3.0=pyhd3eb1b0_0
- argon2-cffi-bindings =21.2.0=py310hca72f7f_0
- arrow =1.2.2=pyhd3eb1b0_0
- astroid =2.11.7=py310hecd8cb5_0
- async-timeout =4.0.2=py310hecd8cb5_0
- atomicwrites =1.4.0=py_0
- attrs =21.4.0=pyhd3eb1b0_0
- autopep8 =1.6.0=pyhd3eb1b0_1
- babel =2.9.1=pyhd3eb1b0_0
- backcall =0.2.0=pyhd3eb1b0_0
- beautifulsoup4 =4.11.1=py310hecd8cb5_0
- binaryornot =0.4.4=pyhd3eb1b0_1
- black =22.6.0=py310hecd8cb5_0
- bleach =4.1.0=pyhd3eb1b0_0
- brotlipy =0.7.0=py310hca72f7f_1002
- bzip2 =1.0.8=h1de35cc_0
- ca-certificates =2022.07.19=hecd8cb5_0
- certifi =2022.9.24=py310hecd8cb5_0
- cffi =1.15.1=py310hc55c11b_0
- chardet =4.0.0=py310hecd8cb5_1003
- charset-normalizer =2.1.1=pypi_0
- click =8.0.4=py310hecd8cb5_0
- cloudpickle =2.0.0=pyhd3eb1b0_0
- colorama =0.4.5=py310hecd8cb5_0
- colour-science =0.4.1=pypi_0
- contourpy =1.0.5=pypi_0
- cookiecutter =1.7.3=pyhd3eb1b0_0
- cryptography =37.0.1=py310hf6deb26_0
- cycler =0.11.0=pypi_0
- debugpy =1.5.1=py310he9d5cce_0
- decorator =5.1.1=pyhd3eb1b0_0
- defusedxml =0.7.1=pyhd3eb1b0_0
- diff-match-patch =20200713=pyhd3eb1b0_0
- dill =0.3.4=pyhd3eb1b0_0
- docutils =0.18.1=py310hecd8cb5_3
- entrypoints =0.4=py310hecd8cb5_0
- flake8 =4.0.1=pyhd3eb1b0_1
- fonttools =4.37.1=pypi_0
- frozenlist =1.2.0=py310hca72f7f_1
- gettext =0.21.0=h7535e17_0
- giflib =5.2.1=haf1e3a3_0
- glib =2.69.1=h8346a28_1
- gst-plugins-base =1.14.0=h4180768_2
- gstreamer =1.14.0=h0fc69c2_2
- icu =58.2=h0a44026_3
- idna =3.3=pypi_0
- imageio =2.21.2=pypi_0
- imagesize =1.4.1=py310hecd8cb5_0
- importlib-metadata =4.11.3=py310hecd8cb5_0
- importlib-resources =5.9.0=pypi_0
- importlib_metadata =4.11.3=hd3eb1b0_0
- inflection =0.5.1=py310hecd8cb5_0
- intervaltree =3.1.0=pyhd3eb1b0_0
- ipykernel =6.15.2=py310hecd8cb5_0
- ipython =7.31.1=py310hecd8cb5_1
- ipython_genutils =0.2.0=pyhd3eb1b0_1
- isort =5.9.3=pyhd3eb1b0_0
- jedi =0.18.1=py310hecd8cb5_1
- jellyfish =0.9.0=py310hca72f7f_0
- jinja2 =3.0.3=pyhd3eb1b0_0
- jinja2-time =0.2.0=pyhd3eb1b0_3
- jpeg =9e=hca72f7f_0
- json5 =0.9.5=pyh9f0ad1d_0
- jsonschema =4.4.0=py310hecd8cb5_0
- jupyter_client =7.3.5=py310hecd8cb5_0
- jupyter_contrib_core =0.4.0=pyhd8ed1ab_0
- jupyter_contrib_nbextensions =0.5.1=pyhd8ed1ab_2
- jupyter_core =4.10.0=py310hecd8cb5_0
- jupyter_highlight_selected_word =0.2.0=py310h2ec42d9_1005
- jupyter_latex_envs =1.4.6=pyhd8ed1ab_1002
- jupyter_nbextensions_configurator =0.4.1=pyhd8ed1ab_2
- jupyter_server =1.18.1=py310hecd8cb5_0
- jupyterlab =3.4.7=pyhd8ed1ab_0
- jupyterlab-spellchecker =0.7.2=pyhd8ed1ab_0
- jupyterlab_pygments =0.1.2=py_0
- jupyterlab_server =2.15.2=pyhd8ed1ab_0
- keyring =23.4.0=py310hecd8cb5_0
- kiwisolver =1.4.4=pypi_0
- krb5 =1.19.2=hcd88c3b_0
- lazy-object-proxy =1.6.0=py310hca72f7f_0
- lerc =3.0=he9d5cce_0
- libclang =12.0.0=default_hbc2896b_2
- libcxx =14.0.6=h9765a3e_0
- libdeflate =1.8=h9ed2024_5
- libedit =3.1.20210910=hca72f7f_0
- libffi =3.3=hb1e8313_2
- libiconv =1.16=hca72f7f_2
- libllvm12 =12.0.0=h9b2ccf5_3
- libpng =1.6.37=ha441bb4_0
- libpq =12.9=h1c9f633_3
- libsodium =1.0.18=h1de35cc_0
- libspatialindex =1.9.3=h23ab428_0
- libtiff =4.4.0=h2ef1027_0
- libwebp =1.2.2=h56c3ce4_0
- libwebp-base =1.2.2=hca72f7f_0
- libxml2 =2.9.14=hbf8cd5e_0
- libxslt =1.1.35=h5b33f42_0
- llvm-openmp =14.0.6=h0dcd299_0
- luxpy =1.9.8=pypi_0
- lxml =4.9.1=py310h6c45266_0
- lz4-c =1.9.3=h23ab428_1
- markupsafe =2.1.1=py310hca72f7f_0
- matplotlib =3.6.0rc2=pypi_0
- matplotlib-inline =0.1.6=py310hecd8cb5_0
- mccabe =0.7.0=pyhd3eb1b0_0
- mistune =0.8.4=py310hca72f7f_1000
- msgpack =1.0.4=pypi_0
- multidict =6.0.2=py310hca72f7f_0
- mypy =0.910=pyhd3eb1b0_0
- mypy_extensions =0.4.3=py310hecd8cb5_1
- nbclassic =0.4.3=pyhd8ed1ab_0
- nbclient =0.5.13=py310hecd8cb5_0
- nbconvert =6.4.4=py310hecd8cb5_0
- nbformat =5.5.0=py310hecd8cb5_0
- nbsphinx =0.8.9=pyhd8ed1ab_0
- ncurses =6.3=hca72f7f_3
- nest-asyncio =1.5.5=py310hecd8cb5_0
- notebook =6.4.12=py310hecd8cb5_0
- notebook-shim =0.1.0=pyhd8ed1ab_0
- nspr =4.33=he9d5cce_0
- nss =3.74=h47edf6a_0
- numexpr =2.8.3=pypi_0
- numpy =1.23.2=pypi_0
- numpydoc =1.4.0=py310hecd8cb5_0
- openssl =1.1.1q=hca72f7f_0
- packaging =21.3=pypi_0
- pandas =1.5.0rc0=pypi_0
- pandocfilters =1.5.0=pyhd3eb1b0_0
- parso =0.8.3=pyhd3eb1b0_0
- pathspec =0.9.0=py310hecd8cb5_0
- pcre =8.45=h23ab428_0
- pexpect =4.8.0=pyhd3eb1b0_3
- pickleshare =0.7.5=pyhd3eb1b0_1003
- pillow =9.2.0=pypi_0
- pip =22.1.2=py310hecd8cb5_0
- platformdirs =2.5.2=py310hecd8cb5_0
- pluggy =1.0.0=py310hecd8cb5_1
- ply =3.11=py310hecd8cb5_0
- pockets =0.9.1=py_0
- poyo =0.5.0=pyhd3eb1b0_0
- prometheus_client =0.14.1=py310hecd8cb5_0
- prompt-toolkit =3.0.20=pyhd3eb1b0_0
- psutil =5.9.0=py310hca72f7f_0
- ptyprocess =0.7.0=pyhd3eb1b0_2
- pycodestyle =2.8.0=pyhd3eb1b0_0
- pycparser =2.21=pyhd3eb1b0_0
- pydocstyle =6.1.1=pyhd3eb1b0_0
- pyflakes =2.4.0=pyhd3eb1b0_0
- pygments =2.11.2=pyhd3eb1b0_0
- pylint =2.14.5=py310hecd8cb5_0
- pyls-spyder =0.4.0=pyhd3eb1b0_0
- pyobjc-core =8.5=py310hc55c11b_0
- pyobjc-framework-cocoa =8.5=py310hca72f7f_0
- pyobjc-framework-coreservices =8.5=py310hca72f7f_0
- pyobjc-framework-fsevents =8.5=py310hecd8cb5_0
- pyopenssl =22.0.0=pyhd3eb1b0_0
- pyparsing =3.0.9=pypi_0
- pyplr =1.0.3=dev_0
- pyqt =5.15.7=py310he9d5cce_0
- pyqt5-sip =12.11.0=pypi_0
- pyqtwebengine =5.15.7=py310he9d5cce_0
- pyrsistent =0.18.0=py310hca72f7f_0
- pysilsub =0.0.13=dev_0
- pysocks =1.7.1=py310hecd8cb5_0
- python =3.10.4=hdfd78df_0
- python-dateutil =2.8.2=pypi_0
- python-fastjsonschema =2.16.2=py310hecd8cb5_0
- python-lsp-black =1.2.1=py310hecd8cb5_0
- python-lsp-jsonrpc =1.0.0=pyhd3eb1b0_0
- python-lsp-server =1.5.0=py310hecd8cb5_0
- python-slugify =5.0.2=pyhd3eb1b0_0
- python.app =3=py310hca72f7f_0
- python_abi =3.10=2_cp310
- pytz =2022.2.1=pypi_0
- pyyaml =6.0=pypi_0
- pyzmq =23.2.1=pypi_0
- qdarkstyle =3.0.2=pyhd3eb1b0_0
- qstylizer =0.1.10=pyhd3eb1b0_0
- qt-main =5.15.2=h719ae48_7
- qt-webengine =5.15.9=h90a370e_4
- qtawesome =1.0.3=pyhd3eb1b0_0
- qtconsole =5.3.2=py310hecd8cb5_0
- qtpy =2.2.0=py310hecd8cb5_0
- qtwebkit =5.212=h24dc246_4
- readline =8.1.2=hca72f7f_1
- requests =2.28.1=pypi_0
- rope =0.22.0=pyhd3eb1b0_0
- rtree =0.9.7=py310hecd8cb5_1
- scipy =1.9.1=pypi_0
- seaborn =0.12.0rc0=pypi_0
- seabreeze =2.0.3=pypi_0
- send2trash =1.8.0=pyhd3eb1b0_1
- setuptools =63.4.1=py310hecd8cb5_0
- sip =6.6.2=py310he9d5cce_0
- six =1.16.0=pypi_0
- sniffio =1.3.0=pyhd8ed1ab_0
- snowballstemmer =2.2.0=pyhd3eb1b0_0
- sortedcontainers =2.4.0=pyhd3eb1b0_0
- soupsieve =2.3.1=pyhd3eb1b0_0
- sphinx =5.0.2=py310hecd8cb5_0
- sphinx-autodoc-typehints =1.19.2=pyhd8ed1ab_0
- sphinxcontrib-applehelp =1.0.2=pyhd3eb1b0_0
- sphinxcontrib-devhelp =1.0.2=pyhd3eb1b0_0
- sphinxcontrib-htmlhelp =2.0.0=pyhd3eb1b0_0
- sphinxcontrib-jsmath =1.0.1=pyhd3eb1b0_0
- sphinxcontrib-napoleon =0.7=py_0
- sphinxcontrib-qthelp =1.0.3=pyhd3eb1b0_0
- sphinxcontrib-serializinghtml =1.1.5=pyhd3eb1b0_0
- spyder =5.3.3=py310hecd8cb5_0
- spyder-kernels =2.3.3=py310hecd8cb5_0
- spyder-notebook =0.1.4=py_0
- sqlite =3.39.2=h707629a_0
- tables =3.7.0=pypi_0
- terminado =0.13.1=py310hecd8cb5_0
- testpath =0.6.0=py310hecd8cb5_0
- text-unidecode =1.3=pyhd3eb1b0_0
- textdistance =4.2.1=pyhd3eb1b0_0
- three-merge =0.1.1=pyhd3eb1b0_0
- tinycss =0.4=pyhd3eb1b0_1002
- tk =8.6.12=h5d9f67b_0
- toml =0.10.2=pyhd3eb1b0_0
- tomli =2.0.1=py310hecd8cb5_0
- tomlkit =0.11.1=py310hecd8cb5_0
- tornado =6.2=py310hca72f7f_0
- traitlets =5.1.1=pyhd3eb1b0_0
- typing-extensions =4.3.0=pypi_0
- typing_extensions =4.3.0=py310hecd8cb5_0
- tzdata =2022c=h04d1e81_0
- ujson =5.4.0=py310he9d5cce_0
- unidecode =1.2.0=pyhd3eb1b0_0
- urllib3 =1.26.12=pypi_0
- watchdog =2.1.6=py310h999c104_0
- wcwidth =0.2.5=pyhd3eb1b0_0
- webencodings =0.5.1=py310hecd8cb5_1
- websocket-client =1.4.1=pyhd8ed1ab_0
- whatthepatch =1.0.2=py310hecd8cb5_0
- wheel =0.37.1=pyhd3eb1b0_0
- wrapt =1.14.1=py310hca72f7f_0
- wurlitzer =3.0.2=py310hecd8cb5_0
- xz =5.2.5=hca72f7f_1
- yaml =0.2.5=haf1e3a3_0
- yapf =0.31.0=pyhd3eb1b0_0
- yarl =1.8.1=py310hca72f7f_0
- zeromq =4.3.4=h23ab428_0
- zipp =3.8.0=py310hecd8cb5_0
- zlib =1.2.12=h4dc903c_3
- zstd =1.5.2=hcb37349_0
- colour-science *
- importlib-resources *
- matplotlib *
- numpy *
- pandas *
- scipy *
- seaborn *