def write_corrected(self, output, clobber=False):
<EOL>if self.flatcorr != '<STR_LIT>':<EOL><INDENT>self.science = self.science / self.invflat<EOL>self.err = self.err / self.invflat<EOL><DEDENT>if self.flshcorr != '<STR_LIT>':<EOL><INDENT>self.science = self.science + self.flash<EOL><DEDENT>if self.darkcorr != '<STR_LIT>':<EOL><INDENT>self.science = self.science + self.dark<EOL><DEDENT>if (self.ampstring == '<STR_LIT>'):<EOL><INDENT>tmp_1, tmp_2 = np.split(self.science, <NUM_LIT:2>, axis=<NUM_LIT:1>)<EOL>self.hdulist['<STR_LIT>', <NUM_LIT:1>].data = tmp_1.copy()<EOL>self.hdulist['<STR_LIT>', <NUM_LIT:2>].data = tmp_2[::-<NUM_LIT:1>, :].copy()<EOL>tmp_1, tmp_2 = np.split(self.err, <NUM_LIT:2>, axis=<NUM_LIT:1>)<EOL>self.hdulist['<STR_LIT>', <NUM_LIT:1>].data = tmp_1.copy()<EOL>self.hdulist['<STR_LIT>', <NUM_LIT:2>].data = tmp_2[::-<NUM_LIT:1>, :].copy()<EOL><DEDENT>else:<EOL><INDENT>self.hdulist['<STR_LIT>', <NUM_LIT:1>].data = self.science.copy()<EOL>self.hdulist['<STR_LIT>', <NUM_LIT:1>].data = self.err.copy()<EOL><DEDENT>self.hdulist.writeto(output, overwrite=clobber)<EOL>
Write out the destriped data.