A Marx-based power converter design for pulsed magnets in particle accelerators