Skip to content

TRR Analysis script updates#239

Open
medha1996c wants to merge 16 commits intocta-observatory:mainfrom
medha1996c:trr_new
Open

TRR Analysis script updates#239
medha1996c wants to merge 16 commits intocta-observatory:mainfrom
medha1996c:trr_new

Conversation

@medha1996c
Copy link

Scripts for ChargeResolution using FF + NSB runs are added. Module added to reject bad_pixels, use per pixel per temperature gain (from SPE results by Halim) and FF coefficients using Anastasiia's script output.

Copy link
Collaborator

@jlenain jlenain left a comment

Choose a reason for hiding this comment

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

Thanks a lot, @medha1996c.
However, major changes are needed before this PR could be accepted: it re-implements a lot of classes already existing within nectarchain. Please let's avoid code duplication, and try to use the already existing implementations.

@jlenain jlenain added the enhancement New feature or request label Dec 4, 2025
@codecov
Copy link

codecov bot commented Dec 6, 2025

Codecov Report

❌ Patch coverage is 5.85586% with 209 lines in your changes missing coverage. Please review.
✅ Project coverage is 50.47%. Comparing base (0070b30) to head (df045fb).

Files with missing lines Patch % Lines
...rc/nectarchain/trr_test_suite/charge_resolution.py 0.00% 129 Missing ⚠️
src/nectarchain/trr_test_suite/tools_components.py 13.51% 64 Missing ⚠️
src/nectarchain/trr_test_suite/utils.py 15.78% 16 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #239      +/-   ##
==========================================
- Coverage   51.90%   50.47%   -1.44%     
==========================================
  Files          82       83       +1     
  Lines        6845     7067     +222     
==========================================
+ Hits         3553     3567      +14     
- Misses       3292     3500     +208     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

jlenain added a commit to anmikhno/nectarchain that referenced this pull request Dec 8, 2025
@jlenain
Copy link
Collaborator

jlenain commented Dec 9, 2025

Hi @medha1996c !
One last thing I was thinking about: would it be possible please to also implement some unit tests for the charge_resolution ?
Many thanks !

@jlenain
Copy link
Collaborator

jlenain commented Jan 29, 2026

Hi @medha1996c ,

The last push from yesterday mixes several PRs, I suspect this is due to a misbehaved rebase, is that correct? Please undo the last changes, rebase properly your branch onto main, and push again.

@jlenain
Copy link
Collaborator

jlenain commented Feb 3, 2026

Hi @medha1996c ! One last thing I was thinking about: would it be possible please to also implement some unit tests for the charge_resolution ? Many thanks !

Hi @medha1996c ,

Thanks for the last commits. Coming back to this: would it be possible please to implement some unit tests, especially for the ChargeResolutionTestTool class ? Many thanks !

"default None, ff_coefficients=1"
"1- Independent, 2- 2D Gaussian model by Anastasiia, else ff_coefficients=1",
required=False,
default=None,
Copy link
Collaborator

Choose a reason for hiding this comment

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

There is an inconsistency here: the model for the flat-field is declared as int, though taking None as default value.

When testing the integration of this test within the TRR GUI, this (correctly) fails with the following error:

/home/jlenain/local/src/python/cta-observatory/ctapipe_io_nectarcam/src/ctapipe_io_nectarcam/__init__.py:42: UserWarning: pkg_resources is deprecated as an API. See https://setuptools.pypa.io/en/latest/pkg_resources.html. The pkg_resources package is slated for removal as early as 2025-11-30. Refrain from using this package or pin to Setuptools<81.
  from pkg_resources import resource_filename
usage: charge_resolution.py [-h] [-r RUN_FILE] [-e EVTS] [-o OUTPUT]
                            [-t TEMPERATURE] [-ff FF_MODEL]
charge_resolution.py: error: argument -ff/--ff_model: invalid int value: 'None'

jlenain added a commit to anmikhno/nectarchain that referenced this pull request Feb 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants