Skip to content

Commit

Permalink
use_case_41: Desired functionality for the good/bad MulensData arrays.
Browse files Browse the repository at this point in the history
  • Loading branch information
jenniferyee committed Oct 5, 2023
1 parent 90c18c5 commit dd54d4e
Showing 1 changed file with 25 additions and 0 deletions.
25 changes: 25 additions & 0 deletions examples/use_cases/use_case_41_bad_data.py
Original file line number Diff line number Diff line change
@@ -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()

1 comment on commit dd54d4e

@rpoleski
Copy link
Owner

@rpoleski rpoleski commented on dd54d4e Oct 6, 2023

Choose a reason for hiding this comment

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

This:

data.good[data.mag < 12.] = True

doesn't change anything. Do you meant ... = False?
@jenniferyee

Please sign in to comment.