Skip to content

Conversation

@mhliu0001
Copy link
Contributor

@mhliu0001 mhliu0001 commented Sep 29, 2024

Previously only one nodep_data_name is supported. Most of the time we are setting this to "batch_size". But sometimes it is necessary to set multiple nodep_data_names, like ["x", "y", "z", "num_photons", "num_electrons"]. This PR adds support for multiple nodep_data_names.

MWE:

import appletree as apt
er = apt.ERBand(bins=[bins_cs1, bins_cs2], bins_type="irreg")
er.deduce(data_names=["s1_area", "s2_area", "anti_correlation_eff"], nodep_data_names=["num_photon", "num_electron", "x", "y", "z"], force_no_eff=True)
er.compile()
print(er.code)

@coveralls
Copy link

coveralls commented Sep 29, 2024

Pull Request Test Coverage Report for Build 13705093227

Details

  • 11 of 12 (91.67%) changed or added relevant lines in 1 file are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+0.03%) to 84.225%

Changes Missing Coverage Covered Lines Changed/Added Lines %
appletree/component.py 11 12 91.67%
Totals Coverage Status
Change from base Build 13115356090: 0.03%
Covered Lines: 2424
Relevant Lines: 2878

💛 - Coveralls

Copy link
Collaborator

@dachengx dachengx left a comment

Choose a reason for hiding this comment

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

Please:

  1. Add a test for this new feature
  2. Make sure that all nodep_data_name has been changed to nodep_data_names

@mhliu0001 mhliu0001 marked this pull request as draft September 29, 2024 15:50
@mhliu0001 mhliu0001 marked this pull request as ready for review October 3, 2024 18:45
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.

4 participants