Skip to content

megaplot.py fails if signal_anderson_darling_{IFO}.dat file includes only a single line

megaplot.py fails with a TypeError if the anderson darling test only produced a single line of output

...
Printing Anderson Darling Statistics
Traceback (most recent call last):
  File "/home/duncan/opt/mambaforge/envs/py310/bin/megaplot.py", line 2715, in <module>
    make_webpage(htmlDir, RUN_FLAGS.run_dirname(), mdc, gps, ifoList, ifoNames, RUN_FLAGS.modelList, snrList, sig_gl, sig_noise, postprocesspath, postDir, RUN_FLAGS)
  File "/home/duncan/opt/mambaforge/envs/py310/bin/megaplot.py", line 2302, in make_webpage
    make_diagnostics_page(htmlDir, plotsDir, model, ifoList, ifoNames,modelList)
  File "/home/duncan/opt/mambaforge/envs/py310/bin/megaplot.py", line 2224, in make_diagnostics_page
    for j in range(len(AD)):
TypeError: object of type 'numpy.float64' has no len()

To reproduce:

conda create -n bayeswave-1.0.10 bayeswave=1.0.10 bayeswaveutils=1.0.10
WORKDIR=$(pwd)
BayesWave \
        --checkpoint \
        --ifo H1 \
        --ifo L1 \
        --psdlength 2.0 \
        --H1-cache LALSimAdLIGO \
        --L1-cache LALSimAdLIGO \
        --bayesLine \
        --updateGeocenterPSD \
        --waveletPrior \
        --Dmax 100 \
        --Niter 10000 \
        --signalOnly \
        --trigtime 1126259462.420000076 \
        --segment-start 1126259461.420000076 \
        --srate 256.0 \
        --seglen 2.0 \
        --window 1.0 \
        --H1-flow 20.0 \
        --L1-flow 20.0 \
        --psdstart 1126259461.420000076 \
        --outputDir ${WORKDIR} \
        --dataseed 1234 \
        --L1-timeslide 0.0 \
        --Nchain 2
BayesWavePost \
        --ifo H1 \
        --ifo L1 \
        --psdlength 2.0 \
        --0noise \
        --signalOnly \
        --bayesLine \
        --dataseed 1234 \
        --trigtime 1126259462.420000076 \
        --segment-start 1126259461.420000076 \
        --srate 256.0 \
        --seglen 2.0 \
        --window 1.0 \
        --H1-flow 20.0 \
        --L1-flow 20.0 \
        --psdstart 1126259461.420000076 \
        --outputDir ${WORKDIR} \
        --H1-cache interp:${WORKDIR}/H1_fairdraw_asd.dat \
        --L1-cache interp:${WORKDIR}/L1_fairdraw_asd.dat \
        --L1-timeslide 0.0
megasky.py ${WORKDIR}
megaplot.py ${WORKDIR}
Full output
$ WORKDIR=$(pwd)
(bayeswave-1.0.10) [WSL-Debian 15:15 tmp (testing)]
$ BayesWave         --checkpoint         --ifo H1         --ifo L1         --psdlength 2.0         --H1-cache LALSimAdLIGO         --L1-cache LALSimAdLIGO         --bayesLine         --updateGeocenterPSD         --waveletPrior         --Dmax 100         --Niter 10000         --signalOnly         --trigtime 1126259462.420000076         --segment-start 1126259461.420000076         --srate 256.0         --seglen 2.0         --window 1.0         --H1-flow 20.0         --L1-flow 20.0         --psdstart 1126259461.420000076         --outputDir ${WORKDIR}         --dataseed 1234         --L1-timeslide 0.0         --Nchain 2

 ========= BayesWave Version: ========

  Git remote origin: https://github.com/conda-forge/bayeswave-feedstock
  Git version: 169b251-dirty
  Git commit: 169b251f5724446310dc493dc54241305dc6bfbe
  Git commit author: 41898282+github-actions[bot]@users.noreply.github.com
  Git commit date: Thu May 26 09:50:14 2022 +0000
  Command line:  --checkpoint  --ifo H1 --ifo L1 --psdlength 2.0 --H1-cache LALSimAdLIGO --L1-cache LALSimAdLIGO --bayesLine  --updateGeocenterPSD  --waveletPrior  --Dmax 100 --Niter 10000 --signalOnly  --trigtime 1126259462.420000076 --segment-start 1126259461.420000076 --srate 256.0 --seglen 2.0 --window 1.0 --H1-flow 20.0 --L1-flow 20.0 --psdstart 1126259461.420000076 --outputDir /home/duncan/git/igwn-conda/packages/tmp --dataseed 1234 --L1-timeslide 0.0 --Nchain 2


 ======= LALInferenceReadData() ======
