WEAVE: user-input options refer to 'psd' but means ASD, ie *sqrt(Sn)* which could be confusing
Issue opened at request of @reinhard-prix:
The Weave user-input options --sft-noise-psd
and --Fstat-assume-psd
and their documentation refers to "power spectral density" and "PSD",
but the code actually interprets these as sqrt(PSD)
, ie a "ASDs" or
"amplitude spectral density", see
in ComputeResults.c:190
:
XLALParseMultiNoiseFloorMapped( &Fstat_injectSqrtSX,
sft_catalog_seg_detectors, sft_noise_psd, setup_detectors)
which is defined as (in DetectorStates.c:637
):
int
XLALParseMultiNoiseFloorMapped ( MultiNoiseFloor *multiNoiseFloor,
const LALStringVector
*multiNoiseFloorDetNames,
const LALStringVector *sqrtSX,
const LALStringVector *sqrtSXDetNames)
I wonder what the best solution to this would be. Either
- make the code consistent with the documentation and interpret these
inputs as
Sn
instead ofsqrt(Sn)
, which risks silently breaking and corrupting past code, so probably a bad idea ..., or - leaving the option-names unchanged but fixing the documentation to clarify that by 'psd' it really means sqrt(psd), I guess this would be least disruptive, but if someone has made that error already then they also wouldn't find out,
- change the user-option names to using 'sqrtSn' instead of 'psd', which would explicitly break previous scripts using this option and alerting everyone to the correct interpretation of that option, so probably that's the best option?