IOM_plugin_inhomogwavepacket¶
About the IOM_plugin_inhomogwavepacket class¶
The WaveBlocks Project
@author: R. Bourquin @copyright: Copyright (C) 2010, 2011, 2012, 2013, 2014, 2015, 2016 R. Bourquin @license: Modified BSD License
Class documentation¶
The WaveBlocks Project
IOM plugin providing functions for handling homogeneous Hagedorn wavepacket data.
@author: R. Bourquin @copyright: Copyright (C) 2010, 2011, 2012, 2013, 2016 R. Bourquin @license: Modified BSD License
-
IOM_plugin_inhomogwavepacket.add_inhomogwavepacket(self, parameters, timeslots=None, blockid=0, key=('q', 'p', 'Q', 'P', 'S'))[source]¶ Add storage for the inhomogeneous wavepackets.
Parameters: - parameters – An
ParameterProviderinstance with at least the keysdimensionandncomponents. - timeslots – The number of time slots we need. Can be set to
Noneto get automatically growing datasets. - key (Tuple of valid identifier strings that are
q,p,Q,P,SandadQ. Default is("q", "p", "Q", "P", "S", "adQ").) – Specify which parameters to save. All are independent.
- parameters – An
-
IOM_plugin_inhomogwavepacket.delete_inhomogwavepacket(self, blockid=0)[source]¶ Remove the stored wavepackets.
-
IOM_plugin_inhomogwavepacket.has_inhomogwavepacket(self, blockid=0)[source]¶ Ask if the specified data block has the desired data tensor.
-
IOM_plugin_inhomogwavepacket.load_inhomogwavepacket(self, timestep, blockid=0, key=('q', 'p', 'Q', 'P', 'S', 'adQ'))[source]¶ Load a wavepacket at a given timestep and return a fully configured instance. This method just calls some other
IOManagermethods in the correct order. It is included only for convenience and is not particularly efficient.Parameters: - timestep – The timestep
at which we load the wavepacket. - key (Tuple of valid identifier strings that are
q,p,Q,P,SandadQ. Default is("q", "p", "Q", "P", "S", "adQ").) – Specify which parameters to save. All are independent. - blockid – The ID of the data block to operate on.
Returns: A
HagedornWavepacketInhomogeneousinstance.- timestep – The timestep
-
IOM_plugin_inhomogwavepacket.load_inhomogwavepacket_basisshapes(self, the_hash=None, blockid=0)[source]¶ Load the basis shapes by hash.
-
IOM_plugin_inhomogwavepacket.load_inhomogwavepacket_parameters(self, timestep=None, component=None, blockid=0, key=('q', 'p', 'Q', 'P', 'S'))[source]¶ Load the wavepacket parameters.
Parameters: - timestep – Load only the data of this timestep.
- blockid – The ID of the data block to operate on.
- key (Tuple of valid identifier strings that are
q,p,Q,P,SandadQ. Default is("q", "p", "Q", "P", "S").) – Specify which parameters to load. All are independent.
-
IOM_plugin_inhomogwavepacket.save_inhomogwavepacket(self, packet, timestep, blockid=None, key=('q', 'p', 'Q', 'P', 'S', 'adQ'))[source]¶ Save a wavepacket at a given timestep and read all data to save from the
HagedornWavepacketInhomogeneousinstance provided. This method just calls some otherIOManagermethods in the correct order. It is included only for convenience and is not particularly efficient. We assume the wavepacket is already set up with the correctadd_inhomogwavepacket()method call.Parameters: - packet – The
HagedornWavepacketInhomogeneousinstance we want to save. - timestep – The timestep
at which we save the wavepacket. - key (Tuple of valid identifier strings that are
q,p,Q,P,SandadQ. Default is("q", "p", "Q", "P", "S", "adQ").) – Specify which parameters to save. All are independent. - blockid – The ID of the data block to operate on.
- packet – The
-
IOM_plugin_inhomogwavepacket.save_inhomogwavepacket_basisshapes(self, basisshape, blockid=0)[source]¶ Save the basis shapes of the Hagedorn wavepacket to a file.
Parameters: coefficients – The basis shapes of the Hagedorn wavepacket.
-
IOM_plugin_inhomogwavepacket.save_inhomogwavepacket_coefficients(self, coefficients, basisshapes, timestep=None, blockid=0)[source]¶ Save the coefficients of the Hagedorn wavepacket to a file. Warning: we do only save the hash of the basis shapes here! You have to save the basis shape with the corresponding function too.
Parameters: - coefficients (A
listwith
suitable ndarrays.) – The coefficients of the Hagedorn wavepacket. - basisshapes (A
listwith
BasisShapesubclass instances.) – The corresponding basis shapes of the Hagedorn wavepacket.
- coefficients (A
-
IOM_plugin_inhomogwavepacket.save_inhomogwavepacket_parameters(self, parameters, timestep=None, blockid=0, key=('q', 'p', 'Q', 'P', 'S'))[source]¶ Save the parameter set
of the Hagedorn wavepacket
to a file.Parameters: - parameters (A
listcontaining the fivendarrayslike
) – The parameter set of the Hagedorn wavepacket. - key (Tuple of valid identifier strings that are
q,p,Q,P,SandadQ. Default is("q", "p", "Q", "P", "S").) – Specify which parameters to save. All are independent.
- parameters (A