Skip to content

Commit

Permalink
small bugfix
Browse files Browse the repository at this point in the history
  • Loading branch information
SeiyaNozaki committed Jul 3, 2023
1 parent b92a057 commit 35b5c01
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions lstchain/reco/dl1_to_dl2.py
Original file line number Diff line number Diff line change
Expand Up @@ -399,9 +399,9 @@ def build_models(filegammas, fileprotons,

# Dealing with `sin_az_tel` missing data because of the former version of lstchain
if 'sin_az_tel' not in df_gamma.columns:
df_gamma.sin_az_tel = np.sin(df_gamma.az_tel)
df_gamma['sin_az_tel'] = np.sin(df_gamma.az_tel)
if 'sin_az_tel' not in df_proton.columns:
df_proton.sin_az_tel = np.sin(df_proton.az_tel)
df_proton['sin_az_tel'] = np.sin(df_proton.az_tel)

# Training MC gammas in reduced viewcone
src_r_min = config['train_gamma_src_r_deg'][0]
Expand Down
2 changes: 1 addition & 1 deletion lstchain/scripts/lstchain_dl1_to_dl2.py
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ def apply_to_file(filename, models_dict, output_dir, config):

# Dealing with `sin_az_tel` missing data because of the former version of lstchain
if 'sin_az_tel' not in data.columns:
data.sin_az_tel = np.sin(data.az_tel)
data['sin_az_tel'] = np.sin(data.az_tel)

subarray_info = SubarrayDescription.from_hdf(filename)
tel_id = config["allowed_tels"][0] if "allowed_tels" in config else 1
Expand Down

0 comments on commit 35b5c01

Please sign in to comment.