From 8e4fa3bcb009da4dc78e334357df2066a89d42f7 Mon Sep 17 00:00:00 2001 From: Sebastian Date: Thu, 21 Sep 2023 18:27:25 -0400 Subject: [PATCH] Update docs --- .gitignore | 1 + docs/basic_tutorial.rst | 25 ++++++++++++++----------- docs/conf.py | 12 +++++++++++- docs/installation.rst | 4 ++-- 4 files changed, 28 insertions(+), 14 deletions(-) diff --git a/.gitignore b/.gitignore index 0ac0734..327bea4 100644 --- a/.gitignore +++ b/.gitignore @@ -24,6 +24,7 @@ MANIFEST # Sphinx docs/api docs/_build +docs/_static # Eclipse editor project files .project diff --git a/docs/basic_tutorial.rst b/docs/basic_tutorial.rst index b1b8ee4..a00eea8 100644 --- a/docs/basic_tutorial.rst +++ b/docs/basic_tutorial.rst @@ -55,7 +55,7 @@ population parameters. In this example, we will create the following: #. A stellar population representing a global cluster with: - * 10000 stars + * 100 stars * An age of 7.5 billion years * A metallicity of -2.0 * A Salpeter IMF with alpha = -2.35 @@ -81,12 +81,16 @@ population parameters. In this example, we will create the following: .. code-block:: python + obs_prefix = 'notebook_example' + obs_ra = 150.0 + obs_dec = -2.5 + from stips.scene_module import SceneModule scm = SceneModule(out_prefix=obs_prefix, ra=obs_ra, dec=obs_dec) stellar_parameters = { - 'n_stars': 10000, + 'n_stars': 100, 'age_low': 7.5e12, 'age_high': 7.5e12, 'z_low': -2.0, @@ -98,12 +102,12 @@ population parameters. In this example, we will create the following: 'distribution': 'invpow', 'radius': 100.0, 'radius_units': 'pc', - 'distance_low': 10.0, - 'distance_high': 10.0, + 'distance_low': 20.0, + 'distance_high': 20.0, 'offset_ra': 0.0, - 'offset_dec':0.0 - } - + 'offset_dec': 0.0 + } + stellar_cat_file = scm.CreatePopulation(stellar_parameters) print("Stellar population saved to file {}".format(stellar_cat_file)) @@ -113,7 +117,7 @@ population parameters. In this example, we will create the following: 'z_high': 0.2, 'rad_low': 0.01, 'rad_high': 2.0, - 'sb_v_low': 28.0, + 'sb_v_low': 30.0, 'sb_v_high': 25.0, 'distribution': 'uniform', 'clustered': False, @@ -122,10 +126,9 @@ population parameters. In this example, we will create the following: 'offset_ra': 0.0, 'offset_dec': 0.0, } - + galaxy_cat_file = scm.CreateGalaxies(galaxy_parameters) - print("Galaxy population saved to file{}".format(galaxy_cat_file)) - + print("Galaxy population saved to file {}".format(galaxy_cat_file)) Creating a STIPS Observation ---------------------------- diff --git a/docs/conf.py b/docs/conf.py index 437559d..ac96f5d 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -48,7 +48,7 @@ def setup(app): # add these directories to sys.path here. If the directory is relative to the # documentation root, use os.path.abspath to make it absolute, like shown here. sys.path.insert(0, os.path.abspath('../')) - +''' extensions = [ 'sphinx.ext.autodoc', 'sphinx.ext.intersphinx', @@ -59,6 +59,15 @@ def setup(app): 'sphinx_automodapi.automodapi', 'autoapi.extension', ] +''' +extensions = [ + 'sphinx.ext.intersphinx', + 'sphinx.ext.autodoc', + 'sphinx.ext.autosummary', + 'sphinx.ext.mathjax', + 'sphinx.ext.viewcode', + 'sphinx_rtd_theme', +] numpydoc_show_class_members = False @@ -92,6 +101,7 @@ def setup(app): # The name of the Pygments (syntax highlighting) style to use. pygments_style = 'sphinx' +#pygments_style = 'default' # -- Options for HTML output -------------------------------------------------- diff --git a/docs/installation.rst b/docs/installation.rst index 1e68de8..0b0e0c0 100644 --- a/docs/installation.rst +++ b/docs/installation.rst @@ -9,9 +9,9 @@ in this section along with instructions. STIPS Requirements ################## - \• ``pandeia>=1.7``: Exposure time calculator. + \• ``pandeia>=3.0``: Exposure time calculator. - \• ``webbpsf==1.1.0``: Nancy Grace Roman PSF calculator. STIPS also requires that ``poppy``, a + \• ``webbpsf==1.1.1``: Nancy Grace Roman PSF calculator. STIPS also requires that ``poppy``, a support package used by WebbPSF, have version ``>=1.0.3``. \• ``astropy``: STIPS uses Astropy in order to: