Commit 955c0ec8 authored by abharadwaj1's avatar abharadwaj1

assignment questions (incomplete)

parent 76f23ea4
......@@ -31,9 +31,34 @@
},
{
"cell_type": "code",
"execution_count": null,
"execution_count": 1,
"metadata": {},
"outputs": [],
"outputs": [
{
"data": {
"application/vnd.jupyter.widget-view+json": {
"model_id": "2856fdab5f5b4ede93d2ba2ab047d2f0",
"version_major": 2,
"version_minor": 0
},
"text/plain": [
"interactive(children=(IntSlider(value=2, description='Amplitude', max=4, min=-4), IntSlider(value=4, descripti…"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/plain": [
"<function misc.plotwave(Amplitude, Frequency, Phase=0)>"
]
},
"execution_count": 1,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"from misc import *\n",
"play_with_wave()"
......@@ -84,7 +109,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.6.12"
"version": "3.7.9"
}
},
"nbformat": 4,
......
This diff is collapsed.
......@@ -13,7 +13,7 @@
},
{
"cell_type": "code",
"execution_count": 2,
"execution_count": 1,
"metadata": {},
"outputs": [
{
......@@ -22,7 +22,7 @@
"Text(0, 0.5, 'Amplitude')"
]
},
"execution_count": 2,
"execution_count": 1,
"metadata": {},
"output_type": "execute_result"
},
......@@ -65,7 +65,7 @@
},
{
"cell_type": "code",
"execution_count": 3,
"execution_count": 2,
"metadata": {},
"outputs": [
{
......@@ -100,7 +100,7 @@
},
{
"cell_type": "code",
"execution_count": 4,
"execution_count": 8,
"metadata": {},
"outputs": [
{
......@@ -129,13 +129,9 @@
"\n",
"An important point to consider while using the DFT is the relation between co-ordinate index of the frequency spectra and it's frequency. Each co-ordinate index in the frequency spectra corresponds to a specific frequency. The mapping between the index and frequency must be well understood. \n",
"\n",
"Suppose a signal has 'n' samples, with a sample spacing of 'd' units. Then, each index in the fourier transform corresponds to a shift in frequency of $\\frac{1}{n \\cdot d}$\n",
"\n",
"\n",
"sample spacing = time/number of samples\n",
"\n",
"each index corresponds to 1/(sample space*number of sample)\n",
"\n",
"or simply 1/(time)\n"
"The maximum frequency in the frequency spectra is $ \\frac{(n-1)}{2 \\cdot n \\cdot d}$. Thus, there are $\\frac{n-1}{2}$ samples in the positive and negative halves of the fourier spectra. "
]
},
{
......@@ -147,13 +143,13 @@
},
{
"cell_type": "code",
"execution_count": 5,
"execution_count": 9,
"metadata": {},
"outputs": [
{
"data": {
"application/vnd.jupyter.widget-view+json": {
"model_id": "332e129a045c44879ffa61f170b2d12c",
"model_id": "d90dc5434d284afdaef6b58f1721f456",
"version_major": 2,
"version_minor": 0
},
......@@ -170,7 +166,7 @@
"<function misc.plot_three_waves(a1, f1, a2, f2, a3, f3, const=5, tot_time=1, numpoints=1000)>"
]
},
"execution_count": 5,
"execution_count": 9,
"metadata": {},
"output_type": "execute_result"
}
......@@ -189,6 +185,15 @@
"[Next: 2-D Fourier Analysis](ip_basics_part4.ipynb#section_id2)"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Assignment \n",
"* Given a signal of length 1000 , and sampling freq of 50 Hz, what is the maximum freq in the freq spectra? Perhaps best to show as a graph? \n",
"* Given a fourier spectrum with regular indices as x axis, find the frequency corresponding to the 3 peaks "
]
},
{
"cell_type": "code",
"execution_count": null,
......@@ -213,7 +218,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.6.12"
"version": "3.7.9"
}
},
"nbformat": 4,
......
......@@ -20,7 +20,7 @@
{
"data": {
"application/vnd.jupyter.widget-view+json": {
"model_id": "bc75c90f3ea54246b8e161d0ee67f274",
"model_id": "ddee323e4d0a4fe09bea8f6a7c1168a9",
"version_major": 2,
"version_minor": 0
},
......@@ -85,7 +85,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.6.12"
"version": "3.7.9"
}
},
"nbformat": 4,
......
......@@ -25,13 +25,13 @@
},
{
"cell_type": "code",
"execution_count": 2,
"execution_count": 1,
"metadata": {},
"outputs": [
{
"data": {
"application/vnd.jupyter.widget-view+json": {
"model_id": "737e78fbafc54813b335578c5085c119",
"model_id": "7ecd6ebae03848a99497440d0723f11d",
"version_major": 2,
"version_minor": 0
},
......@@ -48,7 +48,7 @@
"<function misc.plot2Dsine(fx, fy, phase, amplitude, width=50, height=50)>"
]
},
"execution_count": 2,
"execution_count": 1,
"metadata": {},
"output_type": "execute_result"
}
......@@ -69,7 +69,7 @@
},
{
"cell_type": "code",
"execution_count": 6,
"execution_count": 2,
"metadata": {},
"outputs": [
{
......@@ -100,13 +100,13 @@
},
{
"cell_type": "code",
"execution_count": 7,
"execution_count": 3,
"metadata": {},
"outputs": [
{
"data": {
"application/vnd.jupyter.widget-view+json": {
"model_id": "e884d494dd6b4f3ab34fa99a65f06a77",
"model_id": "fa92f43de4ec4917a3fd83595ae8e133",
"version_major": 2,
"version_minor": 0
},
......@@ -123,7 +123,7 @@
"<function misc.get_fourierwave(fft, i, j, return_label=False)>"
]
},
"execution_count": 7,
"execution_count": 3,
"metadata": {},
"output_type": "execute_result"
}
......@@ -144,13 +144,13 @@
},
{
"cell_type": "code",
"execution_count": 5,
"execution_count": 4,
"metadata": {},
"outputs": [
{
"data": {
"application/vnd.jupyter.widget-view+json": {
"model_id": "c24a66774bd346a2b9e55cd4bf3c07ac",
"model_id": "7439b4fe19824c5d898ce634591bd37b",
"version_major": 2,
"version_minor": 0
},
......@@ -167,7 +167,7 @@
"<function misc.reconstruct_using_fft2d(fft, ic, jc, boxwidth, boxheight)>"
]
},
"execution_count": 5,
"execution_count": 4,
"metadata": {},
"output_type": "execute_result"
}
......@@ -187,13 +187,13 @@
},
{
"cell_type": "code",
"execution_count": 8,
"execution_count": 5,
"metadata": {},
"outputs": [
{
"data": {
"application/vnd.jupyter.widget-view+json": {
"model_id": "6a63f5bc537b4142a79a77ba03c41853",
"model_id": "2e13fba83c974fddbec86764bdefd5d7",
"version_major": 2,
"version_minor": 0
},
......@@ -210,7 +210,7 @@
"<function misc.reconstruct_using_ifft2d(fft, ic, jc, boxwidth, boxheight)>"
]
},
"execution_count": 8,
"execution_count": 5,
"metadata": {},
"output_type": "execute_result"
}
......@@ -317,6 +317,14 @@
"[Next: Convolutions](ip_basics_part6.ipynb#section_id2)"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Assignments\n",
"* Choose the kind of filter to perform filter out certain regular noise (repeated structure, like graphene)"
]
},
{
"cell_type": "code",
"execution_count": null,
......@@ -341,7 +349,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.6.12"
"version": "3.7.9"
}
},
"nbformat": 4,
......
This source diff could not be displayed because it is too large. You can view the blob instead.
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment