예제 #1
0
def SaveOutHighResData(filePath,\
        fileIn="../../../CypherReader/UnitTests/LocalData/NUG2TestData.pxp"):
    """
    Assuming the model corrections works, gets the Data to save out 

    Args:
        fileIn : where the pxp is coming from
        folderPath: where to save the data to (folder only)
    
    Returns:
        None
    """
    allData = LoadHiResData(fileIn)
    lowResTime,lowResSep,lowResForce,highResTime,sepExpected,\
        highCorrForce,highResForce = GetOriginalAndCorrected(allData)
    # get the *uncorrected* force ... 
    highResForceObj = WaveObj(DataY=highResForce.DataY,Note=highResForce.Note)
    highResSepObj = WaveObj(DataY=sepExpected,Note=highResForce.Note)
    # make a wave data group to save out
    toSave = WaveDataGroup({"sep":lowResSep,"force":lowResForce})
    toSave.HighBandwidthSetAssociatedWaves({"sep":highResSepObj,
                                            "force":highResForceObj})
    # save out the wave data as a group
    actualFilePath = \
            BinaryHDF5Io.SaveWaveGroupAsTimeSepForceHDF5(filePath,toSave)
    return actualFilePath
예제 #2
0
 def DataToFile(self, WaveName, Data):
     """
     Caches 'Data' to 'FileName', notifying it is saved
     Args:
         Data: see SaveAndNotify
         FileName: see SaveAndNotify
     Returns:
         File path (actual path to the file)
     """
     # get the extensions
     assert WaveName not in self
     # get the actual data to save out
     # False: dont want to throw an error if Hi res isn't complete
     return BinaryHDF5Io.SaveWaveGroupAsTimeSepForceHDF5(
         self.CacheLoc, Data, False)