import matplotlib.pyplot as plt
from astropy.modeling import models
from specreduce.utils.synth_data import SynthImage

image = (
    SynthImage(nx=1024, ny=400, seed=42)
    .add_background(5)
    .add_source(profile=models.Moffat1D(amplitude=20, alpha=0.1))
    .add_poisson_noise()
    .add_read_noise(3)
    .to_ccddata()
)
plt.figure(figsize=(10, 4))
plt.imshow(image, origin="lower", aspect="auto")