The add_to_nwbfile() method in BaseIcephysInterface accepts an icephys_experiment_type parameter with a default value of 'voltage_clamp', but this parameter is completely ignored during execution. Instead, the method unconditionally reads the value from metadata["Icephys"]["Sessions"][i]["icephys_experiment_type"], which defaults to None when not explicitly set. This causes an assertion error during conversion since None is not a valid experiment type. The parameter's presence in the method signature is misleading and violates the principle of least surprise.
The bug occurs in baseicephysinterface.py:128 where the parameter is ignored, while metadata defaults are set in abfdatainterface.py:160 to None. The assertion that fails is in neo.py:297-300.