/home/duncan/git/igwn-conda/packages/tmp/checkpoint/asd_H1.dat.0 is NULL, checkpointing hasn't happened yet.
/home/duncan/git/igwn-conda/packages/tmp/checkpoint/asd_L1.dat.0 is NULL, checkpointing hasn't happened yet.
Set trigtime to 1126259462.4200000763

 ============= Channels ==============
Detector H1: channel H1:Simulated
Detector L1: channel L1:Simulated

************************ WARNING ************************
Too few iterations for spline integration (10000)
Reverting to trapezoid integration
Request --Niter > 1000000 for spline integration
*********************************************************

Outputting all data to: /home/duncan/git/igwn-conda/packages/tmp/

Calculating overlap reduction function, NI=2


 ============ BayesLine ==============
Setting maximum number of BL lines to 1000
BayesLine search phase for IFO H1
   Excess SNR = 0.000000
BayesLine search phase for IFO L1
   Excess SNR = 0.000000
BayesLine clone PSD to parallel chains for IFO H1
BayesLine clone PSD to parallel chains for IFO L1

 ========= Checkpoint flag found ==========
No checkpoint files found
Continue with full run

characterizing PSD+glitch model...

 ============ Run Settings ===========
  number of detectors             2
  trigger time (s)                1126259462.420000076
  duration of data (s)            2
  duration of window (s)          1.0
  sampling rate (Hz)              256
  number of samples               512
  number of iterations            10000
  number of burn-in iterations    50000
  max N wavelets                  100
  max Q for wavelets              40
  number of chains                1
  coldest chain temperature       1
  initial temperature spacing     1.2
  number of independent steps     100

 ============= Run Flags =============
  self checkpointing is .... ENABLED
  maximized logL is ........ DISABLED
  BayesLine PSD model is ... ENABLED
  Stochastic model is ...... DISABLED
  cleaning phase is ........ ENABLED
  glitch model is .......... REQUIRED
  signal model is .......... DISABLED
  noise model is ........... DISABLED
  wavelet prior is ......... ENABLED
  clustering prior is ...... DISABLED
  glitch amp prior is ...... SNR*=5
  signal amp prior is ...... SNR*=5
  ext. amp. update is ...... DISABLED
  polarization constraint is ENABLED
  background prior is ...... DISABLED
  density proposal is ...... SNR^2/2
  orientation proposal is .. ENABLED
  amplitude proposal is .... ENABLED
  thermo. integration ...... TRAPEZOID
  logL=const test is ....... DISABLED
  PTMCMC adaptation is ..... DISABLED
  gnuplot output is ........ DISABLED
  chirplet option is ....... DISABLED

starting sampler with model size 2
Setting up time-frequency proposal for H1...finished
Setting up time-frequency proposal for L1...finished
...saved model clean at iteration 0
RJMCMC: 0/10000 (1,0)
  logL=-1214.508682 hSNR=0   g0SNR=11   g1SNR=15
  DIM: DGW=0 D0=1 D1=1 m0=0 m1=0 m2=0 m3=0
  RJ:  rjacc=0.0e+00 cacc=0.0e+00 dacc=0.0e+00 uacc=0.0e+00
  INT: macc=0.0e+00 facc=0.0e+00 pacc=0.0e+00
RJMCMC: 1000/10000 (1,0)
  logL=-810.338472 hSNR=0   g0SNR=0   g1SNR=11
  DIM: DGW=0 D0=0 D1=1 m0=0 m1=0 m2=0 m3=0
  RJ:  rjacc=3.5e-02 cacc=8.9e-03 dacc=5.7e-02 uacc=3.7e-02
  INT: macc=5.6e-01 facc=6.9e-01 pacc=4.7e-01
