├── docs
├── requirements.txt
├── _static
│ ├── kepler_12b.wav
│ ├── BinaryPainting.png
│ ├── astronify-TEXT.png
│ ├── ASTRONIFY_white.png
│ ├── astronify-CIRCLE.png
│ ├── astronify-favicon.png
│ ├── Intro_Astronify_Series_6_0.png
│ ├── astronify.css
│ ├── ASTRONIFY_Ball_white.svg
│ ├── main.css
│ ├── ASTRONIFY_white.svg
│ └── ASTRONIFY.svg
├── contents.rst
├── astronify
│ ├── How_To_Use_The_Simulator_files
│ │ ├── How_To_Use_The_Simulator_12_0.png
│ │ ├── How_To_Use_The_Simulator_16_0.png
│ │ ├── How_To_Use_The_Simulator_20_0.png
│ │ ├── How_To_Use_The_Simulator_24_0.png
│ │ ├── How_To_Use_The_Simulator_28_0.png
│ │ ├── How_To_Use_The_Simulator_2_0.png
│ │ ├── How_To_Use_The_Simulator_32_0.png
│ │ └── How_To_Use_The_Simulator_8_0.png
│ ├── tutorials.rst
│ ├── api.rst
│ ├── install.rst
│ ├── Intro_Astronify_Series.rst
│ ├── index.rst
│ └── How_To_Use_The_Simulator.rst
├── _templates
│ └── layout.html
├── Makefile
├── make.bat
├── index.html
├── CreateWithLight.html
├── conf.py
└── notebooks
│ ├── Intro_Astronify_Series.ipynb
│ └── How_To_Use_The_Simulator.ipynb
├── astronify
├── series
│ ├── tests
│ │ ├── __init__.py
│ │ └── test_series.py
│ └── __init__.py
├── utils
│ ├── tests
│ │ ├── __init__.py
│ │ └── test_pitch_mapping.py
│ ├── __init__.py
│ ├── exceptions.py
│ └── pitch_mapping.py
├── _astropy_init.py
├── data
│ └── README.rst
├── __init__.py
├── simulator
│ ├── __init__.py
│ ├── example_cmds.sh
│ ├── sim_lc_config.py
│ ├── add_lc_noise.py
│ ├── tests
│ │ ├── test_check_flare_params.py
│ │ ├── test_check_transit_params.py
│ │ ├── test_add_lc_noise.py
│ │ ├── test_sim_lc_config.py
│ │ ├── test_add_sine_signal.py
│ │ ├── test_add_transit_signal.py
│ │ └── test_add_flare_signal.py
│ ├── add_sine_signal.py
│ ├── check_flare_params.py
│ ├── check_transit_params.py
│ ├── add_transit_signal.py
│ ├── add_flare_signal.py
│ ├── sim_lc_setup_args.py
│ └── sim_lc.py
└── conftest.py
├── pyproject.toml
├── .github
├── workflows
│ ├── black.yml
│ └── ci_workflows.yml
├── CODEOWNERS
└── dependabot.yml
├── MANIFEST.in
├── licenses
├── README.rst
├── LICENSE.rst
└── TEMPLATE_LICENCE.rst
├── .readthedocs.yml
├── CHANGES.rst
├── .gitignore
├── CITATION.cff
├── setup.cfg
├── setup.py
├── tox.ini
├── DEVELOPER_DOC.rst
└── README.rst
/docs/requirements.txt:
--------------------------------------------------------------------------------
1 | sphinx-rtd-theme
2 |
--------------------------------------------------------------------------------
/docs/_static/kepler_12b.wav:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/spacetelescope/astronify/main/docs/_static/kepler_12b.wav
--------------------------------------------------------------------------------
/docs/_static/BinaryPainting.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/spacetelescope/astronify/main/docs/_static/BinaryPainting.png
--------------------------------------------------------------------------------
/docs/_static/astronify-TEXT.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/spacetelescope/astronify/main/docs/_static/astronify-TEXT.png
--------------------------------------------------------------------------------
/docs/_static/ASTRONIFY_white.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/spacetelescope/astronify/main/docs/_static/ASTRONIFY_white.png
--------------------------------------------------------------------------------
/docs/_static/astronify-CIRCLE.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/spacetelescope/astronify/main/docs/_static/astronify-CIRCLE.png
--------------------------------------------------------------------------------
/docs/_static/astronify-favicon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/spacetelescope/astronify/main/docs/_static/astronify-favicon.png
--------------------------------------------------------------------------------
/docs/_static/Intro_Astronify_Series_6_0.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/spacetelescope/astronify/main/docs/_static/Intro_Astronify_Series_6_0.png
--------------------------------------------------------------------------------
/astronify/series/tests/__init__.py:
--------------------------------------------------------------------------------
1 | # Licensed under a 3-clause BSD style license - see LICENSE.rst
2 | """
3 | This module contains series tests.
4 | """
5 |
--------------------------------------------------------------------------------
/astronify/utils/tests/__init__.py:
--------------------------------------------------------------------------------
1 | # Licensed under a 3-clause BSD style license - see LICENSE.rst
2 | """
3 | This module contains utils tests.
4 | """
5 |
--------------------------------------------------------------------------------
/docs/contents.rst:
--------------------------------------------------------------------------------
1 | .. toctree::
2 | :maxdepth: 2
3 |
4 | astronify/install
5 | astronify/index
6 | astronify/api
7 | astronify/tutorials
8 |
--------------------------------------------------------------------------------
/pyproject.toml:
--------------------------------------------------------------------------------
1 | [build-system]
2 |
3 | requires = ["setuptools",
4 | "setuptools_scm",
5 | "wheel"]
6 |
7 | build-backend = 'setuptools.build_meta'
8 |
--------------------------------------------------------------------------------
/docs/astronify/How_To_Use_The_Simulator_files/How_To_Use_The_Simulator_12_0.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/spacetelescope/astronify/main/docs/astronify/How_To_Use_The_Simulator_files/How_To_Use_The_Simulator_12_0.png
--------------------------------------------------------------------------------
/docs/astronify/How_To_Use_The_Simulator_files/How_To_Use_The_Simulator_16_0.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/spacetelescope/astronify/main/docs/astronify/How_To_Use_The_Simulator_files/How_To_Use_The_Simulator_16_0.png
--------------------------------------------------------------------------------
/docs/astronify/How_To_Use_The_Simulator_files/How_To_Use_The_Simulator_20_0.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/spacetelescope/astronify/main/docs/astronify/How_To_Use_The_Simulator_files/How_To_Use_The_Simulator_20_0.png
--------------------------------------------------------------------------------
/docs/astronify/How_To_Use_The_Simulator_files/How_To_Use_The_Simulator_24_0.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/spacetelescope/astronify/main/docs/astronify/How_To_Use_The_Simulator_files/How_To_Use_The_Simulator_24_0.png
--------------------------------------------------------------------------------
/docs/astronify/How_To_Use_The_Simulator_files/How_To_Use_The_Simulator_28_0.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/spacetelescope/astronify/main/docs/astronify/How_To_Use_The_Simulator_files/How_To_Use_The_Simulator_28_0.png
--------------------------------------------------------------------------------
/docs/astronify/How_To_Use_The_Simulator_files/How_To_Use_The_Simulator_2_0.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/spacetelescope/astronify/main/docs/astronify/How_To_Use_The_Simulator_files/How_To_Use_The_Simulator_2_0.png
--------------------------------------------------------------------------------
/docs/astronify/How_To_Use_The_Simulator_files/How_To_Use_The_Simulator_32_0.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/spacetelescope/astronify/main/docs/astronify/How_To_Use_The_Simulator_files/How_To_Use_The_Simulator_32_0.png
--------------------------------------------------------------------------------
/docs/astronify/How_To_Use_The_Simulator_files/How_To_Use_The_Simulator_8_0.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/spacetelescope/astronify/main/docs/astronify/How_To_Use_The_Simulator_files/How_To_Use_The_Simulator_8_0.png
--------------------------------------------------------------------------------
/.github/workflows/black.yml:
--------------------------------------------------------------------------------
1 | name: Lint
2 |
3 | on: [push, pull_request]
4 |
5 | jobs:
6 | lint:
7 | runs-on: ubuntu-latest
8 | steps:
9 | - uses: actions/checkout@v6
10 | - uses: psf/black@stable
11 |
--------------------------------------------------------------------------------
/astronify/_astropy_init.py:
--------------------------------------------------------------------------------
1 | # Licensed under a 3-clause BSD style license - see LICENSE.rst
2 |
3 | __all__ = ["__version__"]
4 |
5 | try:
6 | from .version import version as __version__
7 | except ImportError:
8 | __version__ = ""
9 |
--------------------------------------------------------------------------------
/astronify/data/README.rst:
--------------------------------------------------------------------------------
1 | Data directory
2 | ==============
3 |
4 | This directory contains data files included with the package source
5 | code distribution. Note that this is intended only for relatively small files
6 | - large files should be externally hosted and downloaded as needed.
7 |
--------------------------------------------------------------------------------
/astronify/utils/__init__.py:
--------------------------------------------------------------------------------
1 | # Licensed under a 3-clause BSD style license - see LICENSE.rst
2 |
3 | # This sub-module is destined for common non-package specific utility
4 | # functions.
5 |
6 |
7 | from .pitch_mapping import * # noqa: F403
8 |
9 | __all__ = ["data_to_pitch"] # noqa: F405
10 |
--------------------------------------------------------------------------------
/docs/astronify/tutorials.rst:
--------------------------------------------------------------------------------
1 | *******************
2 | Astronify Tutorials
3 | *******************
4 |
5 | This is a collection of tutorials on various Astronify features.
6 |
7 |
8 | .. toctree::
9 | :maxdepth: 1
10 |
11 | Intro_Astronify_Series.rst
12 |
13 | How_To_Use_The_Simulator.rst
14 |
--------------------------------------------------------------------------------
/docs/astronify/api.rst:
--------------------------------------------------------------------------------
1 | *************
2 | Astronify API
3 | *************
4 |
5 | .. automodapi:: astronify.series
6 | :no-inheritance-diagram:
7 |
8 | .. automodapi:: astronify.utils
9 | :no-inheritance-diagram:
10 |
11 | .. automodapi:: astronify.simulator
12 | :no-inheritance-diagram:
13 |
--------------------------------------------------------------------------------
/.github/CODEOWNERS:
--------------------------------------------------------------------------------
1 | # This is a comment.
2 | # Each line is a file pattern followed by one or more owners.
3 |
4 | # These owners will be the default owners for everything in
5 | # the repo. Unless a later match takes precedence,
6 | # these owners will be requested for
7 | # review when someone opens a pull request.
8 | * @ceb8 @scfleming
9 |
--------------------------------------------------------------------------------
/astronify/series/__init__.py:
--------------------------------------------------------------------------------
1 | # Licensed under a 3-clause BSD style license - see LICENSE.rst
2 |
3 | """
4 | Data Series Sonification
5 | ========================
6 |
7 | This module contains functionality for sonifying data series.
8 |
9 | """
10 |
11 |
12 | from .series import * # noqa: F403
13 |
14 | __all__ = ["SoniSeries", "PitchMap"] # noqa: F405
15 |
--------------------------------------------------------------------------------
/MANIFEST.in:
--------------------------------------------------------------------------------
1 | include README.rst
2 | include CHANGES.rst
3 | include setup.cfg
4 | include LICENSE.rst
5 | include pyproject.toml
6 |
7 | recursive-include astronify *.pyx *.c *.pxd
8 | recursive-include docs *
9 | recursive-include licenses *
10 | recursive-include scripts *
11 |
12 | prune build
13 | prune docs/_build
14 | prune docs/api
15 |
16 | global-exclude *.pyc *.o
17 |
--------------------------------------------------------------------------------
/licenses/README.rst:
--------------------------------------------------------------------------------
1 | Licenses
2 | ========
3 |
4 | This directory holds license and credit information for the package,
5 | works the package is derived from, and/or datasets.
6 |
7 | Ensure that you pick a package licence which is in this folder and it matches
8 | the one mentioned in the top level README.rst file. If you are using the
9 | pre-rendered version of this template check for the word 'Other' in the README.
10 |
--------------------------------------------------------------------------------
/.readthedocs.yml:
--------------------------------------------------------------------------------
1 | version: 2
2 |
3 | build:
4 | os: "ubuntu-24.04"
5 | tools:
6 | python: "3.11"
7 | apt_packages:
8 | - portaudio19-dev
9 | - libsndfile1-dev
10 | - libportmidi-dev
11 | - liblo-dev
12 |
13 | python:
14 | install:
15 | - method: pip
16 | path: .
17 | extra_requirements:
18 | - docs
19 | - all
20 | - requirements: docs/requirements.txt
21 |
22 | sphinx:
23 | configuration: docs/conf.py
24 |
--------------------------------------------------------------------------------
/astronify/__init__.py:
--------------------------------------------------------------------------------
1 | # Licensed under a 3-clause BSD style license - see LICENSE.rst
2 |
3 |
4 | # Packages may add whatever they like to this file, but
5 | # should keep this content at the top.
6 | # ----------------------------------------------------------------------------
7 | from ._astropy_init import * # noqa
8 |
9 | # ----------------------------------------------------------------------------
10 | from . import series # noqa
11 | from . import simulator # noqa
12 | from . import utils # noqa
13 |
14 | __all__ = ["series", "simulator", "utils"] # noqa
15 | __version__ = "0.11.1"
16 |
--------------------------------------------------------------------------------
/astronify/simulator/__init__.py:
--------------------------------------------------------------------------------
1 | # Licensed under a 3-clause BSD style license - see LICENSE.rst
2 |
3 | """
4 | Data Simulation
5 | ===============
6 |
7 | This module contains code for creating simulated/test light curves
8 | with a variety of signals in them as either an `~astropy.table.Table`,
9 | or FITS file. The files are designed to be read by the Astronify
10 | software package to use when testing the sonification process.
11 |
12 |
13 | Author: Scott W. Fleming (fleming@stsci.edu)
14 |
15 | """
16 |
17 | from .sim_lc import * # noqa: F403
18 |
19 | __all__ = ["simulated_lc", "SimLcConfig"] # noqa: F405
20 |
--------------------------------------------------------------------------------
/astronify/utils/exceptions.py:
--------------------------------------------------------------------------------
1 | # Licensed under a 3-clause BSD style license - see LICENSE.rst
2 |
3 | """
4 | Custom exceptions used in the astronify classes
5 | """
6 |
7 | from astropy.utils.exceptions import AstropyWarning
8 |
9 |
10 | class InvalidInputError(Exception):
11 | """
12 | Exception to be issued when user input is incorrect in a
13 | way that prevents the function from running.
14 | """
15 |
16 | pass
17 |
18 |
19 | class InputWarning(AstropyWarning):
20 | """
21 | Warning to be issued when user input is incorrect in
22 | some way but doesn't prevent the function from running.
23 | """
24 |
25 | pass
26 |
--------------------------------------------------------------------------------
/.github/dependabot.yml:
--------------------------------------------------------------------------------
1 | # To get started with Dependabot version updates, you'll need to specify which
2 | # package ecosystems to update and where the package manifests are located.
3 | # Please see the documentation for all configuration options:
4 | # https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates
5 |
6 | version: 2
7 | updates:
8 | - package-ecosystem: "github-actions" # See documentation for possible values
9 | directory: ".github/workflows" # Location of package manifests
10 | schedule:
11 | interval: "monthly"
12 | groups:
13 | actions:
14 | patterns:
15 | - "*"
16 |
--------------------------------------------------------------------------------
/CHANGES.rst:
--------------------------------------------------------------------------------
1 | 0.11.1 (TBD)
2 | -------------------
3 |
4 | - Adds full suite of unit tests to the simulator package. Replaces
5 | some checks for presence of expected columns in the data table
6 | within series.py. Fixes unintentional drop of author Jennifer Medina
7 | from setup.cfg.
8 |
9 | 0.11 (2025-01-31)
10 | ----------------
11 |
12 | - Fixes installation via pypi, confirmed to work with modern Python
13 | (e.g., 3.11, 3.12), updated installation instructions and tips,
14 | infrastructure improvements in CI, fixes automated documentation
15 | builds, added __version__.
16 |
17 | 0.1 (2020-11-25)
18 | ----------------
19 |
20 | - Initial release. Includes features!
21 |
--------------------------------------------------------------------------------
/docs/_templates/layout.html:
--------------------------------------------------------------------------------
1 | {% extends "!layout.html" %}
2 | {% block sidebartitle %}
3 |
4 |
5 |
6 |
7 |
8 | {% if theme_display_version %}
9 | {%- set nav_version = version %}
10 | {% if READTHEDOCS and current_version %}
11 | {%- set nav_version = current_version %}
12 | {% endif %}
13 | {% if nav_version %}
14 |
Astronify is under active development. Currently the package can sonify data series and will ultimately grow to encompass a range of sonification functionality.
29 | 30 |We welcome feedback and code contributions. Visit us on GitHub at:
github.com/spacetelescope/astronify 31 | 32 | 33 | 34 |We created 3 animations explaining sonification of Astronomy Data.
38 | 39 | 40 | 44 | 45 | 46 | 47 |74 | 75 | Podcast: Astro[sound]bytes- Scintillating Sounds of Science 76 | 77 | Blog: Hearing the Sound of Light 78 | 79 | Blog: Discovering Exoplanets Using Sonification 80 | 81 | Blog: Musical Fingerprints of Wobbly Stars 82 | 83 | Create With Light: Summer Art Program 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 |
Test your ears! Listen to real sonified data and answer questions about what you heard. Playing these games will help us learn how to improve our sonifications.
101 | 102 | 103 | 104 | 109 | 110 | 111 | 112 | 116 | 117 | 118 | 119 | 120 | 121 | 122 | 123 | 124 | 125 | 126 | 127 | 128 | 129 | 130 | -------------------------------------------------------------------------------- /astronify/simulator/sim_lc_setup_args.py: -------------------------------------------------------------------------------- 1 | """ 2 | .. module:: sim_lc_setup_args 3 | :synopsis: Sets up command-line argument parser. 4 | 5 | .. moduleauthor:: Scott W. FlemingWe hired students to create art inspired by space sonification that can be enjoyed by a blind audience. We all met by video chat for 6 weeks during the summer of 2021. The student artists were both blind and sighted themselves—so we had a lot of interesting discussions about acessibility and art.
21 | 22 |The students created: 2 musical pieces, an animation with spoken word poetry, and a 3-dimensional painting.
23 | 24 | 25 | 26 | 27 |
57 |
58 |
59 |
60 |
61 |
62 |
63 |
64 | 70 | I have been thinking about making art all day, and haven’t taken action on it. Maybe a creative thought will slip through the exhaustion-induced chaos. I zombie walk to my desk. I pick up the iPhone then proceed to open Garageband. It certainly isn’t one of the better editors out there, but it’s accessibility is decent. I also happen to be very familiar with it, as I have played with it a lot in the past. I open up a new project file and begin aimlessly scrolling through the eleven selection categories. I stumble upon the sampler which, surprisingly, I have not found use for. This is mainly due to the fact that it makes a speed modification in edition to the pitch change, which I did not want or expect on my first use. Since I was letting ideas loose, and was not familiar with this interface in particular, I decided I would explore it. This art program is about problem solving and open mindedness. I click the button and begin exploring. From experience, I know my keyboard starts near the middle and extends to the bottom of the screen, when holding the phone in the proper orientation. I proceed to find the keyboard and start fiddling with it, making discoveries along the way. Once I got familiar with finding the sample controls, which hide in confusing (and sometimes inaccessible) menus, I record a test sample. Once I record a suitable test sample, I begin editing it and seeing what happens along the way. Though the experience is slow and laggy, it was also somewhat natural. I get carried away playing with this, using the different controls and tapping and sliding through the admittedly small keyboard screen. I became inspired to learn more about it, as the variations of interaction and response are so few and yet so many. This is especially true of samples which have pitch change recorded into them, such as those taken from certain types of sonified data files. This truly intrigues me and I can not wait to see what comes out of it! There is much work to be done… 71 |
72 | 73 | 74 | 75 | 76 | 77 |79 | The inspiration for this musical piece is derived from listening to various sonifications and incorporating such auditory data into the piece, while also expressing the emotions I feel when I listen to the sonifications through this piece. While listening to the sonifications before beginning the production process, I would condition myself to think about nothing else except for this auditory data. As I deciphered how the sonifications made me feel and what musical elements could describe this, I began to spontaneously play notes on my electric piano - hoping to find a melody that would successfully convey this emotion, while also blending with the chosen sonification itself. 80 | 81 | 82 | I picked one specific sonification that is considered a flare. To discover how I would create music from this auditory data, I began listening to this specific sonification and re-creating this sequence of notes on my piano by ear. From this exploration on my piano, I created a melody and used different virtual instruments with this same melody that have timbres that “feel” like something extraterrestrial. After adding some voices and synths to this melody, I decided to use a file converter to turn the audio file of the original flare sonification into a MIDI file so that I could further explore the elements of this sonification and manipulate its tempo, pitch, and timbre. From this MIDI version of the flare sonification, I gathered more inspiration as I had greater freedom to incorporate this flare into the melody I now had as a starting point. Continuing to transport, alter, and add tracks, I progressed slowly but ultimately finished with a piece that I believe merges the elements of - and feelings I perceive from - my melody with the flare sonification. 83 | 84 | 85 | I’d rather not explain what emotion I believe this work evokes. Instead, I encourage the audience to decipher their own perceptions of this piece by immersing themselves in the music as they think critically and creatively. Leaving the meaning of this musical piece implicit allows the music to have an infinitely sensational impact. 86 |
87 | 88 | 89 | 90 | 91 | 92 |94 | A World Beyond Us is a word art and digital imagery design in graphics and shadow colors. In A Word Beyond Us it has beautifully done sound, and sound from other outside sources. A World Beyond Us was a developed idea that changed over time due to time constraints. The piece turned out pretty well but definitely could have some improvements in the future. 95 |
96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | -------------------------------------------------------------------------------- /docs/conf.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # Licensed under a 3-clause BSD style license - see LICENSE.rst 3 | # 4 | # Astropy documentation build configuration file. 5 | # 6 | # This file is execfile()d with the current directory set to its containing dir. 7 | # 8 | # Note that not all possible configuration values are present in this file. 9 | # 10 | # All configuration values have a default. Some values are defined in 11 | # the global Astropy configuration which is loaded here before anything else. 12 | # See astropy.sphinx.conf for which values are set there. 13 | 14 | # If extensions (or modules to document with autodoc) are in another directory, 15 | # add these directories to sys.path here. If the directory is relative to the 16 | # documentation root, use os.path.abspath to make it absolute, like shown here. 17 | # sys.path.insert(0, os.path.abspath('..')) 18 | # IMPORTANT: the above commented section was generated by sphinx-quickstart, but 19 | # is *NOT* appropriate for astropy or Astropy affiliated packages. It is left 20 | # commented out with this explanation to make it clear why this should not be 21 | # done. If the sys.path entry above is added, when the astropy.sphinx.conf 22 | # import occurs, it will import the *source* version of astropy instead of the 23 | # version installed (if invoked as "make html" or directly with sphinx), or the 24 | # version in the build directory (if "python setup.py build_sphinx" is used). 25 | # Thus, any C-extensions that are needed to build the documentation will *not* 26 | # be accessible, and the documentation will not build correctly. 27 | 28 | import os 29 | import sys 30 | import datetime 31 | from importlib import import_module 32 | 33 | try: 34 | from sphinx_astropy.conf.v1 import * # noqa 35 | except ImportError: 36 | print( 37 | "ERROR: the documentation requires the sphinx-astropy package to be installed" 38 | ) 39 | sys.exit(1) 40 | 41 | # Get configuration information from setup.cfg 42 | from configparser import ConfigParser 43 | 44 | conf = ConfigParser() 45 | 46 | conf.read([os.path.join(os.path.dirname(__file__), "..", "setup.cfg")]) 47 | setup_cfg = dict(conf.items("metadata")) 48 | 49 | # -- General configuration ---------------------------------------------------- 50 | 51 | # By default, highlight as Python 3. 52 | highlight_language = "python3" 53 | 54 | # If your documentation needs a minimal Sphinx version, state it here. 55 | # needs_sphinx = '5.0' 56 | 57 | # To perform a Sphinx version check that needs to be more specific than 58 | # major.minor, call `check_sphinx_version("x.y.z")` here. 59 | # check_sphinx_version("1.2.1") 60 | 61 | # List of patterns, relative to source directory, that match files and 62 | # directories to ignore when looking for source files. 63 | # exclude_patterns.append('_templates') 64 | 65 | # This is added to the end of RST files - a good place to put substitutions to 66 | # be used globally. 67 | rst_epilog += """ 68 | """ 69 | 70 | # -- Project information ------------------------------------------------------ 71 | 72 | # This does not *have* to match the package name, but typically does 73 | project = setup_cfg["name"] 74 | author = setup_cfg["author"] 75 | copyright = "{0}, {1}".format(datetime.datetime.now().year, setup_cfg["author"]) 76 | 77 | # The version info for the project you're documenting, acts as replacement for 78 | # |version| and |release|, also used in various other places throughout the 79 | # built documents. 80 | 81 | import_module(setup_cfg["name"]) 82 | package = sys.modules[setup_cfg["name"]] 83 | 84 | # The short X.Y version. 85 | version = package.__version__.split("-", 1)[0] 86 | # The full version, including alpha/beta/rc tags. 87 | release = package.__version__ 88 | 89 | 90 | # -- Options for HTML output -------------------------------------------------- 91 | 92 | # A NOTE ON HTML THEMES 93 | # The global astropy configuration uses a custom theme, 'bootstrap-astropy', 94 | # which is installed along with astropy. A different theme can be used or 95 | # the options for this theme can be modified by overriding some of the 96 | # variables set in the global configuration. The variables set in the 97 | # global configuration are listed below, commented out. 98 | 99 | 100 | # Add any paths that contain custom themes here, relative to this directory. 101 | # To use a different custom theme, add the directory containing the theme. 102 | # html_theme_path = ["_themes",] 103 | 104 | # Custome template path, adding custom css and home link 105 | templates_path = ["_templates"] 106 | 107 | # The theme to use for HTML and HTML Help pages. See the documentation for 108 | # a list of builtin themes. To override the custom theme, set this to the 109 | # name of a builtin theme or the name of a custom theme in html_theme_path. 110 | html_theme = "sphinx_rtd_theme" 111 | 112 | 113 | def setup_style(app): 114 | app.add_stylesheet("astronify.css") 115 | 116 | 117 | master_doc = "contents" 118 | html_extra_path = ["index.html", "CreateWithLight.html"] 119 | 120 | # Custom sidebar templates, maps document names to template names. 121 | html_sidebars = {"**": ["globaltoc.html", "localtoc.html", "searchbox.html"]} 122 | 123 | # The name of an image file (relative to this directory) to place at the top 124 | # of the sidebar. 125 | html_logo = "_static/ASTRONIFY_Ball_white.svg" 126 | 127 | # The name of an image file (within the static path) to use as favicon of the 128 | # docs. This file should be a Windows icon file (.ico) being 16x16 or 32x32 129 | # pixels large. 130 | html_favicon = "_static/astronify-favicon.png" 131 | 132 | # If not '', a 'Last updated on:' timestamp is inserted at every page bottom, 133 | # using the given strftime format. 134 | # html_last_updated_fmt = '' 135 | 136 | # The name for this set of Sphinx documents. If None, it defaults to 137 | # "