gpe.disc
========

.. py:module:: gpe.disc

.. autoapi-nested-parse::

   Dynamics in flattened harmonic traps.



Classes
-------

.. autoapisummary::

   gpe.disc.StatePan
   gpe.disc.Experiment


Module Contents
---------------

.. py:class:: StatePan(experiment, **kw)

   Bases: :py:obj:`piston.mixins.EvolveMixin`, :py:obj:`StateGPEdxy`


   Effective 2D model for a pancake cloud implementing a modified form
   of the dr-GPE with dynamic rescaling in the x direction but not in the y
   and z directions.  The state here is $\psi(x, t)$ but `get_density()` has
   been modified to include the correct scaling.


   .. py:attribute:: single_band
      :value: False



   .. py:attribute:: experiment


   .. py:attribute:: _time_independent_Vext
      :value: False



   .. py:attribute:: _Vext
      :value: [None, None]



.. py:class:: Experiment(_local_dict=None, **kw)

   Bases: :py:obj:`gpe.utils.ExperimentBase`


   Base experiment class for pancake formulation.


   .. py:attribute:: State
      :value: None



   .. py:attribute:: t_unit
      :value: 63.50779925891489



   .. py:attribute:: t_name
      :value: 'ms'



   .. py:attribute:: t__image
      :value: 1



   .. py:attribute:: species


   .. py:attribute:: gs
      :value: None



   .. py:attribute:: cooling_phase
      :value: 1.0



   .. py:attribute:: x_TF
      :value: 15.0



   .. py:attribute:: mu
      :value: None



   .. py:attribute:: trapping_frequencies_Hz
      :value: (2.4, 2.4, 222.0)



   .. py:attribute:: basis_type
      :value: 'pan'



   .. py:attribute:: Nxy
      :value: [None, None]



   .. py:attribute:: Lxy


   .. py:attribute:: dxy


   .. py:attribute:: V_p
      :value: 0



   .. py:attribute:: x_p0
      :value: 0



   .. py:attribute:: y_p0
      :value: 0



   .. py:attribute:: vx_p
      :value: 0



   .. py:attribute:: vy_p
      :value: 0



   .. py:attribute:: sigmax_p
      :value: 1.0



   .. py:attribute:: sigmay_p
      :value: 1.0



   .. py:method:: init()

      Overload this to perform any initial computations.



   .. py:method:: get_Vtrap(state, xyz, expt=False)

      Return the experimental trapping potential and various
      approximations (background potential, not including the
      time-dependent potential like the bucket).



   .. py:method:: get_Vext(state, fiducial=False, expt=False)

      Return the external potential.

      For `t > state.t_final`, all the potentials are set to zero.

      :param state: Current state.  Use this to get the time `state.t` and
                    abscissa `state.basis.xyz`.
      :type state: IState
      :param fiducial: If `True`, then return the potential that should be used to
                       define the initial state in terms of the Thomas Fermi
                       radius of the cloud `x_TF`.
      :type fiducial: bool
      :param expt: If `True`, then return the proper experimental potential
                   rather than the potential used in the simulation.
      :type expt: bool

      .. seealso:: * interface.IExperiment.get_Vext



   .. py:method:: get_Vt(state)

      Optional time-dependent trapping potentials.

      These potentials are not included in the fiducial state used
      to determine the initial conditions, however, if `Vt` is
      non-zero at time `t=0`, then this *will* be included in the
      initial state preparation.

      .. seealso:: * interface.IExperiment.get_Vext



   .. py:property:: fiducial_V_TF

      This may be slow to calculate, so we defer calculation until we
      really need it.


   .. py:method:: get_fiducial_V_TF(t_=0.0, Nx=2**12, Lx_factor=1.1)

      Return the V_TF required to initialize the state.

      If V_TF is None or not defined, then compute the V_TF that defines the
      state in terms of the Thomas-Fermi radius x_TF along the x axis using a
      Harmonic trapping potential with frequencies `ws_expt` as follows:



   .. py:method:: get_state(expt=False, initialize=True)

      Quickly return an appropriate initial state.



   .. py:method:: get_initial_state(perturb=0.0, E_tol=1e-12, psi_tol=1e-12, disp=1, tries=20, cool_steps=100, cool_dt_t_scale=0.1, minimize=True, **kw)

      Return an initial state with the specified population fractions.

      This initial state is prepared in state[0] with the potentials as
      they are at time `t=0`, then the `initial_imbalance` is transferred as
      specified simulating an RF pulse by simply the appropriate
      fraction in each state.  Phases are kept the same as in the
      state[0].