RJMCMC: 2000/10000 (1,0)
  logL=-484.774924 hSNR=0   g0SNR=19   g1SNR=13
  DIM: DGW=0 D0=1 D1=2 m0=0 m1=0 m2=0 m3=0
  RJ:  rjacc=2.5e-02 cacc=9.1e-03 dacc=4.5e-02 uacc=2.0e-02
  INT: macc=4.4e-01 facc=5.5e-01 pacc=4.0e-01
RJMCMC: 3000/10000 (1,0)
  logL=-446.717012 hSNR=0   g0SNR=17   g1SNR=13
  DIM: DGW=0 D0=2 D1=2 m0=0 m1=0 m2=0 m3=0
  RJ:  rjacc=1.8e-02 cacc=8.9e-03 dacc=3.2e-02 uacc=1.4e-02
  INT: macc=4.1e-01 facc=5.1e-01 pacc=3.9e-01
RJMCMC: 4000/10000 (1,0)
  logL=-446.104392 hSNR=0   g0SNR=18   g1SNR=13
  DIM: DGW=0 D0=2 D1=2 m0=0 m1=0 m2=0 m3=0
  RJ:  rjacc=2.2e-02 cacc=1.8e-02 dacc=3.1e-02 uacc=1.1e-02
  INT: macc=3.8e-01 facc=4.8e-01 pacc=3.6e-01
RJMCMC: 5000/10000 (1,0)
  logL=-463.397699 hSNR=0   g0SNR=15   g1SNR=15
  DIM: DGW=0 D0=1 D1=2 m0=0 m1=0 m2=0 m3=0
  RJ:  rjacc=2.0e-02 cacc=2.0e-02 dacc=2.4e-02 uacc=8.3e-03
  INT: macc=3.7e-01 facc=4.6e-01 pacc=3.5e-01
RJMCMC: 6000/10000 (1,0)
  logL=-473.961851 hSNR=0   g0SNR=19   g1SNR=12
  DIM: DGW=0 D0=1 D1=2 m0=0 m1=0 m2=0 m3=0
  RJ:  rjacc=2.0e-02 cacc=1.9e-02 dacc=2.3e-02 uacc=6.6e-03
  INT: macc=3.6e-01 facc=4.5e-01 pacc=3.4e-01
RJMCMC: 7000/10000 (1,0)
  logL=-476.991072 hSNR=0   g0SNR=19   g1SNR=10
  DIM: DGW=0 D0=2 D1=1 m0=0 m1=0 m2=0 m3=0
  RJ:  rjacc=1.9e-02 cacc=2.0e-02 dacc=2.1e-02 uacc=5.5e-03
  INT: macc=3.5e-01 facc=4.4e-01 pacc=3.4e-01
RJMCMC: 8000/10000 (1,0)
  logL=-459.232893 hSNR=0   g0SNR=16   g1SNR=11
  DIM: DGW=0 D0=1 D1=1 m0=0 m1=0 m2=0 m3=0
  RJ:  rjacc=2.0e-02 cacc=1.9e-02 dacc=2.4e-02 uacc=9.2e-03
  INT: macc=3.6e-01 facc=4.4e-01 pacc=3.4e-01
RJMCMC: 9000/10000 (1,0)
  logL=-453.214052 hSNR=0   g0SNR=16   g1SNR=9
  DIM: DGW=0 D0=1 D1=1 m0=0 m1=0 m2=0 m3=0
  RJ:  rjacc=2.1e-02 cacc=1.8e-02 dacc=2.5e-02 uacc=1.2e-02
  INT: macc=3.7e-01 facc=4.7e-01 pacc=3.5e-01
Trapezoid Rule logZ = 0 +/- 0.254389


 Removing excess power outside of t=[0.5,1.5]
 Residual SNR in H1 = 14.5056
 Residual SNR in L1 = 0
 Residual SNR = 14.5056
