Skip to content

Commit 7bedf61

Browse files
authored
Merge pull request #357 from Caltech-IPAC/DM-10149-PeriodogramIssues
DM-10149 fix the phase value range of phase folded chart
2 parents 2fba617 + e5387a7 commit 7bedf61

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

src/firefly/html/firefly.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
options : {
2222
MenuItemKeys: {maskOverlay:true},
2323
catalogSpacialOp: 'polygonWhenPlotExist',
24-
charts: {chartEngine: ''}
24+
charts: {chartEngine: 'plotly'}
2525
}
2626
}
2727
};

src/firefly/js/templates/lightcurve/LcPeriodPlotly.jsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -340,8 +340,8 @@ class PhaseFoldingChart extends Component {
340340
//color: 'blue',
341341
color: 'rgba(63, 127, 191, 0.5)'
342342
},
343-
x: data.map((d) => d[0]),
344-
y: data.map((d) => d[1]),
343+
x: data&&data.map((d) => d[0]),
344+
y: data&&data.map((d) => d[1]),
345345
hoverinfo: 'text'
346346
}],
347347
plotlyLayout: {

src/firefly/js/templates/lightcurve/LcPhaseTable.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ export function doPFCalculate(flux, time, period, tzero) {
7575
*/
7676
export function getPhase(time, timeZero, period, dec=DEC_PHASE) {
7777
var q = (time - timeZero)/period;
78-
var p = q >= 0 ? (q - Math.floor(q)) : (q + Math.floor(-q));
78+
var p = q >= 0 ? (q - Math.floor(q)) : (q + Math.floor(-q) + 1.0);
7979

8080
return p.toFixed(dec);
8181
}

0 commit comments

Comments
 (0)