Difference between revisions of "N891 simdata (CASA 3.3)"
From CASA Guides
(Created page with "{{Simulations Intro}} Category: Simulations ''A new version of this page exists for CASA 3.3: N891 simdata (CASA 3.3).'' == Nearby edge-on spiral == Roughly modeled aft...") |
|||
(26 intermediate revisions by the same user not shown) | |||
Line 2: | Line 2: | ||
[[Category: Simulations]] | [[Category: Simulations]] | ||
− | '' | + | ''Old version: [[N891 simdata2]].'' |
+ | |||
+ | To create a script of the Python code on this page see [[Extracting scripts from these tutorials]]. | ||
== Nearby edge-on spiral == | == Nearby edge-on spiral == | ||
Roughly modeled after NGC891 | Roughly modeled after NGC891 | ||
− | + | Updated for CASA 3.3 | |
− | * | + | * Model origin: Milky Way 13CO from the [http://www.bu.edu/galacticring/ Galactic Ring Survey] on the 14m [http://www.astro.umass.edu/~fcrao/ FCRAO] |
− | * | + | * The cube is being binned to a coarser velocity resolution in order to speed the simulation. The fits file is [ftp://ftp.cv.nrao.edu/NRAO-staff/rindebet/grs-12kms.fits grs-12kms.fits] |
+ | <source lang="python"> | ||
+ | # In CASA | ||
+ | # Initializing sim_observe | ||
+ | # Laying down some basic ground rules | ||
+ | default 'sim_observe' | ||
+ | project = 'n891d' | ||
+ | skymodel = 'grs-12kms.fits' | ||
+ | </source> | ||
− | * | + | * Units: K - first convert to flux surface brightness: Jy/Sr = 2x10<sup>23</sup> k T / λ<sup>2</sup>, <!-- <math>\frac{Jy}{Sr} = \frac{2\times 10^{23} k T}{\pi D^2 \Omega}</math>, where <math>\Omega</math> is the beam solid angle --> = 4x10<sup>8</sup>T at 110GHz. |
− | Jy/Sr = 2x10<sup>23</sup> k T / λ<sup>2</sup>, | ||
− | <!-- <math>\frac{Jy}{Sr} = \frac{2\times 10^{23} k T}{\pi D^2 \Omega}</math>, where <math>\Omega</math> is the beam solid angle --> | ||
− | = 4x10<sup>8</sup>T at 110GHz. | ||
− | + | <source lang="python"> | |
− | + | # In CASA | |
− | + | # Setting the new frequency of the central channel | |
− | + | incenter = '110.1777GHz' | |
+ | </source> | ||
− | will | + | * Now we need to decide if this model data will work at the desired pixel scale |
− | * | + | * The GRS resolution of 40" at ~10kpc is 0.04" at 10Mpc, so we should be able to do a simulation of observing at ~0.1-0.2". The resolution plot (See Figure 1) indicates that for ALMA at 100GHz, configuration 20 is appropriate. |
− | + | [[Image:Beamsummary.png|thumb|Figure 1: Resolution plot.]] | |
+ | * If we intend to set <tt>incell=0.2arcsec</tt> in <tt>sim_observe</tt>, then the cube needs to be multiplied by 4x10<sup>8</sup> * (.04/206265)<sup>2</sup> = 1.4x10<sup>-5</sup> to obtain Jy/pixel. The cube peaks at ~20K, so we can perform the simulation with <tt>inbright=3e-4</tt>, which should yield a peak of ~1mJy/bm. | ||
− | + | * Will we be dominated by the noise in the input model? Input noise ~150mK or S/N~20, so at our scaled intensity, ~0.05 mJy/bm. The [http://almascience.eso.org/call-for-proposals/sensitivity-calculator ALMA Sensitivity Calculator] says that ALMA will achieve 2.5mJy/bm in 2 hours for the input 212m/s channel width (0.075MHz), so the noise in the input model should not affect our results. | |
− | * | ||
− | |||
− | + | <source lang="python"> | |
+ | # In CASA | ||
+ | # Setting the new channel width | ||
+ | inwidth = '0.075MHz' | ||
+ | </source> | ||
− | + | * We do have a sensitivity issue though - if we decrease the spectral resolution by a factor of 6 (bin the input channels in some other program - sim_observe will know how to do that in the future but not yet), and plan for 3 8-hr tracks, then the sensitivity calculator suggests that we'll get <0.25mJy rms, or S/N>10 per beam. Rather than simulate 3 days of observing, I'll increase inbright by sqrt(3) and simulate one 8 hour track. | |
− | |||
− | + | [[File:N891.coord.png|thumb|Figure 2: here's the cube with the <tt>sim_observe</tt>'s scaling and World Coordinate System]]<br> | |
− | + | <source lang="python"> | |
+ | # In CASA | ||
+ | # Scaling the surface brightness | ||
+ | inbright = '1.4e-4' | ||
+ | </source> | ||
− | + | * the ALMA 12m primary beam is 50" so we'd space a mosaic by 25", but the model cube has 326x357 pixels, or 13 arcsec with our small pixels. That's a lot smaller than the primary beam, so it doesn't matter much what output image size we ask for. | |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
+ | <source lang="python"> | ||
+ | # In CASA | ||
+ | # Finish up the image model, and setting up the pointing | ||
+ | indirection = 'J2000 7h00m34 -23d03m00' | ||
+ | incell = '0.2arcsec' | ||
+ | setpointings = True | ||
+ | integration = '300s' | ||
+ | pointingspacing = '25arcsec' | ||
mapsize = '60arcsec' | mapsize = '60arcsec' | ||
+ | </source> | ||
− | + | There are 659 channels in the input cube, but as noted above we want to bin those to 109 channels of 1.2 km/s each. | |
+ | <source lang="python"> | ||
+ | # In CASA | ||
+ | # Finish up the rest of the settings for this run of sim_observe | ||
+ | graphics = 'both' | ||
verbose = True | verbose = True | ||
− | |||
overwrite = True | overwrite = True | ||
− | + | observe = True | |
− | antennalist | + | antennalist = 'alma;0.5arcsec' |
− | + | totaltime = '3600s' | |
− | + | sim_observe() # Run sim_observe to create the simulated data we need | |
− | + | default 'sim_analyze' | |
− | + | project = 'n891d' | |
− | |||
image=T | image=T | ||
+ | vis = project+'.alma_0.5arcsec.ms' | ||
+ | sim_analyze() # All other default settings are OK in sim_analyze | ||
+ | </source> | ||
− | + | [[File:N891.grs-24-cube.coord18-59-59.976-40d00m01.972.png]]<br> | |
− | + | Figure 3: a spectral profile in the box marked in green | |
− | + | <br> | |
− | |||
− | [[File:N891.grs-24-cube.coord18-59-59.976-40d00m01.972.png]] | ||
− | |||
− | |||
{| style="border:1px solid #3366FF; " cellspacing=2 | {| style="border:1px solid #3366FF; " cellspacing=2 | ||
− | |Input:<br> [[File:N891d.skymodel.png|300px]] | + | |Input:<br> [[File:N891d.alma_0.5arcsec.skymodel.png|300px]] |
− | |Predict:<br> [[File:N891d. | + | |Predict:<br> [[File:N891d.alma_0.5arcsec.observe.png|300px]] |
|- | |- | ||
− | |Image:<br> [[File:N891d.image.png|300px]] | + | |Image:<br> [[File:N891d.alma_0.5arcsec.image.png|300px]] |
|Analyze:<br> [[File:N891d.analysis.png|300px]] | |Analyze:<br> [[File:N891d.analysis.png|300px]] | ||
|} | |} | ||
+ | Figure 4: Sample results | ||
+ | {{Checked 3.3.0}} |
Latest revision as of 10:19, 22 November 2011
↵ Simulating Observations in CASA
Old version: N891 simdata2.
To create a script of the Python code on this page see Extracting scripts from these tutorials.
Nearby edge-on spiral
Roughly modeled after NGC891
Updated for CASA 3.3
- Model origin: Milky Way 13CO from the Galactic Ring Survey on the 14m FCRAO
- The cube is being binned to a coarser velocity resolution in order to speed the simulation. The fits file is grs-12kms.fits
# In CASA
# Initializing sim_observe
# Laying down some basic ground rules
default 'sim_observe'
project = 'n891d'
skymodel = 'grs-12kms.fits'
- Units: K - first convert to flux surface brightness: Jy/Sr = 2x1023 k T / λ2, = 4x108T at 110GHz.
# In CASA
# Setting the new frequency of the central channel
incenter = '110.1777GHz'
- Now we need to decide if this model data will work at the desired pixel scale
- The GRS resolution of 40" at ~10kpc is 0.04" at 10Mpc, so we should be able to do a simulation of observing at ~0.1-0.2". The resolution plot (See Figure 1) indicates that for ALMA at 100GHz, configuration 20 is appropriate.
- If we intend to set incell=0.2arcsec in sim_observe, then the cube needs to be multiplied by 4x108 * (.04/206265)2 = 1.4x10-5 to obtain Jy/pixel. The cube peaks at ~20K, so we can perform the simulation with inbright=3e-4, which should yield a peak of ~1mJy/bm.
- Will we be dominated by the noise in the input model? Input noise ~150mK or S/N~20, so at our scaled intensity, ~0.05 mJy/bm. The ALMA Sensitivity Calculator says that ALMA will achieve 2.5mJy/bm in 2 hours for the input 212m/s channel width (0.075MHz), so the noise in the input model should not affect our results.
# In CASA
# Setting the new channel width
inwidth = '0.075MHz'
- We do have a sensitivity issue though - if we decrease the spectral resolution by a factor of 6 (bin the input channels in some other program - sim_observe will know how to do that in the future but not yet), and plan for 3 8-hr tracks, then the sensitivity calculator suggests that we'll get <0.25mJy rms, or S/N>10 per beam. Rather than simulate 3 days of observing, I'll increase inbright by sqrt(3) and simulate one 8 hour track.
# In CASA
# Scaling the surface brightness
inbright = '1.4e-4'
- the ALMA 12m primary beam is 50" so we'd space a mosaic by 25", but the model cube has 326x357 pixels, or 13 arcsec with our small pixels. That's a lot smaller than the primary beam, so it doesn't matter much what output image size we ask for.
# In CASA
# Finish up the image model, and setting up the pointing
indirection = 'J2000 7h00m34 -23d03m00'
incell = '0.2arcsec'
setpointings = True
integration = '300s'
pointingspacing = '25arcsec'
mapsize = '60arcsec'
There are 659 channels in the input cube, but as noted above we want to bin those to 109 channels of 1.2 km/s each.
# In CASA
# Finish up the rest of the settings for this run of sim_observe
graphics = 'both'
verbose = True
overwrite = True
observe = True
antennalist = 'alma;0.5arcsec'
totaltime = '3600s'
sim_observe() # Run sim_observe to create the simulated data we need
default 'sim_analyze'
project = 'n891d'
image=T
vis = project+'.alma_0.5arcsec.ms'
sim_analyze() # All other default settings are OK in sim_analyze
Figure 3: a spectral profile in the box marked in green
Input:![]() |
Predict:![]() |
Image:![]() |
Analyze:![]() |
Figure 4: Sample results
Last checked on CASA Version 3.3.0.