characterizing signal model...

 ============ Run Settings ===========
  number of detectors             2
  trigger time (s)                1126259462.420000076
  duration of data (s)            2
  duration of window (s)          1.0
  sampling rate (Hz)              256
  number of samples               512
  number of iterations            10000
  number of burn-in iterations    50000
  max N wavelets                  100
  max Q for wavelets              40
  number of chains                2
  coldest chain temperature       1
  initial temperature spacing     1.2
  number of independent steps     100

 ============= Run Flags =============
  self checkpointing is .... ENABLED
  maximized logL is ........ DISABLED
  BayesLine PSD model is ... ENABLED
  Stochastic model is ...... DISABLED
  cleaning phase is ........ DISABLED
  glitch model is .......... DISABLED
  signal model is .......... REQUIRED
  noise model is ........... DISABLED
  wavelet prior is ......... ENABLED
  clustering prior is ...... DISABLED
  glitch amp prior is ...... SNR*=5
  signal amp prior is ...... SNR*=5
  ext. amp. update is ...... DISABLED
  polarization constraint is ENABLED
  background prior is ...... DISABLED
  density proposal is ...... SNR^2/2
  orientation proposal is .. ENABLED
  amplitude proposal is .... ENABLED
  thermo. integration ...... TRAPEZOID
  logL=const test is ....... DISABLED
  PTMCMC adaptation is ..... ENABLED
  gnuplot output is ........ DISABLED
  chirplet option is ....... DISABLED

starting sampler with model size 1
Setting up time-frequency proposal for H1...finished
Setting up time-frequency proposal for L1...finished
Setting up time-frequency proposal for signal model...finished
...saved model signal at iteration 0
RJMCMC: 0/10000 (1,0)
  logL=-1044.718273 hSNR=31   g0SNR=0   g1SNR=0
  DIM: DGW=1 D0=0 D1=0 m0=0 m1=0 m2=0 m3=0
  RJ:  rjacc=0.0e+00 cacc=0.0e+00 dacc=0.0e+00 uacc=0.0e+00
  INT: macc=0.0e+00 facc=0.0e+00 pacc=0.0e+00
  EXT: xacc=0.0e+00
RJMCMC: 1000/10000 (1,0)
  logL=-475.943465 hSNR=13   g0SNR=0   g1SNR=0
  DIM: DGW=1 D0=0 D1=0 m0=0 m1=0 m2=0 m3=0
  RJ:  rjacc=2.8e-02 cacc=9.0e-03 dacc=5.9e-02 uacc=0.0e+00
  INT: macc=5.3e-01 facc=6.6e-01 pacc=4.1e-01
  EXT: xacc=5.2e-01
RJMCMC: 2000/10000 (1,0)
  logL=-453.732984 hSNR=16   g0SNR=0   g1SNR=0
  DIM: DGW=2 D0=0 D1=0 m0=0 m1=0 m2=0 m3=0
  RJ:  rjacc=3.5e-02 cacc=2.2e-02 dacc=4.6e-02 uacc=5.8e-02
  INT: macc=4.8e-01 facc=6.1e-01 pacc=3.7e-01
  EXT: xacc=5.2e-01
RJMCMC: 3000/10000 (1,0)
  logL=-425.126973 hSNR=12   g0SNR=0   g1SNR=0
  DIM: DGW=1 D0=0 D1=0 m0=0 m1=0 m2=0 m3=0
  RJ:  rjacc=3.4e-02 cacc=2.7e-02 dacc=3.8e-02 uacc=5.6e-02
  INT: macc=5.1e-01 facc=6.4e-01 pacc=3.8e-01
  EXT: xacc=5.3e-01
RJMCMC: 4000/10000 (1,0)
  logL=-451.949405 hSNR=10   g0SNR=0   g1SNR=0
  DIM: DGW=1 D0=0 D1=0 m0=0 m1=0 m2=0 m3=0
  RJ:  rjacc=4.0e-02 cacc=3.4e-02 dacc=4.3e-02 uacc=6.2e-02
  INT: macc=5.2e-01 facc=6.7e-01 pacc=3.4e-01
  EXT: xacc=5.3e-01
RJMCMC: 5000/10000 (1,0)
  logL=-459.300904 hSNR=10   g0SNR=0   g1SNR=0
  DIM: DGW=3 D0=0 D1=0 m0=0 m1=0 m2=0 m3=0
  RJ:  rjacc=3.7e-02 cacc=3.1e-02 dacc=4.3e-02 uacc=5.8e-02
  INT: macc=5.1e-01 facc=6.6e-01 pacc=3.7e-01
  EXT: xacc=5.3e-01
