Follow-up from "Set standard SFT window choice in lalpulsar_MakeSFTDAG"
The following discussion from !2363 (merged) should be addressed:
-
@john-whelan started a discussion: (+1 comment) It looks like this doesn't work as planned. First, if --window-type is not specified for lalpulsar_MakeSFTDAG, it throws an error:
usage: lalpulsar_MakeSFTDAG [-h] -O OBSERVING_RUN [-K {RUN,AUX,SIM,DEV}] [-R OBSERVING_REVISION] [-X MISC_DESC] [-a ANALYSIS_START_TIME] [-b ANALYSIS_END_TIME] -f DAG_FILE -G TAG_STRING -d INPUT_DATA_TYPE [-x EXTRA_DATAFIND_TIME] [-M DATAFIND_MATCH] [-y] -k FILTER_KNEE_FREQ -T TIME_BASELINE [-p OUTPUT_SFT_PATH [OUTPUT_SFT_PATH ...]] [-C CACHE_PATH] [-e CACHE_FILE] [-o LOG_PATH] [-N CHANNEL_NAME [CHANNEL_NAME ...]] [--allow-skipping] [-c COMMENT_FIELD] [-F START_FREQ] [-B BAND] -w WINDOW_TYPE [-P OVERLAP_FRACTION] [-m MAX_NUM_PER_NODE] [-L MAX_LENGTH_ALL_JOBS] [-g SEGMENT_FILE] [-l MIN_SEG_LENGTH] [-q LIST_OF_NODES] [-Q NODE_PATH] [-r OUTPUT_JOBS_PER_NODE] [-j DATAFIND_PATH] [-J MAKESFTS_PATH] [-Y REQUEST_MEMORY] [-s REQUEST_DISK] -A ACCOUNTING_GROUP -U ACCOUNTING_GROUP_USER [-u] [-H] [-i] [-D] [-Z] [-v] [-S] lalpulsar_MakeSFTDAG: error: the following arguments are required: -w/--window-type
This is because --window-type still has required=True; see https://git.ligo.org/lscsoft/lalsuite/-/blob/ce1b83fcb88336491adb03546a71eac13f40f338/lalpulsar/bin/MakeData/lalpulsar_MakeSFTDAG.py#L400
parser.add_argument( "-w", "--window-type", required=True, type=str, default="tukey:0.001", help='type of windowing of time-domain to do \ before generating SFTs, e.g. "rectangular", \ "hann", "tukey:<beta in [0,1], required>"; \ (default is "tukey:0.001", standard choice for LVK production SFTs)', )
Also, if
--window-type tukey:0.001
is specified, it throws a different error:Traceback (most recent call last): File "/cvmfs/software.igwn.org/conda/envs/igwn-py310-testing/bin/lalpulsar_MakeSFTDAG", line 1026, in <module> writeToDag( File "/cvmfs/software.igwn.org/conda/envs/igwn-py310-testing/bin/lalpulsar_MakeSFTDAG", line 182, in writeToDag filename = sft_name_from_vars( File "/cvmfs/software.igwn.org/conda/envs/igwn-py310-testing/bin/lalpulsar_MakeSFTDAG", line 115, in sft_name_from_vars spec.window_param = par or 0 TypeError: in method 'SFTFilenameSpec_window_param_set', argument 2 of type 'REAL8'
I think this comes down to the fact that the window parameter never gets converted from a string to a float; see e.g., https://git.ligo.org/lscsoft/lalsuite/-/blob/ce1b83fcb88336491adb03546a71eac13f40f338/lalpulsar/bin/MakeData/lalpulsar_MakeSFTDAG.py#L163
if ":" in args.window_type: window_type, window_param = args.window_type.split(":") argList.append(f"-w {window_type} -r {window_param}")
At this point
window_param
is a string, and it doesn't look like it gets converted to a float before getting passed tosft_name_from_vars()