## GNU Astronomy Utilities

Previous: , Up: CosmicCalculator   [Contents][Index]

#### 9.1.3 Invoking CosmicCalculator

CosmicCalculator will calculate cosmological variables based on the input parameters. The executable name is astcosmiccal with the following general template

$astcosmiccal [OPTION...] ...  One line examples: ## Print basic cosmological properties at redshift 2.5:$ astcosmiccal -z2.5

## Only print Comoving volume over 4pi stradian to z (Mpc^3):
$astcosmiccal --onlyvolume --redshift=0.8 ## Assume Lambda and matter density of 0.7 and 0.3 and print ## basic cosmological parameters for redshift 2.1:$ astcosmiccal -l0.7 -m0.3 -z2.1


The input parameters can be given as command-line options or in the configuration files, see Configuration files. For a definition of the different parameters, please see the sections prior to this. By default, all the cosmological calculations will be printed in the standard output (the command-line mainly) along with a short description and units.

The options starting with --only will only do that single desired calculation and only print the final number (in the same units as reported by default). These options are very useful when you want to call CosmicCalculator from a script. The resulting number can simply be put into a shell variable (for example vol) with the following line, which will allow you to use the value for any other subsequent operation.

z=3.12
vol=$(astcosmiccal --redshift=$z --onlyvolume)


In a script, this operation might be necessary for a very large number of objects (thousands of galaxies in a catalog for example). So the fact that all the other default calculations are ignored will also help you get to your result faster. If you just want to inspect the value of a variable, the description (which comes with units) might be more useful. In that case, the following command might be better. The other parameters will also be calculated, but they are so fast that you will not notice on modern computers.

\$ astcosmiccal --redshift=0.832 | grep volume


The full list of options is shown and described below:

-z FLT
--redshift=FLT

The redshift of interest.

-H FLT
--H0=FLT

Current expansion rate (in km sec$$^{-1}$$ Mpc$$^{-1}$$).

-l FLT
--olambda=FLT

Cosmological constant density divided by the critical density in the current Universe ($$\Omega_{\Lambda,0}$$).

-m FLT
--omatter=FLT

Matter (including massive neutrinos) density divided by the critical density in the current Universe ($$\Omega_{m,0}$$).

-r FLT

Radiation density divided by the critical density in the current Universe ($$\Omega_{r,0}$$).

-v
--onlyvolume

Only print the comoving volume (in units of Mpc$$^3$$) until the desired redshift based on the input parameters. See explanations above for more on these types of options and how to effectively use them.

-d
--onlyabsmagconv

Only print the conversion factor for apparent magnitude to absolute magnitude. Note that this is practically the distance modulus added with $$-2.5\log{(1+z)}$$ for the the desired redshift based on the input parameters. See explanations above for more on these types of options and how to effectively use them.

Previous: , Up: CosmicCalculator   [Contents][Index]