Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
37 changes: 30 additions & 7 deletions notebooks/ChannelRegistration.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"cells": [
{
"cell_type": "markdown",
"id": "21d1e58b",
"id": "3a463e61",
"metadata": {},
"source": [
"# NanoPyx \"Codeless\" Jupyter Notebook\n",
Expand All @@ -22,7 +22,30 @@
{
"cell_type": "code",
"execution_count": null,
"id": "b3c2a12b",
"id": "2c8eefa2",
"metadata": {
"cellView": "form"
},
"outputs": [],
"source": [
"#@title Fix numpy version in Google Colab, can be skipped if running in local environment. Session will now restart automatically. You can then proceed to the next cell.\n",
"import sys\n",
"IN_COLAB = 'google.colab' in sys.modules\n",
"if IN_COLAB:\n",
" !pip install -q numpy==1.26.4\n",
" !pip install -q mako==1.3.0\n",
"\n",
" print(\"Session will now restart automatically. You can then proceed to the next cell.\")\n",
" import os\n",
" os.kill(os.getpid(), 9)\n",
"\n",
"\n"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "b399241e",
"metadata": {
"cellView": "form"
},
Expand Down Expand Up @@ -80,7 +103,7 @@
{
"cell_type": "code",
"execution_count": null,
"id": "a5c09b00",
"id": "3515d5ba",
"metadata": {
"cellView": "form"
},
Expand Down Expand Up @@ -164,7 +187,7 @@
},
{
"cell_type": "markdown",
"id": "535b3d44",
"id": "28fd6b5d",
"metadata": {},
"source": [
"# Channel Registration Parameters: \n",
Expand All @@ -182,7 +205,7 @@
{
"cell_type": "code",
"execution_count": null,
"id": "5c4e28f4",
"id": "cc625efd",
"metadata": {
"cellView": "form"
},
Expand Down Expand Up @@ -250,7 +273,7 @@
},
{
"cell_type": "markdown",
"id": "ae281b8a",
"id": "0187c8cc",
"metadata": {},
"source": [
"## Use the following cell only if you have a previously calculated translation mask\n",
Expand All @@ -260,7 +283,7 @@
{
"cell_type": "code",
"execution_count": null,
"id": "c0e91c8c",
"id": "b7fa2ef3",
"metadata": {
"cellView": "form"
},
Expand Down
37 changes: 30 additions & 7 deletions notebooks/DriftCorrection.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"cells": [
{
"cell_type": "markdown",
"id": "4a8ab58f",
"id": "8000d90a",
"metadata": {},
"source": [
"# NanoPyx \"Codeless\" Jupyter Notebook\n",
Expand All @@ -22,7 +22,30 @@
{
"cell_type": "code",
"execution_count": null,
"id": "80886110",
"id": "8e6267d8",
"metadata": {
"cellView": "form"
},
"outputs": [],
"source": [
"#@title Fix numpy version in Google Colab, can be skipped if running in local environment. Session will now restart automatically. You can then proceed to the next cell.\n",
"import sys\n",
"IN_COLAB = 'google.colab' in sys.modules\n",
"if IN_COLAB:\n",
" !pip install -q numpy==1.26.4\n",
" !pip install -q mako==1.3.0\n",
"\n",
" print(\"Session will now restart automatically. You can then proceed to the next cell.\")\n",
" import os\n",
" os.kill(os.getpid(), 9)\n",
"\n",
"\n"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "8a1ec6e4",
"metadata": {
"cellView": "form"
},
Expand Down Expand Up @@ -80,7 +103,7 @@
{
"cell_type": "code",
"execution_count": null,
"id": "7d8288ff",
"id": "cd931d80",
"metadata": {
"cellView": "form"
},
Expand Down Expand Up @@ -164,7 +187,7 @@
},
{
"cell_type": "markdown",
"id": "c800a0e9",
"id": "c64af72e",
"metadata": {},
"source": [
"# Drift Correction Parameters: \n",
Expand All @@ -181,7 +204,7 @@
{
"cell_type": "code",
"execution_count": null,
"id": "e2d6671a",
"id": "6e00f92e",
"metadata": {
"cellView": "form"
},
Expand Down Expand Up @@ -274,7 +297,7 @@
},
{
"cell_type": "markdown",
"id": "60fc5a28",
"id": "4dee37ed",
"metadata": {},
"source": [
"## Use the following cell only if you have a previously calculated drift table\n",
Expand All @@ -284,7 +307,7 @@
{
"cell_type": "code",
"execution_count": null,
"id": "45dc3ea1",
"id": "e68d4a71",
"metadata": {
"cellView": "form"
},
Expand Down
61 changes: 42 additions & 19 deletions notebooks/ExampleDataSRRFandQC.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"cells": [
{
"cell_type": "markdown",
"id": "ccf59fd6",
"id": "0bb114f6",
"metadata": {},
"source": [
"# NanoPyx \"Codeless\" Jupyter Notebook\n",
Expand All @@ -26,7 +26,30 @@
{
"cell_type": "code",
"execution_count": null,
"id": "ac16d462",
"id": "9b1d5a74",
"metadata": {
"cellView": "form"
},
"outputs": [],
"source": [
"#@title Fix numpy version in Google Colab, can be skipped if running in local environment. Session will now restart automatically. You can then proceed to the next cell.\n",
"import sys\n",
"IN_COLAB = 'google.colab' in sys.modules\n",
"if IN_COLAB:\n",
" !pip install -q numpy==1.26.4\n",
" !pip install -q mako==1.3.0\n",
"\n",
" print(\"Session will now restart automatically. You can then proceed to the next cell.\")\n",
" import os\n",
" os.kill(os.getpid(), 9)\n",
"\n",
"\n"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "bf06f12f",
"metadata": {
"cellView": "form"
},
Expand Down Expand Up @@ -83,7 +106,7 @@
},
{
"cell_type": "markdown",
"id": "b589d195",
"id": "9b40447a",
"metadata": {},
"source": [
"## Next lets create the Data Loader GUI.\n",
Expand All @@ -94,7 +117,7 @@
{
"cell_type": "code",
"execution_count": null,
"id": "894a6951",
"id": "0facb763",
"metadata": {
"cellView": "form"
},
Expand Down Expand Up @@ -178,7 +201,7 @@
},
{
"cell_type": "markdown",
"id": "517e4a79",
"id": "9c6e9ba9",
"metadata": {},
"source": [
"## Now let's use SRRF to generate a super-resolution image\n",
Expand All @@ -187,7 +210,7 @@
},
{
"cell_type": "markdown",
"id": "b2b2ef21",
"id": "5d3afd30",
"metadata": {},
"source": [
"# SRRF Parameters:\n",
Expand All @@ -203,7 +226,7 @@
{
"cell_type": "code",
"execution_count": null,
"id": "c7fc2972",
"id": "ad5edeff",
"metadata": {
"cellView": "form"
},
Expand Down Expand Up @@ -311,7 +334,7 @@
},
{
"cell_type": "markdown",
"id": "41180535",
"id": "e32a84cf",
"metadata": {},
"source": [
"## Let's use NanoPyx to generate an error map of the SRRF image\n",
Expand All @@ -321,7 +344,7 @@
{
"cell_type": "code",
"execution_count": null,
"id": "ab02d527",
"id": "44184399",
"metadata": {
"cellView": "form"
},
Expand Down Expand Up @@ -476,7 +499,7 @@
},
{
"cell_type": "markdown",
"id": "40f389f4",
"id": "c954bc0c",
"metadata": {},
"source": [
"## Let's compare the resolution of the raw data with the SRRF using FRC and DecorrelationAnalysis. Let's start with calculation the FRC resolution of the raw data (select frame 3 and 11).\n",
Expand All @@ -485,7 +508,7 @@
},
{
"cell_type": "markdown",
"id": "b3b9ce84",
"id": "03d6c564",
"metadata": {},
"source": [
"# FRC Parameters:\n",
Expand All @@ -500,7 +523,7 @@
{
"cell_type": "code",
"execution_count": null,
"id": "6ef9e176",
"id": "3bc9fcaf",
"metadata": {
"cellView": "form"
},
Expand Down Expand Up @@ -560,7 +583,7 @@
},
{
"cell_type": "markdown",
"id": "3be3aa0a",
"id": "c064f783",
"metadata": {},
"source": [
"## Now do the same for the SRRF image\n",
Expand All @@ -570,7 +593,7 @@
{
"cell_type": "code",
"execution_count": null,
"id": "3c364a56",
"id": "a15491c4",
"metadata": {
"cellView": "form"
},
Expand Down Expand Up @@ -630,7 +653,7 @@
},
{
"cell_type": "markdown",
"id": "611e7ff7",
"id": "b070890b",
"metadata": {},
"source": [
"## Let's do the same using Decorrelation analysis\n",
Expand All @@ -639,7 +662,7 @@
},
{
"cell_type": "markdown",
"id": "19efd107",
"id": "9cf3dcf4",
"metadata": {},
"source": [
"# Image Decorrelation Analysis Parameters:\n",
Expand All @@ -655,7 +678,7 @@
{
"cell_type": "code",
"execution_count": null,
"id": "72263010",
"id": "bd63a8fe",
"metadata": {
"cellView": "form"
},
Expand Down Expand Up @@ -716,7 +739,7 @@
},
{
"cell_type": "markdown",
"id": "4c0790e7",
"id": "adb0d906",
"metadata": {},
"source": [
"## Now let's measure the resolution of the generated SRRF image using Decorrelation analysis\n",
Expand All @@ -726,7 +749,7 @@
{
"cell_type": "code",
"execution_count": null,
"id": "b87c1750",
"id": "c467203c",
"metadata": {
"cellView": "form"
},
Expand Down
Loading