RJMCMC: 6000/10000 (1,0)
  logL=-431.273623 hSNR=10   g0SNR=0   g1SNR=0
  DIM: DGW=3 D0=0 D1=0 m0=0 m1=0 m2=0 m3=0
  RJ:  rjacc=3.5e-02 cacc=2.6e-02 dacc=4.3e-02 uacc=5.6e-02
  INT: macc=5.1e-01 facc=6.5e-01 pacc=3.6e-01
  EXT: xacc=5.3e-01
RJMCMC: 7000/10000 (1,0)
  logL=-444.530628 hSNR=11   g0SNR=0   g1SNR=0
  DIM: DGW=2 D0=0 D1=0 m0=0 m1=0 m2=0 m3=0
  RJ:  rjacc=3.3e-02 cacc=2.8e-02 dacc=3.7e-02 uacc=5.1e-02
  INT: macc=5.0e-01 facc=6.5e-01 pacc=3.4e-01
  EXT: xacc=5.2e-01
RJMCMC: 8000/10000 (1,0)
  logL=-424.683221 hSNR=10   g0SNR=0   g1SNR=0
  DIM: DGW=2 D0=0 D1=0 m0=0 m1=0 m2=0 m3=0
  RJ:  rjacc=3.3e-02 cacc=3.0e-02 dacc=3.6e-02 uacc=5.0e-02
  INT: macc=4.9e-01 facc=6.4e-01 pacc=3.4e-01
  EXT: xacc=5.1e-01
RJMCMC: 9000/10000 (1,0)
  logL=-460.653724 hSNR=12   g0SNR=0   g1SNR=0
  DIM: DGW=2 D0=0 D1=0 m0=0 m1=0 m2=0 m3=0
  RJ:  rjacc=3.2e-02 cacc=2.8e-02 dacc=3.7e-02 uacc=4.9e-02
  INT: macc=4.9e-01 facc=6.3e-01 pacc=3.6e-01
  EXT: xacc=5.1e-01
Trapezoid Rule logZ = 42971.4 +/- 493.59

$ BayesWavePost \
   --ifo>         --ifo H1 \
>         --ifo L1 \
>         --psdlength 2.0 \
>         --0noise \
>         --signalOnly \
>         --bayesLine \
>         --dataseed 1234 \
>         --trigtime 1126259462.420000076 \
>         --segment-start 1126259461.420000076 \
>         --srate 256.0 \
>         --seglen 2.0 \
>         --window 1.0 \
>         --H1-flow 20.0 \
  --L1->         --L1-flow 20.0 \
>         --psdstart 1126259461.420000076 \
>         --outputDir ${WORKDIR} \
>         --H1-cache interp:${WORKDIR}/H1_fairdraw_asd.dat \
    --L>         --L1-cache interp:${WORKDIR}/L1_fairdraw_asd.dat \
>         --L1-timeslide 0.0

 ========= BayesWave Version: ========

  Git remote origin: https://github.com/conda-forge/bayeswave-feedstock
  Git version: 169b251-dirty
  Git commit: 169b251f5724446310dc493dc54241305dc6bfbe
  Git commit author: 41898282+github-actions[bot]@users.noreply.github.com
  Git commit date: Thu May 26 09:50:14 2022 +0000
Found --0noise in the command line

 ======= LALInferenceReadData() ======
Set trigtime to 1126259462.4200000763
Looking for ASD interpolation file /home/duncan/git/igwn-conda/packages/tmp/H1_fairdraw_asd.dat
Read 218 records from /home/duncan/git/igwn-conda/packages/tmp/H1_fairdraw_asd.dat
Looking for ASD interpolation file /home/duncan/git/igwn-conda/packages/tmp/L1_fairdraw_asd.dat
Read 218 records from /home/duncan/git/igwn-conda/packages/tmp/L1_fairdraw_asd.dat

 ============= Channels ==============
Detector H1: channel H1:Simulated
Detector L1: channel L1:Simulated

Outputting all data to: /home/duncan/git/igwn-conda/packages/tmp/


 ===== BayesWave Post Processing =====
