Skip to content

Commit e6aac55

Browse files
Add text for raw data extracted
1 parent 586a2f9 commit e6aac55

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

chroma_gui/main.py

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -204,7 +204,9 @@ def get_timber_status(self):
204204
Otherwise, just say there is nothing.
205205
"""
206206
path_timber_data = Path(self.path / timber.constants.FILENAME)
207+
path_timber_raw = Path(self.path / timber.constants.FILENAME_HDF)
207208
if path_timber_data.exists():
209+
# First add the metadata from the timber extraction
208210
start = None
209211
end = None
210212
extracted_on = None
@@ -219,8 +221,11 @@ def get_timber_status(self):
219221
extracted_on = line.strip()
220222
if not line.startswith("#"):
221223
break
224+
# Add some text to check if the raw data has been extracted already
225+
raw_extracted = path_timber_raw.exists()
222226
message = "Existing extracted data:"
223227
message += f"\n{extracted_on}\n{start}\n{end}"
228+
message += f"\nRaw extracted: {raw_extracted}"
224229
return message, True
225230
else:
226231
return "No extraction in directory yet", False
@@ -449,9 +454,9 @@ def computeCorrections(self):
449454
# Set the text edits with the computed corrections
450455
for key, val in corrections.items():
451456
if val > 0:
452-
text[beam] += f"{key} := {key} + {val:6d} ;\n"
457+
text[beam] += f"{key} := {key} + {val} ;\n"
453458
else:
454-
text[beam] += f"{key} := {key} - {val*-1:6d} ;\n"
459+
text[beam] += f"{key} := {key} - {val*-1} ;\n"
455460

456461
corr_sum[beam] += val
457462
else:

0 commit comments

Comments
 (0)