generated from darrentyson/GitHub-Classroom-Introductory-Assignment
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
146 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,146 @@ | ||
{ | ||
"cells": [ | ||
{ | ||
"cell_type": "markdown", | ||
"metadata": { | ||
"id": "view-in-github", | ||
"colab_type": "text" | ||
}, | ||
"source": [ | ||
"<a href=\"https://colab.research.google.com/github/VU-CSP/github-classroom-intro-pamlashi/blob/main/PA_of_SizeAnalysis.ipynb\" target=\"_parent\"><img src=\"https://colab.research.google.com/assets/colab-badge.svg\" alt=\"Open In Colab\"/></a>" | ||
] | ||
}, | ||
{ | ||
"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 | ||
} |