A few interesting remarks on imprisonment for contempt and on sentence appeals generally were made in B (Algeria) v Secretary of State for the Home Department [2013] UKSC 4 (30 January 2013).
When dealing with a contemnor and considering the option of committal to prison, the court needs to assess two things, coercive and penal:
"[14] ... Committal is appropriate where it can reasonably be expected that this will induce the contemnor to purge his contempt (the coercive effect). It is also appropriate to punish contempt of a court's order (the penal element). Frequently both elements will underlie a committal order. Where there is reason to believe that committal will secure compliance with a court's order, the fact that the person subject to it has already substantial restrictions on his liberty is immaterial. Where it is required in order to properly punish the contemnor, the loss of residual liberty is unlikely to weigh heavily against the making of the order."
The contemnor must be punished for misbehaviour and also must be induced to behave properly.
The other topic considered here is when an appellate court should correct a sentence itself instead of remitting the case to the lower court for it to impose an appropriate sentence:
"[11] Where an appellate court has concluded that the basis on which the decision of the lower court to sentence someone for contempt is flawed, it does not follow that the sentence chosen by the lower court is inevitably wrong. It may be an entirely correct sentence but for different reasons from those articulated by the original sentencing court. The affirmation of the original sentence does not necessarily entail an endorsement of the reasons for which the decision to sentence was made. Where it has been determined that the basis for the original sentence of imprisonment is wrong, a de novo assessment must indeed occur. A fresh look at the circumstances material to the question of whether imprisonment is the right disposal should take place in light of the correct understanding of those circumstances.
"[12] It is not essential, however, even as a matter of generality, that the fresh look be undertaken by the original sentencing court. If it is sufficiently clear to the appellate court that a sentence of imprisonment is appropriate in light of its revised view of the relevant facts, it is not required as a matter of principle or of practice that the matter be remitted to the court which first imposed the sentence. As Jackson LJ said in JSC BTA Bank v Solodchenko (No 2) [2012] 1 WLR 350 para 60, where an appellate court is seised of the case and in possession of all relevant facts, the proper course is for the appellate court to determine what the proper sentence for contempt should be on the basis of the true facts. Where, of course, a fresh investigation of new facts is required and it is necessary or desirable that this be undertaken by a first instance court, remittal will be suitable. This is not such a case. The Court of Appeal was able to evaluate the medical evidence and reach reliable conclusions on its significance. It could decide what the appropriate sentence should be and it was right to do so."
And on the topic of contempt of court, there is a particularly interesting discussion of the common law powers by Professor ATH Smith, "Reforming the New Zealand Law of Contempt of Court – An Issues/Discussion Paper", 18 April 2011, and also in Siemer v Solicitor-General [2010] NZSC 54, [2010] 3 NZLR 767, (2010) 24 CRNZ 748 (SC).