Skip to content

Commit

Permalink
Merge pull request #46 from cta-observatory/save-is-valid-flag
Browse files Browse the repository at this point in the history
Add is_valid flag to output file.
  • Loading branch information
YoshikiOhtani authored Apr 27, 2022
2 parents 30ad4fc + 8f70898 commit bf2b4f9
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion magicctapipe/scripts/lst1_magic/lst1_magic_stereo_reco.py
Original file line number Diff line number Diff line change
Expand Up @@ -250,6 +250,7 @@ def stereo_reconstruction(input_file, output_dir, config):
event_data.loc[(obs_id, event_id, tel_id), 'core_x'] = stereo_params.core_x.to(u.m).value
event_data.loc[(obs_id, event_id, tel_id), 'core_y'] = stereo_params.core_y.to(u.m).value
event_data.loc[(obs_id, event_id, tel_id), 'impact'] = impact.to(u.m).value
event_data.loc[(obs_id, event_id, tel_id), 'is_valid'] = stereo_params.is_valid

n_events_processed = i_evt + 1
logger.info(f'{n_events_processed} events')
Expand Down Expand Up @@ -297,7 +298,7 @@ def main():

parser.add_argument(
'--config-file', '-c', dest='config_file', type=str, default='./config.yaml',
help='Path to a yaml configuration file.',
help='Path to a yaml configuration file.',
)

args = parser.parse_args()
Expand Down

0 comments on commit bf2b4f9

Please sign in to comment.