Skip to content

Tutorial confusion regarding trapTmax #48

@Jita22

Description

@Jita22

Was digging around for the definition of trapTmax. The tutorial seems to have a nice illustration with the processor

        "trapTmax": {
            "function": "argmax",
            "module": "numpy",
            "args": ["wf_trap", 1, "trapTmax"],
            "kwargs": {"signature": "(n),()->()", "types": ["fi->i"]},
            "unit": "ns",
        }

that indicates that it should a time (note that it has units of ns). The attached image in the documentation also seems to show a vertical blue line that presumably corresponding to a time.

HOWEVER, digging through the config files in legend-dataflow-config (which now have short descriptions of the parameters), it is clear that trapTmax is the max of a fixed length long trap filter and should correspond to an uncalibrated energy. Here is the relevant section from a config file

    "trapTmax": {
      "description": "max of fixed length long trap filter",
      "function": "amax",
      "module": "numpy",
      "args": [
        "wf_trap[round(2*db.ttrap.rise+db.ttrap.flat, wf_pz.period):-round((2*db.ttrap.rise+db.ttrap.flat), wf_pz.period)]",
        1,
        "trapTmax"
      ],
      "kwargs": { "signature": "(n),()->()", "types": ["fi->f"] },
      "defaults": { "db.ttrap.rise": "10*us", "db.ttrap.flat": "3.008*us" },
      "unit": "ADC"
    }

Could we make the tutorial definition consistent with the processor being used for production?
Screen Shot 2024-01-23 at 3 34 12 PM

Metadata

Metadata

Assignees

No one assigned

    Labels

    documentationImprovements or additions to documentation

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions