
254 Cal.App.2d 151 (1967)
THE PEOPLE, Plaintiff and Respondent,
v.
ERNEST LEE MALLORY, Defendant and Appellant.
Crim. No. 12597. 
California Court of Appeals. Second Dist., Div. One.  
Sept. 6, 1967.
 Ernest Lee Mallory, in pro. per., and Allen L. Freedman, under appointment by the Court of Appeal, for Defendant and Appellant.
 Thomas C. Lynch, Attorney General, William E. James, Assistant Attorney General, and Bradley A. Stoutt, Deputy Attorney General, for Plaintiff and Respondent.
 WOOD, P. J.
 Defendant was accused in two counts of assault by means of force likely to produce great bodily injury upon peace officers, in violation of section 245, subdivision (b), of the Penal Code. He pleaded not guilty and not *153 guilty by reason of insanity. In a nonjury trial, upon the plea of not guilty he was found guilty on both counts; and in the trial upon the other plea he was found not guilty by reason of insanity. At that time, on September 21, 1964, the court found that defendant had not fully recovered his sanity, and thereupon made an order committing him to the Atascadero State Hospital until such time as he has regained his sanity, and then to be discharged as provided by sections 1026 and 1026a of the Penal Code.
 On January 24, 1966, the court, acting pursuant to said section 1026a, ordered the Superintendent of the Atascadero State Hospital to submit a report as to defendant's present sanity. The date set for the hearing on the issue as to whether defendant had regained his sanity was February 18, 1966; and the court appointed Dr. Meyers and Dr. Deering, pursuant to section 1026a of the Penal Code and section 1871 of the Code of Civil Procedure, to examine the defendant as to his sanity and to review the files and recommendations of the superintendent of the hospital. After continuances of the date for hearing, the matter was heard on March 31, 1966, and the court found that defendant's sanity had not been restored in that he was still mentally ill; and the court ordered that he be returned to the Department of Mental Hygiene.
 Defendant, acting in propria persona, filed a "petition for writ of appeal." [1] A commitment to a state hospital after a finding of not guilty by reason of insanity is not appealable. (People v. Scarborough, 52 Cal.App.2d 210, 212 [125 P.2d 893].) Also, an order made pursuant to section 1026a of the Penal Code finding that a defendant's sanity has not been restored is not appealable. (In re Perkins, 165 Cal.App.2d 73, 81 [331 P.2d 712].) Defendant's petition herein will be regarded as a petition for a writ of habeas corpus for the purpose of reviewing the hearing which was held on March 31, 1966, pursuant to said section 1026a, wherein the court found that defendant's sanity had not been restored.
 Petitioner Mallory contends that his confinement in a state hospital for the criminally insane violates his constitutional rights of due process of law. As above shown, upon the hearing as to whether the petitioner's sanity had been restored, the court found that it had not been restored "in that he was still mentally ill." He argues to the effect that since the M'Naughton test as to insanity was used at the trial under the plea of not guilty by reason of insanity, the same test should have been used in the proceeding under said section *154 1026a, upon the hearing as to whether his sanity had been restored; that the court erred upon the hearing under section 1026a in using the test "whether the defendant is still mentally ill"; that if the M'Naughton test was not the proper test to be used under the restoration proceeding, then the test that should have been used was whether the defendant posed a threat of danger to himself or other persons. He argues further that provisions of said section 1026a with reference to whether sanity has been restored are too vague and indefinite to justify confinement in a state hospital for the criminally insane.
 Section 1026 of the Penal Code provides, in part: When a defendant pleads not guilty by reason of insanity, if "the verdict or finding be that the defendant was insane at the time the offense was committed, the court unless it shall appear to the court that the defendant has fully recovered his sanity shall direct that the defendant be confined in the state hospital for the criminal insane. ... If, however, it shall appear to the court that the defendant has fully recovered his sanity such defendant shall be remanded to the custody of the sheriff until his sanity shall have been finally determined in the manner prescribed by law. A defendant committed to a state hospital shall not be released from confinement unless and until the court which committed him, or the superior court of the county in which he is confined, shall, after notice and hearing, find and determine that his sanity has been restored."
 Section 1026a of the Penal Code provides, in part: "An application for the release of a person who has been committed to a state hospital, as provided in Section 1026, upon the ground that his sanity has been restored, may be made to the superior court of the county in which he is confined or of the county from which he was committed, either by such person or by the superintendent of the hospital in which the said person is confined. No hearing upon such application shall be allowed until the person committed shall have been confined for a period of not less than 90 days from the date of the order of commitment. If the finding of the court be adverse to releasing such person upon his application for release, on the ground that his sanity has not been restored, he shall not be permitted to file a further application until one year has elapsed from the date of hearing upon his last preceding application. In any hearing authorized by this section the burden *155 of proving that his sanity has been restored shall be upon the applicant."
 [2] As above stated, the petitioner asserts that the M'Naughton test should have been applied herein in determining whether petitioner's sanity had been restored. The type of insanity involved in the M'Naughton test constitutes a defense to a criminal charge. (People v. Nash, 52 Cal.2d 36, 47-48 [338 P.2d 416].) A detailed discussion of such test is in the Nash case, just cited. The type of insanity involved in that test may be described generally as such a mental defect of a person that he does not know the nature of his act or, if he does know it, that he does not know that the act is wrong. It is to be assumed that the M'Naughton test was applied in the trial of the petitioner upon the charge of assaulting peace officers, --wherein he was found not guilty by reason of insanity. According to petitioner's contention herein, he seeks to extend the M'Naughton insanity-test (used upon the trial of the criminal charge) to a hearing as to whether sanity has been restored. If such test or rule is applicable upon the later hearing as to sanity restoration, then the question upon such later hearing would be (as stated generally) whether the petitioner's mental state is such that he knows wrong from right, --rather than the questions whether he has fully recovered his sanity, or whether he is still mentally ill. As above shown, section 1026 of the Penal Code provides that a "defendant commtted to a state hospital [after having been found not guilty by reason of insanity] shall not be released from confinement unless and until the court ... shall ... find and determine that his sanity has been restored." (Italics added.) As above shown, section 1026a of the Penal Code provides that an "application for the release of a person who has been committed to a state hospital, as provided in Section 1026, upon the ground that his sanity has been restored, may be made to the superior court. ... If the finding of the court be adverse to releasing such person ... on the ground that his sanity has not been restored, he shall not be permitted to file a further application until one year has elapsed. ... In any hearing authorized by this section the burden of proving that his sanity has been restored shall be upon the applicant." (Italics added.)
 It thus appears, according to those sections 1026 and 1026a, that the basis for releasing a defendant who has been committed to a state hospital, after having been found not guilty by reason of insanity, is that his sanity has been restored. *156 With respect to such release, it is apparent from those sections that the question is not merely whether the defendant has recovered from the state of insanity he was in when he committed the criminal act, that is, the mental state of not knowing right from wrong, but the question is whether he has fully recovered his sanity. The restraint imposed by these sections is not for the purpose of punishment but is for the protection of the public from insane persons who have been proved to possess criminal tendencies. (See In re Slayback, 209 Cal. 480, 491 [288 P. 769].) In the last cited case, in discussing confinement under section 1026a, it is said: "Insanity has so many different forms and its manifestations are so varied and uncertain that it is often impossible for the most skilled alienist or astute judge to detect its existence or to predict the time of its recurrence, when the patient appears to be for the time free from the affliction." (Ibid)
 In Department of Mental Hygiene v. Hawley, 59 Cal.2d 247, 255 [28 Cal.Rptr. 718, 379 P.2d 22], it is said: "[I]t is apparent that a person committed to a state institution under the provisions of section 1026 ... is held for the primary purpose of protection of the public in the course of administration of laws prohibiting crime."
 The M'Naughton test was not the test to be applied in determining whether the petitioner should be released under the provisions of said sections 1026 and 1026a.
 Dr. Meyers, one of the physicians appointed by the court to examine petitioner as to his sanity and make a report for consideration upon the sanity-restoration proceeding, stated that petitioner was sane according to the M'Naughton test. He stated further: "However, he is quite ill mentally and certainly will have more difficulties if he is released." Dr. Deering, the other physician so appointed, stated that he concluded that petitioner's sanity had been restored. A report made by Dr. Robison, Acting Superintendent and Medical Director of the Atascadero State Hospital, stated in part that petitioner "has been a repeated behavior problem in the hospital and has required seclusion on several occasions because of his assaultive behavior. ... He has changed very little in the time he has been here. He is regarded as still dangerous, and it is our recommendation that he be retained for further treatment."
 [3] Petitioner asserts that the report of the superintendent of the hospital was not in evidence and was improperly considered by the court. It is true that the report of the *157 superintendent was not formally received in evidence. It appears, however, that the court ordered the superintendent to submit a report as to defendant's sanity, and set a date for hearing the issue as to whether defendant had regained his sanity. The date of hearing was thereafter continued because the report had not been received at the time the matter was first set for the hearing. When the court appointed the two physicians to examine the petitioner, it directed them to review the files of the hospital and the recommendations of the superintendent. The court, in announcing its order, quoted from the superintendent's letter, and no one objected to the letter at that time or at all. The court properly considered the letter.
 As above shown, the report of Dr. Meyers included the statement that the petitioner "is quite ill mentally and certainly will have more difficulties if he is released." The report of the hospital superintendent stated, among other things, that the petitioner "has changed very little in the time he has been here. He is regarded as still dangerous, and it is our recommendation that he be retained for further treatment."
 The evidence was amply sufficient to support the findings and order of the court made on March 31, 1966. The petitioner was not denied due process of law.
 The purported appeals from orders are dismissed.
 The petition for a writ of habeas corpus is denied.
 Fourt J., and Lillie, J., concurred.
