make_fake_image

grizli.fake_image.make_fake_image(header, output='direct.fits', background=None, exptime=10000.0, nexp=10, obsdate=None, seed=None)[source]

Use the header from NIRISS, WFC3/IR or WFIRST/Roman and make an FLT-like image that grizli can read as a reference.

Parameters:
header : astropy.io.fits.Header

Header created by one of the generating functions, such as niriss_header.

output : str

Filename of the output FITS file. Will have extensions ‘SCI’, ‘ERR’, and ‘DQ’. The ‘ERR’ extension is populated with a read-noise + background error model using

>>> var = nexp*header['READN'] + background*exptime

The ‘SCI’ extension is filled with gaussian deviates with standard deviation sqrt(var).

The ‘DQ’ extension is filled with (int) zeros.

background : None or float

Background value to use for sky noise. If None, then read from header['BACKGR'].

exptime : float

Exposure time to use for background sky noise.

obsdate : Time

Date of observation. If None, then use astropy.time.Time.now

nexp : int

Number of exposures to use for read noise.

seed : int

If specified, use as numpy.random.seed

Returns:
hdu : astropy.io.fits.HDUList

Image HDU (also saved to output FITS file)