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

Fix arrays not being masked correctly in flatfield calculator #1149

Merged
merged 6 commits into from
Aug 29, 2023

Conversation

maxnoe
Copy link
Member

@maxnoe maxnoe commented Aug 24, 2023

No description provided.

@codecov
Copy link

codecov bot commented Aug 24, 2023

Codecov Report

Patch coverage: 100.00% and no project coverage change.

Comparison is base (e3368bd) 73.74% compared to head (d91e876) 73.75%.
Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #1149   +/-   ##
=======================================
  Coverage   73.74%   73.75%           
=======================================
  Files         124      124           
  Lines       12586    12589    +3     
=======================================
+ Hits         9282     9285    +3     
  Misses       3304     3304           
Files Changed Coverage Δ
lstchain/calib/camera/calibration_calculator.py 91.42% <100.00%> (+0.16%) ⬆️
lstchain/calib/camera/flatfield.py 96.69% <100.00%> (ø)
lstchain/calib/camera/pedestals.py 96.22% <100.00%> (ø)
lstchain/visualization/plot_calib.py 100.00% <100.00%> (ø)

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

FrancaCassol
FrancaCassol previously approved these changes Aug 25, 2023
@maxnoe
Copy link
Member Author

maxnoe commented Aug 25, 2023

In the last commit, you remove the setting of values to True in the outlier arrays.

Are you sure, this does what we want?


In [3]: outliers = np.ma.array([True, False, True], mask=[True, True, False])

In [4]: np.ma.getdata(outliers)
Out[4]: array([ True, False,  True])

I guess we want all masked values be marked as outliers, right?

That would be:

In [5]: outliers.filled(True)
Out[5]: array([ True,  True,  True])

@FrancaCassol
Copy link
Collaborator

@maxnoe, I agree, change done

@rlopezcoto rlopezcoto merged commit 47a5b40 into main Aug 29, 2023
9 checks passed
@rlopezcoto rlopezcoto deleted the fix_flatfield_calculator branch August 29, 2023 16:35
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.

3 participants