From f65e0b2629aa74d6054ad6a0b7e31175cc9036e6 Mon Sep 17 00:00:00 2001
From: Gamelin Alexis <alexis.gamelin@synchrotron-soleil.fr>
Date: Wed, 30 Mar 2022 16:51:30 +0200
Subject: [PATCH] Head docstring clean-up

---
 __init__.py                   |  6 ------
 impedance/__init__.py         |  6 ------
 impedance/csr.py              |  3 ---
 impedance/impedance_model.py  |  4 +---
 impedance/resistive_wall.py   |  3 ---
 impedance/resonator.py        |  3 ---
 impedance/tapers.py           |  4 +---
 impedance/wakefield.py        |  3 ---
 instability/__init__.py       |  6 ------
 instability/instabilities.py  |  4 +---
 instability/ions.py           |  2 --
 tracking/__init__.py          | 20 ++++++++++----------
 tracking/aperture.py          |  3 ---
 tracking/element.py           |  3 ---
 tracking/monitors/__init__.py |  6 ------
 tracking/monitors/monitors.py |  4 ----
 tracking/monitors/plotting.py |  3 ---
 tracking/monitors/tools.py    |  2 --
 tracking/parallel.py          |  3 ---
 tracking/particles.py         |  4 ----
 tracking/rf.py                |  3 ---
 tracking/synchrotron.py       |  5 +----
 tracking/wakepotential.py     |  7 ++-----
 utilities/__init__.py         |  6 ------
 utilities/beamloading.py      |  5 +----
 utilities/misc.py             |  8 +++-----
 utilities/optics.py           |  3 ---
 utilities/read_impedance.py   |  5 ++---
 utilities/spectrum.py         |  4 +---
 29 files changed, 23 insertions(+), 115 deletions(-)

diff --git a/__init__.py b/__init__.py
index c67145e..40a96af 100644
--- a/__init__.py
+++ b/__init__.py
@@ -1,7 +1 @@
 # -*- coding: utf-8 -*-
-"""
-Created on Tue Jan 14 18:11:33 2020
-
-@author: gamelina
-"""
-
diff --git a/impedance/__init__.py b/impedance/__init__.py
index b58cd94..59a243d 100644
--- a/impedance/__init__.py
+++ b/impedance/__init__.py
@@ -1,10 +1,4 @@
 # -*- coding: utf-8 -*-
-"""
-Created on Tue Jan 14 12:25:30 2020
-
-@author: gamelina
-"""
-
 from mbtrack2.impedance.resistive_wall import (skin_depth, 
                                                CircularResistiveWall, 
                                                Coating)
diff --git a/impedance/csr.py b/impedance/csr.py
index 5f08765..e7a2768 100644
--- a/impedance/csr.py
+++ b/impedance/csr.py
@@ -1,9 +1,6 @@
 # -*- coding: utf-8 -*-
 """
 Define coherent synchrotron radiation (CSR) wakefields in various models.
-
-@author: Alexis Gamelin
-@date: 13/04/2021
 """
 import numpy as np
 import mpmath as mp
diff --git a/impedance/impedance_model.py b/impedance/impedance_model.py
index b398e9b..f174cae 100644
--- a/impedance/impedance_model.py
+++ b/impedance/impedance_model.py
@@ -1,8 +1,6 @@
 # -*- coding: utf-8 -*-
 """
-Created on Mon Sep 28 15:18:23 2020
-
-@author: gamelina
+Module where the ImpedanceModel class is defined.
 """
 import pandas as pd
 import numpy as np
diff --git a/impedance/resistive_wall.py b/impedance/resistive_wall.py
index 126f053..c7f13a8 100644
--- a/impedance/resistive_wall.py
+++ b/impedance/resistive_wall.py
@@ -1,9 +1,6 @@
 # -*- coding: utf-8 -*-
 """
 Define resistive wall elements based on the WakeField class.
-
-@author: Alexis Gamelin
-@date: 14/01/2020
 """
 
 import numpy as np
