Skip to content

Commit

Permalink
try code-block
Browse files Browse the repository at this point in the history
  • Loading branch information
jasondet authored Apr 26, 2024
1 parent 39cf4d3 commit 1d77b7f
Showing 1 changed file with 58 additions and 42 deletions.
100 changes: 58 additions & 42 deletions src/pygama/pargen/data_cleaning.py
Original file line number Diff line number Diff line change
Expand Up @@ -376,36 +376,44 @@ def generate_cuts(
data to calculate cuts on
parameters : dict
dictionary of the form:
{
"output_parameter_name": {
"cut_parameter": "parameter_to_cut_on",
"cut_level": number_of_sigmas,
"mode": "inclusive" or "exclusive"
.. code-block:: json
{
"output_parameter_name": {
"cut_parameter": "parameter_to_cut_on",
"cut_level": number_of_sigmas,
"mode": "inclusive" or "exclusive"
}
}
}
number of sigmas can instead be a dictionary to specify different cut levels for low and high side
or to only have a one sided cut only specify one of the low or high side
e.g.
{
"output_parameter_name": {
"cut_parameter": "parameter_to_cut_on",
"cut_level": {"low_side": 3, "high_side": 2},
"mode": "inclusive" or "exclusive"
.. code-block:: json
{
"output_parameter_name": {
"cut_parameter": "parameter_to_cut_on",
"cut_level": {"low_side": 3, "high_side": 2},
"mode": "inclusive" or "exclusive"
}
}
}
alternatively can specify hit dict fields to just copy dict into output dict e.g.
{
"is_valid_t0":{
"expression":"(tp_0_est>a)&(tp_0_est<b)",
"parameters":{"a":46000, "b":52000}
.. code-block:: json
{
"is_valid_t0":{
"expression":"(tp_0_est>a)&(tp_0_est<b)",
"parameters":{"a":46000, "b":52000}
}
}
}
or
{
"is_valid_cal":{
"expression":"(~is_pileup_tail)&(~is_pileup_baseline)"
.. code-block:: json
{
"is_valid_cal":{
"expression":"(~is_pileup_tail)&(~is_pileup_baseline)"
}
}
}
rounding : int
number of decimal places to round to
display : int
Expand Down Expand Up @@ -568,36 +576,44 @@ def generate_cut_classifiers(
data to calculate cuts on
parameters : dict
dictionary of the form:
{
"output_parameter_name": {
"cut_parameter": "parameter_to_cut_on",
"cut_level": number_of_sigmas,
"mode": "inclusive" or "exclusive"
.. code-block:: json
{
"output_parameter_name": {
"cut_parameter": "parameter_to_cut_on",
"cut_level": number_of_sigmas,
"mode": "inclusive" or "exclusive"
}
}
}
number of sigmas can instead be a dictionary to specify different cut levels for low and high side
or to only have a one sided cut only specify one of the low or high side
e.g.
{
"output_parameter_name": {
"cut_parameter": "parameter_to_cut_on",
"cut_level": {"low_side": 3, "high_side": 2},
"mode": "inclusive" or "exclusive"
.. code-block:: json
{
"output_parameter_name": {
"cut_parameter": "parameter_to_cut_on",
"cut_level": {"low_side": 3, "high_side": 2},
"mode": "inclusive" or "exclusive"
}
}
}
alternatively can specify hit dict fields to just copy dict into output dict e.g.
{
"is_valid_t0":{
"expression":"(tp_0_est>a)&(tp_0_est<b)",
"parameters":{"a":46000, "b":52000}
.. code-block:: json
{
"is_valid_t0":{
"expression":"(tp_0_est>a)&(tp_0_est<b)",
"parameters":{"a":46000, "b":52000}
}
}
}
or
{
"is_valid_cal":{
"expression":"(~is_pileup_tail)&(~is_pileup_baseline)"
.. code-block:: json
{
"is_valid_cal":{
"expression":"(~is_pileup_tail)&(~is_pileup_baseline)"
}
}
}
rounding : int
number of decimal places to round to
display : int
Expand Down

0 comments on commit 1d77b7f

Please sign in to comment.