California Penal Code
The circumstances shall be presented by the testimony of witnesses examined in open court, except that when a witness is so sick or infirm as to be unable to attend, his deposition may be taken by a magistrate of the county, out of court, upon such notice to the adverse party as the court may direct. No affidavit or testimony, or representation of any kind, verbal or written, can be offered to or received by the court, or a judge thereof, in aggravation or mitigation of the punishment, except as provided in this and the preceding section. This section shall not be construed to prohibit the filing of a written report by a defendant or defendant’s counsel on behalf of a defendant if such a report presents a study of his background and personality and suggests a rehabilitation program. If such a report is submitted, the prosecution or probation officer shall be permitted to reply to or to evaluate the program.