def __init__(self, workingDirectory): self.workingDirectory = workingDirectory self.null = None c3dValObj = c3dValidation.c3dValidation(workingDirectory) self.measurementNames = c3dValObj.getValidC3dList(True) self.fileNames = c3dValObj.getValidC3dList(False) self.perFilePyCGM2tspStats = { path.basename(name).replace(".c3d", ""): analysis.makeAnalysis(workingDirectory + "\\", [path.basename(name)]).stpStats for name in self.fileNames }
def __init__(self, workingDirectory): self.workingDirectory = workingDirectory self.null = None c3dValObj = c3dValidation.c3dValidation(workingDirectory) self.measurementNames = c3dValObj.getValidC3dList(True) self.fileNames = c3dValObj.getValidC3dList(False) self.normative_dataset = normativeDatasets.NormativeData( "Schwartz2008", "Free") analysis_per_file = { path.basename(name).replace(".c3d", ""): analysis.makeAnalysis(workingDirectory + "\\", [path.basename(name)]) for name in self.fileNames } self.scores = {} for filename, analysis_obj in analysis_per_file.items(): gps = scores.CGM1_GPS(pointSuffix=None) scf = scores.ScoreFilter(gps, analysis_obj, self.normative_dataset) scf.compute() self.scores[filename] = analysis_obj
def __init__(self, workingDirectory): self.workingDirectory = workingDirectory c3dValObj = c3dValidation.c3dValidation(workingDirectory) self.fileNames = c3dValObj.getValidC3dList(False)
def __init__(self, workingDirectory, modelledC3dfilenames): self.workingDirectory = workingDirectory self.modelledC3dfilenames = modelledC3dfilenames c3dValObj = c3dValidation.c3dValidation(self.workingDirectory) self.fileNames = c3dValObj.getValidC3dList(False)
def createReportJson(self): c3dValObj = c3dValidation.c3dValidation(self.workingDirectory) self.measurementNames = c3dValObj.getValidC3dList(True) fileNames = c3dValObj.getValidC3dList(False) self.null = None if ( fileNames != [] ): # empty list means c3d does not contain Plugin-Gait created 'LAnkleAngles' or there are no events self.frameRate, self.analogRate = getFrameAndAnalogRateFromC3D( fileNames[0]) ts = self.getTimeseriesResults() print( "--------------------Timeseries OK--------------------------------" ) mapProfile = map2.MAP(self.workingDirectory) gvs = self.getGVSResults(mapProfile) print("--------------------GVS OK--------------------------------") gps = self.getGPSResults(mapProfile) print("--------------------GPS OK--------------------------------") emgExp = self.getEMGResults() print("--------------------EMG--------------------------------") # Events ev = self.getEvents() print( "--------------------events OK--------------------------------" ) # #MetaData metaDataObj = metadata.Metadata(self.workingDirectory, self.modelledC3dfilenames, self.subjectMetadata, self.creationDate) md = metaDataObj.medatadaInfo() print( "--------------------metadata OK--------------------------------" ) # Subject sub = metaDataObj.subjectInfo() print( "--------------------subjectInfo OK--------------------------------" ) # Project proj = metaDataObj.projectInfo() print( "--------------------proj OK--------------------------------") # TSP tspObj = tsp.TSP(self.workingDirectory) tsparams = tspObj.export() print("--------------------TSP OK--------------------------------") # Measurements measObj = measurements.Measurements(self.workingDirectory) mea = measObj.measurementInfo(self.extra_settings) print( "--------------------Measurements OK--------------------------------" ) # Create json root = { "results": ts + gvs + gps + emgExp + tsparams, "events": ev, "metadata": md, "measurements": mea, "clientId": self.clientId, "subject": sub, "project": proj, } return root else: root = {} return root