<commit_before>from labtronyx.Base_Script import Base_Script

import sys
import time
import struct
import csv

import serial
import numpy as np

class t_AMPED(Base_Script):
    
    test_info = {
        'name': "AMPED v2.2 Test Suite",
        'version': 1.0
    }
    
    def open(self):
        # Manually load some instruments
        try:
            conv_uuid = self.instr.findResource('localhost', 'COM39')[0] # COM15 for the nice RS-485 converters
            self.instr.loadModel(conv_uuid, 'models.UPEL.AMPED.m_BMS', 'm_BMS')
            self.logger.debug("Registered AMPED BMS on COM39")
            
            load_uuid = self.instr.findResource('localhost', 'COM46')[0]
            self.instr.loadModel(load_uuid, 'models.BK_Precision.Load.m_85XX', 'm_85XX')
            self.logger.debug("Registered BK Load on COM46")
        except:
            pass
            
        # Instruments
        self.requireInstrument('DMM - Primary Voltage', 'pri_voltage', serial='MY48005640') #'123F12106')
        self.requireInstrument('DMM - Primary Current', 'pri_current', serial='123D12535')
        self.requireInstrument('DMM - Secondary Voltage', 'sec_voltage', serial='MY48005608') #'123E12681')
        self.requireInstrument('DMM - Secondary Current', 'sec_current', serial='123F12106') #'123G11250')
        self.requireInstrument('Source - Primary', 'pri_source', serial='602078010696820011')
        self.requireInstrument('Source - Secondary', 'sec_source', serial='00257')<commit_msg>Began to modify AMPED script to comply with new API<commit_after>from labtronyx.Base_Script import Base_Script

import sys
import time
import struct
import csv

import serial
import numpy as np

class t_AMPED(Base_Script):
    
    test_info = {
        'name': "AMPED v2.2 Test Suite",
        'version': 1.0
    }
    
    def open(self):
        # Manually load some instruments
        try:
            conv = self.instr.findInstrument(resID='COM39')[0] # COM15 for the nice RS-485 converters
            conv.loadDriver('UPEL.AMPED.m_BMS')
            self.logger.debug("Registered AMPED BMS on COM39")
            
            load = self.instr.findInstrument(resID='COM46')[0]
            load.loadDriver('BK_Precision.Load.m_85XX')
            self.logger.debug("Registered BK Load on COM46")
        except:
            pass
            
        # Instruments
        self.requireInstrument('DMM - Primary Voltage', 'pri_voltage', serial='MY48005640') #'123F12106')
        self.requireInstrument('DMM - Primary Current', 'pri_current', serial='123D12535')
        self.requireInstrument('DMM - Secondary Voltage', 'sec_voltage', serial='MY48005608') #'123E12681')
        self.requireInstrument('DMM - Secondary Current', 'sec_current', serial='123F12106') #'123G11250')
        self.requireInstrument('Source - Primary', 'pri_source', serial='602078010696820011')
        self.requireInstrument('Source - Secondary', 'sec_source', serial='00257')
{'fraction_non_alphanumeric': 0.11752786220871327, 'fraction_numerical': 0.06822019587977035, 'mean_word_length': 2.949333333333333, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2085076', 'n_tokens_mistral': 1059, 'n_tokens_neox': 909, 'n_words': 196}