Compare commits
1 Commits
Author | SHA1 | Date | |
---|---|---|---|
1fc1ea66ea |
2
.gitignore
vendored
2
.gitignore
vendored
@ -70,7 +70,7 @@ instance/
|
||||
.scrapy
|
||||
|
||||
# Sphinx documentation
|
||||
docs/_build/
|
||||
docs/build/
|
||||
|
||||
# PyBuilder
|
||||
.pybuilder/
|
||||
|
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 = source
|
||||
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)
|
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=source
|
||||
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
|
55
docs/source/conf.py
Normal file
55
docs/source/conf.py
Normal file
@ -0,0 +1,55 @@
|
||||
# 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 = 'pathfinder'
|
||||
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 = [
|
||||
'sphinx.ext.autodoc',
|
||||
'sphinx.ext.coverage',
|
||||
'sphinx.ext.napoleon'
|
||||
]
|
||||
|
||||
# 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 = []
|
||||
|
||||
|
||||
# -- 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']
|
15
docs/source/index.rst
Normal file
15
docs/source/index.rst
Normal file
@ -0,0 +1,15 @@
|
||||
Welcome to pathfinder's documentation!
|
||||
======================================
|
||||
|
||||
.. toctree::
|
||||
:maxdepth: 2
|
||||
:caption: Contents:
|
||||
|
||||
modules
|
||||
|
||||
Indices and tables
|
||||
==================
|
||||
|
||||
* :ref:`genindex`
|
||||
* :ref:`modindex`
|
||||
* :ref:`search`
|
7
docs/source/modules.rst
Normal file
7
docs/source/modules.rst
Normal file
@ -0,0 +1,7 @@
|
||||
pathfinder
|
||||
==========
|
||||
|
||||
.. toctree::
|
||||
:maxdepth: 4
|
||||
|
||||
pathfinder
|
37
docs/source/pathfinder.model.rst
Normal file
37
docs/source/pathfinder.model.rst
Normal file
@ -0,0 +1,37 @@
|
||||
pathfinder.model package
|
||||
========================
|
||||
|
||||
Submodules
|
||||
----------
|
||||
|
||||
pathfinder.model.dot module
|
||||
---------------------------
|
||||
|
||||
.. automodule:: pathfinder.model.dot
|
||||
:members:
|
||||
:undoc-members:
|
||||
:show-inheritance:
|
||||
|
||||
pathfinder.model.model module
|
||||
-----------------------------
|
||||
|
||||
.. automodule:: pathfinder.model.model
|
||||
:members:
|
||||
:undoc-members:
|
||||
:show-inheritance:
|
||||
|
||||
pathfinder.model.staticdipole module
|
||||
------------------------------------
|
||||
|
||||
.. automodule:: pathfinder.model.staticdipole
|
||||
:members:
|
||||
:undoc-members:
|
||||
:show-inheritance:
|
||||
|
||||
Module contents
|
||||
---------------
|
||||
|
||||
.. automodule:: pathfinder.model
|
||||
:members:
|
||||
:undoc-members:
|
||||
:show-inheritance:
|
29
docs/source/pathfinder.rst
Normal file
29
docs/source/pathfinder.rst
Normal file
@ -0,0 +1,29 @@
|
||||
pathfinder package
|
||||
==================
|
||||
|
||||
Subpackages
|
||||
-----------
|
||||
|
||||
.. toctree::
|
||||
:maxdepth: 4
|
||||
|
||||
pathfinder.model
|
||||
|
||||
Submodules
|
||||
----------
|
||||
|
||||
pathfinder.meta module
|
||||
----------------------
|
||||
|
||||
.. automodule:: pathfinder.meta
|
||||
:members:
|
||||
:undoc-members:
|
||||
:show-inheritance:
|
||||
|
||||
Module contents
|
||||
---------------
|
||||
|
||||
.. automodule:: pathfinder
|
||||
:members:
|
||||
:undoc-members:
|
||||
:show-inheritance:
|
@ -0,0 +1,5 @@
|
||||
from pathfinder.model.dot import DotMeasurement
|
||||
from pathfinder.model.model import DotDipoleModel
|
||||
from pathfinder.model.staticdipole import StaticDipole
|
||||
|
||||
__all__ = ['DotMeasurement', 'DotDipoleModel', 'StaticDipole']
|
@ -2,6 +2,8 @@ from dataclasses import dataclass
|
||||
import numpy
|
||||
import numpy.typing
|
||||
|
||||
from pathfinder.model.staticdipole import StaticDipole
|
||||
|
||||
|
||||
@dataclass
|
||||
class DotMeasurement():
|
||||
@ -31,13 +33,15 @@ class DotMeasurement():
|
||||
|
||||
Returns
|
||||
----------
|
||||
Returns the voltage from that dipole at the point.
|
||||
float
|
||||
The voltage from that dipole at the point.
|
||||
'''
|
||||
p = pt[0:3] # hardcoded here because chances
|
||||
s = pt[3:6] # are we'll only ever work in 3d.
|
||||
|
||||
diff = self.r - s
|
||||
return p.dot(diff) / (numpy.linalg.norm(diff)**3)
|
||||
dipole = StaticDipole(p, s)
|
||||
|
||||
return dipole.v_at_position(self.r)
|
||||
|
||||
def cost(self, pts: numpy.ndarray) -> float:
|
||||
# 6 because dipole in 3d has 6 degrees of freedom.
|
@ -1,7 +1,7 @@
|
||||
from typing import Callable, Sequence
|
||||
import numpy
|
||||
import scipy.optimize
|
||||
from pathfinder.model.static.dot import DotMeasurement
|
||||
|
||||
from pathfinder.model.dot import DotMeasurement
|
||||
|
||||
|
||||
class DotDipoleModel():
|
||||
@ -35,10 +35,3 @@ class DotDipoleModel():
|
||||
return numpy.array([dot.jac(pts) for dot in self.dots])
|
||||
|
||||
return jac_to_return
|
||||
|
||||
def sol(self, initial_dipole=(0.1, 0.1, 0.1), initial_position=(.1, .1, .1), use_root=True):
|
||||
initial = numpy.tile(numpy.append(initial_dipole, initial_position), self.n)
|
||||
if use_root and self.m == 6 * self.n:
|
||||
# We are perfectly specified
|
||||
return scipy.optimize.root(self.costs(), initial, jac=self.jac(), tol=1e-12)
|
||||
return scipy.optimize.least_squares(self.costs(), initial, jac=self.jac(), ftol=1e-15, gtol=3e-16)
|
@ -1,5 +0,0 @@
|
||||
from pathfinder.model.oscillating.oscillating_dipole import OscillatingDipole, OscillatingDipoleArrangement
|
||||
from pathfinder.model.oscillating.dot import DotMeasurement
|
||||
from pathfinder.model.oscillating.model import DotOscillatingDipoleModel
|
||||
|
||||
__all__ = ['DotMeasurement', 'OscillatingDipole', 'OscillatingDipoleArrangement', 'DotOscillatingDipoleModel']
|
@ -1,87 +0,0 @@
|
||||
from dataclasses import dataclass
|
||||
import numpy
|
||||
import numpy.typing
|
||||
|
||||
|
||||
@dataclass
|
||||
class DotMeasurement():
|
||||
'''
|
||||
Representation of a dot measuring oscillating dipoles.
|
||||
|
||||
Parameters
|
||||
----------
|
||||
v : float
|
||||
The voltage measured at the dot.
|
||||
r : numpy.ndarray
|
||||
The position of the dot.
|
||||
f : float
|
||||
The measurement frequency.
|
||||
'''
|
||||
v: float
|
||||
r: numpy.ndarray
|
||||
f: float
|
||||
|
||||
def __post_init__(self) -> None:
|
||||
self.r = numpy.array(self.r)
|
||||
|
||||
def v_for_point(self, pt: numpy.ndarray) -> float:
|
||||
'''
|
||||
Returns the voltage for an oscillating dipole represented as a phase space point.
|
||||
|
||||
Parameters
|
||||
----------
|
||||
pt: A length 7 numpy array representing a dipole, as (px, py, pz, sx, sy, sz, w).
|
||||
|
||||
Returns
|
||||
----------
|
||||
Returns the voltage from that dipole at the point.
|
||||
'''
|
||||
p = pt[0:3] # hardcoded here because chances
|
||||
s = pt[3:6] # are we'll only ever work in 3d.
|
||||
w = pt[6]
|
||||
|
||||
return (self._alpha(p, s))**2 * self._b(w)
|
||||
|
||||
def _alpha(self, p: numpy.ndarray, s: numpy.ndarray) -> float:
|
||||
diff = self.r - s
|
||||
return p.dot(diff) / (numpy.linalg.norm(diff)**3)
|
||||
|
||||
def _b(self, w: float) -> float:
|
||||
return (1 / numpy.pi) * (w / (self.f**2 + w**2))
|
||||
|
||||
def cost(self, pts: numpy.ndarray) -> float:
|
||||
# 7 because dipole in 3d has 7 degrees of freedom.
|
||||
pt_length = 7
|
||||
# creates numpy.ndarrays in groups of pt_length.
|
||||
# Will throw problems for irregular points, but that's okay for now.
|
||||
chunked_pts = [pts[i: i + pt_length] for i in range(0, len(pts), pt_length)]
|
||||
return sum(self.v_for_point(pt) for pt in chunked_pts) - self.v
|
||||
|
||||
def jac_pt(self, pt: numpy.ndarray) -> numpy.ndarray:
|
||||
p = pt[0:3] # hardcoded here because chances
|
||||
s = pt[3:6] # are we'll only ever work in 3d.
|
||||
w = pt[6]
|
||||
|
||||
diff = self.r - s
|
||||
alpha = self._alpha(p, s)
|
||||
b = self._b(w)
|
||||
|
||||
p_divs = 2 * alpha * diff / (numpy.linalg.norm(diff)**3) * b
|
||||
|
||||
r_divs = (-p / (numpy.linalg.norm(diff)**3) + 3 * p.dot(diff) * diff / (numpy.linalg.norm(diff)**5)) * 2 * alpha * b
|
||||
|
||||
f2 = self.f**2
|
||||
w2 = w**2
|
||||
|
||||
w_div = alpha**2 * (1 / numpy.pi) * ((f2 - w2) / ((f2 + w2)**2))
|
||||
|
||||
return numpy.concatenate((p_divs, r_divs, w_div), axis=None)
|
||||
|
||||
def jac(self, pts: numpy.ndarray) -> numpy.ndarray:
|
||||
# 7 because oscillating dipole in 3d has 7 degrees of freedom.
|
||||
pt_length = 7
|
||||
# creates numpy.ndarrays in groups of pt_length.
|
||||
# Will throw problems for irregular points, but that's okay for now.
|
||||
chunked_pts = [pts[i: i + pt_length] for i in range(0, len(pts), pt_length)]
|
||||
|
||||
return numpy.append([], [self.jac_pt(pt) for pt in chunked_pts])
|
@ -1,45 +0,0 @@
|
||||
from typing import Callable, Sequence
|
||||
import numpy
|
||||
import scipy.optimize
|
||||
from pathfinder.model.oscillating.dot import DotMeasurement
|
||||
import pathfinder.model.oscillating.util
|
||||
|
||||
|
||||
class DotOscillatingDipoleModel():
|
||||
'''
|
||||
Model of n static oscillating with a collection of voltage measurements
|
||||
at dots at different positions and frequencies.
|
||||
|
||||
Parameters
|
||||
----------
|
||||
dots : Sequence[DotMeasurement]
|
||||
A collection of dots representing a series of measured noise spectrum values.
|
||||
n: int
|
||||
The number of dipoles to assume.
|
||||
'''
|
||||
def __init__(self, dots: Sequence[DotMeasurement], n: int) -> None:
|
||||
self.dots = dots
|
||||
self.m = len(dots)
|
||||
self.n = n
|
||||
|
||||
def __repr__(self) -> str:
|
||||
return f'DotOscillatingDipoleModel({repr(list(self.dots))}, {self.n})'
|
||||
|
||||
def costs(self) -> Callable[[numpy.ndarray], numpy.ndarray]:
|
||||
def costs_to_return(pt: numpy.ndarray) -> numpy.ndarray:
|
||||
return numpy.array([dot.cost(pt) for dot in self.dots])
|
||||
|
||||
return costs_to_return
|
||||
|
||||
def jac(self) -> Callable[[numpy.ndarray], numpy.ndarray]:
|
||||
def jac_to_return(pts: numpy.ndarray) -> numpy.ndarray:
|
||||
return numpy.array([dot.jac(pts) for dot in self.dots])
|
||||
|
||||
return jac_to_return
|
||||
|
||||
def sol(self, initial_dipole=(0.1, 0.1, 0.1), initial_position=(.1, .1, .1), initial_frequency=1, use_root=True):
|
||||
initial = numpy.tile(numpy.concatenate((initial_dipole, initial_position, initial_frequency), axis=None), self.n)
|
||||
|
||||
result = scipy.optimize.least_squares(self.costs(), initial, jac=self.jac(), ftol=1e-15, gtol=3e-16)
|
||||
result.pathfinder_x = pathfinder.model.oscillating.util.normalize_oscillating_dipole_list(result.x)
|
||||
return result
|
@ -1,77 +0,0 @@
|
||||
from dataclasses import dataclass
|
||||
import numpy
|
||||
import numpy.typing
|
||||
from typing import Sequence, List, Tuple
|
||||
from pathfinder.model.oscillating.dot import DotMeasurement
|
||||
|
||||
|
||||
DotInput = Tuple[numpy.typing.ArrayLike, float]
|
||||
|
||||
|
||||
@dataclass
|
||||
class OscillatingDipole():
|
||||
'''
|
||||
Representation of an oscilltaing dipole, either known or guessed.
|
||||
|
||||
Parameters
|
||||
----------
|
||||
p : numpy.ndarray
|
||||
The oscillating dipole moment, with overall sign arbitrary.
|
||||
s : numpy.ndarray
|
||||
The position of the dipole.
|
||||
w : float
|
||||
The oscillation frequency.
|
||||
'''
|
||||
p: numpy.ndarray
|
||||
s: numpy.ndarray
|
||||
w: float
|
||||
|
||||
def __post_init__(self) -> None:
|
||||
'''
|
||||
Coerce the inputs into numpy arrays.
|
||||
'''
|
||||
self.p = numpy.array(self.p)
|
||||
self.s = numpy.array(self.s)
|
||||
|
||||
def s_at_position(self, r: numpy.ndarray, f: float) -> float:
|
||||
'''
|
||||
Returns the noise potential at a point r, at some frequency f.
|
||||
|
||||
Parameters
|
||||
----------
|
||||
r : numpy.ndarray
|
||||
The position of the dot.
|
||||
f : float
|
||||
The dot frequency to sample.
|
||||
'''
|
||||
return (self._alpha(r))**2 * self._b(f)
|
||||
|
||||
def _alpha(self, r: numpy.ndarray) -> float:
|
||||
diff = r - self.s
|
||||
return self.p.dot(diff) / (numpy.linalg.norm(diff)**3)
|
||||
|
||||
def _b(self, f: float) -> float:
|
||||
return (1 / numpy.pi) * (self.w / (f**2 + self.w**2))
|
||||
|
||||
|
||||
class OscillatingDipoleArrangement():
|
||||
'''
|
||||
A collection of oscillating dipoles, which we are interested in being able to characterise.
|
||||
|
||||
Parameters
|
||||
--------
|
||||
dipoles : Sequence[OscillatingDipole]
|
||||
'''
|
||||
def __init__(self, dipoles: Sequence[OscillatingDipole]):
|
||||
self.dipoles = dipoles
|
||||
|
||||
def get_dot_measurement(self, dot_input: DotInput) -> DotMeasurement:
|
||||
r = numpy.array(dot_input[0])
|
||||
f = dot_input[1]
|
||||
return DotMeasurement(sum([dipole.s_at_position(r, f) for dipole in self.dipoles]), r, f)
|
||||
|
||||
def get_dot_measurements(self, dot_inputs: Sequence[DotInput]) -> List[DotMeasurement]:
|
||||
'''
|
||||
For a series of points, each with three coordinates and a frequency, return a list of the corresponding DotMeasurements.
|
||||
'''
|
||||
return [self.get_dot_measurement(dot_input) for dot_input in dot_inputs]
|
@ -1,19 +0,0 @@
|
||||
import numpy
|
||||
import operator
|
||||
|
||||
|
||||
# flips px, py, pz
|
||||
SIGN_ARRAY = numpy.array((-1, -1, -1, 1, 1, 1, 1))
|
||||
|
||||
|
||||
def flip_chunk_to_positive_px(pt: numpy.ndarray) -> numpy.ndarray:
|
||||
if pt[0] > 0:
|
||||
return pt
|
||||
else:
|
||||
return SIGN_ARRAY * pt
|
||||
|
||||
|
||||
def normalize_oscillating_dipole_list(pts: numpy.ndarray) -> numpy.ndarray:
|
||||
pt_length = 7
|
||||
chunked_pts = [flip_chunk_to_positive_px(pts[i: i + pt_length]) for i in range(0, len(pts), pt_length)]
|
||||
return numpy.concatenate(sorted(chunked_pts, key=lambda x: tuple(round(val, 3) for val in operator.itemgetter(0, 1, 2, 3, 4, 5, 6)(x))), axis=None)
|
@ -1,5 +0,0 @@
|
||||
from pathfinder.model.static.dot import DotMeasurement
|
||||
from pathfinder.model.static.model import DotDipoleModel
|
||||
from pathfinder.model.static.staticdipole import StaticDipoleArrangement, StaticDipole
|
||||
|
||||
__all__ = ['DotMeasurement', 'DotDipoleModel', 'StaticDipoleArrangement', 'StaticDipole']
|
@ -1,58 +0,0 @@
|
||||
from dataclasses import dataclass
|
||||
import numpy
|
||||
import numpy.typing
|
||||
from typing import Sequence, List
|
||||
from pathfinder.model.static.dot import DotMeasurement
|
||||
|
||||
|
||||
@dataclass
|
||||
class StaticDipole():
|
||||
'''
|
||||
Representation of a static dipoles, either known or guessed.
|
||||
|
||||
Parameters
|
||||
----------
|
||||
p : numpy.ndarray
|
||||
The static dipole moment.
|
||||
s : numpy.ndarray
|
||||
The position of the dipole.
|
||||
'''
|
||||
p: numpy.ndarray
|
||||
s: numpy.ndarray
|
||||
|
||||
def __post_init__(self) -> None:
|
||||
'''
|
||||
Coerce the inputs into numpy arrays.
|
||||
'''
|
||||
self.p = numpy.array(self.p)
|
||||
self.s = numpy.array(self.s)
|
||||
|
||||
def v_at_position(self, r: numpy.ndarray) -> float:
|
||||
'''
|
||||
Mirrors the same function in pathfinder.model.dot.
|
||||
'''
|
||||
diff = r - self.s
|
||||
return self.p.dot(diff) / (numpy.linalg.norm(diff)**3)
|
||||
|
||||
|
||||
class StaticDipoleArrangement():
|
||||
'''
|
||||
A collection of static dipoles, which we are interested in being able to characterise.
|
||||
|
||||
Parameters
|
||||
--------
|
||||
dipoles : Sequence[StaticDipole]
|
||||
'''
|
||||
def __init__(self, dipoles):
|
||||
self.dipoles = dipoles
|
||||
|
||||
def get_dot_measurement(self, dot_position: numpy.typing.ArrayLike) -> DotMeasurement:
|
||||
r = numpy.array(dot_position)
|
||||
return DotMeasurement(sum([dipole.v_at_position(r) for dipole in self.dipoles]), r)
|
||||
|
||||
def get_dot_measurements(self, dot_positions: Sequence[numpy.typing.ArrayLike]) -> List[DotMeasurement]:
|
||||
'''
|
||||
For a series of points, each with three coordinates, return
|
||||
'''
|
||||
|
||||
return [self.get_dot_measurement(dot_position) for dot_position in dot_positions]
|
31
pathfinder/model/staticdipole.py
Normal file
31
pathfinder/model/staticdipole.py
Normal file
@ -0,0 +1,31 @@
|
||||
from dataclasses import dataclass
|
||||
import numpy
|
||||
import numpy.typing
|
||||
|
||||
|
||||
@dataclass
|
||||
class StaticDipole():
|
||||
'''
|
||||
Representation of a static dipoles, either known or guessed.
|
||||
|
||||
Parameters
|
||||
----------
|
||||
p : numpy.ndarray
|
||||
The static dipole moment.
|
||||
s : numpy.ndarray
|
||||
The position of the dipole.
|
||||
'''
|
||||
p: numpy.ndarray
|
||||
s: numpy.ndarray
|
||||
|
||||
def __post_init__(self) -> None:
|
||||
'''
|
||||
Coerce the inputs into numpy arrays.
|
||||
'''
|
||||
self.p = numpy.array(self.p)
|
||||
self.s = numpy.array(self.s)
|
||||
|
||||
def v_at_position(self, r: numpy.typing.ArrayLike) -> float:
|
||||
|
||||
diff = r - self.s
|
||||
return self.p.dot(diff) / (numpy.linalg.norm(diff)**3)
|
461
poetry.lock
generated
461
poetry.lock
generated
@ -1,3 +1,11 @@
|
||||
[[package]]
|
||||
name = "alabaster"
|
||||
version = "0.7.12"
|
||||
description = "A configurable sidebar-enabled Sphinx theme"
|
||||
category = "dev"
|
||||
optional = false
|
||||
python-versions = "*"
|
||||
|
||||
[[package]]
|
||||
name = "atomicwrites"
|
||||
version = "1.4.0"
|
||||
@ -20,6 +28,36 @@ docs = ["furo", "sphinx", "zope.interface", "sphinx-notfound-page"]
|
||||
tests = ["coverage[toml] (>=5.0.2)", "hypothesis", "pympler", "pytest (>=4.3.0)", "six", "mypy", "pytest-mypy-plugins", "zope.interface"]
|
||||
tests_no_zope = ["coverage[toml] (>=5.0.2)", "hypothesis", "pympler", "pytest (>=4.3.0)", "six", "mypy", "pytest-mypy-plugins"]
|
||||
|
||||
[[package]]
|
||||
name = "babel"
|
||||
version = "2.9.1"
|
||||
description = "Internationalization utilities"
|
||||
category = "dev"
|
||||
optional = false
|
||||
python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*"
|
||||
|
||||
[package.dependencies]
|
||||
pytz = ">=2015.7"
|
||||
|
||||
[[package]]
|
||||
name = "certifi"
|
||||
version = "2021.5.30"
|
||||
description = "Python package for providing Mozilla's CA Bundle."
|
||||
category = "dev"
|
||||
optional = false
|
||||
python-versions = "*"
|
||||
|
||||
[[package]]
|
||||
name = "charset-normalizer"
|
||||
version = "2.0.4"
|
||||
description = "The Real First Universal Charset Detector. Open, modern and actively maintained alternative to Chardet."
|
||||
category = "dev"
|
||||
optional = false
|
||||
python-versions = ">=3.5.0"
|
||||
|
||||
[package.extras]
|
||||
unicode_backport = ["unicodedata2"]
|
||||
|
||||
[[package]]
|
||||
name = "colorama"
|
||||
version = "0.4.4"
|
||||
@ -39,6 +77,14 @@ python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*, <4"
|
||||
[package.extras]
|
||||
toml = ["toml"]
|
||||
|
||||
[[package]]
|
||||
name = "docutils"
|
||||
version = "0.17.1"
|
||||
description = "Docutils -- Python Documentation Utilities"
|
||||
category = "dev"
|
||||
optional = false
|
||||
python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*"
|
||||
|
||||
[[package]]
|
||||
name = "flake8"
|
||||
version = "3.9.2"
|
||||
@ -52,6 +98,22 @@ mccabe = ">=0.6.0,<0.7.0"
|
||||
pycodestyle = ">=2.7.0,<2.8.0"
|
||||
pyflakes = ">=2.3.0,<2.4.0"
|
||||
|
||||
[[package]]
|
||||
name = "idna"
|
||||
version = "3.2"
|
||||
description = "Internationalized Domain Names in Applications (IDNA)"
|
||||
category = "dev"
|
||||
optional = false
|
||||
python-versions = ">=3.5"
|
||||
|
||||
[[package]]
|
||||
name = "imagesize"
|
||||
version = "1.2.0"
|
||||
description = "Getting image size from png/jpeg/jpeg2000/gif file"
|
||||
category = "dev"
|
||||
optional = false
|
||||
python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*"
|
||||
|
||||
[[package]]
|
||||
name = "iniconfig"
|
||||
version = "1.1.1"
|
||||
@ -60,6 +122,28 @@ category = "dev"
|
||||
optional = false
|
||||
python-versions = "*"
|
||||
|
||||
[[package]]
|
||||
name = "jinja2"
|
||||
version = "3.0.1"
|
||||
description = "A very fast and expressive template engine."
|
||||
category = "dev"
|
||||
optional = false
|
||||
python-versions = ">=3.6"
|
||||
|
||||
[package.dependencies]
|
||||
MarkupSafe = ">=2.0"
|
||||
|
||||
[package.extras]
|
||||
i18n = ["Babel (>=2.7)"]
|
||||
|
||||
[[package]]
|
||||
name = "markupsafe"
|
||||
version = "2.0.1"
|
||||
description = "Safely add untrusted strings to HTML/XML markup."
|
||||
category = "dev"
|
||||
optional = false
|
||||
python-versions = ">=3.6"
|
||||
|
||||
[[package]]
|
||||
name = "mccabe"
|
||||
version = "0.6.1"
|
||||
@ -78,7 +162,7 @@ python-versions = ">=3.5"
|
||||
|
||||
[[package]]
|
||||
name = "mypy"
|
||||
version = "0.910"
|
||||
version = "0.790"
|
||||
description = "Optional static typing for Python"
|
||||
category = "dev"
|
||||
optional = false
|
||||
@ -86,12 +170,11 @@ python-versions = ">=3.5"
|
||||
|
||||
[package.dependencies]
|
||||
mypy-extensions = ">=0.4.3,<0.5.0"
|
||||
toml = "*"
|
||||
typed-ast = ">=1.4.0,<1.5.0"
|
||||
typing-extensions = ">=3.7.4"
|
||||
|
||||
[package.extras]
|
||||
dmypy = ["psutil (>=4.0)"]
|
||||
python2 = ["typed-ast (>=1.4.0,<1.5.0)"]
|
||||
|
||||
[[package]]
|
||||
name = "mypy-extensions"
|
||||
@ -155,6 +238,14 @@ category = "dev"
|
||||
optional = false
|
||||
python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*"
|
||||
|
||||
[[package]]
|
||||
name = "pygments"
|
||||
version = "2.10.0"
|
||||
description = "Pygments is a syntax highlighting package written in Python."
|
||||
category = "dev"
|
||||
optional = false
|
||||
python-versions = ">=3.5"
|
||||
|
||||
[[package]]
|
||||
name = "pyparsing"
|
||||
version = "2.4.7"
|
||||
@ -200,6 +291,32 @@ toml = "*"
|
||||
[package.extras]
|
||||
testing = ["fields", "hunter", "process-tests", "six", "pytest-xdist", "virtualenv"]
|
||||
|
||||
[[package]]
|
||||
name = "pytz"
|
||||
version = "2021.1"
|
||||
description = "World timezone definitions, modern and historical"
|
||||
category = "dev"
|
||||
optional = false
|
||||
python-versions = "*"
|
||||
|
||||
[[package]]
|
||||
name = "requests"
|
||||
version = "2.26.0"
|
||||
description = "Python HTTP for Humans."
|
||||
category = "dev"
|
||||
optional = false
|
||||
python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*, !=3.5.*"
|
||||
|
||||
[package.dependencies]
|
||||
certifi = ">=2017.4.17"
|
||||
charset-normalizer = {version = ">=2.0.0,<2.1.0", markers = "python_version >= \"3\""}
|
||||
idna = {version = ">=2.5,<4", markers = "python_version >= \"3\""}
|
||||
urllib3 = ">=1.21.1,<1.27"
|
||||
|
||||
[package.extras]
|
||||
socks = ["PySocks (>=1.5.6,!=1.5.7)", "win-inet-pton"]
|
||||
use_chardet_on_py3 = ["chardet (>=3.0.2,<5)"]
|
||||
|
||||
[[package]]
|
||||
name = "scipy"
|
||||
version = "1.5.4"
|
||||
@ -211,6 +328,116 @@ python-versions = ">=3.6"
|
||||
[package.dependencies]
|
||||
numpy = ">=1.14.5"
|
||||
|
||||
[[package]]
|
||||
name = "snowballstemmer"
|
||||
version = "2.1.0"
|
||||
description = "This package provides 29 stemmers for 28 languages generated from Snowball algorithms."
|
||||
category = "dev"
|
||||
optional = false
|
||||
python-versions = "*"
|
||||
|
||||
[[package]]
|
||||
name = "sphinx"
|
||||
version = "4.1.2"
|
||||
description = "Python documentation generator"
|
||||
category = "dev"
|
||||
optional = false
|
||||
python-versions = ">=3.6"
|
||||
|
||||
[package.dependencies]
|
||||
alabaster = ">=0.7,<0.8"
|
||||
babel = ">=1.3"
|
||||
colorama = {version = ">=0.3.5", markers = "sys_platform == \"win32\""}
|
||||
docutils = ">=0.14,<0.18"
|
||||
imagesize = "*"
|
||||
Jinja2 = ">=2.3"
|
||||
packaging = "*"
|
||||
Pygments = ">=2.0"
|
||||
requests = ">=2.5.0"
|
||||
snowballstemmer = ">=1.1"
|
||||
sphinxcontrib-applehelp = "*"
|
||||
sphinxcontrib-devhelp = "*"
|
||||
sphinxcontrib-htmlhelp = ">=2.0.0"
|
||||
sphinxcontrib-jsmath = "*"
|
||||
sphinxcontrib-qthelp = "*"
|
||||
sphinxcontrib-serializinghtml = ">=1.1.5"
|
||||
|
||||
[package.extras]
|
||||
docs = ["sphinxcontrib-websupport"]
|
||||
lint = ["flake8 (>=3.5.0)", "isort", "mypy (>=0.900)", "docutils-stubs", "types-typed-ast", "types-pkg-resources", "types-requests"]
|
||||
test = ["pytest", "pytest-cov", "html5lib", "cython", "typed-ast"]
|
||||
|
||||
[[package]]
|
||||
name = "sphinxcontrib-applehelp"
|
||||
version = "1.0.2"
|
||||
description = "sphinxcontrib-applehelp is a sphinx extension which outputs Apple help books"
|
||||
category = "dev"
|
||||
optional = false
|
||||
python-versions = ">=3.5"
|
||||
|
||||
[package.extras]
|
||||
lint = ["flake8", "mypy", "docutils-stubs"]
|
||||
test = ["pytest"]
|
||||
|
||||
[[package]]
|
||||
name = "sphinxcontrib-devhelp"
|
||||
version = "1.0.2"
|
||||
description = "sphinxcontrib-devhelp is a sphinx extension which outputs Devhelp document."
|
||||
category = "dev"
|
||||
optional = false
|
||||
python-versions = ">=3.5"
|
||||
|
||||
[package.extras]
|
||||
lint = ["flake8", "mypy", "docutils-stubs"]
|
||||
test = ["pytest"]
|
||||
|
||||
[[package]]
|
||||
name = "sphinxcontrib-htmlhelp"
|
||||
version = "2.0.0"
|
||||
description = "sphinxcontrib-htmlhelp is a sphinx extension which renders HTML help files"
|
||||
category = "dev"
|
||||
optional = false
|
||||
python-versions = ">=3.6"
|
||||
|
||||
[package.extras]
|
||||
lint = ["flake8", "mypy", "docutils-stubs"]
|
||||
test = ["pytest", "html5lib"]
|
||||
|
||||
[[package]]
|
||||
name = "sphinxcontrib-jsmath"
|
||||
version = "1.0.1"
|
||||
description = "A sphinx extension which renders display math in HTML via JavaScript"
|
||||
category = "dev"
|
||||
optional = false
|
||||
python-versions = ">=3.5"
|
||||
|
||||
[package.extras]
|
||||
test = ["pytest", "flake8", "mypy"]
|
||||
|
||||
[[package]]
|
||||
name = "sphinxcontrib-qthelp"
|
||||
version = "1.0.3"
|
||||
description = "sphinxcontrib-qthelp is a sphinx extension which outputs QtHelp document."
|
||||
category = "dev"
|
||||
optional = false
|
||||
python-versions = ">=3.5"
|
||||
|
||||
[package.extras]
|
||||
lint = ["flake8", "mypy", "docutils-stubs"]
|
||||
test = ["pytest"]
|
||||
|
||||
[[package]]
|
||||
name = "sphinxcontrib-serializinghtml"
|
||||
version = "1.1.5"
|
||||
description = "sphinxcontrib-serializinghtml is a sphinx extension which outputs \"serialized\" HTML files (json and pickle)."
|
||||
category = "dev"
|
||||
optional = false
|
||||
python-versions = ">=3.5"
|
||||
|
||||
[package.extras]
|
||||
lint = ["flake8", "mypy", "docutils-stubs"]
|
||||
test = ["pytest"]
|
||||
|
||||
[[package]]
|
||||
name = "toml"
|
||||
version = "0.10.2"
|
||||
@ -219,6 +446,14 @@ category = "dev"
|
||||
optional = false
|
||||
python-versions = ">=2.6, !=3.0.*, !=3.1.*, !=3.2.*"
|
||||
|
||||
[[package]]
|
||||
name = "typed-ast"
|
||||
version = "1.4.3"
|
||||
description = "a fork of Python 2 and 3 ast modules with type comment support"
|
||||
category = "dev"
|
||||
optional = false
|
||||
python-versions = "*"
|
||||
|
||||
[[package]]
|
||||
name = "typing-extensions"
|
||||
version = "3.10.0.0"
|
||||
@ -227,12 +462,29 @@ category = "dev"
|
||||
optional = false
|
||||
python-versions = "*"
|
||||
|
||||
[[package]]
|
||||
name = "urllib3"
|
||||
version = "1.26.6"
|
||||
description = "HTTP library with thread-safe connection pooling, file post, and more."
|
||||
category = "dev"
|
||||
optional = false
|
||||
python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*, <4"
|
||||
|
||||
[package.extras]
|
||||
brotli = ["brotlipy (>=0.6.0)"]
|
||||
secure = ["pyOpenSSL (>=0.14)", "cryptography (>=1.3.4)", "idna (>=2.0.0)", "certifi", "ipaddress"]
|
||||
socks = ["PySocks (>=1.5.6,!=1.5.7,<2.0)"]
|
||||
|
||||
[metadata]
|
||||
lock-version = "1.1"
|
||||
python-versions = "^3.8,<3.10"
|
||||
content-hash = "daffa6e91d6921845be603d5c0565d1afb511a57bb9a2f4b9c1084754b7a5314"
|
||||
content-hash = "c24b9a131366246119b2d28776b98d7430e983e25389ad6691928b6e78ab0673"
|
||||
|
||||
[metadata.files]
|
||||
alabaster = [
|
||||
{file = "alabaster-0.7.12-py2.py3-none-any.whl", hash = "sha256:446438bdcca0e05bd45ea2de1668c1d9b032e1a9154c2c259092d77031ddd359"},
|
||||
{file = "alabaster-0.7.12.tar.gz", hash = "sha256:a661d72d58e6ea8a57f7a86e37d86716863ee5e92788398526d58b26a4e4dc02"},
|
||||
]
|
||||
atomicwrites = [
|
||||
{file = "atomicwrites-1.4.0-py2.py3-none-any.whl", hash = "sha256:6d1784dea7c0c8d4a5172b6c620f40b6e4cbfdf96d783691f2e1302a7b88e197"},
|
||||
{file = "atomicwrites-1.4.0.tar.gz", hash = "sha256:ae70396ad1a434f9c7046fd2dd196fc04b12f9e91ffb859164193be8b6168a7a"},
|
||||
@ -241,6 +493,18 @@ attrs = [
|
||||
{file = "attrs-21.2.0-py2.py3-none-any.whl", hash = "sha256:149e90d6d8ac20db7a955ad60cf0e6881a3f20d37096140088356da6c716b0b1"},
|
||||
{file = "attrs-21.2.0.tar.gz", hash = "sha256:ef6aaac3ca6cd92904cdd0d83f629a15f18053ec84e6432106f7a4d04ae4f5fb"},
|
||||
]
|
||||
babel = [
|
||||
{file = "Babel-2.9.1-py2.py3-none-any.whl", hash = "sha256:ab49e12b91d937cd11f0b67cb259a57ab4ad2b59ac7a3b41d6c06c0ac5b0def9"},
|
||||
{file = "Babel-2.9.1.tar.gz", hash = "sha256:bc0c176f9f6a994582230df350aa6e05ba2ebe4b3ac317eab29d9be5d2768da0"},
|
||||
]
|
||||
certifi = [
|
||||
{file = "certifi-2021.5.30-py2.py3-none-any.whl", hash = "sha256:50b1e4f8446b06f41be7dd6338db18e0990601dce795c2b1686458aa7e8fa7d8"},
|
||||
{file = "certifi-2021.5.30.tar.gz", hash = "sha256:2bbf76fd432960138b3ef6dda3dde0544f27cbf8546c458e60baf371917ba9ee"},
|
||||
]
|
||||
charset-normalizer = [
|
||||
{file = "charset-normalizer-2.0.4.tar.gz", hash = "sha256:f23667ebe1084be45f6ae0538e4a5a865206544097e4e8bbcacf42cd02a348f3"},
|
||||
{file = "charset_normalizer-2.0.4-py3-none-any.whl", hash = "sha256:0c8911edd15d19223366a194a513099a302055a962bca2cec0f54b8b63175d8b"},
|
||||
]
|
||||
colorama = [
|
||||
{file = "colorama-0.4.4-py2.py3-none-any.whl", hash = "sha256:9f47eda37229f68eee03b24b9748937c7dc3868f906e8ba69fbcbdd3bc5dc3e2"},
|
||||
{file = "colorama-0.4.4.tar.gz", hash = "sha256:5941b2b48a20143d2267e95b1c2a7603ce057ee39fd88e7329b0c292aa16869b"},
|
||||
@ -299,14 +563,86 @@ coverage = [
|
||||
{file = "coverage-5.5-pp37-none-any.whl", hash = "sha256:2a3859cb82dcbda1cfd3e6f71c27081d18aa251d20a17d87d26d4cd216fb0af4"},
|
||||
{file = "coverage-5.5.tar.gz", hash = "sha256:ebe78fe9a0e874362175b02371bdfbee64d8edc42a044253ddf4ee7d3c15212c"},
|
||||
]
|
||||
docutils = [
|
||||
{file = "docutils-0.17.1-py2.py3-none-any.whl", hash = "sha256:cf316c8370a737a022b72b56874f6602acf974a37a9fba42ec2876387549fc61"},
|
||||
{file = "docutils-0.17.1.tar.gz", hash = "sha256:686577d2e4c32380bb50cbb22f575ed742d58168cee37e99117a854bcd88f125"},
|
||||
]
|
||||
flake8 = [
|
||||
{file = "flake8-3.9.2-py2.py3-none-any.whl", hash = "sha256:bf8fd333346d844f616e8d47905ef3a3384edae6b4e9beb0c5101e25e3110907"},
|
||||
{file = "flake8-3.9.2.tar.gz", hash = "sha256:07528381786f2a6237b061f6e96610a4167b226cb926e2aa2b6b1d78057c576b"},
|
||||
]
|
||||
idna = [
|
||||
{file = "idna-3.2-py3-none-any.whl", hash = "sha256:14475042e284991034cb48e06f6851428fb14c4dc953acd9be9a5e95c7b6dd7a"},
|
||||
{file = "idna-3.2.tar.gz", hash = "sha256:467fbad99067910785144ce333826c71fb0e63a425657295239737f7ecd125f3"},
|
||||
]
|
||||
imagesize = [
|
||||
{file = "imagesize-1.2.0-py2.py3-none-any.whl", hash = "sha256:6965f19a6a2039c7d48bca7dba2473069ff854c36ae6f19d2cde309d998228a1"},
|
||||
{file = "imagesize-1.2.0.tar.gz", hash = "sha256:b1f6b5a4eab1f73479a50fb79fcf729514a900c341d8503d62a62dbc4127a2b1"},
|
||||
]
|
||||
iniconfig = [
|
||||
{file = "iniconfig-1.1.1-py2.py3-none-any.whl", hash = "sha256:011e24c64b7f47f6ebd835bb12a743f2fbe9a26d4cecaa7f53bc4f35ee9da8b3"},
|
||||
{file = "iniconfig-1.1.1.tar.gz", hash = "sha256:bc3af051d7d14b2ee5ef9969666def0cd1a000e121eaea580d4a313df4b37f32"},
|
||||
]
|
||||
jinja2 = [
|
||||
{file = "Jinja2-3.0.1-py3-none-any.whl", hash = "sha256:1f06f2da51e7b56b8f238affdd6b4e2c61e39598a378cc49345bc1bd42a978a4"},
|
||||
{file = "Jinja2-3.0.1.tar.gz", hash = "sha256:703f484b47a6af502e743c9122595cc812b0271f661722403114f71a79d0f5a4"},
|
||||
]
|
||||
markupsafe = [
|
||||
{file = "MarkupSafe-2.0.1-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:d8446c54dc28c01e5a2dbac5a25f071f6653e6e40f3a8818e8b45d790fe6ef53"},
|
||||
{file = "MarkupSafe-2.0.1-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:36bc903cbb393720fad60fc28c10de6acf10dc6cc883f3e24ee4012371399a38"},
|
||||
{file = "MarkupSafe-2.0.1-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:2d7d807855b419fc2ed3e631034685db6079889a1f01d5d9dac950f764da3dad"},
|
||||
{file = "MarkupSafe-2.0.1-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_12_i686.manylinux2010_i686.whl", hash = "sha256:add36cb2dbb8b736611303cd3bfcee00afd96471b09cda130da3581cbdc56a6d"},
|
||||
{file = "MarkupSafe-2.0.1-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:168cd0a3642de83558a5153c8bd34f175a9a6e7f6dc6384b9655d2697312a646"},
|
||||
{file = "MarkupSafe-2.0.1-cp310-cp310-win32.whl", hash = "sha256:99df47edb6bda1249d3e80fdabb1dab8c08ef3975f69aed437cb69d0a5de1e28"},
|
||||
{file = "MarkupSafe-2.0.1-cp310-cp310-win_amd64.whl", hash = "sha256:e0f138900af21926a02425cf736db95be9f4af72ba1bb21453432a07f6082134"},
|
||||
{file = "MarkupSafe-2.0.1-cp36-cp36m-macosx_10_9_x86_64.whl", hash = "sha256:f9081981fe268bd86831e5c75f7de206ef275defcb82bc70740ae6dc507aee51"},
|
||||
{file = "MarkupSafe-2.0.1-cp36-cp36m-manylinux1_i686.whl", hash = "sha256:0955295dd5eec6cb6cc2fe1698f4c6d84af2e92de33fbcac4111913cd100a6ff"},
|
||||
{file = "MarkupSafe-2.0.1-cp36-cp36m-manylinux1_x86_64.whl", hash = "sha256:0446679737af14f45767963a1a9ef7620189912317d095f2d9ffa183a4d25d2b"},
|
||||
{file = "MarkupSafe-2.0.1-cp36-cp36m-manylinux2010_i686.whl", hash = "sha256:f826e31d18b516f653fe296d967d700fddad5901ae07c622bb3705955e1faa94"},
|
||||
{file = "MarkupSafe-2.0.1-cp36-cp36m-manylinux2010_x86_64.whl", hash = "sha256:fa130dd50c57d53368c9d59395cb5526eda596d3ffe36666cd81a44d56e48872"},
|
||||
{file = "MarkupSafe-2.0.1-cp36-cp36m-manylinux2014_aarch64.whl", hash = "sha256:905fec760bd2fa1388bb5b489ee8ee5f7291d692638ea5f67982d968366bef9f"},
|
||||
{file = "MarkupSafe-2.0.1-cp36-cp36m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:bf5d821ffabf0ef3533c39c518f3357b171a1651c1ff6827325e4489b0e46c3c"},
|
||||
{file = "MarkupSafe-2.0.1-cp36-cp36m-manylinux_2_5_i686.manylinux1_i686.manylinux_2_12_i686.manylinux2010_i686.whl", hash = "sha256:0d4b31cc67ab36e3392bbf3862cfbadac3db12bdd8b02a2731f509ed5b829724"},
|
||||
{file = "MarkupSafe-2.0.1-cp36-cp36m-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:baa1a4e8f868845af802979fcdbf0bb11f94f1cb7ced4c4b8a351bb60d108145"},
|
||||
{file = "MarkupSafe-2.0.1-cp36-cp36m-win32.whl", hash = "sha256:6c4ca60fa24e85fe25b912b01e62cb969d69a23a5d5867682dd3e80b5b02581d"},
|
||||
{file = "MarkupSafe-2.0.1-cp36-cp36m-win_amd64.whl", hash = "sha256:b2f4bf27480f5e5e8ce285a8c8fd176c0b03e93dcc6646477d4630e83440c6a9"},
|
||||
{file = "MarkupSafe-2.0.1-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:0717a7390a68be14b8c793ba258e075c6f4ca819f15edfc2a3a027c823718567"},
|
||||
{file = "MarkupSafe-2.0.1-cp37-cp37m-manylinux1_i686.whl", hash = "sha256:6557b31b5e2c9ddf0de32a691f2312a32f77cd7681d8af66c2692efdbef84c18"},
|
||||
{file = "MarkupSafe-2.0.1-cp37-cp37m-manylinux1_x86_64.whl", hash = "sha256:49e3ceeabbfb9d66c3aef5af3a60cc43b85c33df25ce03d0031a608b0a8b2e3f"},
|
||||
{file = "MarkupSafe-2.0.1-cp37-cp37m-manylinux2010_i686.whl", hash = "sha256:d7f9850398e85aba693bb640262d3611788b1f29a79f0c93c565694658f4071f"},
|
||||
{file = "MarkupSafe-2.0.1-cp37-cp37m-manylinux2010_x86_64.whl", hash = "sha256:6a7fae0dd14cf60ad5ff42baa2e95727c3d81ded453457771d02b7d2b3f9c0c2"},
|
||||
{file = "MarkupSafe-2.0.1-cp37-cp37m-manylinux2014_aarch64.whl", hash = "sha256:b7f2d075102dc8c794cbde1947378051c4e5180d52d276987b8d28a3bd58c17d"},
|
||||
{file = "MarkupSafe-2.0.1-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:e9936f0b261d4df76ad22f8fee3ae83b60d7c3e871292cd42f40b81b70afae85"},
|
||||
{file = "MarkupSafe-2.0.1-cp37-cp37m-manylinux_2_5_i686.manylinux1_i686.manylinux_2_12_i686.manylinux2010_i686.whl", hash = "sha256:2a7d351cbd8cfeb19ca00de495e224dea7e7d919659c2841bbb7f420ad03e2d6"},
|
||||
{file = "MarkupSafe-2.0.1-cp37-cp37m-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:60bf42e36abfaf9aff1f50f52644b336d4f0a3fd6d8a60ca0d054ac9f713a864"},
|
||||
{file = "MarkupSafe-2.0.1-cp37-cp37m-win32.whl", hash = "sha256:a30e67a65b53ea0a5e62fe23682cfe22712e01f453b95233b25502f7c61cb415"},
|
||||
{file = "MarkupSafe-2.0.1-cp37-cp37m-win_amd64.whl", hash = "sha256:611d1ad9a4288cf3e3c16014564df047fe08410e628f89805e475368bd304914"},
|
||||
{file = "MarkupSafe-2.0.1-cp38-cp38-macosx_10_9_universal2.whl", hash = "sha256:5bb28c636d87e840583ee3adeb78172efc47c8b26127267f54a9c0ec251d41a9"},
|
||||
{file = "MarkupSafe-2.0.1-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:be98f628055368795d818ebf93da628541e10b75b41c559fdf36d104c5787066"},
|
||||
{file = "MarkupSafe-2.0.1-cp38-cp38-manylinux1_i686.whl", hash = "sha256:1d609f577dc6e1aa17d746f8bd3c31aa4d258f4070d61b2aa5c4166c1539de35"},
|
||||
{file = "MarkupSafe-2.0.1-cp38-cp38-manylinux1_x86_64.whl", hash = "sha256:7d91275b0245b1da4d4cfa07e0faedd5b0812efc15b702576d103293e252af1b"},
|
||||
{file = "MarkupSafe-2.0.1-cp38-cp38-manylinux2010_i686.whl", hash = "sha256:01a9b8ea66f1658938f65b93a85ebe8bc016e6769611be228d797c9d998dd298"},
|
||||
{file = "MarkupSafe-2.0.1-cp38-cp38-manylinux2010_x86_64.whl", hash = "sha256:47ab1e7b91c098ab893b828deafa1203de86d0bc6ab587b160f78fe6c4011f75"},
|
||||
{file = "MarkupSafe-2.0.1-cp38-cp38-manylinux2014_aarch64.whl", hash = "sha256:97383d78eb34da7e1fa37dd273c20ad4320929af65d156e35a5e2d89566d9dfb"},
|
||||
{file = "MarkupSafe-2.0.1-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:6fcf051089389abe060c9cd7caa212c707e58153afa2c649f00346ce6d260f1b"},
|
||||
{file = "MarkupSafe-2.0.1-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.manylinux_2_12_i686.manylinux2010_i686.whl", hash = "sha256:5855f8438a7d1d458206a2466bf82b0f104a3724bf96a1c781ab731e4201731a"},
|
||||
{file = "MarkupSafe-2.0.1-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:3dd007d54ee88b46be476e293f48c85048603f5f516008bee124ddd891398ed6"},
|
||||
{file = "MarkupSafe-2.0.1-cp38-cp38-win32.whl", hash = "sha256:023cb26ec21ece8dc3907c0e8320058b2e0cb3c55cf9564da612bc325bed5e64"},
|
||||
{file = "MarkupSafe-2.0.1-cp38-cp38-win_amd64.whl", hash = "sha256:984d76483eb32f1bcb536dc27e4ad56bba4baa70be32fa87152832cdd9db0833"},
|
||||
{file = "MarkupSafe-2.0.1-cp39-cp39-macosx_10_9_universal2.whl", hash = "sha256:2ef54abee730b502252bcdf31b10dacb0a416229b72c18b19e24a4509f273d26"},
|
||||
{file = "MarkupSafe-2.0.1-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:3c112550557578c26af18a1ccc9e090bfe03832ae994343cfdacd287db6a6ae7"},
|
||||
{file = "MarkupSafe-2.0.1-cp39-cp39-manylinux1_i686.whl", hash = "sha256:53edb4da6925ad13c07b6d26c2a852bd81e364f95301c66e930ab2aef5b5ddd8"},
|
||||
{file = "MarkupSafe-2.0.1-cp39-cp39-manylinux1_x86_64.whl", hash = "sha256:f5653a225f31e113b152e56f154ccbe59eeb1c7487b39b9d9f9cdb58e6c79dc5"},
|
||||
{file = "MarkupSafe-2.0.1-cp39-cp39-manylinux2010_i686.whl", hash = "sha256:4efca8f86c54b22348a5467704e3fec767b2db12fc39c6d963168ab1d3fc9135"},
|
||||
{file = "MarkupSafe-2.0.1-cp39-cp39-manylinux2010_x86_64.whl", hash = "sha256:ab3ef638ace319fa26553db0624c4699e31a28bb2a835c5faca8f8acf6a5a902"},
|
||||
{file = "MarkupSafe-2.0.1-cp39-cp39-manylinux2014_aarch64.whl", hash = "sha256:f8ba0e8349a38d3001fae7eadded3f6606f0da5d748ee53cc1dab1d6527b9509"},
|
||||
{file = "MarkupSafe-2.0.1-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:c47adbc92fc1bb2b3274c4b3a43ae0e4573d9fbff4f54cd484555edbf030baf1"},
|
||||
{file = "MarkupSafe-2.0.1-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_12_i686.manylinux2010_i686.whl", hash = "sha256:37205cac2a79194e3750b0af2a5720d95f786a55ce7df90c3af697bfa100eaac"},
|
||||
{file = "MarkupSafe-2.0.1-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:1f2ade76b9903f39aa442b4aadd2177decb66525062db244b35d71d0ee8599b6"},
|
||||
{file = "MarkupSafe-2.0.1-cp39-cp39-win32.whl", hash = "sha256:10f82115e21dc0dfec9ab5c0223652f7197feb168c940f3ef61563fc2d6beb74"},
|
||||
{file = "MarkupSafe-2.0.1-cp39-cp39-win_amd64.whl", hash = "sha256:693ce3f9e70a6cf7d2fb9e6c9d8b204b6b39897a2c4a1aa65728d5ac97dcc1d8"},
|
||||
{file = "MarkupSafe-2.0.1.tar.gz", hash = "sha256:594c67807fb16238b30c44bdf74f36c02cdf22d1c8cda91ef8a0ed8dabf5620a"},
|
||||
]
|
||||
mccabe = [
|
||||
{file = "mccabe-0.6.1-py2.py3-none-any.whl", hash = "sha256:ab8a6258860da4b6677da4bd2fe5dc2c659cff31b3ee4f7f5d64e79735b80d42"},
|
||||
{file = "mccabe-0.6.1.tar.gz", hash = "sha256:dd8d182285a0fe56bace7f45b5e7d1a6ebcbf524e8f3bd87eb0f125271b8831f"},
|
||||
@ -316,29 +652,20 @@ more-itertools = [
|
||||
{file = "more_itertools-8.8.0-py3-none-any.whl", hash = "sha256:2cf89ec599962f2ddc4d568a05defc40e0a587fbc10d5989713638864c36be4d"},
|
||||
]
|
||||
mypy = [
|
||||
{file = "mypy-0.910-cp35-cp35m-macosx_10_9_x86_64.whl", hash = "sha256:a155d80ea6cee511a3694b108c4494a39f42de11ee4e61e72bc424c490e46457"},
|
||||
{file = "mypy-0.910-cp35-cp35m-manylinux1_x86_64.whl", hash = "sha256:b94e4b785e304a04ea0828759172a15add27088520dc7e49ceade7834275bedb"},
|
||||
{file = "mypy-0.910-cp35-cp35m-manylinux2010_x86_64.whl", hash = "sha256:088cd9c7904b4ad80bec811053272986611b84221835e079be5bcad029e79dd9"},
|
||||
{file = "mypy-0.910-cp35-cp35m-win_amd64.whl", hash = "sha256:adaeee09bfde366d2c13fe6093a7df5df83c9a2ba98638c7d76b010694db760e"},
|
||||
{file = "mypy-0.910-cp36-cp36m-macosx_10_9_x86_64.whl", hash = "sha256:ecd2c3fe726758037234c93df7e98deb257fd15c24c9180dacf1ef829da5f921"},
|
||||
{file = "mypy-0.910-cp36-cp36m-manylinux1_x86_64.whl", hash = "sha256:d9dd839eb0dc1bbe866a288ba3c1afc33a202015d2ad83b31e875b5905a079b6"},
|
||||
{file = "mypy-0.910-cp36-cp36m-manylinux2010_x86_64.whl", hash = "sha256:3e382b29f8e0ccf19a2df2b29a167591245df90c0b5a2542249873b5c1d78212"},
|
||||
{file = "mypy-0.910-cp36-cp36m-win_amd64.whl", hash = "sha256:53fd2eb27a8ee2892614370896956af2ff61254c275aaee4c230ae771cadd885"},
|
||||
{file = "mypy-0.910-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:b6fb13123aeef4a3abbcfd7e71773ff3ff1526a7d3dc538f3929a49b42be03f0"},
|
||||
{file = "mypy-0.910-cp37-cp37m-manylinux1_x86_64.whl", hash = "sha256:e4dab234478e3bd3ce83bac4193b2ecd9cf94e720ddd95ce69840273bf44f6de"},
|
||||
{file = "mypy-0.910-cp37-cp37m-manylinux2010_x86_64.whl", hash = "sha256:7df1ead20c81371ccd6091fa3e2878559b5c4d4caadaf1a484cf88d93ca06703"},
|
||||
{file = "mypy-0.910-cp37-cp37m-win_amd64.whl", hash = "sha256:0aadfb2d3935988ec3815952e44058a3100499f5be5b28c34ac9d79f002a4a9a"},
|
||||
{file = "mypy-0.910-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:ec4e0cd079db280b6bdabdc807047ff3e199f334050db5cbb91ba3e959a67504"},
|
||||
{file = "mypy-0.910-cp38-cp38-manylinux1_x86_64.whl", hash = "sha256:119bed3832d961f3a880787bf621634ba042cb8dc850a7429f643508eeac97b9"},
|
||||
{file = "mypy-0.910-cp38-cp38-manylinux2010_x86_64.whl", hash = "sha256:866c41f28cee548475f146aa4d39a51cf3b6a84246969f3759cb3e9c742fc072"},
|
||||
{file = "mypy-0.910-cp38-cp38-win_amd64.whl", hash = "sha256:ceb6e0a6e27fb364fb3853389607cf7eb3a126ad335790fa1e14ed02fba50811"},
|
||||
{file = "mypy-0.910-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:1a85e280d4d217150ce8cb1a6dddffd14e753a4e0c3cf90baabb32cefa41b59e"},
|
||||
{file = "mypy-0.910-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:42c266ced41b65ed40a282c575705325fa7991af370036d3f134518336636f5b"},
|
||||
{file = "mypy-0.910-cp39-cp39-manylinux1_x86_64.whl", hash = "sha256:3c4b8ca36877fc75339253721f69603a9c7fdb5d4d5a95a1a1b899d8b86a4de2"},
|
||||
{file = "mypy-0.910-cp39-cp39-manylinux2010_x86_64.whl", hash = "sha256:c0df2d30ed496a08de5daed2a9ea807d07c21ae0ab23acf541ab88c24b26ab97"},
|
||||
{file = "mypy-0.910-cp39-cp39-win_amd64.whl", hash = "sha256:c6c2602dffb74867498f86e6129fd52a2770c48b7cd3ece77ada4fa38f94eba8"},
|
||||
{file = "mypy-0.910-py3-none-any.whl", hash = "sha256:ef565033fa5a958e62796867b1df10c40263ea9ded87164d67572834e57a174d"},
|
||||
{file = "mypy-0.910.tar.gz", hash = "sha256:704098302473cb31a218f1775a873b376b30b4c18229421e9e9dc8916fd16150"},
|
||||
{file = "mypy-0.790-cp35-cp35m-macosx_10_6_x86_64.whl", hash = "sha256:bd03b3cf666bff8d710d633d1c56ab7facbdc204d567715cb3b9f85c6e94f669"},
|
||||
{file = "mypy-0.790-cp35-cp35m-manylinux1_x86_64.whl", hash = "sha256:2170492030f6faa537647d29945786d297e4862765f0b4ac5930ff62e300d802"},
|
||||
{file = "mypy-0.790-cp35-cp35m-win_amd64.whl", hash = "sha256:e86bdace26c5fe9cf8cb735e7cedfe7850ad92b327ac5d797c656717d2ca66de"},
|
||||
{file = "mypy-0.790-cp36-cp36m-macosx_10_9_x86_64.whl", hash = "sha256:e97e9c13d67fbe524be17e4d8025d51a7dca38f90de2e462243ab8ed8a9178d1"},
|
||||
{file = "mypy-0.790-cp36-cp36m-manylinux1_x86_64.whl", hash = "sha256:0d34d6b122597d48a36d6c59e35341f410d4abfa771d96d04ae2c468dd201abc"},
|
||||
{file = "mypy-0.790-cp36-cp36m-win_amd64.whl", hash = "sha256:72060bf64f290fb629bd4a67c707a66fd88ca26e413a91384b18db3876e57ed7"},
|
||||
{file = "mypy-0.790-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:eea260feb1830a627fb526d22fbb426b750d9f5a47b624e8d5e7e004359b219c"},
|
||||
{file = "mypy-0.790-cp37-cp37m-manylinux1_x86_64.whl", hash = "sha256:c614194e01c85bb2e551c421397e49afb2872c88b5830e3554f0519f9fb1c178"},
|
||||
{file = "mypy-0.790-cp37-cp37m-win_amd64.whl", hash = "sha256:0a0d102247c16ce93c97066443d11e2d36e6cc2a32d8ccc1f705268970479324"},
|
||||
{file = "mypy-0.790-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:cf4e7bf7f1214826cf7333627cb2547c0db7e3078723227820d0a2490f117a01"},
|
||||
{file = "mypy-0.790-cp38-cp38-manylinux1_x86_64.whl", hash = "sha256:af4e9ff1834e565f1baa74ccf7ae2564ae38c8df2a85b057af1dbbc958eb6666"},
|
||||
{file = "mypy-0.790-cp38-cp38-win_amd64.whl", hash = "sha256:da56dedcd7cd502ccd3c5dddc656cb36113dd793ad466e894574125945653cea"},
|
||||
{file = "mypy-0.790-py3-none-any.whl", hash = "sha256:2842d4fbd1b12ab422346376aad03ff5d0805b706102e475e962370f874a5122"},
|
||||
{file = "mypy-0.790.tar.gz", hash = "sha256:2b21ba45ad9ef2e2eb88ce4aeadd0112d0f5026418324176fd494a6824b74975"},
|
||||
]
|
||||
mypy-extensions = [
|
||||
{file = "mypy_extensions-0.4.3-py2.py3-none-any.whl", hash = "sha256:090fedd75945a69ae91ce1303b5824f428daf5a028d2f6ab8a299250a846f15d"},
|
||||
@ -394,6 +721,10 @@ pyflakes = [
|
||||
{file = "pyflakes-2.3.1-py2.py3-none-any.whl", hash = "sha256:7893783d01b8a89811dd72d7dfd4d84ff098e5eed95cfa8905b22bbffe52efc3"},
|
||||
{file = "pyflakes-2.3.1.tar.gz", hash = "sha256:f5bc8ecabc05bb9d291eb5203d6810b49040f6ff446a756326104746cc00c1db"},
|
||||
]
|
||||
pygments = [
|
||||
{file = "Pygments-2.10.0-py3-none-any.whl", hash = "sha256:b8e67fe6af78f492b3c4b3e2970c0624cbf08beb1e493b2c99b9fa1b67a20380"},
|
||||
{file = "Pygments-2.10.0.tar.gz", hash = "sha256:f398865f7eb6874156579fdf36bc840a03cab64d1cde9e93d68f46a425ec52c6"},
|
||||
]
|
||||
pyparsing = [
|
||||
{file = "pyparsing-2.4.7-py2.py3-none-any.whl", hash = "sha256:ef9d7589ef3c200abe66653d3f1ab1033c3c419ae9b9bdb1240a85b024efc88b"},
|
||||
{file = "pyparsing-2.4.7.tar.gz", hash = "sha256:c203ec8783bf771a155b207279b9bccb8dea02d8f0c9e5f8ead507bc3246ecc1"},
|
||||
@ -406,6 +737,14 @@ pytest-cov = [
|
||||
{file = "pytest-cov-2.12.1.tar.gz", hash = "sha256:261ceeb8c227b726249b376b8526b600f38667ee314f910353fa318caa01f4d7"},
|
||||
{file = "pytest_cov-2.12.1-py2.py3-none-any.whl", hash = "sha256:261bb9e47e65bd099c89c3edf92972865210c36813f80ede5277dceb77a4a62a"},
|
||||
]
|
||||
pytz = [
|
||||
{file = "pytz-2021.1-py2.py3-none-any.whl", hash = "sha256:eb10ce3e7736052ed3623d49975ce333bcd712c7bb19a58b9e2089d4057d0798"},
|
||||
{file = "pytz-2021.1.tar.gz", hash = "sha256:83a4a90894bf38e243cf052c8b58f381bfe9a7a483f6a9cab140bc7f702ac4da"},
|
||||
]
|
||||
requests = [
|
||||
{file = "requests-2.26.0-py2.py3-none-any.whl", hash = "sha256:6c1246513ecd5ecd4528a0906f910e8f0f9c6b8ec72030dc9fd154dc1a6efd24"},
|
||||
{file = "requests-2.26.0.tar.gz", hash = "sha256:b8aa58f8cf793ffd8782d3d8cb19e66ef36f7aba4353eec859e74678b01b07a7"},
|
||||
]
|
||||
scipy = [
|
||||
{file = "scipy-1.5.4-cp36-cp36m-macosx_10_9_x86_64.whl", hash = "sha256:4f12d13ffbc16e988fa40809cbbd7a8b45bc05ff6ea0ba8e3e41f6f4db3a9e47"},
|
||||
{file = "scipy-1.5.4-cp36-cp36m-manylinux1_i686.whl", hash = "sha256:a254b98dbcc744c723a838c03b74a8a34c0558c9ac5c86d5561703362231107d"},
|
||||
@ -433,12 +772,80 @@ scipy = [
|
||||
{file = "scipy-1.5.4-cp39-cp39-win_amd64.whl", hash = "sha256:cc1f78ebc982cd0602c9a7615d878396bec94908db67d4ecddca864d049112f2"},
|
||||
{file = "scipy-1.5.4.tar.gz", hash = "sha256:4a453d5e5689de62e5d38edf40af3f17560bfd63c9c5bd228c18c1f99afa155b"},
|
||||
]
|
||||
snowballstemmer = [
|
||||
{file = "snowballstemmer-2.1.0-py2.py3-none-any.whl", hash = "sha256:b51b447bea85f9968c13b650126a888aabd4cb4463fca868ec596826325dedc2"},
|
||||
{file = "snowballstemmer-2.1.0.tar.gz", hash = "sha256:e997baa4f2e9139951b6f4c631bad912dfd3c792467e2f03d7239464af90e914"},
|
||||
]
|
||||
sphinx = [
|
||||
{file = "Sphinx-4.1.2-py3-none-any.whl", hash = "sha256:46d52c6cee13fec44744b8c01ed692c18a640f6910a725cbb938bc36e8d64544"},
|
||||
{file = "Sphinx-4.1.2.tar.gz", hash = "sha256:3092d929cd807926d846018f2ace47ba2f3b671b309c7a89cd3306e80c826b13"},
|
||||
]
|
||||
sphinxcontrib-applehelp = [
|
||||
{file = "sphinxcontrib-applehelp-1.0.2.tar.gz", hash = "sha256:a072735ec80e7675e3f432fcae8610ecf509c5f1869d17e2eecff44389cdbc58"},
|
||||
{file = "sphinxcontrib_applehelp-1.0.2-py2.py3-none-any.whl", hash = "sha256:806111e5e962be97c29ec4c1e7fe277bfd19e9652fb1a4392105b43e01af885a"},
|
||||
]
|
||||
sphinxcontrib-devhelp = [
|
||||
{file = "sphinxcontrib-devhelp-1.0.2.tar.gz", hash = "sha256:ff7f1afa7b9642e7060379360a67e9c41e8f3121f2ce9164266f61b9f4b338e4"},
|
||||
{file = "sphinxcontrib_devhelp-1.0.2-py2.py3-none-any.whl", hash = "sha256:8165223f9a335cc1af7ffe1ed31d2871f325254c0423bc0c4c7cd1c1e4734a2e"},
|
||||
]
|
||||
sphinxcontrib-htmlhelp = [
|
||||
{file = "sphinxcontrib-htmlhelp-2.0.0.tar.gz", hash = "sha256:f5f8bb2d0d629f398bf47d0d69c07bc13b65f75a81ad9e2f71a63d4b7a2f6db2"},
|
||||
{file = "sphinxcontrib_htmlhelp-2.0.0-py2.py3-none-any.whl", hash = "sha256:d412243dfb797ae3ec2b59eca0e52dac12e75a241bf0e4eb861e450d06c6ed07"},
|
||||
]
|
||||
sphinxcontrib-jsmath = [
|
||||
{file = "sphinxcontrib-jsmath-1.0.1.tar.gz", hash = "sha256:a9925e4a4587247ed2191a22df5f6970656cb8ca2bd6284309578f2153e0c4b8"},
|
||||
{file = "sphinxcontrib_jsmath-1.0.1-py2.py3-none-any.whl", hash = "sha256:2ec2eaebfb78f3f2078e73666b1415417a116cc848b72e5172e596c871103178"},
|
||||
]
|
||||
sphinxcontrib-qthelp = [
|
||||
{file = "sphinxcontrib-qthelp-1.0.3.tar.gz", hash = "sha256:4c33767ee058b70dba89a6fc5c1892c0d57a54be67ddd3e7875a18d14cba5a72"},
|
||||
{file = "sphinxcontrib_qthelp-1.0.3-py2.py3-none-any.whl", hash = "sha256:bd9fc24bcb748a8d51fd4ecaade681350aa63009a347a8c14e637895444dfab6"},
|
||||
]
|
||||
sphinxcontrib-serializinghtml = [
|
||||
{file = "sphinxcontrib-serializinghtml-1.1.5.tar.gz", hash = "sha256:aa5f6de5dfdf809ef505c4895e51ef5c9eac17d0f287933eb49ec495280b6952"},
|
||||
{file = "sphinxcontrib_serializinghtml-1.1.5-py2.py3-none-any.whl", hash = "sha256:352a9a00ae864471d3a7ead8d7d79f5fc0b57e8b3f95e9867eb9eb28999b92fd"},
|
||||
]
|
||||
toml = [
|
||||
{file = "toml-0.10.2-py2.py3-none-any.whl", hash = "sha256:806143ae5bfb6a3c6e736a764057db0e6a0e05e338b5630894a5f779cabb4f9b"},
|
||||
{file = "toml-0.10.2.tar.gz", hash = "sha256:b3bda1d108d5dd99f4a20d24d9c348e91c4db7ab1b749200bded2f839ccbe68f"},
|
||||
]
|
||||
typed-ast = [
|
||||
{file = "typed_ast-1.4.3-cp35-cp35m-manylinux1_i686.whl", hash = "sha256:2068531575a125b87a41802130fa7e29f26c09a2833fea68d9a40cf33902eba6"},
|
||||
{file = "typed_ast-1.4.3-cp35-cp35m-manylinux1_x86_64.whl", hash = "sha256:c907f561b1e83e93fad565bac5ba9c22d96a54e7ea0267c708bffe863cbe4075"},
|
||||
{file = "typed_ast-1.4.3-cp35-cp35m-manylinux2014_aarch64.whl", hash = "sha256:1b3ead4a96c9101bef08f9f7d1217c096f31667617b58de957f690c92378b528"},
|
||||
{file = "typed_ast-1.4.3-cp35-cp35m-win32.whl", hash = "sha256:dde816ca9dac1d9c01dd504ea5967821606f02e510438120091b84e852367428"},
|
||||
{file = "typed_ast-1.4.3-cp35-cp35m-win_amd64.whl", hash = "sha256:777a26c84bea6cd934422ac2e3b78863a37017618b6e5c08f92ef69853e765d3"},
|
||||
{file = "typed_ast-1.4.3-cp36-cp36m-macosx_10_9_x86_64.whl", hash = "sha256:f8afcf15cc511ada719a88e013cec87c11aff7b91f019295eb4530f96fe5ef2f"},
|
||||
{file = "typed_ast-1.4.3-cp36-cp36m-manylinux1_i686.whl", hash = "sha256:52b1eb8c83f178ab787f3a4283f68258525f8d70f778a2f6dd54d3b5e5fb4341"},
|
||||
{file = "typed_ast-1.4.3-cp36-cp36m-manylinux1_x86_64.whl", hash = "sha256:01ae5f73431d21eead5015997ab41afa53aa1fbe252f9da060be5dad2c730ace"},
|
||||
{file = "typed_ast-1.4.3-cp36-cp36m-manylinux2014_aarch64.whl", hash = "sha256:c190f0899e9f9f8b6b7863debfb739abcb21a5c054f911ca3596d12b8a4c4c7f"},
|
||||
{file = "typed_ast-1.4.3-cp36-cp36m-win32.whl", hash = "sha256:398e44cd480f4d2b7ee8d98385ca104e35c81525dd98c519acff1b79bdaac363"},
|
||||
{file = "typed_ast-1.4.3-cp36-cp36m-win_amd64.whl", hash = "sha256:bff6ad71c81b3bba8fa35f0f1921fb24ff4476235a6e94a26ada2e54370e6da7"},
|
||||
{file = "typed_ast-1.4.3-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:0fb71b8c643187d7492c1f8352f2c15b4c4af3f6338f21681d3681b3dc31a266"},
|
||||
{file = "typed_ast-1.4.3-cp37-cp37m-manylinux1_i686.whl", hash = "sha256:760ad187b1041a154f0e4d0f6aae3e40fdb51d6de16e5c99aedadd9246450e9e"},
|
||||
{file = "typed_ast-1.4.3-cp37-cp37m-manylinux1_x86_64.whl", hash = "sha256:5feca99c17af94057417d744607b82dd0a664fd5e4ca98061480fd8b14b18d04"},
|
||||
{file = "typed_ast-1.4.3-cp37-cp37m-manylinux2014_aarch64.whl", hash = "sha256:95431a26309a21874005845c21118c83991c63ea800dd44843e42a916aec5899"},
|
||||
{file = "typed_ast-1.4.3-cp37-cp37m-win32.whl", hash = "sha256:aee0c1256be6c07bd3e1263ff920c325b59849dc95392a05f258bb9b259cf39c"},
|
||||
{file = "typed_ast-1.4.3-cp37-cp37m-win_amd64.whl", hash = "sha256:9ad2c92ec681e02baf81fdfa056fe0d818645efa9af1f1cd5fd6f1bd2bdfd805"},
|
||||
{file = "typed_ast-1.4.3-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:b36b4f3920103a25e1d5d024d155c504080959582b928e91cb608a65c3a49e1a"},
|
||||
{file = "typed_ast-1.4.3-cp38-cp38-manylinux1_i686.whl", hash = "sha256:067a74454df670dcaa4e59349a2e5c81e567d8d65458d480a5b3dfecec08c5ff"},
|
||||
{file = "typed_ast-1.4.3-cp38-cp38-manylinux1_x86_64.whl", hash = "sha256:7538e495704e2ccda9b234b82423a4038f324f3a10c43bc088a1636180f11a41"},
|
||||
{file = "typed_ast-1.4.3-cp38-cp38-manylinux2014_aarch64.whl", hash = "sha256:af3d4a73793725138d6b334d9d247ce7e5f084d96284ed23f22ee626a7b88e39"},
|
||||
{file = "typed_ast-1.4.3-cp38-cp38-win32.whl", hash = "sha256:f2362f3cb0f3172c42938946dbc5b7843c2a28aec307c49100c8b38764eb6927"},
|
||||
{file = "typed_ast-1.4.3-cp38-cp38-win_amd64.whl", hash = "sha256:dd4a21253f42b8d2b48410cb31fe501d32f8b9fbeb1f55063ad102fe9c425e40"},
|
||||
{file = "typed_ast-1.4.3-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:f328adcfebed9f11301eaedfa48e15bdece9b519fb27e6a8c01aa52a17ec31b3"},
|
||||
{file = "typed_ast-1.4.3-cp39-cp39-manylinux1_i686.whl", hash = "sha256:2c726c276d09fc5c414693a2de063f521052d9ea7c240ce553316f70656c84d4"},
|
||||
{file = "typed_ast-1.4.3-cp39-cp39-manylinux1_x86_64.whl", hash = "sha256:cae53c389825d3b46fb37538441f75d6aecc4174f615d048321b716df2757fb0"},
|
||||
{file = "typed_ast-1.4.3-cp39-cp39-manylinux2014_aarch64.whl", hash = "sha256:b9574c6f03f685070d859e75c7f9eeca02d6933273b5e69572e5ff9d5e3931c3"},
|
||||
{file = "typed_ast-1.4.3-cp39-cp39-win32.whl", hash = "sha256:209596a4ec71d990d71d5e0d312ac935d86930e6eecff6ccc7007fe54d703808"},
|
||||
{file = "typed_ast-1.4.3-cp39-cp39-win_amd64.whl", hash = "sha256:9c6d1a54552b5330bc657b7ef0eae25d00ba7ffe85d9ea8ae6540d2197a3788c"},
|
||||
{file = "typed_ast-1.4.3.tar.gz", hash = "sha256:fb1bbeac803adea29cedd70781399c99138358c26d05fcbd23c13016b7f5ec65"},
|
||||
]
|
||||
typing-extensions = [
|
||||
{file = "typing_extensions-3.10.0.0-py2-none-any.whl", hash = "sha256:0ac0f89795dd19de6b97debb0c6af1c70987fd80a2d62d1958f7e56fcc31b497"},
|
||||
{file = "typing_extensions-3.10.0.0-py3-none-any.whl", hash = "sha256:779383f6086d90c99ae41cf0ff39aac8a7937a9283ce0a414e5dd782f4c94a84"},
|
||||
{file = "typing_extensions-3.10.0.0.tar.gz", hash = "sha256:50b6f157849174217d0656f99dc82fe932884fb250826c18350e159ec6cdf342"},
|
||||
]
|
||||
urllib3 = [
|
||||
{file = "urllib3-1.26.6-py2.py3-none-any.whl", hash = "sha256:39fb8672126159acb139a7718dd10806104dec1e2f0f6c88aab05d17df10c8d4"},
|
||||
{file = "urllib3-1.26.6.tar.gz", hash = "sha256:f57b4c16c62fa2760b7e3d97c35b255512fb6b59a259730f36ba32ce9f8e342f"},
|
||||
]
|
||||
|
@ -14,7 +14,8 @@ more-itertools = "^8.8.0"
|
||||
pytest = ">=6"
|
||||
flake8 = "^3.8.4"
|
||||
pytest-cov = "^2.10.1"
|
||||
mypy = "^0.910"
|
||||
mypy = "^0.790"
|
||||
Sphinx = "^4.1.2"
|
||||
|
||||
[build-system]
|
||||
requires = ["poetry>=0.12"]
|
||||
@ -22,15 +23,8 @@ build-backend = "poetry.masonry.api"
|
||||
|
||||
[tool.pytest.ini_options]
|
||||
testpaths = ["tests"]
|
||||
addopts = "--junitxml pytest.xml --cov pathfinder --cov-report=xml:coverage.xml --cov-fail-under=90 --cov-report=html"
|
||||
addopts = "--junitxml pytest.xml --cov pathfinder --cov-report=xml:coverage.xml --cov-fail-under=90"
|
||||
junit_family = "xunit1"
|
||||
|
||||
[tool.mypy]
|
||||
plugins = "numpy.typing.mypy_plugin"
|
||||
|
||||
[[tool.mypy.overrides]]
|
||||
module = [
|
||||
"scipy",
|
||||
"scipy.optimize"
|
||||
]
|
||||
ignore_missing_imports = true
|
||||
|
@ -1,109 +0,0 @@
|
||||
import numpy
|
||||
import pathfinder.model.oscillating
|
||||
|
||||
|
||||
def chunk_n_sort(pts):
|
||||
pt_length = 7
|
||||
chunked_pts = [pts[i: i + pt_length] for i in range(0, len(pts), pt_length)]
|
||||
|
||||
return chunked_pts
|
||||
|
||||
|
||||
def print_result(msg, result):
|
||||
print(msg)
|
||||
print(f"\tResult: {result.pathfinder_x}")
|
||||
print(f"\tSuccess: {result.success}. {result.message}")
|
||||
try:
|
||||
print(f"\tFunc evals: {result.nfev}")
|
||||
except AttributeError:
|
||||
pass
|
||||
try:
|
||||
print(f"\tJacb evals: {result.njev}")
|
||||
except AttributeError:
|
||||
pass
|
||||
|
||||
|
||||
def test_one_dipole_six_dot_two_frequencies():
|
||||
# setup
|
||||
dot_inputs = [
|
||||
([0, 0, .01], 5), ([-1, 0, -.01], 5), ([-2, 0, -.01], 5), ([0, -1, .01], 5), ([-1, -1, 0], 5), ([-2, -1, 0], 5),
|
||||
([0, 0, .01], 1), ([-1, 0, -.01], 1), ([-2, 0, -.01], 1), ([0, -1, .01], 1), ([-1, -1, 0], 1), ([-2, -1, 0], 1),
|
||||
]
|
||||
dipole = pathfinder.model.oscillating.OscillatingDipole([1, 2, 3], [0, 4, -1], 7)
|
||||
expected_result = numpy.array([1, 2, 3, 0, 4, -1, 7])
|
||||
dipole_arrangement = pathfinder.model.oscillating.OscillatingDipoleArrangement([dipole])
|
||||
dot_measurements = dipole_arrangement.get_dot_measurements(dot_inputs)
|
||||
|
||||
model = pathfinder.model.oscillating.DotOscillatingDipoleModel(dot_measurements, 1)
|
||||
res = model.sol()
|
||||
|
||||
print_result("one oscillating dipole six dots", res)
|
||||
assert res.success, "The solution for a single dipole and six dots should have succeeded."
|
||||
numpy.testing.assert_allclose(res.pathfinder_x, expected_result, err_msg="Dipole wasn't as expected.", rtol=1e-6, atol=1e-6)
|
||||
|
||||
|
||||
def test_two_dipole_six_dot_two_frequencies():
|
||||
# setup
|
||||
dot_inputs = [
|
||||
([0, 0, .01], 5), ([-1, 0, -.01], 5), ([-2, 0, -.01], 5), ([0, -1, .01], 5), ([-1, -1, 0], 5), ([-2, -1, 0], 5),
|
||||
([0, -2, .01], 5), ([-1, -2, -.01], 5), ([-2, -2, -.01], 5), ([0, -3, .01], 5), ([-1, -3, 0], 5), ([-2, -3, 0], 5),
|
||||
([0, 0, .01], 1), ([-1, 0, -.01], 1), ([-2, 0, -.01], 1), ([0, -1, .01], 1), ([-1, -1, 0], 1), ([-2, -1, 0], 1),
|
||||
([0, -2, .01], 1), ([-1, -2, -.01], 1), ([-2, -2, -.01], 1), ([0, -3, .01], 1), ([-1, -3, 0], 1), ([-2, -3, 0], 1),
|
||||
]
|
||||
dipole = pathfinder.model.oscillating.OscillatingDipole([1, 2, 3], [0, 4, -1], 7)
|
||||
dipole2 = pathfinder.model.oscillating.OscillatingDipole([-1, 2, 0], [2, -1, 1], 4)
|
||||
expected_result = numpy.array([1, -2, 0, 2, -1, 1, 4, 1, 2, 3, 0, 4, -1, 7])
|
||||
dipole_arrangement = pathfinder.model.oscillating.OscillatingDipoleArrangement([dipole, dipole2])
|
||||
dot_measurements = dipole_arrangement.get_dot_measurements(dot_inputs)
|
||||
|
||||
model = pathfinder.model.oscillating.DotOscillatingDipoleModel(dot_measurements, 2)
|
||||
res = model.sol()
|
||||
|
||||
print_result("two oscillating dipole six dots", res)
|
||||
assert res.success, "The solution for two dipole and six dots should have succeeded."
|
||||
numpy.testing.assert_allclose(res.pathfinder_x, expected_result, err_msg="Dipole wasn't as expected.", rtol=1e-6, atol=1e-6)
|
||||
|
||||
|
||||
def test_two_dipole_six_dot_two_frequencies_morerealistic():
|
||||
# setup
|
||||
dot_inputs = [
|
||||
([0, 0, .01], 5), ([-1, 0, -.01], 5), ([-2, 0, -.01], 5), ([-3, 0, 0], 5), ([0, -1, .01], 5), ([-1, -1, 0], 5), ([-2, -1, 0], 5), ([-3, -1, 0], 5),
|
||||
([0, -2, .01], 5), ([-1, -2, -.01], 5), ([-2, -2, -.01], 5), ([-3, -2, 0], 5), ([0, -3, .01], 5), ([-1, -3, 0], 5), ([-2, -3, 0], 5), ([-3, -3, 0], 5),
|
||||
([0, 0, .01], 1), ([-1, 0, -.01], 1), ([-2, 0, -.01], 1), ([-3, 0, 0], 1), ([0, -1, .01], 1), ([-1, -1, 0], 1), ([-2, -1, 0], 1), ([-3, -1, 0], 1),
|
||||
([0, -2, .01], 1), ([-1, -2, -.01], 1), ([-2, -2, -.01], 1), ([-3, -2, 0], 1), ([0, -3, .01], 1), ([-1, -3, 0], 1), ([-2, -3, 0], 1), ([-3, -3, 0], 1),
|
||||
]
|
||||
dipole = pathfinder.model.oscillating.OscillatingDipole([1, 2, 3], [0, 4, -1], 7)
|
||||
dipole2 = pathfinder.model.oscillating.OscillatingDipole([-1, 2, 0], [-1, 2, 1], 4)
|
||||
expected_result = numpy.array([1, -2, 0, -1, 2, 1, 4, 1, 2, 3, 0, 4, -1, 7])
|
||||
dipole_arrangement = pathfinder.model.oscillating.OscillatingDipoleArrangement([dipole, dipole2])
|
||||
dot_measurements = dipole_arrangement.get_dot_measurements(dot_inputs)
|
||||
|
||||
model = pathfinder.model.oscillating.DotOscillatingDipoleModel(dot_measurements, 2)
|
||||
res = model.sol()
|
||||
|
||||
print_result("two oscillating dipole six dots", res)
|
||||
numpy.testing.assert_allclose(res.pathfinder_x, expected_result, err_msg="Dipole wasn't as expected.", rtol=1e-6, atol=1e-6)
|
||||
|
||||
|
||||
def test_two_dipole_eighteen_dot_two_frequencies_morerealistic():
|
||||
# setup
|
||||
dot_inputs = [
|
||||
([0, 0, .01], 5), ([-1, 0, -.01], 5), ([-2, 0, -.01], 5), ([0, -1, .01], 5), ([-1, -1, 0], 5), ([-2, -1, 0], 5),
|
||||
([0, -2, .01], 5), ([-1, -2, -.01], 5), ([-2, -2, -.01], 5), ([0, -3, .01], 5), ([-1, -3, 0], 5), ([-2, -3, 0], 5),
|
||||
([0, -4, .01], 5), ([-1, -4, -.01], 5), ([-2, -4, -.01], 5), ([0, -5, .01], 5), ([-1, -5, 0], 5), ([-2, -5, 0], 5),
|
||||
([0, 0, .01], 1), ([-1, 0, -.01], 1), ([-2, 0, -.01], 1), ([0, -1, .01], 1), ([-1, -1, 0], 1), ([-2, -1, 0], 1),
|
||||
([0, -2, .01], 1), ([-1, -2, -.01], 1), ([-2, -2, -.01], 1), ([0, -3, .01], 1), ([-1, -3, 0], 1), ([-2, -3, 0], 1),
|
||||
([0, -4, .01], 1), ([-1, -4, -.01], 1), ([-2, -4, -.01], 1), ([0, -5, .01], 1), ([-1, -5, 0], 1), ([-2, -5, 0], 1),
|
||||
]
|
||||
dipole = pathfinder.model.oscillating.OscillatingDipole([1, 2, 3], [0, 4, -1], 7)
|
||||
dipole2 = pathfinder.model.oscillating.OscillatingDipole([-1, 2, 0], [-1, 2, 1], 4)
|
||||
expected_result = numpy.array([1, -2, 0, -1, 2, 1, 4, 1, 2, 3, 0, 4, -1, 7])
|
||||
dipole_arrangement = pathfinder.model.oscillating.OscillatingDipoleArrangement([dipole, dipole2])
|
||||
dot_measurements = dipole_arrangement.get_dot_measurements(dot_inputs)
|
||||
|
||||
model = pathfinder.model.oscillating.DotOscillatingDipoleModel(dot_measurements, 2)
|
||||
res = model.sol()
|
||||
|
||||
print_result("two oscillating dipole six dots", res)
|
||||
assert res.success, "The solution for two dipole and six dots should have succeeded."
|
||||
numpy.testing.assert_allclose(res.pathfinder_x, expected_result, err_msg="Dipole wasn't as expected.", rtol=1e-6, atol=1e-6)
|
@ -1,43 +0,0 @@
|
||||
import numpy
|
||||
import numpy.testing
|
||||
|
||||
import pathfinder.model.oscillating as model
|
||||
|
||||
|
||||
def test_dot_v_from_dipole():
|
||||
|
||||
dot_position1 = (-1, -1, -1)
|
||||
dot_frequency1 = 11
|
||||
expected_v1 = 0.00001421963287022476
|
||||
dot = model.DotMeasurement(expected_v1, dot_position1, dot_frequency1)
|
||||
|
||||
# and dipole located at (4, 5, 6) with p=(1, 2, 3) and w = 7
|
||||
pt = numpy.array((1, 2, 3, 4, 5, 6, 7))
|
||||
|
||||
numpy.testing.assert_allclose(dot.v_for_point(pt), dot.v, err_msg="v from dipole at a dot was incorrect!")
|
||||
numpy.testing.assert_allclose(dot.cost(pt), 0, atol=1e-12, err_msg="cost should be zero")
|
||||
|
||||
|
||||
def test_jac():
|
||||
expected_jac = [
|
||||
3.742008650059147e-6, 4.4904103800709765e-6, 5.238812110082806e-6,
|
||||
-3.12967996186765e-6, -3.1568945702317167e-6, -3.184109178595783e-6,
|
||||
8.603475350051953e-7
|
||||
]
|
||||
|
||||
expected_jac2 = [
|
||||
-4.428720903021825e-6, 3.5429767224174605e-6, 4.428720903021825e-6,
|
||||
-6.804125751006259e-6, -4.0261099118380183e-7, 2.3754048479844336e-6,
|
||||
5.181603456535536e-6
|
||||
]
|
||||
|
||||
dot = model.DotMeasurement(50, (-1, -1, -1), 11)
|
||||
|
||||
# dipole located at (4, 5, 6) with p=(1, 2, 3) and w = 7
|
||||
pt = numpy.array((1, 2, 3, 4, 5, 6, 7))
|
||||
pt2 = numpy.array((2, 5, 3, 4, -5, -6, 2))
|
||||
pts = numpy.append(pt, pt2)
|
||||
expected_jac_all = expected_jac + expected_jac2
|
||||
assert len(dot.jac_pt(pt)) == 7
|
||||
numpy.testing.assert_allclose(dot.jac_pt(pt), expected_jac, err_msg="Jac pt doesn't match Mathematica result.")
|
||||
numpy.testing.assert_allclose(dot.jac(pts), expected_jac_all, err_msg="whole row should match")
|
@ -1,22 +0,0 @@
|
||||
import numpy
|
||||
import pathfinder.model.oscillating as model
|
||||
|
||||
|
||||
def test_static_dipole():
|
||||
d1 = model.OscillatingDipole((1, 2, 3), (4, 5, 6), 7)
|
||||
d2 = model.OscillatingDipole((2, 5, 3), (4, -5, -6), 2)
|
||||
dipoles = model.OscillatingDipoleArrangement([d1, d2])
|
||||
|
||||
dot_position1 = (-1, -1, -1)
|
||||
dot_frequency1 = 11
|
||||
expected_v1 = 0.00001421963287022476
|
||||
expected_v2 = 0.00001107180225755457
|
||||
|
||||
numpy.testing.assert_allclose(d1.s_at_position(dot_position1, dot_frequency1), expected_v1, err_msg="Voltage at dot isn't as expected.")
|
||||
|
||||
dot_measurements = dipoles.get_dot_measurements([(dot_position1, dot_frequency1)])
|
||||
assert len(dot_measurements) == 1, "Should have only had one dot measurement."
|
||||
measurement = dot_measurements[0]
|
||||
numpy.testing.assert_allclose(measurement.r, dot_position1, err_msg="Dot position should have been passed over")
|
||||
numpy.testing.assert_allclose(measurement.f, dot_frequency1, err_msg="Dot frequency should have been passed over")
|
||||
numpy.testing.assert_allclose(measurement.v, expected_v1 + expected_v2, err_msg="Voltage at dot isn't as expected.")
|
@ -1,35 +0,0 @@
|
||||
import numpy
|
||||
import pathfinder.model.oscillating as model
|
||||
|
||||
|
||||
def test_dotdipolemodel_repr():
|
||||
mod = model.DotOscillatingDipoleModel((), 1)
|
||||
assert repr(mod) == "DotOscillatingDipoleModel([], 1)"
|
||||
|
||||
|
||||
def test_dotdipolemodel_m():
|
||||
mod = model.DotOscillatingDipoleModel([model.DotMeasurement(1, (-1, -1, -1), 11), model.DotMeasurement(2, (0, 0, 0), 3)], 1)
|
||||
assert mod.m == 2
|
||||
|
||||
|
||||
def test_dotdipolemodel_cost():
|
||||
mod = model.DotOscillatingDipoleModel([model.DotMeasurement(.05, (-1, -1, -1), 11), model.DotMeasurement(.002, (0, 0, 0), 3)], 1)
|
||||
costs = mod.costs()
|
||||
jac = mod.jac()
|
||||
|
||||
pt_to_test = numpy.array((1, 2, 3, 4, 5, 6, 7))
|
||||
expected_cost = [-0.04998578036712978, -0.00191383161468913]
|
||||
expected_jacobian = [
|
||||
[
|
||||
3.742008650059147e-6, 4.4904103800709765e-6, 5.238812110082806e-6,
|
||||
-3.12967996186765e-6, -3.1568945702317167e-6, -3.184109178595783e-6,
|
||||
8.603475350051953e-7
|
||||
], [
|
||||
0.000021542096327717702, 0.000026927620409647127, 0.000032313144491576555,
|
||||
-0.000021472154456523818, -0.0000228010500092077, -0.000024129945561891588,
|
||||
-8.489496089740964e-6
|
||||
]
|
||||
]
|
||||
|
||||
numpy.testing.assert_allclose(costs(pt_to_test), expected_cost, err_msg="Costs aren't as expected.")
|
||||
numpy.testing.assert_allclose(jac(pt_to_test), expected_jacobian, err_msg="Jacobian aren't as expected.")
|
@ -1,20 +0,0 @@
|
||||
import pathfinder.model.oscillating.util as util
|
||||
import numpy
|
||||
|
||||
|
||||
def test_util_flip():
|
||||
pt = numpy.array((1, 2, 3, 4, 5, 6, 7))
|
||||
expected = (1, 2, 3, 4, 5, 6, 7)
|
||||
numpy.testing.assert_allclose(util.flip_chunk_to_positive_px(pt), expected, err_msg="Point should remain unchanged.")
|
||||
|
||||
|
||||
def test_util_flip_negative():
|
||||
pt = numpy.array((-1, -2, 3, 4, 5, 6, 7))
|
||||
expected = (1, 2, -3, 4, 5, 6, 7)
|
||||
numpy.testing.assert_allclose(util.flip_chunk_to_positive_px(pt), expected, err_msg="Point should remain unchanged.")
|
||||
|
||||
|
||||
def test_util_normalise_two():
|
||||
pt = numpy.array((1, 2, 3, 4, 5, 6, 7, -.5, 1, 1.5, 2, 2.5, 3, 3.5))
|
||||
expected = (.5, -1, -1.5, 2, 2.5, 3, 3.5, 1, 2, 3, 4, 5, 6, 7)
|
||||
numpy.testing.assert_allclose(util.normalize_oscillating_dipole_list(pt), expected, err_msg="Sort should have happened.")
|
@ -1,76 +0,0 @@
|
||||
import numpy
|
||||
import pathfinder.model.static as model
|
||||
|
||||
|
||||
def test_dotdipolemodel_repr():
|
||||
mod = model.DotDipoleModel((), 1)
|
||||
assert repr(mod) == "DotDipoleModel([], 1)"
|
||||
|
||||
|
||||
def test_dotdipolemodel_m():
|
||||
mod = model.DotDipoleModel([model.DotMeasurement(1, (0, 0, 0)), model.DotMeasurement(2, (0, 0, 0))], 1)
|
||||
assert mod.m == 2
|
||||
|
||||
|
||||
def test_dotdipolemodel_cost():
|
||||
mod = model.DotDipoleModel([model.DotMeasurement(1, (0, 0, 1)), model.DotMeasurement(2, (1, 0, 0))], 1)
|
||||
costs = mod.costs()
|
||||
jac = mod.jac()
|
||||
|
||||
pt_to_test = numpy.array((1, 2, 3, 4, 5, 6))
|
||||
expected_cost = [-1.05408565512728256, -2.05293155269909457]
|
||||
expected_jacobian = [
|
||||
[
|
||||
-0.007460090362383803, -0.009325112952979752, -0.009325112952979752,
|
||||
0.007968732887091788, 0.00856214916591777, 0.006697126575321822
|
||||
], [
|
||||
-0.00512240832571883, -0.008537347209531383, -0.01024481665143766,
|
||||
0.005098015905120168, 0.007927536694564856, 0.008488562368334061
|
||||
]
|
||||
]
|
||||
|
||||
numpy.testing.assert_allclose(costs(pt_to_test), expected_cost, err_msg="Costs aren't as expected.")
|
||||
numpy.testing.assert_allclose(jac(pt_to_test), expected_jacobian, err_msg="Jacobian aren't as expected.")
|
||||
|
||||
|
||||
def print_result(msg, result):
|
||||
print(msg)
|
||||
print(f"\tResult: {result.x}")
|
||||
print(f"\tSuccess: {result.success}. {result.message}")
|
||||
try:
|
||||
print(f"\tFunc evals: {result.nfev}")
|
||||
except AttributeError:
|
||||
pass
|
||||
try:
|
||||
print(f"\tJacb evals: {result.njev}")
|
||||
except AttributeError:
|
||||
pass
|
||||
|
||||
|
||||
def test_dot_dipole_model_solution():
|
||||
v1 = -0.05547767706400186526225414
|
||||
v2 = -0.06018573388098888319642888
|
||||
v3 = -0.06364032191901859480476888
|
||||
v4 = -0.06488383879243851188402150
|
||||
v5 = -0.06297148063759813929659130
|
||||
v6 = -0.05735489606460216
|
||||
v7 = -0.07237320672886623
|
||||
v8 = -0.1082531754730548
|
||||
v9 = -0.04471694936155558
|
||||
|
||||
c1 = model.DotMeasurement(v1, [0, 0, 1])
|
||||
c2 = model.DotMeasurement(v2, [0, 0, 2])
|
||||
c3 = model.DotMeasurement(v3, [0, 0, 3])
|
||||
c4 = model.DotMeasurement(v4, [0, 0, 4])
|
||||
c5 = model.DotMeasurement(v5, [0, 0, 5])
|
||||
c6 = model.DotMeasurement(v6, [0, 0, 6])
|
||||
c7 = model.DotMeasurement(v7, [1, 1, 7])
|
||||
c8 = model.DotMeasurement(v8, [1, 2, 3])
|
||||
c9 = model.DotMeasurement(v9, [0, -1, 0])
|
||||
|
||||
expected_result = numpy.array([1, 3, 5, 5, 6, 7])
|
||||
|
||||
mod = model.DotDipoleModel([c1, c2, c3, c4, c5, c6, c7, c8, c9], 1)
|
||||
res = mod.sol()
|
||||
assert res.success, "The solution for a single dipole should have succeeded."
|
||||
numpy.testing.assert_allclose(res.x, expected_result, err_msg="Dipole wasn't as expected.")
|
@ -1,120 +0,0 @@
|
||||
import numpy
|
||||
import pathfinder.model.static
|
||||
|
||||
import pytest
|
||||
|
||||
|
||||
def chunk_n_sort(pts):
|
||||
pt_length = 6
|
||||
chunked_pts = [pts[i: i + pt_length] for i in range(0, len(pts), pt_length)]
|
||||
|
||||
return sorted(chunked_pts, key=lambda x: x[0])
|
||||
|
||||
|
||||
def print_result(msg, result):
|
||||
print(msg)
|
||||
print(f"\tResult: {chunk_n_sort(result.x)}")
|
||||
print(f"\tSuccess: {result.success}. {result.message}")
|
||||
try:
|
||||
print(f"\tFunc evals: {result.nfev}")
|
||||
except AttributeError:
|
||||
pass
|
||||
try:
|
||||
print(f"\tJacb evals: {result.njev}")
|
||||
except AttributeError:
|
||||
pass
|
||||
|
||||
|
||||
def test_one_dipole_six_dot():
|
||||
# setup
|
||||
dot_positions = [[0, 0, 0], [-1, 0, 0], [-2, 0, 0], [-1, -1, 0], [-1, -1, 1], [0, -2, 0]]
|
||||
dipole = pathfinder.model.static.StaticDipole([1, 2, 3], [0, 4, 0])
|
||||
expected_result = numpy.array([1, 2, 3, 0, 4, 0])
|
||||
dipole_arrangement = pathfinder.model.static.StaticDipoleArrangement([dipole])
|
||||
dot_measurements = dipole_arrangement.get_dot_measurements(dot_positions)
|
||||
|
||||
model = pathfinder.model.static.DotDipoleModel(dot_measurements, 1)
|
||||
res = model.sol()
|
||||
|
||||
print_result("one dipole six dots", res)
|
||||
assert res.success, "The solution for a single dipole and six dots should have succeeded."
|
||||
numpy.testing.assert_allclose(res.x, expected_result, err_msg="Dipole wasn't as expected.", rtol=1e-6, atol=1e-6)
|
||||
|
||||
|
||||
@pytest.mark.skip(reason="don't care at the moment")
|
||||
def test_two_dipole_thirteen_dot():
|
||||
dot_positions = [[x, y, 0] for x in (-4, -1, 1, 4) for y in (-1, -5, -9)]
|
||||
dot_positions.append((1, -1, 2))
|
||||
# dot_positions.append((-1, -1, -2))
|
||||
dipole = pathfinder.model.static.StaticDipole([0, 8, 0], [0, 5, 0])
|
||||
dipole2 = pathfinder.model.static.StaticDipole([8, 1, 1], [2, 2, -2])
|
||||
expected_result = numpy.array([0, 8, 0, 0, 5, 0, 8, 1, 1, 2, 2, -2])
|
||||
dipole_arrangement = pathfinder.model.static.StaticDipoleArrangement([dipole, dipole2])
|
||||
dot_measurements = dipole_arrangement.get_dot_measurements(dot_positions)
|
||||
|
||||
model = pathfinder.model.static.DotDipoleModel(dot_measurements, 2)
|
||||
res = model.sol(initial_dipole=(2, 2, 0), initial_position=(0, 3, 0))
|
||||
print(model.costs()(res.x))
|
||||
print(res.x)
|
||||
print_result("two dipole 13 dot", res)
|
||||
assert res.success, "The solution for two dipoles and twelve dots should have succeeded."
|
||||
numpy.testing.assert_allclose(chunk_n_sort(res.x), chunk_n_sort(expected_result), err_msg="Dipole wasn't as expected.", rtol=1e-6, atol=1e-4)
|
||||
|
||||
|
||||
@pytest.mark.skip(reason="don't care at the moment")
|
||||
def test_two_dipole_twelve_dot():
|
||||
dot_positions = [[x, y, 0] for x in (-4, -1, 1, 4) for y in (-1, -5, -9)][:-1]
|
||||
dot_positions.append((1, -1, 2))
|
||||
# dot_positions.append((-1, -1, -2))
|
||||
dipole = pathfinder.model.static.StaticDipole([0, 8, 0], [0, 5, 0])
|
||||
dipole2 = pathfinder.model.static.StaticDipole([8, 1, 1], [2, 2, -2])
|
||||
expected_result = numpy.array([0, 8, 0, 0, 5, 0, 8, 1, 1, 2, 2, -2])
|
||||
dipole_arrangement = pathfinder.model.static.StaticDipoleArrangement([dipole, dipole2])
|
||||
dot_measurements = dipole_arrangement.get_dot_measurements(dot_positions)
|
||||
|
||||
model = pathfinder.model.static.DotDipoleModel(dot_measurements, 2)
|
||||
res = model.sol(initial_dipole=(2, 2, 0), initial_position=(0, 3, 0), use_root=False)
|
||||
print(model.costs()(res.x))
|
||||
print(res.x)
|
||||
print_result("two dipole 13 dot", res)
|
||||
assert res.success, "The solution for two dipoles and twelve dots should have succeeded."
|
||||
numpy.testing.assert_allclose(chunk_n_sort(res.x), chunk_n_sort(expected_result), err_msg="Dipole wasn't as expected.", rtol=1e-6, atol=1e-4)
|
||||
|
||||
|
||||
@pytest.mark.skip(reason="don't care at the moment")
|
||||
def test_two_dipole_twelve_dot_smallguy():
|
||||
dot_positions = [[x, y, 0] for x in (-4, -1, 1, 4) for y in (-1, -5, -9)][:-1]
|
||||
dot_positions.append((1, -1, 2))
|
||||
# dot_positions.append((-1, -1, -2))
|
||||
dipole = pathfinder.model.static.StaticDipole([0, 1, 0], [0, 5, 0])
|
||||
dipole2 = pathfinder.model.static.StaticDipole([8, 1, 1], [2, 2, -2])
|
||||
expected_result = numpy.array([0, 1, 0, 0, 5, 0, 8, 1, 1, 2, 2, -2])
|
||||
dipole_arrangement = pathfinder.model.static.StaticDipoleArrangement([dipole, dipole2])
|
||||
dot_measurements = dipole_arrangement.get_dot_measurements(dot_positions)
|
||||
|
||||
model = pathfinder.model.static.DotDipoleModel(dot_measurements, 2)
|
||||
res = model.sol(initial_dipole=(2, 2, 0), initial_position=(0, 3, 0), use_root=False)
|
||||
print(model.costs()(res.x))
|
||||
print(res.x)
|
||||
print_result("two dipole 13 dot", res)
|
||||
assert res.success, "The solution for two dipoles and twelve dots should have succeeded."
|
||||
numpy.testing.assert_allclose(chunk_n_sort(res.x), chunk_n_sort(expected_result), err_msg="Dipole wasn't as expected.", rtol=1e-6, atol=1e-4)
|
||||
|
||||
|
||||
def test_two_dipole_twelve_dot_2():
|
||||
dot_positions = [[x, y, 0] for x in (-4, -1, 1, 4) for y in (-1, -5, -9)]
|
||||
dot_positions.append((1, -1, 2))
|
||||
dot_positions.append((-1, -1, -2))
|
||||
dipole = pathfinder.model.static.StaticDipole([0, 8, 0], [0, 5, 0])
|
||||
dipole2 = pathfinder.model.static.StaticDipole([8, 1, 1], [2, 2, -2])
|
||||
expected_result = numpy.array([0, 8, 0, 0, 5, 0, 8, 1, 1, 2, 2, -2])
|
||||
dipole_arrangement = pathfinder.model.static.StaticDipoleArrangement([dipole, dipole2])
|
||||
dot_measurements = dipole_arrangement.get_dot_measurements(dot_positions)
|
||||
|
||||
model = pathfinder.model.static.DotDipoleModel(dot_measurements, 2)
|
||||
res = model.sol()
|
||||
print(model.costs()(res.x))
|
||||
|
||||
print_result("two dipole twelve dot", res)
|
||||
# assert res.success, "The solution for two dipoles and twelve dots should have succeeded."
|
||||
numpy.testing.assert_allclose(chunk_n_sort(res.x), chunk_n_sort(expected_result), err_msg="Dipole wasn't as expected.", rtol=1e-6, atol=1e-4)
|
@ -1,23 +0,0 @@
|
||||
import numpy
|
||||
import pathfinder.model.static as model
|
||||
|
||||
|
||||
def test_static_dipole():
|
||||
d1 = model.StaticDipole((1, 2, 3), (4, 5, 6))
|
||||
d2 = model.StaticDipole((4, 5, 6), (1, 2, 3))
|
||||
dipoles = model.StaticDipoleArrangement([d1, d2])
|
||||
|
||||
dot_position1 = (-1, -1, -1)
|
||||
expected_v1 = -0.3338923121348659
|
||||
|
||||
numpy.testing.assert_allclose(dipoles.get_dot_measurement(dot_position1).v, expected_v1, err_msg="Voltage at dot isn't as expected.")
|
||||
numpy.testing.assert_allclose(dipoles.get_dot_measurement(dot_position1).r, dot_position1, err_msg="Dot isn't where expected.")
|
||||
|
||||
# test multiple dots
|
||||
dot_position2 = (-1, -1, -5)
|
||||
expected_v2 = -0.1254445237566694
|
||||
|
||||
both_measurements = dipoles.get_dot_measurements([dot_position1, dot_position2])
|
||||
measured_voltages = numpy.sort([m.v for m in both_measurements])
|
||||
expected_measured_voltages = numpy.sort([expected_v1, expected_v2])
|
||||
numpy.testing.assert_allclose(measured_voltages, expected_measured_voltages, err_msg="Didn't get the measured voltages expected")
|
@ -1,7 +1,7 @@
|
||||
import numpy
|
||||
import numpy.testing
|
||||
|
||||
import pathfinder.model.static as model
|
||||
import pathfinder.model as model
|
||||
|
||||
|
||||
def test_dot():
|
107
tests/model/test_model.py
Normal file
107
tests/model/test_model.py
Normal file
@ -0,0 +1,107 @@
|
||||
import numpy
|
||||
import pathfinder.model as model
|
||||
import scipy.optimize
|
||||
import pytest
|
||||
|
||||
|
||||
def test_dotdipolemodel_repr():
|
||||
mod = model.DotDipoleModel((), 1)
|
||||
assert repr(mod) == "DotDipoleModel([], 1)"
|
||||
|
||||
|
||||
def test_dotdipolemodel_m():
|
||||
mod = model.DotDipoleModel([model.DotMeasurement(1, (0, 0, 0)), model.DotMeasurement(2, (0, 0, 0))], 1)
|
||||
assert mod.m == 2
|
||||
|
||||
|
||||
def print_result(msg, result):
|
||||
print(msg)
|
||||
print(f"\tResult: {result.x}")
|
||||
print(f"\tSuccess: {result.success}. {result.message}")
|
||||
try:
|
||||
print(f"\tFunc evals: {result.nfev}")
|
||||
except AttributeError:
|
||||
pass
|
||||
try:
|
||||
print(f"\tJacb evals: {result.njev}")
|
||||
except AttributeError:
|
||||
pass
|
||||
|
||||
|
||||
@pytest.mark.skip(reason="old")
|
||||
def test_dot_dipole_model_jac():
|
||||
v1 = -0.05547767706400186526225414
|
||||
v2 = -0.06018573388098888319642888
|
||||
v3 = -0.06364032191901859480476888
|
||||
v4 = -0.06488383879243851188402150
|
||||
v5 = -0.06297148063759813929659130
|
||||
v6 = -0.05735489606460216
|
||||
v7 = -0.07237320672886623
|
||||
v8 = -0.1082531754730548
|
||||
|
||||
c1 = model.DotMeasurement(v1, [0, 0, 1])
|
||||
c2 = model.DotMeasurement(v2, [0, 0, 2])
|
||||
c3 = model.DotMeasurement(v3, [0, 0, 3])
|
||||
c4 = model.DotMeasurement(v4, [0, 0, 4])
|
||||
c5 = model.DotMeasurement(v5, [0, 0, 5])
|
||||
c6 = model.DotMeasurement(v6, [0, 0, 6])
|
||||
c7 = model.DotMeasurement(v7, [1, 1, 7])
|
||||
c8 = model.DotMeasurement(v8, [1, 2, 3])
|
||||
|
||||
mod = model.DotDipoleModel([c1, c2, c3, c4, c5, c6], 1)
|
||||
res = scipy.optimize.least_squares(mod.costs(), numpy.array([1, 2, 3, 4, 5, 6]), jac=mod.jac(), ftol=1e-12)
|
||||
print_result("6 dots, least sq", res)
|
||||
mod2 = model.DotDipoleModel([c1, c2, c3, c4, c5, c6, c7, c8], 1)
|
||||
res2 = scipy.optimize.least_squares(mod2.costs(), numpy.array([0, 0, 0, 0, 0, 0]), jac=mod2.jac(), ftol=1e-12, gtol=3e-16)
|
||||
print_result("7 dots, least squares", res2)
|
||||
print(mod2.costs()(res2.x))
|
||||
print(mod2.costs()(numpy.array([1, 3, 5, 5, 6, 7])))
|
||||
|
||||
|
||||
@pytest.mark.skip(reason="bad test")
|
||||
def test_dot_2dipoles_model_jac():
|
||||
dots_12andone = [
|
||||
model.DotMeasurement(-0.1978319326584865, [-4, -1, 0]),
|
||||
model.DotMeasurement(-0.1273171638293727, [-4, -5, 0]),
|
||||
model.DotMeasurement(-0.05545025617224288, [-4, -9, 0]),
|
||||
model.DotMeasurement(-0.4960209997369774, [-1, -1, 0]),
|
||||
model.DotMeasurement(-0.1763373289754278, [-1, -5, 0]),
|
||||
model.DotMeasurement(-0.04946346672578462, [-1, -9, 0]),
|
||||
model.DotMeasurement(-0.5633156098386561, [1, -1, 0]),
|
||||
model.DotMeasurement(-0.113765134433174, [1, -5, 0]),
|
||||
model.DotMeasurement(-0.0294893572499722, [1, -9, 0]),
|
||||
model.DotMeasurement(0.7794941616360612, [4, -1, 0]),
|
||||
model.DotMeasurement(0.1110683086477768, [4, -5, 0]),
|
||||
model.DotMeasurement(0.01183272220840589, [4, -9, 0]),
|
||||
model.DotMeasurement(-0.1096485462119833, [1, 1, 1]),
|
||||
model.DotMeasurement(-0.3925851888077783, [1, 1, -1])
|
||||
]
|
||||
# dots = [
|
||||
# model.Dot(-0.1978319326584865, [-4, -1, 0]),
|
||||
# model.Dot(-0.1273171638293727, [-4, -5, 0]),
|
||||
# model.Dot(-0.05545025617224288, [-4, -9, 0]),
|
||||
# model.Dot(-0.4960209997369774, [-1, -1, 0]),
|
||||
# model.Dot(-0.1763373289754278, [-1, -5, 0]),
|
||||
# model.Dot(-0.04946346672578462, [-1, -9, 0]),
|
||||
# model.Dot(-0.5633156098386561, [1, -1, 0]),
|
||||
# model.Dot(-0.113765134433174, [1, -5, 0]),
|
||||
# model.Dot(-0.0294893572499722, [1, -9, 0]),
|
||||
# model.Dot(0.7794941616360612, [4, -1, 0]),
|
||||
# model.Dot(0.1110683086477768, [4, -5, 0]),
|
||||
# model.Dot(0.01183272220840589, [4, -9, 0]),
|
||||
# model.Dot(-0.0261092728062841, [-4, -13, 0]),
|
||||
# model.Dot(-0.02035559593904894, [-1, -13, 0]),
|
||||
# model.Dot(-0.01296894715810522, [1, -13, 0]),
|
||||
# model.Dot(0.0003306001626435171, [4, -13, 0]),
|
||||
# model.Dot(0.2612817068810759, [7, -1, 0]),
|
||||
# model.Dot(0.1203841445911355, [7, -5, 0]),
|
||||
# model.Dot(0.03425933872931543, [7, -9, 0]),
|
||||
# model.Dot(0.01068547688208644, [7, -13, 0]),
|
||||
# ]
|
||||
|
||||
mod = model.DotDipoleModel(dots_12andone, 2)
|
||||
res = scipy.optimize.least_squares(mod.costs(), numpy.array([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]), jac=mod.jac(), ftol=1e-12)
|
||||
print_result("6 dots, least sq", res)
|
||||
print(mod.costs()(res.x))
|
||||
for val in res.x:
|
||||
print(val)
|
@ -1,7 +1,5 @@
|
||||
from pathfinder import __version__
|
||||
import pathfinder
|
||||
|
||||
|
||||
def test_version():
|
||||
assert __version__ == '0.0.1'
|
||||
assert pathfinder.get_version() == __version__
|
||||
|
Reference in New Issue
Block a user