(a) As a condition of probation or bail or as an alternative sentence to another form of incarceration for any criminal violation of this code over which a circuit court has jurisdiction, a circuit court may order an offender confined to the offender's home for a period of home incarceration. As an alternative sentence to incarceration in jail for any criminal violation of this code over which a magistrate court has jurisdiction or as a condition of bail for a criminal violation of this code over which a magistrate court has jurisdiction to set bail, a magistrate may order an offender confined to the offender's home for a period of electronically monitored home incarceration: Provided, That electronic monitoring may not be required in a specific case if a circuit court upon petition thereto finds by order that electronic monitoring is not necessary.
(b) The period of home incarceration may be continuous or intermittent, as the circuit court or magistrate court orders. However, the aggregate time actually spent in home incarceration may not exceed the term of imprisonment or incarceration prescribed by this code for the offense committed by the offender.
(c) A grant of home incarceration under this article constitutes a waiver of any entitlement to deduction from a sentence for good conduct under the provisions of section twenty-seven, article five, chapter twenty-eight of this code.
(d) When imposing home incarceration as a condition of bail, a magistrate shall do so consistent with guidelines promulgated by the Supreme Court of Appeals.