Exemple #1
0
 def test_accel_mag_no_temp(self):
     full_file_path = reference_file('accel_mag_no_temp.lid')
     parameters = default_parameters()
     parameters['average'] = False
     dc = DataConverter(full_file_path, parameters)
     dc.convert()
     assert_compare_expected_file('accel_mag_no_temp_AccelMag.csv')
Exemple #2
0
 def test_conversion(self):
     full_file_path = reference_file('test.lid')
     parameters = default_parameters()
     parameters['average'] = False
     converter = DataConverter(full_file_path, parameters)
     converter.convert()
     assert_compare_expected_file('test_AccelMag.csv')
     assert_compare_expected_file('test_Temperature.csv')
Exemple #3
0
 def test_observer(self):
     full_file_path = reference_file('test.lid')
     parameters = default_parameters()
     parameters['average'] = False
     dc = DataConverter(full_file_path, parameters)
     dc.register_observer(lambda percent_done: None)
     dc.convert()
     assert_compare_expected_file('test_AccelMag.csv')
     assert_compare_expected_file('test_Temperature.csv')
Exemple #4
0
 def test_convert_w_posix_time(self):
     full_file_path = reference_file('test.lid')
     parameters = default_parameters()
     parameters['time_format'] = 'posix'
     dc = DataConverter(full_file_path, parameters)
     dc.convert()
     assert_compare_expected_file('test_AccelMag.csv',
                                  'test_AccelMag-posix.csv.expect')
     assert_compare_expected_file('test_Temperature.csv',
                                  'test_Temperature-posix.csv.expect')
Exemple #5
0
 def test_current(self):
     full_file_path = reference_file('test.lid')
     tilt_file_path = reference_file('tiltcurve/TCM-1, 1BalSalt.cal')
     tilt_curve = TiltCurve(tilt_file_path)
     parameters = default_parameters()
     parameters['output_type'] = 'current'
     parameters['tilt_curve'] = tilt_curve
     dc = DataConverter(full_file_path, parameters)
     dc.convert()
     assert_compare_expected_file('test_Current.csv')
     assert_compare_expected_file('test_Temperature.csv')
Exemple #6
0
 def test_custom_calibration(self):
     full_file_path = reference_file('custom_cal/test.lid')
     cal_path = reference_file('custom_cal/hoststorage_default.txt')
     calibration = make_from_calibration_file(cal_path)
     parameters = default_parameters()
     parameters['calibration'] = calibration
     parameters['average'] = False
     dc = DataConverter(full_file_path, parameters)
     dc.convert()
     assert_compare_expected_file('custom_cal/test_AccelMag.csv')
     assert_compare_expected_file('custom_cal/test_Temperature.csv')
Exemple #7
0
 def test_current_with_spike(self):
     full_file_path = reference_file('spike.lid')
     tilt_file_path = reference_file(
         'tiltcurve/TCM-3, Deep Water Meter.cal')
     tilt_curve = TiltCurve(tilt_file_path)
     parameters = default_parameters()
     parameters['output_type'] = 'current'
     parameters['tilt_curve'] = tilt_curve
     dc = DataConverter(full_file_path, parameters)
     dc.convert()
     assert_compare_expected_file('spike_Current.csv')
     assert_compare_expected_file('spike_Temperature.csv')
Exemple #8
0
 def test_temp_comp_magnetometer(self):
     full_file_path = reference_file('TCM1_Calibrate_(0).lid')
     dc = DataConverter(full_file_path, default_parameters())
     dc.convert()
     assert_compare_expected_file('TCM1_Calibrate_(0)_AccelMag.csv')
     assert_compare_expected_file('TCM1_Calibrate_(0)_Temperature.csv')