def verify_strain_options_multi_ifo(opts, parser, ifos): """Parses the strain data CLI options and verifies that they are consistent and reasonable. Parameters ---------- opt : object Result of parsing the CLI with OptionParser, or any object with the required attributes (gps-start-time, gps-end-time, strain-high-pass, pad-data, sample-rate, frame-cache, channel-name, fake-strain, fake-strain-seed). parser : object OptionParser instance. ifos : list of strings List of ifos for which to verify options for """ for ifo in ifos: for opt_group in ensure_one_opt_groups: ensure_one_opt_multi_ifo(opts, parser, ifo, opt_group) required_opts_multi_ifo(opts, parser, ifo, required_opts_list)
def verify_psd_options_multi_ifo(opt, parser, ifos): """Parses the CLI options and verifies that they are consistent and reasonable. Parameters ---------- opt : object Result of parsing the CLI with OptionParser, or any object with the required attributes (psd_model, psd_file, asd_file, psd_estimation, psd_segment_length, psd_segment_stride, psd_inverse_length, psd_output). parser : object OptionParser instance. """ for ifo in ifos: for opt_group in ensure_one_opt_groups: ensure_one_opt_multi_ifo(opt, parser, ifo, opt_group) if opt.psd_estimation[ifo]: required_opts_multi_ifo(opt, parser, ifo, ['--psd-segment-stride', '--psd-segment-length'], required_by = "--psd-estimation")