You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Now we can use the function to process the series of four images shown above.
@@ -525,20 +525,28 @@ and the filenames all start with the **trial-** prefix and
525
525
end with the **.jpg** suffix.
526
526
527
527
```python
528
-
all_files = glob.glob("data/trial-*.jpg")
528
+
all_files =sorted(glob.glob("data/trial-*.jpg"))
529
529
for filename in all_files:
530
530
density = measure_root_mass(filename=filename, sigma=1.5)
531
531
# output in format suitable for .csv
532
532
print(filename, density, sep=",")
533
533
```
534
534
535
535
```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
540
540
```
541
541
542
+
::::::::::::::::::::::::::::::::::::::::: callout
543
+
544
+
Compare your results with the values above. Do they match exactly? You may find that certain decimal values differ slightly, even when using identical input parameters.
545
+
546
+
This variation often stems from the specific versions of your installed packages (such as `numpy` or `scikit-image`). As these libraries evolve, updates can introduce subtle changes in numerical handling, underlying algorithms, or rounding logic. This highlights why reproducible environments, as well as reproducible code, are essential for consistent scientific computing.
547
+
548
+
:::::::::::::::::::::::::::::::::::::::::
549
+
542
550
::::::::::::::::::::::::::::::::::::::: challenge
543
551
544
552
## Ignoring more of the images -- brainstorming (10 min)
0 commit comments