Maintenance will be performed on git.ligo.org, chat.ligo.org, containers.ligo.org, and docs.ligo.org on Tuesday 7th July 2020 starting at approximately 10am PDT and lasting for around 15 minutes. There will be a short period of downtime towards the end of the maintenance window. Please direct any comments, questions, or concerns to uwm-help@cgca.uwm.edu.

Commit e9dbf812 authored by Ignacio Magana's avatar Ignacio Magana 💬

allow for cosmo to be specified

parent 04fa0188
Pipeline #122178 failed with stages
in 1 minute and 43 seconds
......@@ -26,6 +26,7 @@ each grid cell.
from functools import partial
from astropy import cosmology
from astropy.cosmology import FlatLambdaCDM
from astropy.cosmology.core import vectorize_if_needed
from astropy import units
from astropy.units import dimensionless_unscaled
......@@ -219,7 +220,8 @@ def assert_not_reached(): # pragma: no cover
def parser():
parser = ArgumentParser(parents=[random_parser])
parser.add_argument(
'--cosmology', choices=cosmology.parameters.available,
'--cosmology', choices=('Planck18_arXiv_v2', 'Planck15',
'Planck13', 'WMAP9', 'WMAP7', 'WMAP5', 'FlatLambdaCDM'),
default='Planck15', help='Cosmological model')
parser.add_argument(
'--distribution', required=True, choices=(
......@@ -252,8 +254,14 @@ def main(args=None):
xmlroot = xmldoc.appendChild(ligolw.LIGO_LW())
process = register_to_xmldoc(xmldoc, p, args)
cosmo = cosmology.default_cosmology.get_cosmology_from_string(
args.cosmology)
if args.cosmology == "FlatLambdaCDM":
cosmo = FlatLambdaCDM(H0=70, Om0=0.286, Tcmb0=2.725,
Neff=3.046, Ob0=0.046)
print(args.cosmology)
else:
cosmo = cosmology.default_cosmology.get_cosmology_from_string(
args.cosmology)
print(args.cosmology)
ns_mass_min = 1.0
ns_mass_max = 2.0
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment