');
83 | },
84 |
85 | setProgress: function (progressPercent) {
86 | $dialog.find(".progress").html('
' +
87 | progressPercent + '%' +
88 | '
');
89 | }
90 | };
91 |
92 | })(jQuery);
93 |
--------------------------------------------------------------------------------
/src/main/resources/static/scripts/ganalytics.js:
--------------------------------------------------------------------------------
1 |
2 | function GoogleAnalyticsTracker (trackingId) {
3 |
4 | var currentObj = this;
5 | this.trackingId = trackingId;
6 | this.clientId = null;
7 | this.measurementRestApiUrl = 'https://ssl.google-analytics.com/collect';
8 |
9 | this.sendEvent = function(category, action, label) {
10 | $.post(this.measurementRestApiUrl, {
11 | "t": "event",
12 | "ec": category,
13 | "ea": action,
14 | "el": label,
15 | "v": "1",
16 | "tid": this.trackingId,
17 | "cid": ((!isNull(this.clientId) && (this.clientId != "")) ? this.clientId : "anonymous"),
18 | "z": (new Date()).getTime()
19 | });
20 | };
21 |
22 | this.sendPage = function(pageName) {
23 | $.post(this.measurementRestApiUrl, {
24 | "t": "pageview",
25 | "dp": pageName,
26 | "v": "1",
27 | "tid": this.trackingId,
28 | "cid": ((!isNull(this.clientId) && (this.clientId != "")) ? this.clientId : "anonymous"),
29 | "z": (new Date()).getTime()
30 | });
31 | };
32 |
33 | this.init = function () {
34 | new Fingerprint2().get(function(uniqueUserId, userData){
35 | currentObj.clientId = uniqueUserId;
36 |
37 | //Send user data for analysis
38 | for (var i = 0; i < 15; i ++) {
39 | currentObj.sendEvent("UserData", userData[i].key, JSON.stringify(userData[i].value));
40 | }
41 | });
42 | }
43 |
44 | return this;
45 | }
46 |
47 | var gaTracker = new GoogleAnalyticsTracker("UA-108661407-2");
48 | gaTracker.init();
49 |
50 | //trackEvent("bla", "bla1", "bla2");
51 |
--------------------------------------------------------------------------------
/src/main/resources/static/scripts/historyManager.js:
--------------------------------------------------------------------------------
1 | //Actions history manager
2 | function HistoryManager(applyActionFn){
3 |
4 | this.applyActionFn = applyActionFn
5 | this.actionsHistory = [];
6 | this.prevAction = null;
7 |
8 | this.addToHistory = function (action){
9 | //Adds a action to actionsHistory, uses { obj } for cloning data (new obj reference)
10 | if (this.prevAction != null) {
11 | this.actionsHistory.push( $.extend(true, {}, this.prevAction) );
12 | }
13 |
14 | //Stores a action on prevAction tmp var, uses $.extend for cloning data (new obj reference)
15 | this.prevAction = $.extend(true, [], action);
16 | }
17 |
18 | this.undoHistory = function () {
19 | if (this.actionsHistory.length > 0) {
20 | this.applyAction(this.actionsHistory.pop());
21 | }
22 | }
23 |
24 | this.resetHistory = function () {
25 | if (this.actionsHistory.length > 0) {
26 | var action = this.actionsHistory[0];
27 | this.actionsHistory = []; // Clears action history keeping default state
28 | this.applyAction(action);
29 | this.prevAction = null;
30 | this.addToHistory(action);
31 | } else {
32 | this.applyAction(this.prevAction);
33 | }
34 | }
35 |
36 | this.applyAction = function(action){
37 | this.applyActionFn(action);
38 | this.prevAction = $.extend(true, [], action);
39 | }
40 |
41 | return this;
42 | }
43 |
--------------------------------------------------------------------------------
/src/main/resources/static/scripts/plots/confidencePlot.js:
--------------------------------------------------------------------------------
1 | //Confidence Intervals Plot
2 |
3 | function ConfidencePlot(id, plotConfig, getDataFromServerFn, onFiltersChangedFn, onPlotReadyFn, toolbar, cssClass, switchable, projectConfig) {
4 |
5 | var currentObj = this;
6 |
7 | Plot.call(this, id, plotConfig, getDataFromServerFn, onFiltersChangedFn, onPlotReadyFn, toolbar, cssClass, switchable);
8 |
9 | this.btnLoad.hide();
10 |
11 | this.getPlotlyConfig = function (data) {
12 |
13 | var coords = this.getSwitchedCoords( { x: 0, y: 1} );
14 | var plotDefaultConfig = currentObj.getDefaultPlotlyConfig();
15 |
16 | var plotlyConfig = get_plotdiv_scatter(data[coords.x].values, data[coords.y].values,
17 | this.getLabel(coords.x),
18 | this.getLabel(coords.y),
19 | this.getTitle(),
20 | plotDefaultConfig);
21 |
22 | plotlyConfig.data.push(getCrossLine ([this.minX, this.maxX], [ data[2].values[0], data[2].values[0] ], '#222222', 2, 'solid'));
23 | plotlyConfig.data.push(getCrossLine ([this.minX, this.maxX], [ data[2].values[1], data[2].values[1] ], '#666666', 2, 'dot'));
24 | plotlyConfig.data.push(getCrossLine ([this.minX, this.maxX], [ data[2].values[2], data[2].values[2] ], '#666666', 2, 'dot'));
25 |
26 | plotlyConfig.data.push(getCrossLine ([this.minX, this.maxX], [ data[3].values[1], data[3].values[1] ], '#888888', 2, 'dash'));
27 | plotlyConfig.data.push(getCrossLine ([this.minX, this.maxX], [ data[3].values[2], data[3].values[2] ], '#888888', 2, 'dash'));
28 |
29 | plotlyConfig = this.addExtraDataConfig(plotlyConfig, plotDefaultConfig);
30 | plotlyConfig = this.prepareAxis(plotlyConfig);
31 |
32 | return plotlyConfig;
33 | }
34 |
35 | log ("new ConfidencePlot id: " + this.id);
36 |
37 | return this;
38 | }
39 |
--------------------------------------------------------------------------------
/src/main/resources/static/scripts/plots/covariancePlot.js:
--------------------------------------------------------------------------------
1 | //Covariance plot
2 |
3 | function CovariancePlot(id, plotConfig, getDataFromServerFn, onFiltersChangedFn, onPlotReadyFn, toolbar, cssClass, switchable, projectConfig) {
4 |
5 | var currentObj = this;
6 |
7 | if (projectConfig.schema.isEventsFile()) {
8 | var column = projectConfig.schema.getTable()["E"];
9 | if (!isNull(column)){
10 |
11 | //Adds Reference Band filter
12 | plotConfig.ref_band_interest = [column.min_value, column.max_value];
13 | plotConfig.energy_range = [column.min_value, column.max_value];
14 | plotConfig.default_energy_range = [column.min_value, column.max_value];
15 | plotConfig.n_bands = Math.floor(column.max_value - column.min_value);
16 | plotConfig.std = -1;
17 |
18 | } else {
19 | log("CovariancePlot error, plot" + currentObj.id + ", NO ENERGY COLUMN ON SCHEMA");
20 | }
21 | } else {
22 | log("CovariancePlot error, plot" + currentObj.id + ", NO EVENTS TABLE ON SCHEMA");
23 | }
24 |
25 | PlotWithSettings.call(this, id, plotConfig, getDataFromServerFn, onFiltersChangedFn, onPlotReadyFn, toolbar, cssClass, switchable);
26 |
27 | //Covariance plot methods:
28 |
29 | this.onReferenceBandValuesChanged = function() {
30 | try {
31 | currentObj.plotConfig.ref_band_interest = [currentObj.refBandSelector.fromValue, currentObj.refBandSelector.toValue];
32 | } catch (e) {
33 | log("onReferenceBandValuesChanged error, plot" + currentObj.id + ", error: " + e);
34 | }
35 | }
36 |
37 | this.onStdChanged = function(){
38 | currentObj.plotConfig.std = getInputIntValueCropped(currentObj.settingsPanel.find(".inputStd"), currentObj.plotConfig.std, -1, CONFIG.MAX_PLOT_POINTS);
39 | }
40 |
41 | //CovariancePlot plot attributes:
42 | if (!isNull(this.plotConfig.ref_band_interest)){
43 |
44 | //Adds Band of Interest selector
45 | this.addEnergyRangeControlToSetting("Band of interest (keV)", ".leftCol");
46 |
47 | //Adds Reference Band selector
48 | this.refBandSelector = new sliderSelector(this.id + "_RefBand",
49 | "Reference Band (keV):",
50 | { table:"EVENTS", column:"E", source: "RefBand" },
51 | this.plotConfig.ref_band_interest[0], this.plotConfig.ref_band_interest[1],
52 | this.onReferenceBandValuesChanged,
53 | null,
54 | function( event, ui ) {
55 | currentObj.refBandSelector.setValues( ui.values[ 0 ], ui.values[ 1 ], "slider");
56 | currentObj.onReferenceBandValuesChanged();
57 | });
58 | this.refBandSelector.setFixedStep(CONFIG.ENERGY_FILTER_STEP);
59 | this.refBandSelector.setEnabled(true);
60 | this.settingsPanel.find(".leftCol").append(this.refBandSelector.$html);
61 | this.settingsPanel.find(".leftCol").append("");
62 |
63 | //Adds number of point control of rms plot
64 | this.addNumberOfBandsControlToSettings("Nº Bands", ".rightCol");
65 |
66 | this.settingsPanel.find(".rightCol").append('
Standard deviation (<0 Default):
');
67 | this.settingsPanel.find(".rightCol").find(".inputStd").on('change', this.onStdChanged);
68 | }
69 |
70 | log ("new CovariancePlot id: " + this.id);
71 |
72 | return this;
73 | }
74 |
--------------------------------------------------------------------------------
/src/main/resources/static/scripts/plots/pgPlot.js:
--------------------------------------------------------------------------------
1 | //Periodogram plot
2 |
3 | function PgPlot(id, plotConfig, getDataFromServerFn, onFiltersChangedFn, onPlotReadyFn, toolbar, cssClass, switchable, projectConfig, plotStyle) {
4 |
5 | var currentObj = this;
6 | plotConfig.freq_range = [-1, -1];
7 | plotConfig.default_freq_range = [-1, -1];
8 |
9 | PDSPlot.call(this, id, plotConfig, getDataFromServerFn, onFiltersChangedFn, onPlotReadyFn, toolbar, cssClass, switchable, projectConfig);
10 |
11 | this.plotStyle = !isNull(plotStyle) ? plotStyle : null;
12 | this.ls_opts = {};
13 | this.ls_opts.samples_per_peak = { default:5, min:1, max: 100}; //Samples per peak for LombScargle method
14 | this.ls_opts.nyquist_factor = { default:1, min:1, max: 100}; //The nyquist factor for LombScargle method
15 |
16 | this.plotConfig.xAxisType = "linear";
17 | this.plotConfig.yAxisType = "log";
18 | this.plotConfig.plotType = "X";
19 | this.plotConfig.ls_norm = "standard";
20 | this.plotConfig.samples_per_peak = this.ls_opts.samples_per_peak.default;
21 | this.plotConfig.nyquist_factor = this.ls_opts.nyquist_factor.default;
22 |
23 | this.onSettingsCreated = function(){
24 | this.settingsPanel.find(".leftCol").hide();
25 | }
26 |
27 | this.getDefaultFreqRange = function (){
28 | if (this.plotConfig.default_freq_range[0] < 0
29 | && !isNull(this.data) && this.data.length >= 4) {
30 | var minMax = minMax2DArray(this.data[0].values);
31 | this.plotConfig.default_freq_range = [ minMax.min, minMax.max ];
32 | }
33 | return this.plotConfig.default_freq_range;
34 | }
35 |
36 | this.mustPropagateAxisFilter = function (axis) {
37 | return axis == 0;
38 | }
39 |
40 | this.getLabel = function (axis) {
41 | if (axis == this.XYLabelAxis){
42 | var yLabel = this.plotConfig.styles.labels[this.XYLabelAxis];
43 | if (this.plotConfig.plotType == "X*Y" &&
44 | (isNull(this.plotConfig.styles.XYLabelIsCustom)
45 | || !this.plotConfig.styles.XYLabelIsCustom)) {
46 | yLabel += " x " + this.plotConfig.styles.labels[0];
47 | }
48 | return yLabel;
49 | } else {
50 | return this.plotConfig.styles.labels[axis];
51 | }
52 | }
53 |
54 | log ("new PgPlot id: " + this.id);
55 |
56 | return this;
57 | }
58 |
--------------------------------------------------------------------------------
/src/main/resources/static/scripts/plots/phaseLagPlot.js:
--------------------------------------------------------------------------------
1 | function PhaseLagPlot(id, plotConfig, getDataFromServerFn, onFiltersChangedFn, onPlotReadyFn, toolbar, cssClass, switchable, projectConfig) {
2 |
3 | var currentObj = this;
4 | RmsPlot.call(this, id, plotConfig, getDataFromServerFn, onFiltersChangedFn, onPlotReadyFn, toolbar, cssClass, switchable, projectConfig);
5 |
6 | this.freq_range_title = "Phase lag frequency range (Hz):";
7 | this.energy_range_title = "Reference energy range (keV)";
8 |
9 | log ("new PhaseLagPlot id: " + this.id);
10 |
11 | return this;
12 | }
13 |
--------------------------------------------------------------------------------
/src/main/resources/static/scripts/plots/profilePlot.js:
--------------------------------------------------------------------------------
1 | //Profile plot
2 |
3 | function ProfilePlot(id, plotConfig, getDataFromServerFn, onFiltersChangedFn, onPlotReadyFn, toolbar, cssClass, switchable) {
4 |
5 | var currentObj = this;
6 |
7 | Plot.call(this, id, plotConfig, getDataFromServerFn, onFiltersChangedFn, onPlotReadyFn, toolbar, cssClass, switchable);
8 |
9 | this.btnFullScreen.remove();
10 | this.btnLoad.remove();
11 |
12 | this.getPlotlyConfig = function (data) {
13 |
14 | var coords = this.getSwitchedCoords( { x: 0, y: 1} );
15 | var plotDefaultConfig = currentObj.getDefaultPlotlyConfig();
16 |
17 | var plotlyConfig = get_plotdiv_lightcurve(data[0].values, data[1].values, [], [], [],
18 | this.plotConfig.styles.labels[coords.x],
19 | this.plotConfig.styles.labels[coords.y],
20 | this.getTitle(),
21 | plotDefaultConfig);
22 |
23 | plotlyConfig.layout.shapes = [ getConfidenceShape( [ data[2].values[0], data[2].values[1] ],
24 | plotDefaultConfig.CONFIDENCE_FILLCOLOR,
25 | plotDefaultConfig.CONFIDENCE_OPACITY ) ];
26 |
27 | plotlyConfig = this.prepareAxis(plotlyConfig);
28 |
29 | return plotlyConfig;
30 | }
31 |
32 | this.getCoordsFromPlotlyHoverEvent = function (){
33 | return null;
34 | }
35 |
36 | log ("new ProfilePlot id: " + this.id);
37 |
38 | return this;
39 | }
40 |
--------------------------------------------------------------------------------
/src/main/resources/static/scripts/plots/pulseSearchPlot.js:
--------------------------------------------------------------------------------
1 | //Pulse Search Plot
2 |
3 | function PulseSearchPlot(id, plotConfig, getDataFromServerFn, onFiltersChangedFn, onPlotReadyFn, toolbar, cssClass, switchable) {
4 |
5 | var currentObj = this;
6 |
7 | plotConfig.freq_range = [-1, -1];
8 | plotConfig.mode = "z_n_search";
9 | plotConfig.oversampling = 15;
10 | plotConfig.nharm = 1;
11 | plotConfig.nbin = 128;
12 | plotConfig.segment_size = 5000;
13 |
14 | Plot.call(this, id, plotConfig, getDataFromServerFn, onFiltersChangedFn, onPlotReadyFn, toolbar, cssClass, switchable);
15 |
16 | this.btnLoad.remove();
17 |
18 | this.ps_opts = {};
19 | this.ps_opts.oversampling = { default:15, min:1, max: 100}; //Pulse peak oversampling for Z-squared search
20 | this.ps_opts.nharm = { default:1, min:1, max: 100}; //Number of harmonics for Z-squared search
21 | this.ps_opts.nbin = { default:128, min:1, max: 2048}; //Number of bins of the folded profiles for Z-squared search
22 | this.ps_opts.segment_size = { default:5000, min:1, max: 100000}; //Length of the segments to be averaged in the periodogram for Z-squared search
23 |
24 | this.candidateFreq = -1;
25 |
26 | this.getPlotlyConfig = function (data) {
27 |
28 | var coords = this.getSwitchedCoords( { x: 0, y: 1} );
29 | var plotDefaultConfig = currentObj.getDefaultPlotlyConfig();
30 |
31 | var plotlyConfig = get_plotdiv_xy(data[coords.x].values, data[coords.y].values,
32 | data[coords.x].error_values, data[coords.y].error_values, [],
33 | this.getLabel(coords.x),
34 | this.getLabel(coords.y),
35 | this.getTitle(),
36 | plotDefaultConfig);
37 |
38 | //Reset the candidateFreqs array
39 | this.candidateFreqs = [];
40 |
41 | if (data.length == 4) {
42 | if (data[2].values.length > 0) {
43 |
44 | //Calculates the sum of stats
45 | var totalStats = 0;
46 | for (i = 0; i < data[3].values.length; i++) {
47 | totalStats += data[3].values[i];
48 | }
49 |
50 | //Calculates and plots the candidate frequencies
51 | for (i = 0; i < data[2].values.length; i++) {
52 | var freq = data[2].values[i];
53 | var ratio = data[3].values[i] / totalStats;
54 | var opacity = parseFloat(fixedPrecision(Math.max(Math.min(Math.pow(ratio, 1/2) + 0.15, 1.0), 0.15), 3));
55 | this.candidateFreqs.push({ freq: freq, ratio: ratio });
56 | plotlyConfig.data.push(getCrossLine ([freq, freq],
57 | [this.minY, this.maxY],
58 | plotDefaultConfig.CANDIDATE_FREQ_COLOR, Math.ceil(5 * ratio), 'solid', opacity));
59 | }
60 | } else {
61 | this.showWarn("No pulses found in the range of frequencies");
62 | }
63 | }
64 |
65 | plotlyConfig = this.prepareAxis(plotlyConfig);
66 |
67 | return plotlyConfig;
68 | }
69 |
70 | log ("new PulseSearchPlot id: " + this.id);
71 |
72 | return this;
73 | }
74 |
--------------------------------------------------------------------------------
/src/main/resources/static/scripts/plots/timingPlot.js:
--------------------------------------------------------------------------------
1 | //Timing plot
2 |
3 | function TimingPlot(id, plotConfig, getDataFromServerFn, onFiltersChangedFn, onPlotReadyFn, toolbar, cssClass, switchable) {
4 |
5 | var currentObj = this;
6 |
7 | PlotWithSettings.call(this, id, plotConfig, getDataFromServerFn, onFiltersChangedFn, onPlotReadyFn, toolbar, cssClass, switchable);
8 |
9 | this.plotConfig.xAxisType = "linear";
10 | this.plotConfig.yAxisType = "linear";
11 |
12 | //Overrides Btn back from setting for redraw plot with current data, without server call
13 | this.btnBack.click(function(event){
14 | currentObj.hideSettings();
15 | if (!isNull(currentObj.data)) {
16 | var plotlyConfig = currentObj.getPlotlyConfig(currentObj.data);
17 | currentObj.redrawPlot(plotlyConfig);
18 | }
19 | currentObj.setReadyState(true);
20 | currentObj.onPlotReady();
21 | gaTracker.sendEvent("Plots", "HidePlotSettings", currentObj.getTitle());
22 | });
23 |
24 | //TimingPlot plot methods:
25 | this.addSettingsControls = function(){
26 |
27 | if (this.settingsPanel.find(".AxisType").length == 0) {
28 | this.addAxesTypeControlsToSettings(".leftCol");
29 | this.onSettingsCreated();
30 | }
31 | }
32 |
33 | this.getPlotlyConfig = function (data) {
34 |
35 | var coords = this.getSwitchedCoords( { x: 0, y: 1} );
36 | var plotDefaultConfig = currentObj.getDefaultPlotlyConfig();
37 |
38 | var plotlyConfig = get_plotdiv_lightcurve(data[0].values, data[1].values,
39 | [], data[2].values,
40 | (data.length > 4) ? this.getWtiRangesFromGtis(data[3].values, data[4].values, data[0].values) : [],
41 | this.plotConfig.styles.labels[coords.x],
42 | this.plotConfig.styles.labels[coords.y],
43 | this.getTitle(),
44 | plotDefaultConfig);
45 |
46 | plotlyConfig = this.addExtraDataConfig(plotlyConfig, plotDefaultConfig);
47 | plotlyConfig = this.prepareAxis(plotlyConfig);
48 |
49 | return plotlyConfig;
50 | }
51 |
52 | log ("new TimingPlot id: " + this.id);
53 |
54 | return this;
55 | }
56 |
--------------------------------------------------------------------------------
/src/main/resources/static/scripts/version.js:
--------------------------------------------------------------------------------
1 | BUILD_VERSION='DEV VERSION';
2 |
--------------------------------------------------------------------------------
/src/main/resources/static/styles/external/images/blank.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/StingraySoftware/dave/e7188025763cb3a2840aef0e1dd15b52be8de9a1/src/main/resources/static/styles/external/images/blank.gif
--------------------------------------------------------------------------------
/src/main/resources/static/styles/external/images/colorpicker_background.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/StingraySoftware/dave/e7188025763cb3a2840aef0e1dd15b52be8de9a1/src/main/resources/static/styles/external/images/colorpicker_background.png
--------------------------------------------------------------------------------
/src/main/resources/static/styles/external/images/colorpicker_hex.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/StingraySoftware/dave/e7188025763cb3a2840aef0e1dd15b52be8de9a1/src/main/resources/static/styles/external/images/colorpicker_hex.png
--------------------------------------------------------------------------------
/src/main/resources/static/styles/external/images/colorpicker_hsb_b.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/StingraySoftware/dave/e7188025763cb3a2840aef0e1dd15b52be8de9a1/src/main/resources/static/styles/external/images/colorpicker_hsb_b.png
--------------------------------------------------------------------------------
/src/main/resources/static/styles/external/images/colorpicker_hsb_h.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/StingraySoftware/dave/e7188025763cb3a2840aef0e1dd15b52be8de9a1/src/main/resources/static/styles/external/images/colorpicker_hsb_h.png
--------------------------------------------------------------------------------
/src/main/resources/static/styles/external/images/colorpicker_hsb_s.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/StingraySoftware/dave/e7188025763cb3a2840aef0e1dd15b52be8de9a1/src/main/resources/static/styles/external/images/colorpicker_hsb_s.png
--------------------------------------------------------------------------------
/src/main/resources/static/styles/external/images/colorpicker_indic.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/StingraySoftware/dave/e7188025763cb3a2840aef0e1dd15b52be8de9a1/src/main/resources/static/styles/external/images/colorpicker_indic.gif
--------------------------------------------------------------------------------
/src/main/resources/static/styles/external/images/colorpicker_overlay.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/StingraySoftware/dave/e7188025763cb3a2840aef0e1dd15b52be8de9a1/src/main/resources/static/styles/external/images/colorpicker_overlay.png
--------------------------------------------------------------------------------
/src/main/resources/static/styles/external/images/colorpicker_rgb_b.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/StingraySoftware/dave/e7188025763cb3a2840aef0e1dd15b52be8de9a1/src/main/resources/static/styles/external/images/colorpicker_rgb_b.png
--------------------------------------------------------------------------------
/src/main/resources/static/styles/external/images/colorpicker_rgb_g.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/StingraySoftware/dave/e7188025763cb3a2840aef0e1dd15b52be8de9a1/src/main/resources/static/styles/external/images/colorpicker_rgb_g.png
--------------------------------------------------------------------------------
/src/main/resources/static/styles/external/images/colorpicker_rgb_r.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/StingraySoftware/dave/e7188025763cb3a2840aef0e1dd15b52be8de9a1/src/main/resources/static/styles/external/images/colorpicker_rgb_r.png
--------------------------------------------------------------------------------
/src/main/resources/static/styles/external/images/colorpicker_select.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/StingraySoftware/dave/e7188025763cb3a2840aef0e1dd15b52be8de9a1/src/main/resources/static/styles/external/images/colorpicker_select.gif
--------------------------------------------------------------------------------
/src/main/resources/static/styles/external/images/colorpicker_submit.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/StingraySoftware/dave/e7188025763cb3a2840aef0e1dd15b52be8de9a1/src/main/resources/static/styles/external/images/colorpicker_submit.png
--------------------------------------------------------------------------------
/src/main/resources/static/styles/external/images/custom_background.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/StingraySoftware/dave/e7188025763cb3a2840aef0e1dd15b52be8de9a1/src/main/resources/static/styles/external/images/custom_background.png
--------------------------------------------------------------------------------
/src/main/resources/static/styles/external/images/custom_hex.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/StingraySoftware/dave/e7188025763cb3a2840aef0e1dd15b52be8de9a1/src/main/resources/static/styles/external/images/custom_hex.png
--------------------------------------------------------------------------------
/src/main/resources/static/styles/external/images/custom_hsb_b.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/StingraySoftware/dave/e7188025763cb3a2840aef0e1dd15b52be8de9a1/src/main/resources/static/styles/external/images/custom_hsb_b.png
--------------------------------------------------------------------------------
/src/main/resources/static/styles/external/images/custom_hsb_h.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/StingraySoftware/dave/e7188025763cb3a2840aef0e1dd15b52be8de9a1/src/main/resources/static/styles/external/images/custom_hsb_h.png
--------------------------------------------------------------------------------
/src/main/resources/static/styles/external/images/custom_hsb_s.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/StingraySoftware/dave/e7188025763cb3a2840aef0e1dd15b52be8de9a1/src/main/resources/static/styles/external/images/custom_hsb_s.png
--------------------------------------------------------------------------------
/src/main/resources/static/styles/external/images/custom_indic.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/StingraySoftware/dave/e7188025763cb3a2840aef0e1dd15b52be8de9a1/src/main/resources/static/styles/external/images/custom_indic.gif
--------------------------------------------------------------------------------
/src/main/resources/static/styles/external/images/custom_rgb_b.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/StingraySoftware/dave/e7188025763cb3a2840aef0e1dd15b52be8de9a1/src/main/resources/static/styles/external/images/custom_rgb_b.png
--------------------------------------------------------------------------------
/src/main/resources/static/styles/external/images/custom_rgb_g.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/StingraySoftware/dave/e7188025763cb3a2840aef0e1dd15b52be8de9a1/src/main/resources/static/styles/external/images/custom_rgb_g.png
--------------------------------------------------------------------------------
/src/main/resources/static/styles/external/images/custom_rgb_r.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/StingraySoftware/dave/e7188025763cb3a2840aef0e1dd15b52be8de9a1/src/main/resources/static/styles/external/images/custom_rgb_r.png
--------------------------------------------------------------------------------
/src/main/resources/static/styles/external/images/custom_submit.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/StingraySoftware/dave/e7188025763cb3a2840aef0e1dd15b52be8de9a1/src/main/resources/static/styles/external/images/custom_submit.png
--------------------------------------------------------------------------------
/src/main/resources/static/styles/external/images/select.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/StingraySoftware/dave/e7188025763cb3a2840aef0e1dd15b52be8de9a1/src/main/resources/static/styles/external/images/select.png
--------------------------------------------------------------------------------
/src/main/resources/static/styles/external/images/select2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/StingraySoftware/dave/e7188025763cb3a2840aef0e1dd15b52be8de9a1/src/main/resources/static/styles/external/images/select2.png
--------------------------------------------------------------------------------
/src/main/resources/static/styles/external/images/ui-bg_flat_0_aaaaaa_40x100.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/StingraySoftware/dave/e7188025763cb3a2840aef0e1dd15b52be8de9a1/src/main/resources/static/styles/external/images/ui-bg_flat_0_aaaaaa_40x100.png
--------------------------------------------------------------------------------
/src/main/resources/static/styles/external/images/ui-icons_444444_256x240.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/StingraySoftware/dave/e7188025763cb3a2840aef0e1dd15b52be8de9a1/src/main/resources/static/styles/external/images/ui-icons_444444_256x240.png
--------------------------------------------------------------------------------
/src/main/resources/static/styles/external/images/ui-icons_555555_256x240.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/StingraySoftware/dave/e7188025763cb3a2840aef0e1dd15b52be8de9a1/src/main/resources/static/styles/external/images/ui-icons_555555_256x240.png
--------------------------------------------------------------------------------
/src/main/resources/static/styles/external/images/ui-icons_777620_256x240.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/StingraySoftware/dave/e7188025763cb3a2840aef0e1dd15b52be8de9a1/src/main/resources/static/styles/external/images/ui-icons_777620_256x240.png
--------------------------------------------------------------------------------
/src/main/resources/static/styles/external/images/ui-icons_777777_256x240.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/StingraySoftware/dave/e7188025763cb3a2840aef0e1dd15b52be8de9a1/src/main/resources/static/styles/external/images/ui-icons_777777_256x240.png
--------------------------------------------------------------------------------
/src/main/resources/static/styles/external/images/ui-icons_cc0000_256x240.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/StingraySoftware/dave/e7188025763cb3a2840aef0e1dd15b52be8de9a1/src/main/resources/static/styles/external/images/ui-icons_cc0000_256x240.png
--------------------------------------------------------------------------------
/src/main/resources/static/styles/external/images/ui-icons_ffffff_256x240.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/StingraySoftware/dave/e7188025763cb3a2840aef0e1dd15b52be8de9a1/src/main/resources/static/styles/external/images/ui-icons_ffffff_256x240.png
--------------------------------------------------------------------------------
/src/main/resources/templates/error.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
Flask Intro
5 |
6 |
7 |
8 |
9 |
OOPS! Something went Wrong
10 |
11 |
Click here to go home.
12 | Error: {{error}}
13 |
14 |
15 |
16 |
--------------------------------------------------------------------------------
/src/main/resources/templates/includes/nav_bar.html:
--------------------------------------------------------------------------------
1 |
2 |
23 |
24 |
--------------------------------------------------------------------------------
/src/main/resources/templates/includes/output_panel.html:
--------------------------------------------------------------------------------
1 |
2 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
--------------------------------------------------------------------------------
/src/main/resources/templates/includes/tab_panel.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
22 |
23 | toolPanelTemplate Goes here
24 |
25 |
26 | outputPanelTemplate Goes here
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
--------------------------------------------------------------------------------
/src/main/resources/templates/includes/tool_panel.html:
--------------------------------------------------------------------------------
1 |
2 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
--------------------------------------------------------------------------------
/src/test/python/test/__init__.py:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/StingraySoftware/dave/e7188025763cb3a2840aef0e1dd15b52be8de9a1/src/test/python/test/__init__.py
--------------------------------------------------------------------------------
/src/test/python/test/fixture.py:
--------------------------------------------------------------------------------
1 | import sys
2 | import os
3 |
4 | import matplotlib
5 | matplotlib.use('TkAgg') # Changes the matplotlib framework
6 |
7 | myPath = os.path.dirname(os.path.abspath(__file__))
8 | sys.path.insert(0, myPath + '/../../../main/python')
9 |
10 | print("Syspath: %s" % sys.path)
11 |
12 | APP_ROOT = os.path.dirname(os.path.abspath(__file__))
13 | TEST_RESOURCES = os.path.join(APP_ROOT, '../../resources/pytest')
14 |
--------------------------------------------------------------------------------
/src/test/python/test/model/__init__.py:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/StingraySoftware/dave/e7188025763cb3a2840aef0e1dd15b52be8de9a1/src/test/python/test/model/__init__.py
--------------------------------------------------------------------------------
/src/test/python/test/model/test_column.py:
--------------------------------------------------------------------------------
1 | from test.fixture import *
2 |
3 | from hypothesis import given
4 | import hypothesis.strategies as st
5 |
6 | from model.column import Column
7 |
8 |
9 | @given(st.text())
10 | def test_init(s):
11 | column = Column(s)
12 | assert column and column.id == s
13 |
14 |
15 | @given(
16 | st.text(),
17 | st.integers(),
18 | st.floats(allow_nan=False, allow_infinity=False)
19 | )
20 | def test_add_value(s, v, e):
21 | column = Column(s)
22 | column.add_value(v, e)
23 | assert len(column.values) == 1
24 |
25 |
26 | @given(
27 | st.text(),
28 | st.integers(),
29 | st.floats(allow_nan=False, allow_infinity=False)
30 | )
31 | def test_get_value(s, v, e):
32 | column = Column(s)
33 | column.add_value(v, e)
34 | assert column.get_value(0) == v
35 |
36 |
37 | @given(
38 | st.text(),
39 | st.integers(),
40 | st.floats(allow_nan=False, allow_infinity=False)
41 | )
42 | def test_get_error_value(s, v, e):
43 | column = Column(s)
44 | column.add_value(v, e)
45 | assert column.get_error_value(0) == e
46 |
47 |
48 | @given(
49 | st.text(),
50 | st.integers(),
51 | st.floats(allow_nan=False, allow_infinity=False)
52 | )
53 | def test_get_shema(s, v, e):
54 | column = Column(s)
55 | column.add_value(v, e)
56 | schema = column.get_schema()
57 | assert "id" in schema
58 | assert schema["id"] == s
59 | assert "count" in schema
60 | assert schema["count"] == 1
61 | assert "min_value" in schema
62 | assert schema["min_value"] == v
63 | assert "max_value" in schema
64 | assert schema["max_value"] == v
65 |
66 |
67 | @given(
68 | st.text(),
69 | st.integers(),
70 | st.floats(allow_nan=False, allow_infinity=False)
71 | )
72 | def test_clone(s, v, e):
73 | column1 = Column(s)
74 | column1.add_value(v, e)
75 | schema1 = column1.get_schema()
76 | column2 = column1.clone()
77 | schema2 = column2.get_schema()
78 | assert schema1 == schema2
79 |
--------------------------------------------------------------------------------
/src/test/python/test/utils/__init__.py:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/StingraySoftware/dave/e7188025763cb3a2840aef0e1dd15b52be8de9a1/src/test/python/test/utils/__init__.py
--------------------------------------------------------------------------------
/src/test/python/test/utils/test_dataset_helper.py:
--------------------------------------------------------------------------------
1 | from test.fixture import *
2 | import os
3 |
4 | from hypothesis import given
5 | import hypothesis.strategies as st
6 | from hypothesis import example
7 |
8 | import utils.dave_reader as DaveReader
9 | import utils.file_utils as FileUtils
10 | import utils.filters_helper as FltHelper
11 | import utils.dataset_helper as DsHelper
12 |
13 |
14 | @given(st.text(min_size=1))
15 | @example("test.evt")
16 | @example("test_Gtis.evt")
17 | def test_get_eventlist_from_evt_dataset(s):
18 | destination = FileUtils.get_destination(TEST_RESOURCES, s)
19 |
20 | if not FileUtils.is_valid_file(destination):
21 | return None
22 |
23 | dataset, cache_key = DaveReader.get_file_dataset(destination)
24 |
25 | if not dataset:
26 | return None
27 |
28 | eventList = DsHelper.get_eventlist_from_evt_dataset(dataset)
29 |
30 | assert not os.path.isfile(destination) or len(eventList.time) > 0
31 |
--------------------------------------------------------------------------------
/src/test/python/test/utils/test_dave_engine.py:
--------------------------------------------------------------------------------
1 | from test.fixture import *
2 |
3 | from hypothesis import given
4 | from hypothesis import example
5 | from hypothesis.strategies import text
6 |
7 | import utils.dave_engine as DaveEngine
8 | import utils.file_utils as FileUtils
9 | import utils.dave_reader as DaveReader
10 | import utils.filters_helper as FltHelper
11 |
12 | @given(text(min_size=1))
13 | @example("Test_Input_1.txt")
14 | @example("test.evt")
15 | def test_get_dataset_schema(s):
16 | destination = FileUtils.get_destination(TEST_RESOURCES, s)
17 | schema = None
18 |
19 | if FileUtils.is_valid_file(destination):
20 | schema = DaveEngine.get_dataset_schema(destination)
21 | assert schema is not None
22 |
23 |
24 | @given(text(min_size=1))
25 | @example("test.evt")
26 | @example("test_Gtis.evt")
27 | def test_get_lightcurve(s):
28 | destination = FileUtils.get_destination(TEST_RESOURCES, s)
29 | result = None
30 |
31 | axis = [dict() for i in range(2)]
32 | axis[0]["table"] = "EVENTS"
33 | axis[0]["column"] = "TIME"
34 | axis[1]["table"] = "EVENTS"
35 | axis[1]["column"] = "PHA"
36 |
37 | baseline_opts = dict()
38 | baseline_opts["niter"] = 10
39 | baseline_opts["lam"] = 1000
40 | baseline_opts["p"] = 0.01
41 |
42 | meanflux_opts = dict()
43 | meanflux_opts["niter"] = 10
44 | meanflux_opts["lam"] = 1000
45 | meanflux_opts["p"] = 0.01
46 |
47 | if FileUtils.is_valid_file(destination):
48 | result = DaveEngine.get_lightcurve(destination, "", "", [], axis, 16., baseline_opts, meanflux_opts, None)
49 | assert result is not None
50 |
51 |
52 | @given(text(min_size=1))
53 | def test_get_divided_lightcurve_ds(s):
54 | destination = FileUtils.get_destination(TEST_RESOURCES, "Test_Input_2.lc")
55 | result = ""
56 |
57 | if FileUtils.is_valid_file(destination):
58 | result = DaveEngine.get_divided_lightcurve_ds(destination, destination, "", "")
59 | assert len(result) > 0
60 |
61 |
62 | @given(text(min_size=1))
63 | @example("test.evt")
64 | @example("test_Gtis.evt")
65 | def test_get_power_density_spectrum(s):
66 | destination = FileUtils.get_destination(TEST_RESOURCES, s)
67 | result = None
68 |
69 | axis = [dict() for i in range(2)]
70 | axis[0]["table"] = "EVENTS"
71 | axis[0]["column"] = "TIME"
72 | axis[1]["table"] = "EVENTS"
73 | axis[1]["column"] = "PHA"
74 |
75 | if FileUtils.is_valid_file(destination):
76 | result = DaveEngine.get_power_density_spectrum(destination, "", "", [], axis, 16., 1, 0, 'leahy', 'Sng')
77 | assert result is not None
78 |
79 |
80 | @given(text(min_size=1))
81 | @example("test.evt")
82 | @example("/\x00")
83 | def test_get_cross_spectrum(s):
84 | destination = FileUtils.get_destination(TEST_RESOURCES, s)
85 | result = None
86 |
87 | axis = [dict() for i in range(2)]
88 | axis[0]["table"] = "EVENTS"
89 | axis[0]["column"] = "TIME"
90 | axis[1]["table"] = "EVENTS"
91 | axis[1]["column"] = "PHA"
92 |
93 | if FileUtils.is_valid_file(destination):
94 | result = DaveEngine.get_cross_spectrum(destination, "", "", [], axis, 16.,
95 | destination, "", "", [], axis, 16.,
96 | 1, 0, 'leahy', 'Avg')
97 | assert result is not None
98 |
--------------------------------------------------------------------------------
/src/test/python/test/utils/test_file_utils.py:
--------------------------------------------------------------------------------
1 | from test.fixture import *
2 | import os
3 |
4 | from hypothesis import given
5 | from hypothesis.strategies import text
6 | from hypothesis import example
7 |
8 | import utils.file_utils as FileUtils
9 |
10 |
11 | @given(text(min_size=1))
12 | @example("Test_Input_1.txt")
13 | @example("Test_Input_2.lc")
14 | def test_is_valid_file(s):
15 | destination = FileUtils.get_destination(TEST_RESOURCES, s)
16 | try:
17 | assert FileUtils.is_valid_file(destination) == os.path.isfile(destination)
18 | except:
19 | assert FileUtils.is_valid_file(destination) == False
20 |
--------------------------------------------------------------------------------
/src/test/python/test/utils/test_filters_helper.py:
--------------------------------------------------------------------------------
1 | from test.fixture import *
2 | import os
3 |
4 | from hypothesis import given
5 | import hypothesis.strategies as st
6 |
7 | import utils.filters_helper as FltHelper
8 |
9 | @given(
10 | st.text(min_size=1),
11 | st.text(min_size=1),
12 | st.floats(allow_nan=False, allow_infinity=False),
13 | st.floats(allow_nan=False, allow_infinity=False)
14 | )
15 | def test_createFilter(tn, c, f, t):
16 |
17 | filter = FltHelper.createFilter(tn, c, f, t)
18 | assert len(filter) == 4
19 | assert filter["table"] == tn
20 | assert filter["column"] == c
21 | assert filter["from"] == f
22 | assert filter["to"] == t
23 |
24 |
25 | @given(st.text(min_size=1))
26 | def test_get_time_filter(s):
27 |
28 | filter1 = FltHelper.createFilter("EVENTS", "1", 0, 1)
29 | filter2 = FltHelper.createFilter("EVENTS", "2", 0, 1)
30 | filter3 = FltHelper.createTimeFilter(0, 1)
31 | time_filter = FltHelper.get_time_filter ([filter1, filter2, filter3])
32 | assert time_filter
33 | assert time_filter["column"] == "TIME"
34 |
35 |
36 | @given(st.text(min_size=1))
37 | def test_get_color_keys_from_filters(s):
38 |
39 | filter1 = FltHelper.createFilter("EVENTS", "1", 0, 1)
40 | filter2 = FltHelper.createFilter("EVENTS", "2", 0, 1, "ColorSelector")
41 | filter3 = FltHelper.createFilter("EVENTS", "3", 0, 1, "ColorSelector")
42 | filter4 = FltHelper.createTimeFilter(0, 1)
43 | color_keys = FltHelper.get_color_keys_from_filters ([filter1, filter2, filter3, filter4])
44 | assert color_keys
45 | assert len(color_keys) == 2
46 |
--------------------------------------------------------------------------------
/src/test/resources/datasets/Input1.txt:
--------------------------------------------------------------------------------
1 | 0 3830 61.886993 0.5
2 | 1 3791 61.5711 0.5
3 | 2 3681 60.671246 0.5
4 | 3 3605 60.041653 0.5
5 | 4 3815 61.765686 0.5
6 | 5 3785 61.522354 0.5
7 | 6 3733 61.09828 0.5
8 | 7 3889 62.361847 0.5
9 | 8 3762 61.335144 0.5
10 | 9 3725 61.03278 0.5
11 | 10 3854 62.080593 0.5
12 | 11 3785 61.522354 0.5
13 | 12 3797 61.6198 0.5
14 | 13 3758 61.30253 0.5
15 | 14 3776 61.449165 0.5
16 | 15 3799 61.63603 0.5
17 | 16 3646 60.38212 0.5
18 | 17 3705 60.86871 0.5
19 | 18 3742 61.17189 0.5
20 | 19 3922 62.625874 0.5
21 | 20 3674 60.61353 0.5
22 | 21 3926 62.657803 0.5
23 | 22 3791 61.5711 0.5
24 | 23 3739 61.14736 0.5
25 | 24 3817 61.781876 0.5
26 | 25 3788 61.54673 0.5
27 | 26 3623 60.19136 0.5
28 | 27 3721 61 0.5
29 | 28 3712 60.926186 0.5
30 | 29 3716 60.959003 0.5
31 | 30 3674 60.61353 0.5
32 | 31 3831 61.895073 0.5
33 | 32 3743 61.18006 0.5
34 | 33 3705 60.86871 0.5
35 | 34 3794 61.595455 0.5
36 | 35 3841 61.975803 0.5
37 | 36 3802 61.66036 0.5
38 | 37 3679 60.654762 0.5
39 | 38 3813 61.749493 0.5
40 | 39 3691 60.7536 0.5
41 | 40 3832 61.90315 0.5
42 | 41 3823 61.830414 0.5
43 | 42 3787 61.538605 0.5
44 | 43 3880 62.289646 0.5
45 | 44 3736 61.122826 0.5
46 | 45 3677 60.63827 0.5
47 | 46 3693 60.770058 0.5
48 | 47 3663 60.522724 0.5
49 | 48 3719 60.983604 0.5
50 | 49 3920 62.609905 0.5
51 | 50 3726 61.04097 0.5
52 | 51 3726 61.04097 0.5
53 | 52 3763 61.343296 0.5
54 | 53 3744 61.188232 0.5
55 | 54 3839 61.959663 0.5
56 | 55 3864 62.16108 0.5
57 | 56 3812 61.741398 0.5
58 | 57 3741 61.163715 0.5
59 | 58 3828 61.870834 0.5
60 | 59 3803 61.66847 0.5
61 | 60 3804 61.676575 0.5
62 | 61 3764 61.351448 0.5
63 | 62 3804 61.676575 0.5
64 | 63 3791 61.5711 0.5
65 | 64 3779 61.47357 0.5
66 | 65 3848 62.03225 0.5
67 | 66 3787 61.538605 0.5
68 | 67 3707 60.88514 0.5
69 | 68 3751 61.245407 0.5
70 | 69 3751 61.245407 0.5
71 | 70 3797 61.6198 0.5
72 | 71 3680 60.663002 0.5
73 | 72 3674 60.61353 0.5
74 | 73 3715 60.950798 0.5
75 | 74 3596 59.966656 0.5
76 | 75 3682 60.679485 0.5
77 | 76 3785 61.522354 0.5
78 | 77 3745 61.196404 0.5
79 | 78 3840 61.967735 0.5
80 | 79 3681 60.671246 0.5
81 | 80 3876 62.25753 0.5
82 | 81 3737 61.13101 0.5
83 | 82 3802 61.66036 0.5
84 | 83 3808 61.708996 0.5
85 | 84 3691 60.7536 0.5
86 | 85 3803 61.66847 0.5
87 | 86 3739 61.14736 0.5
88 | 87 3777 61.457302 0.5
89 | 88 3948 62.83311 0.5
90 | 89 3870 62.209324 0.5
91 | 90 3706 60.876926 0.5
92 | 91 3769 61.39218 0.5
93 | 92 3719 60.983604 0.5
94 | 93 3760 61.31884 0.5
95 | 94 3681 60.671246 0.5
96 | 95 3756 61.286213 0.5
97 | 96 3723 61.01639 0.5
98 | 97 3775 61.44103 0.5
99 | 98 3781 61.489838 0.5
100 | 99 3814 61.75759 0.5
101 | 100 3658 60.481403 0.5
102 |
--------------------------------------------------------------------------------
/src/test/resources/datasets/Input_funnycolor.txt:
--------------------------------------------------------------------------------
1 | 0.000 3830.000 61.887 0.500 2800.000 1300.000 0.000 0.000
2 | 1.000 3791.000 61.571 0.500 2772.931 1291.379 0.000 0.000
3 | 2.000 3681.000 60.671 0.500 2745.940 1282.759 0.000 0.000
4 | 3.000 3605.000 60.042 0.500 2719.109 1274.138 0.000 0.000
5 | 4.000 3815.000 61.766 0.500 2692.515 1265.517 0.000 0.000
6 | 5.000 3785.000 61.522 0.500 2666.236 1256.897 0.000 0.000
7 | 6.000 3733.000 61.098 0.500 2640.349 1248.276 0.000 0.000
8 | 7.000 3889.000 62.362 0.500 2614.931 1239.655 0.000 0.000
9 | 8.000 3762.000 61.335 0.500 2590.055 1231.034 0.000 0.000
10 | 9.000 3725.000 61.033 0.500 2565.796 1222.414 0.000 0.000
11 | 10.000 3854.000 62.081 0.500 2542.223 1213.793 0.000 0.000
12 | 11.000 3785.000 61.522 0.500 2519.406 1205.172 0.000 0.000
13 | 12.000 3797.000 61.620 0.500 2497.413 1196.552 0.000 0.000
14 | 13.000 3758.000 61.303 0.500 2476.307 1187.931 0.000 0.000
15 | 14.000 3776.000 61.449 0.500 2456.150 1179.310 0.000 0.000
16 | 15.000 3799.000 61.636 0.500 2437.002 1170.690 0.000 0.000
17 | 16.000 3646.000 60.382 0.500 2418.919 1162.069 0.000 0.000
18 | 17.000 3705.000 60.869 0.500 2401.953 1153.448 0.000 0.000
19 | 18.000 3742.000 61.172 0.500 2386.156 1144.828 0.000 0.000
20 | 19.000 3922.000 62.626 0.500 2371.571 1136.207 0.000 0.000
21 | 20.000 3674.000 60.614 0.500 2358.244 1127.586 0.000 0.000
22 | 21.000 3926.000 62.658 0.500 2346.212 1118.966 0.000 0.000
23 | 22.000 3791.000 61.571 0.500 2335.512 1110.345 0.000 0.000
24 | 23.000 3739.000 61.147 0.500 2326.173 1101.724 0.000 0.000
25 | 24.000 3817.000 61.782 0.500 2318.225 1093.103 0.000 0.000
26 | 25.000 3788.000 61.547 0.500 2311.690 1084.483 0.000 0.000
27 | 26.000 3623.000 60.191 0.500 2306.587 1075.862 0.000 0.000
28 | 27.000 3721.000 61.000 0.500 2302.931 1067.241 0.000 0.000
29 | 28.000 3712.000 60.926 0.500 2300.733 1058.621 0.000 0.000
30 | 29.000 3716.000 60.959 0.500 2300.000 1050.000 0.000 0.000
31 | 30.000 3674.000 60.614 0.500 2300.733 1041.379 0.000 0.000
32 | 31.000 3831.000 61.895 0.500 2302.931 1032.759 0.000 0.000
33 | 32.000 3743.000 61.180 0.500 2306.587 1024.138 0.000 0.000
34 | 33.000 3705.000 60.869 0.500 2311.690 1015.517 0.000 0.000
35 | 34.000 3794.000 61.595 0.500 2318.225 1006.897 0.000 0.000
36 | 35.000 3841.000 61.976 0.500 2326.173 998.276 0.000 0.000
37 | 36.000 3802.000 61.660 0.500 2335.512 989.655 0.000 0.000
38 | 37.000 3679.000 60.655 0.500 2346.212 981.034 0.000 0.000
39 | 38.000 3813.000 61.749 0.500 2358.244 972.414 0.000 0.000
40 | 39.000 3691.000 60.754 0.500 2371.571 963.793 0.000 0.000
41 | 40.000 3832.000 61.903 0.500 2386.156 955.172 0.000 0.000
42 | 41.000 3823.000 61.830 0.500 2401.953 946.552 0.000 0.000
43 | 42.000 3787.000 61.539 0.500 2418.919 937.931 0.000 0.000
44 | 43.000 3880.000 62.290 0.500 2437.002 929.310 0.000 0.000
45 | 44.000 3736.000 61.123 0.500 2456.150 920.690 0.000 0.000
46 | 45.000 3677.000 60.638 0.500 2476.307 912.069 0.000 0.000
47 | 46.000 3693.000 60.770 0.500 2497.413 903.448 0.000 0.000
48 | 47.000 3663.000 60.523 0.500 2519.406 894.828 0.000 0.000
49 | 48.000 3719.000 60.984 0.500 2542.223 886.207 0.000 0.000
50 | 49.000 3920.000 62.610 0.500 2565.796 877.586 0.000 0.000
51 | 50.000 3726.000 61.041 0.500 2590.055 868.966 0.000 0.000
52 | 51.000 3726.000 61.041 0.500 2614.931 860.345 0.000 0.000
53 | 52.000 3763.000 61.343 0.500 2640.349 851.724 0.000 0.000
54 | 53.000 3744.000 61.188 0.500 2666.236 843.103 0.000 0.000
55 | 54.000 3839.000 61.960 0.500 2692.515 834.483 0.000 0.000
56 | 55.000 3864.000 62.161 0.500 2719.109 825.862 0.000 0.000
57 | 56.000 3812.000 61.741 0.500 2745.940 817.241 0.000 0.000
58 | 57.000 3741.000 61.164 0.500 2772.931 808.621 0.000 0.000
59 | 58.000 3828.000 61.871 0.500 2800.000 800.000 0.000 0.000
60 |
--------------------------------------------------------------------------------
/src/test/resources/datasets/Input_funnycolor_selectcolor.txt:
--------------------------------------------------------------------------------
1 | 0.000 3830.000 61.887 0.500 2800.000 1300.000 0.000 0.000
2 | 1.000 3791.000 61.571 0.500 2772.931 1291.379 0.000 0.000
3 | 2.000 3681.000 60.671 0.500 2745.940 1282.759 0.000 0.000
4 | 3.000 3605.000 60.042 0.500 2719.109 1274.138 0.000 0.000
5 | 4.000 3815.000 61.766 0.500 2692.515 1265.517 0.000 0.000
6 | 5.000 3785.000 61.522 0.500 2666.236 1256.897 0.000 0.000
7 | 6.000 3733.000 61.098 0.500 2640.349 1248.276 0.000 0.000
8 | 7.000 3889.000 62.362 0.500 2614.931 1239.655 0.000 0.000
9 | 51.000 3726.000 61.041 0.500 2614.931 860.345 0.000 0.000
10 | 52.000 3763.000 61.343 0.500 2640.349 851.724 0.000 0.000
11 | 53.000 3744.000 61.188 0.500 2666.236 843.103 0.000 0.000
12 | 54.000 3839.000 61.960 0.500 2692.515 834.483 0.000 0.000
13 | 55.000 3864.000 62.161 0.500 2719.109 825.862 0.000 0.000
14 | 56.000 3812.000 61.741 0.500 2745.940 817.241 0.000 0.000
15 | 57.000 3741.000 61.164 0.500 2772.931 808.621 0.000 0.000
16 | 58.000 3828.000 61.871 0.500 2800.000 800.000 0.000 0.000
17 |
--------------------------------------------------------------------------------
/src/test/resources/datasets/Input_funnycolor_selecttime.txt:
--------------------------------------------------------------------------------
1 | 0.000 3830.000 61.887 0.500 2800.000 1300.000 0.000 0.000
2 | 1.000 3791.000 61.571 0.500 2772.931 1291.379 0.000 0.000
3 | 2.000 3681.000 60.671 0.500 2745.940 1282.759 0.000 0.000
4 | 3.000 3605.000 60.042 0.500 2719.109 1274.138 0.000 0.000
5 | 4.000 3815.000 61.766 0.500 2692.515 1265.517 0.000 0.000
6 | 5.000 3785.000 61.522 0.500 2666.236 1256.897 0.000 0.000
7 | 6.000 3733.000 61.098 0.500 2640.349 1248.276 0.000 0.000
8 | 7.000 3889.000 62.362 0.500 2614.931 1239.655 0.000 0.000
9 | 8.000 3762.000 61.335 0.500 2590.055 1231.034 0.000 0.000
10 | 9.000 3725.000 61.033 0.500 2565.796 1222.414 0.000 0.000
11 | 10.000 3854.000 62.081 0.500 2542.223 1213.793 0.000 0.000
12 | 11.000 3785.000 61.522 0.500 2519.406 1205.172 0.000 0.000
13 | 12.000 3797.000 61.620 0.500 2497.413 1196.552 0.000 0.000
14 | 13.000 3758.000 61.303 0.500 2476.307 1187.931 0.000 0.000
15 | 14.000 3776.000 61.449 0.500 2456.150 1179.310 0.000 0.000
16 | 15.000 3799.000 61.636 0.500 2437.002 1170.690 0.000 0.000
17 | 16.000 3646.000 60.382 0.500 2418.919 1162.069 0.000 0.000
18 | 17.000 3705.000 60.869 0.500 2401.953 1153.448 0.000 0.000
19 | 18.000 3742.000 61.172 0.500 2386.156 1144.828 0.000 0.000
20 | 19.000 3922.000 62.626 0.500 2371.571 1136.207 0.000 0.000
21 | 20.000 3674.000 60.614 0.500 2358.244 1127.586 0.000 0.000
22 |
--------------------------------------------------------------------------------
/src/test/resources/datasets/Input_reorderedcolor.txt:
--------------------------------------------------------------------------------
1 | 0.000 0.500 3830.000 61.887 2800.000 0.000 1300.000 0.000
2 | 1.000 0.500 3791.000 61.571 2772.931 0.000 1291.379 0.000
3 | 2.000 0.500 3681.000 60.671 2745.940 0.000 1282.759 0.000
4 | 3.000 0.500 3605.000 60.042 2719.109 0.000 1274.138 0.000
5 | 4.000 0.500 3815.000 61.766 2692.515 0.000 1265.517 0.000
6 | 5.000 0.500 3785.000 61.522 2666.236 0.000 1256.897 0.000
7 | 6.000 0.500 3733.000 61.098 2640.349 0.000 1248.276 0.000
8 | 7.000 0.500 3889.000 62.362 2614.931 0.000 1239.655 0.000
9 | 8.000 0.500 3762.000 61.335 2590.055 0.000 1231.034 0.000
10 | 9.000 0.500 3725.000 61.033 2565.796 0.000 1222.414 0.000
11 | 10.000 0.500 3854.000 62.081 2542.223 0.000 1213.793 0.000
12 | 11.000 0.500 3785.000 61.522 2519.406 0.000 1205.172 0.000
13 | 12.000 0.500 3797.000 61.620 2497.413 0.000 1196.552 0.000
14 | 13.000 0.500 3758.000 61.303 2476.307 0.000 1187.931 0.000
15 | 14.000 0.500 3776.000 61.449 2456.150 0.000 1179.310 0.000
16 | 15.000 0.500 3799.000 61.636 2437.002 0.000 1170.690 0.000
17 | 16.000 0.500 3646.000 60.382 2418.919 0.000 1162.069 0.000
18 | 17.000 0.500 3705.000 60.869 2401.953 0.000 1153.448 0.000
19 | 18.000 0.500 3742.000 61.172 2386.156 0.000 1144.828 0.000
20 | 19.000 0.500 3922.000 62.626 2371.571 0.000 1136.207 0.000
21 | 20.000 0.500 3674.000 60.614 2358.244 0.000 1127.586 0.000
22 | 21.000 0.500 3926.000 62.658 2346.212 0.000 1118.966 0.000
23 | 22.000 0.500 3791.000 61.571 2335.512 0.000 1110.345 0.000
24 | 23.000 0.500 3739.000 61.147 2326.173 0.000 1101.724 0.000
25 | 24.000 0.500 3817.000 61.782 2318.225 0.000 1093.103 0.000
26 | 25.000 0.500 3788.000 61.547 2311.690 0.000 1084.483 0.000
27 | 26.000 0.500 3623.000 60.191 2306.587 0.000 1075.862 0.000
28 | 27.000 0.500 3721.000 61.000 2302.931 0.000 1067.241 0.000
29 | 28.000 0.500 3712.000 60.926 2300.733 0.000 1058.621 0.000
30 | 29.000 0.500 3716.000 60.959 2300.000 0.000 1050.000 0.000
31 | 30.000 0.500 3674.000 60.614 2300.733 0.000 1041.379 0.000
32 | 31.000 0.500 3831.000 61.895 2302.931 0.000 1032.759 0.000
33 | 32.000 0.500 3743.000 61.180 2306.587 0.000 1024.138 0.000
34 | 33.000 0.500 3705.000 60.869 2311.690 0.000 1015.517 0.000
35 | 34.000 0.500 3794.000 61.595 2318.225 0.000 1006.897 0.000
36 | 35.000 0.500 3841.000 61.976 2326.173 0.000 998.276 0.000
37 | 36.000 0.500 3802.000 61.660 2335.512 0.000 989.655 0.000
38 | 37.000 0.500 3679.000 60.655 2346.212 0.000 981.034 0.000
39 | 38.000 0.500 3813.000 61.749 2358.244 0.000 972.414 0.000
40 | 39.000 0.500 3691.000 60.754 2371.571 0.000 963.793 0.000
41 | 40.000 0.500 3832.000 61.903 2386.156 0.000 955.172 0.000
42 | 41.000 0.500 3823.000 61.830 2401.953 0.000 946.552 0.000
43 | 42.000 0.500 3787.000 61.539 2418.919 0.000 937.931 0.000
44 | 43.000 0.500 3880.000 62.290 2437.002 0.000 929.310 0.000
45 | 44.000 0.500 3736.000 61.123 2456.150 0.000 920.690 0.000
46 | 45.000 0.500 3677.000 60.638 2476.307 0.000 912.069 0.000
47 | 46.000 0.500 3693.000 60.770 2497.413 0.000 903.448 0.000
48 | 47.000 0.500 3663.000 60.523 2519.406 0.000 894.828 0.000
49 | 48.000 0.500 3719.000 60.984 2542.223 0.000 886.207 0.000
50 | 49.000 0.500 3920.000 62.610 2565.796 0.000 877.586 0.000
51 | 50.000 0.500 3726.000 61.041 2590.055 0.000 868.966 0.000
52 | 51.000 0.500 3726.000 61.041 2614.931 0.000 860.345 0.000
53 | 52.000 0.500 3763.000 61.343 2640.349 0.000 851.724 0.000
54 | 53.000 0.500 3744.000 61.188 2666.236 0.000 843.103 0.000
55 | 54.000 0.500 3839.000 61.960 2692.515 0.000 834.483 0.000
56 | 55.000 0.500 3864.000 62.161 2719.109 0.000 825.862 0.000
57 | 56.000 0.500 3812.000 61.741 2745.940 0.000 817.241 0.000
58 | 57.000 0.500 3741.000 61.164 2772.931 0.000 808.621 0.000
59 | 58.000 0.500 3828.000 61.871 2800.000 0.000 800.000 0.000
60 |
--------------------------------------------------------------------------------
/src/test/resources/datasets/Input_withcolor.txt:
--------------------------------------------------------------------------------
1 | 0 3830 61.886993 0.5 0 3830 61.886993 0.5
2 | 1 3791 61.5711 0.5 1 3791 61.5711 0.5
3 | 2 3681 60.671246 0.5 2 3681 60.671246 0.5
4 | 3 3605 60.041653 0.5 3 3605 60.041653 0.5
5 | 4 3815 61.765686 0.5 4 3815 61.765686 0.5
6 | 5 3785 61.522354 0.5 5 3785 61.522354 0.5
7 | 6 3733 61.09828 0.5 6 3733 61.09828 0.5
8 | 7 3889 62.361847 0.5 7 3889 62.361847 0.5
9 | 8 3762 61.335144 0.5 8 3762 61.335144 0.5
10 | 9 3725 61.03278 0.5 9 3725 61.03278 0.5
11 | 10 3854 62.080593 0.5 10 3854 62.080593 0.5
12 | 11 3785 61.522354 0.5 11 3785 61.522354 0.5
13 | 12 3797 61.6198 0.5 12 3797 61.6198 0.5
14 | 13 3758 61.30253 0.5 13 3758 61.30253 0.5
15 | 14 3776 61.449165 0.5 14 3776 61.449165 0.5
16 | 15 3799 61.63603 0.5 15 3799 61.63603 0.5
17 | 16 3646 60.38212 0.5 16 3646 60.38212 0.5
18 | 17 3705 60.86871 0.5 17 3705 60.86871 0.5
19 | 18 3742 61.17189 0.5 18 3742 61.17189 0.5
20 | 19 3922 62.625874 0.5 19 3922 62.625874 0.5
21 | 20 3674 60.61353 0.5 20 3674 60.61353 0.5
22 | 21 3926 62.657803 0.5 21 3926 62.657803 0.5
23 | 22 3791 61.5711 0.5 22 3791 61.5711 0.5
24 | 23 3739 61.14736 0.5 23 3739 61.14736 0.5
25 | 24 3817 61.781876 0.5 24 3817 61.781876 0.5
26 | 25 3788 61.54673 0.5 25 3788 61.54673 0.5
27 | 26 3623 60.19136 0.5 26 3623 60.19136 0.5
28 | 27 3721 61 0.5 27 3721 61 0.5
29 | 28 3712 60.926186 0.5 28 3712 60.926186 0.5
30 | 29 3716 60.959003 0.5 29 3716 60.959003 0.5
31 | 30 3674 60.61353 0.5 30 3674 60.61353 0.5
32 | 31 3831 61.895073 0.5 31 3831 61.895073 0.5
33 | 32 3743 61.18006 0.5 32 3743 61.18006 0.5
34 | 33 3705 60.86871 0.5 33 3705 60.86871 0.5
35 | 34 3794 61.595455 0.5 34 3794 61.595455 0.5
36 | 35 3841 61.975803 0.5 35 3841 61.975803 0.5
37 | 36 3802 61.66036 0.5 36 3802 61.66036 0.5
38 | 37 3679 60.654762 0.5 37 3679 60.654762 0.5
39 | 38 3813 61.749493 0.5 38 3813 61.749493 0.5
40 | 39 3691 60.7536 0.5 39 3691 60.7536 0.5
41 | 40 3832 61.90315 0.5 40 3832 61.90315 0.5
42 | 41 3823 61.830414 0.5 41 3823 61.830414 0.5
43 | 42 3787 61.538605 0.5 42 3787 61.538605 0.5
44 | 43 3880 62.289646 0.5 43 3880 62.289646 0.5
45 | 44 3736 61.122826 0.5 44 3736 61.122826 0.5
46 | 45 3677 60.63827 0.5 45 3677 60.63827 0.5
47 | 46 3693 60.770058 0.5 46 3693 60.770058 0.5
48 | 47 3663 60.522724 0.5 47 3663 60.522724 0.5
49 | 48 3719 60.983604 0.5 48 3719 60.983604 0.5
50 | 49 3920 62.609905 0.5 49 3920 62.609905 0.5
51 | 50 3726 61.04097 0.5 50 3726 61.04097 0.5
52 | 51 3726 61.04097 0.5 51 3726 61.04097 0.5
53 | 52 3763 61.343296 0.5 52 3763 61.343296 0.5
54 | 53 3744 61.188232 0.5 53 3744 61.188232 0.5
55 | 54 3839 61.959663 0.5 54 3839 61.959663 0.5
56 | 55 3864 62.16108 0.5 55 3864 62.16108 0.5
57 | 56 3812 61.741398 0.5 56 3812 61.741398 0.5
58 | 57 3741 61.163715 0.5 57 3741 61.163715 0.5
59 | 58 3828 61.870834 0.5 58 3828 61.870834 0.5
--------------------------------------------------------------------------------
/src/test/resources/datasets/PN_source_lightcurve_raw.lc:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/StingraySoftware/dave/e7188025763cb3a2840aef0e1dd15b52be8de9a1/src/test/resources/datasets/PN_source_lightcurve_raw.lc
--------------------------------------------------------------------------------
/src/test/resources/datasets/bulk_example.txt:
--------------------------------------------------------------------------------
1 | # Rename /Users/ricardo/TimeLab/dave with your absolute path to dave folder
2 | /Users/ricardo/TimeLab/dave/src/test/resources/datasets/std1_ao9_01_01.lc
3 | /Users/ricardo/TimeLab/dave/src/test/resources/datasets/std2_ao9_01_00.lc
4 | /Users/ricardo/TimeLab/dave/src/test/resources/datasets/PN_source_lightcurve_raw.lc
5 |
--------------------------------------------------------------------------------
/src/test/resources/datasets/gen_colordata.py:
--------------------------------------------------------------------------------
1 | import numpy as np
2 | from math import sin,pi
3 |
4 | filedata = np.loadtxt('Input_withcolor.txt')
5 |
6 | npoints = 58
7 | def gencolor1(x): return 1300 - x*500/npoints
8 | def gencolor2(x): return 2800 - 500 * sin(x*pi/float(npoints))
9 |
10 | newdata = [ [row[0],row[3],row[1],row[2],gencolor2(row[0]), 0,gencolor1(row[0]), 0] for row in filedata ]
11 |
12 | np.savetxt('Input_funnycolor.txt', newdata, fmt="%.3f")
--------------------------------------------------------------------------------
/src/test/resources/datasets/in.txt:
--------------------------------------------------------------------------------
1 | 1.109110400703125000e+08 4.120000061392784119e+03
2 | 1.109110401953125000e+08 4.200000062584877014e+03
3 | 1.109110403203125000e+08 4.238400063157081604e+03
4 | 1.109110404453125000e+08 4.308800064206123352e+03
5 | 1.109110405703125000e+08 4.350400064826011658e+03
6 | 1.109110406953125000e+08 4.187200062394142151e+03
7 | 1.109110408203125000e+08 4.150400061845779419e+03
8 | 1.109110409453125000e+08 4.310400064229965210e+03
9 | 1.109110410703125000e+08 4.033600060105323792e+03
10 | 1.109110411953125000e+08 3.992000059485435486e+03
11 | 1.109110413203125000e+08 4.225600062966346741e+03
12 | 1.109110414453125000e+08 4.113600061297416687e+03
13 | 1.109110415703125000e+08 4.297600064039230347e+03
14 | 1.109110416953125000e+08 4.193600062489509583e+03
15 | 1.109110418203125000e+08 4.355200064897537231e+03
16 | 1.109110419453125000e+08 3.976000059247016907e+03
17 | 1.109110420703125000e+08 4.196800062537193298e+03
18 | 1.109110421953125000e+08 4.000000059604644775e+03
19 | 1.109110423203125000e+08 4.019200059890747070e+03
20 | 1.109110424453125000e+08 3.958400058984756470e+03
21 | 1.109110425703125000e+08 4.065600060582160950e+03
22 | 1.109110426953125000e+08 4.315200064301490784e+03
23 | 1.109110428203125000e+08 4.361600064992904663e+03
24 | 1.109110429453125000e+08 4.104000061154365540e+03
25 |
--------------------------------------------------------------------------------
/src/test/resources/datasets/std1_ao9_01_01.lc:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/StingraySoftware/dave/e7188025763cb3a2840aef0e1dd15b52be8de9a1/src/test/resources/datasets/std1_ao9_01_01.lc
--------------------------------------------------------------------------------
/src/test/resources/datasets/std2_ao9_01_00.lc:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/StingraySoftware/dave/e7188025763cb3a2840aef0e1dd15b52be8de9a1/src/test/resources/datasets/std2_ao9_01_00.lc
--------------------------------------------------------------------------------
/src/test/resources/datasets/test.evt:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/StingraySoftware/dave/e7188025763cb3a2840aef0e1dd15b52be8de9a1/src/test/resources/datasets/test.evt
--------------------------------------------------------------------------------
/src/test/resources/images/testimage1.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/StingraySoftware/dave/e7188025763cb3a2840aef0e1dd15b52be8de9a1/src/test/resources/images/testimage1.jpg
--------------------------------------------------------------------------------
/src/test/resources/images/testimage1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/StingraySoftware/dave/e7188025763cb3a2840aef0e1dd15b52be8de9a1/src/test/resources/images/testimage1.png
--------------------------------------------------------------------------------
/src/test/resources/images/testimage2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/StingraySoftware/dave/e7188025763cb3a2840aef0e1dd15b52be8de9a1/src/test/resources/images/testimage2.png
--------------------------------------------------------------------------------
/src/test/resources/pytest/PN_source_lightcurve_raw.lc:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/StingraySoftware/dave/e7188025763cb3a2840aef0e1dd15b52be8de9a1/src/test/resources/pytest/PN_source_lightcurve_raw.lc
--------------------------------------------------------------------------------
/src/test/resources/pytest/Test_Input_1.txt:
--------------------------------------------------------------------------------
1 | 0.000 0.500 3830.000 61.887 2800.000 0.000 1300.000 0.000
2 | 1.000 0.500 3791.000 61.571 2772.931 0.000 1291.379 0.000
3 | 2.000 0.500 3681.000 60.671 2745.940 0.000 1282.759 0.000
4 | 3.000 0.500 3605.000 60.042 2719.109 0.000 1274.138 0.000
5 | 4.000 0.500 3815.000 61.766 2692.515 0.000 1265.517 0.000
6 | 5.000 0.500 3785.000 61.522 2666.236 0.000 1256.897 0.000
7 | 6.000 0.500 3733.000 61.098 2640.349 0.000 1248.276 0.000
8 | 7.000 0.500 3889.000 62.362 2614.931 0.000 1239.655 0.000
9 | 8.000 0.500 3762.000 61.335 2590.055 0.000 1231.034 0.000
10 | 9.000 0.500 3725.000 61.033 2565.796 0.000 1222.414 0.000
11 |
--------------------------------------------------------------------------------
/src/test/resources/pytest/Test_Input_2.lc:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/StingraySoftware/dave/e7188025763cb3a2840aef0e1dd15b52be8de9a1/src/test/resources/pytest/Test_Input_2.lc
--------------------------------------------------------------------------------
/src/test/resources/pytest/test.evt:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/StingraySoftware/dave/e7188025763cb3a2840aef0e1dd15b52be8de9a1/src/test/resources/pytest/test.evt
--------------------------------------------------------------------------------
/src/test/resources/pytest/test_Gtis.evt:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/StingraySoftware/dave/e7188025763cb3a2840aef0e1dd15b52be8de9a1/src/test/resources/pytest/test_Gtis.evt
--------------------------------------------------------------------------------
/src/test/resources/python_examples/3D.py:
--------------------------------------------------------------------------------
1 | import plotly
2 | from plotly.offline import plot
3 |
4 | import plotly.graph_objs as go
5 |
6 | import numpy
7 | import numpy as np
8 |
9 | x, y, z = np.random.multivariate_normal(np.array([0,0,0]), np.eye(3), 400).transpose()
10 | error = numpy.random.uniform(-1, 1, size=len(x))
11 | trace1 = go.Scatter3d(
12 | x=x,
13 | y=y,
14 | z=z,
15 | mode='markers',
16 | error_x = dict(
17 | type = 'data',
18 | array = error,
19 | visible = True
20 | ),
21 | error_y = dict(
22 | type = 'data',
23 | array = error,
24 | visible = True
25 | ),
26 | error_z = dict(
27 | type = 'data',
28 | array = error,
29 | visible = True
30 | ),
31 | marker=dict(
32 | size=12,
33 | color=z, # set color to an array/list of desired values
34 | colorscale='Viridis', # choose a colorscale
35 | opacity=0.8
36 | )
37 | )
38 |
39 | data = [trace1]
40 | layout = go.Layout(
41 | title="simple example", # more about "layout's" "title": /python/reference/#layout-title
42 | xaxis=dict( # all "layout's" "xaxis" attributes: /python/reference/#layout-xaxis
43 | title="time" # more about "layout's" "xaxis's" "title": /python/reference/#layout-xaxis-title
44 | )
45 | )
46 |
47 | fig = go.Figure(data=data, layout=layout)
48 | plot(fig, filename='my-graph.html')
49 |
50 |
--------------------------------------------------------------------------------
/src/test/resources/python_examples/load.py:
--------------------------------------------------------------------------------
1 | import pandas as pd
2 | import numpy as np
3 | import pkg_resources
4 |
5 | light_curve = pkg_resources.resource_stream(__name__,"datasets/Input1.txt")
6 | data = np.loadtxt(light_curve)
7 | Time = data[0:len(data),0]
8 | Rate = data[0:len(data),1]
9 | Error_y= data[0:len(data),2]
10 | Error_x= data[0:len(data),3]
11 |
12 | start_time=10
13 | end_time=50
14 | start_count=3600
15 | end_count=3700
16 | if (not start_time) and (not end_time):
17 | start_time = max(Time)
18 | end_time = min(Time)
19 |
20 | if (not start_count) and (not end_count):
21 | start_rate = max(Rate)
22 | end_rate = min(Rate)
23 | newTime=[]
24 | newRate=[]
25 | newError_y=[]
26 | newError_x=[]
27 |
28 | for i in range(len(Time)):
29 | if (Time[i] <= int(start_time) or Time[i] >= int(end_time)) and (Rate[i] <= int(start_count) or Rate[i] >= int(end_count)) :
30 | newTime.append(Time[i])
31 | newRate.append(Rate[i])
32 | newError_y.append(Error_y[i])
33 | newError_x.append(Error_x[i])
34 |
35 | print(newRate)
36 |
37 |
38 |
--------------------------------------------------------------------------------
/src/test/resources/python_examples/test1.py:
--------------------------------------------------------------------------------
1 | import plotly.offline as plt
2 | import plotly.graph_objs as go
3 |
4 | from datetime import datetime
5 | import pandas.io.data as web
6 |
7 | df = web.DataReader("aapl", 'yahoo',
8 | datetime(2007, 10, 1),
9 | datetime(2009, 4, 1))
10 |
11 | trace = go.Scatter(x=[1,2,3,4,5,6,7,8,9],
12 | y=[2,3,4,5,9,0,9,9,1],
13 | error_y=dict(
14 | type='data',
15 | array=[1,2,1,2,1,2,1,2,3],
16 | visible=True
17 | )
18 | )
19 |
20 | data = [trace]
21 | layout = dict(
22 | title='Time series with range slider and selectors',
23 | xaxis=dict(
24 | rangeslider=dict(),
25 | ),
26 | yaxis=dict(
27 | range=[2, 5]
28 | )
29 | )
30 |
31 | fig = dict(data=data, layout=layout)
32 | plt.plot(fig)
--------------------------------------------------------------------------------
/src/test/resources/python_examples/test2.py:
--------------------------------------------------------------------------------
1 | import plotly.offline as plt
2 |
3 | trace1 = dict(
4 | type = 'scatter',
5 | x=[1,2,3,4],
6 | y=[5,6,7,8],
7 |
8 | )
9 | layout=dict(
10 | title='',
11 | xaxis=dict(
12 | title='Time',
13 | titlefont=dict(
14 | family='Courier New, monospace',
15 | size=18,
16 | color='#7f7f7f'
17 | )
18 | ),
19 | yaxis=dict(
20 | title='Count Rate',
21 | titlefont=dict(
22 | family='Courier New, monospace',
23 | size=18,
24 | color='#7f7f7f'
25 | )
26 | )
27 | )
28 | fig = dict(data = [trace1], layout = layout)
29 | plt.plot(fig, filename='basic' + '__plot.html')
--------------------------------------------------------------------------------
/src/test/resources/python_examples/testing_fits.py:
--------------------------------------------------------------------------------
1 | from astropy.io import fits
2 | import numpy as np
3 |
4 | fits_file = '../std1_ao9_01_09.lc'
5 | hdulist = fits.open(fits_file)
6 | tbdata = hdulist['RATE'].data
7 | tbdata['RATE'] = 20
8 | hdulist.writeto('../src20.lc')
9 |
--------------------------------------------------------------------------------