Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
library.names,
metadata={'data ignore value': 0,
'description': 'COAL ' +
pycoal.version + ' '
'mineral classified '
'image.',
'map info':
image.metadata.get(
'map info')})
# remove unused classes from the image
pycoal.mineral.MineralClassification.filter_classes(classified_file_name)
if scores_file_name is not None:
# save the scored image to a file
spectral.io.envi.save_image(scores_file_name, scored,
dtype=numpy.float64,
metadata={'data ignore value': -50,
'description': 'COAL ' +
pycoal.version + ' mineral '
'scored image.',
'map info': image.metadata.get(
'map info')})
# save the classified image to a file
spectral.io.envi.save_classification(classified_file_name, classified,
class_names=['No data'] + class_names,
metadata={'data ignore value': 0,
'description': 'COAL ' +
pycoal.version + ' mineral '
'classified '
'image.',
'map info':
image.metadata.get(
'map info')})
if scores_file_name is not None:
# save the scored image to a file
spectral.io.envi.save_image(scores_file_name, scored,
dtype=numpy.float64,
metadata={'data ignore value': -50,
'description': 'COAL ' +
pycoal.version
+ ' mineral '
'scored '
'image.',
'map info': image.metadata.get(
'map info')})