Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

set unit of energy to TeV in sensitivity code #291

Merged
merged 2 commits into from
Mar 1, 2020

Conversation

SeiyaNozaki
Copy link
Collaborator

Now the unit of e_true & e_reco is set to TeV because the unit of mc_energy & reco_energy in DL2 is TeV. Almost all the codes are working well, but I found following the only one part which have a problem.

e_aftercuts_w = np.sum(np.power(e_aftercuts, crab_par['alpha'] - mc_par_g['sp_idx']))
eff_area[i] = e_aftercuts_w.to_value() / n_sim_bin[i] * mc_par_g['area_sim'].to(u.m ** 2).to_value()

e_aftercuts_w is calculated with TeV unit, and n_sim_bin is with GeV.
So here I'd like to propose to set e_true amd e_reco to GeV at first.

@vuillaut
Copy link
Member

So here I'd like to propose to set e_true amd e_reco to GeV at first.

On the contrary, I'd propose to make bins in TeV. This is now the default unit in simtel, ctapipe...

@rlopezcoto
Copy link
Contributor

I agree to follow compatibility with simtel, ctapipe and so on. @SeiyaNozaki could you modify the sensitivity code to make it work with TeV units everywhere? Thanks

@SeiyaNozaki
Copy link
Collaborator Author

thanks for the comments!
I modified the codes to make it work with TeV units.

@SeiyaNozaki SeiyaNozaki changed the title set unit of e_true, e_reco to GeV in sensitivity code set unit of energy to TeV in sensitivity code Feb 29, 2020
Copy link
Member

@vuillaut vuillaut left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks

@vuillaut vuillaut merged commit 4e08783 into cta-observatory:master Mar 1, 2020
@SeiyaNozaki SeiyaNozaki deleted the bugfix_sensitivity branch August 25, 2020 09:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants