Skip to content

Commit

Permalink
Added redshiftErrs as output of classification.list_best_matches() an…
Browse files Browse the repository at this point in the history
…d have updated documentation examples appropriately.
  • Loading branch information
daniel-muthukrishna committed Mar 27, 2019
1 parent 8dfa9b7 commit bfbd2b7
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ Use the following example code:
import astrodash
classification = astrodash.Classify(filenames, knownRedshifts, classifyHost=False, knownZ=True, smooth=6, rlapScores=False)
bestFits, redshifts, bestTypes, rejectionLabels, reliableFlags = classification.list_best_matches(n=5, saveFilename='DASH_matches.txt')
bestFits, redshifts, bestTypes, rejectionLabels, reliableFlags, redshiftErrs = classification.list_best_matches(n=5, saveFilename='DASH_matches.txt')
classification.plot_with_gui(indexToPlot=2)
astrodash.Classify() takes the following arguments:
Expand Down Expand Up @@ -184,7 +184,7 @@ This example automatically classifies 10 spectra. The last line plots the fifth
# Classify all spectra
classification = astrodash.Classify(filenames, knownRedshifts, classifyHost=False)
bestFits, redshifts, bestTypes, rlapFlag, matchesFlag = classification.list_best_matches(n=5, saveFilename='ATEL_best_fits.txt')
bestFits, redshifts, bestTypes, rlapFlag, matchesFlag, redshiftErrs = classification.list_best_matches(n=5, saveFilename='ATEL_best_fits.txt')
# Plot DES16C3bq
classification.plot_with_gui(indexToPlot=4)
Expand Down
4 changes: 2 additions & 2 deletions astrodash/classify_DES_Y4_spectra_DASH.py
Original file line number Diff line number Diff line change
Expand Up @@ -130,8 +130,8 @@
filenames = [os.path.join(directory, i[0]) for i in atels]
knownRedshifts = [i[1] for i in atels]

classification = astrodash.Classify(filenames, knownRedshifts, classifyHost=False, rlapScores=True)
bestFits, redshifts, bestTypes, rejectionLabels, reliableFlags = classification.list_best_matches(n=5)
classification = astrodash.Classify(filenames, knownRedshifts, classifyHost=True, rlapScores=True, knownZ=True)
bestFits, redshifts, bestTypes, rejectionLabels, reliableFlags, redshiftErrs = classification.list_best_matches(n=5)

# SAVE BEST MATCHES
print(bestFits)
Expand Down
2 changes: 1 addition & 1 deletion astrodash/classify_OzDES_ATELs.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@
filenames = [os.path.join(directoryPath, i[0]) for i in atels]
knownRedshifts = [i[1] for i in atels]

classification = astrodash.Classify(filenames, knownRedshifts, classifyHost=False, smooth=5, knownZ=False)
classification = astrodash.Classify(filenames, knownRedshifts, classifyHost=False, smooth=5, knownZ=True)
bestFits, redshifts, bestTypes, rejectionLabels, reliableFlags, redshiftErrs = classification.list_best_matches(n=5)

# SAVE BEST MATCHES
Expand Down
2 changes: 1 addition & 1 deletion docs/example.rst
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ This example automatically classifies 4 spectra. The last line plots the second
# Classify all spectra
classification = astrodash.Classify(filenames, knownRedshifts, classifyHost=False, knownZ=True, smooth=6)
bestFits, redshifts, bestTypes, rlapFlag, matchesFlag = classification.list_best_matches(n=5, saveFilename='example_best_fits.txt')
bestFits, redshifts, bestTypes, rlapFlag, matchesFlag, redshiftErrs = classification.list_best_matches(n=5, saveFilename='example_best_fits.txt')
# Plot sn2013fs from open supernova catalog (2nd spectrum)
classification.plot_with_gui(indexToPlot=1)
2 changes: 1 addition & 1 deletion docs/usage.rst
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ Use the following example code:
import astrodash
classification = astrodash.Classify(filenames, knownRedshifts, classifyHost=False, knownZ=True, smooth=6, rlapScores=False)
bestFits, redshifts, bestTypes, rejectionLabels, reliableFlags = classification.list_best_matches(n=5, saveFilename='DASH_matches.txt')
bestFits, redshifts, bestTypes, rejectionLabels, reliableFlags, redshiftErrs = classification.list_best_matches(n=5, saveFilename='DASH_matches.txt')
classification.plot_with_gui(indexToPlot=2)
dash.Classify() takes the following arguments:
Expand Down

0 comments on commit bfbd2b7

Please sign in to comment.