예제 #1
0
 def setUp(self):
     self.data_path = os.path.join(pc.__path__[0], 'data')
     self.file_path = os.path.join(self.data_path, 'serpentine_dry.txt')
     self.file_path2 = os.path.join(self.data_path, 'rexolite_PAL.txt')
     self.fake_path = os.path.join(self.data_path, 'fake.txt')
     self.dataset1 = pc.run_default(airline_name='VAL',
                                    file_path=self.file_path)
     self.dataset2 = pc.run_default(airline_name='VAL',
                                    file_path=self.file_path2,
                                    corr=True,
                                    freq_cutoff=None)
     self.dataset3 = pc.run_default(airline_name='VAL',
                                    file_path=self.file_path,
                                    nrw=True)
     self.dataset4 = pc.run_default(airline_name='VAL',
                                    file_path=self.file_path,
                                    nrw=True,
                                    corr=True)
     self.normdataset = pc.AirlineData(*pc.get_METAS_data(
         airline='VAL', file_path=self.file_path),
                                       bulk_density=1.6,
                                       name='Serpentine',
                                       normalize_density=True)
     self.normdataset2 = pc.AirlineData(*pc.get_METAS_data(airline='VAL',file_path=self.file_path),\
                                        bulk_density=1.6,name='Serpentine',normalize_density=True,\
                                        norm_eqn='LLL',corr=True,date='date',temperature=25)
예제 #2
0
 def setUp(self):
     import permittivitycalc as pc
     self.data_path = os.path.join(pc.__path__[0], 'data')
     self.file_path = os.path.join(self.data_path, 'serpentine_dry.txt')
     self.file_path2 = os.path.join(self.data_path, 'rexolite_PAL.txt')
     self.fake_path = os.path.join(self.data_path, 'fake.txt')
     self.dataset1 = pc.run_default(airline_name='VAL',
                                    file_path=self.file_path)
     self.dataset2 = pc.run_default(airline_name='VAL',
                                    file_path=self.file_path2)
     self.nonedataset = pc.AirlineData(*pc.get_METAS_data(
         airline='VAL', file_path=self.file_path2),
                                       bulk_density=1.6,
                                       name='Serpentine',
                                       normalize_density=True,
                                       freq_cutoff=None)
     self.cutdataset = pc.AirlineData(*pc.get_METAS_data(
         airline='VAL', file_path=self.file_path2),
                                      bulk_density=1.6,
                                      name='Serpentine',
                                      normalize_density=True,
                                      freq_cutoff=2e8)
     self.normdataset = pc.AirlineData(*pc.get_METAS_data(
         airline='VAL', file_path=self.file_path2),
                                       bulk_density=1.6,
                                       name='Serpentine',
                                       normalize_density=True)
     self.corrdataset = pc.AirlineData(*pc.get_METAS_data(
         airline='VAL', file_path=self.file_path2),
                                       bulk_density=1.6,
                                       name='Serpentine',
                                       corr=True)
예제 #3
0
 def test_str(self):
     print(sys._getframe().f_code.co_name)
     self.assertIsNotNone(self.normdataset2.__str__())
     self.assertIsNotNone(self.normdataset.__str__())
     self.assertIsNotNone(pc.AirlineData(*pc.get_METAS_data(airline='VAL',\
                             file_path=self.file_path),normalize_density=5.8\
                             ,bulk_density=3.5))
예제 #4
0
 def test_normalize_density_number(self):
     """Test density normalization using a value"""
     print(sys._getframe().f_code.co_name)
     test = pc.AirlineData\
             (*pc.get_METAS_data(airline='VAL',file_path=self.file_path)\
              ,bulk_density=3.5,normalize_density=5.8)
     self.assertIsNotNone(test.norm_dielec)
     self.assertIsNotNone(test.norm_losstan)
     with self.assertRaises(Exception):
         pc.AirlineData(*pc.get_METAS_data(airline='VAL',\
                         file_path=self.file_path),normalize_density=5.8)
예제 #5
0
 def test_shorted(self):
     """Test fail to locate shorted sample"""
     print(sys._getframe().f_code.co_name)
     with self.assertRaises(Exception):
         pc.AirlineData(*pc.get_METAS_data(airline='VAL',\
                         file_path=self.file_path),shorted=True)