Table Of Contents

Previous topic

The Code

Next topic

Imptools Documentation

This Page

Tapservice Documentation

This page contains the Tapservice Package documentation.

The sqlparse Module

The generators Module

vamdctap.generators.GetValue(name, **kwargs)

the function that gets a value out of the query set, using the global name and the node-specific dictionary.

vamdctap.generators.SelfSource(tap)
vamdctap.generators.Xsams(tap, HeaderInfo=None, Sources=None, Methods=None, Functions=None, Environments=None, Atoms=None, Molecules=None, Solids=None, Particles=None, CollTrans=None, RadTrans=None, RadCross=None, NonRadTrans=None)

The main generator function of XSAMS. This one calls all the sub-generators above. It takes the query sets that the node’s setupResult() has constructed as arguments with given names. This function is to be passed to the HTTP-response object directly and not to be looped over beforehand.

vamdctap.generators.XsamsAtoms(Atoms)

Generator (yield) for the main block of XSAMS for the atoms, with an inner loop for the states. The QuerySet that comes in needs to have a nested QuerySet called States attached to each entry in Atoms.

vamdctap.generators.XsamsCollTrans(CollTrans)

Collisional transitions. QuerySets and nested querysets: # CollTran # CollTran.Reactants # CollTran.IntermediateStates # CollTran.Products # CollTran.DataSets # DataSet.FitData # FitData.Arguments # FitData.Parameters # DataSet.TabulatedData

Matching loop variables to use: # CollTran # CollTranReactant # CollTranIntermediateState # CollTranProduct # CollTranDataSet # CollTranFitData # CollTranFitDataArgument # CollTranFitDataParameter # CollTranTabulatedData

vamdctap.generators.XsamsEnvironments(Environments)
vamdctap.generators.XsamsFunctions(Functions)

Generator for the Functions tag

vamdctap.generators.XsamsMCSBuild(Molecule)

Generator for the MolecularChemicalSpecies

vamdctap.generators.XsamsMSBuild(MoleculeState)

Generator for MolecularState tag

vamdctap.generators.XsamsMethods(Methods)

Generator for the methods block of XSAMS

vamdctap.generators.XsamsMolecules(Molecules)

Generator for Molecules tag

vamdctap.generators.XsamsNonRadTrans(NonRadTrans)

non-radiative transitions

vamdctap.generators.XsamsParticles(Particles)

Generator for Particles tag.

vamdctap.generators.XsamsRadCross(RadCross)

for the Radiative/CrossSection part

querysets and nested querysets:

RadCros
RadCros.BandAssignments
BandAssignment.Modes
Mode.DeltaVs

loop varaibles:

RadCros
RadCrosBandAssignment
RadCrosBandAssigmentMode
RadCrosBandAssignmentModeDeltaV
vamdctap.generators.XsamsRadTranBroadening(G)

helper function for line broadening, called from RadTrans

allowed names are: pressure, instrument, doppler, natural

vamdctap.generators.XsamsRadTranShifting(RadTran)

Shifting type

vamdctap.generators.XsamsRadTrans(RadTrans)

Generator for the XSAMS radiative transitions.

vamdctap.generators.XsamsSolids(Solids)

Generator for Solids tag

vamdctap.generators.XsamsSources(Sources, tap)

Create the Source tag structure (a bibtex entry)

vamdctap.generators.checkXML(obj, methodName='XML')

If the queryset has an XML method, use that and skip the hard-coded implementation.

vamdctap.generators.embedhtml(transitions, totalcount=None)

Embed html

vamdctap.generators.escape(s)
vamdctap.generators.generatorError(where)
vamdctap.generators.isiterable(obj)
vamdctap.generators.makeAccuracy(keyword, G)

build the elements for accuracy that belong to DataType.

vamdctap.generators.makeArgumentType(tagname, keyword, G)

Build ArgumentType

vamdctap.generators.makeAtomComponent(Atom)

This constructs the Atomic Component structure.

Atom - the current Atom queryset

vamdctap.generators.makeBroadeningType(G, name='Natural')

Create the Broadening tag

vamdctap.generators.makeCaseQNs(G)

return the Case and the QNs

vamdctap.generators.makeDataSeriesType(tagname, keyword, G)

Creates the dataseries type

vamdctap.generators.makeDataType(tagname, keyword, G, extraAttr={}, extraElem={})

This is for treating the case where a keyword corresponds to a DataType in the schema which can have units, comment, sources etc. The dictionary-suffixes are appended and the values retrieved. If the sources is iterable, it is looped over.

vamdctap.generators.makeEvaluation(keyword, G)

build the elements for evaluation that belong to DataType.

vamdctap.generators.makeNamedDataType(tagname, keyword, G, extraAttr={})

Similar to makeDataType above, but allows the result of G() to be iterable and adds the name-attribute. If the corresponding refs etc are not iterable, they are replicated for each tag.

vamdctap.generators.makeNormalMode(G)
vamdctap.generators.makeOptionalTag(tagname, keyword, G)
vamdctap.generators.makePartitionfunc(keyword, G)

Create the Partionfunction tag element.

vamdctap.generators.makePrimaryType(tagname, keyword, G, extraAttr={})

Build the Primary-type base tags. Note that this method does NOT close the tag, </tagname> must be added manually by the calling function.

extraAttr is a dictionary of attributes-value pairs to add to the tag.

vamdctap.generators.makeRepeatedDataType(tagname, keyword, G, extraAttr={})

Similar to makeDataType above, but allows the result of G() to be iterable and adds the name-attribute. If the corresponding refs etc are not iterable, they are replicated for each tag.

vamdctap.generators.makeShellType(tag, keyword, G)

Creates the Atom shell type.

vamdctap.generators.makeSourceRefs(refs)

Create a SourceRef tag entry

vamdctap.generators.makeTermType(tag, keyword, G)

Construct the Term xsams structure.

This version is more generic than XsamsTerm function and don’t enforce LS/JK/LK to be exclusive to one another (as dictated by current version of xsams schema)

vamdctap.generators.makeiter(obj)

Return an iterable, no matter what

vamdctap.generators.makeloop(keyword, G, *args)

Creates a nested list of lists. All arguments should be valid dictionary keywords and will be fed to G. They are expected to return iterables of equal lengths. The generator yields a list of current element of each argument-list in order, so one can do e.g.

for name, unit in makeloop(‘TabulatedData’, G, ‘Name’, ‘Unit’):
...
vamdctap.generators.parityLabel(parity)

XSAMS whats this as strings “odd” or “even”, not numerical

vamdctap.generators.sources2votable(sources)

Sources to VO

vamdctap.generators.states2votable(states)

States to VO

vamdctap.generators.transitions2embedhtml(transs, count)

Converting Transition to html

vamdctap.generators.transitions2votable(transs, count)

Transition to VO

vamdctap.generators.votable(transitions, states, sources, totalcount=None)

VO base definition

The views Module