Next: Building custom programs with the library, Previous: Angular coverage on the sky, Up: General program usage tutorial [Contents][Index]
Having found the angular coverage of the dataset in Angular coverage on the sky, we can now use Gnuastro to answer a more physically motivated question: “How large is this area at different redshifts?”. To get a feeling of the tangential area that this field covers at redshift 2, you can use Gnuastro’s CosmicCalcular program (CosmicCalculator). In particular, you need the tangential distance covered by 1 arc-second as raw output. Combined with the field’s area that was measured before, we can calculate the tangential distance in Mega Parsecs squared (\(Mpc^2\)).
## If your system language uses ',' (not '.') as decimal separator. $ export LANG=C ## Print general cosmological properties at redshift 2 (for example). $ astcosmiccal -z2 ## When given a "Specific calculation" option, CosmicCalculator ## will just print that particular calculation. To see all such ## calculations, add a `--help' token to the previous command ## (under the same title). Note that with `--help', no processing ## is done, so you can always simply append it to remember ## something without modifying the command you want to run. $ astcosmiccal -z2 --help ## Only print the "Tangential dist. covered by 1arcsec at z (kpc)". ## in units of kpc/arc-seconds. $ astcosmiccal -z2 --arcsectandist ## But its easier to use the short version of this option (which ## can be appended to other short options. $ astcosmiccal -sz2 ## Convert this distance to kpc^2/arcmin^2 and save in `k'. $ k=$(astcosmiccal -sz2 | awk '{print ($1*60)^2}') ## Re-calculate the area of the dataset in arcmin^2. $ n=$(aststatistics flat-ir/xdf-f160w.fits --number) $ r=$(astfits flat-ir/xdf-f160w.fits -h1 | grep CDELT1 \ | awk '{print $3}') $ a=$(echo $n $r | awk '{print $1 * ($2*60)^2 }') ## Multiply `k' and `a' and divide by 10^6 for value in Mpc^2. $ echo $k $a | awk '{print $1 * $2 / 1e6}'
At redshift 2, this field therefore covers approximately 1.07 \(Mpc^2\). If you would like to see how this tangential area changes with redshift, you can use a shell loop like below.
$ for z in 0.5 1.0 1.5 2.0 2.5 3.0 3.5 4.0 4.5 5.0; do \ k=$(astcosmiccal -sz$z); \ echo $z $k $a | awk '{print $1, ($2*60)^2 * $3 / 1e6}'; \ done
Fortunately, the shell has a useful tool/program to print a sequence of numbers that is nicely called seq
.
You can use it instead of typing all the different redshifts in this example.
For example the loop below will calculate and print the tangential coverage of this field across a larger range of redshifts (0.1 to 5) and with finer increments of 0.1.
## If your system language uses ',' (not '.') as decimal separator. $ export LANG=C ## The loop over the redshifts $ for z in $(seq 0.1 0.1 5); do \ k=$(astcosmiccal -z$z --arcsectandist); \ echo $z $k $a | awk '{print $1, ($2*60)^2 * $3 / 1e6}'; \ done
Next: Building custom programs with the library, Previous: Angular coverage on the sky, Up: General program usage tutorial [Contents][Index]
JavaScript license information
GNU Astronomy Utilities 0.18 manual, July 2022.