XENON1T / pax

The XENON1T raw data processor [deprecated]
BSD 3-Clause "New" or "Revised" License
16 stars 15 forks source link

Errors with s1_3d_pattern branch #239

Closed sanderbreur closed 8 years ago

sanderbreur commented 8 years ago

When I process radon events from raw XED files with the s1_3d_pattern branch I get the following errors:

Selecting file /archive/data/xenon100/run_10/xe100_110423_1252/xe100_110423_1252_000002.xed (number 3/110 in folder) for reading Event: |----------| 24/1016 2% [elapsed: 00:29 left: 20:13, 0.82 iters/sec]Traceback (most recent call last): File "/home/breur/anaconda3/bin/paxer", line 6, in exec(compile(open(file).read(), file, 'exec')) File "/home/breur/pax/bin/paxer", line 465, in main() File "/home/breur/pax/bin/paxer", line 280, in main pax_instance.run() File "/home/breur/pax/pax/core.py", line 451, in run self.process_event(event) File "/home/breur/pax/pax/core.py", line 410, in process_event event = plugin.process_event(event) File "/home/breur/pax/pax/plugin.py", line 84, in process_event event = self._process_event(event) File "/home/breur/pax/pax/plugin.py", line 100, in _process_event return self.transform_event(event) File "/home/breur/pax/pax/plugins/interaction_processing/BuildInteractions.py", line 97, in transform_event expected_pattern=self.s1_patterns.expected_pattern((ia.x, ia.y, ia.drift_time)), File "/home/breur/pax/pax/PatternFitter.py", line 84, in expected_pattern bes = self.get_bin_indices(coordinates) File "/home/breur/pax/pax/PatternFitter.py", line 141, in get_bin_indices return [self._get_bin_index(x, dimension_i) for dimension_i, x in enumerate(coordinates)] File "/home/breur/pax/pax/PatternFitter.py", line 141, in return [self._get_bin_index(x, dimension_i) for dimension_i, x in enumerate(coordinates)] File "/home/breur/pax/pax/PatternFitter.py", line 150, in _get_bin_index raise CoordinateOutOfRangeException("%s is not in allowed range %s-%s" % (value, cd.minimum, cd.maximum)) pax.exceptions.CoordinateOutOfRangeException: 219315.0100618299 is not in allowed range 0.0-200000.0 working on /archive/data/xenon100/run_10/xe100_110423_1252

Event: |----------| 27/828 3% [elapsed: 00:32 left: 15:51, 0.84 iters/sec]ReadXED MainProcess L86 INFO InputFromFolder: Selecting file /archive/data/xenon100/run_10/xe100_110503_1639/xe100_110503_1639_000004.xed (number 5/121 in folder) for reading Traceback (most recent call last): File "/home/breur/anaconda3/bin/paxer", line 6, in exec(compile(open(file).read(), file, 'exec')) File "/home/breur/pax/bin/paxer", line 465, in main() File "/home/breur/pax/bin/paxer", line 280, in main pax_instance.run() File "/home/breur/pax/pax/core.py", line 451, in run self.process_event(event) File "/home/breur/pax/pax/core.py", line 410, in process_event event = plugin.process_event(event) File "/home/breur/pax/pax/plugin.py", line 84, in process_event event = self._process_event(event) File "/home/breur/pax/pax/plugin.py", line 100, in _process_event return self.transform_event(event) File "/home/breur/pax/pax/plugins/interaction_processing/BuildInteractions.py", line 77, in transform_event ia.s1_areacorrection = self.s1_correction_map.get_value_at(ia) File "/home/breur/pax/pax/utils.py", line 141, in get_value_at return self.getvalue([getattr(position, q) for q in position_names[:self.dimensions]], map_name=map_name) File "/home/breur/pax/pax/utils.py", line 149, in get_value result = self.interpolatorsmap_name File "/home/breur/pax/pax/utils.py", line 81, in call return np.average(self.values[indices], weights=1/np.clip(distances, 1e-6, float('inf'))) IndexError: index 1450 is out of bounds for axis 1 with size 1450 working on /archive/data/xenon100/run_10/xe100_110503_1639

Event: |----------| 58/1173 4% [elapsed: 00:59 left: 19:03, 0.97 iters/sec] Traceback (most recent call last): File "/home/breur/anaconda3/bin/paxer", line 6, in exec(compile(open(file).read(), file, 'exec')) File "/home/breur/pax/bin/paxer", line 465, in main() File "/home/breur/pax/bin/paxer", line 280, in main pax_instance.run() File "/home/breur/pax/pax/core.py", line 451, in run self.process_event(event) File "/home/breur/pax/pax/core.py", line 410, in process_event event = plugin.process_event(event) File "/home/breur/pax/pax/plugin.py", line 84, in process_event event = self._process_event(event) File "/home/breur/pax/pax/plugin.py", line 100, in _process_event return self.transform_event(event) File "/home/breur/pax/pax/plugins/interaction_processing/BuildInteractions.py", line 97, in transform_event expected_pattern=self.s1_patterns.expected_pattern((ia.x, ia.y, ia.drift_time)), File "/home/breur/pax/pax/PatternFitter.py", line 86, in expected_pattern return self.data[bes].copy() IndexError: index 32 is out of bounds for axis 0 with size 32

This happens in the first 50 to 100 events and craches it. (I just show one of every sort of error :)

pelssers commented 8 years ago

What s2_lce_map_zoom_factor are you using? I just now started trying other zoom factors than 2 and also get occasional CoordinateOutOfRangeException exceptions. I'm not yet sure if this is related.

Edit: Ah.. of course you are working with the s1 map

JelleAalbers commented 8 years ago

The first error is due to an "interaction" with drift time beyond the TPC: we should probably just use the value at the edge of the map for these (and the map should end at 180, not 200). It could be that the other errors are similar, I'll have a look tomorrow.

sanderbreur commented 8 years ago

Bart, I use the standard xenon100 ini (so 2). Ty Jelle :)

Op ma 5 okt. 2015 om 18:29 schreef Jelle Aalbers notifications@github.com:

The first error is due to an "interaction" with drift time beyond the TPC: we should probably just use the value at the edge of the map for these (and the map should end at 180, not 200). It could be that the other errors are similar, I'll have a look tomorrow.

— Reply to this email directly or view it on GitHub https://github.com/XENON1T/pax/issues/239#issuecomment-145591543.

JelleAalbers commented 8 years ago

There was an error in how PatternFitter's bin indexing code handled zooming, which got worse at high zoom factors (basically off-by-one error which got magnified). Should be fixed now, also in master.

pelssers commented 8 years ago

Hi Jelle, Thanks for the fix, this was also causing my CoordinateOutOfRangeException when using higher zoom factors for the s2 map. Should we have a patch on PAX v4.0.0?

JelleAalbers commented 8 years ago

Good idea: @tunnell, willing to release 4.0.1?