Skip to content

Commit

Permalink
Minor ND tweaks
Browse files Browse the repository at this point in the history
  • Loading branch information
luketpickering committed Dec 5, 2019
1 parent be9d905 commit 26c26fb
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 4 deletions.
35 changes: 34 additions & 1 deletion ndapp.js
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,31 @@ class ndapp {
line_class: this.color_class_wheel[this.wheel_idx + 3]
};

let ND280FN = {
meta: {
id: 0,
name: "ND280FN"
},
data: [],
line_class: this.color_class_wheel[this.wheel_idx + 1] + " dashed_line"
};
let WAGASCIFN = {
meta: {
id: 0,
name: "WAGASCIFN"
},
data: [],
line_class: this.color_class_wheel[this.wheel_idx + 2] + " dashed_line"
};
let INGRIDFN = {
meta: {
id: 0,
name: "INGRIDFN"
},
data: [],
line_class: this.color_class_wheel[this.wheel_idx + 3] + " dashed_line"
};

let ND280W = params["ND280"];
let WAGASCIW = params["WAGASCI"];
let INGRIDW = params["INGRID"];
Expand All @@ -72,13 +97,21 @@ class ndapp {
ND280F.data.push([p[0], this.ND280Flux[i] * ND280W * 1E-6]);
WAGASCIF.data.push([p[0], this.WAGASCIFlux[i] * WAGASCIW * 1E-6]);
INGRIDF.data.push([p[0], this.INGRIDFlux[i] * INGRIDW * 1E-6]);

ND280FN.data.push([p[0], this.ND280Flux[i] * 1E-6]);
WAGASCIFN.data.push([p[0], this.WAGASCIFlux[i] * 1E-6]);
INGRIDFN.data.push([p[0], this.INGRIDFlux[i] * 1E-6]);
}
}

if (curve_state === 2) {
plot.AddHover(combflux);
} else if (curve_state === 1) {
plot.ClearAll();
plot.AddCurve(ND280FN);
plot.AddCurve(WAGASCIFN);
plot.AddCurve(INGRIDFN);

plot.ShowNext(combflux);
plot.AddCurve(ND280F);
plot.AddCurve(WAGASCIF);
Expand All @@ -93,7 +126,7 @@ class ndapp {
this.InitializeConstraintControls();

this.Widgets.NDCombPlot = new OscProbPlot();
this.Widgets.NDCombPlot.DrawAxes(this.Widgets.NDCombPlot_El, 0, 5, -10, 20, "\\(\\textrm{Combined flux}\\)");
this.Widgets.NDCombPlot.DrawAxes(this.Widgets.NDCombPlot_El, 0, 5, -3, 5, "\\(\\textrm{Combined flux}\\)");

AddNewConstrainWidgetPoints(this.coeffs);
this.AddCurve(this.Widgets.NDCombPlot, this.coeffs, 1);
Expand Down
6 changes: 3 additions & 3 deletions tools/NDConstraintWidget.js
Original file line number Diff line number Diff line change
Expand Up @@ -171,11 +171,11 @@ var constraint_plots = [];
function InitializeNDConstraintWidgets(el, onchanged_callback, on_hover_callback,
off_hover_callback) {

let ax_ND280 = new ConstraintAxes("ND280", "\\(\\textrm{ND280}\\)", -5,5, [3], 1, "ND280");
let ax_ND280 = new ConstraintAxes("ND280", "\\(\\textrm{ND280}\\)", -1,1, [3], 1, "ND280");

let ax_WAGASCI = new ConstraintAxes("WAGASCI", "\\(\\textrm{WAGASCI}\\)", -5, 5, [3], 1, "WAGASCI");
let ax_WAGASCI = new ConstraintAxes("WAGASCI", "\\(\\textrm{WAGASCI}\\)", -1, 1, [3], 1, "WAGASCI");

let ax_INGRID = new ConstraintAxes("INGRID", "\\(\\textrm{INGRID}\\)", -5, 5, [3], 1, "INGRID");
let ax_INGRID = new ConstraintAxes("INGRID", "\\(\\textrm{INGRID}\\)", -1, 1, [3], 1, "INGRID");

constraint_plots.push(new ConstraintWidget(
ax_ND280, ax_WAGASCI));
Expand Down

0 comments on commit 26c26fb

Please sign in to comment.