Skip to content
Snippets Groups Projects

implement get_generic_circuit_type

Merged Simon Mazenoux requested to merge implement_get_generic_circuit_type into dev
4 unresolved threads

See LHCData/lhc-sm-analysis/lhc-sm-qh!56 (comment 8421337). Thinking of it, this is quite a long overdue.

Merge request reports

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
473 473
474 474 def get_circuit_type_for_circuit_name(circuit_name: str) -> str:
475 475 """
  • Alexandra Murariu approved this merge request

    approved this merge request

  • Andreas Verdoner Barba approved this merge request

    approved this merge request

  • added 1 commit

    • dffcf88b - implement get_generic_circuit_type

    Compare with previous version

  • Simon Mazenoux reset approvals from @amurariu and @abarba by pushing to the branch

    reset approvals from @amurariu and @abarba by pushing to the branch

  • 611 651 mask_magnets_with_nan = (magnet_to_qps_crate_df["Circuit"] == circuit_name) & (
    612 652 magnet_to_qps_crate_df["Crate U_DIODE_RQx"].isna()
    613 653 )
    614 return magnet_to_qps_crate_df[mask_magnets_with_nan]["Magnet"].values
    654 return magnet_to_qps_crate_df[mask_magnets_with_nan]["Magnet"].values.tolist()
  • 736 776 ValueError: If the circuit name is not present in the metadata
    737 777 """
    738 778 try:
    739 circuit_type = get_circuit_type_for_circuit_name(circuit_name)
    779 circuit_type = get_generic_circuit_type_for_circuit_name(circuit_name)
    740 780 except KeyError as e:
    741 781 raise ValueError(f"Circuit name {circuit_name} not present in the metadata.") from e
    742 782
  • 1437 1437 assert "'Circuit name ABC does not map to internal metadata.'" == str(exception.value)
    1438 1438
    1439 1439
    1440 @pytest.mark.parametrize(
    1441 ("circuit_name", "expected_circuit_type"),
    1442 [
    1443 ("RCBH11.L1B2", signal_metadata.GenericCircuitType.A60),
  • added 1 commit

    • fb5cb80f - implement get_generic_circuit_type

    Compare with previous version

  • Andreas Verdoner Barba approved this merge request

    approved this merge request

  • Alexandra Murariu approved this merge request

    approved this merge request

  • Simon Mazenoux mentioned in commit 966f101f

    mentioned in commit 966f101f

  • Please register or sign in to reply
    Loading