Пример #1
0
 parser.add_argument('-v',
                     '--version',
                     action='version',
                     version='%(prog)s ' + __version__)
 # quiet mode:
 parser.add_argument(
     '-q',
     '--quiet',
     dest='quiet',
     action='store_true',
     help='decides wether something gets printed to screen or not')
 # do the parsing:
 args = parser.parse_args()
 # print the CosmicFish header:
 if not args.quiet:
     fu.CosmicFish_write_header(' Cls covariance comparison plotter v' +
                                __version__)
 # process input arguments:
 files = args.files
 number_cls_cov = len(files)
 if args.outroot is not None:
     outroot = args.outroot
 else:
     outroot = os.path.join(os.path.splitext(files[0])[0])
 # import the data:
 data = []
 for i in files:
     data.append(np.loadtxt(i))
 # extract the names:
 # extract the names:
 names = []
 if args.labels is None:
Пример #2
0
                        '--version',
                        action='version',
                        version='%(prog)s ' + __version__)
    # quiet mode:
    parser.add_argument(
        '-q',
        '--quiet',
        dest='quiet',
        action='store_true',
        help='decides wether something gets printed to screen or not')
    # do the parsing:
    args = parser.parse_args()

    # print the CosmicFish header:
    if not args.quiet:
        fu.CosmicFish_write_header(
            ' 2D confidence level Fisher matrix plotter v' + __version__)

    # process input arguments:
    files = args.files
    number_fish = len(files)
    if args.outroot is not None:
        outroot = args.outroot
    else:
        outroot = os.path.join(os.path.splitext(files[0])[0])
    params = args.params

    output_format = args.format
    if output_format is None:
        output_format = 'pdf'

    # warning for the ini file:
Пример #3
0
 parser.add_argument('-v',
                     '--version',
                     action='version',
                     version='%(prog)s ' + __version__)
 # quiet mode:
 parser.add_argument(
     '-q',
     '--quiet',
     dest='quiet',
     action='store_true',
     help='decides wether something gets printed to screen or not')
 # do the parsing:
 args = parser.parse_args()
 # print the CosmicFish header:
 if not args.quiet:
     fu.CosmicFish_write_header(' SN Mock plotter v' + __version__)
 # process input arguments:
 files = args.files
 number_SN_mock = len(files)
 if args.outroot is not None:
     outroot = args.outroot
 else:
     outroot = os.path.join(os.path.splitext(files[0])[0])
 # import the data:
 data = []
 for i in files:
     data.append(np.loadtxt(i))
 # extract the names:
 names = []
 for i in files:
     names.append(os.path.splitext(os.path.basename(i))[0])
Пример #4
0
                        '--version',
                        action='version',
                        version='%(prog)s ' + __version__)
    # quiet mode:
    parser.add_argument(
        '-q',
        '--quiet',
        dest='quiet',
        action='store_true',
        help='decides wether something gets printed to screen or not')
    # do the parsing:
    args = parser.parse_args()

    # print the CosmicFish header:
    if not args.quiet:
        fu.CosmicFish_write_header(' confidence bounds calculator version ' +
                                   __version__)

    # process input arguments:
    files = args.files
    number_fish = len(files)
    if args.outroot is not None:
        outroot = args.outroot
    else:
        outroot = None

    # latex rendering of text if required:
    if args.latex is not None:
        if args.latex:
            plt.rc('font', **{'family': 'serif', 'serif': ['Computer Modern']})
            plt.rc('text', usetex=True)
                        '--version',
                        action='version',
                        version='%(prog)s ' + __version__)
    # quiet mode:
    parser.add_argument(
        '-q',
        '--quiet',
        dest='quiet',
        action='store_true',
        help='decides wether something gets printed to screen or not')
    # do the parsing:
    args = parser.parse_args()

    # print the CosmicFish header:
    if not args.quiet:
        fu.CosmicFish_write_header('Global analysis app version ' +
                                   __version__)

    # process input arguments:
    inifile = args.inifile

    #function used to deal with ini sections
    def ConfigSectionMap(section):
        dict1 = {}
        options = Config.options(section)
        for option in options:
            try:
                dict1[option] = Config.get(section, option)
                if dict1[option] == -1:
                    DebugPrint("skip: %s" % option)
            except:
                print("exception on %s!" % option)
Пример #6
0
                        '--version',
                        action='version',
                        version='%(prog)s ' + __version__)
    # quiet mode:
    parser.add_argument(
        '-q',
        '--quiet',
        dest='quiet',
        action='store_true',
        help='decides wether something gets printed to screen or not')
    # do the parsing:
    args = parser.parse_args()

    # print the CosmicFish header:
    if not args.quiet:
        fu.CosmicFish_write_header(' Triangular Fisher matrix plotter v' +
                                   __version__)

    # process input arguments:
    files = args.files
    number_fish = len(files)
    if args.outroot is not None:
        outroot = args.outroot
    else:
        outroot = os.path.join(os.path.splitext(files[0])[0])
    params = args.params

    output_format = args.format
    if output_format is None:
        output_format = 'pdf'

    # warning for the ini file:
Пример #7
0
                        action='version',
                        version='%(prog)s ' + __version__)
    # quiet mode:
    parser.add_argument(
        '-q',
        '--quiet',
        dest='quiet',
        action='store_true',
        help='decides wether something gets printed to screen or not')

    # do the parsing:
    args = parser.parse_args()

    # print the CosmicFish header:
    if not args.quiet:
        fu.CosmicFish_write_header(' Fisher matrix comparison plotter v' +
                                   __version__)

    # process input arguments:
    files = args.files
    number_fish = len(files)
    if args.outroot is not None:
        outroot = args.outroot
    else:
        outroot = os.path.dirname(files[0]) + '/'

    params = args.params

    output_format = args.format
    if output_format is None:
        output_format = 'pdf'
Пример #8
0
                        '--version',
                        action='version',
                        version='%(prog)s ' + __version__)
    # quiet mode:
    parser.add_argument(
        '-q',
        '--quiet',
        dest='quiet',
        action='store_true',
        help='decides wether something gets printed to screen or not')
    # do the parsing:
    args = parser.parse_args()

    # print the CosmicFish header:
    if not args.quiet:
        fu.CosmicFish_write_header(' 1D posterior Fisher matrix plotter v' +
                                   __version__)

    # process input arguments:
    files = args.files
    number_fish = len(files)
    if args.outroot is not None:
        outroot = args.outroot
    else:
        outroot = os.path.join(os.path.splitext(files[0])[0])
    params = args.params

    output_format = args.format
    if output_format is None:
        output_format = 'pdf'

    # warning for the ini file:
Пример #9
0
 def test_CosmicFish_write_header(self):
     fu.CosmicFish_write_header(' Test header.')