Skip to content

Commit d46678e

Browse files
committed
Docstring typo fixes.
So many typos...
1 parent 3a4bba6 commit d46678e

14 files changed

Lines changed: 149 additions & 149 deletions

src/rydiqule/arc_utils.py

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
class RQ_AlkaliAtom(object):
2424

2525
def __init__(self, arc_atom: arc.alkali_atom_functions.AlkaliAtom):
26-
"""Rydiqule's wrapper class around ARC's Alkai atom classes.
26+
"""Rydiqule's wrapper class around ARC's Alkali atom classes.
2727
2828
Designed predominantly for internal use, seldom needs to be accessed directly.
2929
@@ -35,7 +35,7 @@ def __init__(self, arc_atom: arc.alkali_atom_functions.AlkaliAtom):
3535
"""
3636

3737
self.arc_atom = arc_atom
38-
"ARC atom with which to perfom calculations."
38+
"ARC atom with which to perform calculations."
3939

4040
self._arc_dipole_functions: Dict[Tuple[str, str], Callable] = {
4141
("HFS", "FS"): self.arc_atom.getDipoleMatrixElementHFStoFS,
@@ -53,7 +53,7 @@ def get_dipole_matrix_element(self, state1: A_QState, state2: A_QState,
5353
If states 1 and 2 are NLJ, a simple average of the magnitudes of the dipole-allowed moments
5454
between mJ1 and mJ2 is returned.
5555
56-
Cannot calculate dipole matrix elements between states with NLJ specication and those with
56+
Cannot calculate dipole matrix elements between states with NLJ specification and those with
5757
either FS or HS splitting.
5858
5959
ARC functions used are:
@@ -84,7 +84,7 @@ def get_dipole_matrix_element(self, state1: A_QState, state2: A_QState,
8484
Raises
8585
------
8686
AtomError
87-
If the two states to be coupled are in one each of the NLJ and FS/HFS defintions.
87+
If the two states to be coupled are in one each of the NLJ and FS/HFS definitions.
8888
8989
Examples
9090
--------
@@ -549,7 +549,7 @@ def get_spherical_dipole_matrix_element(self,
549549
>>> print(my_atom.get_spherical_dipole_matrix_element(g_nlj, e_hfs, q=0)) # doctest: +IGNORE_EXCEPTION_DETAIL
550550
Traceback (most recent call last):
551551
File "<stdin>", line 1, in <module>
552-
rydiqule.exceptions.AtomError: Invalid transition type for dipole calculatdion. Allowed types are [('HFS', 'FS'), ('FS', 'HFS'), ('HFS', 'HFS'), ('FS', 'FS'), ('NLJ', 'NLJ')]
552+
rydiqule.exceptions.AtomError: Invalid transition type for dipole calculation. Allowed types are [('HFS', 'FS'), ('FS', 'HFS'), ('HFS', 'HFS'), ('FS', 'FS'), ('NLJ', 'NLJ')]
553553
"""
554554

