|
45 | 45 |
|
46 | 46 | from .anyarray_dtypes import CDTS_AFTER_37201_DTYPE, CDTS_BEFORE_37201_DTYPE, TIB_DTYPE |
47 | 47 | from .calibration import NectarCAMR0Corrections |
48 | | -from .constants import N_GAINS, N_PIXELS, N_SAMPLES |
| 48 | +from .constants import N_GAINS, N_PIXELS, N_SAMPLES, nectarcam_location |
49 | 49 | from .containers import ( |
50 | 50 | NectarCAMDataContainer, |
51 | 51 | NectarCAMDataStreamContainer, |
@@ -636,7 +636,9 @@ def pre_v6_data(self): |
636 | 636 | return self._pre_v6_data |
637 | 637 |
|
638 | 638 | @staticmethod |
639 | | - def create_subarray(geometry_version, tel_id=0): |
| 639 | + def create_subarray( |
| 640 | + geometry_version, tel_id=0, reference_location=nectarcam_location |
| 641 | + ): |
640 | 642 | """ |
641 | 643 | Obtain the subarray from the EventSource |
642 | 644 | Returns |
@@ -675,6 +677,7 @@ def create_subarray(geometry_version, tel_id=0): |
675 | 677 | name=f"MST-{tel_id} subarray", |
676 | 678 | tel_descriptions=tel_descriptions, |
677 | 679 | tel_positions=tel_positions, |
| 680 | + reference_location=nectarcam_location, |
678 | 681 | ) |
679 | 682 |
|
680 | 683 | return subarray |
@@ -962,7 +965,7 @@ def fill_nectarcam_event_container_from_zfile(self, array_event, event): |
962 | 965 |
|
963 | 966 | if not self.pre_v6_data: |
964 | 967 | event_container.first_cell_id = np.full( |
965 | | - (N_PIXELS,), -1, dtype=event.first_cell_id.dtype |
| 968 | + (N_PIXELS,), np.nan, dtype=event.first_cell_id.dtype |
966 | 969 | ) |
967 | 970 | event_container.first_cell_id[ |
968 | 971 | self.nectarcam_service.pixel_ids |
@@ -1137,8 +1140,7 @@ def fill_r0r1_camera_container(self, zfits_event): |
1137 | 1140 | Fill the r0 or r1 container, depending on whether gain |
1138 | 1141 | selection has already happened (r1) or not (r0) |
1139 | 1142 | This will create waveforms of shape (N_GAINS, N_PIXELS, N_SAMPLES), |
1140 | | - or (N_PIXELS, N_SAMPLES) respectively regardless of the n_pixels, n_samples |
1141 | | - in the file. |
| 1143 | + regardless of the n_pixels, n_samples in the file. |
1142 | 1144 | Missing or broken pixels are filled using maxval of the waveform dtype. |
1143 | 1145 | """ |
1144 | 1146 |
|
|
0 commit comments