Ignore:
Timestamp:
03/13/12 19:33:01 (13 years ago)
Author:
neise
Message:
the same hack as in plotters was included, in order to ensure, that the map_dn.txt file is found
File:
1 edited

Legend:

Unmodified
Added
Removed
  • fact/tools/pyscripts/pyfact/coor.py

    r13026 r13089  
    2424            ex = Vector2( sqrt(3)/2. , 1./2. )
    2525        """
    26         chid, y,x,xe,ye,yh,xh,softid,hardid = np.loadtxt("../map_dn.txt",unpack=True)
     26        path = os.path.abspath(__file__)
     27        path = os.path.dirname(path)
     28        map_file_path = os.path.join(path, map_file_path)
     29        if not os.path.isfile(map_file_path):
     30            print 'not able to find file:', map_file_path
     31            sys.exit(-2)
     32
     33        chid, y,x,xe,ye,yh,xh,softid,hardid = np.loadtxt(map_file_path, unpack=True)
    2734        coors = zip(xe,ye,chid)
    2835        vectors_and_chids = []
Note: See TracChangeset for help on using the changeset viewer.