555555
return (self.get_dipole_matrix_element(state1, state2, q, s)
@@ -625,7 +625,7 @@ def get_transition_rate(self, state1: A_QState, state2: A_QState,
625625
state2: A_QState
626626
NamedTuple of quantum numbers of the target state
627627
temperature: float, optional
628-
Temperature of th atomic environment for calculationg BBR-induced
628+
Temperature of the atomic environment for calculating BBR-induced
629629
decays, in Kelvin.
630630
With default of 0.0, only include natural lifetime.
631631
s: float, optional
@@ -699,16 +699,16 @@ def get_state_lifetime(self, state: A_QState,
699699
This is a thin wrapper around ARC's
700700
:external+arc:meth:`~arc.alkali_atom_functions.AlkaliAtom.getStateLifetime` method.
701701
It adds basic validation of the state and selects the correct quantum numbers for the
702-
calcuation.
702+
calculation.
703703
704704
Parameters
705705
----------
706706
state: A_QState
707707
NamedTuple of quantum numbers of state for which to calculate lifetime.
708708
temperature: float, optional
709-
Temperature at which the atom environmnet is, in Kelvin.
709+
Temperature at which the atom environment is, in Kelvin.
710710
Used for calculating the black-body-induced state lifetime.
711-
If 0.0 (default), result does not inlclude BBR term.
711+
If 0.0 (default), result does not include BBR term.
712712
includeLevelsUpTo: int, optional
713713
If `temperature` is non-zero, this specifies the highest principal
714714
quantum number states to include in the BBR calculation.

src/rydiqule/atom_utils.py

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -287,7 +287,7 @@ def D1_excited(n: Union[int, str],
287287
Examples
288288
--------
289289
The simplest use is to return the nlj quantum numbers for a particular atom's excited state of
290-
the D1 transtion. Principle quantum number and string atom flags can be used interchangeably.
290+
the D1 transition. Principle quantum number and string atom flags can be used interchangeably.
291291
292292
>>> atom = "Rb85"
293293
>>> print(rq.D1_excited(atom))
@@ -369,7 +369,7 @@ def D2_excited(n: Union[int, str],
369369
Examples
370370
--------
371371
The simplest use is to return the nlj quantum numbers for a particular atom's excited state of
372-
the D2 transtion. Principle quantum number and string atom flags can be used interchangeably.
372+
the D2 transition. Principle quantum number and string atom flags can be used interchangeably.
373373
374374
>>> atom = "Rb85"
375375
>>> print(rq.D2_excited(atom))
@@ -453,13 +453,13 @@ def D1_states(n: Union[int, str],
453453
Returns
454454
-------
455455
list of A_QState
456-
Ground and D1 excited state specifications of the provided atom or pricipal quantum number.
456+
Ground and D1 excited state specifications of the provided atom or principal quantum number.
457457
458458
459459
Examples
460460
--------
461461
The basic use of this function is to return the A_QStates associated with the states of the D1
462-
transtition of a particular Rydberg atom. String flags and principle quantum numbers can be used
462+
transition of a particular Rydberg atom. String flags and principle quantum numbers can be used
463463
interchangeably.
464464
465465
>>> atom = "Rb85"
@@ -535,12 +535,12 @@ def D2_states(n: Union[int, str],
535535
Returns
536536
-------
537537
list of A_QState
538-
Ground and D2 excited state specifications of the provided atom or pricipal quantum number.
538+
Ground and D2 excited state specifications of the provided atom or principal quantum number.
539539
540540
Examples
541541
--------
542542
The basic use of this function is to return the A_QStates associated with the states of the D2
543-
transtition of a particular Rydberg atom. String flags and principle quantum numbers can be used
543+
transition of a particular Rydberg atom. String flags and principle quantum numbers can be used
544544
interchangeably.
545545
546546
>>> atom = "Rb85"
@@ -658,12 +658,12 @@ def expand_qnums(qstates: List[A_QState], I: Optional[float] = None,
658658
659659
List-like quantum numbers are defined either with a list of quantum numbers or the string
660660
"all". In the "all" case, that quantum number will be expanded into all physically allowed
661-
values of that quantum number given the preceeeding numbers.
661+
values of that quantum number given the preceding numbers.
662662
663-
Iterates through the list, expanding each A_QState specifcation into a list of all states
663+
Iterates through the list, expanding each A_QState specification into a list of all states
664664
matching that specification. For each state specification in the list, quantum numbers are
665665
expanded from left to right. The final list of A_QStates will respect the ordering of the
666-
intial states by ordering the states corresponding to each specification by
666+
initial states by ordering the states corresponding to each specification by
667667
n, l, j, m_j, f, and finally m_f
668668
669669
Parameters
@@ -682,7 +682,7 @@ def expand_qnums(qstates: List[A_QState], I: Optional[float] = None,
682682
Notes
683683
-----
684684
..note::
685-
While this funcion can expand arbitrary states, it should be noted that the resulting
685+
While this function can expand arbitrary states, it should be noted that the resulting
686686
lists of states can be quite long. If they are to be used as the states of a
687687
:class:`~.Cell`, these long state lists can dramatically increase computation time, and
688688
it is often worth ensuring that tracking hyperfine states individually is absolutely
@@ -691,7 +691,7 @@ def expand_qnums(qstates: List[A_QState], I: Optional[float] = None,
691691
692692
Examples
693693
--------
694-
A basic piece of functionality for this function is as a shorthand for allstates in a
694+
A basic piece of functionality for this function is as a shorthand for all states in a
695695
given manifold.
696696
697697
>>> D1_ground = A_QState(5,0,0.5, f="all")
@@ -742,7 +742,7 @@ def validate_qnums(qstate:A_QState, I: Optional[float]=None):
742742
Named tuple to check, should have fields `("n","l","j","m_j","f","m_f")`
743743
I : Union[None,float], optional
744744
Nuclear spin of the rydberg atom of which this is a state. If `None`, all f
745-
values are invalid automaticaly. Defaults to `None`
745+
values are invalid automatically. Defaults to `None`
746746
747747
Raises
748748
------
@@ -792,22 +792,22 @@ def expand_single_qnum(qstate: A_QState, I: Optional[float] = None, wildcard: st
792792
"""Generates a list of all valid states given a particular quantum number to be expanded.
793793
794794
For a given `A_Qstate` spec with one or more tuple elements specified as either a list or
795-
the "all" string, returns a list of all valid state specifcations matching that state
796-
specification with the first list or string element only expanded. If multiple elemens of the
795+
the "all" string, returns a list of all valid state specifications matching that state
796+
specification with the first list or string element only expanded. If multiple elements of the
797797
statespec are specified with a list or string, only the first one is expanded. This function
798798
is intended as a helper function for a single quantum number, and is not designed to be
799799
used at the top-level
800800
801801
The the case that the element to be expanded is a list, the list returned will have a single
802802
state specification corresponding to each element of that list, and allowed quantum number
803-
rules will not be enforced. In the case that the element to be expaned is the "all" string,
803+
rules will not be enforced. In the case that the element to be expanded is the "all" string,
804804
all valid values of that particular quantum number will be used. Note
805805
that only the `m_j`, `f`, and `m_f` quantum numbers can be expanded in this way.
806806
807807
Parameters
808808
----------
809809
qstate : A_QState
810-
NamedTuple with fields `(n, l, j, m_j, f, m_f)` representng the quantum numbers of
810+
NamedTuple with fields `(n, l, j, m_j, f, m_f)` representing the quantum numbers of
811811
the state. Each, element must be either a float, list of floats, or the "all" string.
812812
Only `m_j`, `f`, and `m_f` may be specified with a "all".
813813
I : float, optional
@@ -917,21 +917,21 @@ def get_valid_j(state: A_QState, I:Optional[float]=None) -> List[float]:
917917
"""
918918
L_qnum = state[1]
919919
if not isinstance(L_qnum, (int, float)):
920-
raise RydiquleError(f"Invalid J qunatum number type {type(L_qnum)}.")
920+
raise RydiquleError(f"Invalid J quantum number type {type(L_qnum)}.")
921921
return list(set(L_qnum + s for s in [-.5,.5]))
922922

923923

924924
def get_valid_mj(state: A_QState, I:Optional[float]=None) -> List[float]:
925925
"""Return the valid values of m_J for given other quantum numbers.
926926
927-
For a given quantum state with principl, orbital, and total quantum numbers
927+
For a given quantum state with principal, orbital, and total quantum numbers
928928
:math:`(n,L,J)`, the valid values of m_J are given by
929929
930930
.. math:: m_J = -J, -J+1, -J+2, ... , J-2, J-1, J
931931
"""
932932
J_qnum = state[2]
933933
if not isinstance(J_qnum, (int, float)):
934-
raise RydiquleError(f"Invalid J qunatum number type {type(J_qnum)}.")
934+
raise RydiquleError(f"Invalid J quantum number type {type(J_qnum)}.")
935935
return np.arange(-1*J_qnum,J_qnum + 1).tolist()
936936

937937

@@ -946,7 +946,7 @@ def get_valid_f(state: A_QState, I: Optional[float]=None) -> List[float]:
946946
"""
947947
J_qnum=state[2]
948948
if not isinstance(J_qnum, (int, float)) or not isinstance(I, (int, float)):
949-
raise ValueError(f"Invalid I,J qunatum number types {(type(I),type(J_qnum))}.")
949+
raise ValueError(f"Invalid I,J quantum number types {(type(I),type(J_qnum))}.")
950950
return np.arange(np.abs(J_qnum - I), J_qnum + I + 1).tolist()
951951

952952

@@ -960,7 +960,7 @@ def get_valid_mf(state: A_QState, I: Optional[float]=None) -> List[float]:
960960
"""
961961
f_qnum = state[4]
962962
if not isinstance(f_qnum, (float, int)):
963-
raise RydiquleError(f"Invalid f qunatum number type {type(f_qnum)}.")
963+
raise RydiquleError(f"Invalid f quantum number type {type(f_qnum)}.")
964964
return np.arange(-1*f_qnum,f_qnum + 1).tolist()
965965

966966

0 commit comments

Comments
 (0)