Skip to content

Commit

Permalink
0.4.1
Browse files Browse the repository at this point in the history
  • Loading branch information
semiautomaticgit committed Jul 21, 2024
1 parent d46f994 commit e21bf39
Show file tree
Hide file tree
Showing 6 changed files with 19 additions and 13 deletions.
6 changes: 6 additions & 0 deletions docs/source/changelog.rst
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
Changelog
===============

v0.4.1
________

* Fixed preprocessing calculation
* Minor fixes

v0.4.0
________

Expand Down
4 changes: 2 additions & 2 deletions docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@
project = 'Remotior Sensus'
copyright = '2022-2024, Luca Congedo'
author = 'Luca Congedo'
release = '0.4.0'
version = '0.4.0.1'
release = '0.4.1'
version = '0.4.1.1'


# -- General configuration ---------------------------------------------------
Expand Down
2 changes: 1 addition & 1 deletion src/remotior_sensus/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,6 @@
from remotior_sensus.core.session import Session
from remotior_sensus.core import configurations

__version__ = '0.4.0'
__version__ = '0.4.1'

configurations.version = __version__
12 changes: 4 additions & 8 deletions src/remotior_sensus/core/spectral_signatures.py
Original file line number Diff line number Diff line change
Expand Up @@ -565,9 +565,7 @@ def import_file(self, file_path):
if f_name == 'geometry.gpkg':
geometry_file = f
elif f_name == 'table':
table = np.core.records.fromfile(
f, dtype=cfg.spectral_dtype_list
)
table = np.rec.fromfile(f, dtype=cfg.spectral_dtype_list)
# remove file
files_directories.remove_file(f)
elif f_name == 'macroclasses.xml':
Expand Down Expand Up @@ -604,7 +602,7 @@ def import_file(self, file_path):
signature_id = generate_signature_id()
signature_ids[f_name] = signature_id
f_name = signature_id
self.signatures[f_name] = np.core.records.fromfile(
self.signatures[f_name] = np.rec.fromfile(
f, dtype=cfg.signature_dtype_list
)
# remove file
Expand Down Expand Up @@ -1044,9 +1042,7 @@ def load(self, file_path):
if f_name == 'geometry.gpkg':
self.geometry_file = f
elif f_name == 'table':
self.table = np.core.records.fromfile(
f, dtype=cfg.spectral_dtype_list
)
self.table = np.rec.fromfile(f, dtype=cfg.spectral_dtype_list)
# remove file
files_directories.remove_file(f)
elif f_name == 'macroclasses.xml':
Expand Down Expand Up @@ -1082,7 +1078,7 @@ def load(self, file_path):
# remove file
files_directories.remove_file(f)
else:
self.signatures[f_name] = np.core.records.fromfile(
self.signatures[f_name] = np.rec.fromfile(
f, dtype=cfg.signature_dtype_list
)
# remove file
Expand Down
4 changes: 4 additions & 0 deletions src/remotior_sensus/tools/band_clustering.py
Original file line number Diff line number Diff line change
Expand Up @@ -254,6 +254,10 @@ def _k_means_iter(
band_order = list(range(len(input_raster_list)))
# add classification raster
input_raster_list.append(output_path)
if _signature_catalog is None:
cfg.logger.log.error('unable to calculate')
cfg.messages.error('unable to calculate')
return None
class_list = _signature_catalog.macroclasses.keys()
# calculate new spectral signatures
cfg.multiprocess.run(
Expand Down
4 changes: 2 additions & 2 deletions src/remotior_sensus/tools/preprocess_products.py
Original file line number Diff line number Diff line change
Expand Up @@ -500,7 +500,7 @@ def perform_preprocess(
# HLS Landsat
if len(landsat_hls_product) > 0:
# raster is interpreted as variable in the calculation
string_0 = 'np.where(%s < 0, 0, %s)' % (
string_0 = 'where(%s < 0, 0, %s)' % (
cfg.array_function_placeholder, cfg.array_function_placeholder
)
expressions = [string_0] * len(landsat_hls_product)
Expand All @@ -522,7 +522,7 @@ def perform_preprocess(
# HLS Sentinel-2
if len(sentinel_hls_product) > 0:
# raster is interpreted as variable in the calculation
string_0 = 'np.where(%s < 0, 0, %s)' % (
string_0 = 'where(%s < 0, 0, %s)' % (
cfg.array_function_placeholder, cfg.array_function_placeholder
)
expressions = [string_0] * len(sentinel_hls_product)
Expand Down

0 comments on commit e21bf39

Please sign in to comment.