Skip to content

Commit

Permalink
Update logging
Browse files Browse the repository at this point in the history
  • Loading branch information
samueljackson92 committed Jan 27, 2025
1 parent fce53fa commit 98a217b
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
3 changes: 3 additions & 0 deletions src/level2/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -174,6 +174,9 @@ def process_shot(shot: int, **kwargs):
if len(dataset) == 0:
continue

logger.info(
f"Writing {group_name} for shot {shot} from {mapping.facility}"
)
writer.write(file_name, group_name, dataset)

metadata_writer.write(shot, dataset)
Expand Down
3 changes: 2 additions & 1 deletion src/level2/reader.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,10 +40,11 @@ def read_profiles(self, shot: int, dataset_name: str) -> dict[str, xr.DataArray]
dataset = self._mapping.datasets[dataset_name]

profiles = {}
for profile_name in dataset.profiles.keys():
for profile_name, profile_info in dataset.profiles.items():
try:
logger.debug(f"Create profile {profile_name}")
profile = self.read_profile(shot, dataset_name, profile_name)
logger.debug(f"Loaded profile {profile_name}")
except MissingSourceError as e:
logger.warning(e)
continue
Expand Down

0 comments on commit 98a217b

Please sign in to comment.