Compare commits
3 Commits
master
...
sphinx_doc
Author | SHA1 | Date | |
---|---|---|---|
f3c1bdf292 | |||
a86bcac604 | |||
7843e462de |
20
docs/Makefile
Normal file
20
docs/Makefile
Normal file
@ -0,0 +1,20 @@
|
||||
# Minimal makefile for Sphinx documentation
|
||||
#
|
||||
|
||||
# You can set these variables from the command line, and also
|
||||
# from the environment for the first two.
|
||||
SPHINXOPTS ?=
|
||||
SPHINXBUILD ?= sphinx-build
|
||||
SOURCEDIR = .
|
||||
BUILDDIR = _build
|
||||
|
||||
# Put it first so that "make" without argument is like "make help".
|
||||
help:
|
||||
@$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
|
||||
|
||||
.PHONY: help Makefile
|
||||
|
||||
# Catch-all target: route all unknown targets to Sphinx using the new
|
||||
# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).
|
||||
%: Makefile
|
||||
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
|
52
docs/conf.py
Normal file
52
docs/conf.py
Normal file
@ -0,0 +1,52 @@
|
||||
# Configuration file for the Sphinx documentation builder.
|
||||
#
|
||||
# This file only contains a selection of the most common options. For a full
|
||||
# list see the documentation:
|
||||
# https://www.sphinx-doc.org/en/master/usage/configuration.html
|
||||
|
||||
# -- Path setup --------------------------------------------------------------
|
||||
|
||||
# If extensions (or modules to document with autodoc) are in another directory,
|
||||
# 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.
|
||||
#
|
||||
# import os
|
||||
# import sys
|
||||
# sys.path.insert(0, os.path.abspath('.'))
|
||||
|
||||
|
||||
# -- Project information -----------------------------------------------------
|
||||
|
||||
project = 'pysuperconductor'
|
||||
copyright = '2021, Deepak Mallubhotla'
|
||||
author = 'Deepak Mallubhotla'
|
||||
|
||||
|
||||
# -- General configuration ---------------------------------------------------
|
||||
|
||||
# Add any Sphinx extension module names here, as strings. They can be
|
||||
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
|
||||
# ones.
|
||||
extensions = [
|
||||
]
|
||||
|
||||
# Add any paths that contain templates here, relative to this directory.
|
||||
templates_path = ['_templates']
|
||||
|
||||
# List of patterns, relative to source directory, that match files and
|
||||
# directories to ignore when looking for source files.
|
||||
# This pattern also affects html_static_path and html_extra_path.
|
||||
exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store']
|
||||
|
||||
|
||||
# -- Options for HTML output -------------------------------------------------
|
||||
|
||||
# The theme to use for HTML and HTML Help pages. See the documentation for
|
||||
# a list of builtin themes.
|
||||
#
|
||||
html_theme = 'alabaster'
|
||||
|
||||
# Add any paths that contain custom static files (such as style sheets) here,
|
||||
# relative to this directory. They are copied after the builtin static files,
|
||||
# so a file named "default.css" will overwrite the builtin "default.css".
|
||||
html_static_path = ['_static']
|
20
docs/index.rst
Normal file
20
docs/index.rst
Normal file
@ -0,0 +1,20 @@
|
||||
.. pysuperconductor documentation master file, created by
|
||||
sphinx-quickstart on Mon Jan 4 16:01:14 2021.
|
||||
You can adapt this file completely to your liking, but it should at least
|
||||
contain the root `toctree` directive.
|
||||
|
||||
Welcome to pysuperconductor's documentation!
|
||||
============================================
|
||||
|
||||
.. toctree::
|
||||
:maxdepth: 2
|
||||
:caption: Contents:
|
||||
|
||||
|
||||
|
||||
Indices and tables
|
||||
==================
|
||||
|
||||
* :ref:`genindex`
|
||||
* :ref:`modindex`
|
||||
* :ref:`search`
|
35
docs/make.bat
Normal file
35
docs/make.bat
Normal file
@ -0,0 +1,35 @@
|
||||
@ECHO OFF
|
||||
|
||||
pushd %~dp0
|
||||
|
||||
REM Command file for Sphinx documentation
|
||||
|
||||
if "%SPHINXBUILD%" == "" (
|
||||
set SPHINXBUILD=sphinx-build
|
||||
)
|
||||
set SOURCEDIR=.
|
||||
set BUILDDIR=_build
|
||||
|
||||
if "%1" == "" goto help
|
||||
|
||||
%SPHINXBUILD% >NUL 2>NUL
|
||||
if errorlevel 9009 (
|
||||
echo.
|
||||
echo.The 'sphinx-build' command was not found. Make sure you have Sphinx
|
||||
echo.installed, then set the SPHINXBUILD environment variable to point
|
||||
echo.to the full path of the 'sphinx-build' executable. Alternatively you
|
||||
echo.may add the Sphinx directory to PATH.
|
||||
echo.
|
||||
echo.If you don't have Sphinx installed, grab it from
|
||||
echo.http://sphinx-doc.org/
|
||||
exit /b 1
|
||||
)
|
||||
|
||||
%SPHINXBUILD% -M %1 %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O%
|
||||
goto end
|
||||
|
||||
:help
|
||||
%SPHINXBUILD% -M help %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O%
|
||||
|
||||
:end
|
||||
popd
|
@ -1,3 +1,8 @@
|
||||
"""pysuperconductor
|
||||
|
||||
This package implements some superconductor calculations, to facilitate noise
|
||||
calculations in proximity to superconductors.
|
||||
"""
|
||||
import logging
|
||||
from pysuperconductor.meta import __version__
|
||||
|
||||
|
@ -9,6 +9,8 @@ from typing import Tuple
|
||||
|
||||
|
||||
def energy(freq: float, delta: float) -> float:
|
||||
"""Takes in a "raw" quasiparticle energy and a gap, and returns the
|
||||
quasiparticle's energy in the SC state."""
|
||||
return numpy.sqrt(freq ** 2 + delta ** 2)
|
||||
|
||||
|
||||
|
9
pysuperconductor/sc_free_energy.py
Normal file
9
pysuperconductor/sc_free_energy.py
Normal file
@ -0,0 +1,9 @@
|
||||
def sc_free_energy(
|
||||
delta: float,
|
||||
temp: float,
|
||||
mustar: float,
|
||||
debye_freq: float,
|
||||
n_0: float,
|
||||
v_interaction_0: float
|
||||
) -> float:
|
||||
return 9999.35
|
22
tests/test_sc_free_energy.py
Normal file
22
tests/test_sc_free_energy.py
Normal file
@ -0,0 +1,22 @@
|
||||
import pysuperconductor.sc_free_energy
|
||||
import numpy
|
||||
import pytest
|
||||
|
||||
|
||||
def test_sc_free_energy():
|
||||
with pytest.warns(None) as record:
|
||||
actual = pysuperconductor.sc_free_energy.sc_free_energy(
|
||||
0.907816, .5, .247777, 100, 1, .2)
|
||||
assert not record
|
||||
numpy.testing.assert_almost_equal(
|
||||
actual, 9999.35,
|
||||
decimal=7, err_msg='superconducting free energy was off', verbose=True
|
||||
)
|
||||
with pytest.warns(None) as record:
|
||||
actual = pysuperconductor.sc_free_energy.sc_free_energy(
|
||||
0.907816, .5, .247777, 50, 1, .2)
|
||||
assert not record
|
||||
# numpy.testing.assert_almost_equal(
|
||||
# actual, 2498.910078644398,
|
||||
# decimal=7, err_msg='superconducting free energy was off', verbose=True
|
||||
# )
|
Loading…
x
Reference in New Issue
Block a user