diff --git a/impedance/resonator.py b/impedance/resonator.py
index e41883e..d514e52 100644
--- a/impedance/resonator.py
+++ b/impedance/resonator.py
@@ -2,9 +2,6 @@
 """
 This module defines the impedances and wake functions from the resonator model 
 based on the WakeField class.
-
-@author: Alexis Gamelin, Watanyu Foosang
-@date: 25/09/2020
 """
 
 import numpy as np
diff --git a/impedance/tapers.py b/impedance/tapers.py
index 73d891e..838e275 100644
--- a/impedance/tapers.py
+++ b/impedance/tapers.py
@@ -1,8 +1,6 @@
 # -*- coding: utf-8 -*-
 """
-Created on Tue Mar 31 13:15:36 2020
-
-@author: gamelina
+Module where taper elements are defined.
 """
 
 from scipy.constants import mu_0, c, pi
diff --git a/impedance/wakefield.py b/impedance/wakefield.py
index a67067b..a7b6efd 100644
--- a/impedance/wakefield.py
+++ b/impedance/wakefield.py
@@ -2,9 +2,6 @@
 """
 This module defines general classes to describes wakefields, impedances and 
 wake functions.
-
-@author: David Amorin, Alexis Gamelin, Watanyu Foosang
-@date: 24/09/2020
 """
 
 import warnings
diff --git a/instability/__init__.py b/instability/__init__.py
index a8925c1..054a9bd 100644
--- a/instability/__init__.py
+++ b/instability/__init__.py
@@ -1,10 +1,4 @@
 # -*- coding: utf-8 -*-
