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
headerastropy.io.fits.Header

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

outputstr

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.

backgroundNone or float

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

exptimefloat

Exposure time to use for background sky noise.

obsdateTime

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

nexpint

Number of exposures to use for read noise.

seedint

If specified, use as numpy.random.seed

Returns
hduastropy.io.fits.HDUList

Image HDU (also saved to output FITS file)