Skip to content

Commit 07602a0

Browse files
authored
Merge pull request #28 from ESA-PhiLab/single-data-path-bug
Remove bug, improve syntax for model bands
2 parents a2973ee + 671e7bc commit 07602a0

2 files changed

Lines changed: 6 additions & 7 deletions

File tree

iris/project.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,7 @@ def _init_paths_and_files(self, filename):
186186
]))
187187
except Exception as error:
188188
raise Exception(
189-
f'[ERROR] Could not extract id\nfrom path"{image_path}"\nwith regex "{regex_images}"!'
189+
f'[ERROR] Could not extract id\nfrom path"{image_paths}"\nwith regex "{regex_images}"!'
190190
)
191191

192192

@@ -307,7 +307,7 @@ def get_image_bands(self, image_id):
307307
if isinstance(image[band], dict):
308308
bands.extend([f'${band}.{subband}' for subband in image[band]])
309309
else:
310-
bands.append(f'${band}')
310+
bands.append(f'{band}')
311311
return bands
312312

313313
def get_image_path(self, image_id):

iris/user/__init__.py

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -137,11 +137,10 @@ def show(user_id):
137137
def config():
138138
config = project.get_user_config(flask.session['user_id'])
139139
all_bands = project.get_image_bands(project.image_ids[0])
140-
config['segmentation']['ai_model']['bands'] = {
141-
band
142-
for band in all_bands
143-
if config['segmentation']['ai_model']['bands'] is None or band in config['segmentation']['ai_model']['bands']
144-
}
140+
141+
# If no specific bands set for model, use all bands:
142+
if config['segmentation']['ai_model']['bands'] is None:
143+
config['segmentation']['ai_model']['bands'] = all_bands
145144

146145
return flask.render_template(
147146
'user/config.html', config=config, all_bands=all_bands

0 commit comments

Comments
 (0)