artificial¶
artificial makes realistic synthetic images of the sky.
Use it to test a reduction pipeline, or to see how an observing effect behaves when you know the true answer. Stars (from a catalogue or a random field), galaxies, a variable star and the sky are seen through a model telescope, PSF and detector, with noise, cosmic rays and, optionally, the atmosphere.
Every frame carries a WCS, the PSF it was rendered with, and a table of the true star positions and fluxes, so you can compare your results with the truth.
Usage¶
munipack artificial [options]
There is no input file. The output is artificial.fits, or
artificial_001.fits, artificial_002.fits, … for a series (--count).
Existing files with the same name are overwritten.
Options¶
PSF¶
Option |
Default |
Description |
|---|---|---|
|
|
PSF shape: |
|
— |
Use a tabulated PSF from a FITS file instead; see PSF files. |
|
1 |
PSF width in pixels: σ for |
|
2 |
Moffat exponent β. |
|
from aperture |
Airy disk radius in pixels ( |
|
|
How seeing is applied for |
|
0 |
Elongate the PSF, e.g. to mimic tracking errors. |
|
0 |
Direction of the elongation [deg from the x axis]. |
Telescope and detector¶
Option |
Default |
Description |
|---|---|---|
|
1 |
Exposure time [s]. |
|
1.12 |
Aperture diameter [m]. |
|
from diameter |
Collecting area [m²]. |
|
1 |
Total quantum efficiency (optics, filter, detector). |
|
0 |
Dark current [e⁻/s/pix]. |
|
0 |
Read-out noise [e⁻ rms]. |
|
1 |
Gain [e⁻/ADU]; frames are written in ADU. |
|
0 |
Bias level added after the gain [ADU]. |
|
max of |
Saturation level [ADU]. |
|
off |
Write the noise-free mean frame. |
|
0 |
Deprecated extra background rate; use |
|
— |
FITS image of pixel sensitivity (flat field), same size as the frame. |
|
|
Output type: |
Cosmic rays¶
Option |
Default |
Description |
|---|---|---|
|
0 |
Mean rate of cosmic-ray hits [1/s]. |
|
1000 |
Peak electrons along a track. |
|
10 |
Maximum track length [pix]. |
Sky¶
Option |
Default |
Description |
|---|---|---|
|
21 |
Sky brightness at the frame centre [mag/arcsec²]; |
|
0 |
Sky gradient [mag/arcsec²/pix], positive is fainter; 0.0001–0.001 is typical. |
Stars and galaxies¶
Option |
Default |
Description |
|---|---|---|
|
— |
Star catalogue (e.g. from |
|
13 |
Faintest magnitude of the random field. |
|
from |
Coordinate columns [deg]. |
|
from |
Proper-motion columns (must exist, but stars are not moved). |
|
from |
Epoch columns (accepted, not used). |
|
|
Magnitude column in the filter |
|
installed |
Catalogue configuration with default column names. |
|
— |
Catalogue of elliptical (Sérsic) galaxies. |
Photometric system¶
Option |
Default |
Description |
|---|---|---|
|
|
Filter of the frame (for stars and sky). |
|
|
Photometric system of the filter, e.g. |
|
installed |
Table of photometric systems. |
Geometry¶
Option |
Default |
Description |
|---|---|---|
|
666, 666 |
Frame size [pix]. |
|
0, 0 |
RA and Dec of the frame centre [deg]. |
|
3600 |
Plate scale in pixels per degree (3600 = 1″/px). |
|
— |
Field of view along the height [deg]; overrides |
|
0 |
Rotation of the frame [deg], clockwise positive. |
|
|
WCS projection. |
Variable star¶
A variable star is added when you give one of --lc-model, --lc-table or
--lc-fourier.
Option |
Default |
Description |
|---|---|---|
|
— |
Built-in light curve: |
|
— |
Light curve as a table of phase, relative flux and error. |
|
— |
Light curve as a table of Fourier coefficients. |
|
15 |
Magnitude of the variable. |
|
1 |
Amplitude of the curve. |
|
2451544.5 |
Reference epoch (full JD, not MJD). |
|
1 |
Period [days]. |
|
frame centre |
Position of the variable [deg]. |
Atmosphere and time series¶
Option |
Default |
Description |
|---|---|---|
|
off |
Add extinction and seeing that grow with airmass. |
|
0.1 |
Extinction coefficient. |
|
0, 0 |
Site longitude (+east) and latitude (+north) [deg]. |
|
2000-01-01 |
Start date (UT), |
|
00:00:00 |
Start time (UT), |
|
1 |
Number of frames. |
|
60 |
Time between frame starts [s]. |
Output and runs¶
Option |
Default |
Description |
|---|---|---|
|
|
Output name; a run of |
|
random |
Random seed, for reproducible frames. |
|
off |
Leave out the small mark in the top-right corner. |
|
— |
Extra header cards, one |
|
3 (1 in Docker) |
Number of parallel processes for a series. |
|
— |
Extra options for the parallel launcher. |
|
off |
Print parameters and progress. |
|
— |
Show help. |
Output¶
Each file holds the image (in ADU) and two extensions: PSF, the PSF used
(not written with --psf-file), and CATALOGUE, the true X, Y and COUNT
(electrons, before the gain) of every star, with the variable first. The header records the
exposure, the detector settings, the WCS and, with --atmosphere, the airmass.
Examples¶
A reproducible random field on a 16-bit CCD-like detector:
munipack artificial --width 1024 --height 1024 --maglim 16 \
--psf GAUSS --hwhm 1.5 --exptime 60 \
--gain 2 --readnoise 5 --bias 100 -B 16 \
--seed 42 --no-watermark --mask field.fits
A real field from a catalogue, for testing find, aphot and astrometry
against the truth:
munipack cone -r 0.2 -o cat.fits -- 180.0 30.0
munipack artificial -c cat.fits --rcen 180 --dcen 30 \
--col-ra RAJ2000 --col-dec DEJ2000 --col-pm-ra pmRA --col-pm-dec pmDE \
--col-mag Vmag --width 640 --height 640 --exptime 60 --mask frame.fits
A night-long series of an eclipsing binary seen from a real site, writing
algol_01.fits … algol_36.fits:
munipack artificial --lc-model Algol --lc-mag 12 --lc-per 2.867 \
--lc-jd0 2460000.42 --rcen 47.04 --dcen 40.96 \
--atmosphere --long 16.6 --lat 49.2 --date 2023-02-24 --time 20:00:00 \
--count 36 --timestep 300 --mask 'algol_??.fits'
PSF files¶
--psf-file reads the PSF file format described in PSF file format: one
PSF for the whole field, or several PSFs at different places that
artificial interpolates between. psfphot --psf EMPIRICAL --psf-save
writes this format, so you can re-render a field with the PSF measured on a
real frame. Use the same --scale, --width and --height as that frame,
because the PSF positions are tied to the field geometry. A PSF saved from a
frame without a WCS needs --scale 1.
Notes¶
Paired options (
--width/--height,--rcen/--dcen,--long/--lat,--lc-ra/--lc-dec) must be given together or not at all.Give
?in--maskfor a series; without it every frame overwrites the same file.Give only one light-curve source. If several are given,
--lc-fourierwins over--lc-table, which wins over--lc-model.Templates for the input tables are in the source tree:
src/doc/artgalaxy.lstfor--galcatandsrc/doc/fourier.lstfor--lc-fourier. Turn them into FITS withmunipack fits --restore <file>.lst.Use
--biaswith integer output (-B 16) and read noise, so that negative noise values are not clipped at zero.With
--atmosphere, frames in which the field is below the horizon are skipped with a warning.With
--seed, the frames are the same whatever--mprocyou use.finddetects the watermark as a few stars; use--no-watermarkwhen you compare detections with the catalogue.