Example #1
0
    def setUp(self):
        """"Record the date and time for use by the functions below. 
        Delete the output file if it exists so we can make it anew.
        """

        silent_remove(self.filename)

        today = datetime.datetime(2014, 7, 31, 18, 29, 12, 137998)

        self.date = today.strftime("%Y-%m-%d")
        self.time = today.strftime("%H:%M:%S")

        self.dt = 10.0E-6
        self.t = self.dt * np.arange(32 * 1024)

        self.x_attrs = {
            'name': 't',
            'unit': 's',
            'label': 't [s]',
            'label_latex': '$t \\: [\\mathrm{s}]$',
            'help': 'time axis',
            'initial': self.t[0],
            'step': self.t[1] - self.t[0]
        }

        self.y_attrs = {
            'name': 'x',
            'unit': 'nm',
            'label': 'x [nm]',
            'label_latex': '$x \: [\mathrm{nm}]$',
            'help': 'cantilever amplitude',
            'abscissa': 'x',
            'n_avg': 1
        }

        self.f_attrs = {
            'date': self.date,
            'time': self.time,
            'h5py_version': h5py.version.version,
            'source': 'test_hdf5.py',
            'help': 'This is a test file created during unit testing'
        }

        self.write_h5file()
Example #2
0
    def setUp(self):
        """"Record the date and time for use by the functions below. 
        Delete the output file if it exists so we can make it anew.
        """

        silent_remove(self.filename)

        today = datetime.datetime(2014, 7, 31, 18, 29, 12, 137998)

        self.date = today.strftime("%Y-%m-%d")
        self.time = today.strftime("%H:%M:%S")

        self.dt = 10.0E-6
        self.t = self.dt * np.arange(32*1024)

        self.x_attrs = {'name': 't',
                        'unit': 's',
                        'label': 't [s]',
                        'label_latex': '$t \\: [\\mathrm{s}]$',
                        'help': 'time axis',
                        'initial': self.t[0],
                        'step': self.t[1] - self.t[0]}

        self.y_attrs = {'name': 'x',
                        'unit': 'nm',
                        'label': 'x [nm]',
                        'label_latex': '$x \: [\mathrm{nm}]$',
                        'help': 'cantilever amplitude',
                        'abscissa': 'x',
                        'n_avg': 1}

        self.f_attrs = {'date': self.date,
                        'time': self.time,
                        'h5py_version': h5py.version.version,
                        'source': 'test_hdf5.py',
                        'help': 'This is a test file created during unit testing'}

        self.write_h5file()
Example #3
0
 def tearDown(self):
     silent_remove(self.filename)
Example #4
0
 def tearDown(self):
     """Close the h5 file, and remove the file for the next iteration."""
     self.f.close()
     silent_remove(self.filename)
Example #5
0
 def tearDown(self):
     """Remove the file for the next iteration."""
     silent_remove(self.filename)               
Example #6
0
 def tearDown(self):
     silent_remove(self.filename)
Example #7
0
 def tearDown(self):
     """Close the h5 file, and remove the file for the next iteration."""
     self.f.close()
     silent_remove(self.filename)
Example #8
0
 def tearDown(self):
     """Remove the file for the next iteration."""
     silent_remove(self.filename)