From dd54d4e2632e65bc7ab1c31bfe82be4a671b8137 Mon Sep 17 00:00:00 2001 From: jenniferyee Date: Thu, 5 Oct 2023 16:17:53 -0400 Subject: [PATCH] use_case_41: Desired functionality for the good/bad MulensData arrays. --- examples/use_cases/use_case_41_bad_data.py | 25 ++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 examples/use_cases/use_case_41_bad_data.py diff --git a/examples/use_cases/use_case_41_bad_data.py b/examples/use_cases/use_case_41_bad_data.py new file mode 100644 index 000000000..3c9300c10 --- /dev/null +++ b/examples/use_cases/use_case_41_bad_data.py @@ -0,0 +1,25 @@ +""" +Use case for changing the bad data array. +""" +import matplotlib.pyplot as plt +import numpy as np + +import MulensModel as mm + + +raise raise NotImplementedError( + "We don't know how to enable this functionality.") + +data = mm.MulensData(file_name="my_data.dat") +data.plot(show_bad=True) + +data.bad[12] = True +data.plot(show_bad=True) + +data.bad[np.where(data.mag < 13.)] = True +data.plot(show_bad=True) + +data.good[data.mag < 12.] = True +data.plot(show_bad=True) + +plt.show() \ No newline at end of file