IVALab Python Libraries
Collection of code for computer vision and robotics with specific API.
|
Classes | |
class | StgQualityControl |
Class containing the trial settings for Quality Control experiments. More... | |
Functions | |
def | getDataPath (studyPath='') |
Returns the Supervise It studies data path or sub-path. More... | |
def | loadImage (imageFile, fpath=None) |
def | readConditionsFromCSV (fileName, studyDict) |
Given a CSV file string and a study setting dictionary, generate list of trial settings. More... | |
def | writeTrialInfoToJSON (jsFile, trialInfo) |
Writes the defectInfo dictionary as a JSON file. More... | |
def superviseit.studies.getDataPath | ( | studyPath = '' | ) |
Returns the Supervise It studies data path or sub-path.
If no argument is given, the it returns the data path. If an argument is given, then the assumption is that the calling scope is properly referencing a sub-path of the main data path and the string gets joined.
If the sub-path doesn't exist, then the created string won't be correct. Using it in outer scope will lead to problems. Up to outer scope to figure out or sanity check.
[in] | studyPath | Optional sub-path to the main data path. |
def superviseit.studies.loadImage | ( | imageFile, | |
fpath = None |
|||
) |
def superviseit.studies.readConditionsFromCSV | ( | fileName, | |
studyDict | |||
) |
Given a CSV file string and a study setting dictionary, generate list of trial settings.
The trial settings are presumed to match one-to-one with the initial k keys in the passed dictionary. In other words, the number of columns in the CSV file is the number of settings variables that get translated. Any additional entries in the dictionary are presumed to be additional constant settings to use or dependent on the earlier parameters. The outer scope needs to work that out. Doing so permits additional information to be passed along without requiring a second specification dictionary or data packet, nor more complex processing within this function. Simplicity is key.
[in] | fileName | Name of CSV file. |
[in] | studyDict | Dictionary to translate study levels to study parameters. |
def superviseit.studies.writeTrialInfoToJSON | ( | jsFile, | |
trialInfo | |||
) |
Writes the defectInfo dictionary as a JSON file.
[in] | jsFile | Name of the JSON file to write. |
[in] | trialInfo | Dictionary of trial information. |