Closed tejasri19 closed 4 years ago
pytest .
On Mon, Dec 23, 2019, 01:11 Tejasri Nampally notifications@github.com wrote:
'Panel' object has no attribute 'reflectance_from_panel_serial' & ype object 'Capture' has no attribute 'reflectance_from_panel_serial'.
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/micasense/imageprocessing/issues/98?email_source=notifications&email_token=ABSNZU755T5E7KB2U6IIERDQ2BQB7A5CNFSM4J6QTUP2YY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4ICILNOQ, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABSNZU73W4THCGI34H7UISTQ2BQB7ANCNFSM4J6QTUPQ .
@poynting I was able to run the setup successfully. When I run 'pytest' , I'm getting several errors. Please helP
`> raise ValueError("Provided file path does not have a band name: {}".format(image_path)) E ValueError: Provided file path does not have a band name: data/ALTUM1SET/000/IMG_0008_5.tif
micasense/image.py:73: ValueError ___ test_altum_from_filelist ___
non_panel_altum_file_list = ['data/ALTUM1SET/000/IMG_0008_5.tif', 'data/ALTUM1SET/000/IMG_0008_1.tif', 'data/ALTUM1SET/000/IMG_0008_4.tif', 'data/ALTUM1SET/000/IMG_0008_3.tif', 'data/ALTUM1SET/000/IMG_0008_6.tif', 'data/ALTUM1SET/000/IMG_0008_2.tif']
def test_altum_from_filelist(non_panel_altum_file_list):
cap = capture.Capture.from_filelist(non_panel_altum_file_list)
tests/test_capture.py:178:
micasense/capture.py:97: in from_filelist
images = [image.Image(fle) for fle in file_list]
micasense/capture.py:97: in
self = <micasense.image.Image object at 0x7f072ad1f0b8>, image_path = 'data/ALTUM1SET/000/IMG_0008_5.tif', exiftool_obj = None
def __init__(self, image_path, exiftool_obj=None):
#print(image_path)
if not os.path.isfile(image_path):
raise IOError("Provided path is not a file: {}".format(imanon_panel_rededge_file_listge_path))
self.path = image_path
self.meta = metadata.Metadata(self.path, exiftool_obj=exiftool_obj)
if self.meta.band_name() is None:
raise ValueError("Provided file path does not have a band name: {}".format(image_path))
E ValueError: Provided file path does not have a band name: data/ALTUM1SET/000/IMG_0008_5.tif
micasense/image.py:73: ValueError _____ test_altum_from_single_file __
altum_flight_image_name = 'data/ALTUM1SET/000/IMG_0008_1.tif'
def test_altum_from_single_file(altum_flight_image_name):
cap = capture.Capture.from_file(altum_flight_image_name)
tests/test_capture.py:183:
micasense/capture.py:88: in from_file return cls(image.Image(file_name))
self = <micasense.image.Image object at 0x7f072ab48898>, image_path = 'data/ALTUM1SET/000/IMG_0008_1.tif', exiftool_obj = None
def __init__(self, image_path, exiftool_obj=None):
#print(image_path)
if not os.path.isfile(image_path):
raise IOError("Provided path is not a file: {}".format(imanon_panel_rededge_file_listge_path))
self.path = image_path
self.meta = metadata.Metadata(self.path, exiftool_obj=exiftool_obj)
if self.meta.band_name() is None:
raise ValueError("Provided file path does not have a band name: {}".format(image_path))
E ValueError: Provided file path does not have a band name: data/ALTUM1SET/000/IMG_0008_1.tif
micasense/image.py:73: ValueError ____ test_no_rigrelatives ____
non_panel_rededge_file_list = ['data/0000SET/000/IMG_0001_2.tif', 'data/0000SET/000/IMG_0001_5.tif', 'data/0000SET/000/IMG_0001_4.tif', 'data/0000SET/000/IMG_0001_3.tif', 'data/0000SET/000/IMG_0001_1.tif']
def test_no_rig_relatives(non_panel_rededge_file_list):
cap = capture.Capture.from_filelist(non_panel_rededge_file_list)
tests/test_capture.py:245:
micasense/capture.py:97: in from_filelist
images = [image.Image(fle) for fle in file_list]
micasense/capture.py:97: in
self = <micasense.image.Image object at 0x7f072ab264e0>, image_path = 'data/0000SET/000/IMG_0001_2.tif', exiftool_obj = None
def __init__(self, image_path, exiftool_obj=None):
#print(image_path)
if not os.path.isfile(image_path):
raise IOError("Provided path is not a file: {}".format(imanon_panel_rededge_file_listge_path))
self.path = image_path
self.meta = metadata.Metadata(self.path, exiftool_obj=exiftool_obj)
if self.meta.band_name() is None:
raise ValueError("Provided file path does not have a band name: {}".format(image_path))
E ValueError: Provided file path does not have a band name: data/0000SET/000/IMG_0001_2.tif
micasense/image.py:73: ValueError __ test_10_band_capture_loads __
panel_10band_rededge_file_list = ['data/10BANDSET/000/IMG_0000_7.tif', 'data/10BANDSET/000/IMG_0000_5.tif', 'data/10BANDSET/000/IMG_0000_3.tif', 'data/10BANDSET/000/IMG_0000_8.tif', 'data/10BANDSET/000/IMG_0000_10.tif', 'data/10BANDSET/000/IMG_0000_9.tif', ...]
def test_10_band_capture_loads(panel_10band_rededge_file_list):
print(panel_10band_rededge_file_list)
cap = capture.Capture.from_filelist(panel_10band_rededge_file_list)
tests/test_capture.py:260:
micasense/capture.py:97: in from_filelist
images = [image.Image(fle) for fle in file_list]
micasense/capture.py:97: in
self = <micasense.image.Image object at 0x7f072ad7a2b0>, image_path = 'data/10BANDSET/000/IMG_0000_7.tif', exiftool_obj = None
def __init__(self, image_path, exiftool_obj=None):
#print(image_path)
if not os.path.isfile(image_path):
raise IOError("Provided path is not a file: {}".format(imanon_panel_rededge_file_listge_path))
self.path = image_path
self.meta = metadata.Metadata(self.path, exiftool_obj=exiftool_obj)
if self.meta.band_name() is None:
raise ValueError("Provided file path does not have a band name: {}".format(image_path))
E ValueError: Provided file path does not have a band name: data/10BANDSET/000/IMG_0000_7.tif
micasense/image.py:73: ValueError --------------------------------------------------------------------------------------------- Captured stdout call --------------------------------------------------------------------------------------------- ['data/10BANDSET/000/IMG_0000_7.tif', 'data/10BANDSET/000/IMG_0000_5.tif', 'data/10BANDSET/000/IMG_0000_3.tif', 'data/10BANDSET/000/IMG_0000_8.tif', 'data/10BANDSET/000/IMG_0000_10.tif', 'data/10BANDSET/000/IMG_0000_9.tif', 'data/10BANDSET/000/IMG_0000_4.tif', 'data/10BANDSET/000/IMG_0000_2.tif', 'data/10BANDSET/000/IMG_0000_6.tif', 'data/10BANDSET/000/IMG_0000_1.tif'] __ test_10_band_panel __
panel_10band_rededge_file_list = ['data/10BANDSET/000/IMG_0000_7.tif', 'data/10BANDSET/000/IMG_0000_5.tif', 'data/10BANDSET/000/IMG_0000_3.tif', 'data/10BANDSET/000/IMG_0000_8.tif', 'data/10BANDSET/000/IMG_0000_10.tif', 'data/10BANDSET/000/IMG_0000_9.tif', ...]
def test_10_band_panel(panel_10band_rededge_file_list):
cap = capture.Capture.from_filelist(panel_10band_rededge_file_list)
tests/test_capture.py:264:
micasense/capture.py:97: in from_filelist
images = [image.Image(fle) for fle in file_list]
micasense/capture.py:97: in
self = <micasense.image.Image object at 0x7f072ad04358>, image_path = 'data/10BANDSET/000/IMG_0000_7.tif', exiftool_obj = None
def __init__(self, image_path, exiftool_obj=None):
#print(image_path)
if not os.path.isfile(image_path):
raise IOError("Provided path is not a file: {}".format(imanon_panel_rededge_file_listge_path))
self.path = image_path
self.meta = metadata.Metadata(self.path, exiftool_obj=exiftool_obj)
if self.meta.band_name() is None:
raise ValueError("Provided file path does not have a band name: {}".format(image_path))
E ValueError: Provided file path does not have a band name: data/10BANDSET/000/IMG_0000_7.tif
micasense/image.py:73: ValueError _ test_image_not_file __
non_existant_file_name = 'data/ALTUM1SET/000/NOFILE.tif'
def test_image_not_file(non_existant_file_name):
with pytest.raises(OSError):
image.Image(non_existant_file_name)
tests/test_image.py:101:
self = <micasense.image.Image object at 0x7f072abbb080>, image_path = 'data/ALTUM1SET/000/NOFILE.tif', exiftool_obj = None
def __init__(self, image_path, exiftool_obj=None):
#print(image_path)
if not os.path.isfile(image_path):
raise IOError("Provided path is not a file: {}".format(imanon_panel_rededge_file_listge_path))
E NameError: name 'imanon_panel_rededge_file_listge_path' is not defined
micasense/image.py:68: NameError __ test_from_captures __
files_dir = 'data/0000SET/000'
def test_from_captures(files_dir):
file1 = os.path.join(files_dir, 'IMG_0000_1.tif')
file2 = os.path.join(files_dir, 'IMG_0001_1.tif')
cap1 = capture.Capture.from_file(file1)
tests/test_imageset.py:46:
micasense/capture.py:88: in from_file return cls(image.Image(file_name))
self = <micasense.image.Image object at 0x7f072ab2c6a0>, image_path = 'data/0000SET/000/IMG_0000_1.tif', exiftool_obj = None
def __init__(self, image_path, exiftool_obj=None):
#print(image_path)
if not os.path.isfile(image_path):
raise IOError("Provided path is not a file: {}".format(imanon_panel_rededge_file_listge_path))
self.path = image_path
self.meta = metadata.Metadata(self.path, exiftool_obj=exiftool_obj)
if self.meta.band_name() is None:
raise ValueError("Provided file path does not have a band name: {}".format(image_path))
E ValueError: Provided file path does not have a band name: data/0000SET/000/IMG_0000_1.tif
micasense/image.py:73: ValueError _____ test_from_directory __
files_dir = 'data/0000SET/000'
def test_from_directory(files_dir):
global progress_val
progress(0.0)
imgset = imageset.ImageSet.from_directory(files_dir, progress)
tests/test_imageset.py:54:
micasense/imageset.py:68: in from_directory images.append(image.Image(path, exiftool_obj=exift))
self = <micasense.image.Image object at 0x7f072ab9dd68>, image_path = 'data/0000SET/000/IMG_0001_2.tif', exiftool_obj = <exiftool.ExifTool object at 0x7f072ab9d1d0>
def __init__(self, image_path, exiftool_obj=None):
#print(image_path)
if not os.path.isfile(image_path):
raise IOError("Provided path is not a file: {}".format(imanon_panel_rededge_file_listge_path))
self.path = image_path
self.meta = metadata.Metadata(self.path, exiftool_obj=exiftool_obj)
if self.meta.band_name() is None:
raise ValueError("Provided file path does not have a band name: {}".format(image_path))
E ValueError: Provided file path does not have a band name: data/0000SET/000/IMG_0001_2.tif
micasense/image.py:73: ValueError _____ test_as_nestedlists ____
files_dir = 'data/0000SET/000'
def test_as_nested_lists(files_dir):
imgset = imageset.ImageSet.from_directory(files_dir)
tests/test_imageset.py:60:
micasense/imageset.py:68: in from_directory images.append(image.Image(path, exiftool_obj=exift))
self = <micasense.image.Image object at 0x7f072ad17dd8>, image_path = 'data/0000SET/000/IMG_0001_2.tif', exiftool_obj = <exiftool.ExifTool object at 0x7f072ad17438>
def __init__(self, image_path, exiftool_obj=None):
#print(image_path)
if not os.path.isfile(image_path):
raise IOError("Provided path is not a file: {}".format(imanon_panel_rededge_file_listge_path))
self.path = image_path
self.meta = metadata.Metadata(self.path, exiftool_obj=exiftool_obj)
if self.meta.band_name() is None:
raise ValueError("Provided file path does not have a band name: {}".format(image_path))
E ValueError: Provided file path does not have a band name: data/0000SET/000/IMG_0001_2.tif
micasense/image.py:73: ValueError ____ test_10_band_fromdir ____
ten_band_files_dir = 'data/10BANDSET/000'
def test_10_band_from_dir(ten_band_files_dir):
imgset = imageset.ImageSet.from_directory(ten_band_files_dir, progress)
tests/test_imageset.py:67:
micasense/imageset.py:68: in from_directory images.append(image.Image(path, exiftool_obj=exift))
self = <micasense.image.Image object at 0x7f072ab4e6d8>, image_path = 'data/10BANDSET/000/IMG_0431_9.tif', exiftool_obj = <exiftool.ExifTool object at 0x7f072ab4e390>
def __init__(self, image_path, exiftool_obj=None):
#print(image_path)
if not os.path.isfile(image_path):
raise IOError("Provided path is not a file: {}".format(imanon_panel_rededge_file_listge_path))
self.path = image_path
self.meta = metadata.Metadata(self.path, exiftool_obj=exiftool_obj)
if self.meta.band_name() is None:
raise ValueError("Provided file path does not have a band name: {}".format(image_path))
E ValueError: Provided file path does not have a band name: data/10BANDSET/000/IMG_0431_9.tif
micasense/image.py:73: ValueError ___ test_band_index ____
meta = <micasense.metadata.Metadata object at 0x7f072ac749b0>
def test_band_index(meta):
assert meta.band_index() == 0
E assert None == 0 E + where None = <bound method Metadata.band_index of <micasense.metadata.Metadata object at 0x7f072ac749b0>>() E + where <bound method Metadata.band_index of <micasense.metadata.Metadata object at 0x7f072ac749b0>> = <micasense.metadata.Metadata object at 0x7f072ac749b0>.band_index
tests/test_metadata.py:35: AssertionError _ test_cameramake
meta = <micasense.metadata.Metadata object at 0x7f072acee860>
def test_camera_make(meta):
assert meta.camera_make() == 'MicaSense'
E AssertionError: assert None == 'MicaSense' E + where None = <bound method Metadata.camera_make of <micasense.metadata.Metadata object at 0x7f072acee860>>() E + where <bound method Metadata.camera_make of <micasense.metadata.Metadata object at 0x7f072acee860>> = <micasense.metadata.Metadata object at 0x7f072acee860>.camera_make
tests/test_metadata.py:38: AssertionError __ test_camera_model ___
meta = <micasense.metadata.Metadata object at 0x7f072ad1f7b8>
def test_camera_model(meta):
assert meta.camera_model() == 'RedEdge'
E AssertionError: assert None == 'RedEdge' E + where None = <bound method Metadata.camera_model of <micasense.metadata.Metadata object at 0x7f072ad1f7b8>>() E + where <bound method Metadata.camera_model of <micasense.metadata.Metadata object at 0x7f072ad1f7b8>> = <micasense.metadata.Metadata object at 0x7f072ad1f7b8>.camera_model
tests/test_metadata.py:41: AssertionError ____ test_flight_id ____
meta = <micasense.metadata.Metadata object at 0x7f072ab7a6d8>
def test_flight_id(meta):
assert meta.flight_id() == 'NtLNbVIdowuCaWYbg3ck'
E AssertionError: assert None == 'NtLNbVIdowuCaWYbg3ck' E + where None = <bound method Metadata.flight_id of <micasense.metadata.Metadata object at 0x7f072ab7a6d8>>() E + where <bound method Metadata.flight_id of <micasense.metadata.Metadata object at 0x7f072ab7a6d8>> = <micasense.metadata.Metadata object at 0x7f072ab7a6d8>.flight_id
tests/test_metadata.py:44: AssertionError ___ test_capture_id ____
meta = <micasense.metadata.Metadata object at 0x7f072ad044e0>
def test_capture_id(meta):
assert meta.capture_id() == '5v25BtsZg3BQBhVH7Iaz'
E AssertionError: assert None == '5v25BtsZg3BQBhVH7Iaz' E + where None = <bound method Metadata.capture_id of <micasense.metadata.Metadata object at 0x7f072ad044e0>>() E + where <bound method Metadata.capture_id of <micasense.metadata.Metadata object at 0x7f072ad044e0>> = <micasense.metadata.Metadata object at 0x7f072ad044e0>.capture_id
tests/test_metadata.py:47: AssertionError _ test_blacklevel
meta = <micasense.metadata.Metadata object at 0x7f072ab26a90>
def test_black_level(meta):
assert meta.black_level() == 4800.0
E assert 0 == 4800.0 E + where 0 = <bound method Metadata.black_level of <micasense.metadata.Metadata object at 0x7f072ab26a90>>() E + where <bound method Metadata.black_level of <micasense.metadata.Metadata object at 0x7f072ab26a90>> = <micasense.metadata.Metadata object at 0x7f072ab26a90>.black_level
tests/testmetadata.py:50: AssertionError ____ test_focal_lengthmm ____
meta = <micasense.metadata.Metadata object at 0x7f072ab68da0>
def test_focal_length_mm(meta):
assert meta.focal_length_mm() == pytest.approx(5.43509341)
tests/test_metadata.py:53:
self = <micasense.metadata.Metadata object at 0x7f072ab68da0>
def focal_length_mm(self):
units = self.get_item('XMP:PerspectiveFocalLengthUnits')
focal_length_mm = 0.0
if units == 'mm':
focal_length_mm = float(self.get_item('XMP:PerspectiveFocalLength'))
else:
focal_length_px = float(self.get_item('XMP:PerspectiveFocalLength'))
E TypeError: float() argument must be a string or a number, not 'NoneType'
micasense/metadata.py:256: TypeError ___ test_focal_length_mm_v3 ____
meta_v3 = <micasense.metadata.Metadata object at 0x7f072ac95e10>
def test_focal_length_mm_v3(meta_v3):
assert meta_v3.focal_length_mm() == pytest.approx(5.45221099)
tests/test_metadata.py:56:
self = <micasense.metadata.Metadata object at 0x7f072ac95e10>
def focal_length_mm(self):
units = self.get_item('XMP:PerspectiveFocalLengthUnits')
focal_length_mm = 0.0
if units == 'mm':
focal_length_mm = float(self.get_item('XMP:PerspectiveFocalLength'))
else:
focal_length_px = float(self.get_item('XMP:PerspectiveFocalLength'))
E TypeError: float() argument must be a string or a number, not 'NoneType'
micasense/metadata.py:256: TypeError __ test_fp_resolution __
meta = <micasense.metadata.Metadata object at 0x7f072ab23eb8>
def test_fp_resolution(meta):
assert meta.focal_plane_resolution_px_per_mm() == pytest.approx([266.666667,266.666667])
tests/test_metadata.py:59:
self = <micasense.metadata.Metadata object at 0x7f072ab23eb8>
def focal_plane_resolution_px_per_mm(self):
fp_x_resolution = float(self.get_item('EXIF:FocalPlaneXResolution'))
E TypeError: float() argument must be a string or a number, not 'NoneType'
micasense/metadata.py:246: TypeError ____ test_fp_resolutionv3 ____
meta_v3 = <micasense.metadata.Metadata object at 0x7f072acf2eb8>
def test_fp_resolution_v3(meta_v3):
assert meta_v3.focal_plane_resolution_px_per_mm() == pytest.approx([266.666667,266.666667])
tests/test_metadata.py:62:
self = <micasense.metadata.Metadata object at 0x7f072acf2eb8>
def focal_plane_resolution_px_per_mm(self):
fp_x_resolution = float(self.get_item('EXIF:FocalPlaneXResolution'))
E TypeError: float() argument must be a string or a number, not 'NoneType'
micasense/metadata.py:246: TypeError ____ test_utctime ____
meta = <micasense.metadata.Metadata object at 0x7f072ab39cf8>
def test_utc_time(meta):
utc_time = meta.utc_time()
tests/test_metadata.py:65:
self = <micasense.metadata.Metadata object at 0x7f072ab39cf8>
def utc_time(self):
''' Get the timezone-aware datetime of the image capture '''
str_time = self.get_item('EXIF:DateTimeOriginal')
utc_time = datetime.strptime(str_time, "%Y:%m:%d %H:%M:%S")
E TypeError: strptime() argument 1 must be str, not None
micasense/metadata.py:126: TypeError ___ test_utc_time_v3 ___
meta_v3 = <micasense.metadata.Metadata object at 0x7f072ac959b0>
def test_utc_time_v3(meta_v3):
utc_time = meta_v3.utc_time()
tests/test_metadata.py:70:
self = <micasense.metadata.Metadata object at 0x7f072ac959b0>
def utc_time(self):
''' Get the timezone-aware datetime of the image capture '''
str_time = self.get_item('EXIF:DateTimeOriginal')
utc_time = datetime.strptime(str_time, "%Y:%m:%d %H:%M:%S")
E TypeError: strptime() argument 1 must be str, not None
micasense/metadata.py:126: TypeError ____ testposition ____
meta = <micasense.metadata.Metadata object at 0x7f072ab9d6a0>
def test_position(meta):
assert meta.position() == pytest.approx((36.576096, -119.4352689, 101.861))
tests/test_metadata.py:75:
../../.conda/envs/micasense/lib/python3.7/site-packages/_pytest/python_api.py:196: in eq
return ApproxBase.eq(self, actual)
../../.conda/envs/micasense/lib/python3.7/site-packages/_pytest/python_api.py:70: in eq
a == self._approx_scalar(x) for a, x in self._yield_comparisons(actual)
../../.conda/envs/micasense/lib/python3.7/site-packages/_pytest/python_api.py:70: in
self = 36.576096 ± 3.7e-05, actual = None
def __eq__(self, actual):
"""
Return true if the given value is equal to the expected value within
the pre-specified tolerance.
"""
if _is_numpy_array(actual):
# Call ``__eq__()`` manually to prevent infinite-recursion with
# numpy<1.13. See #3748.
return all(self.__eq__(a) for a in actual.flat)
# Short-circuit exact equality.
if actual == self.expected:
return True
# Allow the user to control whether NaNs are considered equal to each
# other or not. The abs() calls are for compatibility with complex
# numbers.
if math.isnan(abs(self.expected)):
return self.nan_ok and math.isnan(abs(actual))
# Infinity shouldn't be approximately equal to anything but itself, but
# if there's a relative tolerance, it will be infinite and infinity
# will seem approximately equal to everything. The equal-to-itself
# case would have been short circuited above, so here we can just
# return false if the expected value is infinite. The abs() call is
# for compatibility with complex numbers.
if math.isinf(abs(self.expected)):
return False
# Return true if the two numbers are within the tolerance.
return abs(self.expected - actual) <= self.tolerance
E TypeError: unsupported operand type(s) for -: 'float' and 'NoneType'
../../.conda/envs/micasense/lib/python3.7/site-packages/_pytest/python_api.py:275: TypeError _ test_dlspresent
meta = <micasense.metadata.Metadata object at 0x7f072ab7a240>
def test_dls_present(meta):
assert meta.dls_present() == True
E assert False == True E + where False = <bound method Metadata.dls_present of <micasense.metadata.Metadata object at 0x7f072ab7a240>>() E + where <bound method Metadata.dls_present of <micasense.metadata.Metadata object at 0x7f072ab7a240>> = <micasense.metadata.Metadata object at 0x7f072ab7a240>.dls_present
tests/test_metadata.py:78: AssertionError __ test_metadata_size __
meta = <micasense.metadata.Metadata object at 0x7f072ad1fbe0>
def test_metadata_size(meta):
assert meta.size('XMP:RadiometricCalibration') == 3
E AssertionError: assert 0 == 3 E + where 0 = <bound method Metadata.size of <micasense.metadata.Metadata object at 0x7f072ad1fbe0>>('XMP:RadiometricCalibration') E + where <bound method Metadata.size of <micasense.metadata.Metadata object at 0x7f072ad1fbe0>> = <micasense.metadata.Metadata object at 0x7f072ad1fbe0>.size
tests/test_metadata.py:81: AssertionError ____ test_center_wavelength ____
meta = <micasense.metadata.Metadata object at 0x7f072acf29b0>
def test_center_wavelength(meta):
assert meta.center_wavelength() == 475
E assert None == 475 E + where None = <bound method Metadata.center_wavelength of <micasense.metadata.Metadata object at 0x7f072acf29b0>>() E + where <bound method Metadata.center_wavelength of <micasense.metadata.Metadata object at 0x7f072acf29b0>> = <micasense.metadata.Metadata object at 0x7f072acf29b0>.center_wavelength
tests/testmetadata.py:84: AssertionError ____ test_vignettecenter ____
meta = <micasense.metadata.Metadata object at 0x7f072ac5d4a8>
def test_vignette_center(meta):
assert meta.vignette_center() == pytest.approx([676.703, 480.445], abs=0.001)
E assert [] == approx([676.703 ± 1.0e-03, 480.445 ± 1.0e-03]) E + where [] = <bound method Metadata.vignette_center of <micasense.metadata.Metadata object at 0x7f072ac5d4a8>>() E + where <bound method Metadata.vignette_center of <micasense.metadata.Metadata object at 0x7f072ac5d4a8>> = <micasense.metadata.Metadata object at 0x7f072ac5d4a8>.vignette_center E + and approx([676.703 ± 1.0e-03, 480.445 ± 1.0e-03]) = <function approx at 0x7f073bb63bf8>([676.703, 480.445], abs=0.001) E + where <function approx at 0x7f073bb63bf8> = pytest.approx
tests/test_metadata.py:87: AssertionError _ test_vignettepolynomial
meta = <micasense.metadata.Metadata object at 0x7f072ac8b3c8>
def test_vignette_polynomial(meta):
expected_poly = [-3.188190987533484e-05, 1.1380741452056501e-07, -2.7776829778142425e-09, 9.981184981301047e-12, -1.4703936738578638e-14, 7.334097230810222e-18]
assert meta.vignette_polynomial() == pytest.approx(expected_poly, rel=0.001)
E assert [] == approx([-3.188190987533484e-05 ± 3.2e-08, 1.1380741452056501e-07 ± 1.1e-10, -2.7776829778142425e-09 ± 2.8e-12, 9.981184981301047e-12 ± 1.0e-12, -1.4703936738578638e-14 ± 1.0e-12, 7.334097230810222e-18 ± 1.0e-12]) E + where [] = <bound method Metadata.vignette_polynomial of <micasense.metadata.Metadata object at 0x7f072ac8b3c8>>() E + where <bound method Metadata.vignette_polynomial of <micasense.metadata.Metadata object at 0x7f072ac8b3c8>> = <micasense.metadata.Metadata object at 0x7f072ac8b3c8>.vignette_polynomial E + and approx([-3.188190987533484e-05 ± 3.2e-08, 1.1380741452056501e-07 ± 1.1e-10, -2.7776829778142425e-09 ± 2.8e-12, 9.981184981301047e-12 ± 1.0e-12, -1.4703936738578638e-14 ± 1.0e-12, 7.334097230810222e-18 ± 1.0e-12]) = <function approx at 0x7f073bb63bf8>([-3.188190987533484e-05, 1.1380741452056501e-07, -2.7776829778142425e-09, 9.981184981301047e-12, -1.4703936738578638e-14, 7.334097230810222e-18], rel=0.001) E + where <function approx at 0x7f073bb63bf8> = pytest.approx
tests/test_metadata.py:91: AssertionError _ test_principal_point_mm __
meta = <micasense.metadata.Metadata object at 0x7f072ab26438>
def test_principal_point_mm(meta):
assert meta.principal_point() == pytest.approx([2.35363, 1.79947])
tests/test_metadata.py:94:
self = <micasense.metadata.Metadata object at 0x7f072ab26438>
def principal_point(self):
return [float(item) for item in self.get_item('XMP:PrincipalPoint').split(',')]
E AttributeError: 'NoneType' object has no attribute 'split'
micasense/metadata.py:243: AttributeError __ test_distortion_parameters __
meta = <micasense.metadata.Metadata object at 0x7f072ab4e278>
def test_distortion_parameters(meta):
expected_params = [-0.09679655532374383, 0.14041893470790068, -0.022980842634993275, 0.0002758383774216635, 0.0006600729536460939]
assert meta.distortion_parameters() == pytest.approx(expected_params, rel=0.001)
E assert [] == approx([-0.09679655532374383 ± 9.7e-05, 0.14041893470790068 ± 1.4e-04, -0.022980842634993275 ± 2.3e-05, 0.0002758383774216635 ± 2.8e-07, 0.0006600729536460939 ± 6.6e-07]) E + where [] = <bound method Metadata.distortion_parameters of <micasense.metadata.Metadata object at 0x7f072ab4e278>>() E + where <bound method Metadata.distortion_parameters of <micasense.metadata.Metadata object at 0x7f072ab4e278>> = <micasense.metadata.Metadata object at 0x7f072ab4e278>.distortion_parameters E + and approx([-0.09679655532374383 ± 9.7e-05, 0.14041893470790068 ± 1.4e-04, -0.022980842634993275 ± 2.3e-05, 0.0002758383774216635 ± 2.8e-07, 0.0006600729536460939 ± 6.6e-07]) = <function approx at 0x7f073bb63bf8>([-0.09679655532374383, 0.14041893470790068, -0.022980842634993275, 0.0002758383774216635, 0.0006600729536460939], rel=0.001) E + where <function approx at 0x7f073bb63bf8> = pytest.approx
tests/testmetadata.py:98: AssertionError ____ test_bits_per_pixel __
meta = <micasense.metadata.Metadata object at 0x7f072a9f2f28>
def test_bits_per_pixel(meta):
assert meta.bits_per_pixel() == 16
E assert None == 16 E + where None = <bound method Metadata.bits_per_pixel of <micasense.metadata.Metadata object at 0x7f072a9f2f28>>() E + where <bound method Metadata.bits_per_pixel of <micasense.metadata.Metadata object at 0x7f072a9f2f28>> = <micasense.metadata.Metadata object at 0x7f072a9f2f28>.bits_per_pixel
tests/test_metadata.py:101: AssertionError _ test_darkpixels
meta = <micasense.metadata.Metadata object at 0x7f072ab42e48>
def test_dark_pixels(meta):
assert meta.dark_pixels() == pytest.approx(5071.5)
tests/test_metadata.py:104:
self = <micasense.metadata.Metadata object at 0x7f072ab42e48>
def dark_pixels(self):
''' get the average of the optically covered pixel values
Note: these pixels are raw, and have not been radiometrically
corrected. Use the black_level() method for all
radiomentric calibrations '''
dark_pixels = self.get_item('XMP:DarkRowValue')
total = 0.0
num = len(dark_pixels)
E TypeError: object of type 'NoneType' has no len()
micasense/metadata.py:219: TypeError __ test_gain ___
meta = <micasense.metadata.Metadata object at 0x7f072accb080>
def test_gain(meta):
assert meta.gain() == 1
tests/test_metadata.py:107:
self = <micasense.metadata.Metadata object at 0x7f072accb080>
def gain(self):
return self.get_item('EXIF:ISOSpeed')/100.0
E TypeError: unsupported operand type(s) for /: 'NoneType' and 'float'
micasense/metadata.py:187: TypeError ____ test_firmwareversion ____
meta = <micasense.metadata.Metadata object at 0x7f072abbc2e8>
def test_firmware_version(meta):
assert meta.firmware_version() == "v2.1.2-34-g05e37eb-local"
E AssertionError: assert None == 'v2.1.2-34-g05e37eb-local' E + where None = <bound method Metadata.firmware_version of <micasense.metadata.Metadata object at 0x7f072abbc2e8>>() E + where <bound method Metadata.firmware_version of <micasense.metadata.Metadata object at 0x7f072abbc2e8>> = <micasense.metadata.Metadata object at 0x7f072abbc2e8>.firmware_version
tests/test_metadata.py:110: AssertionError ___ test_firmware_version_v3 ___
meta_v3 = <micasense.metadata.Metadata object at 0x7f072ab39da0>
def test_firmware_version_v3(meta_v3):
assert meta_v3.firmware_version() == "v3.3.0"
E AssertionError: assert None == 'v3.3.0' E + where None = <bound method Metadata.firmware_version of <micasense.metadata.Metadata object at 0x7f072ab39da0>>() E + where <bound method Metadata.firmware_version of <micasense.metadata.Metadata object at 0x7f072ab39da0>> = <micasense.metadata.Metadata object at 0x7f072ab39da0>.firmware_version
tests/testmetadata.py:113: AssertionError ____ test_dls_irradiance __
meta = <micasense.metadata.Metadata object at 0x7f072ad100f0>
def test_dls_irradiance(meta):
assert meta.spectral_irradiance() == pytest.approx(1.0848, abs=0.0001)
E assert 0.0 == 1.0848 ± 1.0e-04 E + where 0.0 = <bound method Metadata.spectral_irradiance of <micasense.metadata.Metadata object at 0x7f072ad100f0>>() E + where <bound method Metadata.spectral_irradiance of <micasense.metadata.Metadata object at 0x7f072ad100f0>> = <micasense.metadata.Metadata object at 0x7f072ad100f0>.spectral_irradiance E + and 1.0848 ± 1.0e-04 = <function approx at 0x7f073bb63bf8>(1.0848, abs=0.0001) E + where <function approx at 0x7f073bb63bf8> = pytest.approx
tests/test_metadata.py:116: AssertionError ____ test_dlspose ____
meta = <micasense.metadata.Metadata object at 0x7f072ab688d0>
def test_dls_pose(meta):
assert meta.dls_pose() == pytest.approx((-3.070, -0.188, -0.013), abs=0.001)
E assert (0.0, 0.0, 0.0) == approx((-3.07 ± 1.0e-03, -0.188 ± 1.0e-03, -0.013 ± 1.0e-03)) E + where (0.0, 0.0, 0.0) = <bound method Metadata.dls_pose of <micasense.metadata.Metadata object at 0x7f072ab688d0>>() E + where <bound method Metadata.dls_pose of <micasense.metadata.Metadata object at 0x7f072ab688d0>> = <micasense.metadata.Metadata object at 0x7f072ab688d0>.dls_pose E + and approx((-3.07 ± 1.0e-03, -0.188 ± 1.0e-03, -0.013 ± 1.0e-03)) = <function approx at 0x7f073bb63bf8>((-3.07, -0.188, -0.013), abs=0.001) E + where <function approx at 0x7f073bb63bf8> = pytest.approx
tests/test_metadata.py:119: AssertionError __ test_good_exposure __
meta = <micasense.metadata.Metadata object at 0x7f072abc7400>
def test_good_exposure(meta):
assert meta.exposure() == pytest.approx(0.0004725)
tests/test_metadata.py:122:
self = <micasense.metadata.Metadata object at 0x7f072abc7400>
def exposure(self):
exp = self.get_item('EXIF:ExposureTime')
# correct for incorrect exposure in some legacy RedEdge firmware versions
if self.camera_model() != "Altum":
if math.fabs(exp-(1.0/6329.0)) < 1e-6:
E TypeError: unsupported operand type(s) for -: 'NoneType' and 'float'
micasense/metadata.py:182: TypeError ____ test_good_exposurev3 ____
meta_v3 = <micasense.metadata.Metadata object at 0x7f072ad04898>
def test_good_exposure_v3(meta_v3):
assert meta_v3.exposure() == pytest.approx(0.00171)
tests/test_metadata.py:125:
self = <micasense.metadata.Metadata object at 0x7f072ad04898>
def exposure(self):
exp = self.get_item('EXIF:ExposureTime')
# correct for incorrect exposure in some legacy RedEdge firmware versions
if self.camera_model() != "Altum":
if math.fabs(exp-(1.0/6329.0)) < 1e-6:
E TypeError: unsupported operand type(s) for -: 'NoneType' and 'float'
micasense/metadata.py:182: TypeError ____ test_bad_exposure_time ____
meta_bad_exposure = <micasense.metadata.Metadata object at 0x7f072a9f2828>
def test_bad_exposure_time(meta_bad_exposure):
assert meta_bad_exposure.exposure() == pytest.approx(247e-6, abs=1e-3)
tests/test_metadata.py:128:
self = <micasense.metadata.Metadata object at 0x7f072a9f2828>
def exposure(self):
exp = self.get_item('EXIF:ExposureTime')
# correct for incorrect exposure in some legacy RedEdge firmware versions
if self.camera_model() != "Altum":
if math.fabs(exp-(1.0/6329.0)) < 1e-6:
E TypeError: unsupported operand type(s) for -: 'NoneType' and 'float'
micasense/metadata.py:182: TypeError ____ test_dls_presentdls2 ____
meta_altum_dls2 = <micasense.metadata.Metadata object at 0x7f072ac74e80>
def test_dls_present_dls2(meta_altum_dls2):
assert meta_altum_dls2.dls_present() == True
E assert False == True E + where False = <bound method Metadata.dls_present of <micasense.metadata.Metadata object at 0x7f072ac74e80>>() E + where <bound method Metadata.dls_present of <micasense.metadata.Metadata object at 0x7f072ac74e80>> = <micasense.metadata.Metadata object at 0x7f072ac74e80>.dls_present
tests/test_metadata.py:134: AssertionError ____ test_dls2_scale_factor ____
meta_altum_dls2 = <micasense.metadata.Metadata object at 0x7f072abaaf60>
def test_dls2_scale_factor(meta_altum_dls2):
assert meta_altum_dls2.irradiance_scale_factor() == pytest.approx(0.01)
E assert 1.0 == 0.01 ± 1.0e-08 E + where 1.0 = <bound method Metadata.irradiance_scale_factor of <micasense.metadata.Metadata object at 0x7f072abaaf60>>() E + where <bound method Metadata.irradiance_scale_factor of <micasense.metadata.Metadata object at 0x7f072abaaf60>> = <micasense.metadata.Metadata object at 0x7f072abaaf60>.irradiance_scale_factor E + and 0.01 ± 1.0e-08 = <function approx at 0x7f073bb63bf8>(0.01) E + where <function approx at 0x7f073bb63bf8> = pytest.approx
tests/test_metadata.py:137: AssertionError ____ test_horizontal_irradiance_valid_altum ____
meta_altum_dls2 = <micasense.metadata.Metadata object at 0x7f072ab583c8>
def test_horizontal_irradiance_valid_altum(meta_altum_dls2):
assert meta_altum_dls2.horizontal_irradiance_valid() == True
E assert False == True E + where False = <bound method Metadata.horizontal_irradiance_valid of <micasense.metadata.Metadata object at 0x7f072ab583c8>>() E + where <bound method Metadata.horizontal_irradiance_valid of <micasense.metadata.Metadata object at 0x7f072ab583c8>> = <micasense.metadata.Metadata object at 0x7f072ab583c8>.horizontal_irradiance_valid
tests/test_metadata.py:143: AssertionError ___ test_qr_corners ____
panel_image_name = 'data/0000SET/000/IMG_0000_1.tif'
def test_qr_corners(panel_image_name):
img = image.Image(panel_image_name)
tests/test_panel.py:33:
self = <micasense.image.Image object at 0x7f072ab31a90>, image_path = 'data/0000SET/000/IMG_0000_1.tif', exiftool_obj = None
def __init__(self, image_path, exiftool_obj=None):
#print(image_path)
if not os.path.isfile(image_path):
raise IOError("Provided path is not a file: {}".format(imanon_panel_rededge_file_listge_path))
self.path = image_path
self.meta = metadata.Metadata(self.path, exiftool_obj=exiftool_obj)
if self.meta.band_name() is None:
raise ValueError("Provided file path does not have a band name: {}".format(image_path))
E ValueError: Provided file path does not have a band name: data/0000SET/000/IMG_0000_1.tif
micasense/image.py:73: ValueError __ test_panel_corners __
panel_image_name = 'data/0000SET/000/IMG_0000_1.tif'
def test_panel_corners(panel_image_name):
img = image.Image(panel_image_name)
tests/test_panel.py:46:
self = <micasense.image.Image object at 0x7f072abbb080>, image_path = 'data/0000SET/000/IMG_0000_1.tif', exiftool_obj = None
def __init__(self, image_path, exiftool_obj=None):
#print(image_path)
if not os.path.isfile(image_path):
raise IOError("Provided path is not a file: {}".format(imanon_panel_rededge_file_listge_path))
self.path = image_path
self.meta = metadata.Metadata(self.path, exiftool_obj=exiftool_obj)
if self.meta.band_name() is None:
raise ValueError("Provided file path does not have a band name: {}".format(image_path))
E ValueError: Provided file path does not have a band name: data/0000SET/000/IMG_0000_1.tif
micasense/image.py:73: ValueError __ test_raw_panel_bad_corners __
panel_image_name = 'data/0000SET/000/IMG_0000_1.tif'
def test_raw_panel_bad_corners(panel_image_name):
img = image.Image(panel_image_name)
tests/test_panel.py:60:
self = <micasense.image.Image object at 0x7f072acee5c0>, image_path = 'data/0000SET/000/IMG_0000_1.tif', exiftool_obj = None
def __init__(self, image_path, exiftool_obj=None):
#print(image_path)
if not os.path.isfile(image_path):
raise IOError("Provided path is not a file: {}".format(imanon_panel_rededge_file_listge_path))
self.path = image_path
self.meta = metadata.Metadata(self.path, exiftool_obj=exiftool_obj)
if self.meta.band_name() is None:
raise ValueError("Provided file path does not have a band name: {}".format(image_path))
E ValueError: Provided file path does not have a band name: data/0000SET/000/IMG_0000_1.tif
micasense/image.py:73: ValueError ____ test_raw_panelmanual ____
panel_image_name = 'data/0000SET/000/IMG_0000_1.tif'
def test_raw_panel_manual(panel_image_name):
img = image.Image(panel_image_name)
tests/test_panel.py:70:
self = <micasense.image.Image object at 0x7f072ac7e9e8>, image_path = 'data/0000SET/000/IMG_0000_1.tif', exiftool_obj = None
def __init__(self, image_path, exiftool_obj=None):
#print(image_path)
if not os.path.isfile(image_path):
raise IOError("Provided path is not a file: {}".format(imanon_panel_rededge_file_listge_path))
self.path = image_path
self.meta = metadata.Metadata(self.path, exiftool_obj=exiftool_obj)
if self.meta.band_name() is None:
raise ValueError("Provided file path does not have a band name: {}".format(image_path))
E ValueError: Provided file path does not have a band name: data/0000SET/000/IMG_0000_1.tif
micasense/image.py:73: ValueError ____ test_raw_panel ____
panel_image_name = 'data/0000SET/000/IMG_0000_1.tif'
def test_raw_panel(panel_image_name):
img = image.Image(panel_image_name)
tests/test_panel.py:79:
self = <micasense.image.Image object at 0x7f072ac73668>, image_path = 'data/0000SET/000/IMG_0000_1.tif', exiftool_obj = None
def __init__(self, image_path, exiftool_obj=None):
#print(image_path)
if not os.path.isfile(image_path):
raise IOError("Provided path is not a file: {}".format(imanon_panel_rededge_file_listge_path))
self.path = image_path
self.meta = metadata.Metadata(self.path, exiftool_obj=exiftool_obj)
if self.meta.band_name() is None:
raise ValueError("Provided file path does not have a band name: {}".format(image_path))
E ValueError: Provided file path does not have a band name: data/0000SET/000/IMG_0000_1.tif
micasense/image.py:73: ValueError _ test_intensitypanel
panel_image_name = 'data/0000SET/000/IMG_0000_1.tif'
def test_intensity_panel(panel_image_name):
img = image.Image(panel_image_name)
tests/test_panel.py:88:
self = <micasense.image.Image object at 0x7f072ad99668>, image_path = 'data/0000SET/000/IMG_0000_1.tif', exiftool_obj = None
def __init__(self, image_path, exiftool_obj=None):
#print(image_path)
if not os.path.isfile(image_path):
raise IOError("Provided path is not a file: {}".format(imanon_panel_rededge_file_listge_path))
self.path = image_path
self.meta = metadata.Metadata(self.path, exiftool_obj=exiftool_obj)
if self.meta.band_name() is None:
raise ValueError("Provided file path does not have a band name: {}".format(image_path))
E ValueError: Provided file path does not have a band name: data/0000SET/000/IMG_0000_1.tif
micasense/image.py:73: ValueError _____ test_radiance_panel __
panel_image_name = 'data/0000SET/000/IMG_0000_1.tif'
def test_radiance_panel(panel_image_name):
img = image.Image(panel_image_name)
tests/test_panel.py:97:
self = <micasense.image.Image object at 0x7f072acc7710>, image_path = 'data/0000SET/000/IMG_0000_1.tif', exiftool_obj = None
def __init__(self, image_path, exiftool_obj=None):
#print(image_path)
if not os.path.isfile(image_path):
raise IOError("Provided path is not a file: {}".format(imanon_panel_rededge_file_listge_path))
self.path = image_path
self.meta = metadata.Metadata(self.path, exiftool_obj=exiftool_obj)
if self.meta.band_name() is None:
raise ValueError("Provided file path does not have a band name: {}".format(image_path))
E ValueError: Provided file path does not have a band name: data/0000SET/000/IMG_0000_1.tif
micasense/image.py:73: ValueError _ test_irradiancemean
panel_image_name = 'data/0000SET/000/IMG_0000_1.tif'
def test_irradiance_mean(panel_image_name):
img = image.Image(panel_image_name)
tests/test_panel.py:106:
self = <micasense.image.Image object at 0x7f072ab267f0>, image_path = 'data/0000SET/000/IMG_0000_1.tif', exiftool_obj = None
def __init__(self, image_path, exiftool_obj=None):
#print(image_path)
if not os.path.isfile(image_path):
raise IOError("Provided path is not a file: {}".format(imanon_panel_rededge_file_listge_path))
self.path = image_path
self.meta = metadata.Metadata(self.path, exiftool_obj=exiftool_obj)
if self.meta.band_name() is None:
raise ValueError("Provided file path does not have a band name: {}".format(image_path))
E ValueError: Provided file path does not have a band name: data/0000SET/000/IMG_0000_1.tif
micasense/image.py:73: ValueError _____ test_panel_detected __
panel_image_name = 'data/0000SET/000/IMG_0000_1.tif'
def test_panel_detected(panel_image_name):
img = image.Image(panel_image_name)
tests/test_panel.py:113:
self = <micasense.image.Image object at 0x7f072aa7cc88>, image_path = 'data/0000SET/000/IMG_0000_1.tif', exiftool_obj = None
def __init__(self, image_path, exiftool_obj=None):
#print(image_path)
if not os.path.isfile(image_path):
raise IOError("Provided path is not a file: {}".format(imanon_panel_rededge_file_listge_path))
self.path = image_path
self.meta = metadata.Metadata(self.path, exiftool_obj=exiftool_obj)
if self.meta.band_name() is None:
raise ValueError("Provided file path does not have a band name: {}".format(image_path))
E ValueError: Provided file path does not have a band name: data/0000SET/000/IMG_0000_1.tif
micasense/image.py:73: ValueError _ test_panel_not_detected __
flight_image_name = 'data/0000SET/000/IMG_0001_1.tif'
def test_panel_not_detected(flight_image_name):
img = image.Image(flight_image_name)
tests/test_panel.py:118:
self = <micasense.image.Image object at 0x7f072ace5dd8>, image_path = 'data/0000SET/000/IMG_0001_1.tif', exiftool_obj = None
def __init__(self, image_path, exiftool_obj=None):
#print(image_path)
if not os.path.isfile(image_path):
raise IOError("Provided path is not a file: {}".format(imanon_panel_rededge_file_listge_path))
self.path = image_path
self.meta = metadata.Metadata(self.path, exiftool_obj=exiftool_obj)
if self.meta.band_name() is None:
raise ValueError("Provided file path does not have a band name: {}".format(image_path))
E ValueError: Provided file path does not have a band name: data/0000SET/000/IMG_0001_1.tif
micasense/image.py:73: ValueError ================================================================================== 67 failed, 19 passed, 41 errors in 22.88s =================================================================================== (micasense) tejasrii@winet:~/Image-ExifTool-10.98/imageprocessing$ `
Most likey you did not have git-lfs installed when cloning the repository, or the git lfs fetch failed for some reason, so the example files are not actually files but just lfs pointers.
To test run exiftool.exe on one of the files from a command prompt.
https://github.com/micasense/imageprocessing/blob/master/README.md#how-do-i-get-set-up
On Tue, Jan 7, 2020, 01:46 Tejasri Nampally notifications@github.com wrote:
@poynting https://github.com/poynting I was able to run the setup successfully. When I run 'pytest' , I'm getting several errors. Please helP
`> raise ValueError("Provided file path does not have a band name: {}".format(image_path)) E ValueError: Provided file path does not have a band name: data/ALTUM1SET/000/IMG_0008_5.tif
micasense/image.py:73: ValueError
test_altum_from_filelist
non_panel_altum_file_list = ['data/ALTUM1SET/000/IMG_0008_5.tif', 'data/ALTUM1SET/000/IMG_0008_1.tif', 'data/ALTUM1SET/000/IMG_0008_4.tif', 'data/ALTUM1SET/000/IMG_0008_3.tif', 'data/ALTUM1SET/000/IMG_0008_6.tif', 'data/ALTUM1SET/000/IMG_0008_2.tif']
def test_altum_from_filelist(non_panel_altum_file_list):
cap = capture.Capture.from_filelist(non_panel_altum_file_list)
tests/test_capture.py:178:
micasense/capture.py:97: in from_filelist images = [image.Image(fle) for fle in file_list] micasense/capture.py:97: in images = [image.Image(fle) for fle in file_list]
self = <micasense.image.Image object at 0x7f072ad1f0b8>, image_path = 'data/ALTUM1SET/000/IMG_0008_5.tif', exiftool_obj = None
def init(self, image_path, exiftool_obj=None):
#print(image_path) if not os.path.isfile(image_path): raise IOError("Provided path is not a file: {}".format(imanon_panel_rededge_file_listge_path)) self.path = image_path self.meta = metadata.Metadata(self.path, exiftool_obj=exiftool_obj) if self.meta.band_name() is None: raise ValueError("Provided file path does not have a band name: {}".format(image_path))
E ValueError: Provided file path does not have a band name: data/ALTUM1SET/000/IMG_0008_5.tif
micasense/image.py:73: ValueError
test_altum_from_single_file
altum_flight_image_name = 'data/ALTUM1SET/000/IMG_0008_1.tif'
def test_altum_from_single_file(altum_flight_image_name):
cap = capture.Capture.from_file(altum_flight_image_name)
tests/test_capture.py:183:
micasense/capture.py:88: in from_file return cls(image.Image(file_name))
self = <micasense.image.Image object at 0x7f072ab48898>, image_path = 'data/ALTUM1SET/000/IMG_0008_1.tif', exiftool_obj = None
def init(self, image_path, exiftool_obj=None):
#print(image_path) if not os.path.isfile(image_path): raise IOError("Provided path is not a file: {}".format(imanon_panel_rededge_file_listge_path)) self.path = image_path self.meta = metadata.Metadata(self.path, exiftool_obj=exiftool_obj) if self.meta.band_name() is None: raise ValueError("Provided file path does not have a band name: {}".format(image_path))
E ValueError: Provided file path does not have a band name: data/ALTUM1SET/000/IMG_0008_1.tif
micasense/image.py:73: ValueError
test_no_rig_relatives
non_panel_rededge_file_list = ['data/0000SET/000/IMG_0001_2.tif', 'data/0000SET/000/IMG_0001_5.tif', 'data/0000SET/000/IMG_0001_4.tif', 'data/0000SET/000/IMG_0001_3.tif', 'data/0000SET/000/IMG_0001_1.tif']
def test_no_rig_relatives(non_panel_rededge_file_list):
cap = capture.Capture.from_filelist(non_panel_rededge_file_list)
tests/test_capture.py:245:
micasense/capture.py:97: in from_filelist images = [image.Image(fle) for fle in file_list] micasense/capture.py:97: in images = [image.Image(fle) for fle in file_list]
self = <micasense.image.Image object at 0x7f072ab264e0>, image_path = 'data/0000SET/000/IMG_0001_2.tif', exiftool_obj = None
def init(self, image_path, exiftool_obj=None):
#print(image_path) if not os.path.isfile(image_path): raise IOError("Provided path is not a file: {}".format(imanon_panel_rededge_file_listge_path)) self.path = image_path self.meta = metadata.Metadata(self.path, exiftool_obj=exiftool_obj) if self.meta.band_name() is None: raise ValueError("Provided file path does not have a band name: {}".format(image_path))
E ValueError: Provided file path does not have a band name: data/0000SET/000/IMG_0001_2.tif
micasense/image.py:73: ValueError
test_10_band_capture_loads
panel_10band_rededge_file_list = ['data/10BANDSET/000/IMG_0000_7.tif', 'data/10BANDSET/000/IMG_0000_5.tif', 'data/10BANDSET/000/IMG_0000_3.tif', 'data/10BANDSET/000/IMG_0000_8.tif', 'data/10BANDSET/000/IMG_0000_10.tif', 'data/10BANDSET/000/IMG_0000_9.tif', ...]
def test_10_band_capture_loads(panel_10band_rededge_file_list):
print(panel_10band_rededge_file_list)
cap = capture.Capture.from_filelist(panel_10band_rededge_file_list)
tests/test_capture.py:260:
micasense/capture.py:97: in from_filelist images = [image.Image(fle) for fle in file_list] micasense/capture.py:97: in images = [image.Image(fle) for fle in file_list]
self = <micasense.image.Image object at 0x7f072ad7a2b0>, image_path = 'data/10BANDSET/000/IMG_0000_7.tif', exiftool_obj = None
def init(self, image_path, exiftool_obj=None):
#print(image_path) if not os.path.isfile(image_path): raise IOError("Provided path is not a file: {}".format(imanon_panel_rededge_file_listge_path)) self.path = image_path self.meta = metadata.Metadata(self.path, exiftool_obj=exiftool_obj) if self.meta.band_name() is None: raise ValueError("Provided file path does not have a band name: {}".format(image_path))
E ValueError: Provided file path does not have a band name: data/10BANDSET/000/IMG_0000_7.tif
micasense/image.py:73: ValueError
Captured stdout call
['data/10BANDSET/000/IMG_0000_7.tif', 'data/10BANDSET/000/IMG_0000_5.tif', 'data/10BANDSET/000/IMG_0000_3.tif', 'data/10BANDSET/000/IMG_0000_8.tif', 'data/10BANDSET/000/IMG_0000_10.tif', 'data/10BANDSET/000/IMG_0000_9.tif', 'data/10BANDSET/000/IMG_0000_4.tif', 'data/10BANDSET/000/IMG_0000_2.tif', 'data/10BANDSET/000/IMG_0000_6.tif', 'data/10BANDSET/000/IMG_0000_1.tif']
test_10_band_panel
panel_10band_rededge_file_list = ['data/10BANDSET/000/IMG_0000_7.tif', 'data/10BANDSET/000/IMG_0000_5.tif', 'data/10BANDSET/000/IMG_0000_3.tif', 'data/10BANDSET/000/IMG_0000_8.tif', 'data/10BANDSET/000/IMG_0000_10.tif', 'data/10BANDSET/000/IMG_0000_9.tif', ...]
def test_10_band_panel(panel_10band_rededge_file_list):
cap = capture.Capture.from_filelist(panel_10band_rededge_file_list)
tests/test_capture.py:264:
micasense/capture.py:97: in from_filelist images = [image.Image(fle) for fle in file_list] micasense/capture.py:97: in images = [image.Image(fle) for fle in file_list]
self = <micasense.image.Image object at 0x7f072ad04358>, image_path = 'data/10BANDSET/000/IMG_0000_7.tif', exiftool_obj = None
def init(self, image_path, exiftool_obj=None):
#print(image_path) if not os.path.isfile(image_path): raise IOError("Provided path is not a file: {}".format(imanon_panel_rededge_file_listge_path)) self.path = image_path self.meta = metadata.Metadata(self.path, exiftool_obj=exiftool_obj) if self.meta.band_name() is None: raise ValueError("Provided file path does not have a band name: {}".format(image_path))
E ValueError: Provided file path does not have a band name: data/10BANDSET/000/IMG_0000_7.tif
micasense/image.py:73: ValueError
test_image_not_file
non_existant_file_name = 'data/ALTUM1SET/000/NOFILE.tif'
def test_image_not_file(non_existant_file_name):
with pytest.raises(OSError): image.Image(non_existant_file_name)
tests/test_image.py:101:
self = <micasense.image.Image object at 0x7f072abbb080>, image_path = 'data/ALTUM1SET/000/NOFILE.tif', exiftool_obj = None
def init(self, image_path, exiftool_obj=None):
#print(image_path) if not os.path.isfile(image_path): raise IOError("Provided path is not a file: {}".format(imanon_panel_rededge_file_listge_path))
E NameError: name 'imanon_panel_rededge_file_listge_path' is not defined
micasense/image.py:68: NameError
test_from_captures
files_dir = 'data/0000SET/000'
def test_from_captures(files_dir):
file1 = os.path.join(files_dir, 'IMG_0000_1.tif') file2 = os.path.join(files_dir, 'IMG_0001_1.tif')
cap1 = capture.Capture.from_file(file1)
tests/test_imageset.py:46:
micasense/capture.py:88: in from_file return cls(image.Image(file_name))
self = <micasense.image.Image object at 0x7f072ab2c6a0>, image_path = 'data/0000SET/000/IMG_0000_1.tif', exiftool_obj = None
def init(self, image_path, exiftool_obj=None):
#print(image_path) if not os.path.isfile(image_path): raise IOError("Provided path is not a file: {}".format(imanon_panel_rededge_file_listge_path)) self.path = image_path self.meta = metadata.Metadata(self.path, exiftool_obj=exiftool_obj) if self.meta.band_name() is None: raise ValueError("Provided file path does not have a band name: {}".format(image_path))
E ValueError: Provided file path does not have a band name: data/0000SET/000/IMG_0000_1.tif
micasense/image.py:73: ValueError
test_from_directory
files_dir = 'data/0000SET/000'
def test_from_directory(files_dir):
global progress_val progress(0.0)
imgset = imageset.ImageSet.from_directory(files_dir, progress)
tests/test_imageset.py:54:
micasense/imageset.py:68: in from_directory images.append(image.Image(path, exiftool_obj=exift))
self = <micasense.image.Image object at 0x7f072ab9dd68>, image_path = 'data/0000SET/000/IMG_0001_2.tif', exiftool_obj = <exiftool.ExifTool object at 0x7f072ab9d1d0>
def init(self, image_path, exiftool_obj=None):
#print(image_path) if not os.path.isfile(image_path): raise IOError("Provided path is not a file: {}".format(imanon_panel_rededge_file_listge_path)) self.path = image_path self.meta = metadata.Metadata(self.path, exiftool_obj=exiftool_obj) if self.meta.band_name() is None: raise ValueError("Provided file path does not have a band name: {}".format(image_path))
E ValueError: Provided file path does not have a band name: data/0000SET/000/IMG_0001_2.tif
micasense/image.py:73: ValueError
test_as_nested_lists
files_dir = 'data/0000SET/000'
def test_as_nested_lists(files_dir):
imgset = imageset.ImageSet.from_directory(files_dir)
tests/test_imageset.py:60:
micasense/imageset.py:68: in from_directory images.append(image.Image(path, exiftool_obj=exift))
self = <micasense.image.Image object at 0x7f072ad17dd8>, image_path = 'data/0000SET/000/IMG_0001_2.tif', exiftool_obj = <exiftool.ExifTool object at 0x7f072ad17438>
def init(self, image_path, exiftool_obj=None):
#print(image_path) if not os.path.isfile(image_path): raise IOError("Provided path is not a file: {}".format(imanon_panel_rededge_file_listge_path)) self.path = image_path self.meta = metadata.Metadata(self.path, exiftool_obj=exiftool_obj) if self.meta.band_name() is None: raise ValueError("Provided file path does not have a band name: {}".format(image_path))
E ValueError: Provided file path does not have a band name: data/0000SET/000/IMG_0001_2.tif
micasense/image.py:73: ValueError
test_10_band_from_dir
ten_band_files_dir = 'data/10BANDSET/000'
def test_10_band_from_dir(ten_band_files_dir):
imgset = imageset.ImageSet.from_directory(ten_band_files_dir, progress)
tests/test_imageset.py:67:
micasense/imageset.py:68: in from_directory images.append(image.Image(path, exiftool_obj=exift))
self = <micasense.image.Image object at 0x7f072ab4e6d8>, image_path = 'data/10BANDSET/000/IMG_0431_9.tif', exiftool_obj = <exiftool.ExifTool object at 0x7f072ab4e390>
def init(self, image_path, exiftool_obj=None):
#print(image_path) if not os.path.isfile(image_path): raise IOError("Provided path is not a file: {}".format(imanon_panel_rededge_file_listge_path)) self.path = image_path self.meta = metadata.Metadata(self.path, exiftool_obj=exiftool_obj) if self.meta.band_name() is None: raise ValueError("Provided file path does not have a band name: {}".format(image_path))
E ValueError: Provided file path does not have a band name: data/10BANDSET/000/IMG_0431_9.tif
micasense/image.py:73: ValueError
test_band_index
meta = <micasense.metadata.Metadata object at 0x7f072ac749b0>
def test_band_index(meta):
assert meta.band_index() == 0
E assert None == 0 E + where None = <bound method Metadata.band_index of <micasense.metadata.Metadata object at 0x7f072ac749b0>>() E + where <bound method Metadata.band_index of <micasense.metadata.Metadata object at 0x7f072ac749b0>> = <micasense.metadata.Metadata object at 0x7f072ac749b0>.band_index
tests/test_metadata.py:35: AssertionError
test_camera_make
meta = <micasense.metadata.Metadata object at 0x7f072acee860>
def test_camera_make(meta):
assert meta.camera_make() == 'MicaSense'
E AssertionError: assert None == 'MicaSense' E + where None = <bound method Metadata.camera_make of <micasense.metadata.Metadata object at 0x7f072acee860>>() E + where <bound method Metadata.camera_make of <micasense.metadata.Metadata object at 0x7f072acee860>> = <micasense.metadata.Metadata object at 0x7f072acee860>.camera_make
tests/test_metadata.py:38: AssertionError
test_camera_model
meta = <micasense.metadata.Metadata object at 0x7f072ad1f7b8>
def test_camera_model(meta):
assert meta.camera_model() == 'RedEdge'
E AssertionError: assert None == 'RedEdge' E + where None = <bound method Metadata.camera_model of <micasense.metadata.Metadata object at 0x7f072ad1f7b8>>() E + where <bound method Metadata.camera_model of <micasense.metadata.Metadata object at 0x7f072ad1f7b8>> = <micasense.metadata.Metadata object at 0x7f072ad1f7b8>.camera_model
tests/test_metadata.py:41: AssertionError
test_flight_id
meta = <micasense.metadata.Metadata object at 0x7f072ab7a6d8>
def test_flight_id(meta):
assert meta.flight_id() == 'NtLNbVIdowuCaWYbg3ck'
E AssertionError: assert None == 'NtLNbVIdowuCaWYbg3ck' E + where None = <bound method Metadata.flight_id of <micasense.metadata.Metadata object at 0x7f072ab7a6d8>>() E + where <bound method Metadata.flight_id of <micasense.metadata.Metadata object at 0x7f072ab7a6d8>> = <micasense.metadata.Metadata object at 0x7f072ab7a6d8>.flight_id
tests/test_metadata.py:44: AssertionError
test_capture_id
meta = <micasense.metadata.Metadata object at 0x7f072ad044e0>
def test_capture_id(meta):
assert meta.capture_id() == '5v25BtsZg3BQBhVH7Iaz'
E AssertionError: assert None == '5v25BtsZg3BQBhVH7Iaz' E + where None = <bound method Metadata.capture_id of <micasense.metadata.Metadata object at 0x7f072ad044e0>>() E + where <bound method Metadata.capture_id of <micasense.metadata.Metadata object at 0x7f072ad044e0>> = <micasense.metadata.Metadata object at 0x7f072ad044e0>.capture_id
tests/test_metadata.py:47: AssertionError
test_black_level
meta = <micasense.metadata.Metadata object at 0x7f072ab26a90>
def test_black_level(meta):
assert meta.black_level() == 4800.0
E assert 0 == 4800.0 E + where 0 = <bound method Metadata.black_level of <micasense.metadata.Metadata object at 0x7f072ab26a90>>() E + where <bound method Metadata.black_level of <micasense.metadata.Metadata object at 0x7f072ab26a90>> = <micasense.metadata.Metadata object at 0x7f072ab26a90>.black_level
tests/test_metadata.py:50: AssertionError
test_focal_length_mm
meta = <micasense.metadata.Metadata object at 0x7f072ab68da0>
def test_focal_length_mm(meta):
assert meta.focal_length_mm() == pytest.approx(5.43509341)
tests/test_metadata.py:53:
self = <micasense.metadata.Metadata object at 0x7f072ab68da0>
def focal_length_mm(self):
units = self.get_item('XMP:PerspectiveFocalLengthUnits') focal_length_mm = 0.0 if units == 'mm': focal_length_mm = float(self.get_item('XMP:PerspectiveFocalLength')) else: focal_length_px = float(self.get_item('XMP:PerspectiveFocalLength'))
E TypeError: float() argument must be a string or a number, not 'NoneType'
micasense/metadata.py:256: TypeError
test_focal_length_mm_v3
meta_v3 = <micasense.metadata.Metadata object at 0x7f072ac95e10>
def test_focal_length_mm_v3(meta_v3):
assert meta_v3.focal_length_mm() == pytest.approx(5.45221099)
tests/test_metadata.py:56:
self = <micasense.metadata.Metadata object at 0x7f072ac95e10>
def focal_length_mm(self):
units = self.get_item('XMP:PerspectiveFocalLengthUnits') focal_length_mm = 0.0 if units == 'mm': focal_length_mm = float(self.get_item('XMP:PerspectiveFocalLength')) else: focal_length_px = float(self.get_item('XMP:PerspectiveFocalLength'))
E TypeError: float() argument must be a string or a number, not 'NoneType'
micasense/metadata.py:256: TypeError
test_fp_resolution
meta = <micasense.metadata.Metadata object at 0x7f072ab23eb8>
def test_fp_resolution(meta):
assert meta.focal_plane_resolution_px_per_mm() == pytest.approx([266.666667,266.666667])
tests/test_metadata.py:59:
self = <micasense.metadata.Metadata object at 0x7f072ab23eb8>
def focal_plane_resolution_px_per_mm(self):
fp_x_resolution = float(self.get_item('EXIF:FocalPlaneXResolution'))
E TypeError: float() argument must be a string or a number, not 'NoneType'
micasense/metadata.py:246: TypeError
test_fp_resolution_v3
meta_v3 = <micasense.metadata.Metadata object at 0x7f072acf2eb8>
def test_fp_resolution_v3(meta_v3):
assert meta_v3.focal_plane_resolution_px_per_mm() == pytest.approx([266.666667,266.666667])
tests/test_metadata.py:62:
self = <micasense.metadata.Metadata object at 0x7f072acf2eb8>
def focal_plane_resolution_px_per_mm(self):
fp_x_resolution = float(self.get_item('EXIF:FocalPlaneXResolution'))
E TypeError: float() argument must be a string or a number, not 'NoneType'
micasense/metadata.py:246: TypeError
test_utc_time
meta = <micasense.metadata.Metadata object at 0x7f072ab39cf8>
def test_utc_time(meta):
utc_time = meta.utc_time()
tests/test_metadata.py:65:
self = <micasense.metadata.Metadata object at 0x7f072ab39cf8>
def utc_time(self):
''' Get the timezone-aware datetime of the image capture ''' str_time = self.get_item('EXIF:DateTimeOriginal')
utc_time = datetime.strptime(str_time, "%Y:%m:%d %H:%M:%S")
E TypeError: strptime() argument 1 must be str, not None
micasense/metadata.py:126: TypeError
test_utc_time_v3
meta_v3 = <micasense.metadata.Metadata object at 0x7f072ac959b0>
def test_utc_time_v3(meta_v3):
utc_time = meta_v3.utc_time()
tests/test_metadata.py:70:
self = <micasense.metadata.Metadata object at 0x7f072ac959b0>
def utc_time(self):
''' Get the timezone-aware datetime of the image capture ''' str_time = self.get_item('EXIF:DateTimeOriginal')
utc_time = datetime.strptime(str_time, "%Y:%m:%d %H:%M:%S")
E TypeError: strptime() argument 1 must be str, not None
micasense/metadata.py:126: TypeError
test_position
meta = <micasense.metadata.Metadata object at 0x7f072ab9d6a0>
def test_position(meta):
assert meta.position() == pytest.approx((36.576096, -119.4352689, 101.861))
tests/test_metadata.py:75:
../../.conda/envs/micasense/lib/python3.7/site-packages/_pytest/python_api.py:196: in eq return ApproxBase.eq(self, actual) ../../.conda/envs/micasense/lib/python3.7/site-packages/_pytest/python_api.py:70: in eq a == self._approx_scalar(x) for a, x in self._yield_comparisons(actual) ../../.conda/envs/micasense/lib/python3.7/site-packages/_pytest/python_api.py:70: in a == self._approx_scalar(x) for a, x in self._yield_comparisons(actual)
self = 36.576096 ± 3.7e-05, actual = None
def eq(self, actual):
""" Return true if the given value is equal to the expected value within the pre-specified tolerance. """ if _is_numpy_array(actual): # Call ``__eq__()`` manually to prevent infinite-recursion with # numpy<1.13. See #3748. return all(self.__eq__(a) for a in actual.flat) # Short-circuit exact equality. if actual == self.expected: return True # Allow the user to control whether NaNs are considered equal to each # other or not. The abs() calls are for compatibility with complex # numbers. if math.isnan(abs(self.expected)): return self.nan_ok and math.isnan(abs(actual)) # Infinity shouldn't be approximately equal to anything but itself, but # if there's a relative tolerance, it will be infinite and infinity # will seem approximately equal to everything. The equal-to-itself # case would have been short circuited above, so here we can just # return false if the expected value is infinite. The abs() call is # for compatibility with complex numbers. if math.isinf(abs(self.expected)): return False # Return true if the two numbers are within the tolerance.
return abs(self.expected - actual) <= self.tolerance
E TypeError: unsupported operand type(s) for -: 'float' and 'NoneType'
../../.conda/envs/micasense/lib/python3.7/site-packages/_pytest/python_api.py:275: TypeError
test_dls_present
meta = <micasense.metadata.Metadata object at 0x7f072ab7a240>
def test_dls_present(meta):
assert meta.dls_present() == True
E assert False == True E + where False = <bound method Metadata.dls_present of <micasense.metadata.Metadata object at 0x7f072ab7a240>>() E + where <bound method Metadata.dls_present of <micasense.metadata.Metadata object at 0x7f072ab7a240>> = <micasense.metadata.Metadata object at 0x7f072ab7a240>.dls_present
tests/test_metadata.py:78: AssertionError
test_metadata_size
meta = <micasense.metadata.Metadata object at 0x7f072ad1fbe0>
def test_metadata_size(meta):
assert meta.size('XMP:RadiometricCalibration') == 3
E AssertionError: assert 0 == 3 E + where 0 = <bound method Metadata.size of <micasense.metadata.Metadata object at 0x7f072ad1fbe0>>('XMP:RadiometricCalibration') E + where <bound method Metadata.size of <micasense.metadata.Metadata object at 0x7f072ad1fbe0>> = <micasense.metadata.Metadata object at 0x7f072ad1fbe0>.size
tests/test_metadata.py:81: AssertionError
test_center_wavelength
meta = <micasense.metadata.Metadata object at 0x7f072acf29b0>
def test_center_wavelength(meta):
assert meta.center_wavelength() == 475
E assert None == 475 E + where None = <bound method Metadata.center_wavelength of <micasense.metadata.Metadata object at 0x7f072acf29b0>>() E + where <bound method Metadata.center_wavelength of <micasense.metadata.Metadata object at 0x7f072acf29b0>> = <micasense.metadata.Metadata object at 0x7f072acf29b0>.center_wavelength
tests/test_metadata.py:84: AssertionError
test_vignette_center
meta = <micasense.metadata.Metadata object at 0x7f072ac5d4a8>
def test_vignette_center(meta):
assert meta.vignette_center() == pytest.approx([676.703, 480.445], abs=0.001)
E assert [] == approx([676.703 ± 1.0e-03, 480.445 ± 1.0e-03]) E + where [] = <bound method Metadata.vignette_center of <micasense.metadata.Metadata object at 0x7f072ac5d4a8>>() E + where <bound method Metadata.vignette_center of <micasense.metadata.Metadata object at 0x7f072ac5d4a8>> = <micasense.metadata.Metadata object at 0x7f072ac5d4a8>.vignette_center E + and approx([676.703 ± 1.0e-03, 480.445 ± 1.0e-03]) = <function approx at 0x7f073bb63bf8>([676.703, 480.445], abs=0.001) E + where <function approx at 0x7f073bb63bf8> = pytest.approx
tests/test_metadata.py:87: AssertionError
test_vignette_polynomial
meta = <micasense.metadata.Metadata object at 0x7f072ac8b3c8>
def test_vignette_polynomial(meta):
expected_poly = [-3.188190987533484e-05, 1.1380741452056501e-07, -2.7776829778142425e-09, 9.981184981301047e-12, -1.4703936738578638e-14, 7.334097230810222e-18]
assert meta.vignette_polynomial() == pytest.approx(expected_poly, rel=0.001)
E assert [] == approx([-3.188190987533484e-05 ± 3.2e-08, 1.1380741452056501e-07 ± 1.1e-10, -2.7776829778142425e-09 ± 2.8e-12, 9.981184981301047e-12 ± 1.0e-12, -1.4703936738578638e-14 ± 1.0e-12, 7.334097230810222e-18 ± 1.0e-12]) E + where [] = <bound method Metadata.vignette_polynomial of <micasense.metadata.Metadata object at 0x7f072ac8b3c8>>() E + where <bound method Metadata.vignette_polynomial of <micasense.metadata.Metadata object at 0x7f072ac8b3c8>> = <micasense.metadata.Metadata object at 0x7f072ac8b3c8>.vignette_polynomial E + and approx([-3.188190987533484e-05 ± 3.2e-08, 1.1380741452056501e-07 ± 1.1e-10, -2.7776829778142425e-09 ± 2.8e-12, 9.981184981301047e-12 ± 1.0e-12, -1.4703936738578638e-14 ± 1.0e-12, 7.334097230810222e-18 ± 1.0e-12]) = <function approx at 0x7f073bb63bf8>([-3.188190987533484e-05, 1.1380741452056501e-07, -2.7776829778142425e-09, 9.981184981301047e-12, -1.4703936738578638e-14, 7.334097230810222e-18], rel=0.001) E + where <function approx at 0x7f073bb63bf8> = pytest.approx
tests/test_metadata.py:91: AssertionError
test_principal_point_mm
meta = <micasense.metadata.Metadata object at 0x7f072ab26438>
def test_principal_point_mm(meta):
assert meta.principal_point() == pytest.approx([2.35363, 1.79947])
tests/test_metadata.py:94:
self = <micasense.metadata.Metadata object at 0x7f072ab26438>
def principal_point(self):
return [float(item) for item in self.get_item('XMP:PrincipalPoint').split(',')]
E AttributeError: 'NoneType' object has no attribute 'split'
micasense/metadata.py:243: AttributeError
test_distortion_parameters
meta = <micasense.metadata.Metadata object at 0x7f072ab4e278>
def test_distortion_parameters(meta):
expected_params = [-0.09679655532374383, 0.14041893470790068, -0.022980842634993275, 0.0002758383774216635, 0.0006600729536460939]
assert meta.distortion_parameters() == pytest.approx(expected_params, rel=0.001)
E assert [] == approx([-0.09679655532374383 ± 9.7e-05, 0.14041893470790068 ± 1.4e-04, -0.022980842634993275 ± 2.3e-05, 0.0002758383774216635 ± 2.8e-07, 0.0006600729536460939 ± 6.6e-07]) E + where [] = <bound method Metadata.distortion_parameters of <micasense.metadata.Metadata object at 0x7f072ab4e278>>() E + where <bound method Metadata.distortion_parameters of <micasense.metadata.Metadata object at 0x7f072ab4e278>> = <micasense.metadata.Metadata object at 0x7f072ab4e278>.distortion_parameters E + and approx([-0.09679655532374383 ± 9.7e-05, 0.14041893470790068 ± 1.4e-04, -0.022980842634993275 ± 2.3e-05, 0.0002758383774216635 ± 2.8e-07, 0.0006600729536460939 ± 6.6e-07]) = <function approx at 0x7f073bb63bf8>([-0.09679655532374383, 0.14041893470790068, -0.022980842634993275, 0.0002758383774216635, 0.0006600729536460939], rel=0.001) E + where <function approx at 0x7f073bb63bf8> = pytest.approx
tests/test_metadata.py:98: AssertionError
test_bits_per_pixel
meta = <micasense.metadata.Metadata object at 0x7f072a9f2f28>
def test_bits_per_pixel(meta):
assert meta.bits_per_pixel() == 16
E assert None == 16 E + where None = <bound method Metadata.bits_per_pixel of <micasense.metadata.Metadata object at 0x7f072a9f2f28>>() E + where <bound method Metadata.bits_per_pixel of <micasense.metadata.Metadata object at 0x7f072a9f2f28>> = <micasense.metadata.Metadata object at 0x7f072a9f2f28>.bits_per_pixel
tests/test_metadata.py:101: AssertionError
test_dark_pixels
meta = <micasense.metadata.Metadata object at 0x7f072ab42e48>
def test_dark_pixels(meta):
assert meta.dark_pixels() == pytest.approx(5071.5)
tests/test_metadata.py:104:
self = <micasense.metadata.Metadata object at 0x7f072ab42e48>
def dark_pixels(self):
''' get the average of the optically covered pixel values Note: these pixels are raw, and have not been radiometrically corrected. Use the black_level() method for all radiomentric calibrations ''' dark_pixels = self.get_item('XMP:DarkRowValue') total = 0.0
num = len(dark_pixels)
E TypeError: object of type 'NoneType' has no len()
micasense/metadata.py:219: TypeError
test_gain
meta = <micasense.metadata.Metadata object at 0x7f072accb080>
def test_gain(meta):
assert meta.gain() == 1
tests/test_metadata.py:107:
self = <micasense.metadata.Metadata object at 0x7f072accb080>
def gain(self):
return self.get_item('EXIF:ISOSpeed')/100.0
E TypeError: unsupported operand type(s) for /: 'NoneType' and 'float'
micasense/metadata.py:187: TypeError
test_firmware_version
meta = <micasense.metadata.Metadata object at 0x7f072abbc2e8>
def test_firmware_version(meta):
assert meta.firmware_version() == "v2.1.2-34-g05e37eb-local"
E AssertionError: assert None == 'v2.1.2-34-g05e37eb-local' E + where None = <bound method Metadata.firmware_version of <micasense.metadata.Metadata object at 0x7f072abbc2e8>>() E + where <bound method Metadata.firmware_version of <micasense.metadata.Metadata object at 0x7f072abbc2e8>> = <micasense.metadata.Metadata object at 0x7f072abbc2e8>.firmware_version
tests/test_metadata.py:110: AssertionError
test_firmware_version_v3
meta_v3 = <micasense.metadata.Metadata object at 0x7f072ab39da0>
def test_firmware_version_v3(meta_v3):
assert meta_v3.firmware_version() == "v3.3.0"
E AssertionError: assert None == 'v3.3.0' E + where None = <bound method Metadata.firmware_version of <micasense.metadata.Metadata object at 0x7f072ab39da0>>() E + where <bound method Metadata.firmware_version of <micasense.metadata.Metadata object at 0x7f072ab39da0>> = <micasense.metadata.Metadata object at 0x7f072ab39da0>.firmware_version
tests/test_metadata.py:113: AssertionError
test_dls_irradiance
meta = <micasense.metadata.Metadata object at 0x7f072ad100f0>
def test_dls_irradiance(meta):
assert meta.spectral_irradiance() == pytest.approx(1.0848, abs=0.0001)
E assert 0.0 == 1.0848 ± 1.0e-04 E + where 0.0 = <bound method Metadata.spectral_irradiance of <micasense.metadata.Metadata object at 0x7f072ad100f0>>() E + where <bound method Metadata.spectral_irradiance of <micasense.metadata.Metadata object at 0x7f072ad100f0>> = <micasense.metadata.Metadata object at 0x7f072ad100f0>.spectral_irradiance E + and 1.0848 ± 1.0e-04 = <function approx at 0x7f073bb63bf8>(1.0848, abs=0.0001) E + where <function approx at 0x7f073bb63bf8> = pytest.approx
tests/test_metadata.py:116: AssertionError
test_dls_pose
meta = <micasense.metadata.Metadata object at 0x7f072ab688d0>
def test_dls_pose(meta):
assert meta.dls_pose() == pytest.approx((-3.070, -0.188, -0.013), abs=0.001)
E assert (0.0, 0.0, 0.0) == approx((-3.07 ± 1.0e-03, -0.188 ± 1.0e-03, -0.013 ± 1.0e-03)) E + where (0.0, 0.0, 0.0) = <bound method Metadata.dls_pose of <micasense.metadata.Metadata object at 0x7f072ab688d0>>() E + where <bound method Metadata.dls_pose of <micasense.metadata.Metadata object at 0x7f072ab688d0>> = <micasense.metadata.Metadata object at 0x7f072ab688d0>.dls_pose E + and approx((-3.07 ± 1.0e-03, -0.188 ± 1.0e-03, -0.013 ± 1.0e-03)) = <function approx at 0x7f073bb63bf8>((-3.07, -0.188, -0.013), abs=0.001) E + where <function approx at 0x7f073bb63bf8> = pytest.approx
tests/test_metadata.py:119: AssertionError
test_good_exposure
meta = <micasense.metadata.Metadata object at 0x7f072abc7400>
def test_good_exposure(meta):
assert meta.exposure() == pytest.approx(0.0004725)
tests/test_metadata.py:122:
self = <micasense.metadata.Metadata object at 0x7f072abc7400>
def exposure(self):
exp = self.get_item('EXIF:ExposureTime') # correct for incorrect exposure in some legacy RedEdge firmware versions if self.camera_model() != "Altum": if math.fabs(exp-(1.0/6329.0)) < 1e-6:
E TypeError: unsupported operand type(s) for -: 'NoneType' and 'float'
micasense/metadata.py:182: TypeError
test_good_exposure_v3
meta_v3 = <micasense.metadata.Metadata object at 0x7f072ad04898>
def test_good_exposure_v3(meta_v3):
assert meta_v3.exposure() == pytest.approx(0.00171)
tests/test_metadata.py:125:
self = <micasense.metadata.Metadata object at 0x7f072ad04898>
def exposure(self):
exp = self.get_item('EXIF:ExposureTime') # correct for incorrect exposure in some legacy RedEdge firmware versions if self.camera_model() != "Altum": if math.fabs(exp-(1.0/6329.0)) < 1e-6:
E TypeError: unsupported operand type(s) for -: 'NoneType' and 'float'
micasense/metadata.py:182: TypeError
test_bad_exposure_time
meta_bad_exposure = <micasense.metadata.Metadata object at 0x7f072a9f2828>
def test_bad_exposure_time(meta_bad_exposure):
assert meta_bad_exposure.exposure() == pytest.approx(247e-6, abs=1e-3)
tests/test_metadata.py:128:
self = <micasense.metadata.Metadata object at 0x7f072a9f2828>
def exposure(self):
exp = self.get_item('EXIF:ExposureTime') # correct for incorrect exposure in some legacy RedEdge firmware versions if self.camera_model() != "Altum": if math.fabs(exp-(1.0/6329.0)) < 1e-6:
E TypeError: unsupported operand type(s) for -: 'NoneType' and 'float'
micasense/metadata.py:182: TypeError
test_dls_present_dls2
meta_altum_dls2 = <micasense.metadata.Metadata object at 0x7f072ac74e80>
def test_dls_present_dls2(meta_altum_dls2):
assert meta_altum_dls2.dls_present() == True
E assert False == True E + where False = <bound method Metadata.dls_present of <micasense.metadata.Metadata object at 0x7f072ac74e80>>() E + where <bound method Metadata.dls_present of <micasense.metadata.Metadata object at 0x7f072ac74e80>> = <micasense.metadata.Metadata object at 0x7f072ac74e80>.dls_present
tests/test_metadata.py:134: AssertionError
test_dls2_scale_factor
meta_altum_dls2 = <micasense.metadata.Metadata object at 0x7f072abaaf60>
def test_dls2_scale_factor(meta_altum_dls2):
assert meta_altum_dls2.irradiance_scale_factor() == pytest.approx(0.01)
E assert 1.0 == 0.01 ± 1.0e-08 E + where 1.0 = <bound method Metadata.irradiance_scale_factor of <micasense.metadata.Metadata object at 0x7f072abaaf60>>() E + where <bound method Metadata.irradiance_scale_factor of <micasense.metadata.Metadata object at 0x7f072abaaf60>> = <micasense.metadata.Metadata object at 0x7f072abaaf60>.irradiance_scale_factor E + and 0.01 ± 1.0e-08 = <function approx at 0x7f073bb63bf8>(0.01) E + where <function approx at 0x7f073bb63bf8> = pytest.approx
tests/test_metadata.py:137: AssertionError
test_horizontal_irradiance_valid_altum
meta_altum_dls2 = <micasense.metadata.Metadata object at 0x7f072ab583c8>
def test_horizontal_irradiance_valid_altum(meta_altum_dls2):
assert meta_altum_dls2.horizontal_irradiance_valid() == True
E assert False == True E + where False = <bound method Metadata.horizontal_irradiance_valid of <micasense.metadata.Metadata object at 0x7f072ab583c8>>() E + where <bound method Metadata.horizontal_irradiance_valid of <micasense.metadata.Metadata object at 0x7f072ab583c8>> = <micasense.metadata.Metadata object at 0x7f072ab583c8>.horizontal_irradiance_valid
tests/test_metadata.py:143: AssertionError
test_qr_corners
panel_image_name = 'data/0000SET/000/IMG_0000_1.tif'
def test_qr_corners(panel_image_name):
img = image.Image(panel_image_name)
tests/test_panel.py:33:
self = <micasense.image.Image object at 0x7f072ab31a90>, image_path = 'data/0000SET/000/IMG_0000_1.tif', exiftool_obj = None
def init(self, image_path, exiftool_obj=None):
#print(image_path) if not os.path.isfile(image_path): raise IOError("Provided path is not a file: {}".format(imanon_panel_rededge_file_listge_path)) self.path = image_path self.meta = metadata.Metadata(self.path, exiftool_obj=exiftool_obj) if self.meta.band_name() is None: raise ValueError("Provided file path does not have a band name: {}".format(image_path))
E ValueError: Provided file path does not have a band name: data/0000SET/000/IMG_0000_1.tif
micasense/image.py:73: ValueError
test_panel_corners
panel_image_name = 'data/0000SET/000/IMG_0000_1.tif'
def test_panel_corners(panel_image_name):
img = image.Image(panel_image_name)
tests/test_panel.py:46:
self = <micasense.image.Image object at 0x7f072abbb080>, image_path = 'data/0000SET/000/IMG_0000_1.tif', exiftool_obj = None
def init(self, image_path, exiftool_obj=None):
#print(image_path) if not os.path.isfile(image_path): raise IOError("Provided path is not a file: {}".format(imanon_panel_rededge_file_listge_path)) self.path = image_path self.meta = metadata.Metadata(self.path, exiftool_obj=exiftool_obj) if self.meta.band_name() is None: raise ValueError("Provided file path does not have a band name: {}".format(image_path))
E ValueError: Provided file path does not have a band name: data/0000SET/000/IMG_0000_1.tif
micasense/image.py:73: ValueError
test_raw_panel_bad_corners
panel_image_name = 'data/0000SET/000/IMG_0000_1.tif'
def test_raw_panel_bad_corners(panel_image_name):
img = image.Image(panel_image_name)
tests/test_panel.py:60:
self = <micasense.image.Image object at 0x7f072acee5c0>, image_path = 'data/0000SET/000/IMG_0000_1.tif', exiftool_obj = None
def init(self, image_path, exiftool_obj=None):
#print(image_path) if not os.path.isfile(image_path): raise IOError("Provided path is not a file: {}".format(imanon_panel_rededge_file_listge_path)) self.path = image_path self.meta = metadata.Metadata(self.path, exiftool_obj=exiftool_obj) if self.meta.band_name() is None: raise ValueError("Provided file path does not have a band name: {}".format(image_path))
E ValueError: Provided file path does not have a band name: data/0000SET/000/IMG_0000_1.tif
micasense/image.py:73: ValueError
test_raw_panel_manual
panel_image_name = 'data/0000SET/000/IMG_0000_1.tif'
def test_raw_panel_manual(panel_image_name):
img = image.Image(panel_image_name)
tests/test_panel.py:70:
self = <micasense.image.Image object at 0x7f072ac7e9e8>, image_path = 'data/0000SET/000/IMG_0000_1.tif', exiftool_obj = None
def init(self, image_path, exiftool_obj=None):
#print(image_path) if not os.path.isfile(image_path): raise IOError("Provided path is not a file: {}".format(imanon_panel_rededge_file_listge_path)) self.path = image_path self.meta = metadata.Metadata(self.path, exiftool_obj=exiftool_obj) if self.meta.band_name() is None: raise ValueError("Provided file path does not have a band name: {}".format(image_path))
E ValueError: Provided file path does not have a band name: data/0000SET/000/IMG_0000_1.tif
micasense/image.py:73: ValueError
test_raw_panel
panel_image_name = 'data/0000SET/000/IMG_0000_1.tif'
def test_raw_panel(panel_image_name):
img = image.Image(panel_image_name)
tests/test_panel.py:79:
self = <micasense.image.Image object at 0x7f072ac73668>, image_path = 'data/0000SET/000/IMG_0000_1.tif', exiftool_obj = None
def init(self, image_path, exiftool_obj=None):
#print(image_path) if not os.path.isfile(image_path): raise IOError("Provided path is not a file: {}".format(imanon_panel_rededge_file_listge_path)) self.path = image_path self.meta = metadata.Metadata(self.path, exiftool_obj=exiftool_obj) if self.meta.band_name() is None: raise ValueError("Provided file path does not have a band name: {}".format(image_path))
E ValueError: Provided file path does not have a band name: data/0000SET/000/IMG_0000_1.tif
micasense/image.py:73: ValueError
test_intensity_panel
panel_image_name = 'data/0000SET/000/IMG_0000_1.tif'
def test_intensity_panel(panel_image_name):
img = image.Image(panel_image_name)
tests/test_panel.py:88:
self = <micasense.image.Image object at 0x7f072ad99668>, image_path = 'data/0000SET/000/IMG_0000_1.tif', exiftool_obj = None
def init(self, image_path, exiftool_obj=None):
#print(image_path) if not os.path.isfile(image_path): raise IOError("Provided path is not a file: {}".format(imanon_panel_rededge_file_listge_path)) self.path = image_path self.meta = metadata.Metadata(self.path, exiftool_obj=exiftool_obj) if self.meta.band_name() is None: raise ValueError("Provided file path does not have a band name: {}".format(image_path))
E ValueError: Provided file path does not have a band name: data/0000SET/000/IMG_0000_1.tif
micasense/image.py:73: ValueError
test_radiance_panel
panel_image_name = 'data/0000SET/000/IMG_0000_1.tif'
def test_radiance_panel(panel_image_name):
img = image.Image(panel_image_name)
tests/test_panel.py:97:
self = <micasense.image.Image object at 0x7f072acc7710>, image_path = 'data/0000SET/000/IMG_0000_1.tif', exiftool_obj = None
def init(self, image_path, exiftool_obj=None):
#print(image_path) if not os.path.isfile(image_path): raise IOError("Provided path is not a file: {}".format(imanon_panel_rededge_file_listge_path)) self.path = image_path self.meta = metadata.Metadata(self.path, exiftool_obj=exiftool_obj) if self.meta.band_name() is None: raise ValueError("Provided file path does not have a band name: {}".format(image_path))
E ValueError: Provided file path does not have a band name: data/0000SET/000/IMG_0000_1.tif
micasense/image.py:73: ValueError
test_irradiance_mean
panel_image_name = 'data/0000SET/000/IMG_0000_1.tif'
def test_irradiance_mean(panel_image_name):
img = image.Image(panel_image_name)
tests/test_panel.py:106:
self = <micasense.image.Image object at 0x7f072ab267f0>, image_path = 'data/0000SET/000/IMG_0000_1.tif', exiftool_obj = None
def init(self, image_path, exiftool_obj=None):
#print(image_path) if not os.path.isfile(image_path): raise IOError("Provided path is not a file: {}".format(imanon_panel_rededge_file_listge_path)) self.path = image_path self.meta = metadata.Metadata(self.path, exiftool_obj=exiftool_obj) if self.meta.band_name() is None: raise ValueError("Provided file path does not have a band name: {}".format(image_path))
E ValueError: Provided file path does not have a band name: data/0000SET/000/IMG_0000_1.tif
micasense/image.py:73: ValueError
test_panel_detected
panel_image_name = 'data/0000SET/000/IMG_0000_1.tif'
def test_panel_detected(panel_image_name):
img = image.Image(panel_image_name)
tests/test_panel.py:113:
self = <micasense.image.Image object at 0x7f072aa7cc88>, image_path = 'data/0000SET/000/IMG_0000_1.tif', exiftool_obj = None
def init(self, image_path, exiftool_obj=None):
#print(image_path) if not os.path.isfile(image_path): raise IOError("Provided path is not a file: {}".format(imanon_panel_rededge_file_listge_path)) self.path = image_path self.meta = metadata.Metadata(self.path, exiftool_obj=exiftool_obj) if self.meta.band_name() is None: raise ValueError("Provided file path does not have a band name: {}".format(image_path))
E ValueError: Provided file path does not have a band name: data/0000SET/000/IMG_0000_1.tif
micasense/image.py:73: ValueError
test_panel_not_detected
flight_image_name = 'data/0000SET/000/IMG_0001_1.tif'
def test_panel_not_detected(flight_image_name):
img = image.Image(flight_image_name)
tests/test_panel.py:118:
self = <micasense.image.Image object at 0x7f072ace5dd8>, image_path = 'data/0000SET/000/IMG_0001_1.tif', exiftool_obj = None
def init(self, image_path, exiftool_obj=None):
#print(image_path) if not os.path.isfile(image_path): raise IOError("Provided path is not a file: {}".format(imanon_panel_rededge_file_listge_path)) self.path = image_path self.meta = metadata.Metadata(self.path, exiftool_obj=exiftool_obj) if self.meta.band_name() is None: raise ValueError("Provided file path does not have a band name: {}".format(image_path))
E ValueError: Provided file path does not have a band name: data/0000SET/000/IMG_0001_1.tif
micasense/image.py:73: ValueError
67 failed, 19 passed, 41 errors in 22.88s
(micasense) tejasrii@winet:~/Image-ExifTool-10.98/imageprocessing$ `
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/micasense/imageprocessing/issues/98?email_source=notifications&email_token=ABSNZU4WP3DIFZ5GP3W77G3Q4RFPTA5CNFSM4J6QTUP2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEIIJSFA#issuecomment-571513108, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABSNZU63JWZ7IUBPVYAN5ULQ4RFPTANCNFSM4J6QTUPQ .
Most likey you did not have git-lfs installed when cloning the repository, or the git lfs fetch failed for some reason, so the example files are not actually files but just lfs pointers. To test run exiftool.exe on one of the files from a command prompt. https://github.com/micasense/imageprocessing/blob/master/README.md#how-do-i-get-set-up … On Tue, Jan 7, 2020, 01:46 Tejasri Nampally @.*> wrote: @poynting https://github.com/poynting I was able to run the setup successfully. When I run 'pytest' , I'm getting several errors. Please helP `> raise ValueError("Provided file path does not have a band name: {}".format(image_path)) E ValueError: Provided file path does not have a band name: data/ALTUM1SET/000/IMG_0008_5.tif micasense/image.py:73: ValueError _ test_altum_fromfilelist ____ non_panel_altum_file_list = ['data/ALTUM1SET/000/IMG_0008_5.tif', 'data/ALTUM1SET/000/IMG_0008_1.tif', 'data/ALTUM1SET/000/IMG_0008_4.tif', 'data/ALTUM1SET/000/IMG_0008_3.tif', 'data/ALTUM1SET/000/IMG_0008_6.tif', 'data/ALTUM1SET/000/IMG_0008_2.tif'] def test_altum_from_filelist(non_panel_altum_file_list): cap = capture.Capture.from_filelist(non_panel_altum_file_list) tests/test_capture.py:178: ------------------------------ micasense/capture.py:97: in from_filelist images = [image.Image(fle) for fle in file_list] micasense/capture.py:97: in images = [image.Image(fle) for fle in file_list] ------------------------------ self = <micasense.image.Image object at 0x7f072ad1f0b8>, image_path = 'data/ALTUM1SET/000/IMG_0008_5.tif', exiftool_obj = None def init(self, image_path, exiftool_obj=None): #print(image_path) if not os.path.isfile(image_path): raise IOError("Provided path is not a file: {}".format(imanon_panel_rededge_file_listge_path)) self.path = image_path self.meta = metadata.Metadata(self.path, exiftool_obj=exiftool_obj) if self.meta.band_name() is None: raise ValueError("Provided file path does not have a band name: {}".format(image_path)) E ValueError: Provided file path does not have a band name: data/ALTUM1SET/000/IMG_00085.tif micasense/image.py:73: ValueError test_altum_from_single_file __ altum_flight_image_name = 'data/ALTUM1SET/000/IMG_0008_1.tif' def test_altum_from_single_file(altum_flight_image_name): cap = capture.Capture.from_file(altum_flight_image_name) tests/test_capture.py:183: ------------------------------ micasense/capture.py:88: in from_file return cls(image.Image(file_name)) ------------------------------ self = <micasense.image.Image object at 0x7f072ab48898>, image_path = 'data/ALTUM1SET/000/IMG_0008_1.tif', exiftool_obj = None def init(self, image_path, exiftool_obj=None): #print(image_path) if not os.path.isfile(image_path): raise IOError("Provided path is not a file: {}".format(imanon_panel_rededge_file_listge_path)) self.path = image_path self.meta = metadata.Metadata(self.path, exiftool_obj=exiftool_obj) if self.meta.band_name() is None: raise ValueError("Provided file path does not have a band name: {}".format(image_path)) E ValueError: Provided file path does not have a band name: data/ALTUM1SET/000/IMG_0008_1.tif micasense/image.py:73: ValueError ____ test_no_rigrelatives ____ non_panel_rededge_file_list = ['data/0000SET/000/IMG_0001_2.tif', 'data/0000SET/000/IMG_0001_5.tif', 'data/0000SET/000/IMG_0001_4.tif', 'data/0000SET/000/IMG_0001_3.tif', 'data/0000SET/000/IMG_0001_1.tif'] def test_no_rig_relatives(non_panel_rededge_file_list): cap = capture.Capture.from_filelist(non_panel_rededge_file_list) tests/test_capture.py:245: ------------------------------ micasense/capture.py:97: in from_filelist images = [image.Image(fle) for fle in file_list] micasense/capture.py:97: in images = [image.Image(fle) for fle in file_list] ------------------------------ self = <micasense.image.Image object at 0x7f072ab264e0>, image_path = 'data/0000SET/000/IMG_0001_2.tif', exiftool_obj = None def init(self, image_path, exiftool_obj=None): #print(image_path) if not os.path.isfile(image_path): raise IOError("Provided path is not a file: {}".format(imanon_panel_rededge_file_listge_path)) self.path = image_path self.meta = metadata.Metadata(self.path, exiftool_obj=exiftool_obj) if self.meta.band_name() is None: raise ValueError("Provided file path does not have a band name: {}".format(image_path)) E ValueError: Provided file path does not have a band name: data/0000SET/000/IMG_0001_2.tif micasense/image.py:73: ValueError __ test_10_band_capture_loads __ panel_10band_rededge_file_list = ['data/10BANDSET/000/IMG_0000_7.tif', 'data/10BANDSET/000/IMG_0000_5.tif', 'data/10BANDSET/000/IMG_0000_3.tif', 'data/10BANDSET/000/IMG_0000_8.tif', 'data/10BANDSET/000/IMG_0000_10.tif', 'data/10BANDSET/000/IMG_0000_9.tif', ...] def test_10_band_capture_loads(panel_10band_rededge_file_list): print(panel_10band_rededge_file_list) cap = capture.Capture.from_filelist(panel_10band_rededge_file_list) tests/test_capture.py:260: ------------------------------ micasense/capture.py:97: in from_filelist images = [image.Image(fle) for fle in file_list] micasense/capture.py:97: in images = [image.Image(fle) for fle in file_list] ------------------------------ self = <micasense.image.Image object at 0x7f072ad7a2b0>, image_path = 'data/10BANDSET/000/IMG_0000_7.tif', exiftool_obj = None def init(self, image_path, exiftool_obj=None): #print(image_path) if not os.path.isfile(image_path): raise IOError("Provided path is not a file: {}".format(imanon_panel_rededge_file_listge_path)) self.path = image_path self.meta = metadata.Metadata(self.path, exiftool_obj=exiftool_obj) if self.meta.band_name() is None: raise ValueError("Provided file path does not have a band name: {}".format(image_path)) E ValueError: Provided file path does not have a band name: data/10BANDSET/000/IMG_0000_7.tif micasense/image.py:73: ValueError --------------------------------------------------------------------------------------------- Captured stdout call --------------------------------------------------------------------------------------------- ['data/10BANDSET/000/IMG_0000_7.tif', 'data/10BANDSET/000/IMG_0000_5.tif', 'data/10BANDSET/000/IMG_0000_3.tif', 'data/10BANDSET/000/IMG_0000_8.tif', 'data/10BANDSET/000/IMG_0000_10.tif', 'data/10BANDSET/000/IMG_0000_9.tif', 'data/10BANDSET/000/IMG_0000_4.tif', 'data/10BANDSET/000/IMG_0000_2.tif', 'data/10BANDSET/000/IMG_0000_6.tif', 'data/10BANDSET/000/IMG_0000_1.tif'] __ test_10_band_panel __ panel_10band_rededge_file_list = ['data/10BANDSET/000/IMG_0000_7.tif', 'data/10BANDSET/000/IMG_0000_5.tif', 'data/10BANDSET/000/IMG_0000_3.tif', 'data/10BANDSET/000/IMG_0000_8.tif', 'data/10BANDSET/000/IMG_0000_10.tif', 'data/10BANDSET/000/IMG_0000_9.tif', ...] def test_10_band_panel(panel_10band_rededge_file_list): cap = capture.Capture.from_filelist(panel_10band_rededge_file_list) tests/test_capture.py:264: ------------------------------ micasense/capture.py:97: in from_filelist images = [image.Image(fle) for fle in file_list] micasense/capture.py:97: in images = [image.Image(fle) for fle in file_list] ------------------------------ self = <micasense.image.Image object at 0x7f072ad04358>, image_path = 'data/10BANDSET/000/IMG_0000_7.tif', exiftool_obj = None def init(self, image_path, exiftool_obj=None): #print(image_path) if not os.path.isfile(image_path): raise IOError("Provided path is not a file: {}".format(imanon_panel_rededge_file_listge_path)) self.path = image_path self.meta = metadata.Metadata(self.path, exiftool_obj=exiftool_obj) if self.meta.band_name() is None: raise ValueError("Provided file path does not have a band name: {}".format(image_path)) E ValueError: Provided file path does not have a band name: data/10BANDSET/000/IMG_00007.tif micasense/image.py:73: ValueError ____ test_image_not_file __ non_existant_file_name = 'data/ALTUM1SET/000/NOFILE.tif' def test_image_not_file(non_existant_file_name): with pytest.raises(OSError): image.Image(non_existant_file_name) tests/test_image.py:101: ------------------------------ self = <micasense.image.Image object at 0x7f072abbb080>, image_path = 'data/ALTUM1SET/000/NOFILE.tif', exiftool_obj = None def init(self, image_path, exiftool_obj=None): #print(image_path) if not os.path.isfile(image_path): raise IOError("Provided path is not a file: {}".format(imanon_panel_rededge_file_listge_path)) E NameError: name 'imanon_panel_rededge_file_listge_path' is not defined micasense/image.py:68: NameError __ test_from_captures __ files_dir = 'data/0000SET/000' def test_from_captures(files_dir): file1 = os.path.join(files_dir, 'IMG_0000_1.tif') file2 = os.path.join(files_dir, 'IMG_0001_1.tif') cap1 = capture.Capture.from_file(file1) tests/test_imageset.py:46: ------------------------------ micasense/capture.py:88: in from_file return cls(image.Image(file_name)) ------------------------------ self = <micasense.image.Image object at 0x7f072ab2c6a0>, image_path = 'data/0000SET/000/IMG_0000_1.tif', exiftool_obj = None def init(self, image_path, exiftool_obj=None): #print(image_path) if not os.path.isfile(image_path): raise IOError("Provided path is not a file: {}".format(imanon_panel_rededge_file_listge_path)) self.path = image_path self.meta = metadata.Metadata(self.path, exiftool_obj=exiftool_obj) if self.meta.band_name() is None: raise ValueError("Provided file path does not have a band name: {}".format(image_path)) E ValueError: Provided file path does not have a band name: data/0000SET/000/IMG_00001.tif micasense/image.py:73: ValueError ____ test_from_directory __ files_dir = 'data/0000SET/000' def test_from_directory(files_dir): global progress_val progress(0.0) imgset = imageset.ImageSet.from_directory(files_dir, progress) tests/test_imageset.py:54: ------------------------------ micasense/imageset.py:68: in from_directory images.append(image.Image(path, exiftool_obj=exift)) ------------------------------ self = <micasense.image.Image object at 0x7f072ab9dd68>, image_path = 'data/0000SET/000/IMG_0001_2.tif', exiftool_obj = <exiftool.ExifTool object at 0x7f072ab9d1d0> def init(self, image_path, exiftool_obj=None): #print(image_path) if not os.path.isfile(image_path): raise IOError("Provided path is not a file: {}".format(imanon_panel_rededge_file_listge_path)) self.path = image_path self.meta = metadata.Metadata(self.path, exiftool_obj=exiftool_obj) if self.meta.band_name() is None: raise ValueError("Provided file path does not have a band name: {}".format(image_path)) E ValueError: Provided file path does not have a band name: data/0000SET/000/IMG_00012.tif micasense/image.py:73: ValueError ____ test_as_nestedlists ____ files_dir = 'data/0000SET/000' def test_as_nested_lists(files_dir): imgset = imageset.ImageSet.from_directory(files_dir) tests/test_imageset.py:60: ------------------------------ micasense/imageset.py:68: in from_directory images.append(image.Image(path, exiftool_obj=exift)) ------------------------------ self = <micasense.image.Image object at 0x7f072ad17dd8>, image_path = 'data/0000SET/000/IMG_0001_2.tif', exiftool_obj = <exiftool.ExifTool object at 0x7f072ad17438> def init(self, image_path, exiftool_obj=None): #print(image_path) if not os.path.isfile(image_path): raise IOError("Provided path is not a file: {}".format(imanon_panel_rededge_file_listge_path)) self.path = image_path self.meta = metadata.Metadata(self.path, exiftool_obj=exiftool_obj) if self.meta.band_name() is None: raise ValueError("Provided file path does not have a band name: {}".format(image_path)) E ValueError: Provided file path does not have a band name: data/0000SET/000/IMG_0001_2.tif micasense/image.py:73: ValueError ____ test_10_band_fromdir ____ ten_band_files_dir = 'data/10BANDSET/000' def test_10_band_from_dir(ten_band_files_dir): imgset = imageset.ImageSet.from_directory(ten_band_files_dir, progress) tests/test_imageset.py:67: ------------------------------ micasense/imageset.py:68: in from_directory images.append(image.Image(path, exiftool_obj=exift)) ------------------------------ self = <micasense.image.Image object at 0x7f072ab4e6d8>, image_path = 'data/10BANDSET/000/IMG_0431_9.tif', exiftool_obj = <exiftool.ExifTool object at 0x7f072ab4e390> def init(self, image_path, exiftool_obj=None): #print(image_path) if not os.path.isfile(image_path): raise IOError("Provided path is not a file: {}".format(imanon_panel_rededge_file_listge_path)) self.path = image_path self.meta = metadata.Metadata(self.path, exiftool_obj=exiftool_obj) if self.meta.band_name() is None: raise ValueError("Provided file path does not have a band name: {}".format(image_path)) E ValueError: Provided file path does not have a band name: data/10BANDSET/000/IMG_0431_9.tif micasense/image.py:73: ValueError _ test_band_index ____ meta = <micasense.metadata.Metadata object at 0x7f072ac749b0> def test_band_index(meta): assert meta.band_index() == 0 E assert None == 0 E + where None = <bound method Metadata.band_index of <micasense.metadata.Metadata object at 0x7f072ac749b0>>() E + where <bound method Metadata.band_index of <micasense.metadata.Metadata object at 0x7f072ac749b0>> = <micasense.metadata.Metadata object at 0x7f072ac749b0>.band_index tests/test_metadata.py:35: AssertionError ___ test_cameramake meta = <micasense.metadata.Metadata object at 0x7f072acee860> def test_camera_make(meta): assert meta.camera_make() == 'MicaSense' E AssertionError: assert None == 'MicaSense' E + where None = <bound method Metadata.camera_make of <micasense.metadata.Metadata object at 0x7f072acee860>>() E + where <bound method Metadata.camera_make of <micasense.metadata.Metadata object at 0x7f072acee860>> = <micasense.metadata.Metadata object at 0x7f072acee860>.camera_make tests/test_metadata.py:38: AssertionError __ test_camera_model _ meta = <micasense.metadata.Metadata object at 0x7f072ad1f7b8> def test_camera_model(meta): assert meta.camera_model() == 'RedEdge' E AssertionError: assert None == 'RedEdge' E + where None = <bound method Metadata.camera_model of <micasense.metadata.Metadata object at 0x7f072ad1f7b8>>() E + where <bound method Metadata.camera_model of <micasense.metadata.Metadata object at 0x7f072ad1f7b8>> = <micasense.metadata.Metadata object at 0x7f072ad1f7b8>.camera_model tests/test_metadata.py:41: AssertionError __ test_flight_id ____ meta = <micasense.metadata.Metadata object at 0x7f072ab7a6d8> def test_flight_id(meta): assert meta.flight_id() == 'NtLNbVIdowuCaWYbg3ck' E AssertionError: assert None == 'NtLNbVIdowuCaWYbg3ck' E + where None = <bound method Metadata.flight_id of <micasense.metadata.Metadata object at 0x7f072ab7a6d8>>() E + where <bound method Metadata.flight_id of <micasense.metadata.Metadata object at 0x7f072ab7a6d8>> = <micasense.metadata.Metadata object at 0x7f072ab7a6d8>.flight_id tests/test_metadata.py:44: AssertionError _ test_capture_id ____ meta = <micasense.metadata.Metadata object at 0x7f072ad044e0> def test_capture_id(meta): assert meta.capture_id() == '5v25BtsZg3BQBhVH7Iaz' E AssertionError: assert None == '5v25BtsZg3BQBhVH7Iaz' E + where None = <bound method Metadata.capture_id of <micasense.metadata.Metadata object at 0x7f072ad044e0>>() E + where <bound method Metadata.capture_id of <micasense.metadata.Metadata object at 0x7f072ad044e0>> = <micasense.metadata.Metadata object at 0x7f072ad044e0>.capture_id tests/test_metadata.py:47: AssertionError ___ test_blacklevel meta = <micasense.metadata.Metadata object at 0x7f072ab26a90> def test_black_level(meta): assert meta.black_level() == 4800.0 E assert 0 == 4800.0 E + where 0 = <bound method Metadata.black_level of <micasense.metadata.Metadata object at 0x7f072ab26a90>>() E + where <bound method Metadata.black_level of <micasense.metadata.Metadata object at 0x7f072ab26a90>> = <micasense.metadata.Metadata object at 0x7f072ab26a90>.black_level tests/testmetadata.py:50: AssertionError ____ test_focal_lengthmm ____ meta = <micasense.metadata.Metadata object at 0x7f072ab68da0> def test_focal_length_mm(meta): assert meta.focal_length_mm() == pytest.approx(5.43509341) tests/test_metadata.py:53: ------------------------------ self = <micasense.metadata.Metadata object at 0x7f072ab68da0> def focal_length_mm(self): units = self.get_item('XMP:PerspectiveFocalLengthUnits') focal_length_mm = 0.0 if units == 'mm': focal_length_mm = float(self.get_item('XMP:PerspectiveFocalLength')) else: focal_length_px = float(self.get_item('XMP:PerspectiveFocalLength')) E TypeError: float() argument must be a string or a number, not 'NoneType' micasense/metadata.py:256: TypeError _ test_focal_length_mm_v3 ____ meta_v3 = <micasense.metadata.Metadata object at 0x7f072ac95e10> def test_focal_length_mm_v3(meta_v3): assert meta_v3.focal_length_mm() == pytest.approx(5.45221099) tests/test_metadata.py:56: ------------------------------ self = <micasense.metadata.Metadata object at 0x7f072ac95e10> def focal_length_mm(self): units = self.get_item('XMP:PerspectiveFocalLengthUnits') focal_length_mm = 0.0 if units == 'mm': focal_length_mm = float(self.get_item('XMP:PerspectiveFocalLength')) else: focal_length_px = float(self.get_item('XMP:PerspectiveFocalLength')) E TypeError: float() argument must be a string or a number, not 'NoneType' micasense/metadata.py:256: TypeError ____ test_fp_resolution __ meta = <micasense.metadata.Metadata object at 0x7f072ab23eb8> def test_fp_resolution(meta): assert meta.focal_plane_resolution_px_per_mm() == pytest.approx([266.666667,266.666667]) tests/test_metadata.py:59: ------------------------------ self = <micasense.metadata.Metadata object at 0x7f072ab23eb8> def focal_plane_resolution_px_per_mm(self): fp_x_resolution = float(self.get_item('EXIF:FocalPlaneXResolution')) E TypeError: float() argument must be a string or a number, not 'NoneType' micasense/metadata.py:246: TypeError ____ test_fp_resolutionv3 ____ meta_v3 = <micasense.metadata.Metadata object at 0x7f072acf2eb8> def test_fp_resolution_v3(meta_v3): assert meta_v3.focal_plane_resolution_px_per_mm() == pytest.approx([266.666667,266.666667]) tests/test_metadata.py:62: ------------------------------ self = <micasense.metadata.Metadata object at 0x7f072acf2eb8> def focal_plane_resolution_px_per_mm(self): fp_x_resolution = float(self.get_item('EXIF:FocalPlaneXResolution')) E TypeError: float() argument must be a string or a number, not 'NoneType' micasense/metadata.py:246: TypeError ____ test_utctime ____ meta = <micasense.metadata.Metadata object at 0x7f072ab39cf8> def test_utc_time(meta): utc_time = meta.utc_time() tests/test_metadata.py:65: ------------------------------ self = <micasense.metadata.Metadata object at 0x7f072ab39cf8> def utc_time(self): ''' Get the timezone-aware datetime of the image capture ''' str_time = self.get_item('EXIF:DateTimeOriginal') utc_time = datetime.strptime(str_time, "%Y:%m:%d %H:%M:%S") E TypeError: strptime() argument 1 must be str, not None micasense/metadata.py:126: TypeError _____ test_utc_time_v3 ___ meta_v3 = <micasense.metadata.Metadata object at 0x7f072ac959b0> def test_utc_time_v3(meta_v3): utc_time = meta_v3.utc_time() tests/test_metadata.py:70: ------------------------------ self = <micasense.metadata.Metadata object at 0x7f072ac959b0> def utc_time(self): ''' Get the timezone-aware datetime of the image capture ''' str_time = self.get_item('EXIF:DateTimeOriginal') utc_time = datetime.strptime(str_time, "%Y:%m:%d %H:%M:%S") E TypeError: strptime() argument 1 must be str, not None micasense/metadata.py:126: TypeError ____ testposition ____ meta = <micasense.metadata.Metadata object at 0x7f072ab9d6a0> def test_position(meta): assert meta.position() == pytest.approx((36.576096, -119.4352689, 101.861)) tests/test_metadata.py:75: ------------------------------ ../../.conda/envs/micasense/lib/python3.7/site-packages/_pytest/python_api.py:196: in eq return ApproxBase.eq(self, actual) ../../.conda/envs/micasense/lib/python3.7/site-packages/_pytest/python_api.py:70: in eq a == self._approx_scalar(x) for a, x in self._yield_comparisons(actual) ../../.conda/envs/micasense/lib/python3.7/site-packages/_pytest/python_api.py:70: in a == self._approx_scalar(x) for a, x in self._yield_comparisons(actual) ------------------------------ self = 36.576096 ± 3.7e-05, actual = None def eq(self, actual): """ Return true if the given value is equal to the expected value within the pre-specified tolerance. """ if _is_numpy_array(actual): # Call ``eq()`` manually to prevent infinite-recursion with # numpy<1.13. See #3748. return all(self.eq(a) for a in actual.flat) # Short-circuit exact equality. if actual == self.expected: return True # Allow the user to control whether NaNs are considered equal to each # other or not. The abs() calls are for compatibility with complex # numbers. if math.isnan(abs(self.expected)): return self.nan_ok and math.isnan(abs(actual)) # Infinity shouldn't be approximately equal to anything but itself, but # if there's a relative tolerance, it will be infinite and infinity # will seem approximately equal to everything. The equal-to-itself # case would have been short circuited above, so here we can just # return false if the expected value is infinite. The abs() call is # for compatibility with complex numbers. if math.isinf(abs(self.expected)): return False # Return true if the two numbers are within the tolerance. return abs(self.expected - actual) <= self.tolerance E TypeError: unsupported operand type(s) for -: 'float' and 'NoneType' ../../.conda/envs/micasense/lib/python3.7/site-packages/_pytest/pythonapi.py:275: TypeError ____ test_dls_present _ meta = <micasense.metadata.Metadata object at 0x7f072ab7a240> def test_dls_present(meta): assert meta.dls_present() == True E assert False == True E + where False = <bound method Metadata.dls_present of <micasense.metadata.Metadata object at 0x7f072ab7a240>>() E + where <bound method Metadata.dls_present of <micasense.metadata.Metadata object at 0x7f072ab7a240>> = <micasense.metadata.Metadata object at 0x7f072ab7a240>.dls_present tests/test_metadata.py:78: AssertionError test_metadata_size __ meta = <micasense.metadata.Metadata object at 0x7f072ad1fbe0> def test_metadata_size(meta): assert meta.size('XMP:RadiometricCalibration') == 3 E AssertionError: assert 0 == 3 E + where 0 = <bound method Metadata.size of <micasense.metadata.Metadata object at 0x7f072ad1fbe0>>('XMP:RadiometricCalibration') E + where <bound method Metadata.size of <micasense.metadata.Metadata object at 0x7f072ad1fbe0>> = <micasense.metadata.Metadata object at 0x7f072ad1fbe0>.size tests/test_metadata.py:81: AssertionError ____ test_center_wavelength ____ meta = <micasense.metadata.Metadata object at 0x7f072acf29b0> def test_center_wavelength(meta): assert meta.center_wavelength() == 475 E assert None == 475 E + where None = <bound method Metadata.center_wavelength of <micasense.metadata.Metadata object at 0x7f072acf29b0>>() E + where <bound method Metadata.center_wavelength of <micasense.metadata.Metadata object at 0x7f072acf29b0>> = <micasense.metadata.Metadata object at 0x7f072acf29b0>.center_wavelength tests/testmetadata.py:84: AssertionError ____ test_vignettecenter ____ meta = <micasense.metadata.Metadata object at 0x7f072ac5d4a8> def test_vignette_center(meta): assert meta.vignette_center() == pytest.approx([676.703, 480.445], abs=0.001) E assert [] == approx([676.703 ± 1.0e-03, 480.445 ± 1.0e-03]) E + where [] = <bound method Metadata.vignette_center of <micasense.metadata.Metadata object at 0x7f072ac5d4a8>>() E + where <bound method Metadata.vignette_center of <micasense.metadata.Metadata object at 0x7f072ac5d4a8>> = <micasense.metadata.Metadata object at 0x7f072ac5d4a8>.vignette_center E + and approx([676.703 ± 1.0e-03, 480.445 ± 1.0e-03]) = <function approx at 0x7f073bb63bf8>([676.703, 480.445], abs=0.001) E + where <function approx at 0x7f073bb63bf8> = pytest.approx tests/test_metadata.py:87: AssertionError _ test_vignettepolynomial meta = <micasense.metadata.Metadata object at 0x7f072ac8b3c8> def test_vignette_polynomial(meta): expected_poly = [-3.188190987533484e-05, 1.1380741452056501e-07, -2.7776829778142425e-09, 9.981184981301047e-12, -1.4703936738578638e-14, 7.334097230810222e-18] assert meta.vignette_polynomial() == pytest.approx(expected_poly, rel=0.001) E assert [] == approx([-3.188190987533484e-05 ± 3.2e-08, 1.1380741452056501e-07 ± 1.1e-10, -2.7776829778142425e-09 ± 2.8e-12, 9.981184981301047e-12 ± 1.0e-12, -1.4703936738578638e-14 ± 1.0e-12, 7.334097230810222e-18 ± 1.0e-12]) E + where [] = <bound method Metadata.vignette_polynomial of <micasense.metadata.Metadata object at 0x7f072ac8b3c8>>() E + where <bound method Metadata.vignette_polynomial of <micasense.metadata.Metadata object at 0x7f072ac8b3c8>> = <micasense.metadata.Metadata object at 0x7f072ac8b3c8>.vignette_polynomial E + and approx([-3.188190987533484e-05 ± 3.2e-08, 1.1380741452056501e-07 ± 1.1e-10, -2.7776829778142425e-09 ± 2.8e-12, 9.981184981301047e-12 ± 1.0e-12, -1.4703936738578638e-14 ± 1.0e-12, 7.334097230810222e-18 ± 1.0e-12]) = <function approx at 0x7f073bb63bf8>([-3.188190987533484e-05, 1.1380741452056501e-07, -2.7776829778142425e-09, 9.981184981301047e-12, -1.4703936738578638e-14, 7.334097230810222e-18], rel=0.001) E + where <function approx at 0x7f073bb63bf8> = pytest.approx tests/test_metadata.py:91: AssertionError _ test_principal_point_mm __ meta = <micasense.metadata.Metadata object at 0x7f072ab26438> def test_principal_point_mm(meta): assert meta.principal_point() == pytest.approx([2.35363, 1.79947]) tests/test_metadata.py:94: ------------------------------ self = <micasense.metadata.Metadata object at 0x7f072ab26438> def principal_point(self): return [float(item) for item in self.get_item('XMP:PrincipalPoint').split(',')] E AttributeError: 'NoneType' object has no attribute 'split' micasense/metadata.py:243: AttributeError __ test_distortion_parameters __ meta = <micasense.metadata.Metadata object at 0x7f072ab4e278> def test_distortion_parameters(meta): expected_params = [-0.09679655532374383, 0.14041893470790068, -0.022980842634993275, 0.0002758383774216635, 0.0006600729536460939] assert meta.distortion_parameters() == pytest.approx(expected_params, rel=0.001) E assert [] == approx([-0.09679655532374383 ± 9.7e-05, 0.14041893470790068 ± 1.4e-04, -0.022980842634993275 ± 2.3e-05, 0.0002758383774216635 ± 2.8e-07, 0.0006600729536460939 ± 6.6e-07]) E + where [] = <bound method Metadata.distortion_parameters of <micasense.metadata.Metadata object at 0x7f072ab4e278>>() E + where <bound method Metadata.distortion_parameters of <micasense.metadata.Metadata object at 0x7f072ab4e278>> = <micasense.metadata.Metadata object at 0x7f072ab4e278>.distortion_parameters E + and approx([-0.09679655532374383 ± 9.7e-05, 0.14041893470790068 ± 1.4e-04, -0.022980842634993275 ± 2.3e-05, 0.0002758383774216635 ± 2.8e-07, 0.0006600729536460939 ± 6.6e-07]) = <function approx at 0x7f073bb63bf8>([-0.09679655532374383, 0.14041893470790068, -0.022980842634993275, 0.0002758383774216635, 0.0006600729536460939], rel=0.001) E + where <function approx at 0x7f073bb63bf8> = pytest.approx tests/testmetadata.py:98: AssertionError ____ test_bits_per_pixel __ meta = <micasense.metadata.Metadata object at 0x7f072a9f2f28> def test_bits_per_pixel(meta): assert meta.bits_per_pixel() == 16 E assert None == 16 E + where None = <bound method Metadata.bits_per_pixel of <micasense.metadata.Metadata object at 0x7f072a9f2f28>>() E + where <bound method Metadata.bits_per_pixel of <micasense.metadata.Metadata object at 0x7f072a9f2f28>> = <micasense.metadata.Metadata object at 0x7f072a9f2f28>.bits_per_pixel tests/test_metadata.py:101: AssertionError _ test_darkpixels meta = <micasense.metadata.Metadata object at 0x7f072ab42e48> def test_dark_pixels(meta): assert meta.dark_pixels() == pytest.approx(5071.5) tests/test_metadata.py:104: ------------------------------ self = <micasense.metadata.Metadata object at 0x7f072ab42e48> def dark_pixels(self): ''' get the average of the optically covered pixel values Note: these pixels are raw, and have not been radiometrically corrected. Use the black_level() method for all radiomentric calibrations ''' dark_pixels = self.get_item('XMP:DarkRowValue') total = 0.0 num = len(dark_pixels) E TypeError: object of type 'NoneType' has no len() micasense/metadata.py:219: TypeError __ test_gain ___ meta = <micasense.metadata.Metadata object at 0x7f072accb080> def test_gain(meta): assert meta.gain() == 1 tests/test_metadata.py:107: ------------------------------ self = <micasense.metadata.Metadata object at 0x7f072accb080> def gain(self): return self.get_item('EXIF:ISOSpeed')/100.0 E TypeError: unsupported operand type(s) for /: 'NoneType' and 'float' micasense/metadata.py:187: TypeError test_firmwareversion ____ meta = <micasense.metadata.Metadata object at 0x7f072abbc2e8> def test_firmware_version(meta): assert meta.firmware_version() == "v2.1.2-34-g05e37eb-local" E AssertionError: assert None == 'v2.1.2-34-g05e37eb-local' E + where None = <bound method Metadata.firmware_version of <micasense.metadata.Metadata object at 0x7f072abbc2e8>>() E + where <bound method Metadata.firmware_version of <micasense.metadata.Metadata object at 0x7f072abbc2e8>> = <micasense.metadata.Metadata object at 0x7f072abbc2e8>.firmware_version tests/test_metadata.py:110: AssertionError _ test_firmware_version_v3 _____ meta_v3 = <micasense.metadata.Metadata object at 0x7f072ab39da0> def test_firmware_version_v3(meta_v3): assert meta_v3.firmware_version() == "v3.3.0" E AssertionError: assert None == 'v3.3.0' E + where None = <bound method Metadata.firmware_version of <micasense.metadata.Metadata object at 0x7f072ab39da0>>() E + where <bound method Metadata.firmware_version of <micasense.metadata.Metadata object at 0x7f072ab39da0>> = <micasense.metadata.Metadata object at 0x7f072ab39da0>.firmware_version tests/testmetadata.py:113: AssertionError ____ test_dls_irradiance __ meta = <micasense.metadata.Metadata object at 0x7f072ad100f0> def test_dls_irradiance(meta): assert meta.spectral_irradiance() == pytest.approx(1.0848, abs=0.0001) E assert 0.0 == 1.0848 ± 1.0e-04 E + where 0.0 = <bound method Metadata.spectral_irradiance of <micasense.metadata.Metadata object at 0x7f072ad100f0>>() E + where <bound method Metadata.spectral_irradiance of <micasense.metadata.Metadata object at 0x7f072ad100f0>> = <micasense.metadata.Metadata object at 0x7f072ad100f0>.spectral_irradiance E + and 1.0848 ± 1.0e-04 = <function approx at 0x7f073bb63bf8>(1.0848, abs=0.0001) E + where <function approx at 0x7f073bb63bf8> = pytest.approx tests/test_metadata.py:116: AssertionError test_dlspose ____ meta = <micasense.metadata.Metadata object at 0x7f072ab688d0> def test_dls_pose(meta): assert meta.dls_pose() == pytest.approx((-3.070, -0.188, -0.013), abs=0.001) E assert (0.0, 0.0, 0.0) == approx((-3.07 ± 1.0e-03, -0.188 ± 1.0e-03, -0.013 ± 1.0e-03)) E + where (0.0, 0.0, 0.0) = <bound method Metadata.dls_pose of <micasense.metadata.Metadata object at 0x7f072ab688d0>>() E + where <bound method Metadata.dls_pose of <micasense.metadata.Metadata object at 0x7f072ab688d0>> = <micasense.metadata.Metadata object at 0x7f072ab688d0>.dls_pose E + and approx((-3.07 ± 1.0e-03, -0.188 ± 1.0e-03, -0.013 ± 1.0e-03)) = <function approx at 0x7f073bb63bf8>((-3.07, -0.188, -0.013), abs=0.001) E + where <function approx at 0x7f073bb63bf8> = pytest.approx tests/test_metadata.py:119: AssertionError __ test_good_exposure __ meta = <micasense.metadata.Metadata object at 0x7f072abc7400> def test_good_exposure(meta): assert meta.exposure() == pytest.approx(0.0004725) tests/test_metadata.py:122: ------------------------------ self = <micasense.metadata.Metadata object at 0x7f072abc7400> def exposure(self): exp = self.get_item('EXIF:ExposureTime') # correct for incorrect exposure in some legacy RedEdge firmware versions if self.camera_model() != "Altum": if math.fabs(exp-(1.0/6329.0)) < 1e-6: E TypeError: unsupported operand type(s) for -: 'NoneType' and 'float' micasense/metadata.py:182: TypeError ____ test_good_exposurev3 ____ meta_v3 = <micasense.metadata.Metadata object at 0x7f072ad04898> def test_good_exposure_v3(meta_v3): assert meta_v3.exposure() == pytest.approx(0.00171) tests/test_metadata.py:125: ------------------------------ self = <micasense.metadata.Metadata object at 0x7f072ad04898> def exposure(self): exp = self.get_item('EXIF:ExposureTime') # correct for incorrect exposure in some legacy RedEdge firmware versions if self.camera_model() != "Altum": if math.fabs(exp-(1.0/6329.0)) < 1e-6: E TypeError: unsupported operand type(s) for -: 'NoneType' and 'float' micasense/metadata.py:182: TypeError ____ test_bad_exposure_time ____ meta_bad_exposure = <micasense.metadata.Metadata object at 0x7f072a9f2828> def test_bad_exposure_time(meta_bad_exposure): assert meta_bad_exposure.exposure() == pytest.approx(247e-6, abs=1e-3) tests/test_metadata.py:128: ------------------------------ self = <micasense.metadata.Metadata object at 0x7f072a9f2828> def exposure(self): exp = self.get_item('EXIF:ExposureTime') # correct for incorrect exposure in some legacy RedEdge firmware versions if self.camera_model() != "Altum": if math.fabs(exp-(1.0/6329.0)) < 1e-6: E TypeError: unsupported operand type(s) for -: 'NoneType' and 'float' micasense/metadata.py:182: TypeError ____ test_dls_presentdls2 ____ meta_altum_dls2 = <micasense.metadata.Metadata object at 0x7f072ac74e80> def test_dls_present_dls2(meta_altum_dls2): assert meta_altum_dls2.dls_present() == True E assert False == True E + where False = <bound method Metadata.dls_present of <micasense.metadata.Metadata object at 0x7f072ac74e80>>() E + where <bound method Metadata.dls_present of <micasense.metadata.Metadata object at 0x7f072ac74e80>> = <micasense.metadata.Metadata object at 0x7f072ac74e80>.dls_present tests/test_metadata.py:134: AssertionError ____ test_dls2_scale_factor ____ meta_altum_dls2 = <micasense.metadata.Metadata object at 0x7f072abaaf60> def test_dls2_scale_factor(meta_altum_dls2): assert meta_altum_dls2.irradiance_scale_factor() == pytest.approx(0.01) E assert 1.0 == 0.01 ± 1.0e-08 E + where 1.0 = <bound method Metadata.irradiance_scale_factor of <micasense.metadata.Metadata object at 0x7f072abaaf60>>() E + where <bound method Metadata.irradiance_scale_factor of <micasense.metadata.Metadata object at 0x7f072abaaf60>> = <micasense.metadata.Metadata object at 0x7f072abaaf60>.irradiance_scale_factor E + and 0.01 ± 1.0e-08 = <function approx at 0x7f073bb63bf8>(0.01) E + where <function approx at 0x7f073bb63bf8> = pytest.approx tests/test_metadata.py:137: AssertionError ____ test_horizontal_irradiance_valid_altum ____ meta_altum_dls2 = <micasense.metadata.Metadata object at 0x7f072ab583c8> def test_horizontal_irradiance_valid_altum(meta_altum_dls2): assert meta_altum_dls2.horizontal_irradiance_valid() == True E assert False == True E + where False = <bound method Metadata.horizontal_irradiance_valid of <micasense.metadata.Metadata object at 0x7f072ab583c8>>() E + where <bound method Metadata.horizontal_irradiance_valid of <micasense.metadata.Metadata object at 0x7f072ab583c8>> = <micasense.metadata.Metadata object at 0x7f072ab583c8>.horizontal_irradiance_valid tests/test_metadata.py:143: AssertionError _____ test_qr_corners ____ panel_image_name = 'data/0000SET/000/IMG_0000_1.tif' def test_qr_corners(panel_image_name): img = image.Image(panel_image_name) tests/test_panel.py:33: ------------------------------ self = <micasense.image.Image object at 0x7f072ab31a90>, image_path = 'data/0000SET/000/IMG_0000_1.tif', exiftool_obj = None def init(self, image_path, exiftool_obj=None): #print(image_path) if not os.path.isfile(image_path): raise IOError("Provided path is not a file: {}".format(imanon_panel_rededge_file_listge_path)) self.path = image_path self.meta = metadata.Metadata(self.path, exiftool_obj=exiftool_obj) if self.meta.band_name() is None: raise ValueError("Provided file path does not have a band name: {}".format(image_path)) E ValueError: Provided file path does not have a band name: data/0000SET/000/IMG_0000_1.tif micasense/image.py:73: ValueError ____ test_panel_corners __ panel_image_name = 'data/0000SET/000/IMG_0000_1.tif' def test_panel_corners(panel_image_name): img = image.Image(panel_image_name) tests/test_panel.py:46: ------------------------------ self = <micasense.image.Image object at 0x7f072abbb080>, image_path = 'data/0000SET/000/IMG_0000_1.tif', exiftool_obj = None def init(self, image_path, exiftool_obj=None): #print(image_path) if not os.path.isfile(image_path): raise IOError("Provided path is not a file: {}".format(imanon_panel_rededge_file_listge_path)) self.path = image_path self.meta = metadata.Metadata(self.path, exiftool_obj=exiftool_obj) if self.meta.band_name() is None: raise ValueError("Provided file path does not have a band name: {}".format(image_path)) E ValueError: Provided file path does not have a band name: data/0000SET/000/IMG_0000_1.tif micasense/image.py:73: ValueError __ test_raw_panel_bad_corners __ panel_image_name = 'data/0000SET/000/IMG_0000_1.tif' def test_raw_panel_bad_corners(panel_image_name): img = image.Image(panel_image_name) tests/test_panel.py:60: ------------------------------ self = <micasense.image.Image object at 0x7f072acee5c0>, image_path = 'data/0000SET/000/IMG_0000_1.tif', exiftool_obj = None def init(self, image_path, exiftool_obj=None): #print(image_path) if not os.path.isfile(image_path): raise IOError("Provided path is not a file: {}".format(imanon_panel_rededge_file_listge_path)) self.path = image_path self.meta = metadata.Metadata(self.path, exiftool_obj=exiftool_obj) if self.meta.band_name() is None: raise ValueError("Provided file path does not have a band name: {}".format(image_path)) E ValueError: Provided file path does not have a band name: data/0000SET/000/IMG_0000_1.tif micasense/image.py:73: ValueError ____ test_raw_panelmanual ____ panel_image_name = 'data/0000SET/000/IMG_0000_1.tif' def test_raw_panel_manual(panel_image_name): img = image.Image(panel_image_name) tests/test_panel.py:70: ------------------------------ self = <micasense.image.Image object at 0x7f072ac7e9e8>, image_path = 'data/0000SET/000/IMG_0000_1.tif', exiftool_obj = None def init(self, image_path, exiftool_obj=None): #print(image_path) if not os.path.isfile(image_path): raise IOError("Provided path is not a file: {}".format(imanon_panel_rededge_file_listge_path)) self.path = image_path self.meta = metadata.Metadata(self.path, exiftool_obj=exiftool_obj) if self.meta.band_name() is None: raise ValueError("Provided file path does not have a band name: {}".format(image_path)) E ValueError: Provided file path does not have a band name: data/0000SET/000/IMG_0000_1.tif micasense/image.py:73: ValueError ____ test_raw_panel ____ panel_image_name = 'data/0000SET/000/IMG_0000_1.tif' def test_raw_panel(panel_image_name): img = image.Image(panel_image_name) tests/test_panel.py:79: ------------------------------ self = <micasense.image.Image object at 0x7f072ac73668>, image_path = 'data/0000SET/000/IMG_0000_1.tif', exiftool_obj = None def init(self, image_path, exiftool_obj=None): #print(image_path) if not os.path.isfile(image_path): raise IOError("Provided path is not a file: {}".format(imanon_panel_rededge_file_listge_path)) self.path = image_path self.meta = metadata.Metadata(self.path, exiftool_obj=exiftool_obj) if self.meta.band_name() is None: raise ValueError("Provided file path does not have a band name: {}".format(image_path)) E ValueError: Provided file path does not have a band name: data/0000SET/000/IMG_00001.tif micasense/image.py:73: ValueError ____ test_intensitypanel ____ panel_image_name = 'data/0000SET/000/IMG_0000_1.tif' def test_intensity_panel(panel_image_name): img = image.Image(panel_image_name) tests/test_panel.py:88: ------------------------------ self = <micasense.image.Image object at 0x7f072ad99668>, image_path = 'data/0000SET/000/IMG_0000_1.tif', exiftool_obj = None def init(self, image_path, exiftool_obj=None): #print(image_path) if not os.path.isfile(image_path): raise IOError("Provided path is not a file: {}".format(imanon_panel_rededge_file_listge_path)) self.path = image_path self.meta = metadata.Metadata(self.path, exiftool_obj=exiftool_obj) if self.meta.band_name() is None: raise ValueError("Provided file path does not have a band name: {}".format(image_path)) E ValueError: Provided file path does not have a band name: data/0000SET/000/IMG_00001.tif micasense/image.py:73: ValueError ____ test_radiance_panel __ panel_image_name = 'data/0000SET/000/IMG_0000_1.tif' def test_radiance_panel(panel_image_name): img = image.Image(panel_image_name) tests/test_panel.py:97: ------------------------------ self = <micasense.image.Image object at 0x7f072acc7710>, image_path = 'data/0000SET/000/IMG_0000_1.tif', exiftool_obj = None def init(self, image_path, exiftool_obj=None): #print(image_path) if not os.path.isfile(image_path): raise IOError("Provided path is not a file: {}".format(imanon_panel_rededge_file_listge_path)) self.path = image_path self.meta = metadata.Metadata(self.path, exiftool_obj=exiftool_obj) if self.meta.band_name() is None: raise ValueError("Provided file path does not have a band name: {}".format(image_path)) E ValueError: Provided file path does not have a band name: data/0000SET/000/IMG_00001.tif micasense/image.py:73: ValueError ____ test_irradiancemean ____ panel_image_name = 'data/0000SET/000/IMG_0000_1.tif' def test_irradiance_mean(panel_image_name): img = image.Image(panel_image_name) tests/test_panel.py:106: ------------------------------ self = <micasense.image.Image object at 0x7f072ab267f0>, image_path = 'data/0000SET/000/IMG_0000_1.tif', exiftool_obj = None def init(self, image_path, exiftool_obj=None): #print(image_path) if not os.path.isfile(image_path): raise IOError("Provided path is not a file: {}".format(imanon_panel_rededge_file_listge_path)) self.path = image_path self.meta = metadata.Metadata(self.path, exiftool_obj=exiftool_obj) if self.meta.band_name() is None: raise ValueError("Provided file path does not have a band name: {}".format(image_path)) E ValueError: Provided file path does not have a band name: data/0000SET/000/IMG_00001.tif micasense/image.py:73: ValueError ____ test_panel_detected __ panel_image_name = 'data/0000SET/000/IMG_0000_1.tif' def test_panel_detected(panel_image_name): img = image.Image(panel_image_name) tests/test_panel.py:113: ------------------------------ self = <micasense.image.Image object at 0x7f072aa7cc88>, image_path = 'data/0000SET/000/IMG_0000_1.tif', exiftool_obj = None def init(self, image_path, exiftool_obj=None): #print(image_path) if not os.path.isfile(image_path): raise IOError("Provided path is not a file: {}".format(imanon_panel_rededge_file_listge_path)) self.path = image_path self.meta = metadata.Metadata(self.path, exiftool_obj=exiftool_obj) if self.meta.band_name() is None: raise ValueError("Provided file path does not have a band name: {}".format(image_path)) E ValueError: Provided file path does not have a band name: data/0000SET/000/IMG_0000_1.tif micasense/image.py:73: ValueError _ test_panel_not_detected __ flight_image_name = 'data/0000SET/000/IMG_0001_1.tif' def test_panel_not_detected(flight_image_name): img = image.Image(flight_image_name) tests/test_panel.py:118: ------------------------------ self = <micasense.image.Image object at 0x7f072ace5dd8>, image_path = 'data/0000SET/000/IMG_0001_1.tif', exiftool_obj = None def init(self, image_path, exiftool_obj=None): #print(image_path) if not os.path.isfile(image_path): raise IOError("Provided path is not a file: {}".format(imanon_panel_rededge_file_listge_path)) self.path = image_path self.meta = metadata.Metadata(self.path, exiftool_obj=exiftool_obj) if self.meta.band_name() is None: raise ValueError("Provided file path does not have a band name: {}".format(image_path)) E ValueError: Provided file path does not have a band name: data/0000SET/000/IMG_0001_1.tif micasense/image.py:73: ValueError ================================================================================== 67 failed, 19 passed, 41 errors in 22.88s =================================================================================== (micasense) *@.:~/Image-ExifTool-10.98/imageprocessing$ ` — You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub <#98?email_source=notifications&email_token=ABSNZU4WP3DIFZ5GP3W77G3Q4RFPTA5CNFSM4J6QTUP2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEIIJSFA#issuecomment-571513108>, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABSNZU63JWZ7IUBPVYAN5ULQ4RFPTANCNFSM4J6QTUPQ .
Thanks a lot! :)
When I run alignment and batch processing codes, I get following errors 'Panel' object has no attribute 'reflectance_from_panel_serial' & type object 'Capture' has no attribute 'reflectance_from_panel_serial'. How to define reflectance_from_panel_serial ?
Help needed! @poynting