IVALab Python Libraries
Collection of code for computer vision and robotics with specific API.
Classes | Functions
superviseit.studies Namespace Reference

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...
 

Function Documentation

◆ getDataPath()

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.

Parameters
[in]studyPathOptional sub-path to the main data path.

◆ loadImage()

def superviseit.studies.loadImage (   imageFile,
  fpath = None 
)

◆ readConditionsFromCSV()

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.

Parameters
[in]fileNameName of CSV file.
[in]studyDictDictionary to translate study levels to study parameters.
Returns
Nested list of trial settings.

◆ writeTrialInfoToJSON()

def superviseit.studies.writeTrialInfoToJSON (   jsFile,
  trialInfo 
)

Writes the defectInfo dictionary as a JSON file.

Parameters
[in]jsFileName of the JSON file to write.
[in]trialInfoDictionary of trial information.