Skip to content
Snippets Groups Projects
Commit a1e92bd4 authored by Recolic Keghart's avatar Recolic Keghart
Browse files

f

parent 063c2bfa
No related branches found
No related tags found
No related merge requests found
#!/bin/env python3
# -*- coding: UTF-8 -*-
# Scan if there's any empty seat to play physics exp..
# License: Unauthorized copy is strictly FORBIDDEN.
# By Recolic Keghart, Apr 26, 2017
import urllib.parse, urllib.request
......
......@@ -2,9 +2,14 @@ import numpy
import sys
from quickmap import GetMap as draw
print('Usage: python va.py path/va-dat.in <Voltmeter range(V)> <Ammeter range(mA)> <fit line>')
print('Example: python3 va.py va-dat.in 1 15 true')
dat=numpy.loadtxt(sys.argv[1], delimiter=' ')
Uraw,Iraw=dat[:,0],dat[:,1]
U=[utrue/100*5 for utrue in Uraw]
I=[itrue/150*7.5 for itrue in Iraw]
U=[utrue/100*float(sys.argv[2]) for utrue in Uraw]
I=[itrue/150*float(sys.argv[3]) for itrue in Iraw]
# 1V 15mA. Edit it to adjust Ammeter/Voltmeter range.
draw(I,U)
if sys.argv[4] == 'true':
draw(I,U,line=True,passO=True)
else:
draw(I,U)
import numpy
import sys
from quickmap import GetMap as draw
dat=numpy.loadtxt(sys.argv[1], delimiter=' ')
Uraw,Iraw=dat[:,0],dat[:,1]
U=[utrue/100*2.5 for utrue in Uraw]
I=[itrue/150*30 for itrue in Iraw]
draw(I,U,line=True,passO=True)
import numpy
import sys
from quickmap import GetMap as draw
dat=numpy.loadtxt(sys.argv[1], delimiter=' ')
Uraw,Iraw=dat[:,0],dat[:,1]
U=[utrue/100*5 for utrue in Uraw]
I=[itrue/150*15 for itrue in Iraw]
# 1V 15mA. Edit it to adjust Ammeter/Voltmeter range.
draw(I,U)
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment