Changeset 14115 for fact/tools/pyscripts/pyfact
- Timestamp:
- 06/08/12 15:11:47 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
fact/tools/pyscripts/pyfact/coor.py
r13402 r14115 26 26 """ 27 27 _CheckPath(map_file_path) 28 28 path = os.path.abspath(__file__) 29 path = os.path.dirname(path) 30 map_file_path = os.path.join(path, map_file_path) 29 31 chid, xe, ye = np.loadtxt(map_file_path, unpack=True) 30 32 # -ye in order to correct for the sign difference between my mapping file … … 69 71 chid2coor_np = {} 70 72 chid2vec = {} 73 euc2chid = {} 71 74 # we will fill these translators now. 72 75 for vector_and_chid in vectors_and_chids: … … 110 113 # the calculation of the neighbors needs it 111 114 coor2chid[ coor ] = chid 115 euc2chid[(vec[0],vec[1])] = chid 112 116 113 117 … … 140 144 self.coor2chid = coor2chid 141 145 self.chid2vec = chid2vec 146 self.euc2chid = euc2chid 142 147 143 148 # for chid in chid2nn.keys(): … … 155 160 path = os.path.dirname(path) 156 161 inpath = os.path.join(path, inpath) 157 158 162 if not os.path.isfile(inpath): 163 raise IOError('not able to find file: '+inpath) 159 164
Note:
See TracChangeset
for help on using the changeset viewer.