SpectrumLink
#
- class ansys.speos.core.kernel.spectrum.SpectrumLink(db, key)#
Bases:
ansys.speos.core.kernel.crud.CrudItem
Link object for a spectrum in database.
- Parameters:
- db
ansys.speos.core.kernel.spectrum.SpectrumStub
Database to link to.
- key
str
Key of the spectrum in the database.
- db
- Parameters:
key (str)
Examples
>>> from ansys.speos.core.speos import Speos >>> from ansys.speos.core.kernel.spectrum import ProtoSpectrum >>> speos = Speos(host="localhost", port=50098) >>> spe_db = speos.client.spectrums() >>> spe_message = ProtoSpectrum(name="Monochromatic_600") >>> spe_message.monochromatic.wavelength = 600 >>> spe_link = spe_db.create(message=spe_message)
Overview#
Import detail#
from ansys.speos.core.kernel.spectrum import SpectrumLink
Method detail#
- SpectrumLink.__str__()#
Return the string representation of the spectrum.
- SpectrumLink.get()#
Get the datamodel from database.
- Returns:
spectrum.Spectrum
Spectrum datamodel.
- SpectrumLink.set(data)#
Change datamodel in database.
- Parameters:
- data
spectrum.Spectrum
New spectrum datamodel.
- data
- SpectrumLink.delete()#
Remove datamodel from database.