Getting data into same format as waveforms
Getting data into same format as waveforms
Starting loop over chains/signal_params_h0.dat.0  ...
Nsamples = 50
random_draw = 30
map dimension for channel "signal" = 2
Starting loop over chains/clean_params_H1.dat.0  ...
Nsamples = 50
random_draw = 39
map dimension for channel "glitch[0]" = 1
map dimension for channel "glitch[1]" = 1
 ======= DONE! ======
$ megasky.py ${WORKDIR}

WARNING: version mismatch between CFITSIO header (v4.000999999999999) and linked library (v4.01).


WARNING: version mismatch between CFITSIO header (v4.000999999999999) and linked library (v4.01).


WARNING: version mismatch between CFITSIO header (v4.000999999999999) and linked library (v4.01).

WARNING: AstropyDeprecationWarning: The get_cosmology_from_string method is deprecated and may be removed in a future version.
        Use get instead. [ligo.skymap.postprocess.cosmology]
No MDC log provided.
Entered /home/duncan/git/igwn-conda/packages/tmp
No internal injection found on line 27 of bayeswave.run
Extracting RA/DEC samples
Total samples are 100
After removing burn-in samples are 75
100%|████████████████████████████████████████████████████████████████| 200/200 [00:12<00:00, 15.42it/s]
Finding sidereal time
Using GPS 1126259462.420000076
GOT MDC?
None
adaptive refinement round 1 of 7 ...
adaptive refinement round 2 of 7 ...
adaptive refinement round 3 of 7 ...
adaptive refinement round 4 of 7 ...
adaptive refinement round 5 of 7 ...
adaptive refinement round 6 of 7 ...
adaptive refinement round 7 of 7 ...
$ megaplot.py ${WORKDIR}
/home/duncan/opt/mambaforge/envs/bayeswave-1.0.10/bin/megaplot.py:124: DeprecationWarning: invalid escape sequence '\c'
  cbc_dict['chi_eff'] = [6, 'chi_eff', '$\chi_{\mathrm{eff}}$', 'Effective spin parameter']
/home/duncan/opt/mambaforge/envs/bayeswave-1.0.10/bin/megaplot.py:782: DeprecationWarning: invalid escape sequence '\_'
  ax.set_title('Spectrogram of median {0} waveform in {1}, Q={2}'.format(model.replace('_','\_'),ifoNames[int(ifo)], Q))
/home/duncan/opt/mambaforge/envs/bayeswave-1.0.10/bin/megaplot.py:1593: DeprecationWarning: invalid escape sequence '\m'
  plt.plot(x,scs.norm.pdf(x, mu, sigma),color='k',lw=1.4,label='$\mathcal{N}[0,1]$')
/home/duncan/opt/mambaforge/envs/bayeswave-1.0.10/bin/megaplot.py:1609: DeprecationWarning: invalid escape sequence '\m'
  plt.plot(x,cdf,color='k',lw=1.4,label='$\mathcal{N}[0,1]$')
