Package: ds20kdb-avt
DarkSide-20k pre-production database low-level interactionThis is a cross-platform Python interface to the DarkSide-20k pre-production database. It is sufficiently friendly to be used interactively, and can be used as a foundation to build more complex database interactions. The package includes a number of command-line automation scripts.The software can be obtained/upgraded frompypi.orgusingpython3 -m pip install --upgrade ds20kdb-avt.The software requires Python 3.8 or newer for full functionality, though it will tolerate Python 3.6 and 3.7.Example interactive usageThe following can be performed once authentication has been configured:macbook:packagingavt$.~/dev/pve312/bin/activate(pve312)macbook:packagingavt$python3Python3.12.0(main,Oct22023,18:38:13)[Clang14.0.3(clang-1403.0.22.14.1)]ondarwinType"help","copyright","credits"or"license"formoreinformation.>>>fromds20kdbimportinterface>>># check version number with>>>interface.__version__'0.1.20'>>># create an instance so we can interact with the database>>>db=interface.Database()>>># basic describe and get operations>>>db.describe().data['vasic','vasic_grip_ring','vasic_wafer','vcable','detector','dummy','user_test','dummyload_test','motherboard','sipm','wafer','pcb','pdu','pdu_pulse_test','attribute_description','solder','attribute','vpcb','vpdu','vpcb_asic','vpcb_asic_test','vmotherboard','vpcb_test','vmotherboard_test','tile_test','wafer_defects','vtile','pcb_test','tile','dummyload','cryoprobe_card','tile_setup','vpdu_test','vtile_cold_test','noa_users','vtile_test','pdu_status','vasic_test','tile_status','sipm_qc','sipm_test','vpdu_cold_test','acs','wafer_status','pcb_status','motherboard_status','amicra_settings']>>>db.describe('wafer').data['wafer_pid','manufacturer','lot','wafer_number','production_date','spad_size','dose','description','checksum']>>>db.get('wafer').datawafer_pidmanufacturerlot...dosedescriptionchecksum0529262109...3backside:Au2Lpressure1weekwaitingrunB-...--1629262109...3backside:Au1Hpressure1weekwaitingrunA-...--2229262109...3backside:Au1Hpressure2weekswaitingrunA...--3429262109...3backside:Au1Hpressure1weekwaitingrunA-...--4329262109...3backside:Au3Lpressure1weekwaitingrunC-...--........................1610159929473059...3productionlotE01611160029473059...3productionlotD31612160229473059...3productionlotC11613160129473059...3productionlotC61614129262109...3backside:Au2Lpressure2weekswaitingrunB...--[1615rowsx9columns]>>># narrow the selection>>>db.get('wafer',lot=9262109,wafer_number=3).datawafer_pidmanufacturer...descriptionchecksum012...backside:Au2Lpressure2weekswaitingrunB...NaN[1rowsx9columns]>>># obtain specific values, such as the expiry data of a syringe of solder using something like this:>>>db.get('solder',solder_pid=1).data.expiry_date.values[-1]'2022-12-02 00:00:00'>>>db.get('solder',solder_pid=1).data.solder_type.values[-1]'Indium Paste NC-SMQ80 Ind#1E 52In48Sn Type 4 83%, P.No. 83752'>>># and create new entries easily>>># E.g. to create a new solder syringe, first find one that we can modify:>>>solder_pid=db.get('solder',solder_pid=4).data.solder_pid.values[-1]>>>solder_pid4# take a quick look at the dictionary that defines it:>>>select={'solder_pid':solder_pid}>>>db.get_table_row_and_modify('solder',select){'manufacturer':4,'solder_type':'Indium Paste NC-SMQ80 Ind#1E 52In48Sn Type 4 83%, P.No. 83752','production_date':'2022-06-02 00:00:00','room_temperature_date':'2022-10-26 19:45:00','expiry_date':'2022-12-02 00:00:00','syringe_id':8,'lot':'PS11120734','mass':25}>>># plan to change the room temperature data and the syringe id>>>modify={'room_temperature_date':'2022-11-26 11:00:00','syringe_id':9}>>># create a new dictionary with the desired changes>>>wdict=db.get_table_row_and_modify('solder',select,modify)>>>wdict{'manufacturer':4,'solder_type':'Indium Paste NC-SMQ80 Ind#1E 52In48Sn Type 4 83%, P.No. 83752','production_date':'2022-06-02 00:00:00','room_temperature_date':'2022-11-26 11:00:00','expiry_date':'2022-12-02 00:00:00','syringe_id':9,'lot':'PS11120734','mass':25}>>># we can then write this to the database with:>>>db.write_solder(wdict)