Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merging muon files fails sometimes #1191

Open
morcuended opened this issue Dec 7, 2023 · 2 comments
Open

Merging muon files fails sometimes #1191

morcuended opened this issue Dec 7, 2023 · 2 comments

Comments

@morcuended
Copy link
Member

Traceback (most recent call last):
  File "/fefs/aswg/software/conda/envs/osa-v0.10/lib/python3.11/site-packages/astropy/table/operations.py", line 1481, in _vstack
    col = col_cls.info.new_like(cols, n_rows, metadata_conflicts, out_name)
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/fefs/aswg/software/conda/envs/osa-v0.10/lib/python3.11/site-packages/astropy/table/column.py", line 482, in new_like
    attrs = self.merge_cols_attributes(
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/fefs/aswg/software/conda/envs/osa-v0.10/lib/python3.11/site-packages/astropy/utils/data_info.py", line 752, in merge_cols_attributes
    out["dtype"] = metadata.common_dtype(cols)
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/fefs/aswg/software/conda/envs/osa-v0.10/lib/python3.11/site-packages/astropy/utils/metadata.py", line 75, in common_dtype
    raise tme
astropy.utils.metadata.MergeConflictError: Arrays have incompatible types ['bool', 'float64']

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/var/spool/slurm//job30431945/slurm_script", line 8, in <module>
    sys.exit(main())
             ^^^^^^
  File "/fefs/aswg/software/conda/envs/osa-v0.10/lib/python3.11/site-packages/lstchain/scripts/lstchain_merge_muon_files.py", line 67, in main
    tab = vstack([tab, tab2])
          ^^^^^^^^^^^^^^^^^^^
  File "/fefs/aswg/software/conda/envs/osa-v0.10/lib/python3.11/site-packages/astropy/table/operations.py", line 682, in vstack
    out = _vstack(tables, join_type, col_name_map, metadata_conflicts)
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/fefs/aswg/software/conda/envs/osa-v0.10/lib/python3.11/site-packages/astropy/table/operations.py", line 1485, in _vstack
    raise TableMergeError(
astropy.table.np_utils.TableMergeError: The 'good_ring' columns have incompatible types: ['bool', 'float64']
@morcuended morcuended changed the title Merge muon files fail sometimes Merging muon files fails sometimes Dec 7, 2023
@moralejo
Copy link
Collaborator

I think this is related to (rare) files with no entries, in which some columns get a wrong default type. Can you check?

@rlopezcoto
Copy link
Contributor

there used to be a check for files with no entries in lstchain, do not recall exactly where...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants