Exemple #1
0
 def toCDF(self, filepath, **kwargs):
     '''
     Save this DataModel to a CDF data file.
     Not available without SpacePy.
     '''
     if USE_SPACEPY:
         spdm.toCDF(filepath, self, **kwargs)
     else:
         raise NotImplementedError
Exemple #2
0
 def test_toCDFroundtrip(self):
     """toCDF should be able to make a file and then read it in the same"""
     dm.toCDF(self.testfile, self.SDobj)
     tst = dm.fromCDF(self.testfile)
     for k in self.SDobj:
         np.testing.assert_array_equal(self.SDobj[k], tst[k])