A method, comprising: receiving at least two sets of gain values, wherein each set of gain values denotes the gains of a set of code channels that are carried by a carrier of at least two carriers (308, 309); receiving (301, 302) at least two power levels, each of the at least two power levels being allocated to a different carrier of the at least two carriers (308, 309); and calculating a cubic metric based on the received at least two sets of gain values and the received at least two power levels, wherein calculating the cubic metric comprises: selecting at least one of the at least two carriers as a reference carrier; and based on the selection, adjusting at least one of the at least two sets of gain values by a parameter that is derived from the received at least two sets of gain values and the received at least two power levels, wherein the parameter is equal to P n β 1, 1 2 + β 1, 2 2 +... + β 1, L 1 2 P 1 β n, 1 2 + β n, 2 2 +... + β n, L n 2, where n is an index of the carrier of the at least two carriers that carries the set of code channels whose gain values (β n, 1,β n,2,...β n,L n) are to be adjusted, L n is the number of the code channels in the set of code channels carried by the carrier n, ( β 1,1, β 1,2,... β 1,L 1) are the gain values of the set of code channels carried by the reference carrier, L 1 is the number of the code channels in the set of code channels of the reference carrier, P n is the power level allocated to the carrier n, and P 1 is the power level allocated to the reference carrier. receiving at least two sets of gain values, wherein each set of gain values denotes the gains of a set of code channels that are carried by a carrier of at least two carriers (308, 309); receiving (301, 302) at least two power levels, each of the at least two power levels being allocated to a different carrier of the at least two carriers (308, 309); and calculating a cubic metric based on the received at least two sets of gain values and the received at least two power levels, wherein calculating the cubic metric comprises: selecting at least one of the at least two carriers as a reference carrier; and based on the selection, adjusting at least one of the at least two sets of gain values by a parameter that is derived from the received at least two sets of gain values and the received at least two power levels, wherein the parameter is equal to P n β 1, 1 2 + β 1, 2 2 +... + β 1, L 1 2 P 1 β n, 1 2 + β n, 2 2 +... + β n, L n 2, where n is an index of the carrier of the at least two carriers that carries the set of code channels whose gain values (β n, 1,β n,2,...β n,L n) are to be adjusted, L n is the number of the code channels in the set of code channels carried by the carrier n, ( β 1,1, β 1,2,... β 1,L 1) are the gain values of the set of code channels carried by the reference carrier, L 1 is the number of the code channels in the set of code channels of the reference carrier, P n is the power level allocated to the carrier n, and P 1 is the power level allocated to the reference carrier. selecting at least one of the at least two carriers as a reference carrier; and based on the selection, adjusting at least one of the at least two sets of gain values by a parameter that is derived from the received at least two sets of gain values and the received at least two power levels, wherein the parameter is equal to P n β 1, 1 2 + β 1, 2 2 +... + β 1, L 1 2 P 1 β n, 1 2 + β n, 2 2 +... + β n, L n 2, where n is an index of the carrier of the at least two carriers that carries the set of code channels whose gain values (β n, 1,β n,2,...β n,L n) are to be adjusted, L n is the number of the code channels in the set of code channels carried by the carrier n, ( β 1,1, β 1,2,... β 1,L 1) are the gain values of the set of code channels carried by the reference carrier, L 1 is the number of the code channels in the set of code channels of the reference carrier, P n is the power level allocated to the carrier n, and P 1 is the power level allocated to the reference carrier.