예제 #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
예제 #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
예제 #3
0
def fmf_template():
    return cl1.new_fmf_template()
예제 #4
0
def test_equality():
    assert cl1.new_fmf_template() == cl1.new_fmf_template()
예제 #5
0
def test_create_fmf_template():
    # create a minimal (formally) valid fmf
    cl1.new_fmf_template()
예제 #6
0
def test_equality():
    assert cl1.new_fmf_template() == cl1.new_fmf_template()
예제 #7
0
def test_create_fmf_template():
    # create a minimal (formally) valid fmf
    cl1.new_fmf_template()
예제 #8
0
def fmf_template():
    return cl1.new_fmf_template()