Skip to content

Commit 45ed290

Browse files
authored
Merge pull request #164 from cta-observatory/fix_duplicates
Fix duplicates
2 parents 579d518 + c89f25f commit 45ed290

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

README.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ necessary package channels, and install dl1-data-handler specified version and i
4343

4444
.. code-block:: bash
4545
46-
DL1DH_VER=0.14.4
46+
DL1DH_VER=0.14.5
4747
wget https://raw.githubusercontent.com/cta-observatory/dl1-data-handler/v$DL1DH_VER/environment.yml
4848
conda env create -n [ENVIRONMENT_NAME] -f environment.yml
4949
conda activate [ENVIRONMENT_NAME]

dl1_data_handler/reader.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -536,6 +536,8 @@ def _construct_mono_example_identifiers(self):
536536
dl1_tel_table.add_column(
537537
np.arange(len(dl1_tel_table)), name="table_index", index=0
538538
)
539+
# Unique the table to remove unwanted duplication
540+
dl1_tel_table = unique(dl1_tel_table, keys=["obs_id", "event_id", "tel_id"])
539541
# Join the DL1 image table with the DL1 parameter table
540542
tel_table = join(
541543
left=tel_table,
@@ -673,6 +675,8 @@ def _construct_stereo_example_identifiers(self):
673675
dl1_tel_table.add_column(
674676
np.arange(len(dl1_tel_table)), name="table_index", index=0
675677
)
678+
# Unique the table to remove unwanted duplication
679+
dl1_tel_table = unique(dl1_tel_table, keys=["obs_id", "event_id", "tel_id"])
676680
# Join the DL1 image table with the DL1 parameter table
677681
tel_table = join(
678682
left=tel_table,

0 commit comments

Comments
 (0)