-"""
-Created on Wed Mar 30 16:22:48 2022
-
-@author: gamelina
-"""
-
 from mbtrack2.instability.ions import (ion_cross_section,
                                        ion_frequency,
                                        fast_beam_ion,
diff --git a/instability/instabilities.py b/instability/instabilities.py
index 83089cc..bfecc53 100644
--- a/instability/instabilities.py
+++ b/instability/instabilities.py
@@ -1,8 +1,6 @@
 # -*- coding: utf-8 -*-
 """
-General calculations about instabilities
-
-@author: Alexis Gamelin
+General calculations about instability thresholds.
 """
 
 import numpy as np
diff --git a/instability/ions.py b/instability/ions.py
index bac8d8e..d628929 100644
--- a/instability/ions.py
+++ b/instability/ions.py
@@ -2,8 +2,6 @@
 """
 Various calculations about ion trapping and instabilities in electron storage 
 rings.
-
-@author: Alexis Gamelin
 """
 
 import numpy as np
diff --git a/tracking/__init__.py b/tracking/__init__.py
index 5ecae9b..f0dd800 100644
--- a/tracking/__init__.py
+++ b/tracking/__init__.py
@@ -1,17 +1,17 @@
 # -*- coding: utf-8 -*-
-"""
-Created on Tue Jan 14 18:11:33 2020
-
-@author: gamelina
-"""
-
-from mbtrack2.tracking.particles import (Electron, Proton, Bunch, Beam, 
+from mbtrack2.tracking.particles import (Electron, 
+                                         Proton, 
+                                         Bunch, 
+                                         Beam, 
                                          Particle)
 from mbtrack2.tracking.synchrotron import Synchrotron
-from mbtrack2.tracking.rf import RFCavity, CavityResonator
+from mbtrack2.tracking.rf import (RFCavity, 
+                                  CavityResonator)
 from mbtrack2.tracking.parallel import Mpi
-from mbtrack2.tracking.element import (Element, LongitudinalMap, 
-                                       TransverseMap, SynchrotronRadiation,
+from mbtrack2.tracking.element import (Element, 
+                                       LongitudinalMap, 
+                                       TransverseMap, 
+                                       SynchrotronRadiation,
                                        SkewQuadrupole)
 from mbtrack2.tracking.aperture import (CircularAperture, 
                                         ElipticalAperture,
diff --git a/tracking/aperture.py b/tracking/aperture.py
index 4ba285f..67b51bf 100644
--- a/tracking/aperture.py
+++ b/tracking/aperture.py
@@ -1,9 +1,6 @@
 # -*- coding: utf-8 -*-
 """
 This module defines aperture elements for tracking.
-
-@author: gamelina
-@date: 11/03/2020
 """
 
 import numpy as np
diff --git a/tracking/element.py b/tracking/element.py
index d5eacc2..a9f2efd 100644
--- a/tracking/element.py
+++ b/tracking/element.py
@@ -3,9 +3,6 @@
 This module defines the most basic elements for tracking, including Element,
 an abstract base class which is to be used as mother class to every elements
 included in the tracking.
-
-@author: gamelina
-@date: 11/03/2020
 """
 
 import numpy as np
diff --git a/tracking/monitors/__init__.py b/tracking/monitors/__init__.py
index 7f5ba51..b4688b7 100644
--- a/tracking/monitors/__init__.py
+++ b/tracking/monitors/__init__.py
@@ -1,10 +1,4 @@
 # -*- coding: utf-8 -*-
-"""
-Created on Tue Jan 14 18:11:33 2020
-
-@author: gamelina
-"""
-
 from mbtrack2.tracking.monitors.monitors import (Monitor, BunchMonitor, 
                                                  PhaseSpaceMonitor,
                                                  BeamMonitor,
diff --git a/tracking/monitors/monitors.py b/tracking/monitors/monitors.py
index 348371a..8091b9f 100644
--- a/tracking/monitors/monitors.py
+++ b/tracking/monitors/monitors.py
@@ -2,10 +2,6 @@
 """
 This module defines the different monitor class which are used to save data
 during tracking.
-
-@author: Alexis Gamelin
-@date: 24/03/2020
-
 """
 
 import numpy as np
diff --git a/tracking/monitors/plotting.py b/tracking/monitors/plotting.py
index 8096647..ab53a90 100644
--- a/tracking/monitors/plotting.py
+++ b/tracking/monitors/plotting.py
@@ -2,9 +2,6 @@
 """
 Module for plotting the data recorded by the monitor module during the 
 tracking.
-
-@author: Watanyu Foosang, Alexis Gamelin
-@Date: 20/07/2021
 """
 
 import numpy as np
diff --git a/tracking/monitors/tools.py b/tracking/monitors/tools.py
index 50ab42b..771ff16 100644
--- a/tracking/monitors/tools.py
+++ b/tracking/monitors/tools.py
@@ -2,8 +2,6 @@
 """
 This module defines utilities functions, helping to deals with tracking output 
 and hdf5 files.
-
-@author: Alexis Gamelin
 """
 
 import numpy as np
diff --git a/tracking/parallel.py b/tracking/parallel.py
index 25cb307..ed1bb22 100644
--- a/tracking/parallel.py
+++ b/tracking/parallel.py
@@ -2,9 +2,6 @@
 
 """
 Module to handle parallel computation
-
-@author: Alexis Gamelin
-@date: 06/03/2020
 """
 
 import numpy as np
diff --git a/tracking/particles.py b/tracking/particles.py
index f4351c1..b86b409 100644
--- a/tracking/particles.py
+++ b/tracking/particles.py
@@ -1,10 +1,6 @@
 # -*- coding: utf-8 -*-
 """
 Module where particles, bunches and beams are described as objects.
-
-@author: Alexis Gamelin
-@date: 11/03/2020
-
 """
 
 import numpy as np
diff --git a/tracking/rf.py b/tracking/rf.py
index de05d59..c5ccbf8 100644
--- a/tracking/rf.py
+++ b/tracking/rf.py
@@ -1,9 +1,6 @@
 # -*- coding: utf-8 -*-
 """
 This module handles radio-frequency (RF) cavitiy elements. 
-
-@author: gamelina
-@date: 11/03/2020
 """
 
 import numpy as np
diff --git a/tracking/synchrotron.py b/tracking/synchrotron.py
index 9251551..1746007 100644
--- a/tracking/synchrotron.py
+++ b/tracking/synchrotron.py
@@ -1,9 +1,6 @@
 # -*- coding: utf-8 -*-
 """
-Module where the synchrotron class is defined.
-
-@author: Alexis Gamelin
-@date: 15/01/2020
+Module where the Synchrotron class is defined.
 """
 
 import numpy as np
diff --git a/tracking/wakepotential.py b/tracking/wakepotential.py
index 655c266..953b49a 100644
--- a/tracking/wakepotential.py
+++ b/tracking/wakepotential.py
@@ -1,10 +1,7 @@
 # -*- coding: utf-8 -*-
 """
-This module defines the WakePotential class which deals with the single bunch 
-effects, both longitudinal and transverse.
-
-@author: Alexis Gamelin, Watanyu Foosang
-@date: 25/09/2020
+This module defines the WakePotential and LongRangeResistiveWall classes which 
+deal with the single bunch and multi-bunch wakes.
 """
 
 import numpy as np
diff --git a/utilities/__init__.py b/utilities/__init__.py
index 0cee3f7..316d001 100644
--- a/utilities/__init__.py
+++ b/utilities/__init__.py
@@ -1,10 +1,4 @@
 # -*- coding: utf-8 -*-
-"""
-Created on Tue Jan 14 18:11:33 2020
-
-@author: gamelina
-"""
-
 from mbtrack2.utilities.read_impedance import (read_CST,
                                                read_IW2D,
                                                read_IW2D_folder)
diff --git a/utilities/beamloading.py b/utilities/beamloading.py
index ae2eed4..a788cf4 100644
--- a/utilities/beamloading.py
+++ b/utilities/beamloading.py
@@ -1,9 +1,6 @@
 # -*- coding: utf-8 -*-
 """
-Beam loading equilibrium module
-Created on Fri Aug 23 13:32:03 2019
-
-@author: gamelina
+Module where the BeamLoadingEquilibrium class is defined.
 """
 
 import numpy as np
diff --git a/utilities/misc.py b/utilities/misc.py
index 9dcac0d..b2afeaf 100644
--- a/utilities/misc.py
+++ b/utilities/misc.py
@@ -1,16 +1,14 @@
 # -*- coding: utf-8 -*-
 """
-This module defines utilities functions, helping to deals with the 
-collective_effects module.
-
-@author: Alexis Gamelin
-@date: 28/09/2020
+This module defines miscellaneous utilities functions.
 """
 
 import pandas as pd
 import numpy as np
 from pathlib import Path
+from scipy.interpolate import interp1d
 from mbtrack2.impedance.wakefield import Impedance
+from mbtrack.utilities import spectral_density
     
 def effective_impedance(ring, imp, m, mu, sigma, M, tuneS, xi=None, 
                         mode="Hermite"):
diff --git a/utilities/optics.py b/utilities/optics.py
index 223a70a..fdbd009 100644
--- a/utilities/optics.py
+++ b/utilities/optics.py
@@ -2,9 +2,6 @@
 """
 Module where the class to store the optic functions and the lattice physical 
 parameters are defined.
-
-@author: Alexis Gamelin
-@date: 10/04/2020
 """
 
 import numpy as np
diff --git a/utilities/read_impedance.py b/utilities/read_impedance.py
index cbaf301..5a3f0a5 100644
--- a/utilities/read_impedance.py
+++ b/utilities/read_impedance.py
@@ -1,8 +1,7 @@
 # -*- coding: utf-8 -*-
 """
-Created on Wed Mar 30 16:07:02 2022
-
-@author: gamelina
+Module where function used to import impedance and wakes from other codes are
+defined.
 """
 
 import pandas as pd
diff --git a/utilities/spectrum.py b/utilities/spectrum.py
index 98e4512..91fba8d 100644
--- a/utilities/spectrum.py
+++ b/utilities/spectrum.py
@@ -1,8 +1,6 @@
 # -*- coding: utf-8 -*-
 """
-Created on Wed Mar 30 16:09:05 2022
-
-@author: gamelina
+Module where bunch and beam spectrums and profile are defined.
 """
 
 import numpy as np
-- 
GitLab