Support Code¶
context.py¶
Common Values which are used by functions and classes throughout pipeline.
Created on Tue Jan 16 10:53:40 2018
- author
Ruyman Azzollini
ET.py¶
Module to issue WARNING / ALERT phone calls to designated phone numbers. Uses Twilio.
‘… E.T. phone home…’
Created on Thu Sep 14 10:13:12 2017
- author
raf
-
class
vison.support.ET.ET¶ Class to do phone calls.
-
dial_numbers(url)¶ Dials one or more phone numbers from a Twilio phone number.
- Parameters
url – char, URL with the TwiML code that Twilio uses as instructions on call. Basically, it provides a message to be voiced, as intended.
-
send_sms(body)¶
-
-
vison.support.ET.grab_numbers_and_codes()¶ Retrieves phone numbers and access codes necessary to make the phone calls.
excel.py¶
Excel Files Interfaces.
Created on Mon Mar 26 12:07:54 2018
- author
Ruyman Azzollini
-
vison.support.excel.test0()¶ Just a dummy test to show we can use openpyxl
files.py¶
IO related functions.
- requires
PyFITS
- requires
NumPy
- author
Sami-Matias Niemi
-
vison.support.files.cPickleDump(data, output, protocol=2)¶ Dumps data to a cPickled file.
- Parameters
data – a Python data container
output – name of the output file
- Returns
None
-
vison.support.files.cPickleDumpDictionary(dictionary, output, protocol=2)¶ Dumps a dictionary of data to a cPickled file.
- Parameters
dictionary – a Python data container does not have to be a dictionary
output – name of the output file
- Returns
None
-
vison.support.files.cPickleRead(ffile)¶ Loads data from a pickled file.
-
vison.support.files.convert_fig_to_eps(figname)¶ Converts a figure to .eps. Returns new file name.
flags.py¶
Functions and variables related to flags for vison.
Created on Wed Sep 20 17:05:00 2017
- author
Ruyman Azzollini
-
class
vison.support.flags.Flags(indict=None)¶
latex.py¶
Just a collection of LaTeX-generating functions for use in report.py
- History
Created on Mon Jan 30 2017
- author
Ruyman Azzollini
-
vison.support.latex.generate_header(test, model, author, reference='7-XXX', issue=0.0, doDraft=False)¶
-
vison.support.latex.replace_in_template(texf, values)¶
logger.py¶
These functions can be used for logging information.
Warning
logger is not multiprocessing safe.
- author
Sami-Matias Niemi
- version
0.3
-
class
vison.support.logger.SimpleLogger(filename, verbose=False)¶ A simple class to create a log file or print the information on screen.
-
write(text)¶ Writes text either to file or screen.
-
-
vison.support.logger.f_text_wrapper(msg)¶
-
vison.support.logger.setUpLogger(log_filename, loggername='logger')¶ Sets up a logger.
- Param
log_filename: name of the file to save the log.
- Param
loggername: name of the logger
- Returns
logger instance
report.py¶
LaTEx - PDF Reporting Utilities.
- History
Created on Wed Jan 25 16:58:33 2017
- author
Ruyman Azzollini
-
class
vison.support.report.Content(contenttype='')¶
-
class
vison.support.report.FigsTable(FigsList, Ncols, figswidth, caption=None)¶ Class to generate table of figures
-
generate_Latex()¶ Generates LaTeX as list of strings
-
-
class
vison.support.report.Figure(figpath, textfraction=0.7, caption=None, label=None)¶ -
generate_Latex()¶ Generates LaTeX as list of strings.
-
-
class
vison.support.report.Table(tableDict, formats=None, names=None, caption=None, col_align=None, longtable=False)¶ - PENDING:
adjust width of table to texwidth:
- esizebox{ extwidth}{!}{
… end{tabular}}
include option to rotate table to show in landscape
-
generate_Latex()¶ Generates LaTeX as list of strings.