Einstein-Face (CASA 3.1)

From CASA Guides
Revision as of 18:21, 29 April 2011 by Akimball (talk | contribs) (Created page with "'''Simulations using non-science images: the face of Einstein ''' Simdata can be used to simulate any digitized image. These toy models can be particularly useful for examining ...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigationJump to search

Simulations using non-science images: the face of Einstein

Simdata can be used to simulate any digitized image. These toy models can be particularly useful for examining the effects of varying uv-coverage on image fidelity if the "truth" model is a familiar object or image. In this example (which is on page 13 of the ALMA Early Science Primer)we use the face of Albert Einstein.

Step 1: obtain your image. Typically from the internet.

In this case, it is a jpg file.

Step 2: Convert your image to FITS

Various software programs have conversion to FITS enabled. The (GIMP) was used in this case. A handy list of FITS conversion programs is maintained by GSFC here

For the GIMP, start up the software

>gimp &

and in the main window select "Open" from the "File" menu.

The image will open up in a new window, you can use the GIMP to modify the image (adjust contrast, colormap etc).

Then, select "Save as" from the "File" menu in the window containing the image, and hit "Select File Type" in the dialog box to bring up the file type options, and select "Flexible Image Transport System". Pick a name for your file ending in .fits, e.g. einstein.fits

Step 3 Add FITS header keywords and change the format

At this stage, we need to perform some manipulations on the FITS file to get it readable by simdata (an 8bit to 16bit conversion) and trim it down to 300x300 pixels.

First, read the FITS file into CASA. Then use immath to trim the image to 300x300 and write it out as 16-bit FITS file:

>casapy

importfits(fitsimage='einstein.fits',imagename='testimage',overwrite=T)
default 'immath'
imagename = 'testimage'
expr = 'IM0'
box = '0,0,299,299'
outfile = 'testimage2'
immath()
exportfits(imagename ='testimage2',fitsimage ='einstein16.fits',bitpix=16,overwrite=T)


Step 4 Prepare inputs for simdata

Start with the 10min full science observation. Inputs to simdata are given below. The integration time is set much longer than realistic (300s, compared to 1-10s in practice) to speed the computation. The map spacing is set to ensure that only one pointing is observed. The image scale is chosen to ensure good sampling of the beam, and the observation is pointed near the Chandra Deep Field South:

default 'simdata'
project = 'fs_cfg8_10m'
modifymodel = T
skymodel = 'einstein16.fits'
indirection = 'J2000 03h30m00 -28d00m00'
incell = '0.043arcsec'
incenter = '245GHz'
inwidth = '2GHz'
setpointings = T
integration = '300s'
mapsize = ['1arcmin','1arcmin']
maptype = 'hexagonal'
pointingspacing = '1arcmin'
predict = T

Antenna configuration: ALMA antenna configuration files are stored in a directory that depends on your CASA installation. To be sure of finding them, identify the CASAPATH variable using the os.getenv command, and pick the configuration you want. Details on configuration choices are given in the M51 simulation guide [1].


repodir=os.getenv("CASAPATH").split(' ')[0]
antennalist        =  repodir+"/data/alma/simmos/alma.out08.cfg"
totaltime = '600s'
thermalnoise = ""
image = T
vis = '$project.ms'
imsize = [300,300]
cell = '0.043arcsec'
niter = 2000
weighting = 'natural'
analyze=F
overwrite=T
simdata

The output image should have a synthesized beam of 0.62"x0.56" and look something like:

Now we repeat for an 1hr observation:

tget simdata
project = 'fs_cfg8_1hr'
totaltime = '3600s'
simdata

Which should look something like:

Finally, two Early Science simulations, using the 250m configuration. One 10min simulation:

tget simdata
project = 'es_cfg250_10m'
antennalist = repodir+"/data/alma/simmos/alma.early.250m.cfg"
totaltime = '600s'
simdata

which looks like this:

and a 4hr simulation:

tget simdata
project = 'es_cfg250_4hr'
totaltime = '14400s'
simdata

which looks like this:

Further experiments:

Some more things to try:

An 8hr observation shows the improvement obtained by obtaining fuller uv-coverage in the full science array:

tget simdata
antennalist = repodir+"/data/alma/simmos/alma.out08.cfg"
project = 'fs_cfg8_8hr'
totaltime = '28800s'
simdata

Which should look something like:

An attempt to make a higher resolution image shows what happens when short spacings are missing in the configuration. Configuration 16 has a 0.17x0.15 beam, still better than Nyquist sampling of the model image (which has 0.043" pixels). However, the lack of short spacings in the configuration leads to poorly sampled structure on large spatial scales. In practice, one would need to combine these observations with a set in a more compact configuration (such as 8) to sample both the large and small spatial structures.

tget simdata
antennalist = repodir+"/data/alma/simmos/alma.out16.cfg"
project = 'fs_cfg16_1hr'
totaltime = '3600s'
simdata

The result is: