Skip to content
Snippets Groups Projects
Commit 028bbac4 authored by Ramesh Kumar's avatar Ramesh Kumar
Browse files

TMSS-843: Units added and round off done.

parent 7fdc5662
No related branches found
No related tags found
2 merge requests!634WIP: COBALT commissioning delta,!557TMSS-843: Added custom read only fields frequency_resolution and...
......@@ -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);
}
/**
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment