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