Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion imas_composer/ids/ec_launchers.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@

from typing import Dict, List
import numpy as np
import re

from ..core import RequirementStage, Requirement, IDSEntrySpec
from .base import IDSMapper
Expand Down Expand Up @@ -477,7 +478,7 @@ def _compose_launching_position_phi(self, shot: int, raw_data: dict) -> np.ndarr

port_key = Requirement(f'.ECH.SYSTEM_{system_no}.ANTENNA.PORT', shot, 'RF').as_key()
port_string = raw_data[port_key]
phi = np.deg2rad(float(port_string.split(' ')[0]))
phi = np.deg2rad(float(re.sub(r'[^0-9.+]', '', port_string).split('+')[0]))

phi_arrays.append(phi * np.ones(ntime))

Expand Down
6 changes: 3 additions & 3 deletions tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
- OMAS validation: Compare imas_composer output against OMAS reference implementation

Test Shot Configuration:
- Default: Tests run on TEST_SHOTS = [202161, 203321, 204602, 204601]
- Default: Tests run on TEST_SHOTS = [202161, 203321, 204601, 204602]
- exclude_shots: In test_config_<ids>.yaml, skip specific shots (e.g., no data available)
- override_shots: In test_config_<ids>.yaml, completely replace TEST_SHOTS with custom list
Example: For interferometer with RIP data requirement (shots >= 168823):
Expand Down Expand Up @@ -51,10 +51,10 @@ def _load_yaml_default(yaml_filename: str, key: str, fallback):
# Bt | Ip
# 202161: - | -
# 203321: + | -
# 204602: - | +
# 204601: + | +
# 204602: - | +

TEST_SHOTS = [202161, 203321, 204602, 204601]
TEST_SHOTS = [202161, 203321, 204601, 204602]


# ============================================================================
Expand Down
10 changes: 6 additions & 4 deletions tests/test_config_ec_launchers.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Test configuration for EC Launchers IDS

# Only shot 170325 has EC launcher data, exclude all others
exclude_shots: []
# Include all the standard TEST_SHOTS plus one with top launch
override_shots: [202161, 203321, 204312, 204601, 204602]

# Fields to skip OMAS comparison for (composer still tested)
# Format: field_path: "reason for skipping"
Expand All @@ -12,12 +12,14 @@ skip_fields: {}
field_shot_exclusions:
ec_launchers.beam.spot.size:
- 203321
- 204602
- 204312
- 204601
- 204602
ec_launchers.beam.phase.curvature:
- 203321
- 204602
- 204312
- 204601
- 204602

# Requirement validation settings
requirement_validation:
Expand Down