/home/duncan/opt/mambaforge/envs/bayeswave-1.0.10/lib/python3.10/site-packages/glue/ligolw/__init__.py:102: DeprecationWarning: glue.ligolw has been deprecated and is not being updated, please migrate your workflow to use the updated LIGO_LW XML format and interface supported by python-ligo-lw
  warnings.warn(
Path to megaplot:
/home/duncan/opt/mambaforge/envs/bayeswave-1.0.10/bin/megaplot.py


BWrun file is /home/duncan/git/igwn-conda/packages/tmp/bayeswave.run

This run was executed with the --signalOnly flag

The trigger time is GPS: 1126259462.42
Detectors(s) found: 2
The detectors are: H1, L1
BayesLine is: True
Models are: signal, clean
        flow = 20.0
        seglen = 2.0
        Nchains = 2
        Cleaning phase = True

Workdir:
/home/duncan/git/igwn-conda/packages/tmp


/home/duncan/opt/mambaforge/envs/bayeswave-1.0.10/lib/python3.10/site-packages/pkg_resources/__init__.py:1154: DeprecationWarning: Use of .. or absolute path in a resource path is not allowed and will raise exceptions in a future release.
  return get_provider(package_or_requirement).get_resource_filename(
The mdc status is: False


Analyzing the signal model
Processing H1 data
trying to make signal cornerplot
ifo is 0, making signal cornerplot
making cornerplot with ['t', 'f', 'Q', 'logA', 'phi_int']
making cornerplot with ['alpha', 'sindelta', 'psi', 'elip', 'phi_ext']
Making data Q_scans
Making residual Q_scans
Processing L1 data
trying to make signal cornerplot
Making data Q_scans
Making residual Q_scans

Analyzing the clean model
Processing H1 data
Making data Q_scans
Making residual Q_scans
Processing L1 data
Making data Q_scans
Making residual Q_scans
   log( E_signal / E_noise ) = 42971.386758
   log( E_signal / E_glitch ) = 42971.386758
   log( E_signal / E_noise ) = 42971.3867578
   log( E_signal / E_glitch ) = 42971.3867578
<__array_function__ internals>:180: DeprecationWarning: Calling nonzero on 0d arrays is deprecated, as it behaves surprisingly. Use `atleast_1d(cond).nonzero()` if the old behavior was intended. If the context of this warning is of the form `arr[nonzero(cond)]`, just use `arr[cond]`.
Failed to plot temp vs. likelihood.  This may be due to a change in file format for files like signal_evidence.dat
whitened_residual_plots filename 1: post/signal/signal_median_PSD_H1.dat
whitened_residual_plots filename 2: post/signal/fourier_domain_signal_median_residual_H1.dat
whitened_residual_plots filename 1: post/signal/signal_median_PSD_L1.dat
whitened_residual_plots filename 2: post/signal/fourier_domain_signal_median_residual_L1.dat
whitened_residual_plots filename 1: post/clean/glitch_median_PSD_H1.dat
whitened_residual_plots filename 2: post/clean/fourier_domain_glitch_median_residual_H1.dat
whitened_residual_plots filename 1: post/clean/glitch_median_PSD_L1.dat
whitened_residual_plots filename 2: post/clean/fourier_domain_glitch_median_residual_L1.dat
whitened_residual_plots filename 1: post/noise/noise_median_PSD_H1.dat
Error producing noise residual histograms
post/noise/noise_median_PSD_H1.dat not found.
continuing
making cleaning phase plot(s)
Are we going to try AD statistics? True
Printing Anderson Darling Statistics
Traceback (most recent call last):
  File "/home/duncan/opt/mambaforge/envs/bayeswave-1.0.10/bin/megaplot.py", line 2715, in <module>
    make_webpage(htmlDir, RUN_FLAGS.run_dirname(), mdc, gps, ifoList, ifoNames, RUN_FLAGS.modelList, snrList, sig_gl, sig_noise, postprocesspath, postDir, RUN_FLAGS)
  File "/home/duncan/opt/mambaforge/envs/bayeswave-1.0.10/bin/megaplot.py", line 2302, in make_webpage
    make_diagnostics_page(htmlDir, plotsDir, model, ifoList, ifoNames,modelList)
  File "/home/duncan/opt/mambaforge/envs/bayeswave-1.0.10/bin/megaplot.py", line 2224, in make_diagnostics_page
    for j in range(len(AD)):
TypeError: object of type 'numpy.float64' has no len()
$ cat post/signal/signal_anderson_darling_H1.dat
256 0.793937 0.485359

I think this the following patch will force numpy to produce columnar arrays even when a single row is found:

$ git diff
diff --git a/BayesWaveUtils/scripts/megaplot.py b/BayesWaveUtils/scripts/megaplot.py
index 6a2a2c7..79436b0 100755
--- a/BayesWaveUtils/scripts/megaplot.py
+++ b/BayesWaveUtils/scripts/megaplot.py
@@ -2220,7 +2220,7 @@ def make_diagnostics_page(htmlDir, plotsDir, model, ifoList, ifoNames, modelList
             runType_local, model_local = runType_and_model(m, runFlags)
             for ifo in ifoNames:
                 AD_file = postDir + "{runType}/{model}_anderson_darling_{ifo}.dat".format(runType = runType_local, model = model_local, ifo = ifo)
-                sample_rate, AD, p_value = np.loadtxt(AD_file, unpack = True)
+                sample_rate, AD, p_value = np.loadtxt(AD_file, unpack = True, ndmin = 2)
                 for j in range(len(AD)):
                     subpage.write('\t<tr>\n')
                     if j == 0: