cherenkov-plenoscope / cable_robo_mount

a novel mount for the Cherenkov-plenoscope
MIT License
0 stars 0 forks source link

Issue with the deformed reflector (completely crazy) #34

Closed spirosd closed 7 years ago

spirosd commented 7 years ago

Code from the main file: """ nodes_deformed = rs.SAP2000_bridge.HomTra_bridge_tools.get_nodes_zenith_position(nodes_deformed_rotated, homogenous_transformation)

reflector = rs.factory.generate_reflector(geometry) reflector_deformed = reflector.copy() reflector_deformed["nodes"]= nodes_deformed[:reflector["nodes"].copy().shape[0]] """

After running the mctracer I get the following error in terminal: C:\Users\Spiros Daglas\Anaconda3\lib\site-packages\numpy\lib\npyio.py:1487: UserWarning: genfromtxt: Empty input file: "out1_0" warnings.warn('genfromtxt: Empty input file: "%s"' % fname)

IndexError Traceback (most recent call last)

in () 91 mctracer_server.execute('rm -r '+run_path) 92 ---> 93 res = rs.mctracer_bridge.star_light_analysis.read_sensor_response('out1_0') 94 ground_res = rs.mctracer_bridge.star_light_analysis.read_sensor_response('out1_1') 95 image = rs.mctracer_bridge.star_light_analysis.make_image_from_sensor_response(reflector, res, rs.mctracer_bridge.star_light_analysis.config) c:\users\spiros daglas\desktop\robo_mount\reflector_study\mctracer_bridge\star_light_analysis.py in read_sensor_response(path) 26 response = np.genfromtxt(path) 27 return { ---> 28 'x': response[:,0], 29 'y': response[:,1], 30 #'cos_x': response[:,2], IndexError: too many indices for array The problem is in reflector_deformed. Explanation: If I assume a reflector_deformed["nodes"] = reflector["nodes"] + 0.5, mctracer works like a charm. The type of reflector_deformed is ndarray, ndarray, float64 and the shapes are of course the same. WTF???
spirosd commented 7 years ago

fixed