Skip to content

Commit

Permalink
missing try except
Browse files Browse the repository at this point in the history
  • Loading branch information
mfitzasp committed Dec 21, 2024
1 parent f8c59ea commit bb0c2d5
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions astrosource/comparison.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
from astroquery.vizier import Vizier
from tqdm import tqdm
from prettytable import PrettyTable

import traceback
import requests
import http
import urllib3
Expand Down Expand Up @@ -1136,7 +1136,7 @@ def find_comparisons_calibrated(targets, paths, filterCode, nopanstarrs=False, n
logger.debug(tabl)
except:
print ("something fishy in the calib mags table")
import traceback; logger.error(traceback.print_exc())
logger.error(traceback.print_exc())

# Get the set of least variable stars to use as a comparison to calibrate the files (to eventually get the *ACTUAL* standards
if asarray(calibStands).shape[0] == 0:
Expand Down Expand Up @@ -1218,7 +1218,7 @@ def find_comparisons_calibrated(targets, paths, filterCode, nopanstarrs=False, n
colTemp=delete(colTemp, calibStandsReject, axis=0)

# Pre-colour Reference plot

try:
plt.cla()
fig = plt.gcf()
outplotx=colTemp[:,4]
Expand Down Expand Up @@ -1249,7 +1249,9 @@ def find_comparisons_calibrated(targets, paths, filterCode, nopanstarrs=False, n
plt.savefig(parentPath / str("results/CalibrationSanityPlot_PreColour_Reference.eps"))

logger.info('Estimated Colour Slope in Reference Frame: ' + str(m))

except:
print ("Couldn't make colour plot")
logger.error(traceback.print_exc())
# MAKE ALL PRE-COLOUR PLOTS

if colourdetect == True and colourTerm == 0.0:
Expand Down

0 comments on commit bb0c2d5

Please sign in to comment.