Skip to content

Flat field#245

Draft
ArmelleJB wants to merge 10 commits intocta-observatory:mainfrom
ArmelleJB:flat_field
Draft

Flat field#245
ArmelleJB wants to merge 10 commits intocta-observatory:mainfrom
ArmelleJB:flat_field

Conversation

@ArmelleJB
Copy link
Contributor

  • save the ID of the identified bad pixels (instead of their position in the list),
  • fix format issues when using LocalPeakWindowSum or GlobalPeakWindowSum methods
  • add a parameter for the number of samples used for the pedestal estimation
  • add simple check on the location of the peak and discard events that are too close from the beginning of the trace, to safely estimate the pedestal
  • happy new year !

@ArmelleJB ArmelleJB marked this pull request as draft January 2, 2026 18:36
@ArmelleJB ArmelleJB marked this pull request as ready for review January 2, 2026 18:59
@ArmelleJB ArmelleJB marked this pull request as draft January 2, 2026 18:59
@ArmelleJB ArmelleJB marked this pull request as ready for review January 2, 2026 19:01
@ArmelleJB ArmelleJB marked this pull request as draft January 2, 2026 19:01
@ArmelleJB ArmelleJB marked this pull request as ready for review January 2, 2026 19:09
@codecov
Copy link

codecov bot commented Jan 2, 2026

Codecov Report

❌ Patch coverage is 17.50000% with 33 lines in your changes missing coverage. Please review.
✅ Project coverage is 52.14%. Comparing base (f73ddcd) to head (ef040ab).

Files with missing lines Patch % Lines
...ectarchain/makers/component/flatfield_component.py 15.38% 33 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #245      +/-   ##
==========================================
+ Coverage   51.98%   52.14%   +0.15%     
==========================================
  Files          80       80              
  Lines        6713     6680      -33     
==========================================
- Hits         3490     3483       -7     
+ Misses       3223     3197      -26     

☔ 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.

apply_integration_correction=self.charge_integration_correction,
)
amp_int_per_pix_per_event = integrator(
wfs_pedsub, 0, None, np.invert(self.__bad_pixels_mask)
Copy link
Collaborator

Choose a reason for hiding this comment

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

The 0 in second argument hardcodes the fact that only data from the NectarCAM QM can be analysed. Instead, a tel_id should be provided, to allow the analysis of any NectarCAM camera.

@jlenain
Copy link
Collaborator

jlenain commented Jan 8, 2026

This PR currently conflicts with #242

ArmelleJB and others added 9 commits January 14, 2026 10:46
…ber of samples used for the pedestal estimation, fix bugs when using LocalPeakWindowSum or GlobalPeakWindowSum methods
…ose from the beginning of the trace, to safely estimate the pedestal
…ose from the beginning of the trace, to safely estimate the pedestal
…ose from the beginning of the trace, to safely estimate the pedestal
…caused the flatfield script to fail during the second pass in Armelle's script.

Fixed a few typos as well.
@jlenain
Copy link
Collaborator

jlenain commented Jan 14, 2026

This PR currently conflicts with #242

Just rebased this PR from main. It would be good to check that I did not break anything in the process!

@jlenain jlenain added the enhancement New feature or request label Jan 14, 2026
@jlenain
Copy link
Collaborator

jlenain commented Jan 19, 2026

This PR still undoes the possibility to use in input the pedestal (resp. gain) values from the output files of pedestal (resp. gain) calibration tools, introduced in #226. These improvements should not disappear.

@jlenain jlenain marked this pull request as draft January 19, 2026 13:31
@jlenain jlenain mentioned this pull request Jan 19, 2026
@jlenain
Copy link
Collaborator

jlenain commented Jan 19, 2026

Could we please close this, and work from #250 instead ?

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.

2 participants