From f6b47121238d699066b110399e6b1619773752bf Mon Sep 17 00:00:00 2001 From: amartin Date: Sat, 03 Nov 2007 05:39:53 +0000 Subject: instruments saved by name --- (limited to 'common/Util/InstrumentDB.py') diff --git a/common/Util/InstrumentDB.py b/common/Util/InstrumentDB.py index 82c0e56..d11fed8 100644 --- a/common/Util/InstrumentDB.py +++ b/common/Util/InstrumentDB.py @@ -100,6 +100,13 @@ class InstrumentDB: def getInstrument( self, id ): return self.inst[id] + def getInstrumentByName( self, name ): + try: + return self.instNamed[ name ] + except: + print "Instrument not found: ", name + return self.inst[0] + def debug_summarize(self): for i in self.inst: print i.id, i.name -- cgit v0.9.1