This page contains the Linefuncs Module documentation. See also How to get your data into the database.
Line functions are helper functions available to use in the mapping file.
All importable line functions take ‘linedata’ as a first argument. This is either a line or a block of text data from the currently parsed input file.
Example of call from mapping dictionary:
- {‘cname’ : ‘whatever_field_name’,
- ‘cbyte’ : (charrange, 56, 58)}
Split a text line by sep argument and return the number:ed split section
Cut out part of a line of texts based on indices.
Cut out part of a line based on indices, return as integer
extract accuracy
extract alpha - van der waal value
extract gamma - van der waal value
extract publication data. This returns a list since it is for a multi-reference.
extract sigma - van der waal value
extract srcfile reference
extract extra transition info from term file. rflag - return ‘ttype’ - transition type (string)
‘autoio’ - autoionized (bool)
extract configurations from term file. varname is the value type we want (e.g. s or l); we search the identifyer field of the
term-file to see if it exists and return the corresponding value, otherwise we return ‘X’.
Helper function
Checks if the given argument is iterable or not, i.e. if it is a list or tuple. Strings are not considered iterable by this function.
Splits a line by splitsep, returns a list. The main use for this method is creating a many-to-many reference.
Returns a list!
Merges data from several columns into one, separating them with ‘-‘. ranges are any number of tuples (indexstart, indexend) defining the columns.
Merges data from several columns (separated by ;) into one, separating them with ‘-‘. sepNr are the nth position of the file, separated by ‘sep’. Assumes a single line input.