The read_openephys() function computes elec_ids from electrode positions when the SELECTED_ELECTRODES field is not available (the common case for older OpenEphys recordings). This reverse calculation (position to elec_id) produces results inconsistent with SpikeGLX when the positions stored by OpenEphys do not match the canonical probe geometry. (see @chrishalcrow in #383 (comment)). This inconsistency means the same physical electrode has different contact_ids depending on whether the recording was made with SpikeGLX or OpenEphys. I think Neuropixels probes should have the same contact_ids regardless of which recording system was used.
After #383 is merged, we should add consistency tests up to the point of building the full probe so they should match if possible. If they don't match, we should make this more explicit in the code and document it. A potential fix would be to use build_neuropixels_probe() to create a full probe, then match recorded positions to the canonical electrode grid using nearest-neighbor lookup, ensuring consistency with SpikeGLX regardless of what positions OpenEphys stores.