{ "cells": [ { "cell_type": "markdown", "id": "f87bd9cc-15ec-420e-b341-31a720efd44d", "metadata": {}, "source": [ "# Reading Back-up Text Files to TIFFs" ] }, { "cell_type": "code", "execution_count": 2, "id": "26eebe7d-9b7e-47ca-a692-2b3345a31e6d", "metadata": {}, "outputs": [ { "name": "stderr", "output_type": "stream", "text": [ "C:\\Users\\caiello\\AppData\\Local\\miniconda3\\envs\\Palmettobug3.10\\lib\\site-packages\\tqdm\\auto.py:21: TqdmWarning: IProgress not found. Please update jupyter and ipywidgets. See https://ipywidgets.readthedocs.io/en/stable/user_install.html\n", " from .autonotebook import tqdm as notebook_tqdm\n" ] } ], "source": [ "import numpy as np\n", "import pandas as pd\n", "import palmettobug as pbug" ] }, { "cell_type": "markdown", "id": "677c1a41-2be7-4fed-9a88-50d91a614af6", "metadata": {}, "source": [ "CHANGE This DIRECTORY to match a valid directory on your computer if you testing this tutorial on your own machine!\n", "\n", "Also \n", "NOTE!! -- This example notebook does not operate on any bundled example data\n", ". Instead, you must supply your own folder of .txt files from the Hyperion imaging system and your panel files:" ] }, { "cell_type": "code", "execution_count": null, "id": "4bfc0b9e-4f06-4f07-b8fa-213ae707ff91", "metadata": {}, "outputs": [], "source": [ "my_computer_path = \"C:/Users/Default/Desktop\"" ] }, { "cell_type": "code", "execution_count": null, "id": "f75771e2-f9f9-426c-92a9-0ddc4dee3319", "metadata": {}, "outputs": [], "source": [ "txt_file_dir = f\"{my_computer_path}/tour_text_files_here\" ## should contain a set of .txt files exported by SBI's Hyperion imaging system\n", "to_dir = f\"{my_computer_path}/write_images_to\"\n", "panel_dir = f\"{my_computer_path}/your_panel_file_here/panel.csv\"\n", "panel = pd.read_csv(panel_dir)\n", "\n", "pbug.txt_folder_to_tiff_folder(txt_file_dir, to_dir, hpf = 50, ome_tiff_metadata = True, resolutions = [1.0,1.0], panel = panel)" ] }, { "cell_type": "code", "execution_count": null, "id": "570ae3ba-78c3-4f66-a36b-445f42a1dd62", "metadata": {}, "outputs": [], "source": [] } ], "metadata": { "kernelspec": { "display_name": "Python 3 (ipykernel)", "language": "python", "name": "python3" }, "language_info": { "codemirror_mode": { "name": "ipython", "version": 3 }, "file_extension": ".py", "mimetype": "text/x-python", "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", "version": "3.10.16" } }, "nbformat": 4, "nbformat_minor": 5 }