Skip to content

Fixes to get the public context running again#382

Open
HenningSE wants to merge 1 commit into
mainfrom
public_sim_fix
Open

Fixes to get the public context running again#382
HenningSE wants to merge 1 commit into
mainfrom
public_sim_fix

Conversation

@HenningSE

Copy link
Copy Markdown
Collaborator

This PR aims to get the public context running again. The most important changes are summarized below.

S1 LCE Correction Map Refactor

  • Added a new function lce_from_pattern_map in context_utils.py to build an S1 LCE correction map directly from an S1 pattern map, and registered it as a URLConfig endpoint. This makes LCE map construction modular and reusable.
  • Updated the S1PhotonHits plugin to use the new lce_from_pattern_map function via a straxen.URLConfig entry for s1_lce_correction_map, simplifying configuration and improving maintainability.
  • Removed the manual LCE map construction from the setup method in S1PhotonHits, as it is now handled by the new URLConfig mechanism.
  • The goal of this change is to simplify the usage of DummyMaps for the LCE map. The functionality remains unchanged.

Map Handling Improvements

  • Enhanced the DummyMap class to support initialization from a map dictionary, allowing it to be used seamlessly with maps produced or modified outside the class (e.g., by lce_from_pattern_map).

Data Type Consistency

  • Ensured that timing arrays returned by singlet_triplet_delays and _luminescence_timings_simple in s2_photon_propagation.py are always of type np.int64, preventing downstream type errors. [1] [2]

Other

  • Added a missing conditional for the comsol field distortion model in electron_drift.py to ensure it is only used when the comsol option is actually used.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant