Remove sensitivity_estimate_cli
It wasn't exposed via the `gammapy` CLI, and wasn't using click,
so would have to be rewritten anyways. Can add back later if desired.
@@ -253,52 +253,3 @@ class SensitivityEstimator(object):
plt.legend()
return ax
-
-
-def sensitivity_estimate_cli(args=None):
- """Sensitivity estimator command line interface.
-
- Uses `~gammapy.scripts.SensitivityEstimator`.
- """
- parser = get_parser(description=SensitivityEstimator.__doc__, function=SensitivityEstimator)
- parser.add_argument('irffile', type=str,
- help='IRF file (containing the path)')
- parser.add_argument('livetime', type=float,
- help='Livetime in hours (units in u.h)')
- parser.add_argument('-slope', type=float, default=2.,
- help='Slope of the power law (>0)')
- parser.add_argument('-alpha', type=float, default=0.2,
- help='Optional: ON/OFF normalisation')
- parser.add_argument('-sigma', type=float, default=5.,
- help='Optional: number of sigma for the sensitivity')
- parser.add_argument('-gamma_min', type=float, default=10.,
- help='Optional: minimum number of gamma-rays')
- parser.add_argument('-bkg_sys', type=float, default=0.05,
- help='Optional: Fraction of Background systematics relative to the number of ON counts')
- parser.add_argument('-nrand', type=int, default=0,
- help='Optional: Number of random trial to derive the number of gamma-rays')
- parser.add_argument("-l", "--loglevel", default='info',
- choices=['debug', 'info', 'warning', 'error', 'critical'],
- help="Set the logging level")
- args = parser.parse_args(args)
- set_up_logging_from_args(args)
-
- IRFs = CTAPerf.read(args.irffile)
-
- sensi = SensitivityEstimator(irf=IRFs,
- livetime=args.livetime * u.Unit('h'),
- slope=args.slope,
- alpha=args.alpha,
- sigma=args.sigma,
- gamma_min=args.gamma_min,
- bkg_sys=args.bkg_sys,
- random=args.nrand)
- sensi.run()
- sensi.print_results()
- import matplotlib.pyplot as plt
- sensi.plot()
- plt.show()
-
-
-if __name__ == '__main__':
- sensitivity_estimate_cli()
