Ejemplo n.º 1
0
 def exitRecorder_at(self, ctx:slatParser.Recorder_atContext):
     if ctx.FLOAT_VAL():
         floats = ctx.FLOAT_VAL()
         if len(floats) != 3:
             raise ValueError("Recorder 'at' specification requires exactly three values.")
         else:
             start = float(floats[0].getText())
             incr = float(floats[1].getText())
             end = float(floats[2].getText())
             self._stack.append(pyslat.frange(start, end, incr))
Ejemplo n.º 2
0
 def exitRecorder_at(self, ctx: slatParser.Recorder_atContext):
     if ctx.FLOAT_VAL():
         floats = ctx.FLOAT_VAL()
         if len(floats) != 3:
             raise ValueError(
                 "Recorder 'at' specification requires exactly three values."
             )
         else:
             start = float(floats[0].getText())
             incr = float(floats[1].getText())
             end = float(floats[2].getText())
             self._stack.append(pyslat.frange(start, end, incr))
Ejemplo n.º 3
0
                        None, costimvalues)

    if id == 1:
        pyslat.MakeRecorder(
            "DELAYEDP_{:>03}_REC".format(id), 'delayedp', cg,
            {'filename': ResultsFile("delay_{}_edp".format(id))}, None,
            at_values)

        pyslat.MakeRecorder(
            "DELAYIM_{:>03}_REC".format(id), 'delayim', cg,
            {'filename': ResultsFile("delay_{}_im".format(id))}, None,
            costimvalues)

    pyslat.MakeRecorder("DSEDP_{:>03}_REC".format(id), 'dsedp', cg,
                        {'filename': ResultsFile("ds_edp_{}".format(id))},
                        None, pyslat.frange(0.0, 0.200, 0.01))

    pyslat.MakeRecorder("DSIM_{:>03}_REC".format(id), 'dsim', cg,
                        {'filename': ResultsFile("ds_im_{}".format(id))}, None,
                        linvalues)

    pyslat.MakeRecorder("DSRATE_{:>03}_REC".format(id), 'dsrate', cg,
                        {'filename': ResultsFile("ds_rate_{:>03}".format(id))},
                        None, None)

    pyslat.MakeRecorder("COSTRATE_{:>03}_REC".format(id), 'costrate', cg,
                        {'filename': ResultsFile("cost_rate_{}".format(id))},
                        None, pyslat.frange(1E-4, 1.2, 4.8E-3))

    building.AddCompGroup(cg)
Ejemplo n.º 4
0
        pyslat.MakeRecorder(
            "DELAYIM_{:>03}_REC".format(id),
            "delayim",
            cg,
            {"filename": ResultsFile("delay_{}_im.txt".format(id))},
            None,
            costimvalues,
        )

    pyslat.MakeRecorder(
        "DSEDP_{:>03}_REC".format(id),
        "dsedp",
        cg,
        {"filename": ResultsFile("ds_edp_{}.txt".format(id))},
        None,
        pyslat.frange(0.0, 0.200, 0.01),
    )

    pyslat.MakeRecorder(
        "DSIM_{:>03}_REC".format(id), "dsim", cg, {"filename": ResultsFile("ds_im_{}.txt".format(id))}, None, linvalues
    )

    pyslat.MakeRecorder(
        "DSRATE_{:>03}_REC".format(id),
        "dsrate",
        cg,
        {"filename": ResultsFile("ds_rate_{:>03}.txt".format(id))},
        None,
        None,
    )