sasnets.util package

Submodules

sasnets.util.logsql module

sasnets.util.logsql.main(args)[source]

Main function. Args should conform to the argparse args specified.

Parameters:args – Arguments from the command line
Returns:None

sasnets.util.p2sql module

Utility script that uploads data files to a python script.

Reads files generated by sasmodels and uploads the individual data sessions to a postgres database running on localhost. Slow.

sasnets.util.p2sql.main(args)[source]

Main function. Args should conform to the argparse args specified.

Parameters:args – Arguments from the command line
Returns:None

sasnets.util.rnames module

sasnets.util.rnames.main(args)[source]
sasnets.util.rnames.rnames(path, p='_all_')[source]

Method to collect all filenames of models from a directory.

rnames reads all files contained in path that match the regex p, and outputs the model name to a new file named name. If name exists, it is overwritten.

Parameters:
  • path – A string representing a filepath.
  • p – A regex to match files to.
Returns:

None

sasnets.util.tosql module

Utility script that uploads data files to a python script.

Reads files generated by sasmodels and uploads the individual data sessions to data.db in a table specified from a command line. Slow.

sasnets.util.tosql.main(args)[source]

Main method. args come from system command line; should conform to argparse arguments.

Parameters:args – Command line args
Returns:None

sasnets.util.utils module

Various small utility functions that are reused throughout the program.

sasnets.util.utils.inepath(pathname)[source]

Returns a normalised path given a path. Checks if the path exists and creates the path if it does not. If a directory is specified, appends the current time as the filename.

Parameters:pathname – The pathname to process.
Returns:A normalised path, or None.
sasnets.util.utils.plot(q, i_q)[source]

Method to plot Q vs I(Q) data for testing and verification purposes.

Parameters:
  • q – List of Q values
  • i_q – List of I values
Returns:

None

Module contents