Exemplo n.º 1
0
def fmf_template_with_tables():
    from pyfmflib.cl1 import (TableDefinitions, DataDefinitions, Data,
                              KeyValue, DataRow, Comment)
    fmf = cl1.new_fmf_template()
    fmf.table_sections = [
        TableDefinitions([
            Comment('A comment'),
            KeyValue('Table 1', 't_1'),
            KeyValue('Table 2', 't_2'),
        ]),
        DataDefinitions(symbol='t_1',
                        entries=[
                            KeyValue('time', 't [s]'),
                            Comment('Another comment'),
                            KeyValue('distance', 's(t) [m]'),
                        ]),
        Data(symbol='t_1',
             entries=[
                 DataRow(('0', '-2')),
                 DataRow(('1.1', '0.1')),
                 DataRow(('2.0', '3.1')),
                 Comment('Yet another comment'),
                 DataRow(('2.9', '4.5'))
             ]),
        DataDefinitions(symbol='t_2',
                        entries=[
                            KeyValue('another time', 't [ms]'),
                            KeyValue('another distance', 's(t) [mum]'),
                        ]),
        Data(symbol='t_2',
             entries=[DataRow(('1', '2')),
                      DataRow(('2.1', '3.4'))])
    ]
    return fmf
Exemplo n.º 2
0
def fmf_template_with_tables():
    from pyfmflib.cl1 import (
        TableDefinitions, DataDefinitions, Data, KeyValue, DataRow, Comment
        )
    fmf = cl1.new_fmf_template()
    fmf.table_sections = [
        TableDefinitions(
            [
                Comment('A comment'),
                KeyValue('Table 1', 't_1'),
                KeyValue('Table 2', 't_2'),
                ]
            ),
        DataDefinitions(
            symbol='t_1',
            entries=[
                KeyValue('time', 't [s]'),
                Comment('Another comment'),
                KeyValue('distance', 's(t) [m]'),
                ]
        ),
        Data(
            symbol='t_1',
            entries=[
                DataRow(('0', '-2')),
                DataRow(('1.1', '0.1')),
                DataRow(('2.0', '3.1')),
                Comment('Yet another comment'),
                DataRow(('2.9', '4.5'))
                ]
            ),
        DataDefinitions(
            symbol='t_2',
            entries=[
                KeyValue('another time', 't [ms]'),
                KeyValue('another distance', 's(t) [mum]'),
                ]
        ),
        Data(
            symbol='t_2',
            entries=[
                DataRow(('1', '2')),
                DataRow(('2.1', '3.4'))
                ]
            )
        ]
    return fmf
Exemplo n.º 3
0
def fmf_template():
    return cl1.new_fmf_template()
Exemplo n.º 4
0
def test_equality():
    assert cl1.new_fmf_template() == cl1.new_fmf_template()
Exemplo n.º 5
0
def test_create_fmf_template():
    # create a minimal (formally) valid fmf
    cl1.new_fmf_template()
Exemplo n.º 6
0
def test_equality():
    assert cl1.new_fmf_template() == cl1.new_fmf_template()
Exemplo n.º 7
0
def test_create_fmf_template():
    # create a minimal (formally) valid fmf
    cl1.new_fmf_template()
Exemplo n.º 8
0
def fmf_template():
    return cl1.new_fmf_template()