def extract_flash(prihdr, scihdu):
flshfile = prihdr.get('<STR_LIT>', '<STR_LIT>')<EOL>flashsta = prihdr.get('<STR_LIT>', '<STR_LIT>')<EOL>flashdur = prihdr.get('<STR_LIT>', <NUM_LIT:0.0>)<EOL>if flshfile == '<STR_LIT>' or flashdur <= <NUM_LIT:0>:<EOL><INDENT>return None<EOL><DEDENT>if flashsta != '<STR_LIT>':<EOL><INDENT>warnings.warn('<STR_LIT>'.format(flashsta),<EOL>AstropyUserWarning)<EOL><DEDENT>flshfile = from_irafpath(flshfile)<EOL>ampstring = prihdr['<STR_LIT>']<EOL>with fits.open(flshfile) as hduflash:<EOL><INDENT>if ampstring == '<STR_LIT>':<EOL><INDENT>flash = np.concatenate(<EOL>(hduflash['<STR_LIT>', <NUM_LIT:1>].data,<EOL>hduflash['<STR_LIT>', <NUM_LIT:2>].data[::-<NUM_LIT:1>, :]), axis=<NUM_LIT:1>)<EOL><DEDENT>elif ampstring in ('<STR_LIT:A>', '<STR_LIT:B>', '<STR_LIT>'):<EOL><INDENT>flash = extract_ref(scihdu, hduflash['<STR_LIT>', <NUM_LIT:2>])<EOL><DEDENT>else:<EOL><INDENT>flash = extract_ref(scihdu, hduflash['<STR_LIT>', <NUM_LIT:1>])<EOL><DEDENT><DEDENT>flash = flash * flashdur<EOL>return flash<EOL>
Extract postflash data from ``FLSHFILE``.

    Parameters
    ----------
    prihdr : obj
        FITS primary header HDU.

    scihdu : obj
        Extension HDU of the science image.
        This is only used to extract subarray data.

    Returns
    -------
    flash : ndarray or `None`
        Postflash, if any. Subtract this to apply ``FLSHCORR``.