Package: libarc1
libarc1: Minimal interface to ArC1ScopeLibarc1 provides a minimal way to interact with ArC1. Sometimes you need a
custom testing procedure that operates independently of the full ArC1
interface. Libarc1 enables you to build your own testing frameworks by
leveraging the capabilities of the instrument without employing the graphical
user interface. That being said libarc1 only provices a shell around the
read/write operations as well as most of the modules. Complex processing or
visualisation are beyond the scope of this library and are left to user to
develop as they see fit. Please note that libarc1 is not meant to be used in
conjuction with the ArC ONE control software but instead it's here to help you
develop application-specific tools based on the ArC1 platform.RequirementsYou need at least Python 3.6 to use this library. Other than that libarc1 only
depends on numpy and pyserial. If you're installing withpipthese will be
taken care for you.InstallationAs libarc1 is still in early stages of development it's not available in PyPI
and you should use it directly from the repository. If you havepip≥ 19.0
you can pointpipdirectly to the source repositorypipinstallgit+https://github.com/arc-instruments/libarc1Otherwise see theDevelopmentsection below on how to installpoetry. Usingpoetry buildyou will get a wheel file in thedistfolder that's installable withpipas usual.UsageIn the simplest form one can writefromlibarc1importArC1,ArC1Conf# initialise the ArC1 board. Port is platform specific; shown here for Linux.# libarc1 will take care of initialising the board with sane defaultsarc1=ArC1('/dev/ttyACM0')# alternatively a configuration can be provided as well# conf = ArC1Conf()# set read voltage to 0.2 V# conf.Vread = 0.2# arc1 = ArC1('/dev/ttyACM0', config=conf)# read a single device at W=2, B=7resistance=arc1.read_one(2,7)# pulse a device with a 100 us pulse @ 2.5 V and read its stateresistance=arc1.pulseread_one(2,7,2.5,100e-6)# select a device (W=5, B=12) by closing a specified crosspointarc1.select(5,12)# pulse the device without reading itarc1.pulse_active(2.5,100e-6)# read all devicesfordatuminarc1.read_all():# will print current word-/bitline, resistance and amplitudeprint(datum)Higher level functionality is provided in the form ofmoduleswhich provide a
self-contained test routine. In fact theread_all()method is also
implemented as a higer level module. Modules generally run in a separate thread
(as they are I/O constrained anyway) and they populate an internal buffer. The
user-facing API has been kept simple to abstract all this away from the user.fromlibarc1importArC1,ArC1Conffromlibarc1.modules.curvetracerimportCurveTracer# let's get the CurveTracer's default configurationconf=CurveTracer.default_config# and change the number of cycles to 5conf["cycles"]=5# will run the module on these crosspointsdevs=[(5,7),(9,12)]# Run it!# Please note: You don't need to instantiate CurveTracer. Just the class# is enough as libarc1 will take care of instatiating the module with the# appropriate configuration and running it in a separate threadfordatuminarc1.run_module(CurveTracer,devs,conf):# will return word-/bitline, voltage, resistance, current and cycle nr.print(x)DevelopmentIf you want to develop on libarc1 start by cloning the repository. The build
system requirespoetrywhich can by installed usingpip. Thenpoetry installwill fetch the dependencies and install them in an appropriate virtual
environment. Seethe documentationfor more
info.