<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def on_do_accept(self, minor_planet_number, provisional_name, note1, note2, date_of_obs, ra, dec, obs_mag, obs_mag_err, band, observatory_code, comment):
 """ After a source has been mark for acceptance create an MPC Observation record. @param minor_planet_number: The MPC Number associated with the object @param provisional_name: A provisional name associated with the object @param note1: The observational quality note @param note2: The observational circumstance note @param date_of_obs: Date of the observation as a Time object. @param ra: RA in degrees @param dec: DE in degrees @param obs_mag: observed magnitude. @param obs_mag_err: Uncertainty in the observed magnitude. @param band: filter/band of the observations @param observatory_code: MPC Observatory Code of telescope. @param comment: A free form comment (not part of MPC standard record) """

        # Just extract the character code from the notes, not the
        # full description
        note1_code = note1.split(" ")[0]
        note2_code = note2.split(" ")[0]

        self.view.close_accept_source_dialog()
        self.model.set_current_source_name(provisional_name)

        source_cutout = self.model.get_current_cutout()

        mpc_observation = mpc.Observation(
            null_observation=False,
            provisional_name=provisional_name,
            note1=note1_code,
            note2=note2_code,
            date=date_of_obs,
            ra=ra,
            dec=dec,
            mag=obs_mag,
            mag_err=obs_mag_err,
            band=band,
            observatory_code=observatory_code,
            discovery=self.is_discovery,
            comment=comment,
            xpos=source_cutout.reading.x,
            ypos=source_cutout.reading.y,
            frame=source_cutout.reading.obs.rawname,
            astrometric_level=source_cutout.astrom_header.get('ASTLEVEL', None)
        )

        # Store the observation into the model.
        data = self.model.get_current_workunit().data
        key = mpc_observation.comment.frame.strip()
        data.mpc_observations[key] = mpc_observation

        # And write this observation out.
        self.model.get_writer().write(mpc_observation)

        # Mark the current item of the work unit as accepted.
        self.model.accept_current_item()

        # Detemine if the display should be reset.
        reset_frame = False
        if self.model.get_current_workunit().get_current_source_readings().is_on_last_item():
            self.view.clear()
            reset_frame = True
        self.model.next_item()
        if reset_frame:
            self.view.frame(1)