diff --git a/SAS/TMSS/frontend/tmss_webapp/src/components/JSONEditor/JEditor.js b/SAS/TMSS/frontend/tmss_webapp/src/components/JSONEditor/JEditor.js index 4ef889e04770e3eb87576fd429a797103170ad85..0c940d0346555d4f0b82969f0d0b6e4f04830ee0 100644 --- a/SAS/TMSS/frontend/tmss_webapp/src/components/JSONEditor/JEditor.js +++ b/SAS/TMSS/frontend/tmss_webapp/src/components/JSONEditor/JEditor.js @@ -457,14 +457,14 @@ function Jeditor(props) { } } else if (propertyKey.toLowerCase() === 'channels_per_subband' && propertyValue instanceof Object) { // Add custom fields to the properties where property 'channels_per_subband' is one of the property. - let freqResolution = { title: 'Frequency Resolution', + let freqResolution = { title: 'Frequency Resolution (kHz)', type: 'string', default: '', format: "grid", // propertyOrder: 1002 }; properties['frequency_resolution'] = freqResolution; - let timeResolution = { title: 'Time Resolution', + let timeResolution = { title: `Time Resolution (${props.observationType==='beamforming observation'?'ms':'sec'})`, type: 'string', default: '', format: "grid", @@ -678,9 +678,9 @@ function Jeditor(props) { function getFrequencyResolution(channelsPerSubband) { if (props.observationType) { if (props.observationType.toLowerCase() === 'beamforming observation') { - return clockValue / 1024 * channelsPerSubband * 1/1000; + return (clockValue / 1024 * channelsPerSubband * 1/1000).toFixed(2); } else if (props.observationType.toLowerCase() === 'target observation') { - return clockValue / 1024 / channelsPerSubband * 1/1000; + return (clockValue / 1024 / channelsPerSubband * 1/1000).toFixed(2); } } else { return null; @@ -694,7 +694,7 @@ function Jeditor(props) { * @returns Number calculated value */ function getTimeResolution(channelsPerSubband, timeIntegrationSteps) { - return 1 / clockValue * 1024 * channelsPerSubband * timeIntegrationSteps; + return 1 / clockValue * 1024 * channelsPerSubband * timeIntegrationSteps * (props.observationType==='beamforming observation'?1000:1); } /**