Skip to content

Commit 1cffe91

Browse files
author
Marco Dalla Vecchia
committed
updated root mass values based on fresh new environment
1 parent 751fdea commit 1cffe91

1 file changed

Lines changed: 6 additions & 6 deletions

File tree

episodes/07-thresholding.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -512,7 +512,7 @@ measure_root_mass(filename="data/trial-016.jpg", sigma=1.5)
512512
```
513513

514514
```output
515-
0.0482436835106383`
515+
0.04907247340425532
516516
```
517517

518518
Now we can use the function to process the series of four images shown above.
@@ -525,18 +525,18 @@ and the filenames all start with the **trial-** prefix and
525525
end with the **.jpg** suffix.
526526

527527
```python
528-
all_files = glob.glob("data/trial-*.jpg")
528+
all_files = sorted(glob.glob("data/trial-*.jpg"))
529529
for filename in all_files:
530530
density = measure_root_mass(filename=filename, sigma=1.5)
531531
# output in format suitable for .csv
532532
print(filename, density, sep=",")
533533
```
534534

535535
```output
536-
data/trial-016.jpg,0.0482436835106383
537-
data/trial-020.jpg,0.06346941489361702
538-
data/trial-216.jpg,0.14073969414893617
539-
data/trial-293.jpg,0.13607895611702128
536+
data/trial-016.jpg,0.04907247340425532
537+
data/trial-020.jpg,0.06381366356382978
538+
data/trial-216.jpg,0.14205152925531914
539+
data/trial-293.jpg,0.13665791223404256
540540
```
541541

542542
::::::::::::::::::::::::::::::::::::::: challenge

0 commit comments

Comments
 (0)