summaryrefslogtreecommitdiff
path: root/Electronic_Instrumentation_and_Measurements/Chapter10.ipynb
blob: 66963b37e54e451bd133e8c0b929ce86b3faf2d8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
{
 "metadata": {
  "name": "",
  "signature": "sha256:c81ea1dd6c9cc1e2e41ac05c3336a82a69ef851ca3e89f18fcee6fcbfb433811"
 },
 "nbformat": 3,
 "nbformat_minor": 0,
 "worksheets": [
  {
   "cells": [
    {
     "cell_type": "heading",
     "level": 1,
     "metadata": {},
     "source": [
      "Chapter10 - Special Oscilloscopes"
     ]
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 10.11.1 - page10-18"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "# sampling rate\n",
      "#Given data :\n",
      "N=10.0 #number of cycles\n",
      "f1=1*10**3 #in Hz\n",
      "f2=100*10**3 # in Hz\n",
      "sampling_period1=N/f1 # in seconds\n",
      "sampling_frequency1=1/sampling_period1 # in Hz\n",
      "print \"sampling frequency of 1 kHz signal is \", sampling_frequency1, \" samples/second\"\n",
      "sampling_period2=N/f2 # in seconds\n",
      "sampling_frequency2=1/sampling_period2 # in Hz\n",
      "print \"sampling frequency of 100 kHz signal is \", sampling_frequency2,\" samples/second\""
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "sampling frequency of 1 kHz signal is  100.0  samples/second\n",
        "sampling frequency of 100 kHz signal is  10000.0  samples/second\n"
       ]
      }
     ],
     "prompt_number": 5
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example10.13.1 - page10-22"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "# sampling rate\n",
      "#Given data :\n",
      "N=10.0 #number of cycles\n",
      "f=1*10**3 #in Hz\n",
      "sampling_period=N/f # in seconds\n",
      "sampling_rate=1/sampling_period # in Hz\n",
      "print \"sampling rate is \",sampling_rate,\" samples/second\""
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "sampling rate is  100.0  samples/second\n"
       ]
      }
     ],
     "prompt_number": 4
    }
   ],
   "metadata": {}
  }
 ]
}