alma_pcal filters the input alist by (among other criteria) the reference station. In rare cases, different baselines to the reference station have different numbers of channels (e.g., some baselines have a flagged/missing channel). The script calls params -> getfringefile -> mk4.fringe and takes the returned nchan as the channel count, but that value corresponds to one baseline’s fringe file and may not match other baselines to the reference station. This breaks downstream assumptions about a uniform channel count between baselines and the script fails.
A typical error looks like
ValueError: Length mismatch: Expected axis has 32 elements, new values have 31 elements