Skip to content
A GAN for the generation of mock astronomical surveys
Python Jupyter Notebook
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.

Generative deep fields: arbitrarily sized, random synthetic astronomical images through deep learning

Generate mock galaxy surveys with a Spatial GAN (SGAN)-like architecture.

Model description

An SGAN is used to generate mock galaxy surveys from data that is preprocessed as little as possible (preprocessing is only a 99.99th percentile clipping). Therefore real physics can be done on the outputs!

The outputs can also be tesselated together to create a very large survey (see Very Large XDF, below), limited in size only by the RAM of the generation machine.


Very Large XDF

By layering randomly sized crops (and interpolating them all to the same size) of the above large image we can get a result like this:

Layered XDF

A comparison between the real and generated extreme deep fields:

Real XDF Generated XDF

Training the model

Run preprocess_fits.ipynb to download and channel-wise clip the XDF FITS data at 99.99%.

If we want to train from scratch to 10,000 epochs we would run the following code:

python -e 10001 -f $FITS_IMAGE_FILE

Generating a set of imagery

To generate a set of 4 FITS images from the model $KERAS_MODEL_FILE, that are the same size as the XDF:

python --model $KERAS_MODEL_FILE -z 232 -n 4 -f

These images are dumped into the default log directory.

Generating a very large image that can't fit in memory

We may want to generate a very large FITS image that won't fit in memory (say 60,000 by 60,000 pixels). To do this we can split the noise array, pass it through the GAN, and stitch the outputs back together. This is what does:

python --model $KERAS_MODEL_FILE -z 1024 -f

The above code creates a 16384 by 16384 image (16 times z) using the model $KERAS_MODEL_FILE, and dumps the output into a fits file in the default log directory.

You can’t perform that action at this time.