Skip to content
This repository has been archived by the owner on Feb 9, 2022. It is now read-only.

Commit

Permalink
Added source spectra export functionality
Browse files Browse the repository at this point in the history
  • Loading branch information
ggirelli committed Jun 14, 2019
1 parent 0408146 commit 6c19633
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion app/src/js/settings-sources.js
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,15 @@ rm_source = function(sourceName) {

dl_source_spectra = function(sourceName) {
// Download light source spectra
console.log(sourceName);
var selectedTemplate = eset.get("selected-template");

if ( -1 == Object.keys(eset.get("templates." + selectedTemplate + ".sources")).indexOf(sourceName) ) {
toastr.danger("Light source '" + sourceName + "' not found.");
return;
}

write_spectra(eset.get("templates." + selectedTemplate + ".sources." + sourceName + ".spectra"),
sourceName + ".tsv");
}

$(function() {
Expand Down

0 comments on commit 6c19633

Please sign in to comment.