Beispiel #1
0
def main():
    parser = OptionParser(usage=usage, version='%prog')
    parser.add_option('-g', '--geometry', metavar='name',
                      action='store', dest='geometry',
                      default='2_4', help=helps['geometry'])
    parser.add_option('-n', '--order', metavar='order', type=int,
                      action='store', dest='order',
                      default=2, help=helps['order'])
    parser.add_option('-r', '--min-radius', metavar='float', type=float,
                      action='store', dest='min_radius',
                      default=10, help=helps['min_radius'])
    parser.add_option('-R', '--max-radius', metavar='float', type=float,
                      action='store', dest='max_radius',
                      default=50, help=helps['max_radius'])
    parser.add_option('-c', '--show-colorbar',
                      action='store_true', dest='show_colorbar',
                      default=False, help=helps['show_colorbar'])
    options, args = parser.parse_args()

    if len(args) != 0:
        parser.print_help(),
        return

    pq.plot_quadrature(None, options.geometry, options.order,
                       options.min_radius, options.max_radius,
                       options.show_colorbar)
    pq.plt.show()
def main():
    parser = ArgumentParser(description=__doc__)
    parser.add_argument('--version', action='version', version='%(prog)s')
    parser.add_argument('-g',
                        '--geometry',
                        metavar='name',
                        action='store',
                        dest='geometry',
                        default='2_4',
                        help=helps['geometry'])
    parser.add_argument('-n',
                        '--order',
                        metavar='order',
                        type=int,
                        action='store',
                        dest='order',
                        default=2,
                        help=helps['order'])
    parser.add_argument('-r',
                        '--min-radius',
                        metavar='float',
                        type=float,
                        action='store',
                        dest='min_radius',
                        default=10,
                        help=helps['min_radius'])
    parser.add_argument('-R',
                        '--max-radius',
                        metavar='float',
                        type=float,
                        action='store',
                        dest='max_radius',
                        default=50,
                        help=helps['max_radius'])
    parser.add_argument('-c',
                        '--show-colorbar',
                        action='store_true',
                        dest='show_colorbar',
                        default=False,
                        help=helps['show_colorbar'])
    options = parser.parse_args()

    pq.plot_quadrature(None, options.geometry, options.order,
                       options.min_radius, options.max_radius,
                       options.show_colorbar)
    pq.plt.show()
Beispiel #3
0
def main():
    parser = ArgumentParser(description=__doc__)
    parser.add_argument('--version', action='version', version='%(prog)s')
    parser.add_argument('-g', '--geometry', metavar='name',
                        action='store', dest='geometry',
                        default='2_4', help=helps['geometry'])
    parser.add_argument('-n', '--order', metavar='order', type=int,
                        action='store', dest='order',
                        default=2, help=helps['order'])
    parser.add_argument('-b', '--boundary',
                        action='store_true', dest='boundary',
                        default=False, help=helps['boundary'])
    parser.add_argument('-r', '--min-radius', metavar='float', type=float,
                        action='store', dest='min_radius',
                        default=10, help=helps['min_radius'])
    parser.add_argument('-R', '--max-radius', metavar='float', type=float,
                        action='store', dest='max_radius',
                        default=50, help=helps['max_radius'])
    parser.add_argument('-c', '--show-colorbar',
                        action='store_true', dest='show_colorbar',
                        default=False, help=helps['show_colorbar'])
    parser.add_argument('-l', '---show-labels',
                        action='store_true', dest='show_labels',
                        default=False, help=helps['show_labels'])
    parser.add_argument('-p', '--print-qp',
                        action='store_true', dest='print_qp',
                        default=False, help=helps['print_qp'])
    options = parser.parse_args()

    aux = pq.plot_quadrature(None, options.geometry, options.order,
                             boundary=options.boundary,
                             min_radius=options.min_radius,
                             max_radius=options.max_radius,
                             show_colorbar=options.show_colorbar,
                             show_labels=options.show_labels)

    if options.print_qp:
        ax, coors, weights = aux
        for ic, coor in enumerate(coors):
            print(ic, coor, weights[ic])

    pq.plt.show()
def main():
    parser = ArgumentParser(description=__doc__)
    parser.add_argument('--version', action='version', version='%(prog)s')
    parser.add_argument('-g',
                        '--geometry',
                        metavar='name',
                        action='store',
                        dest='geometry',
                        default='2_4',
                        help=helps['geometry'])
    parser.add_argument('-n',
                        '--order',
                        metavar='order',
                        type=int,
                        action='store',
                        dest='order',
                        default=2,
                        help=helps['order'])
    parser.add_argument('-b',
                        '--boundary',
                        action='store_true',
                        dest='boundary',
                        default=False,
                        help=helps['boundary'])
    parser.add_argument('-r',
                        '--min-radius',
                        metavar='float',
                        type=float,
                        action='store',
                        dest='min_radius',
                        default=10,
                        help=helps['min_radius'])
    parser.add_argument('-R',
                        '--max-radius',
                        metavar='float',
                        type=float,
                        action='store',
                        dest='max_radius',
                        default=50,
                        help=helps['max_radius'])
    parser.add_argument('-c',
                        '--show-colorbar',
                        action='store_true',
                        dest='show_colorbar',
                        default=False,
                        help=helps['show_colorbar'])
    parser.add_argument('-l',
                        '---show-labels',
                        action='store_true',
                        dest='show_labels',
                        default=False,
                        help=helps['show_labels'])
    parser.add_argument('-p',
                        '--print-qp',
                        action='store_true',
                        dest='print_qp',
                        default=False,
                        help=helps['print_qp'])
    options = parser.parse_args()

    aux = pq.plot_quadrature(None,
                             options.geometry,
                             options.order,
                             boundary=options.boundary,
                             min_radius=options.min_radius,
                             max_radius=options.max_radius,
                             show_colorbar=options.show_colorbar,
                             show_labels=options.show_labels)

    if options.print_qp:
        ax, coors, weights = aux
        for ic, coor in enumerate(coors):
            print(ic, coor, weights[ic])

    pq.plt.show()