An added feature is that the objects can be added as if they are in a "galactic" disk with given inclination and position angle. The default is a "face-on" view (inc=0). No corrections for brightness due to inclination are made however.
3D image cubes are supported if size= contains a 3rd non-1 value.
OBJECT EXPR SPAR flat A A exp A.exp(-r/h) A,h gauss A.exp(-r^2/(2h^2)) A,h bar A.exp(-r/h) A,h,e,b (e=1-minor/major b=bar position angle w.r.t. disk) noise gaussian(m,s) mean,sigma spiral A.exp(-r/h) A,h,k,p,m,r0,p0 ferrers A.(1-r^2)^p A,h,e,b,p (h=size of bar, p=power to 1-r^2) isothermal A.(1+r^2)^p A,h,p test x+10y+100z - blobs A,x,y,z,size they can be repeated for many blobs maybe to be implemented: j1x J1(x)/x comet 2d proj jet jet model w/ power law brightness shell 2d proj of shell poisson
A few objects that are in MIRIAD’s imgen(1MIRIAD)
program and not listed
here directly, can be simulated or replaced by:
level same as our flat cluster same as isothermal, except we also allow p different from -0.5 noise notice we have a mean, miriad doesn’t, also miriad has a crude low approximation point use exp with a very small scale length h gaussian our gauss, but bmin/bmaj via inc gauss3 no equivalent, ccdgen does not support all 3D models yet disk use ferrers with p=0
Most of these objects have a peak or representative intensity value as the first argument, and a scale length as the second parameter. The next parameters are sometimes scale free
Bars have an additional axis ratio (we mostly use e=1-b/a here) and position angle of the bar w.r.t. the disk in the disk plane (see snaprotate(1NEMO) for an approach if you know the angle of the bar in the sky plane). A Ferrers bar also needs to know the power (usuall an integer) to which 1-r^2 is raised.
Spirals are yet more complex: A and h are the usual peak and exponential scale-length. k is the wavenumber (related to the pitch angle as tan(pitch) =1/(2.pi.k.r), see also mkspiral(1NEMO) ), p controls the relative width of the spiral (assumed to be cos^p(m*phi), r0 the starting radius of the spiral (defaults to 0), p0 the phase of the spiral at radius r0, and m the number of spiral arms. In particular, since the pow(3) function is used internally for non-integer values of p, the behavior of m for integer and non-integer values of p is different: for integer values our own internal powi(3NEMO) is used, and correctly represents. For example, for m=1 and p=1 you’ll get a one armed spiral, but with negative counter-arm. With p=2 it becomes a 2-armed spiral, as they will get progressively narrower as p remains even and gets higher. For odd values of p you will again have a positive and negative spiral, and as p gets larger, the arms get narrower. By making sure p becomes non-integer, e.g. p=2.0001, the negative arm becomes 0.
Make a simple barred galaxy by adding an exponential disk and a (smaller) exponential bar:
ccdgen - object=exp spar=1,40 pa=60 inc=45 size=256
|\
ccdgen in=- out=bar.ccd object=bar spar=10,6,0.5,70 pa=60 inc=45
or if you want them to be a bit more astronomical, you’ll need to make the units come out in degrees for the conversion to FITS, viz.:
d=3600
ccdgen - object=exp spar=1,40/$d pa=60 inc=45 size=256 cdelt=-1/$d,1/$d
|\
ccdgen - object=bar spar=10,6/$d,0.5,70 pa=60 inc=45 in=- |\
ccdfits - bar.fits radecvel=t
and the option to fill your cube with some random blobs and noise is a bit more involved. We create a simple text file b100.tab containing the random parameters of the blobs (Amplitude, x, y, z, size):
nemoinp 1:100
|\ tabmath - - ’ranu(0,1),ranu(10,100),ranu(10,100),ranu(10,100),ranu(0,5)’
all\
> b100.tab
ccdgen - blobs @b100.tab size=128,128,128 |\ ccdgen - noise 0,0.02 in=- |\
ccdsmooth - - 5 |\
ccdsky - - |\
ccdfits - junk2.fits radecvel=t ndim=4
Making a new data section (in this case just noise) by stealing the header from existing fits(5NEMO) file. In bash notation:
fitshead NGC5194_91112.fits
> tmp.fitshead
nx=$(grep NAXIS1 tmp.fitshead|awk ’{print $3}’)
ny=$(grep NAXIS2 tmp.fitshead|awk ’{print $3}’)
nz=$(grep NAXIS3 tmp.fitshead|awk ’{print $3}’)
ccdgen - object=noise spar=0,1 size=$nx,$ny,$nz |\
ccdfits - noise.fits fitshead=NGC5194_91112.fits
A test cube234.fits with value x + 10y + 100z can be made as follows:
ccdmath out=- fie=%x+10*%y+100*%z size=2,3,4 | ccdfits - cube234.fits
https://github.com/GalSim-developers/GalSim
imfit::makeimage
There are also good simulators in starlab and amuse
4-Jan-05 V0.1 Created PJT 6-jan-05 V0.7 added (many features and) factor= PJT 8-jan-05 V0.8 add #arms parameter to spiral PJT 31-jan-12 V0.9 added object=test PJT 12-mar-2020 V1.0 added object=blobs PJT 8-may-2022 V1.2 moved center= down the arg list PJT 8-dec-2022 V2.0 moved in= down the arg list PJT