"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"\n",
"\n",
"#varable Declaration\n",
"span=1000.0 #given value of span in \u00b0C\n",
"accuracy=1.0/100.0 #1% accuracy\n",
"\n",
"#calculations\n",
"err=span*accuracy\n",
"max_scale=1200.0\n",
"Range_instr=max_scale+span\n",
"meter_reading=700.0\n",
"per_of_err=(err/meter_reading)*100.0\n",
"\n",
"#result\n",
"print('(a)\\nAs error can be either positive or negative') \n",
"print('\\n the probable error at any point on the scale =\u00b1 %d\u00b0C'%err)\n",
"print('\\n(b)\\nRange of the Instrument = %d\u00b0C'%Range_instr)\n",
"print('\\n(c)\\nPercentage of Error = \u00b1 %.2f%% '%per_of_err)"
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"(a)\n",
"As error can be either positive or negative\n",
"\n",
" the probable error at any point on the scale =\u00b1 10\u00b0C\n",
"\n",
"(b)\n",
"Range of the Instrument = 2200\u00b0C\n",
"\n",
"(c)\n",
"Percentage of Error = \u00b1 1.43% "
]
}
],
"prompt_number": 10
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"
Example 1.3, Page Number: 54
"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"\n",
"\n",
"#variable declaration\n",
"resi_per_leg=5.0 # lead wire resistance per leg in Ohm\n",
"temp_coeff=0.385 # Temperature coefficient of Pt 100 RTD in ohms/\u00b0C\n",
"\n",
"#calculation\n",
"R_due_to_leadwires=2*resi_per_leg\n",
"err=R_due_to_leadwires/temp_coeff\n",
"err =round(err,0)\n",
"temp_obj=200.0\n",
"temp_measured=temp_obj+err\n",
"per_of_err=((temp_measured-temp_obj)/temp_obj)*100.0\n",
"\n",
"#Result\n",
"print('(a)\\nThe contribution of 10 ohms lead wire resistance')\n",
"print('to the measurement error = %d\u00b0C' %err)\n",
"print('\\n(b)\\nPercentage of Error = %d%%' %per_of_err)"
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"(a)\n",
"The contribution of 10 ohms lead wire resistance\n",
"to the measurement error = 26\u00b0C\n",
"\n",
"(b)\n",
"Percentage of Error = 13%"
]
}
],
"prompt_number": 3
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"