# Renamed for workflow clarity # ...existing code from mosaic_creation.R...