Skip to content

Commit

Permalink
Merge branch 'devel'
Browse files Browse the repository at this point in the history
  • Loading branch information
rhandberg committed Aug 2, 2020
2 parents 60ec23e + 5711ffc commit 3e13e54
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 7 deletions.
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
master-v1.0
master-v1.0.1
4 changes: 2 additions & 2 deletions dataval/camera_overlap.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ def camera_overlap(dval):

# Check for duplicate lightcurves:
# In later versions of the pipeline this is impossible, but check it anyway
dval.cursor.execute("SELECT * FROM diagnostics GROUP BY lightcurve HAVING COUNT(*) > 1;")
dval.cursor.execute("SELECT * FROM diagnostics WHERE lightcurve IS NOT NULL GROUP BY lightcurve HAVING COUNT(*) > 1;")
results = dval.cursor.fetchall()
if len(results) > 0:
logger.error(" Duplicate raw lightcurved detected: %d", len(results))
Expand All @@ -47,7 +47,7 @@ def camera_overlap(dval):
if dval.corr:
# Check for duplicate corrected lightcurves:
# In later versions of the pipeline this is impossible, but check it anyway
dval.cursor.execute("SELECT * FROM diagnostics_corr GROUP BY lightcurve HAVING COUNT(*) > 1;")
dval.cursor.execute("SELECT * FROM diagnostics_corr WHERE lightcurve IS NOT NULL GROUP BY lightcurve HAVING COUNT(*) > 1;")
results = dval.cursor.fetchall()
if len(results) > 0:
logger.error(" Duplicate corrected lightcurved detected: %d", len(results))
Expand Down
17 changes: 14 additions & 3 deletions dataval/dataval.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@
import matplotlib.cm as cmx
from mpl_toolkits.axes_grid1 import make_axes_locatable
from matplotlib.ticker import MultipleLocator, ScalarFormatter
import seaborn as sns

# Local packages:
from .status import STATUS
Expand Down Expand Up @@ -578,7 +577,8 @@ def basic(self, warn_errors_ratio=0.05):
specific_errors = [
'FileNotFoundError',
'sqlite3.%',
'TargetNotFoundError' # custom "error" set in photometry.TaskManager.save_result
'TargetNotFoundError', # custom "error" set in photometry.TaskManager.save_result
'TypeError'
]

logger.info("Checking for specific errors...")
Expand Down Expand Up @@ -1065,7 +1065,18 @@ def plot_noise(self):

# Plot theoretical lines
mags = np.linspace(self.tmag_limits[0], self.tmag_limits[1], 200)
cols = sns.color_palette("colorblind", 4)

# Colors for lines:
# Define the colors directly here to avoid having to import
# the entire seaborn library, but they come from the seaborn
# 'colorblind' palette:
# cols = seaborn.color_palette("colorblind", 4)
cols = [
(0.00392156862745098, 0.45098039215686275, 0.6980392156862745),
(0.8705882352941177, 0.5607843137254902, 0.0196078431372549),
(0.00784313725490196, 0.6196078431372549, 0.45098039215686275),
(0.8352941176470589, 0.3686274509803922, 0.0)
]

# Expected *1-hour* RMS noise ffi
# TODO: Update elat+elon based on observing sector?
Expand Down
1 change: 0 additions & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ pytest
numpy == 1.17.5
scipy == 1.3.3
matplotlib == 3.2.1
seaborn
astropy == 4.0.1
Bottleneck == 1.3.2
statsmodels == 0.11.1
Expand Down

0 comments on commit 3e13e54

Please sign in to comment.