Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove redundant pos recon #1449

Merged
merged 21 commits into from
Oct 17, 2024
Merged
Show file tree
Hide file tree
Changes from 18 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion straxen/analyses/event_display.py
Original file line number Diff line number Diff line change
Expand Up @@ -409,7 +409,7 @@ def _scatter_rec(
):
"""Convenient wrapper to show posrec of three algorithms for xenonnt."""
if recs is None:
recs = ("mlp", "cnn", "gcn")
recs = ("mlp", "cnf")
elif len(recs) > 5:
raise ValueError("I only got five markers/colors")
if scatter_kwargs is None:
Expand Down
5 changes: 2 additions & 3 deletions straxen/analyses/posrec_comparison.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ def load_corrected_positions(
alt_s1=False,
alt_s2=False,
cmt_version=None,
posrec_algos=("mlp", "gcn", "cnn"),
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why no "cnf" here?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It compares the FDC map, and the cnf one is currently unavailable

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please make an issue about this.

posrec_algos=("mlp"),
):
"""Returns the corrected position for each position algorithm available, without the need to
reprocess event_basics, as the needed information is already stored in event_basics.
Expand All @@ -22,8 +22,7 @@ def load_corrected_positions(
:param alt_s2: False by default, if True it uses alternative S2 as main one
:param cmt_version: CMT version to use (it can be a list of same length as posrec_algos, if
different versions are required for different posrec algorithms, default 'local_ONLINE')
:param posrec_algos: list of position reconstruction algorithms to use (default ['mlp', 'gcn',
'cnn'])
:param posrec_algos: list of position reconstruction algorithms to use (default ['mlp'])

"""

Expand Down
2 changes: 0 additions & 2 deletions straxen/corrections_services.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,6 @@
"s1_xyz_map_cnn",
"s1_xyz_map_gcn",
"fdc_map_mlp",
"fdc_map_cnn",
dachengx marked this conversation as resolved.
Show resolved Hide resolved
"fdc_map_gcn",
"s1_aft_xyz_map",
"bayes_model",
]
Expand Down
6 changes: 3 additions & 3 deletions straxen/plugins/events/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,12 +55,12 @@
from . import event_s2_positions_cnn
yuema137 marked this conversation as resolved.
Show resolved Hide resolved
from .event_s2_positions_cnn import *

from . import event_s2_positions_cnf
dachengx marked this conversation as resolved.
Show resolved Hide resolved
from .event_s2_positions_cnf import *

from . import event_s2_positions_gcn
from .event_s2_positions_gcn import *

from . import event_s2_positions_cnf
from .event_s2_positions_cnf import *

from . import event_s1_positions_cnn
from .event_s1_positions_cnn import *

Expand Down
2 changes: 1 addition & 1 deletion straxen/plugins/events/_event_s2_positions_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ def infer_dtype(self):
return dtype

def get_tf_model(self):
"""Simple wrapper to have several tf_event_model_mlp, tf_event_model_cnn, ..
"""Simple wrapper to have several tf_event_model_mlp, tf_event_model_cnf, ..

point to this same function in the compute method

Expand Down
2 changes: 1 addition & 1 deletion straxen/plugins/events/s2_recon_pos_diff.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ class S2ReconPosDiff(strax.Plugin):

recon_alg_included = straxen.URLConfig(
help="The list of all reconstruction algorithm considered.",
default=("_mlp", "_gcn"),
default=("_mlp", "_cnf"),
infer_type=False,
)

Expand Down
2 changes: 1 addition & 1 deletion straxen/plugins/peaks/_peak_positions_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ def infer_dtype(self):
return dtype

def get_tf_model(self):
"""Simple wrapper to have several tf_model_mlp, tf_model_cnn, ..
"""Simple wrapper to have several tf_model_mlp, tf_model_cnf, ..

point to this same function in the compute method

Expand Down
2 changes: 0 additions & 2 deletions straxen/plugins/peaks/peak_positions.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,7 @@ class PeakPositionsNT(strax.MergeOnlyPlugin):

provides = "peak_positions"
depends_on = (
"peak_positions_cnn",
"peak_positions_mlp",
"peak_positions_gcn",
"peak_positions_cnf",
)
save_when = strax.SaveWhen.NEVER
Expand Down
2 changes: 1 addition & 1 deletion tests/plugins/posrec_plugins.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ def test_posrec_bad_configs_raising_errors(
with self.assertRaises(FileNotFoundError):
plugin.get_tf_model()

dummy_st.register(straxen.plugins.peak_positions_cnn.PeakPositionsBaseNT)
dummy_st.register(straxen.plugins.peak_positions_cnf.PeakPositionsBaseNT)
plugin_name = strax.camel_to_snake("PeakPositionsBaseNT")
with self.assertRaises(NotImplementedError):
dummy_st.get_single_plugin(self.run_id, plugin_name)
Expand Down