1. A method for setting a basal rate profile for an insulin pump, wherein the basal rate profile defines a basal rate delivery for a selected time interval and has a pre-defined number of profile segments each of which define the basal rate delivery for a subset of the selected time interval, the method comprising: providing a curve representing a basal rate as a continuous function of time as an input for an input unit; and generating the basal rate profile from the curve by a calculation unit by assigning curve values at selected time instances to the pre-defined number of profile segments.