This example generates a mock sky brightness image and a realistic set of baselines
You should have already downloaded and extracted the IM Lup DSHARP dataset as described in Example 00. Then, you will need to copy the IM_Lup_baselines_and_weights.npz into this directory in a new data folder. For example, from within this 01 folder, run
$ mkdir data
$ cp ../00-download-and-extract-datasets/data/IM_Lup_baselines_and_weights.npz data/You can install necessary Python packages into your environment by
$ pip install -r requirements.txtand then you can run the code by
snakemake -c1 allNote that this script does not actually sample mock visibility values mpol.fourier.generate_fake_data in scripts like sgd/src/load_data.py, so that sky image size, flux, and measurement noise level can be adjusted as needed on demand.
create_butterfly.pydownloads a nice looking image from theceyda/smithsonian_butterfliescollection, uses PIL to greyscale and crop it, adjusts the flux value to match DSHARP IM Lup, then saves it as a numpy array.package_data.pycombines the two numpy arrays into a single archive, saved asfloat32to save space.
The end result will be this mock image (sourced from ceyda/smithsonian_butterflies) stuffed into data/mock_data.npz
