From a31110c0ebc2ee875f0e1c0fadda610706055620 Mon Sep 17 00:00:00 2001 From: pamlashi <161363770+pamlashi@users.noreply.github.com> Date: Tue, 5 Mar 2024 09:10:46 -0600 Subject: [PATCH] Created using Colaboratory --- PA_of_SizeAnalysis.ipynb | 146 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 146 insertions(+) create mode 100644 PA_of_SizeAnalysis.ipynb diff --git a/PA_of_SizeAnalysis.ipynb b/PA_of_SizeAnalysis.ipynb new file mode 100644 index 0000000..cf71be7 --- /dev/null +++ b/PA_of_SizeAnalysis.ipynb @@ -0,0 +1,146 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": { + "id": "view-in-github", + "colab_type": "text" + }, + "source": [ + "\"Open" + ] + }, + { + "cell_type": "markdown", + "metadata": { + "id": "uM3giKLgbwgF" + }, + "source": [ + "# Analysis of the particle sizes from segmentation output\n", + "You should have an output file named `Results.csv` from FIJI/ImageJ segmentation. If you are using Google Colab to run this code, you will need to upload the file manually to Google using the `File` menu to the left. " + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "id": "GTIhuJXYbva8" + }, + "outputs": [], + "source": [ + "import pandas as pd\n", + "import numpy as np\n", + "import seaborn as sns" + ] + }, + { + "cell_type": "markdown", + "metadata": { + "id": "mBObqOWmh2Zf" + }, + "source": [ + "Write code below to read the `Results.csv` file as a pandas DataFrame and store it in the object named `measurements`. Show the head of the DataFrame." + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "id": "DaYDPgcogyxz" + }, + "outputs": [], + "source": [ + "measurements = pd.read_csv('https://raw.githubusercontent.com/VU-CSP/improc-assignment-pamlashi/main/Results.csv?token=GHSAT0AAAAAACOYLQK6RMTNWYDT6YKESICMZPGUGFQ' , sep = ',')\n", + "measurements.head()" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "id": "Mz-INH79g5Ks" + }, + "outputs": [], + "source": [ + "# Code to plot a histogram of the Area\n", + "sns.histplot(measurements['Area'])" + ] + }, + { + "cell_type": "markdown", + "metadata": { + "id": "ZtcMHckuiydC" + }, + "source": [ + "Calculate the mean and the standard deviation of the distribution and show them below. (HINT: pandas can do this easily)" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "id": "T9lYcgiBhxUE" + }, + "outputs": [], + "source": [ + "# Calculate mean\n", + "print(measurements['Area'].mean())" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "id": "UEgg0XZdi_76" + }, + "outputs": [], + "source": [ + "# Calculate standard deviation\n", + "print(measurements['Area'].std())" + ] + }, + { + "cell_type": "markdown", + "metadata": { + "id": "pE62XfF4kgwJ" + }, + "source": [ + "#### Describe your interpretation of the distribution of the measurements of nuclear area below.\n", + "Based on what you see, would you choose different value ranges of particle sizes for counting? Explain why.\n" + ] + }, + { + "cell_type": "markdown", + "metadata": { + "id": "jjaN302xvVak" + }, + "source": [] + } + ], + "metadata": { + "colab": { + "private_outputs": true, + "provenance": [], + "include_colab_link": true + }, + "kernelspec": { + "display_name": "Python 3", + "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.8.5" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} \ No newline at end of file