Network Rail says electrification work requires complete closure of the line west of Edinburgh until 25 January.