If the offense is bailable, the defendant may be admitted to bail before conviction:
First-For his appearance before the magistrate, on the examination of the charge, before being held to answer.
Second-To appear at the Court to which the magistrate is required to return the depositions and statement, upon the defendant being held to answer after examination.
Third-After indictment, either before the bench warrant is issued for his arrest, or upon any order of the Court committing him, or enlarging the amount of bail, or upon his being surrendered by his bail to answer the indictment in the Court in which it is found, or to which it may be transferred for trial.
And after conviction, and upon an appeal:
First-If the appeal is from a judgment imposing a fine only, on the undertaking of bail that he will pay the same, or such part of it as the appellate Court may direct, if the judgment is affirmed or modified, or the appeal is dismissed.
Second-If judgment of imprisonment has been given, that he will surrender himself in execution of the judgment, upon its being affirmed or modified, or upon the appeal being dismissed, or that in case the judgment be reversed, and that the cause be remanded for a new trial, that he will appear in the Court to which said cause may be remanded, and submit himself to the orders and process thereof.
Ca. Pen. Code § 1273